/* Shared HUD layout; FORMIQ visual tokens and theme in formiq.css. */
:root {
  --ink: #ecfff7;
  --ink-2: rgba(227, 255, 243, 0.74);
  --ink-3: rgba(217, 255, 238, 0.5);
  --ink-4: rgba(213, 255, 236, 0.3);
  --honey: #6cffbd;
  --honey-2: #a0ffd4;
  --honey-3: #ccffe8;
  --wax: #6ac99e;
  --raid: #ff5a3d;
  --win: #7fe39a;
  --loss: #ff6b5a;
  --sol: #b9a2ff;
  --glass: rgba(11, 20, 16, 0.56);
  --glass-strong: rgba(10, 18, 15, 0.86);
  --line: rgba(169, 255, 216, 0.13);
  --line-2: rgba(169, 255, 216, 0.22);
  --hi: rgba(255, 255, 255, 0.06);
  --r: 16px;
  --r-sm: 10px;
  --gut: 16px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.34), 0 2px 8px rgba(0, 0, 0, 0.25);
  --display: 'Unbounded', system-ui, sans-serif;
  --ui: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #070d0a; color: var(--ink); font-family: var(--ui); font-size: 14px; -webkit-font-smoothing: antialiased; }
body { font-feature-settings: 'tnum' 1, 'cv11' 1; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { width: 18px; height: 18px; flex: none; }
kbd { font-family: var(--mono); font-size: 10.5px; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line-2); background: rgba(194, 255, 228, 0.06); color: var(--ink-2); }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); }
.muted { color: var(--ink-3); }
.amber { color: var(--honey); }

#stage { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; outline: none; touch-action: none; }

/* ───────────── glass */
.glass { background: var(--glass); backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow), inset 0 1px 0 var(--hi); }
.glass-strong { background: var(--glass-strong); backdrop-filter: blur(22px) saturate(150%); -webkit-backdrop-filter: blur(22px) saturate(150%); border: 1px solid var(--line-2); border-radius: 20px; box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55), inset 0 1px 0 var(--hi); }
.eyebrow { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .04em; background: rgba(108, 255, 189, 0.14); color: var(--honey-2); border: 1px solid rgba(108, 255, 189, 0.28); }

