:root {
  --bg: #050b11; --panel: #0d1822; --panel2: #142433; --line: #294156;
  --text: #f4f8fb; --dim: #91a8bb; --gold: #ffcb3d; --green: #48ef9d; --red: #ff5f55;
  --accent: #40d9ff; --accent2: #a879ff;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font-family: 'Space Grotesk', system-ui, sans-serif; overflow: hidden; overscroll-behavior: none; }
#app { height: 100%; }
.screen { display: none; height: 100%; flex-direction: column; opacity: 0; transform: translateY(8px); transition: opacity .28s ease, transform .28s ease; }
.screen.active { display: flex; opacity: 1; transform: none; }
.screen.screen-enter { animation: screenIn .34s ease; }
@keyframes screenIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.hidden { display: none !important; }

/* Buttons */
.btn { background: var(--panel2); color: var(--text); border: 1px solid var(--line);
  border-radius: 9px; padding: 10px 16px; font-size: 14px; font-weight: 700; cursor: pointer;
  font-family: inherit; letter-spacing: .02em;
  transition: transform .06s, background .15s, border-color .15s; }
.btn:hover { background: #232f3f; border-color: #34445a; }
.btn:active { transform: scale(0.96); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn.primary { background: linear-gradient(135deg, #50f0a1, #20bca2); border-color: #68ffc0; color: #03150e; box-shadow: 0 8px 28px rgba(32,188,162,.22); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.accent { background: linear-gradient(135deg, #2a4a6a, #1b3550); border-color: #3a6a9a; }
.btn.big { padding: 14px 28px; font-size: 18px; border-radius: 12px; min-height: 48px; }
.btn.icon { padding: 8px 12px; min-width: 44px; min-height: 44px; }
.btn.small { padding: 6px 10px; font-size: 14px; min-width: 44px; min-height: 44px; }
.btn.back { background: transparent; min-height: 44px; }
.btn.active-toggle { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(255,210,74,0.35); background: #2a3545; }

/* Title */
#screen-title { align-items: center; justify-content: flex-start; text-align: center; isolation:isolate;
  background: radial-gradient(900px 500px at 50% 28%, #1a4a62 0%, #0a1a26 42%, #03070b 100%); overflow-y:auto; }
.title-wrap { padding: 24px; max-width: 780px; position:relative; z-index:2; margin:auto 0; }
.title-atmosphere { position:absolute; inset:0; overflow:hidden; opacity:1; pointer-events:none; }
.title-bg {
  position:absolute; inset:-2%;
  background:
    linear-gradient(180deg, rgba(3,8,14,.35) 0%, rgba(3,8,14,.55) 42%, rgba(3,7,11,.88) 100%),
    url('./assets/title-bg.jpg') center 35% / cover no-repeat;
  transform: scale(1.04);
  filter: saturate(1.12) contrast(1.05);
  animation: titleBgDrift 28s ease-in-out infinite alternate;
}
.title-vignette {
  position:absolute; inset:0;
  background:
    radial-gradient(70% 55% at 50% 32%, transparent 0%, rgba(3,7,11,.28) 55%, rgba(3,7,11,.78) 100%),
    linear-gradient(90deg, rgba(3,8,14,.55), transparent 22%, transparent 78%, rgba(3,8,14,.55));
}
.title-aurora {
  position:absolute; inset:-20% -10% auto; height:70%;
  background:
    radial-gradient(42% 55% at 22% 45%, rgba(64,217,255,.22), transparent 70%),
    radial-gradient(38% 50% at 78% 40%, rgba(255,159,67,.16), transparent 72%),
    radial-gradient(30% 40% at 50% 20%, rgba(255,203,61,.12), transparent 70%);
  filter: blur(8px);
  animation: titleAurora 10s ease-in-out infinite alternate;
}
.title-grid {
  position:absolute; inset:0; opacity:.16;
  background-image:
    linear-gradient(rgba(64,217,255,.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(64,217,255,.14) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(70% 60% at 50% 40%, #000 20%, transparent 85%);
  animation: titleGrid 18s linear infinite;
}
.title-embers { position:absolute; inset:0; }
.title-embers span {
  position:absolute; width:5px; height:5px; border-radius:50%;
  background: #ffd56a; box-shadow: 0 0 12px rgba(255,203,61,.75);
  animation: titleEmber 7s ease-in-out infinite;
  opacity:.0;
}
.title-embers span:nth-child(1){ left:12%; bottom:22%; animation-delay:0s }
.title-embers span:nth-child(2){ left:28%; bottom:38%; width:3px;height:3px; animation-delay:1.2s }
.title-embers span:nth-child(3){ left:48%; bottom:18%; animation-delay:2.1s }
.title-embers span:nth-child(4){ left:63%; bottom:42%; width:4px;height:4px; animation-delay:3.4s }
.title-embers span:nth-child(5){ left:78%; bottom:26%; animation-delay:4.2s }
.title-embers span:nth-child(6){ left:88%; bottom:48%; width:3px;height:3px; animation-delay:5.5s }
@keyframes titleBgDrift { from { transform: scale(1.04) translate3d(0,0,0); } to { transform: scale(1.08) translate3d(-1.2%, -1%, 0); } }
@keyframes titleAurora { from { opacity:.75; transform: translateY(0); } to { opacity:1; transform: translateY(12px); } }
@keyframes titleGrid { to { background-position: 56px 28px; } }
@keyframes titleEmber {
  0%,100% { opacity:0; transform: translateY(0) scale(.7); }
  20% { opacity:.9; }
  70% { opacity:.35; transform: translateY(-70px) scale(1); }
}
.skyline { position:absolute; inset:auto 0 0; height:42%; opacity:.22; background:linear-gradient(90deg,transparent 2%,#21445a 2% 7%,transparent 7% 9%,#19384b 9% 14%,transparent 14% 17%,#294e62 17% 25%,transparent 25% 28%,#19384b 28% 35%,transparent 35% 39%,#284c60 39% 46%,transparent 46% 50%,#1c3e52 50% 58%,transparent 58% 61%,#294e62 61% 69%,transparent 69% 73%,#19384b 73% 80%,transparent 80% 84%,#274a5e 84% 93%,transparent 93%); clip-path:polygon(0 25%,4% 25%,4% 0,8% 0,8% 45%,14% 45%,14% 12%,21% 12%,21% 54%,28% 54%,28% 6%,36% 6%,36% 35%,44% 35%,44% 18%,53% 18%,53% 48%,61% 48%,61% 3%,69% 3%,69% 38%,76% 38%,76% 15%,84% 15%,84% 50%,92% 50%,92% 22%,100% 22%,100% 100%,0 100%); }
.ticker { position:absolute; bottom:7%; width:200%; left:-30%; padding:9px; background:rgba(7,23,31,.72); border-block:1px solid rgba(64,217,255,.28); color:#59f2ad; font:700 12px/1 'Space Grotesk'; letter-spacing:.24em; transform:rotate(-2deg); animation:ticker 22s linear infinite; backdrop-filter: blur(4px); }
@keyframes ticker { to { transform:translateX(-35%) rotate(-2deg); } }
.hero-vault { position:absolute; left:7%; bottom:14%; width:170px; height:190px; border:8px solid #557b91; border-radius:24px 24px 8px 8px; background:linear-gradient(135deg,#233d4b,#0b1720); box-shadow:inset 0 0 0 6px #0a141b,0 0 70px rgba(64,217,255,.22), 0 0 120px rgba(64,217,255,.08); transform:perspective(500px) rotateY(10deg); animation:vaultPulse 4.5s ease-in-out infinite; }
.hero-vault:before { content:''; position:absolute; inset:26px; border:4px solid #6d93a8; border-radius:50%; box-shadow:0 0 24px rgba(64,217,255,.2); }
.hero-vault span { position:absolute; inset:0; display:grid; place-items:center; font:900 68px 'Barlow Condensed'; color:var(--gold); text-shadow:0 0 18px rgba(255,203,61,.45); }
@keyframes vaultPulse { 0%,100%{ box-shadow:inset 0 0 0 6px #0a141b,0 0 70px rgba(64,217,255,.18); } 50%{ box-shadow:inset 0 0 0 6px #0a141b,0 0 95px rgba(64,217,255,.32); } }
.hero-coin,.hero-banker { position:absolute; display:grid; place-items:center; border-radius:50%; font:900 30px 'Barlow Condensed'; animation:float 3s ease-in-out infinite; }
.hero-coin { width:64px;height:64px;background:#f6ad23;color:#241500;box-shadow:0 0 30px rgba(255,203,61,.45); }
.coin-one{left:22%;bottom:23%}.coin-two{left:27%;bottom:13%;background:#7852c7;color:white;animation-delay:-1.4s}
.hero-banker{width:58px;height:74px;border-radius:18px 18px 10px 10px;background:#354557;color:#ffdfc3;border-top:14px solid #17212c;right:18%;bottom:17%; box-shadow:0 0 24px rgba(255,159,67,.18);}
.hero-banker:before{content:'';position:absolute;bottom:-22px;width:34px;height:24px;background:#111c27;}
.banker-two{right:9%;bottom:26%;transform:scale(.82);animation-delay:-.8s}
.hero-zap{position:absolute;right:27%;bottom:31%;width:150px;height:4px;background:var(--accent);box-shadow:0 0 14px var(--accent);transform:rotate(-9deg);animation:zap 2.2s ease-in-out infinite}
.hero-zap.zap-two{right:34%;bottom:24%;width:110px;transform:rotate(-16deg);animation-delay:-1.1s;opacity:.7}
@keyframes float{50%{translate:0 -10px}} @keyframes zap{0%,70%,100%{opacity:0}75%,84%{opacity:1}}
@media (prefers-reduced-motion: reduce) {
  .title-bg,.title-aurora,.title-grid,.title-embers span,.ticker,.hero-vault,.hero-coin,.hero-banker,.hero-zap { animation: none !important; }
}
.eyebrow { display:inline-block;color:var(--accent);font-size:11px;font-weight:800;letter-spacing:.32em;margin:0 0 12px;text-decoration:none }
.logo { font-weight: 900; line-height: 1; letter-spacing: 1px; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.logo-crypto,.logo-bankers { font-family:'Barlow Condensed',sans-serif; font-style:italic; letter-spacing:-.035em; }
.logo-crypto { font-size: clamp(54px, 11vw, 94px); color: var(--gold); text-shadow: 0 0 24px rgba(255,210,74,0.4); }
.logo-vs { font-size: clamp(18px, 4vw, 28px); color: var(--dim); font-style: italic; }
.logo-bankers { font-size: clamp(54px, 11vw, 94px); color: #F7931A; text-shadow: 0 0 24px rgba(247,147,26,0.4); }
.tagline { color: #bbcad5; font-size: clamp(14px, 3.4vw, 18px); margin: 18px auto 28px; max-width: 520px; }
.tagline strong {color:white}
.title-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; align-items: stretch; }
.title-buttons #btn-play { flex-basis:100%; max-width:360px; font-family:'Barlow Condensed'; font-size:22px; letter-spacing:.08em; }
.title-buttons #btn-campaign-map { flex-basis:100%; max-width:360px; }
.title-tools{display:flex;gap:10px;justify-content:center;margin-top:15px;color:#587184;font-size:12px}.text-btn{border:0;background:none;color:#9db3c3;font:600 12px 'Space Grotesk';cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.campaign-next { padding: 12px 16px 0; }
.next-hero-card { background: linear-gradient(135deg, rgba(32,188,162,.14), rgba(13,24,34,.95)); border: 1px solid color-mix(in srgb, var(--green) 40%, var(--line)); border-radius: 14px; padding: 14px 16px; display: grid; gap: 12px; }
.next-hero-card.complete { border-color: var(--gold); background: linear-gradient(135deg, rgba(255,203,61,.12), rgba(13,24,34,.95)); }
.next-hero-kicker { font-size: 9px; letter-spacing: .22em; color: var(--accent); font-weight: 800; }
.next-hero-main { display: flex; align-items: center; gap: 12px; text-align: left; }
.next-hero-emoji { font-size: 34px; line-height: 1; }
.next-hero-name { font: 800 20px/1.1 'Barlow Condensed'; text-transform: uppercase; letter-spacing: .03em; }
.next-hero-sub, .next-hero-copy { color: var(--dim); font-size: 13px; line-height: 1.45; margin: 4px 0 0; }
.next-hero-card .btn { width: 100%; }
.world-tabs { display: flex; gap: 8px; padding: 10px 16px 0; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.world-tabs::-webkit-scrollbar { display: none; }
.world-tab { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--dim); font: 700 12px 'Space Grotesk'; cursor: pointer; white-space: nowrap; }
.world-tab.active { color: var(--text); border-color: var(--accent); box-shadow: 0 0 0 2px rgba(64,217,255,.18); background: #122433; }
.world-tab.locked { opacity: .45; cursor: not-allowed; }
.world-tab-emoji { font-size: 16px; }
.world-tab-name { max-width: 9rem; overflow: hidden; text-overflow: ellipsis; }
.title-progress { margin-top: 22px; color: var(--dim); font-size: 14px; }
.title-account { margin-top: 10px; font-size: 13px; color: var(--dim); }
.title-account a { color: var(--accent); }
.kbd-hint { margin-top: 14px; font-size: 12px; color: var(--dim); }
kbd { background: var(--panel2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; font-size: 11px; }

/* Topbar */
.topbar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: 18px; margin: 0; flex: 1; text-align: center; }
.top-title{flex:1;text-align:center}.top-title>span{font-size:9px;letter-spacing:.28em;color:var(--accent);font-weight:800}.top-title h1{font:800 22px/1 'Barlow Condensed';margin:3px 0 0;text-transform:uppercase;letter-spacing:.04em}
.topbar .btn.icon { align-self: center; }
.slots-info { color: var(--dim); font-size: 13px; min-width: 70px; text-align: right; }

/* Worlds / levels */
.worlds { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 18px; }
.world { --world:#39c9ff;background:linear-gradient(110deg,color-mix(in srgb,var(--world) 11%,var(--panel)),var(--panel) 38%);border:1px solid color-mix(in srgb,var(--world) 32%,var(--line));border-radius:14px;padding:14px;position:relative;overflow:hidden}.world:after{content:'';position:absolute;inset:0 0 auto;height:3px;background:linear-gradient(90deg,var(--world),transparent)}.world-1{--world:#f4d06f}.world-2{--world:#44aee8}.world-3{--world:#c58a59}.world-4{--world:#ff654f}
.world-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.world-index{font:900 30px 'Barlow Condensed';color:color-mix(in srgb,var(--world) 55%,transparent)}
.world-emoji { font-size: 26px; }
.world-name { font-weight: 800; font-size: 17px; }
.world-sub { color: var(--dim); font-size: 12px; }
.world-lock { margin-left: auto; color: var(--dim); font-size: 13px; }
.levels-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
@media (min-width: 720px) { .levels-grid { grid-template-columns: repeat(10, 1fr); } }
.lvl { min-height: 64px; border-radius: 10px; border: 1px solid var(--line); background: rgba(10,22,31,.86);color:var(--text);
  display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; cursor: pointer; position: relative; padding: 6px 4px; gap: 2px; }
.lvl:hover { border-color: var(--accent); }
.lvl.cleared { background: linear-gradient(135deg, #1c3a2c, #16324a); border-color: #2ea86a; color: var(--green); }
.lvl.current { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(255,210,74,0.3); }
.lvl.locked { opacity:.62;cursor:not-allowed;color:#708292;background:#0a141d }
.lvl.boss { color: var(--red); }
.lvl-kicker{font-size:7px;letter-spacing:.12em;color:var(--dim)}.lvl strong{font:800 21px 'Barlow Condensed'}.lvl-lock{font-size:7px;letter-spacing:.08em;color:#708292}
.lvl-stars { font-size: 9px; color: var(--gold); letter-spacing: -1px; line-height: 1; }
.lvl-replay { position: absolute; top: 3px; right: 5px; font-size: 10px; color: var(--dim); opacity: 0.8; }

/* Seed select */
#screen-seeds {
  min-height: 0;
  overflow: hidden;
  max-width: 100vw;
  display: none;
  flex-direction: column;
}
#screen-seeds.active { display: flex; }
.seed-layout {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  width: 100%;
  max-width: 100%;
  padding: 24px max(16px, calc((100vw - 1180px) / 2));
  padding-bottom: max(28px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  background: radial-gradient(700px 400px at 30% 10%, rgba(36,101,126,.14), transparent);
}
@media (min-width:820px){.seed-layout{grid-template-columns:minmax(0,1.55fr) minmax(310px,.75fr);align-items:start}}
.seed-main { min-width: 0; }
.seed-side { min-width: 0; }
.section-h { font-size: 15px; margin: 0 0 10px; color: var(--dim); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.section-h span { color: var(--gold); }
.recommended-hero { background: linear-gradient(135deg, rgba(255,203,61,.12), rgba(13,24,34,.95)); border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line)); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.recommended-kicker { font-size: 9px; letter-spacing: .2em; color: var(--gold); font-weight: 800; }
.recommended-copy { margin: 6px 0 0; color: var(--dim); font-size: 12px; line-height: 1.45; }
.squad-rail { display: grid; grid-template-columns: repeat(var(--squad-slots, 6), minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; max-width: 100%; }
.squad-slot { width: auto; min-width: 0; min-height: 96px; border: 1px dashed #415768; border-radius: 12px; background: rgba(8,14,20,.65); color: var(--text); font: inherit; display: grid; gap: 4px; justify-items: center; padding: 8px 6px; cursor: pointer; }
.squad-slot.filled { border-style: solid; border-color: #4f6d84; background: linear-gradient(160deg,#1a2b39,#101a24); }
.squad-slot.focus { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(255,210,74,.25); }
.squad-portrait { display: block; width: 48px; height: 48px; }
.squad-meta { display: grid; gap: 2px; text-align: center; }
.squad-name { font-size: 9px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 76px; }
.squad-tag { font-size: 8px; color: var(--accent); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.squad-empty { font-size: 9px; color: var(--dim); align-self: center; }
.ability-inspector { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; background: rgba(10,18,26,.9); border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 14px; }
.ability-inspector.hidden { display: none; }
.ability-demo-canvas { display: block; width: 96px; height: 96px; }
.ability-copy { text-align: left; min-width: 0; }
.ability-name { font: 800 18px/1.1 'Barlow Condensed'; letter-spacing: .04em; }
.ability-role { font-size: 10px; color: var(--accent); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; margin-top: 2px; }
.ability-purpose { font-size: 12px; color: var(--text); line-height: 1.45; margin-top: 6px; }
.ability-stats { font-size: 10px; color: var(--dim); margin-top: 6px; }
.seed-customize { margin-top: 4px; }
.seed-customize-toggle { cursor: pointer; color: var(--dim); font-size: 12px; font-weight: 700; list-style: none; }
.seed-customize-toggle::-webkit-details-marker { display: none; }
.seed-layout.seed-curated .seed-customize { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: rgba(8,14,20,.45); }
.seed-layout.seed-curated .seed-customize[open] { margin-top: 8px; }
.seed-pool { display:grid;grid-template-columns:repeat(auto-fit,minmax(min(132px, 100%), 1fr));gap:12px;max-width:100% }
.seed-actions { display: flex; gap: 10px; margin-top: 14px; }
.card { background:linear-gradient(155deg,#1b3041,#101d29);color:var(--text);border:1px solid #304b60;border-radius:14px;padding:12px 10px 10px;
  text-align: center; cursor: pointer; transition: transform .06s, border-color .12s; position: relative; min-height: 148px; display: grid; gap: 6px; justify-items: center; }
.card:hover { border-color: var(--accent); }
.card:active { transform: scale(0.97); }
.card.selected {border-color:var(--gold);box-shadow:0 0 0 2px rgba(255,210,74,.3),0 10px 30px rgba(0,0,0,.2);background:linear-gradient(155deg,#2e3940,#18353b);transform:translateY(-2px)}
.card.recommended { border-color: color-mix(in srgb, var(--gold) 35%, #304b60); }
.card-portrait, .banker-portrait, .sb-portrait { display: block; }
.card-portrait { width: 56px; height: 56px; }
.card-body { width: 100%; }
.card .cname { font-size: 12px; font-weight: 700; margin-top: 0; }
.card .crole { font-size: 10px; font-weight: 700; color: var(--accent); margin-top: 2px; text-transform: uppercase; letter-spacing: 0.4px; }
.card .cpurpose { font-size: 10px; color: var(--dim); margin-top: 4px; line-height: 1.3; min-height: 38px; }
.card .cattack { font-size: 9px; color: #fbbf24; font-weight: 700; margin-top: 2px; }
.card .ccost { font-size: 12px; color: var(--gold); margin-top: 2px; }
.card .new-tag { position: absolute; top: 4px; left: 4px; background: var(--accent2); color: #12061f; font-size: 9px; font-weight: 800; padding: 1px 5px; border-radius: 6px; }
.card .rec-tag { position: absolute; top: 4px; left: 4px; background: var(--gold); color: #241a05; font-size: 9px; font-weight: 800; padding: 1px 5px; border-radius: 6px; }
.card .new-tag + .rec-tag { left: 38px; }
.hotkey-badge { position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,0.45); border: 1px solid var(--line); color: var(--dim); font-size: 9px; font-weight: 800; width: 16px; height: 16px; border-radius: 5px; display: flex; align-items: center; justify-content: center; }
.banker-chip .banker-hp { color: var(--dim); font-size: 12px; margin-left: auto; white-space: nowrap; align-self: flex-start; padding-top: 6px; }
.banker-chip .banker-copy { flex: 1; min-width: 0; }
.banker-portrait { width: 88px; height: 88px; flex: 0 0 auto; border-radius: 16px; }
.seed-side{background:rgba(13,24,34,.72);border:1px solid var(--line);border-radius:16px;padding:16px;overflow:visible}.seed-bankers{display:flex;flex-direction:column;gap:10px}.banker-chip{background:var(--panel2);border:1px solid var(--line);border-radius:14px;padding:12px 14px;font-size:14px;display:flex;gap:14px;align-items:center}.banker-chip b{font-size:15px}.banker-chip small{display:block;color:var(--dim);font-size:12px;margin-top:4px;line-height:1.35}.banker-avatar{font-size:25px}
.world-note { margin-top: 12px; color: var(--dim); font-size: 13px; background: transparent; border: 0; border-radius: 0; padding: 0; }
.world-note.hidden { display: none !important; }
.seed-footer{flex:0 0 auto;position:sticky;bottom:0;z-index:3;width:100%;max-width:100vw;padding:12px max(16px,calc((100vw - 1180px)/2));border-top:1px solid var(--line);display:flex;align-items:center;justify-content:flex-end;gap:18px;background:#09131c;box-sizing:border-box}.selected-summary{color:var(--dim);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.seed-footer .btn{min-width:220px}.rule-callout,.boss-callout{margin-top:10px;border-left:3px solid var(--accent);background:#0b202c;padding:9px 11px;font-size:11px;font-weight:700}.boss-callout{border-color:var(--red);background:#28171a;color:#ffd1cc}.world-note p{margin:5px 0}

/* Game */
#screen-game { position: relative; background: radial-gradient(120% 80% at 50% 0%, #10202c, #05080c 70%); min-height: 0; }
/* Canvas owns remaining height; seedbar stays fixed-size so field is edge-to-edge of the wrap. */
.game-hud { display: flex; align-items: center; gap: 12px; padding: 8px 12px; background: var(--panel); border-bottom: 1px solid var(--line); }
.hud-left { display: flex; align-items: center; gap: 8px; }
.hud-level { font-weight: 700; font-size: 14px; }
.hud-hash { display: flex; align-items: center; gap: 4px; font-weight: 900; font-size: 20px; color: var(--gold); min-width: 90px; }
.hash-word{font:800 9px 'Space Grotesk';letter-spacing:.14em;color:#fff2b8;margin-right:2px}
.hash-icon { filter: drop-shadow(0 0 6px rgba(255,210,74,0.6)); }
.hud-wave { flex: 1; display: flex; align-items: center; gap: 8px; }
.wave-bar { flex: 1; height: 10px; background: #0c1118; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.wave-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--red), #ff9a4a); transition: width .2s; }
.wave-label { font-size: 12px; color: var(--dim); min-width: 70px; text-align: right; }
.canvas-wrap { flex: 1 1 auto; min-height: 0; width: 100%; position: relative; display: flex; align-items: stretch; justify-content: stretch; overflow: hidden; background: radial-gradient(120% 120% at 50% 50%, rgba(40,70,60,0.18), rgba(0,0,0,0) 70%); }
.rotate-gate {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    max(16px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  background: rgba(4, 8, 12, 0.96);
  text-align: center;
}
.rotate-gate.hidden { display: none !important; }
.rotate-card {
  width: min(92vw, 360px);
  background: linear-gradient(160deg, #142433, #0b141d);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.rotate-icon { font-size: 42px; line-height: 1; margin-bottom: 8px; }
.rotate-title { margin: 0; font: 800 22px/1.1 'Barlow Condensed'; letter-spacing: .04em; text-transform: uppercase; }
.rotate-copy { margin: 10px 0 0; color: var(--text); font-size: 14px; line-height: 1.45; }
.rotate-sub { margin: 8px 0 0; color: var(--dim); font-size: 12px; line-height: 1.4; }
#game-canvas { display: block; width: 100%; height: 100%; max-width: 100%; max-height: 100%; touch-action: none; user-select: none; }
#screen-game .game-overlay {
  position: absolute;
  inset: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: rgba(4,8,12,0.88);
  padding:
    max(10px, env(safe-area-inset-top))
    max(10px, env(safe-area-inset-right))
    max(10px, env(safe-area-inset-bottom))
    max(10px, env(safe-area-inset-left));
}
.game-overlay.hidden { display: none !important; }
.battle-alert{position:absolute;top:76px;left:50%;translate:-50% 0;z-index:8;background:rgba(79,13,18,.94);border:1px solid #ff675d;color:white;padding:10px 18px;border-radius:8px;font:900 18px 'Barlow Condensed';letter-spacing:.08em;text-align:center;box-shadow:0 8px 30px rgba(0,0,0,.35);animation:alertIn .2s ease}.battle-alert small{display:block;font:500 10px 'Space Grotesk';letter-spacing:0;color:#ffd1cd;margin-top:3px}@keyframes alertIn{from{opacity:0;transform:translateY(-8px)}}
.overlay-card { text-align: center; padding: 28px 20px; max-width: 420px; width: min(92vw, 420px); margin: auto; flex: 0 0 auto; }
.overlay-card h2 { font-size: clamp(22px, 5vw, 30px); margin: 0 0 8px; }
.overlay-card .result-stats { color: var(--dim); margin: 12px 0 16px; font-size: 14px; line-height: 1.45; }
.overlay-card .result-meme { color: var(--text); font-size: 15px; margin: 0 0 10px; font-style: italic; }
.overlay-card .overlay-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.overlay-card .overlay-actions .btn { flex: 1 1 calc(50% - 4px); min-width: 0; }
.overlay-card .overlay-actions .btn.big { flex-basis: 100%; }
.overlay-card .btn { margin: 0; min-height: 44px; }
.overlay-card .mastery-breakdown,
.overlay-card .loss-advice,
.overlay-card .result-submit-note { font-size: 12px; line-height: 1.5; margin: 8px 0 12px; text-align: left; }
.overlay-card .mode-score { margin: 8px 0 12px; }
.overlay-pop { animation: overlayPop .32s ease; }
@keyframes overlayPop { from { opacity: 0; transform: scale(0.94) translateY(8px); } to { opacity: 1; transform: none; } }
.result-stars { display: block; font-size: 28px; color: var(--gold); letter-spacing: 2px; margin: 6px 0 10px; text-shadow: 0 0 12px rgba(255,210,74,0.35); }
.win h2 { color: var(--green); }
.lose h2 { color: var(--red); }

/* Seedbar */
.seedbar { display: flex; flex: 0 0 auto; align-items: stretch; gap: 10px; min-height: 132px; padding: 10px 14px; background: var(--panel); border-top: 1px solid var(--line); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sb-card { position:relative;flex:0 0 auto;width:118px;min-height:112px;background:var(--panel2);color:var(--text);border:1px solid var(--line);font-family:inherit;
  border-radius: 12px; padding: 8px 5px 7px; text-align: center; cursor: pointer; overflow: hidden; display: grid; gap: 3px; justify-items: center; align-content: start; }
.sb-card.selected { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(255,210,74,0.35); }
.sb-card.unaffordable { filter: grayscale(0.6) brightness(0.7); }
.sb-portrait { width: 68px; height: 68px; }
.sb-role { font-size: 9px; font-weight: 800; color: var(--accent); letter-spacing: .08em; text-transform: uppercase; }
.sb-name{font-size:12px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:108px}
.sb-card .ccost { font-size: 13px; color: var(--gold); font-weight: 800; }
.sb-card .cd { position: absolute; inset: 0; background: rgba(4,8,12,0.72); transform-origin: bottom; }
.sb-card .cdnum { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(4,8,12,0.8); display: flex; align-items: center; justify-content: center; z-index: 80; padding: 16px; }
.modal-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 24px; max-width: 520px; }
.modal-card h2 { margin-top: 0; }
.howto-grid{display:grid;gap:10px}.howto-grid>div{display:flex;gap:12px;align-items:center;padding:10px;border-radius:10px;background:var(--panel2)}.howto-grid b{display:grid;place-items:center;min-width:28px;height:28px;border-radius:50%;background:var(--green);color:#062016}.howto-grid span{font-size:12px;color:var(--dim)}.howto-grid strong{display:block;color:var(--text);font-size:14px}.star-rules{margin-top:12px;padding:10px;border:1px solid #816d2a;border-radius:10px;background:#272311;color:#ffe58a;font-size:12px}

/* Coach marks */
.coach-root{position:fixed;inset:auto 0 136px;z-index:60;display:flex;justify-content:center;padding:16px;pointer-events:none}
.coach-root:not(.hidden){pointer-events:none}.coach-card{pointer-events:auto}
.coach-card{position:relative;background:rgba(13,24,34,.97);border:1px solid var(--accent);border-radius:14px;padding:16px;width:min(520px,100%);box-shadow:0 12px 40px rgba(0,0,0,.45);animation:overlayPop .28s ease}
.coach-card h3 { margin: 0 0 8px; font-size: 18px; }
.coach-card p { margin: 0; color: var(--dim); line-height: 1.5; font-size: 14px; }
.coach-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }
.coach-dots { display: flex; gap: 6px; margin-top: 12px; }
.coach-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.coach-dot.on { background: var(--gold); }
body.tutorial-select .sb-card[data-id="satoshi"]{animation:tutorialGlow .8s ease-in-out infinite;border-color:#ffe66d;z-index:4}
body.tutorial-place #game-canvas{filter:brightness(1.13)}
body.tutorial-place .canvas-wrap:after{content:'TAP A GLOWING TILE';position:absolute;left:50%;top:12%;translate:-50% 0;pointer-events:none;background:#fff4b3;color:#291900;border:3px solid #2c1d00;border-radius:12px;padding:9px 15px;font:900 15px 'Barlow Condensed';letter-spacing:.08em;box-shadow:0 5px 0 #8d6613,0 10px 30px rgba(0,0,0,.3)}
@keyframes tutorialGlow{0%,100%{box-shadow:0 0 0 2px rgba(255,230,109,.25),0 0 12px rgba(255,203,61,.5);filter:brightness(1)}50%{box-shadow:0 0 0 5px rgba(255,230,109,.42),0 0 30px rgba(255,203,61,.9);filter:brightness(1.3)}}

/* Toasts */
.toast-stack { position:fixed;top:76px;left:50%;transform:translateX(-50%);z-index:90;display:flex;flex-direction:column;gap:8px;width:min(92vw,420px);pointer-events:none }
.star-tracker{display:flex;gap:5px;font-size:8px;color:#92a6b5}.star-tracker span{border:1px solid #415768;border-radius:12px;padding:3px 6px}.star-tracker .lost{color:#ff746a;border-color:#9d3934;text-decoration:line-through}.star-tracker .ready{color:#5ff0a4;border-color:#238c5b}.mastery-breakdown,.loss-advice{background:#101d27;border:1px solid var(--line);padding:10px;border-radius:10px;font-size:12px;line-height:1.7;margin:10px 0}.loss-advice{color:#dce8ef}.loss-advice b{display:block;color:var(--gold);font-size:9px;letter-spacing:.16em}.mode-score{color:var(--dim);font-size:10px;letter-spacing:.14em;margin-bottom:12px}.mode-score b{color:var(--gold);font-size:22px;display:block}
.star-tracker.tutorial-hidden{display:none}
.toast { background: rgba(19,26,36,0.95); border: 1px solid var(--line); color: var(--text); padding: 12px 16px; border-radius: 12px; font-size: 14px; font-weight: 600; opacity: 0; transform: translateY(-8px); transition: opacity .22s ease, transform .22s ease; box-shadow: 0 8px 24px rgba(0,0,0,0.35); }
.toast.show { opacity: 1; transform: none; }

/* Mobile polish */
@media (max-width: 640px) {
  .title-atmosphere{opacity:1}.title-bg{opacity:.95;filter:saturate(1.05)}.title-embers,.title-grid{opacity:.55}.hero-vault{left:-40px;transform:scale(.7)}.hero-banker{right:-15px;transform:scale(.7)}.banker-two,.coin-two,.hero-zap,.zap-two{display:none}.coin-one{left:8%;bottom:18%;transform:scale(.75)}
  #screen-title { justify-content:flex-start; }
  .title-wrap{padding:18px;margin:auto 0}.logo-crypto,.logo-bankers{font-size:56px}.tagline{margin:14px auto 20px}.title-buttons #btn-play,.title-buttons #btn-campaign-map{max-width:none}
  .title-buttons { gap: 10px; }
  .campaign-next { padding: 10px 12px 0; }
  .next-hero-name { font-size: 18px; }
  .world-tabs { padding: 8px 12px 0; }
  .game-hud { flex-wrap: wrap; gap: 8px; }
  .star-tracker{order:4;width:100%;justify-content:center}
  .hud-wave { min-width: 100%; order: 3; }
  #screen-seeds .topbar {
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
    padding-top: max(8px, env(safe-area-inset-top));
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  #screen-seeds .topbar .back { order: 1; padding: 8px 10px; font-size: 12px; min-height: 40px; }
  #screen-seeds .top-title { order: 2; flex: 1 1 auto; min-width: 0; text-align: left; }
  #screen-seeds .top-title > span { font-size: 8px; letter-spacing: .22em; }
  #screen-seeds .top-title h1 { font-size: 17px; line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #screen-seeds .slots-info { order: 4; width: 100%; text-align: center; min-width: 0; font-size: 11px; padding-bottom: 2px; }
  .seed-layout {
    padding: 12px;
    padding-bottom: max(132px, calc(96px + env(safe-area-inset-bottom)));
    gap: 16px;
  }
  /* Threat first on phones so it isn't buried under the roster. */
  .seed-side { order: -1; padding: 12px; max-width: 100%; overflow: visible; }
  .seed-main { order: 0; }
  .section-h { font-size: 12px; margin-bottom: 8px; }
  .recommended-hero { padding: 10px 12px; margin-bottom: 10px; }
  .recommended-copy { font-size: 11px; }
  .squad-rail { gap: 6px; }
  .squad-slot { min-height: 76px; padding: 6px 4px; }
  .squad-portrait { width: 40px; height: 40px; }
  .squad-name { max-width: 100%; font-size: 8px; white-space: normal; line-height: 1.15; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .ability-inspector { grid-template-columns: 72px 1fr; gap: 10px; padding: 10px; margin-bottom: 10px; text-align: left; max-width: 100%; }
  .ability-demo-canvas { width: 72px; height: 72px; }
  .ability-name { font-size: 16px; }
  .ability-purpose { font-size: 11px; margin-top: 4px; }
  .ability-stats { font-size: 9px; }
  .seed-pool { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card { min-height: 132px; padding: 10px 8px 8px; }
  .card-portrait { width: 50px; height: 50px; }
  .card .cname { font-size: 11px; }
  .card .cpurpose { font-size: 9px; min-height: 32px; }
  .seed-actions { flex-wrap: wrap; gap: 8px; margin-top: 10px; }
  .seed-actions .btn { flex: 1 1 calc(50% - 4px); min-height: 44px; font-size: 12px; padding: 10px 8px; }
  .seed-customize-toggle { font-size: 11px; }
  .banker-chip { padding: 10px 12px; font-size: 13px; max-width: 100%; gap: 12px; }
  .banker-portrait { width: 72px; height: 72px; }
  .banker-chip b { font-size: 14px; }
  .banker-chip small { font-size: 11px; }
  .levels-grid { gap: 6px; }
  .lvl { font-size:14px;min-height:58px }
  .seed-footer{
    padding:10px 12px;
    padding-bottom:max(10px, env(safe-area-inset-bottom));
    flex-direction:column;
    align-items:stretch;
    gap:10px;
  }
  .selected-summary{display:block;text-align:center;font-size:11px;white-space:normal}
  .seed-footer .btn{width:100%;min-width:0}
  #screen-game .game-overlay:not(.hidden) { align-items: flex-start; justify-content: flex-start; }
  .overlay-card { padding: 16px 14px; width: 100%; max-width: none; }
  .overlay-card h2 { font-size: clamp(18px, 4.8vw, 24px); }
  .result-stars { font-size: 22px; margin: 4px 0 8px; }
  .overlay-card .result-stats { font-size: 12px; margin: 8px 0 10px; }
  .overlay-card .result-meme { font-size: 13px; margin-bottom: 8px; }
  .overlay-card .mastery-breakdown,
  .overlay-card .loss-advice,
  .overlay-card .result-submit-note { font-size: 11px; padding: 8px; margin: 8px 0; }
  .overlay-card .mode-score b { font-size: 18px; }
  .overlay-card .overlay-actions .btn { flex-basis: calc(50% - 4px); font-size: 13px; padding: 10px 8px; }
  .overlay-card .overlay-actions .btn.big { flex-basis: 100%; font-size: 15px; }
  .battle-alert{top:104px;width:88%;font-size:16px}
  .coach-root{position:absolute;inset:108px 0 auto;padding:10px}
  .coach-card{padding:13px}.coach-card h3{font-size:16px}.coach-card p{font-size:12px}.coach-actions{margin-top:8px}
  body.tutorial-place .canvas-wrap:after{top:5%;font-size:11px;padding:6px 9px;border-width:2px;box-shadow:0 3px 0 #8d6613,0 8px 20px rgba(0,0,0,.3)}
}
@media (max-width: 900px) and (orientation: landscape) {
  html, body, #app { width: 100vw; height: 100svh; min-height: 100svh; }
  @supports (height: 100dvh) { html, body, #app { height: 100dvh; min-height: 100dvh; } }
  body.playing {
    overflow: hidden;
    background: #050b11;
  }
  body.playing #app {
    position: fixed;
    inset: 0;
    z-index: 40;
    width: 100vw;
    max-width: none;
    height: 100svh;
    min-height: 100svh;
    margin: 0;
    overflow: hidden;
  }
  @supports (height: 100dvh) {
    body.playing #app { height: 100dvh; min-height: 100dvh; }
  }
  body.playing #screen-game.active {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100svh;
    min-height: 100svh;
    z-index: 50;
    padding:
      max(0px, env(safe-area-inset-top))
      max(0px, env(safe-area-inset-right))
      max(0px, env(safe-area-inset-bottom))
      max(0px, env(safe-area-inset-left));
  }
  @supports (height: 100dvh) {
    body.playing #screen-game.active { height: 100dvh; min-height: 100dvh; }
  }
  .rotate-gate { display: none !important; }
  .hud-level { max-width: 135px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .star-tracker { display: none; }
  .hud-wave { min-width: 150px; }
  .seedbar { padding: 4px 6px; min-height: 72px; max-height: 24vh; gap: 6px; padding-bottom: max(4px, env(safe-area-inset-bottom)); }
  .sb-card { width: 72px; min-height: 68px; padding: 4px 2px; }
  .sb-portrait { width: 40px; height: 40px; }
  .sb-name { font-size: 10px; max-width: 66px; }
  .sb-role { font-size: 8px; }
  .sb-card .ccost { font-size: 11px; }
  .game-hud { padding: 4px max(8px, env(safe-area-inset-right)) 4px max(8px, env(safe-area-inset-left)); flex-wrap: nowrap; }
  .coach-root { inset: auto 0 84px; }
  #screen-game .game-overlay:not(.hidden) {
    align-items: flex-start;
    justify-content: flex-start;
    padding:
      max(6px, env(safe-area-inset-top))
      max(8px, env(safe-area-inset-right))
      max(6px, env(safe-area-inset-bottom))
      max(8px, env(safe-area-inset-left));
  }
  .overlay-card { padding: 12px 10px; width: 100%; max-width: none; }
  .overlay-card h2 { font-size: 18px; margin-bottom: 6px; }
  .result-stars { font-size: 20px; margin: 2px 0 6px; }
  .overlay-card .result-stats,
  .overlay-card .result-meme { font-size: 11px; margin: 6px 0; }
  .overlay-card .mastery-breakdown,
  .overlay-card .loss-advice { font-size: 10px; padding: 7px; margin: 6px 0; line-height: 1.45; }
  .overlay-card .overlay-actions { gap: 6px; }
  .overlay-card .overlay-actions .btn { min-height: 40px; font-size: 12px; padding: 8px 6px; }
  .overlay-card .overlay-actions .btn.big { font-size: 13px; min-height: 42px; }
}
@media (max-width: 900px) and (orientation: portrait) {
  body.playing #screen-game.active .game-hud,
  body.playing #screen-game.active .canvas-wrap,
  body.playing #screen-game.active .seedbar,
  body.playing #screen-game.active .battle-alert,
  body.playing #screen-game.active .coach-root {
    visibility: hidden;
    pointer-events: none;
  }
}

/* Social / meta UI (title + activity) */
.title-social { margin: 16px auto 0; max-width: 520px; display: grid; gap: 10px; }
.title-social-head { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; min-height: 28px; }
.presence-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 28px; padding: 5px 11px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--green) 42%, var(--line)); background: rgba(18, 40, 34, 0.88); color: #b9f6d7; font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.presence-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(72,239,157,.55); animation: presencePulse 1.8s ease-out infinite; }
@keyframes presencePulse {
  0% { box-shadow: 0 0 0 0 rgba(72,239,157,.55); }
  70% { box-shadow: 0 0 0 8px rgba(72,239,157,0); }
  100% { box-shadow: 0 0 0 0 rgba(72,239,157,0); }
}
.text-btn.danger-text { color: #ff9b93; }
.text-btn.danger-text:hover { color: #ffd0cc; }
.campaign-board { text-align: left; }
.campaign-board.is-empty { display: none; }
.campaign-board-card { background: rgba(7,18,26,.92); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; }
.campaign-board-card strong { display: block; font-size: 9px; letter-spacing: .18em; color: var(--accent); margin-bottom: 6px; }
.campaign-board-card ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.campaign-board-card li { display: flex; justify-content: space-between; gap: 10px; color: var(--dim); font-size: 12px; }
.campaign-board-card li b { color: #dce7ee; font-weight: 700; }
.campaign-board-empty { margin: 0; color: var(--dim); font-size: 12px; }
.campaign-board-more { margin: 8px 0 0; }
.campaign-you { margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(64,217,255,.16); color: #cfe2ee; font-size: 12px; }

/* Leaderboard drawer (Angry Crypto pattern) */
.lb-backdrop {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(3, 8, 12, 0.55);
  backdrop-filter: blur(2px);
}
.lb-backdrop.hidden { display: none !important; }
.lb-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(440px, 96vw);
  z-index: 71;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #10202c, #07131c 40%, #050b11);
  border-left: 1px solid var(--line);
  box-shadow: -18px 0 50px rgba(0,0,0,.45);
  transform: translateX(105%);
  transition: transform .28s cubic-bezier(.3,1,.4,1);
  padding:
    max(10px, env(safe-area-inset-top))
    max(12px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom))
    12px;
}
.lb-drawer.open { transform: translateX(0); }
.lb-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 6px 6px 10px; }
.lb-head h3 { margin: 0; font: 900 22px/1.1 'Barlow Condensed'; letter-spacing: .04em; text-transform: uppercase; }
.lb-sub { margin: 6px 0 0; color: var(--dim); font-size: 12px; line-height: 1.4; }
.lb-you {
  margin: 0 6px 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,203,61,.35);
  background: rgba(255,203,61,.1);
  color: #ffe9a8;
  font-size: 13px;
  font-weight: 700;
}
.lb-you.hidden { display: none !important; }
.lb-body { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 4px 8px; }
.lb-empty { color: var(--dim); font-size: 13px; padding: 18px 10px; text-align: center; }
.lb-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
}
.lb-row:nth-child(odd) { background: rgba(64,217,255,.05); }
.lb-row.me { background: rgba(255,203,61,.14); border: 1px solid rgba(255,203,61,.35); }
.lb-pos { text-align: center; font: 800 15px/1 'Barlow Condensed'; color: var(--dim); }
.lb-pos.medal { font-size: 18px; }
.lb-player { min-width: 0; }
.lb-name { font-weight: 800; font-size: 14px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-meta { margin-top: 2px; font-size: 11px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-badge {
  justify-self: end;
  min-width: 52px;
  text-align: center;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(64,217,255,.12);
  border: 1px solid rgba(64,217,255,.22);
  color: #9fe9ff;
  font: 800 12px/1 'Barlow Condensed';
  letter-spacing: .04em;
}
.lb-note { padding: 8px 10px 4px; color: var(--dim); font-size: 11px; line-height: 1.4; }
.lb-foot { padding: 8px 10px 4px; color: #6f8798; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }

@media (max-width: 640px) {
  .lb-drawer { width: 100vw; }
  .campaign-board-card li { font-size: 11px; }
}
.title-account { line-height: 1.45; max-width: 540px; margin-left: auto; margin-right: auto; }

/* Bottom-right verified recent completions */
.activity-popups { position: fixed; right:max(14px,env(safe-area-inset-right)); bottom:max(14px,env(safe-area-inset-bottom)); z-index: 42; display: flex; flex-direction: column-reverse; gap: 8px; width: min(92vw, 320px); pointer-events: none; }
.activity-popup { background: rgba(12, 22, 31, 0.96); border: 1px solid color-mix(in srgb, var(--green) 35%, var(--line)); color: var(--text); border-radius: 12px; padding: 10px 12px; box-shadow: 0 10px 28px rgba(0,0,0,.35); opacity: 0; transform: translateY(10px); transition: opacity .22s ease, transform .22s ease; }
.activity-popup.show { opacity: 1; transform: none; }
.activity-popup-kicker { font-size: 9px; letter-spacing: .16em; font-weight: 800; color: var(--green); margin-bottom: 4px; }
.activity-popup-body { font-size: 13px; font-weight: 600; line-height: 1.35; color: #e7eef3; }

@media (max-width: 640px) {
  .title-social { margin-top: 12px; max-width: none; }
  .activity-popups { right: 10px; bottom: 10px; width: min(94vw, 300px); }
  .campaign-board-card li { font-size: 11px; }
}
