/* GANDALF Fleet — web/iOS version. Same look as the Android app (design canvas shared.css). */
@font-face { font-family: "Jakarta"; src: url(fonts/plus_jakarta_400.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url(fonts/plus_jakarta_500.ttf) format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url(fonts/plus_jakarta_600.ttf) format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url(fonts/plus_jakarta_700.ttf) format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url(fonts/plus_jakarta_800.ttf) format("truetype"); font-weight: 800; font-display: swap; }
@font-face { font-family: "JBMono"; src: url(fonts/jetbrains_mono_500.ttf) format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "JBMono"; src: url(fonts/jetbrains_mono_700.ttf) format("truetype"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #0E081C; --ink: #FFFFFF; --lilac: #D9B0FC; --lilac2: #E6CCFD; --muted: #A483C3; --muted2: #C4A6E6;
  --green: #6EF2B2; --green2: #9FF7CC; --red: #F9607F; --red2: #FF9DB0; --amber: #F5C26B; --violet: #C9A0FF; --grey: #8A7CA3;
  --line: rgba(170,120,220,.14);
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Jakarta", system-ui, -apple-system, sans-serif; -webkit-text-size-adjust: 100%; }
body { min-height: 100dvh; overscroll-behavior-y: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
.app { position: relative; max-width: 430px; margin: 0 auto; min-height: 100dvh; }

/* page shell */
.page { position: relative; padding: calc(var(--sat) + 4px) 13px calc(100px + var(--sab)); overflow-x: hidden; }
.page.nonav { padding-bottom: calc(28px + var(--sab)); }
.art { position: absolute; left: 0; right: 0; top: 0; height: calc(96px + var(--sat)); background: url(assets/header_moon.webp) 100% 50% / cover no-repeat;
  opacity: .95; -webkit-mask-image: linear-gradient(180deg,#000 0%,#000 80%,transparent 100%); mask-image: linear-gradient(180deg,#000 0%,#000 80%,transparent 100%); pointer-events: none; }
.page > *:not(.art) { position: relative; }

/* header */
.hdr { display: flex; align-items: center; height: 57px; padding: 0 1.5px 0 4.5px; }
.logo { flex: none; width: 58px; height: 58px; object-fit: contain; }
.brand { flex: 1; min-width: 0; margin-left: 9.5px; display: flex; flex-direction: column; gap: 5px; }
.brand b { font-size: 15.5px; font-weight: 800; letter-spacing: .02em; line-height: 16px; }
.brand span { font-size: 9.5px; font-weight: 700; letter-spacing: .2em; line-height: 10px; color: var(--lilac); white-space: nowrap; }
.brand i { font-style: normal; font-weight: 800; color: var(--green); }
.brand i.warn { color: var(--amber); }
.brand i:before { content: "·"; margin: 0 6px; color: var(--muted); }
.acts { flex: none; display: flex; gap: 9px; }
.gbtn { position: relative; flex: none; width: 42px; height: 42px; border-radius: 13px; display: flex; align-items: center; justify-content: center;
  background: rgba(54,26,86,.78); border: 1px solid rgba(181,130,218,.45); box-shadow: 0 6px 14px rgba(40,6,80,.35); }
.gbtn.on { background: rgba(245,194,107,.14); border-color: rgba(245,194,107,.5); }
.bn { position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--red); color: #fff;
  font-size: 10.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; border: 2px solid var(--bg); }
.stat { display: flex; align-items: center; gap: 9px; height: 24px; padding: 0 5px 0 8px; }
.stat .d { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.stat b { flex: 1; font-size: 15px; font-weight: 700; }
.stat span { font-size: 11px; color: var(--lilac); }

/* labels, cards, tiles */
.lbl { margin: 16px 5px 7.5px; font-size: 10px; font-weight: 800; letter-spacing: .2em; line-height: 12px; color: var(--lilac); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.lbl i { font-style: normal; letter-spacing: .02em; font-weight: 600; color: var(--muted); font-size: 11px; white-space: nowrap; }
.card { position: relative; overflow: hidden; border-radius: 18px; background: radial-gradient(48% 22% at 50% 0%,rgba(160,70,230,.40),transparent 100%),linear-gradient(180deg,#24163E 0%,#1D1134 55%,#1A0F2E 100%);
  border: 1px solid rgba(170,120,220,.30); box-shadow: 0 12px 30px rgba(0,0,0,.35); }
.card:before { content: ""; position: absolute; left: 15%; right: 15%; top: 0; height: 1px; background: linear-gradient(90deg,transparent,rgba(200,140,255,.9),transparent); }
.pad { padding: 11px; } .pad13 { padding: 13px; } .pad16 { padding: 16px; } .padx { padding: 2px 13px; }
.grid2 { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.grid3 { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.grid4 { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; }
.tile { padding: 9px 11px; display: flex; flex-direction: column; gap: 4px; border-radius: 12px; background: linear-gradient(135deg,#34224F 0%,#2B1E45 100%); border: 1px solid rgba(150,105,200,.45); min-width: 0; }
.tk { font-size: 9.5px; font-weight: 700; letter-spacing: .05em; color: #D9B3FD; white-space: nowrap; }
.tv { font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv.big { font-size: 18px; }
.ts { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note { font-size: 12.5px; line-height: 1.45; color: var(--lilac); }
.small { font-size: 11.5px; line-height: 1.45; color: var(--muted); margin: 8px 3px 0; }
.err { font-size: 12.5px; font-weight: 600; color: var(--red); margin: 9px 3px 0; line-height: 1.4; }
.ok { color: var(--green); } .warn { color: var(--amber); } .bad { color: var(--red); }
.row { display: flex; align-items: center; }
.sep { border-top: 1px solid var(--line); }

/* overview */
.ovtop { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 0 5px; }
.ovk { font-size: 10px; font-weight: 800; letter-spacing: .16em; color: var(--lilac); }
.ovv { font-size: 32px; font-weight: 800; color: var(--green); letter-spacing: -.02em; line-height: 38px; margin-top: 2px; white-space: nowrap; }
.chip { flex: none; margin-top: 2px; font-size: 11px; font-weight: 700; color: var(--lilac2); padding: 5px 9px; border-radius: 8px; background: rgba(165,80,252,.18); border: 1px solid rgba(176,112,224,.45); white-space: nowrap; }
.chart { position: relative; height: 116px; margin: 6px 0 0; }
.chart svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.chart .hl { position: absolute; top: 0; width: 62px; height: 116px; margin-left: -31px; border-radius: 12px; background: linear-gradient(180deg,rgba(165,80,252,.05) 0%,rgba(165,80,252,.2) 100%); border: 1px solid rgba(176,112,224,.35); }
.chart .pl { position: absolute; transform: translateX(-50%); white-space: nowrap; font-size: 11px; font-weight: 600; color: var(--lilac); pointer-events: none; }
.chart .pl.on { font-size: 13.5px; font-weight: 800; color: #fff; padding: 3px 7px; border-radius: 7px; background: rgba(69,36,100,.95); border: 1px solid rgba(170,120,220,.55); }
.chart .dl { position: absolute; top: 97px; transform: translateX(-50%); font-size: 10.5px; font-weight: 600; color: var(--muted); pointer-events: none; }
.chart .dl.on { font-weight: 800; color: #fff; }
.chart .hit { position: absolute; top: 0; height: 100%; }

/* market */
.half { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 12px; min-width: 0; }
.half.b { background: rgba(249,96,127,.1); border: 1px solid rgba(249,96,127,.35); }
.half.s { background: rgba(110,242,178,.09); border: 1px solid rgba(110,242,178,.32); }
.hk { font-size: 9.5px; font-weight: 800; letter-spacing: .14em; }
.hv { font-size: 20px; font-weight: 800; line-height: 24px; white-space: nowrap; }
.hs { font-size: 11px; color: var(--lilac); }
.sub9 { margin: 12px 3px 2px; font-size: 9.5px; font-weight: 800; letter-spacing: .16em; color: var(--muted); }
.mrow { display: flex; align-items: center; gap: 10px; min-height: 44px; border-top: 1px solid var(--line); padding: 0 3px; }
.mrow img { width: 28px; height: 28px; object-fit: contain; flex: none; }
.mname { width: 92px; flex: none; min-width: 0; }
.mname b { display: block; font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mname span { display: block; font-size: 10.5px; color: var(--muted); }
.share { flex: 1; height: 5px; border-radius: 5px; background: rgba(170,120,220,.16); overflow: hidden; min-width: 30px; }
.share span { display: block; height: 100%; border-radius: 5px; background: var(--red); opacity: .8; }
.mval { min-width: 54px; text-align: right; font-size: 13px; font-weight: 800; color: var(--red2); }
.mat { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 4px 9px; border-radius: 12px; background: linear-gradient(135deg,#34224F 0%,#2B1E45 100%); border: 1px solid rgba(150,105,200,.45); min-width: 0; }
.mat img { width: 36px; height: 36px; object-fit: contain; }
.mat b { font-size: 15px; font-weight: 800; }
.mat span { font-size: 10px; font-weight: 600; color: #D9B3FD; }

/* search + seg */
.srch { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border-radius: 12px; background: linear-gradient(180deg,#221539 0%,#1A102F 100%); border: 1px solid rgba(170,120,220,.25); }
.srch input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; font-size: 15px; }
.srch input::placeholder { color: var(--muted); }
.seg { display: flex; height: 40px; padding: 3px; border-radius: 13px; background: rgba(54,26,86,.6); border: 1px solid rgba(181,130,218,.4); }
.seg button { flex: 1; min-width: 0; border-radius: 10px; font-size: 12.5px; font-weight: 600; color: var(--lilac); display: flex; align-items: center; justify-content: center; gap: 5px; white-space: nowrap; }
.seg button.on { background: linear-gradient(150deg,#8A3CC8 0%,#6A2BA0 50%,#4E2180 100%); color: #fff; font-weight: 800; box-shadow: 0 0 12px rgba(140,60,210,.35); }
.seg button small { font-size: 11px; font-weight: 700; color: var(--muted); }
.seg button.on small { color: var(--lilac2); }
.seg.sm { height: 36px; }

/* accounts */
.acc { display: flex; align-items: center; gap: 11px; min-height: 60px; padding: 0 9px 0 13px; border-top: 1px solid var(--line); width: 100%; text-align: left; }
.acc:first-child { border-top: 0; }
.acc.dim { opacity: .62; }
.av { position: relative; flex: none; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.av img { width: 35px; height: 35px; border-radius: 50%; background: #1A0E2E; object-fit: cover; border: 2px solid #1D1134; }
.nm { font-size: 14px; font-weight: 800; display: flex; align-items: baseline; gap: 6px; white-space: nowrap; overflow: hidden; }
.nm small { font-size: 11px; font-weight: 600; color: var(--muted); }
.sub { font-size: 11.5px; color: var(--lilac); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.chev { flex: none; width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: rgba(165,80,252,.14); border: 1px solid rgba(176,112,224,.35); }

/* nav */
.nav { position: fixed; z-index: 20; left: 50%; transform: translateX(-50%); bottom: calc(10px + var(--sab)); width: min(413px, calc(100% - 17px)); height: 62.5px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr));
  padding: 0 6.5px; border-radius: 16px; background: linear-gradient(180deg,#311A50 0%,#25133F 50%,#190E2E 100%); border: 1px solid rgba(144,98,177,.55); box-shadow: 0 10px 26px rgba(0,0,0,.4); align-items: center; }
.nv { height: 48.5px; margin: 0 2px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #DDBEF7; font-size: 11px; font-weight: 500; }
.nv.on { color: #fff; font-weight: 700; background: linear-gradient(150deg,#8A3CC8 0%,#6A2BA0 50%,#4E2180 100%); border: 1px solid rgba(176,112,224,.85); box-shadow: 0 0 14px rgba(140,60,210,.35); }

/* popovers */
.scrim { position: fixed; inset: 0; z-index: 30; }
.pop { position: fixed; z-index: 31; top: calc(var(--sat) + 66px); border-radius: 16px; background: radial-gradient(70% 30% at 50% 0%,rgba(160,70,230,.4),transparent 100%),linear-gradient(180deg,#2C1B4B 0%,#1D1134 100%);
  border: 1px solid rgba(200,140,255,.55); box-shadow: 0 18px 40px rgba(0,0,0,.6); }
.pop.out { right: max(13px, calc(50% - 202px)); width: 250px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.pop.nt { left: max(13px, calc(50% - 202px)); right: max(13px, calc(50% - 202px)); max-height: 460px; display: flex; flex-direction: column; overflow: hidden; }
.pop .head { display: flex; justify-content: space-between; align-items: center; padding: 13px 14px 11px; border-bottom: 1px solid rgba(170,120,220,.18); }
.pop .list { overflow-y: auto; }
.nrow { display: flex; align-items: center; gap: 11px; min-height: 58px; padding: 9px 14px; border-top: 1px solid var(--line); }
.nrow:first-child { border-top: 0; }
.nrow.un { background: rgba(165,80,252,.06); }
.ic { width: 34px; height: 34px; flex: none; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.btn2 { flex: 1; height: 38px; border-radius: 11px; font-size: 12.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(170,120,220,.4); background: rgba(170,120,220,.12); color: var(--lilac2); padding: 0 11px; }
.btn2.danger { border-color: rgba(249,96,127,.7); background: #C93A5A; color: #fff; }
.btn2.sm { flex: none; height: 32px; }

/* forms */
.field { display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 6px 0 16px; border-radius: 14px; background: rgba(20,11,38,.9); border: 1.5px solid rgba(170,120,220,.45); }
.field.okb { border-color: var(--green); }
.field input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; font: 700 16px "JBMono", ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; }
.field input::placeholder { color: #6F5A8C; }
.mini { flex: none; height: 40px; padding: 0 13px; border-radius: 10px; border: 1px solid rgba(176,112,224,.45); background: rgba(165,80,252,.16); color: var(--lilac2); font-size: 12px; font-weight: 700; }
.ta { width: 100%; min-height: 120px; padding: 14px; border-radius: 14px; background: rgba(20,11,38,.9); border: 1.5px solid rgba(170,120,220,.45); outline: none; resize: vertical;
  font: 700 13px/21px "JBMono", ui-monospace, monospace; letter-spacing: .04em; text-transform: uppercase; }
.ta::placeholder { color: #6F5A8C; }
.big { width: 100%; height: 54px; border-radius: 15px; border: 1px solid rgba(232,200,255,.55); background: radial-gradient(70% 90% at 50% 0%,rgba(255,255,255,.28),transparent 70%),linear-gradient(135deg,#B259FD 0%,#9145F9 100%);
  box-shadow: 0 0 22px rgba(165,80,252,.5),inset 0 -2px 6px rgba(70,20,140,.45); color: #fff; font-size: 14.5px; font-weight: 800; letter-spacing: .06em; display: flex; align-items: center; justify-content: center; }
.big:disabled { background: rgba(170,120,220,.14); border-color: rgba(170,120,220,.3); color: var(--muted); box-shadow: none; cursor: default; }
.found { display: flex; align-items: center; gap: 10px; margin-top: 9px; padding: 11px; border-radius: 13px; }
.found.ok { background: rgba(110,242,178,.08); border: 1px solid rgba(110,242,178,.35); }
.found.no { background: rgba(249,96,127,.08); border: 1px solid rgba(249,96,127,.35); }

/* settings rows */
.srow { display: flex; align-items: center; gap: 12px; min-height: 62px; padding: 10px 13px; }
.srow + .srow, .sbox + .sbox { border-top: 1px solid var(--line); }
.stitle { font-size: 13.5px; font-weight: 700; }
.sdesc { font-size: 11.5px; color: var(--lilac); margin-top: 2px; }
.sw { flex: none; width: 46px; height: 28px; border-radius: 14px; padding: 3px; background: rgba(170,120,220,.2); border: 1px solid rgba(170,120,220,.3); display: flex; }
.sw span { width: 22px; height: 22px; border-radius: 50%; background: #B9A3D3; transition: transform .15s; }
.sw.on { background: linear-gradient(135deg,#B259FD,#8A3CC8); border-color: rgba(232,200,255,.6); }
.sw.on span { background: #fff; transform: translateX(18px); }
.sub2 { display: flex; align-items: center; gap: 10px; padding: 0 13px 13px 59px; flex-wrap: wrap; }
.opt { height: 30px; padding: 0 11px; border-radius: 9px; font-size: 12px; font-weight: 700; color: var(--muted2); background: rgba(170,120,220,.1); border: 1.5px solid rgba(170,120,220,.28); }
.opt.on { color: #fff; background: rgba(165,80,252,.24); border-color: #A452FB; }
.step { display: flex; align-items: center; height: 32px; border-radius: 10px; background: rgba(170,120,220,.1); border: 1.5px solid rgba(170,120,220,.28); }
.step button { width: 34px; height: 100%; font-size: 17px; font-weight: 700; color: var(--lilac2); }
.step button:disabled { opacity: .35; }
.step b { min-width: 30px; text-align: center; font-size: 14px; font-weight: 800; }
.time { height: 30px; padding: 0 8px; border-radius: 9px; background: rgba(170,120,220,.14); border: 1px solid rgba(170,120,220,.35); color: #fff; font-size: 12.5px; font-weight: 700; }
.mchip { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 4px; border-radius: 18px; background: rgba(170,120,220,.12); border: 1px solid rgba(170,120,220,.28); font-size: 12.5px; font-weight: 700; }
.mchip img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.mchip button { width: 26px; height: 26px; border-radius: 50%; background: rgba(170,120,220,.2); display: flex; align-items: center; justify-content: center; }

/* character */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 8px; font-size: 11px; font-weight: 800; letter-spacing: .06em; white-space: nowrap; }
.pill em { font-style: normal; font-weight: 600; letter-spacing: 0; color: var(--lilac2); overflow: hidden; text-overflow: ellipsis; }
.drop { display: flex; align-items: center; gap: 12px; min-height: 52px; border-top: 1px solid var(--line); }
.drop:first-child { border-top: 0; }
.gem { flex: none; width: 32px; height: 32px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.gem img { width: 30px; height: 30px; object-fit: contain; }
.toast { margin-top: 8px; padding: 0 13px; height: 40px; display: flex; align-items: center; border-radius: 12px; background: rgba(170,120,220,.12); border: 1px solid rgba(170,120,220,.35); font-size: 12.5px; font-weight: 700; }

/* entry screens */
.wall { min-height: 100dvh; display: flex; flex-direction: column; padding: calc(var(--sat) + 28px) 20px calc(28px + var(--sab));
  background: linear-gradient(180deg,rgba(14,8,28,0) 0%,rgba(14,8,28,0) 36%,rgba(14,8,28,.6) 58%,rgba(14,8,28,.94) 78%,#0E081C 100%), url(assets/wall.jpg) center top / cover no-repeat, #0E081C; }
.h1 { margin: 18px 0 0; font-size: 25px; font-weight: 800; line-height: 1.2; }
.lead { margin: 8px 0 0; font-size: 14px; line-height: 1.5; color: var(--lilac); }
.prog { display: flex; align-items: center; gap: 14px; height: 48px; margin-top: 10px; }
.bar { flex: 1; height: 6px; border-radius: 3px; background: rgba(170,120,220,.16); overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg,#B259FD,#6EF2B2); }
.point { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.point:first-child { border-top: 0; }
.center { text-align: center; }
.spacer { flex: 1; min-height: 24px; }
.hidden { display: none !important; }
.loading { padding: 18px; font-size: 13.5px; font-weight: 600; color: var(--lilac); }
.install { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: rgba(165,80,252,.12); border: 1px solid rgba(176,112,224,.35); font-size: 12.5px; line-height: 1.45; color: var(--lilac2); }