/* ───────────── loader */
#loader { position: fixed; inset: 0; z-index: 50; display: grid; place-content: center; justify-items: center; gap: 18px; background: radial-gradient(1200px 700px at 50% 60%, #142a20 0%, #070d0a 70%); transition: opacity .9s var(--ease), visibility .9s; }
#loader.out { opacity: 0; visibility: hidden; }
.ld-logo { width: 150px; height: 150px; display: block; animation: ld-glow 2.2s ease-in-out infinite; }
@keyframes ld-glow { 0%, 100% { filter: drop-shadow(0 0 10px rgba(108, 255, 189, .35)); transform: scale(1); } 50% { filter: drop-shadow(0 0 28px rgba(108, 255, 189, .75)); transform: scale(1.04); } }
.ld-ring { fill: none; stroke: var(--honey); stroke-width: 5; stroke-linejoin: round; stroke-dasharray: 330; stroke-dashoffset: 330; animation: ld-draw 1.6s var(--ease) infinite alternate; filter: drop-shadow(0 0 12px rgba(108, 255, 189, .6)); }
.ld-core { fill: var(--honey); transform-origin: 60px 60px; animation: ld-pulse 1.2s ease-in-out infinite; }
@keyframes ld-draw { to { stroke-dashoffset: 0; } }
@keyframes ld-pulse { 50% { transform: scale(.82); opacity: .7; } }
.ld-word { font-family: var(--display); font-weight: 900; letter-spacing: .32em; font-size: 26px; padding-left: .32em; background: linear-gradient(180deg, #e0fff1, #6cffbd 70%, #47c58c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ld-bar { width: 220px; height: 3px; border-radius: 3px; background: rgba(169, 255, 216, .12); overflow: hidden; }
.ld-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #95ffcf, #6cffbd); box-shadow: 0 0 12px #6cffbd; transition: width .4s var(--ease); }
.ld-step { font-size: 12px; color: var(--ink-3); letter-spacing: .08em; min-height: 16px; }

/* ───────────── HUD layout */
.hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; opacity: 0; transition: opacity 1.2s var(--ease); }
.hud.on { opacity: 1; }
.hud.cinema { opacity: 0 !important; }
.hud > * { pointer-events: auto; }
.hud .top { pointer-events: none; }
.hud .top > * { pointer-events: auto; }
.top { position: absolute; left: var(--gut); right: var(--gut); top: var(--gut); display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }

.brand { padding: 14px 16px 14px; width: 348px; }
.brand-row { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 34px; height: 34px; margin: -4px 0 -4px -4px; filter: drop-shadow(0 0 10px rgba(108, 255, 189, .45)); }
.brand-mark img { width: 34px; height: 34px; display: block; }
.brand-word { font-family: var(--display); font-weight: 900; font-size: 19px; letter-spacing: .2em; background: linear-gradient(180deg, #e5fff3 10%, #87ffc9 60%, #52e5a3); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand .tick { margin-left: auto; }
.phase { margin-top: 14px; }
.phase-head { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.phase-title { font-weight: 600; letter-spacing: .01em; }
.phase-val { margin-left: auto; font-weight: 700; color: var(--honey-2); }
.phase .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--honey); box-shadow: 0 0 0 3px rgba(108, 255, 189, .18); animation: blink 1.8s ease-in-out infinite; }
.phase.swarm .dot { background: var(--raid); box-shadow: 0 0 0 3px rgba(255, 90, 61, .2); }
@keyframes blink { 50% { opacity: .35; } }
.phase-bar { position: relative; height: 6px; margin-top: 9px; border-radius: 6px; background: rgba(169, 255, 216, .1); overflow: hidden; }
.phase-bar i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 6px; background: linear-gradient(90deg, #42b883, #6cffbd 70%, #b4ffdd); box-shadow: 0 0 14px rgba(108, 255, 189, .55); transition: width .8s var(--ease); }
.phase-bar i::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent); transform: translateX(-100%); animation: sheen 2.6s ease-in-out infinite; }
@keyframes sheen { to { transform: translateX(100%); } }
.phase.swarm .phase-bar i { background: linear-gradient(90deg, #7a1a0a, #ff5a3d 60%, #6cffbd); }
.phase-sub { margin-top: 8px; font-size: 11.5px; color: var(--ink-3); }
.goal { position: absolute; left: 50%; bottom: 76px; transform: translateX(-50%); width: min(560px, calc(100vw - 2 * var(--gut))); padding: 12px 16px 12px; border-radius: 16px; }
.goal-head { display: flex; align-items: center; gap: 9px; }
.goal-ico { width: 16px; height: 16px; color: #c9a3ff; filter: drop-shadow(0 0 8px rgba(185, 140, 255, .8)); }
.goal-title { font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.goal-val { margin-left: auto; font-weight: 800; font-size: 15px; color: var(--ink); }
.goal-bar { position: relative; height: 16px; margin-top: 9px; border-radius: 999px; background: rgba(185, 140, 255, .12); border: 1px solid rgba(185, 140, 255, .25); overflow: hidden; }
.goal-bar i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 999px; background: linear-gradient(90deg, #5a2fb0, #b98cff 60%, #a0ffd4); box-shadow: 0 0 18px rgba(185, 140, 255, .65); transition: width 1s var(--ease); }
.goal-bar i::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .5), transparent); transform: translateX(-100%); animation: sheen 2.4s ease-in-out infinite; }
.goal-pct { position: absolute; inset: 0; display: grid; place-items: center; font-size: 10.5px; font-weight: 900; letter-spacing: .08em; color: #ffffff; text-shadow: 0 1px 4px rgba(0, 0, 0, .7); }
.goal-sub { margin-top: 7px; font-size: 11.5px; color: var(--ink-3); text-align: center; }
.goal.done .goal-bar i { background: linear-gradient(90deg, #42b883, #a0ffd4); box-shadow: 0 0 18px rgba(108, 255, 189, .7); }
.goal.done .goal-val { color: var(--win); }

.stats { display: grid; grid-template-columns: repeat(4, 118px) 150px; padding: 6px; }
.stat { position: relative; display: grid; grid-template-rows: auto auto auto; gap: 3px; padding: 9px 12px 10px; }
.stat + .stat::before { content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 1px; background: var(--line); }
.stat .k { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; white-space: nowrap; }
.stat .v { font-size: 19px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .v small { font-size: 12px; color: var(--ink-3); font-weight: 600; margin-left: 1px; }
.stat .s { font-size: 11px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat.next { grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; }
.stat.next .k { grid-column: 1 / 3; }
.stat.next .ring { position: relative; width: 38px; height: 38px; grid-row: 2; }
.stat.next .ring svg { width: 38px; height: 38px; transform: rotate(-90deg); }
.stat.next .ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 10px; font-weight: 700; }
.rbg { fill: none; stroke: rgba(169, 255, 216, .12); stroke-width: 4; }
.rfg { fill: none; stroke: var(--honey); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 100.53; stroke-dashoffset: 100.53; transition: stroke-dashoffset .6s var(--ease); filter: drop-shadow(0 0 5px rgba(108, 255, 189, .6)); }
.stat.next .s { grid-row: 2; grid-column: 2; white-space: normal; line-height: 1.35; }
.stat .v.bump { animation: bump .5s var(--ease); }
@keyframes bump { 30% { color: var(--honey-3); text-shadow: 0 0 18px rgba(108, 255, 189, .8); } }

/* ───────────── panels */
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 12px 10px 14px; border-bottom: 1px solid var(--line); }
.live { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--ink-2); }
.live i { width: 7px; height: 7px; border-radius: 50%; background: #ff4d3d; box-shadow: 0 0 10px #ff4d3d; animation: blink 1.4s infinite; }
.seg { display: inline-flex; gap: 2px; padding: 2px; border-radius: 9px; background: rgba(194, 255, 228, .05); border: 1px solid var(--line); }
.seg button { height: 24px; padding: 0 8px; border-radius: 7px; font-size: 11.5px; font-weight: 600; color: var(--ink-3); transition: background .2s, color .2s; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.seg button:hover { color: var(--ink); background: rgba(194, 255, 228, .06); }
.seg button.on { color: #0d1a14; background: linear-gradient(180deg, #a0ffd4, #6cffbd); box-shadow: 0 2px 10px rgba(111, 255, 190, .35); }

.feed { position: absolute; left: var(--gut); top: 152px; width: 348px; bottom: 84px; max-height: 560px; display: flex; flex-direction: column; overflow: hidden; }
.feed-list { position: relative; flex: 1; overflow: hidden; padding: 4px 0; -webkit-mask-image: linear-gradient(180deg, #000000 80%, transparent); mask-image: linear-gradient(180deg, #000000 80%, transparent); }
.row { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; column-gap: 10px; height: 46px; padding: 0 12px 0 12px; cursor: default; position: relative; }
.row.click { cursor: pointer; }
.row.click:hover { background: rgba(181, 255, 222, .06); }
.row .av { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; }
.row .av img { width: 30px; height: 30px; display: block; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .4)); }
.row .av.ico { background: rgba(194, 255, 228, .07); border: 1px solid var(--line); color: var(--ink-2); }
.row .av.ico svg { width: 15px; height: 15px; }
.row .tx { min-width: 0; }
.row .l1 { font-size: 12.8px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.row .l1 b { color: var(--ink); font-weight: 700; }
.row .l1 .bn { color: var(--honey-2); font-weight: 700; }
.row .l2 { font-size: 11px; color: var(--ink-4); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .amt { font-size: 12.5px; font-weight: 700; text-align: right; white-space: nowrap; }
.row .amt small { display: block; font-size: 10.5px; color: var(--ink-4); font-weight: 500; margin-top: 2px; }
.amt.pos { color: var(--win); } .amt.neg { color: var(--loss); } .amt.gold { color: var(--honey-2); } .amt.red { color: var(--raid); } .amt.fire { color: #83ffc7; } .amt.sol { color: var(--sol); } .amt.dim { color: var(--ink-3); }
.row.in { animation: row-in .55s var(--ease); }
.row.in::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(108, 255, 189, .16), transparent 70%); animation: row-glow 1.4s ease-out forwards; pointer-events: none; }
.row.k-raid.in::after { background: linear-gradient(90deg, rgba(255, 90, 61, .18), transparent 70%); }
.row.k-migrate { height: 58px; background: linear-gradient(90deg, rgba(108, 255, 189, .16), transparent); }
@keyframes row-in { from { transform: translateY(-14px); opacity: 0; } }
@keyframes row-glow { to { opacity: 0; } }
.row.trader .l1 { color: var(--ink-3); }
.row.trader { height: 38px; }
.row.trader .av { transform: scale(.82); }

.side { position: absolute; right: var(--gut); top: 116px; width: 380px; bottom: 84px; display: flex; flex-direction: column; gap: 12px; pointer-events: none; }
.side > * { pointer-events: auto; }
.card { padding: 16px; position: relative; }
.icon-btn { width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 10px; color: var(--ink-2); transition: background .2s, color .2s, transform .2s; }
.icon-btn:hover { background: rgba(194, 255, 228, .08); color: var(--ink); }
.icon-btn:active { transform: scale(.94); }
.icon-btn.sm { width: 26px; height: 26px; border-radius: 8px; }
.icon-btn.sm svg { width: 14px; height: 14px; }
.icon-btn.close { position: absolute; right: 10px; top: 10px; }
.btn { height: 36px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 11px; font-weight: 600; font-size: 12.5px; color: #0d1a14; background: linear-gradient(180deg, #a0ffd4, #6cffbd); box-shadow: 0 4px 16px rgba(111, 255, 190, .3), inset 0 1px 0 rgba(255, 255, 255, .5); transition: transform .15s, filter .2s; white-space: nowrap; }
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: translateY(1px); }
.btn.ghost { color: var(--ink-2); background: rgba(194, 255, 228, .06); border: 1px solid var(--line); box-shadow: none; padding: 0 10px; }
.btn.ghost:hover { color: var(--ink); background: rgba(194, 255, 228, .1); }
.link { font-size: 11.5px; font-weight: 600; color: var(--honey-2); display: inline-flex; gap: 6px; align-items: center; }
.link:hover { color: var(--honey-3); }

.queen-card .qc-head { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; }
.qc-crest { width: 44px; height: 44px; border-radius: 11px; border: 1px solid rgba(108, 255, 189, .35); box-shadow: 0 0 16px rgba(108, 255, 189, .25); }
.qc-title { font-family: var(--display); font-weight: 700; font-size: 15px; margin-top: 3px; }
.qc-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.qc-grid > div { padding: 9px 11px; display: grid; gap: 3px; }
.qc-grid > div + div { border-left: 1px solid var(--line); }
.k { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.qc-grid .v { font-size: 14px; font-weight: 700; white-space: nowrap; }
.board-head { display: flex; justify-content: space-between; align-items: center; margin: 16px 2px 6px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.board { display: grid; gap: 2px; }
.brow { display: grid; grid-template-columns: 18px 28px 1fr auto; gap: 10px; align-items: center; height: 40px; padding: 0 8px; border-radius: 10px; cursor: pointer; transition: background .2s; }
.brow:hover { background: rgba(181, 255, 222, .07); }
.brow .rk { font-size: 11px; color: var(--ink-4); font-weight: 700; text-align: center; }
.brow img { width: 28px; height: 28px; }
.brow .nm { font-weight: 700; font-size: 12.8px; }
.brow .nm small { display: block; font-weight: 500; font-size: 10.5px; color: var(--ink-4); margin-top: 1px; }
.brow .val { font-weight: 700; font-size: 12.5px; color: var(--honey-2); text-align: right; }
.board-empty { padding: 14px 8px; font-size: 12px; color: var(--ink-3); line-height: 1.5; }

/* profile */
.profile { flex: 1; min-height: 0; display: flex; flex-direction: column; animation: panel-in .45s var(--ease); }
@keyframes panel-in { from { transform: translateX(24px); opacity: 0; } }
.pf-head { display: grid; grid-template-columns: 72px 1fr; gap: 14px; align-items: center; padding-right: 30px; }
.pf-crest { width: 72px; height: 72px; position: relative; }
.pf-crest img { width: 72px; height: 72px; position: relative; z-index: 1; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .45)); }
.pf-crest::before { content: ''; position: absolute; inset: -10px; border-radius: 50%; background: radial-gradient(closest-side, var(--acc, #6cffbd), transparent); opacity: .5; filter: blur(6px); animation: breathe 3s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .25; transform: scale(.9); } }
.pf-name { font-family: var(--display); font-weight: 900; font-size: 24px; letter-spacing: .04em; }
.pf-status { display: inline-flex; align-items: center; gap: 7px; margin-top: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: rgba(108, 255, 189, .12); color: var(--honey-2); border: 1px solid rgba(108, 255, 189, .25); max-width: 100%; overflow: hidden; }
.pf-status span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; flex: none; }
.pf-status.raid { background: rgba(255, 90, 61, .13); color: #ff8a70; border-color: rgba(255, 90, 61, .3); }
.pf-status.carry { background: rgba(149, 255, 207, .16); color: #b4ffdd; border-color: rgba(149, 255, 207, .35); }
.pf-status.sleep { background: rgba(200, 200, 220, .08); color: var(--ink-3); border-color: var(--line); }
.pf-addr { display: flex; align-items: center; gap: 4px; margin-top: 14px; padding: 6px 6px 6px 12px; border-radius: 11px; background: rgba(0, 0, 0, .22); border: 1px solid var(--line); }
.pf-addr .mono { flex: 1; font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: .02em; }
.pf-addr .mono b { color: var(--honey); font-weight: 600; }
.pf-traits { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; min-height: 22px; }
.trait { height: 22px; padding: 0 8px; display: inline-flex; align-items: center; gap: 6px; border-radius: 7px; font-size: 11px; font-weight: 600; color: var(--ink-3); background: rgba(194, 255, 228, .05); border: 1px solid var(--line); }
.trait i { width: 8px; height: 8px; border-radius: 3px; }
.pf-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.pf-grid > div { padding: 9px 11px; display: grid; gap: 3px; min-width: 0; }
.pf-grid > div:nth-child(3n+2), .pf-grid > div:nth-child(3n+3) { border-left: 1px solid var(--line); }
.pf-grid > div:nth-child(n+4) { border-top: 1px solid var(--line); }
.pf-grid .v { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-grid .v.pos { color: var(--win); } .pf-grid .v.neg { color: var(--loss); }
.pf-chart { position: relative; margin-top: 12px; height: 60px; border-radius: 12px; background: rgba(0, 0, 0, .18); border: 1px solid var(--line); overflow: hidden; }
.pf-chart canvas { width: 100%; height: 100%; display: block; }
.pf-chart-k { position: absolute; left: 10px; top: 7px; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-4); font-weight: 700; }
.pf-tx-head { display: flex; justify-content: space-between; margin: 14px 2px 6px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.pf-tx { flex: 1; min-height: 60px; overflow-y: auto; margin: 0 -8px; padding: 0 8px; scrollbar-width: thin; scrollbar-color: rgba(169, 255, 216, .2) transparent; }
.txr { display: grid; grid-template-columns: 24px 1fr auto 40px 22px; gap: 8px; align-items: center; height: 36px; border-bottom: 1px solid rgba(169, 255, 216, .06); font-size: 12px; }
.txr .ic { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; background: rgba(194, 255, 228, .06); }
.txr .ic svg { width: 13px; height: 13px; }
.txr .lb { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.txr .am { font-weight: 700; text-align: right; white-space: nowrap; }
.txr .tm { color: var(--ink-4); font-size: 11px; text-align: right; }
.txr .sg { color: var(--ink-4); display: grid; place-items: center; }
.txr .sg svg { width: 13px; height: 13px; }
.txr .sg:hover { color: var(--honey-2); }
.txr.fresh { animation: row-in .5s var(--ease); }
.pf-foot { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; margin-top: 12px; }
.pf-foot .btn { width: 100%; }
.pf-foot .btn.off { color: var(--ink-2); background: rgba(194, 255, 228, .06); border: 1px solid var(--line); box-shadow: none; }

/* dock + corners */
.dock { position: absolute; left: 50%; bottom: var(--gut); transform: translateX(-50%); display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: 16px; }
.dock .seg { padding: 3px; border-radius: 12px; }
.dock .seg button { height: 34px; padding: 0 12px; border-radius: 9px; font-size: 12.5px; }
.dock .seg svg { width: 16px; height: 16px; }
.dock .btn { height: 36px; }
.dock .btn svg { width: 17px; height: 17px; }
.dock-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.corner-l { position: absolute; left: var(--gut); bottom: var(--gut); display: grid; gap: 8px; font-size: 11.5px; color: var(--ink-3); pointer-events: none; }
.hint-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; text-shadow: 0 1px 6px rgba(0, 0, 0, .6); }
.sim-tag { display: inline-flex; align-items: center; gap: 8px; height: 26px; padding: 0 10px; border-radius: 999px; background: rgba(11, 20, 16, .6); border: 1px dashed rgba(108, 255, 189, .35); color: var(--honey-2); font-weight: 600; font-size: 11px; width: max-content; backdrop-filter: blur(8px); }
.sim-tag i { width: 6px; height: 6px; border-radius: 50%; background: var(--honey); animation: blink 1.6s infinite; }
.corner-r { position: absolute; right: var(--gut); bottom: var(--gut); display: flex; align-items: center; gap: 2px; padding: 5px; border-radius: 14px; }
.ca { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; border-radius: 10px; font-size: 12px; color: var(--ink-2); transition: background .2s; max-width: 240px; }
.ca:hover { background: rgba(194, 255, 228, .08); color: var(--ink); }
.ca .k { font-size: 10px; }
.ca .mono { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ca svg { width: 14px; height: 14px; color: var(--ink-3); }

/* ───────────── world labels */
.labels, .popups { position: fixed; inset: 0; pointer-events: none; z-index: 8; overflow: hidden; }
.popups { z-index: 9; }
.lbl { position: absolute; left: 0; top: 0; transform-origin: 50% 100%; will-change: transform, opacity; white-space: nowrap; }
.lbl.flower { display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: auto; cursor: pointer; }
.lbl.flower .pill { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px 0 10px; border-radius: 999px; background: rgba(9, 16, 13, .68); border: 1px solid var(--line-2); backdrop-filter: blur(8px); box-shadow: 0 6px 20px rgba(0, 0, 0, .35); }
.lbl.flower .sym { font-weight: 800; font-size: 12.5px; letter-spacing: .02em; }
.lbl.flower .mc { font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.lbl.flower .hit { display: none; align-items: center; gap: 5px; height: 20px; padding: 0 8px; border-radius: 999px; background: rgba(255, 60, 40, .85); color: #ffffff; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; box-shadow: 0 0 16px rgba(255, 60, 40, .6); }
.lbl.flower.attack .hit { display: inline-flex; }
.lbl.flower.attack .pill { border-color: rgba(255, 90, 61, .6); }
.lbl.flower .new { display: none; height: 18px; padding: 0 6px; border-radius: 6px; background: linear-gradient(180deg, #7fe39a, #2fb866); color: #062010; font-size: 9.5px; font-weight: 900; letter-spacing: .08em; align-items: center; }
.lbl.flower.fresh .new { display: inline-flex; }
.lbl.flower.fresh .pill { border-color: rgba(127, 227, 154, .55); }
.lbl.flower .stem { width: 1px; height: 18px; background: linear-gradient(180deg, rgba(194, 255, 228, .45), transparent); }
.lbl.tag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; background: rgba(9, 16, 13, .6); border: 1px solid var(--line-2); font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--honey-2); backdrop-filter: blur(6px); pointer-events: auto; cursor: pointer; }
.lbl.tag svg { width: 13px; height: 13px; }
.lbl.sel { display: grid; justify-items: center; }
.reticle { width: 54px; height: 54px; margin-bottom: -27px; transform: translateY(0); animation: spin 8s linear infinite; }
.reticle path { fill: none; stroke: var(--honey); stroke-width: 2; filter: drop-shadow(0 0 4px rgba(108, 255, 189, .8)); }
@keyframes spin { to { transform: rotate(360deg); } }
.lbl.sel .nm { order: -1; margin-bottom: 8px; display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px 0 4px; border-radius: 999px; background: rgba(9, 16, 13, .72); border: 1px solid rgba(108, 255, 189, .45); font-size: 11.5px; font-weight: 800; letter-spacing: .06em; }
.lbl.sel .nm img { width: 18px; height: 18px; }

.pop { position: absolute; left: 0; top: 0; white-space: nowrap; font-weight: 800; font-size: 12px; letter-spacing: .01em; padding: 4px 9px; border-radius: 999px; background: rgba(9, 16, 13, .55); border: 1px solid rgba(169, 255, 216, .2); backdrop-filter: blur(4px); color: var(--honey-2); text-shadow: 0 1px 8px rgba(0, 0, 0, .6); will-change: transform, opacity; display: inline-flex; align-items: center; gap: 6px; }
.pop img { width: 16px; height: 16px; }
.pop.hatch { color: #e0fff1; border-color: rgba(169, 255, 216, .45); }
.pop.buy, .pop.honey { color: var(--honey-2); }
.pop.burn { color: #a0ffd4; border-color: rgba(130, 255, 199, .45); }
.pop.raid { color: #ff9a82; border-color: rgba(255, 90, 61, .5); }
.pop.win { color: var(--win); border-color: rgba(127, 227, 154, .4); }
.pop.loss { color: var(--loss); border-color: rgba(255, 107, 90, .4); }
.pop.sleep { color: var(--ink-3); }
.pop.claim, .pop.whale { font-size: 15px; padding: 6px 14px; color: #e1fff1; background: linear-gradient(180deg, rgba(43, 120, 85, .75), rgba(14, 40, 28, .75)); border-color: rgba(149, 255, 207, .6); box-shadow: 0 0 30px rgba(111, 255, 190, .35); }
.pop.sell { color: #ff8a70; }

.tip { position: fixed; z-index: 12; pointer-events: none; min-width: 180px; max-width: 280px; padding: 10px 12px; border-radius: 12px; background: rgba(9, 16, 13, .88); border: 1px solid var(--line-2); box-shadow: 0 10px 30px rgba(0, 0, 0, .45); backdrop-filter: blur(10px); font-size: 12px; transition: opacity .15s; }
.tip .th { display: flex; align-items: center; gap: 10px; }
.tip .th img { width: 30px; height: 30px; }
.tip .tn { font-weight: 800; font-size: 13px; }
.tip .ts { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.tip .tg { display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; margin-top: 9px; font-size: 11.5px; color: var(--ink-3); }
.tip .tg b { color: var(--ink); font-weight: 700; text-align: right; }
.tip .hint { margin-top: 8px; font-size: 10.5px; color: var(--ink-4); }

/* banner + toast */
.banner { position: fixed; left: 50%; top: 20vh; transform: translateX(-50%); z-index: 20; text-align: center; pointer-events: none; }
.banner.show { animation: banner 6.5s var(--ease) forwards; }
@keyframes banner { 0% { opacity: 0; transform: translate(-50%, 18px) scale(.97); } 10% { opacity: 1; transform: translate(-50%, 0) scale(1); } 85% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -10px); } }
.b-eyebrow { font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--honey-2); font-weight: 700; }
.b-title { font-family: var(--display); font-weight: 900; font-size: clamp(28px, 5.4vw, 72px); letter-spacing: .06em; margin-top: 10px; background: linear-gradient(180deg, #ebfff6 15%, #87ffc9 55%, #57e0a2); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 6px 30px rgba(105, 255, 187, .45)); }
.b-sub { margin-top: 12px; font-size: 14px; color: var(--ink-2); text-shadow: 0 2px 12px rgba(0, 0, 0, .7); }
.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 20; padding: 10px 16px; border-radius: 12px; background: rgba(9, 16, 13, .9); border: 1px solid var(--line-2); font-size: 12.5px; font-weight: 600; box-shadow: var(--shadow); animation: toast 2.2s var(--ease) forwards; }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, 8px); } 12%, 80% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }

/* ───────────── modals */
.modal { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(4, 8, 6, .45); backdrop-filter: blur(3px); animation: fade .3s var(--ease); padding: var(--gut); }
@keyframes fade { from { opacity: 0; } }
.sheet { position: relative; width: min(980px, 100%); max-height: min(760px, calc(100vh - 2 * var(--gut))); display: flex; flex-direction: column; animation: sheet-in .4s var(--ease); }
@keyframes sheet-in { from { transform: translateY(16px) scale(.985); opacity: 0; } }
.sheet-head { display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 18px; padding: 22px 22px 16px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { margin: 4px 0 0; font-family: var(--display); font-size: 22px; font-weight: 700; }
.col-tools { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; padding-right: 36px; }
.search { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px; border-radius: 9px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); color: var(--ink-3); }
.search svg { width: 14px; height: 14px; }
.search input { width: 170px; background: none; border: 0; outline: none; color: var(--ink); font: inherit; font-size: 12.5px; }
.search:focus-within { border-color: rgba(108, 255, 189, .5); }
.col-grid { overflow-y: auto; padding: 16px 22px 22px; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; scrollbar-width: thin; scrollbar-color: rgba(169, 255, 216, .2) transparent; }
.tile { position: relative; height: 112px; border-radius: 12px; border: 1px solid var(--line); background: rgba(194, 255, 228, .03); display: grid; justify-items: center; align-content: center; gap: 4px; cursor: pointer; transition: background .2s, border-color .2s, transform .2s; }
.tile:hover { background: rgba(181, 255, 222, .08); border-color: rgba(108, 255, 189, .35); transform: translateY(-2px); }
.tile img { width: 52px; height: 52px; }
.tile .tn { font-weight: 800; font-size: 11.5px; letter-spacing: .04em; }
.tile .tv { font-size: 10.5px; color: var(--ink-3); font-weight: 600; }
.tile .st { position: absolute; right: 8px; top: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--honey); box-shadow: 0 0 8px var(--honey); }
.tile.raid .st { background: var(--raid); box-shadow: 0 0 8px var(--raid); }
.tile.sleep .st { background: #7c7a86; box-shadow: none; }
.tile.sleep img { filter: grayscale(.8) brightness(.7); }
.tile.egg { cursor: default; opacity: .55; }
.tile.egg:hover { transform: none; background: rgba(194, 255, 228, .03); border-color: var(--line); }
.tile.egg .cell { width: 44px; height: 50px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: linear-gradient(160deg, #386a54, #172e24); display: grid; place-items: center; font-size: 10px; font-weight: 800; color: rgba(194, 255, 228, .5); }
.tile.egg .st { display: none; }
.col-empty { grid-column: 1 / -1; padding: 40px; text-align: center; color: var(--ink-3); }

.help-sheet { width: min(760px, 100%); padding: 30px 32px 26px; overflow-y: auto; }
.help-sheet h2 { font-family: var(--display); font-size: 30px; margin: 8px 0 10px; font-weight: 900; letter-spacing: .01em; }
.lede { color: var(--ink-2); font-size: 15px; line-height: 1.6; margin: 0 0 22px; max-width: 600px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.steps li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; padding: 14px; border-radius: 14px; background: rgba(194, 255, 228, .035); border: 1px solid var(--line); }
.steps .si { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(160deg, rgba(108, 255, 189, .25), rgba(108, 255, 189, .06)); color: var(--honey-2); border: 1px solid rgba(108, 255, 189, .3); }
.steps .si svg { width: 20px; height: 20px; }
.steps .si.red { background: linear-gradient(160deg, rgba(255, 90, 61, .25), rgba(255, 90, 61, .06)); color: #ff9a82; border-color: rgba(255, 90, 61, .3); }
.steps .si.dim { background: rgba(194, 255, 228, .05); color: var(--ink-3); border-color: var(--line); }
.steps h3 { margin: 2px 0 4px; font-size: 14.5px; font-weight: 700; }
.steps p { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.55; }
.fine { margin: 18px 0 0; font-size: 12px; color: var(--ink-3); }

#settings { position: fixed; right: var(--gut); bottom: 70px; z-index: 31; width: 300px; padding: 16px; border-radius: 16px; display: grid; gap: 12px; animation: sheet-in .3s var(--ease); font-weight: 500; font-size: 12.5px; color: var(--ink); text-shadow: none; white-space: normal; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--ink-2); }
.toggle { width: 38px; height: 22px; border-radius: 999px; background: rgba(194, 255, 228, .1); border: 1px solid var(--line); position: relative; transition: background .2s; }
.toggle i { position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--ink-3); transition: transform .25s var(--ease), background .2s; }
.toggle[aria-pressed="true"] { background: rgba(108, 255, 189, .35); border-color: rgba(108, 255, 189, .5); }
.toggle[aria-pressed="true"] i { transform: translateX(16px); background: var(--honey-2); }
.set-foot { font-size: 11px; color: var(--ink-4); }

/* ───────────── narrow screens */
@media (max-width: 1280px) {
  .feed, .side { bottom: 170px; }
  .goal { width: min(480px, calc(100vw - 2 * var(--gut))); }
  .stats { grid-template-columns: repeat(4, 104px) 140px; }
  .stat .v { font-size: 17px; }
  .side { width: 340px; }
}
@media (max-width: 1100px) {
  .feed { width: 300px; }
  .brand { width: 300px; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stat:nth-child(4), .stat.next { display: none; }
}
@media (max-width: 820px) {
  .feed { bottom: 70px; }
  .side { bottom: 70px; }
  :root { --gut: 10px; }
  .top { flex-direction: column; align-items: stretch; gap: 8px; }
  .brand { width: auto; padding: 10px 150px 10px 12px; }
  .brand .tick { display: none; }
  .brand-word { font-size: 16px; }
  .phase { margin-top: 8px; }
  .phase-sub { display: none; }
  .goal { bottom: 226px; padding: 8px 12px; }
  .goal-sub { display: none; }
  .stats { grid-template-columns: repeat(3, 1fr); padding: 2px; }
  .stat { padding: 7px 9px; }
  .stat .v { font-size: 15px; }
  .stat .s { display: none; }
  .feed { top: auto; bottom: 70px; left: var(--gut); right: var(--gut); width: auto; height: 150px; max-height: none; }
  .feed .seg { display: none; }
  .row.trader { display: none; }
  .side { left: var(--gut); right: var(--gut); width: auto; top: auto; bottom: 70px; height: 62vh; }
  .queen-card { display: none; }
  .profile { border-radius: 18px; }
  .dock { left: var(--gut); right: var(--gut); transform: none; justify-content: space-between; }
  .dock .seg span, .dock .btn span { display: none; }
  .corner-l, .corner-r .ca, .dock-sep { display: none; }
  .corner-r { top: var(--gut); bottom: auto; right: var(--gut); padding: 3px; }
  .col-tools { padding-right: 0; }
  .sheet-head { grid-template-columns: 1fr; }
  .labels .lbl.flower .mc { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ───────────── the Queen's command */
.cmd-chip { position: absolute; left: 50%; top: var(--gut); transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 9px 16px 9px 12px; border-radius: 16px; max-width: min(420px, calc(100vw - 2 * var(--gut))); cursor: pointer; border-color: rgba(149, 255, 207, .55) !important; box-shadow: 0 0 30px rgba(111, 255, 190, .3), var(--shadow); animation: cmd-glow 2s ease-in-out infinite; z-index: 11; }
@keyframes cmd-glow { 50% { box-shadow: 0 0 46px rgba(111, 255, 190, .55), var(--shadow); } }
.cc-crown { font-size: 22px; filter: drop-shadow(0 0 8px rgba(130, 255, 199, .8)); }
.cc-main { display: grid; min-width: 0; }
.cc-k { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--honey-2); font-weight: 800; white-space: nowrap; }
.cc-sym { font-family: var(--display); font-weight: 900; font-size: 18px; letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-side { display: grid; justify-items: end; margin-left: auto; padding-left: 10px; border-left: 1px solid var(--line); }
.cc-left { font-weight: 900; font-size: 17px; font-variant-numeric: tabular-nums; }
.cc-crew { font-size: 10.5px; color: var(--ink-3); white-space: nowrap; }
.lbl.flower .qt { display: none; height: 22px; padding: 0 10px; border-radius: 999px; background: linear-gradient(180deg, #b4ffdd, #6cffbd); color: #0f2a1e; font-size: 10.5px; font-weight: 900; letter-spacing: .06em; align-items: center; box-shadow: 0 0 20px rgba(117, 255, 193, .7); }
.lbl.flower.queen .qt { display: inline-flex; }
.lbl.flower.queen .pill { border-color: rgba(149, 255, 207, .8); box-shadow: 0 0 24px rgba(117, 255, 193, .45); }
@media (max-width: 1100px) { .cmd-chip { top: auto; bottom: 150px; } }

/* ───────────── the hive mind */
.mind { margin-top: 14px; padding: 12px; border-radius: 12px; background: linear-gradient(160deg, rgba(120, 90, 255, .12), rgba(108, 255, 189, .05)); border: 1px solid rgba(160, 130, 255, .28); }
.mind-head { display: flex; align-items: center; gap: 8px; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 800; color: #c9b8ff; }
.mind-dot { width: 7px; height: 7px; border-radius: 50%; background: #b98cff; box-shadow: 0 0 10px #b98cff; animation: blink 1.2s infinite; }
.mind-gen { margin-left: auto; padding: 2px 8px; border-radius: 999px; background: rgba(185, 140, 255, .18); color: #e2d6ff; letter-spacing: .06em; }
.mind-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.mind-grid > div { display: grid; gap: 2px; }
.mind-grid .v { font-size: 16px; font-weight: 800; }
.mind-grid .v.pos { color: var(--win); } .mind-grid .v.neg { color: var(--loss); }
.mind-best { margin-top: 8px; font-size: 11px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trait.dna { color: #d9ccff; border-color: rgba(185, 140, 255, .35); background: rgba(185, 140, 255, .08); }

