/* ===== Flingers UI system: chunky, bright, mobile-first (think Brawl Stars / Royal Match). ===== */
:root {
  --bg: #0b1020; --bg2: #121a33; --glass: rgba(14, 22, 48, .72); --glass2: rgba(255,255,255,.08); --line: rgba(255,255,255,.12); --line2: rgba(255,255,255,.22);
  --txt: #f4f7ff; --mut: #9fb0cf; --acc: #ffb545; --acc2: #49e3ff; --ok: #5ad67d; --bad: #ff5a5a; --gold: #ffd166; --gold2: #ff9f43;
  --r: 18px; --r2: 12px; --shadow: 0 10px 30px rgba(0,0,0,.35);
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px); --sal: env(safe-area-inset-left, 0px); --sar: env(safe-area-inset-right, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--txt); font-family: Nunito, system-ui, sans-serif; overflow: hidden; overscroll-behavior: none; user-select: none; -webkit-user-select: none; }
#app { position: fixed; inset: 0; }
#game { position: absolute; inset: 0; display: block; }
#screen { position: absolute; inset: 0; overflow: auto; background: radial-gradient(120% 80% at 50% -10%, rgba(73,227,255,.18), transparent 60%), linear-gradient(180deg, rgba(8,12,30,.9), rgba(8,12,30,.96)); -webkit-overflow-scrolling: touch; padding: 0 calc(12px + var(--sar)) calc(16px + var(--sab)) calc(12px + var(--sal)); }
#screen[hidden], #hud[hidden] { display: none; }
#hud { position: absolute; inset: 0; pointer-events: none; }
#hud > * { pointer-events: auto; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
h1, h2, h3 { margin: 0; }
h1 { font-size: clamp(40px, 9vw, 84px); font-weight: 900; letter-spacing: 4px; text-shadow: 0 6px 24px rgba(0,0,0,.35); }
h2 { font-size: 20px; font-weight: 900; letter-spacing: .5px; }
h3 { font-size: 12px; font-weight: 900; color: var(--mut); text-transform: uppercase; letter-spacing: 1.4px; }
.mut { color: var(--mut); font-weight: 700; font-size: 13px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 10px; }
.spread { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }

/* ---- buttons: bevelled, chunky ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 14px; background: linear-gradient(180deg, #3a4a74, #2a3659); color: #fff; font-weight: 900; font-size: 14px; letter-spacing: .3px; box-shadow: 0 4px 0 #1b2440, 0 8px 18px rgba(0,0,0,.3); transition: transform .06s, box-shadow .06s, filter .15s; white-space: nowrap; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #1b2440, 0 3px 8px rgba(0,0,0,.3); }
.btn.primary { background: linear-gradient(180deg, #ffd166, #ff9f43); color: #3a2206; box-shadow: 0 4px 0 #b55f1b, 0 10px 24px rgba(255,159,67,.4); }
.btn.primary:active { box-shadow: 0 1px 0 #b55f1b, 0 3px 8px rgba(255,159,67,.3); }
.btn.ok { background: linear-gradient(180deg, #6fe08f, #38b45f); color: #06301a; box-shadow: 0 4px 0 #1f7a3c, 0 8px 18px rgba(90,214,125,.3); }
.btn.ok:active { box-shadow: 0 1px 0 #1f7a3c; }
.btn.danger { background: linear-gradient(180deg, #ff7b7b, #e04848); color: #3a0606; box-shadow: 0 4px 0 #8f2424, 0 8px 18px rgba(255,90,90,.3); }
.btn.danger:active { box-shadow: 0 1px 0 #8f2424; }
.btn.ghost { background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1.5px var(--line2); }
.btn.ghost:active { transform: scale(.97); }
.btn.sm { padding: 7px 12px; font-size: 12px; border-radius: 11px; box-shadow: 0 3px 0 #1b2440; }
.btn.sm.primary { box-shadow: 0 3px 0 #b55f1b; } .btn.sm.ok { box-shadow: 0 3px 0 #1f7a3c; } .btn.sm.danger { box-shadow: 0 3px 0 #8f2424; }
.btn.big { font-size: 24px; padding: 16px 52px; border-radius: 22px; letter-spacing: 2px; }
.btn:disabled { filter: grayscale(.7) brightness(.6); pointer-events: none; }
.btn.icon { width: 42px; height: 42px; padding: 0; border-radius: 50%; font-size: 18px; }
.price { display: inline-flex; align-items: center; gap: 5px; }

/* ---- page chrome ---- */
.page { display: flex; flex-direction: column; gap: 12px; max-width: 1180px; margin: 0 auto; width: 100%; }
.pagehead { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: calc(10px + var(--sat)) 0 10px; background: linear-gradient(180deg, rgba(8,12,30,.98) 70%, rgba(8,12,30,0)); }
.pagehead h2 { text-align: center; font-size: 22px; text-transform: uppercase; letter-spacing: 2px; }
.pagehead .right { display: flex; justify-content: flex-end; gap: 8px; }
.pagesub { text-align: center; color: var(--mut); font-weight: 700; font-size: 13px; margin-top: -4px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: var(--glass); box-shadow: inset 0 0 0 1.5px var(--line2); font-weight: 900; font-size: 13px; backdrop-filter: blur(8px); white-space: nowrap; }
.pill.gold { background: linear-gradient(180deg, rgba(255,209,102,.25), rgba(255,159,67,.15)); box-shadow: inset 0 0 0 1.5px rgba(255,209,102,.6); color: #ffe6a8; }
.pill.sm { padding: 3px 9px; font-size: 11px; }
.card { background: var(--glass); border-radius: var(--r); padding: 14px; box-shadow: inset 0 1.5px 0 rgba(255,255,255,.12), var(--shadow); backdrop-filter: blur(14px); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.card > h3 { display: flex; align-items: center; gap: 8px; }
.card > h3 .n { margin-left: auto; color: var(--txt); opacity: .7; }
.cols { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .cols { grid-template-columns: 1fr 1fr; } .cols.c3 { grid-template-columns: 1fr 1fr 1fr; } .cols.wide { grid-template-columns: minmax(300px, 1fr) 2fr; } }
.rows { display: flex; flex-direction: column; gap: 8px; }
.rowcard { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r2); background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.rowcard.dim { opacity: .55; }
.rowcard .ic { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 12px; background: rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; box-shadow: inset 0 0 0 2px var(--rc, rgba(255,255,255,.15)); font-size: 26px; }
.rowcard .ic canvas, .rowcard .ic .icon { max-width: 38px; max-height: 38px; }
.rowcard .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rowcard .tx b { font-size: 14px; font-weight: 900; }
.rowcard .tx small { color: var(--mut); font-weight: 700; font-size: 12px; }
.rowcard .tx .st { color: var(--ok); font-weight: 900; font-size: 12px; }
.rar { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: 1px; background: var(--rc); color: #061018; }
.rar-common { color: #9aa4b2 } .rar-uncommon { color: #5ad67d } .rar-rare { color: #4aa8ff } .rar-epic { color: #b86bff } .rar-legendary { color: #ffb545 }
.stat { display: flex; justify-content: space-between; align-items: center; font-size: 13px; padding: 6px 10px; border-radius: 10px; background: rgba(255,255,255,.05); }
.stat b { font-weight: 900; } .stat .delta { color: var(--ok); font-weight: 900; font-size: 12px; margin-left: 6px; }
.lvl { display: flex; gap: 3px; } .lvl i { width: 9px; height: 9px; border-radius: 3px; background: rgba(255,255,255,.15); } .lvl i.on { background: var(--acc); box-shadow: 0 0 6px rgba(255,181,69,.6); }
.bar { width: 120px; height: 8px; border-radius: 6px; background: rgba(255,255,255,.15); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--acc2); border-radius: 6px; transition: width .1s linear; }
.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; background: linear-gradient(180deg, var(--gold), var(--gold2)); color: #3a2206; font-weight: 900; font-size: 11px; letter-spacing: 1px; }
.badge.ok { background: linear-gradient(180deg, #6fe08f, #38b45f); color: #06301a; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.hint { color: var(--mut); font-weight: 700; font-size: 12px; text-align: center; }
.toggle { width: 46px; height: 26px; border-radius: 13px; background: rgba(255,255,255,.15); position: relative; } .toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: .15s; } .toggle.on { background: var(--ok); } .toggle.on::after { left: 23px; }
#toasts { position: absolute; top: calc(70px + var(--sat)); left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; z-index: 20; }
.toast { padding: 9px 18px; border-radius: 999px; background: rgba(10,16,36,.9); box-shadow: inset 0 0 0 1.5px var(--line2), var(--shadow); font-weight: 900; font-size: 14px; opacity: 0; transform: translateY(-8px); transition: .25s; }
.toast.in { opacity: 1; transform: none; } .toast.good { background: linear-gradient(180deg, #6fe08f, #38b45f); color: #06301a; box-shadow: var(--shadow); } .toast.bad { background: linear-gradient(180deg, #ff7b7b, #e04848); color: #3a0606; box-shadow: var(--shadow); }

/* ---- hud ---- */
.hud-map { border-radius: 12px; background: rgba(8,14,32,.55); box-shadow: inset 0 0 0 1.5px var(--line2), 0 4px 14px rgba(0,0,0,.3); }
.portrait .hud-map { width: 120px !important; height: 84px !important; }
.hud-top { position: absolute; top: calc(10px + var(--sat)); left: calc(10px + var(--sal)); right: calc(10px + var(--sar)); display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.hud-alt { font-size: 30px; font-weight: 900; line-height: 1; text-shadow: 0 2px 10px rgba(0,0,0,.45); }
#hud-zonename { text-shadow: 0 2px 8px rgba(0,0,0,.45); color: #fff; opacity: .85; }
.hud-alt small { font-size: 13px; color: #dfe6f5; margin-left: 4px; }
.hud-zone { position: absolute; top: 28%; left: 0; right: 0; text-align: center; font-size: clamp(22px, 5vw, 40px); font-weight: 900; letter-spacing: 3px; text-transform: uppercase; opacity: 0; transition: opacity .4s, transform .4s; transform: translateY(10px); text-shadow: 0 4px 16px rgba(0,0,0,.5); }
.hud-zone.show { opacity: 1; transform: none; }
.hud-hint { position: absolute; bottom: calc(26% + var(--sab)); pointer-events: none; left: 0; right: 0; text-align: center; font-weight: 800; opacity: .9; text-shadow: 0 2px 10px rgba(0,0,0,.5); }
.ctl { position: absolute; bottom: calc(18px + var(--sab)); display: flex; gap: 10px; }
.ctl.left { left: calc(14px + var(--sal)); } .ctl.right { right: calc(14px + var(--sar)); }
.ctl button { width: 68px; height: 68px; border-radius: 50%; background: var(--glass); box-shadow: inset 0 0 0 1.5px var(--line2); font-size: 22px; font-weight: 900; backdrop-filter: blur(8px); touch-action: none; }
.ctl button.jet { background: rgba(73,227,255,.22); box-shadow: inset 0 0 0 1.5px rgba(73,227,255,.6); }
.ctl button:active, .ctl button.on { background: rgba(255,255,255,.3); }
.no-touch .ctl { display: none; }
/* floating in-flight stick */
.stick { position: absolute; width: 0; height: 0; pointer-events: none; z-index: 4; }
.stick[hidden] { display: none; }
.stick .ring { position: absolute; left: -62px; top: -62px; width: 124px; height: 124px; border-radius: 50%; background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 2px rgba(255,255,255,.4), 0 6px 20px rgba(0,0,0,.3); backdrop-filter: blur(4px); transition: box-shadow .12s; }
.stick.steer .ring { box-shadow: inset 0 0 0 2px rgba(255,255,255,.75), 0 0 22px rgba(255,255,255,.35); }
.stick .arr { position: absolute; top: -13px; font-size: 20px; font-weight: 900; color: #fff; opacity: .25; transition: opacity .08s; text-shadow: 0 2px 6px rgba(0,0,0,.5); } .stick .arr.l { left: -92px; } .stick .arr.r { left: 72px; }
.stick .knob { position: absolute; left: -24px; top: -24px; width: 48px; height: 48px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #cfd8ea); box-shadow: 0 5px 14px rgba(0,0,0,.45), inset 0 0 0 2px rgba(255,255,255,.8); transition: background .12s; }
.stick.dive .knob { background: radial-gradient(circle at 35% 30%, #bff3ff, var(--acc2)); box-shadow: 0 5px 14px rgba(0,0,0,.45), 0 0 24px rgba(73,227,255,.8); }
.stick .divelbl { position: absolute; top: 70px; left: -40px; width: 80px; text-align: center; font-size: 12px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; color: var(--acc2); opacity: .35; text-shadow: 0 2px 8px rgba(0,0,0,.6); transition: opacity .1s, transform .1s; }
.stick.dive .divelbl { opacity: 1; transform: translateY(4px) scale(1.15); }
.boosts { position: absolute; bottom: calc(16px + var(--sab)); left: 50%; transform: translateX(-50%); display: flex; gap: 8px; padding: 6px; border-radius: 18px; background: rgba(8,14,32,.6); box-shadow: inset 0 0 0 1.5px var(--line2); backdrop-filter: blur(8px); opacity: .35; transition: opacity .2s; touch-action: none; }
.boosts:empty { display: none; } .boosts.active { opacity: 1; }
.boost { position: relative; width: 52px; height: 52px; border-radius: 14px; background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.04)); box-shadow: inset 0 0 0 1.5px var(--line2); display: flex; align-items: center; justify-content: center; }
.boost.empty { opacity: .35; } .boost.off { filter: grayscale(1); opacity: .5; }
.boost .key { position: absolute; top: -6px; left: -6px; width: 18px; height: 18px; border-radius: 50%; background: var(--acc); color: #3a2206; font-size: 11px; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.boost:active { transform: scale(.92); }
.no-touch .boost .key { display: flex; }

/* ---- grids ---- */
.gridwrap { display: inline-flex; flex-direction: column; gap: 6px; max-width: 100%; }
.gridtitle { font-weight: 900; font-size: 11px; color: var(--mut); text-transform: uppercase; letter-spacing: 1.2px; display: flex; align-items: center; gap: 8px; }
.grid { position: relative; background-color: rgba(6, 10, 24, .75); background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: var(--cell) var(--cell); box-shadow: inset 0 0 0 1.5px var(--line2); border-radius: 8px; touch-action: none; }
.grid.boostgrid { background-color: rgba(40, 24, 8, .6); box-shadow: inset 0 0 0 1.5px rgba(255,181,69,.5); }
.item { position: absolute; display: flex; align-items: center; justify-content: center; background: linear-gradient(180deg, color-mix(in srgb, var(--rc, #999) 28%, #0e1530), color-mix(in srgb, var(--rc, #999) 8%, #0e1530)); box-shadow: inset 0 0 0 2px var(--rc, #999); border-radius: 7px; cursor: grab; overflow: hidden; }
.item.sel { box-shadow: inset 0 0 0 3px #fff, 0 0 14px rgba(255,255,255,.4); z-index: 2; }
.item.dragging { opacity: .3; }
.item.into { box-shadow: inset 0 0 0 3px var(--ok), 0 0 16px rgba(90,214,125,.9); transform: scale(1.06); z-index: 3; }
.item.broken { filter: grayscale(.9) brightness(.6); }
.item .glyph { display: flex; align-items: center; justify-content: center; border-radius: 8px; color: #fff; }
.item .dur { position: absolute; left: 4px; right: 4px; bottom: 3px; height: 4px; border-radius: 2px; background: rgba(0,0,0,.5); }
.item .dur b { display: block; height: 100%; border-radius: 2px; background: var(--ok); } .item .dur.low b { background: var(--acc); } .item .dur.dead b { background: var(--bad); }
.dragghost { position: fixed; z-index: 50; pointer-events: none; opacity: .92; transform: scale(1.08); box-shadow: 0 14px 30px rgba(0,0,0,.6); }
.hl { position: absolute; border-radius: 6px; pointer-events: none; } .hl.ok { background: rgba(90,214,125,.4); } .hl.bad { background: rgba(255,90,90,.4); }
.gridscroll { overflow: auto; max-height: 62vh; padding: 4px; }
.badge-n { position: absolute; right: 3px; bottom: 3px; font-size: 10px; font-weight: 900; background: rgba(0,0,0,.65); border-radius: 6px; padding: 1px 5px; }
.item.container { box-shadow: inset 0 0 0 2px var(--rc, #999), inset 0 0 0 4px rgba(0,0,0,.5); }
/* item sheet: the action strip for whatever is selected */
.sheet:empty { display: none; }
.sheet { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; min-height: 60px; padding: 10px 12px; border-radius: var(--r2); background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--line); }
.sheet .ic { width: 48px; height: 48px; border-radius: 12px; background: rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; box-shadow: inset 0 0 0 2px var(--rc, rgba(255,255,255,.15)); }
.sheet .tx { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 140px; }
.sheet .tx b { font-size: 15px; font-weight: 900; } .sheet .tx small { color: var(--mut); font-weight: 700; } .sheet .tx .st { color: var(--ok); font-weight: 900; font-size: 12px; }
.sheet .acts { display: flex; gap: 6px; flex-wrap: wrap; }
/* equipment slots */
.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.slot { position: relative; aspect-ratio: 1; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10px; color: var(--mut); font-weight: 900; text-transform: uppercase; letter-spacing: .5px; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 2px var(--line); cursor: pointer; overflow: hidden; }
.slot .big { font-size: 20px; color: var(--line2); }
.slot.filled { background: linear-gradient(180deg, color-mix(in srgb, var(--rc, #fff) 22%, #0e1530), #0e1530); box-shadow: inset 0 0 0 2px var(--rc, var(--acc)); color: #fff; }
.slot.filled span { font-size: 9px; text-transform: none; letter-spacing: 0; max-width: 95%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot.can { box-shadow: inset 0 0 0 2px var(--ok), 0 0 0 3px rgba(90,214,125,.3), 0 0 22px rgba(90,214,125,.7); animation: slotpulse 1s ease-in-out infinite; }
.slot.over { background: rgba(90,214,125,.35); transform: scale(1.07); }
@keyframes slotpulse { 50% { box-shadow: inset 0 0 0 2px var(--ok), 0 0 0 5px rgba(90,214,125,.45), 0 0 30px rgba(90,214,125,.9); } }
.slot canvas, .slot .icon { max-width: 64%; max-height: 52%; }
.slot .dur { position: absolute; left: 6px; right: 6px; bottom: 4px; height: 4px; border-radius: 2px; background: rgba(0,0,0,.5); } .slot .dur b { display: block; height: 100%; border-radius: 2px; background: var(--ok); } .slot .dur.low b { background: var(--acc); } .slot .dur.dead b { background: var(--bad); }
.slot.broken { filter: saturate(.3); } .slot.broken::after { content: 'BROKEN'; position: absolute; top: 4px; right: 4px; font-size: 8px; color: var(--bad); }
/* cards grid (characters, houses) */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.pick { text-align: center; align-items: center; cursor: pointer; position: relative; }
.pick.on { box-shadow: inset 0 0 0 3px var(--acc), var(--shadow); }
.pick canvas { height: 110px; width: auto; max-width: 100%; object-fit: contain; }
.pick .emoji { font-size: 48px; line-height: 1; }
.statbar { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--mut); font-weight: 800; width: 100%; }
.statbar i { flex: 1; height: 6px; background: rgba(255,255,255,.12); border-radius: 4px; overflow: hidden; } .statbar i b { display: block; height: 100%; background: var(--acc); }
.bigalt { font-size: clamp(36px, 8vw, 64px); font-weight: 900; line-height: 1; }
.gained { display: flex; gap: 6px; overflow-x: auto; padding: 6px 2px; max-width: 100%; }
.gained .g { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 3px; width: 66px; font-size: 10px; font-weight: 800; text-align: center; }
.gained .g .ic { width: 46px; height: 46px; border-radius: 12px; background: rgba(0,0,0,.35); box-shadow: inset 0 0 0 2px var(--rc); display: flex; align-items: center; justify-content: center; }
.gained .g.lost { opacity: .6; } .gained .g.lost span { color: var(--bad); text-decoration: line-through; }
.carry { display: flex; flex-direction: column; gap: 10px; }
/* results: every grid in one wrapping row; actions pinned to the bottom so nothing needs a scroll */
.page.results { gap: 8px; }
.page.results .pagehead { padding-bottom: 4px; }
.page.results .results-head { gap: 14px; } .page.results .bigalt { font-size: clamp(28px, 5vw, 44px); } .page.results .results-head .k b { font-size: 18px; }
.page.results .results-head .gained { padding: 0 2px; margin-left: 6px; } .page.results .gained .g { width: 56px; } .page.results .gained .g .ic { width: 38px; height: 38px; }
.card.tight { padding: 10px 12px; gap: 8px; }
.gridrow { align-items: flex-start; justify-content: center; gap: 8px 14px; }
.footbar { position: sticky; bottom: 0; z-index: 5; display: flex; flex-direction: column; gap: 8px; margin-top: auto; padding: 8px 0 calc(6px + var(--sab)); background: linear-gradient(0deg, rgba(8,12,30,.98) 70%, rgba(8,12,30,0)); }
.footbar .sheet { padding: 8px 12px; min-height: 0; background: var(--glass); box-shadow: inset 0 0 0 1.5px var(--line2), var(--shadow); backdrop-filter: blur(14px); }
.btn.fling2 { font-size: 18px; padding: 12px 34px; border-radius: 18px; letter-spacing: 1.5px; }
.codex { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.codex .c { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border-radius: 12px; background: rgba(255,255,255,.05); font-size: 11px; font-weight: 800; text-align: center; box-shadow: inset 0 0 0 2px var(--rc, transparent); }
.codex .c.undisc { opacity: .4; filter: grayscale(1); box-shadow: none; }
.results-head { display: flex; align-items: flex-end; justify-content: center; gap: 18px; flex-wrap: wrap; text-align: center; }
.results-head .k { display: flex; flex-direction: column; align-items: center; gap: 2px; } .results-head .k b { font-size: 22px; } .results-head .k small { color: var(--mut); font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
@media (max-width: 520px) { .btn.big { font-size: 20px; padding: 14px 36px; } .pagehead h2 { font-size: 17px; letter-spacing: 1px; } }

/* ---------- hub (mobile-game layout) ---------- */
.hub { position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden; padding: calc(8px + var(--sat)) calc(8px + var(--sar)) calc(8px + var(--sab)) calc(8px + var(--sal)); isolation: isolate; }
#screen:has(> .hub) { background: transparent; padding: 0; }
.hubbg { position: absolute; inset: 0; z-index: 0; background: #6fc3ff center / cover no-repeat; }
.hubvid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .45s linear; }
.hubvid.on { opacity: 1; }
.hubtop, .hubmid, .hubbar { position: relative; z-index: 1; }
.hubtop { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.lvlpill { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--glass); box-shadow: inset 0 0 0 1.5px var(--line2); backdrop-filter: blur(8px); }
.lvlpill > b { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(180deg, #7cefff, #22b8d6); color: #042; display: flex; align-items: center; justify-content: center; font-size: 14px; box-shadow: 0 2px 0 #0d7a90; }
.ranklbl { font-size: 11px; font-weight: 900; color: #fff; line-height: 1.1; margin-bottom: 3px; } .nextrank { font-weight: 700; color: var(--acc); } .portrait .nextrank, .phone .nextrank { display: none; }
.hubmid { flex: 1; display: flex; justify-content: space-between; align-items: stretch; gap: 8px; min-height: 0; }
.side { display: flex; flex-direction: column; justify-content: center; gap: 10px; width: 64px; }
.rounds { display: flex; flex-direction: column; gap: 8px; }
.round { position: relative; width: 58px; height: 58px; border-radius: 50%; background: linear-gradient(180deg, rgba(40,56,100,.9), rgba(16,24,50,.9)); box-shadow: inset 0 0 0 2px rgba(255,255,255,.22), 0 4px 0 rgba(0,0,0,.35), 0 8px 16px rgba(0,0,0,.3); backdrop-filter: blur(8px); display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; }
.round .ico { font-size: 22px; line-height: 1; } .round .lbl { font-size: 8px; font-weight: 900; letter-spacing: .3px; margin-top: 2px; white-space: nowrap; }
.round.sm { width: 38px; height: 38px; font-size: 18px; } .round.sm .lbl { display: none; }
.round.soon { opacity: .5; } .round:active { transform: translateY(2px); box-shadow: inset 0 0 0 2px rgba(255,255,255,.22), 0 1px 0 rgba(0,0,0,.35); }
.sidepanel { display: none; }
.hubhero { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 10px; padding-bottom: 6px; min-width: 0; }
.hubhero h1 { color: #fff; font-size: clamp(34px, 8vw, 72px); }
.herocard { display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 18px; background: var(--glass); box-shadow: inset 0 0 0 1.5px var(--line2), var(--shadow); backdrop-filter: blur(10px); color: #fff; text-align: left; }
.herocard canvas { height: 54px; width: auto; } .herocard small { font-size: 11px; }
.hubbar { display: flex; align-items: flex-end; justify-content: center; gap: 6px; padding: 6px; border-radius: 22px; background: rgba(8, 14, 32, .82); box-shadow: inset 0 0 0 1.5px var(--line2), var(--shadow); backdrop-filter: blur(14px); }
.tab { position: relative; flex: 1; max-width: 120px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 14px; color: #dfe6f5; font-weight: 900; font-size: 11px; }
.tab .ico { font-size: 24px; line-height: 1; } .tab:active { background: rgba(255,255,255,.1); }
.fling { flex: 1.4; max-width: 190px; display: flex; flex-direction: column; align-items: center; justify-content: center; margin: -22px 4px 0; padding: 14px 8px 10px; border-radius: 20px; background: linear-gradient(180deg, #ffd166, #ff9f43); color: #3a2206; font-weight: 900; font-size: 24px; letter-spacing: 2px; box-shadow: 0 5px 0 #b55f1b, 0 12px 28px rgba(255,159,67,.45); }
.fling small { font-size: 10px; letter-spacing: 0; opacity: .8; font-weight: 800; } .fling:active { transform: translateY(3px); box-shadow: 0 2px 0 #b55f1b; }
.nbadge { position: absolute; top: -5px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 10px; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 0 #8f2424; }
@media (min-width: 1000px) and (orientation: landscape) {
  .side { width: 280px; justify-content: center; gap: 12px; }
  .rounds { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .sidepanel { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 18px; background: var(--glass); box-shadow: inset 0 0 0 1.5px var(--line2), var(--shadow); backdrop-filter: blur(12px); }
  .mrow { padding: 6px 8px; border-radius: 10px; background: rgba(255,255,255,.06); display: flex; flex-direction: column; gap: 4px; }
  .peek { width: 38px; height: 38px; border-radius: 8px; box-shadow: inset 0 0 0 2px var(--rc, #fff); background: rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; }
  .hubhero h1 { font-size: 84px; } .herocard canvas { height: 72px; }
  .hubbar { max-width: 760px; align-self: center; width: 100%; }
}
.portrait .side { width: 56px; } .portrait .round { width: 50px; height: 50px; } .portrait .round .ico { font-size: 19px; } .portrait .round .lbl { font-size: 7px; }
.portrait .hubhero h1 { font-size: 42px; }
.portrait .hubtop .pill:not(.gold) { display: none; }
.portrait .lvlpill .bar { width: 80px !important; }
@media (max-height: 440px) and (orientation: landscape) {
  .hub { padding-top: calc(4px + var(--sat)); padding-bottom: calc(4px + var(--sab)); }
  .side { width: 48px; gap: 4px; } .rounds { gap: 4px; }
  .round { width: 40px; height: 40px; } .round .ico { font-size: 17px; } .round .lbl { display: none; }
  .hubhero { gap: 4px; padding-bottom: 2px; } .hubhero h1 { font-size: 26px; letter-spacing: 2px; }
  .herocard { padding: 3px 10px 3px 4px; gap: 6px; } .herocard canvas { height: 36px; } .herocard small { display: none; }
  .hubbar { padding: 3px 6px; border-radius: 16px; } .tab { padding: 4px 2px; font-size: 10px; } .tab .ico { font-size: 18px; }
  .fling { margin-top: -10px; padding: 8px 6px 6px; font-size: 18px; } .fling small { display: none; }
  .hubtop .pill, .lvlpill { padding: 3px 8px; font-size: 12px; } .lvlpill > b { width: 22px; height: 22px; font-size: 11px; } .lvlpill .bar { width: 70px !important; } .ranklbl { font-size: 10px; }
}
/* touch: lift the boost bar above the thumb controls */
#hud:not(.no-touch) .boosts { bottom: calc(100px + var(--sab)); }
.portrait .boost { width: 46px; height: 46px; }

/* ---- juice: count-up pop, flying coins, confetti, hero speech bubble ---- */
.pop { animation: pop .3s ease-out; } @keyframes pop { 40% { transform: scale(1.18); } }
.bump { animation: bump .35s ease-out; } @keyframes bump { 30% { transform: scale(1.14); } }
.flycoin { position: fixed; left: 0; top: 0; z-index: 30; pointer-events: none; font-size: 20px; line-height: 1; margin: -10px 0 0 -10px; will-change: transform; filter: drop-shadow(0 2px 4px rgba(0,0,0,.4)); }
.confetti { position: fixed; top: 0; z-index: 30; pointer-events: none; border-radius: 2px; will-change: transform; }
.bubble { position: relative; max-width: 220px; padding: 8px 12px; border-radius: 14px; background: #fff; color: #1a2240; font-size: 13px; font-weight: 800; box-shadow: var(--shadow); animation: bubblein .4s cubic-bezier(.2,1.4,.4,1); }
.bubble::after { content: ''; position: absolute; left: 18px; bottom: -8px; border: 8px solid transparent; border-top-color: #fff; border-bottom: 0; }
@keyframes bubblein { from { transform: translateY(8px) scale(.8); opacity: 0; } }
.herowrap { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.gifttrack { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.gift { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border-radius: 12px; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1.5px var(--line); font-size: 11px; font-weight: 800; text-align: center; min-width: 0; }
.gift .ico { font-size: 22px; } .gift.done { opacity: .5; } .gift.done .ico::after { content: ' ✓'; color: var(--ok); font-size: 14px; }
.gift.today { box-shadow: inset 0 0 0 2px var(--acc), 0 0 18px rgba(255,181,69,.5); background: rgba(255,181,69,.12); }
.dailyhero { display: flex; align-items: center; gap: 14px; } .dailyhero .big { font-size: 44px; line-height: 1; }

/* ---- daily sky + daily gift flair ---- */
.dcard { gap: 12px; }
.dbanner { position: relative; overflow: hidden; display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 16px; background: linear-gradient(120deg, var(--c1), var(--c2)); box-shadow: inset 0 1.5px 0 rgba(255,255,255,.35), 0 10px 30px color-mix(in srgb, var(--c2) 45%, transparent); color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.35); min-height: 130px; }
.dbanner::before { content: ''; position: absolute; inset: -50%; background: conic-gradient(from 0deg, transparent 0 70%, rgba(255,255,255,.25) 80%, transparent 90%); animation: sweep 7s linear infinite; pointer-events: none; }
@keyframes sweep { to { transform: rotate(360deg); } }
.dbits { position: absolute; inset: 0; pointer-events: none; overflow: hidden; } .dbits span { position: absolute; bottom: -30px; opacity: .55; animation: rise linear infinite; filter: drop-shadow(0 2px 4px rgba(0,0,0,.3)); }
@keyframes rise { from { transform: translateY(0) rotate(0); } to { transform: translateY(-220px) rotate(40deg); opacity: 0; } }
.dicon { position: relative; font-size: 64px; line-height: 1; animation: bob 2.4s ease-in-out infinite; filter: drop-shadow(0 8px 14px rgba(0,0,0,.35)); }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-6deg); } }
.dtitle { position: relative; display: flex; flex-direction: column; gap: 4px; min-width: 0; } .dtitle small { font-size: 11px; font-weight: 900; letter-spacing: 2px; opacity: .85; } .dtitle h2 { font-size: 28px; letter-spacing: .5px; } .dblurb { font-weight: 800; font-size: 14px; opacity: .95; }
.dchip { background: rgba(0,0,0,.28); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.4); color: #fff; }
.dstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; flex: 1; }
.dbottom { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; } .dbottom > .row { flex: 1; min-width: 260px; }
.dstat { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px; border-radius: 12px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--line); } .dstat b { font-size: 26px; } .dstat small { color: var(--mut); font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
.dstat.lit { box-shadow: inset 0 0 0 2px var(--acc), 0 0 18px rgba(255,181,69,.35); } .dstat.lit b { color: var(--gold); }
.dchar canvas { height: 96px; width: auto; animation: bob 2.8s ease-in-out infinite; filter: drop-shadow(0 8px 12px rgba(0,0,0,.4)); }
.btn.shine { position: relative; overflow: hidden; animation: pulse 1.6s ease-in-out infinite; } .btn.shine::after { content: ''; position: absolute; top: -50%; bottom: -50%; left: -30%; width: 30%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent); transform: skewX(-20deg); animation: shine 2.4s ease-in-out infinite; }
@keyframes shine { 0%, 60% { left: -30%; } 100% { left: 130%; } } @keyframes pulse { 50% { box-shadow: 0 4px 0 #b55f1b, 0 0 0 8px rgba(255,181,69,.18), 0 10px 24px rgba(255,159,67,.5); } }
.btn.shine:disabled { animation: none; } .btn.shine:disabled::after { display: none; }
.dweek { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.dday { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; border-radius: 12px; background: linear-gradient(180deg, color-mix(in srgb, var(--c1) 35%, #0e1530), color-mix(in srgb, var(--c2) 25%, #0e1530)); box-shadow: inset 0 0 0 1px var(--line); font-size: 10px; font-weight: 800; min-width: 0; opacity: .75; }
.dday .ico { font-size: 22px; } .dday small { color: var(--mut); font-size: 9px; } .dday.flown { opacity: 1; } .dday.flown small { color: var(--ok); } .dday.today { opacity: 1; box-shadow: inset 0 0 0 2px var(--acc), 0 0 16px rgba(255,181,69,.45); transform: scale(1.06); }
/* gift */
.gbanner { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-radius: 14px; background: linear-gradient(120deg, #ffd166, #ff6f91); color: #3a2206; box-shadow: inset 0 1.5px 0 rgba(255,255,255,.5), 0 8px 24px rgba(255,120,150,.35); } .gbanner h2 { font-size: 22px; } .gbanner .hint { color: #5a3a10; }
.gifttrack { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.gift { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px 8px; border-radius: 14px; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1.5px var(--line); font-size: 11px; font-weight: 800; text-align: center; min-width: 0; animation: giftin .5s cubic-bezier(.2,1.4,.4,1) backwards; animation-delay: var(--d); }
@keyframes giftin { from { transform: translateY(14px) scale(.8); opacity: 0; } } .gift.still { animation: none; }
.gift.done { opacity: .55; } .gift.today { box-shadow: inset 0 0 0 2px var(--acc), 0 0 22px rgba(255,181,69,.55); background: rgba(255,181,69,.12); transform: scale(1.08); }
.gift.today .chest { animation: wobble 1.2s ease-in-out infinite; } @keyframes wobble { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-7deg) translateY(-2px); } 40% { transform: rotate(6deg); } 60% { transform: rotate(-4deg); } 80% { transform: rotate(3deg); } }
.gift.popping { animation: popgift .5s ease-out; } @keyframes popgift { 30% { transform: scale(1.3); } 100% { transform: scale(1.08); } }
.chest { position: relative; width: 44px; height: 38px; }
.chest .box { position: absolute; left: 0; right: 0; bottom: 0; height: 24px; border-radius: 4px 4px 7px 7px; background: linear-gradient(180deg, #b5733a, #7a4a20); box-shadow: inset 0 0 0 2px #5a3414, inset 0 -3px 0 rgba(0,0,0,.25); }
.chest .box::after { content: ''; position: absolute; left: 50%; top: 2px; width: 10px; height: 10px; margin-left: -5px; border-radius: 3px; background: #ffd166; box-shadow: inset 0 0 0 2px #b5731b; }
.chest .lid { position: absolute; left: -2px; right: -2px; top: 2px; height: 16px; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, #d08a47, #9a5c2a); box-shadow: inset 0 0 0 2px #5a3414; transform-origin: 50% 100%; transition: transform .35s cubic-bezier(.3,1.5,.5,1); z-index: 1; }
.chest .glow { position: absolute; inset: 4px; border-radius: 50%; background: radial-gradient(circle, rgba(255,230,120,.9), rgba(255,230,120,0) 70%); opacity: 0; transition: opacity .3s; }
.chest.open .lid { transform: rotateX(-110deg) translateY(-4px); } .chest.open .glow { opacity: 1; animation: glowpulse 1s ease-in-out infinite; } @keyframes glowpulse { 50% { transform: scale(1.3); } }
.chest.gold .box { background: linear-gradient(180deg, #ffd166, #c98a1b); box-shadow: inset 0 0 0 2px #8a5a0a; } .chest.gold .lid { background: linear-gradient(180deg, #ffe39a, #e0a52f); box-shadow: inset 0 0 0 2px #8a5a0a; }
.flame { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--line); } .flame .fire { font-size: 30px; filter: grayscale(1); opacity: .4; } .flame small { color: var(--mut); font-weight: 700; display: block; }
.flame.lit .fire { filter: none; opacity: 1; animation: flicker .5s ease-in-out infinite alternate; } @keyframes flicker { from { transform: scale(1) rotate(-3deg); } to { transform: scale(1.12) rotate(3deg); } }
.lootfly { position: fixed; left: 0; top: 0; z-index: 30; pointer-events: none; margin: -32px 0 0 -32px; will-change: transform; filter: drop-shadow(0 4px 8px rgba(0,0,0,.45)); }
/* hub: today's sky tile glows until flown */
.round.daily { box-shadow: inset 0 0 0 2px var(--acc), 0 4px 0 rgba(0,0,0,.35), 0 0 18px rgba(255,181,69,.55); animation: pulse2 1.8s ease-in-out infinite; } @keyframes pulse2 { 50% { box-shadow: inset 0 0 0 2px var(--acc), 0 4px 0 rgba(0,0,0,.35), 0 0 28px rgba(255,181,69,.9); } }

/* ---- UI pass: card entrances, section accents, rarity edges, locks, mastery ---- */
.cols > .col > .card, .cards > .card, .page > .card { animation: cardin .45s cubic-bezier(.2,1.1,.4,1) backwards; }
.cols > .col > .card:nth-child(2), .cards > .card:nth-child(2) { animation-delay: .05s; } .cols > .col > .card:nth-child(3), .cards > .card:nth-child(3) { animation-delay: .1s; } .cards > .card:nth-child(4) { animation-delay: .15s; } .cards > .card:nth-child(5) { animation-delay: .2s; } .cards > .card:nth-child(n+6) { animation-delay: .25s; }
@keyframes cardin { from { transform: translateY(12px) scale(.98); opacity: 0; } }
.card > h3::before { content: ''; display: inline-block; width: 4px; height: 13px; border-radius: 2px; background: linear-gradient(180deg, var(--gold), var(--gold2)); margin-right: 2px; }
.pagehead h2 { background: linear-gradient(180deg, #fff, #c9d4ea); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rowcard { box-shadow: inset 3px 0 0 var(--rc, transparent), inset 0 0 0 1px var(--line); transition: transform .12s, box-shadow .12s; }
.rowcard:hover { transform: translateX(2px); box-shadow: inset 3px 0 0 var(--rc, var(--line2)), inset 0 0 0 1px var(--line2); }
.rowcard .ic { box-shadow: inset 0 0 0 2px var(--rc, rgba(255,255,255,.15)); }
.rowcard.locked, .card.locked { filter: saturate(.4); opacity: .65; } .rowcard.locked:hover { transform: none; }
.pill.lock { background: rgba(0,0,0,.35); box-shadow: inset 0 0 0 1.5px var(--acc); color: var(--acc); white-space: nowrap; }
.pick { transition: transform .15s, box-shadow .15s; } .pick:hover { transform: translateY(-3px); } .pick.on { box-shadow: inset 0 0 0 3px var(--acc), 0 0 24px rgba(255,181,69,.45), var(--shadow); }
.pick .rar { text-transform: uppercase; font-size: 10px; letter-spacing: 1px; font-weight: 900; color: #061018; }
.mastery { width: 100%; display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 900; color: var(--gold); } .mastery i { flex: 1; height: 6px; border-radius: 4px; background: rgba(255,255,255,.12); overflow: hidden; } .mastery i b { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold2)); } .mastery small { color: var(--mut); font-weight: 800; }
.btn.primary:not(:disabled):hover { filter: brightness(1.08); } .btn:not(:disabled):hover { filter: brightness(1.06); }
.slot.filled { animation: slotin .3s ease-out; } @keyframes slotin { from { transform: scale(.85); } }
.results-head .badge { animation: pop .5s ease-out; }
.hubbar .tab:hover .ico { transform: translateY(-2px); } .tab .ico { transition: transform .12s; }

/* ---- pick-up rules ---- */
.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.preset { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1.5px var(--line); text-align: left; color: var(--txt); transition: transform .1s, box-shadow .1s; }
.preset .pi { font-size: 22px; line-height: 1; margin-bottom: 4px; } .preset b { font-size: 14px; } .preset small { color: var(--mut); font-weight: 700; font-size: 11px; line-height: 1.25; }
.preset:hover { transform: translateY(-2px); } .preset.on { background: rgba(90,214,125,.14); box-shadow: inset 0 0 0 2px var(--ok), 0 0 16px rgba(90,214,125,.3); }
.lootgrid { display: grid; grid-template-columns: 1fr; gap: 10px; } @media (min-width: 900px) { .lootgrid { grid-template-columns: 1fr 1fr; } }
.lootcard { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.lootcard.off { background: rgba(255,90,90,.06); box-shadow: inset 0 0 0 1px rgba(255,90,90,.35); }
.lhead { display: flex; align-items: center; gap: 10px; } .lhead .ic { width: 40px; height: 40px; border-radius: 10px; background: rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; font-size: 20px; flex: 0 0 auto; }
.lhead .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; } .lhead .tx b { font-size: 15px; } .lhead .tx small { color: var(--mut); font-weight: 700; font-size: 11px; }
.lstatus { padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 900; white-space: nowrap; color: #fff; background: color-mix(in srgb, var(--rc, #fff) 30%, #0e1530); box-shadow: inset 0 0 0 1.5px var(--rc, #fff); }
.lstatus.off { --rc: var(--bad); color: #ffb3b3; }
.lootcard .ex { width: 28px; height: 28px; border-radius: 8px; background: rgba(0,0,0,.35); box-shadow: inset 0 0 0 1.5px var(--rc); display: flex; align-items: center; justify-content: center; }
.segbar { display: flex; gap: 3px; }
.seg { flex: 1; min-width: 0; padding: 9px 2px; font-size: 11px; font-weight: 900; text-transform: capitalize; color: var(--mut); background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1.5px var(--line); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: background .1s, color .1s, transform .1s; }
.seg:first-child { border-radius: 10px 4px 4px 10px; } .seg:nth-last-child(2) { border-radius: 4px 10px 10px 4px; }
.seg.on { color: #fff; background: color-mix(in srgb, var(--rc) 55%, #0e1530); box-shadow: inset 0 0 0 1.5px var(--rc); text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.seg.first { box-shadow: inset 0 0 0 2px #fff, 0 0 10px color-mix(in srgb, var(--rc) 60%, transparent); }
.seg.skip { flex: 0 0 auto; padding: 9px 12px; border-radius: 10px; margin-left: 4px; --rc: var(--bad); } .seg.skip.on { background: rgba(255,90,90,.35); box-shadow: inset 0 0 0 1.5px var(--bad); color: #fff; }
.seg:active { transform: scale(.95); }
.seg .short { display: none; }
@media (max-width: 600px) { .seg { font-size: 11px; padding: 10px 1px; } .seg .full { display: none; } .seg .short { display: inline; } .seg.skip { padding: 10px 8px; } .lhead .tx small { display: none; } }

/* ---- locker ---- */
.lockergrid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.lockercard { gap: 8px; } .lockercard.picking { box-shadow: inset 0 0 0 2px var(--acc), var(--shadow); } .lockercard.locked { opacity: .55; filter: saturate(.3); }
.lname { font-weight: 900; font-size: 14px; color: var(--txt); padding: 2px 0; text-align: left; } .lname:hover { color: var(--gold); }
.lslots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.lslot { position: relative; aspect-ratio: 1; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 9px; color: var(--mut); font-weight: 900; text-transform: uppercase; letter-spacing: .4px; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 2px var(--line); overflow: hidden; }
.lslot .big { font-size: 18px; color: var(--line2); }
.lslot.filled { background: linear-gradient(180deg, color-mix(in srgb, var(--rc, #fff) 22%, #0e1530), #0e1530); box-shadow: inset 0 0 0 2px var(--rc, var(--acc)); color: #fff; }
.lslot.filled span { font-size: 8px; text-transform: none; letter-spacing: 0; max-width: 95%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lslot canvas, .lslot .icon { max-width: 60%; max-height: 50%; }
.lslot .dur { position: absolute; left: 5px; right: 5px; bottom: 3px; height: 3px; border-radius: 2px; background: rgba(0,0,0,.5); } .lslot .dur b { display: block; height: 100%; border-radius: 2px; background: var(--ok); } .lslot .dur.low b { background: var(--acc); } .lslot .dur.dead b { background: var(--bad); }
/* ---- story ---- */
.storycard { gap: 14px; }
.chapter { display: flex; flex-direction: column; gap: 8px; } .chapter.past { padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--line); }
.chhead { display: flex; align-items: center; gap: 10px; } .chno { font-size: 30px; line-height: 1; filter: drop-shadow(0 4px 8px rgba(0,0,0,.4)); } .chhead .tx { flex: 1; display: flex; flex-direction: column; } .chhead small { color: var(--mut); font-weight: 900; font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; } .chhead b { font-size: 20px; }
.chapter.open .chhead b { font-size: 26px; background: linear-gradient(180deg, #fff, #ffd166); -webkit-background-clip: text; background-clip: text; color: transparent; }
p.story { margin: 0; font-size: 14px; line-height: 1.5; font-weight: 600; color: #e6ecf8; } p.story.dim { color: var(--mut); font-size: 13px; }
.lines { display: flex; flex-direction: column; gap: 6px; } .line { display: flex; gap: 8px; align-items: baseline; padding: 8px 12px; border-radius: 12px; background: rgba(255,255,255,.06); font-size: 13px; font-weight: 600; } .line b { color: var(--gold); white-space: nowrap; } .line.you { background: rgba(73,227,255,.1); } .line.you b { color: var(--acc2); }
.reward { font-size: 12px; font-weight: 800; color: var(--ok); }
.objective { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px; border-radius: 14px; background: rgba(255,181,69,.08); box-shadow: inset 0 0 0 1.5px rgba(255,181,69,.4); text-align: center; } .objective > b { font-size: 16px; }
.steps { display: flex; gap: 6px; } .stepdot { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 900; background: rgba(255,255,255,.08); color: var(--mut); box-shadow: inset 0 0 0 1.5px var(--line); }
.stepdot.done { background: var(--ok); color: #06301a; box-shadow: none; } .stepdot.now { background: var(--acc); color: #3a2206; box-shadow: 0 0 12px rgba(255,181,69,.7); animation: pulse3 1.4s ease-in-out infinite; } @keyframes pulse3 { 50% { transform: scale(1.12); } }
.waitring { width: 72px; height: 72px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 30px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 3px var(--line2); animation: spinslow 6s linear infinite; } .waitring.ready { animation: none; box-shadow: inset 0 0 0 3px var(--ok), 0 0 20px rgba(90,214,125,.6); }
@keyframes spinslow { to { transform: rotate(360deg); } } .timer { font-size: 26px; font-variant-numeric: tabular-nums; }
.storyprog { display: flex; flex-direction: column; gap: 4px; align-items: center; padding: 0 4px; }
.slot.sel { box-shadow: inset 0 0 0 3px #fff, 0 0 14px rgba(255,255,255,.4); }
.sheet .tx .dir { font-size: 12px; font-weight: 800; color: var(--acc2); }

/* ---- wayfinding: ? marks, glow target, note ---- */
.qmark { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 6px; border-radius: 10px; background: var(--acc); color: #3a2206; font-size: 12px; font-weight: 900; box-shadow: 0 2px 0 #b55f1b; vertical-align: middle; animation: qpulse 1.6s ease-in-out infinite; white-space: nowrap; }
@keyframes qpulse { 50% { box-shadow: 0 2px 0 #b55f1b, 0 0 0 5px rgba(255,181,69,.25); } } .qmark:active { transform: translateY(1px); }
.pill.short { box-shadow: inset 0 0 0 1.5px var(--bad); color: #ffb3b3; }
.guide-glow { position: relative; z-index: 6; outline: 3px solid var(--acc); outline-offset: 2px; border-radius: 14px; animation: guidepulse 1s ease-in-out infinite; }
@keyframes guidepulse { 0%, 100% { box-shadow: 0 0 0 6px rgba(255,181,69,.22), 0 0 28px rgba(255,181,69,.75); } 50% { box-shadow: 0 0 0 12px rgba(255,181,69,.08), 0 0 40px rgba(255,181,69,.95); } }
.guidetip { position: fixed; z-index: 40; max-width: min(320px, 90vw); padding: 10px 14px; border-radius: 14px; background: #fff; color: #1a2240; font-size: 13px; font-weight: 800; line-height: 1.35; box-shadow: 0 10px 30px rgba(0,0,0,.45); animation: bubblein .35s cubic-bezier(.2,1.4,.4,1); pointer-events: none; }
.guidetip::after { content: ''; position: absolute; left: 50%; bottom: -8px; margin-left: -8px; border: 8px solid transparent; border-top-color: #fff; border-bottom: 0; } .guidetip.below::after { bottom: auto; top: -8px; border-top: 0; border-bottom: 8px solid #fff; }
.guidetip .q { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 10px; background: var(--acc); color: #3a2206; margin-right: 8px; font-size: 12px; }
.rowcard { flex-wrap: wrap; } .rowcard .tx { flex: 1 1 160px; min-width: 0; } .rowcard > .col, .rowcard > .row { max-width: 100%; }

/* ---- trophies: medallions, the wall, the unlock pop ---- */
.medal { --mpx: 56px; position: relative; width: var(--mpx); height: var(--mpx); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; background: radial-gradient(circle at 35% 30%, var(--m1), var(--m2) 55%, var(--m3)); box-shadow: inset 0 0 0 3px var(--m3), inset 0 0 0 5px var(--m1), 0 4px 0 var(--m3), 0 8px 18px rgba(0,0,0,.4); }
.medal::before { content: ''; position: absolute; inset: 8%; border-radius: 50%; border: 1.5px dashed rgba(255,255,255,.35); pointer-events: none; }
.medal .mi { font-size: calc(var(--mpx) * .5); line-height: 1; filter: drop-shadow(0 2px 3px rgba(0,0,0,.45)); display: flex; align-items: center; justify-content: center; }
.medal.bronze { --m1: #f0b58a; --m2: #b5702f; --m3: #6e3d12; } .medal.silver { --m1: #ffffff; --m2: #b7c4d6; --m3: #5c6b80; } .medal.gold { --m1: #fff2a8; --m2: #f5c02a; --m3: #9a6300; }
.medal.legend { --m1: #ffe9ff; --m2: #c86bff; --m3: #4a1a8a; box-shadow: inset 0 0 0 3px var(--m3), inset 0 0 0 5px var(--m1), 0 4px 0 var(--m3), 0 0 22px rgba(200,107,255,.7); overflow: hidden; }
.medal.legend::after { content: ''; position: absolute; top: -60%; bottom: -60%; left: -40%; width: 35%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.7), transparent); transform: skewX(-20deg); animation: shine 2.2s ease-in-out infinite; }
.tbanner { position: relative; overflow: hidden; display: flex; align-items: center; gap: 18px; padding: 18px 20px; border-radius: 16px; background: linear-gradient(120deg, #ffd166, #ff9f43 55%, #ff6f91); color: #3a2206; box-shadow: inset 0 1.5px 0 rgba(255,255,255,.5), 0 10px 30px rgba(255,159,67,.4); min-height: 130px; }
.tbanner::before { content: ''; position: absolute; inset: -50%; background: conic-gradient(from 0deg, transparent 0 70%, rgba(255,255,255,.3) 80%, transparent 90%); animation: sweep 8s linear infinite; pointer-events: none; }
.tbits { position: absolute; inset: 0; pointer-events: none; overflow: hidden; } .tbits span { position: absolute; bottom: -30px; opacity: .5; animation: rise linear infinite; }
.tring { position: relative; flex: none; width: 104px; height: 104px; border-radius: 50%; background: conic-gradient(#fff calc(var(--p) * 1%), rgba(0,0,0,.18) 0); box-shadow: 0 6px 16px rgba(0,0,0,.25); display: flex; align-items: center; justify-content: center; }
.tring .in { width: 82px; height: 82px; border-radius: 50%; background: linear-gradient(180deg, #ffb545, #ff8a3c); box-shadow: inset 0 2px 0 rgba(255,255,255,.4); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; } .tring b { font-size: 28px; } .tring small { font-size: 10px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; opacity: .8; }
.ttitle { position: relative; display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; } .ttitle small { font-size: 11px; font-weight: 900; letter-spacing: 2px; opacity: .8; } .ttitle h2 { font-size: 30px; letter-spacing: .5px; line-height: 1; } .tblurb { font-weight: 800; font-size: 13px; opacity: .9; }
.ttiers { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; } .ttier { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 900; padding: 3px 9px 3px 4px; border-radius: 999px; background: rgba(0,0,0,.22); color: #fff; } .ttier i { width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--m1), var(--m2) 55%, var(--m3)); box-shadow: inset 0 0 0 1.5px var(--m3); }
.ttier.bronze { --m1: #f0b58a; --m2: #b5702f; --m3: #6e3d12; } .ttier.silver { --m1: #fff; --m2: #b7c4d6; --m3: #5c6b80; } .ttier.gold { --m1: #fff2a8; --m2: #f5c02a; --m3: #9a6300; } .ttier.legend { --m1: #ffe9ff; --m2: #c86bff; --m3: #4a1a8a; }
.tscore { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 16px; border-radius: 14px; background: rgba(0,0,0,.22); color: #fff; flex: none; } .tscore b { font-size: 30px; line-height: 1; } .tscore small { font-size: 10px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; opacity: .85; }
.twall { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.trophy { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px 12px; border-radius: 14px; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1.5px var(--line); text-align: center; min-width: 0; transition: transform .15s, box-shadow .15s; }
.trophy:hover { transform: translateY(-2px); } .trophy b { font-size: 13px; line-height: 1.15; } .trophy small { color: var(--mut); font-weight: 700; font-size: 11px; line-height: 1.25; min-height: 2.5em; }
.trophy.locked .medal { filter: grayscale(1) brightness(.55); opacity: .6; } .trophy.locked .medal .mi { opacity: .55; }
.trophy.ready { box-shadow: inset 0 0 0 2px var(--acc), 0 0 22px rgba(255,181,69,.5); background: rgba(255,181,69,.1); animation: trophyready 1.8s ease-in-out infinite; } @keyframes trophyready { 50% { box-shadow: inset 0 0 0 2px var(--acc), 0 0 34px rgba(255,181,69,.85); } }
.trophy.ready .medal { animation: medalbob 1.6s ease-in-out infinite; } @keyframes medalbob { 50% { transform: translateY(-4px) rotate(-4deg); } }
.trophy.claimed { background: rgba(90,214,125,.07); box-shadow: inset 0 0 0 1.5px rgba(90,214,125,.4); }
.trophy .tprog { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 100%; } .trophy .tprog .bar { width: 100%; height: 6px; } .trophy .tprog .bar i { background: linear-gradient(90deg, var(--acc2), var(--acc)); } .trophy .tprog span { font-size: 10px; font-weight: 900; color: var(--mut); }
.tdone { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 900; color: var(--ok); padding: 4px 10px; border-radius: 999px; background: rgba(90,214,125,.14); }
.twhead h3 { display: flex; align-items: center; gap: 8px; } .twhead h3 .n { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.1); opacity: .9; } .card.tfull .twhead h3 { color: var(--gold); }
.tpop { position: fixed; left: 50%; top: calc(14px + var(--sat, 0px)); z-index: 40; display: flex; align-items: center; gap: 12px; padding: 10px 18px 10px 10px; border-radius: 18px; background: linear-gradient(120deg, #1b2447, #0e1530); box-shadow: inset 0 0 0 2px var(--gold), 0 0 0 6px rgba(255,209,102,.18), 0 14px 40px rgba(0,0,0,.6); color: #fff; max-width: min(92vw, 520px); transform: translate(-50%, -140%) scale(.9); opacity: 0; transition: transform .5s cubic-bezier(.2,1.4,.4,1), opacity .35s; pointer-events: none; overflow: hidden; }
.tpop::after { content: ''; position: absolute; top: -50%; bottom: -50%; left: -30%; width: 25%; background: linear-gradient(100deg, transparent, rgba(255,209,102,.35), transparent); transform: skewX(-20deg); animation: shine 2.4s ease-in-out infinite; }
.tpop.in { transform: translate(-50%, 0) scale(1); opacity: 1; } .tpop .tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .tpop .tx small { font-size: 10px; font-weight: 900; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); } .tpop .tx b { font-size: 18px; line-height: 1.1; } .tpop .tx span { font-size: 12px; color: var(--mut); font-weight: 700; }
@media (max-width: 600px) { .tbanner { flex-wrap: wrap; gap: 12px; padding: 14px; } .tring { width: 84px; height: 84px; } .tring .in { width: 66px; height: 66px; } .tring b { font-size: 22px; } .ttitle h2 { font-size: 24px; } .tscore { flex-direction: row; gap: 8px; width: 100%; justify-content: center; } .twall { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; } .trophy { padding: 10px 6px; } }
/* ===== Housing: home banner, track of homes, room cards ===== */
.hbanner { position: relative; overflow: hidden; display: flex; align-items: center; gap: 18px; padding: 18px 20px; border-radius: 16px; background: linear-gradient(120deg, #6fe0b0, #22b8d6 55%, #4f7cff); color: #062a2a; box-shadow: inset 0 1.5px 0 rgba(255,255,255,.45), 0 12px 30px rgba(34,184,214,.35); }
.hbanner::before { content: ''; position: absolute; inset: -50%; background: conic-gradient(from 0deg, transparent 0 70%, rgba(255,255,255,.28) 80%, transparent 90%); animation: sweep 9s linear infinite; pointer-events: none; }
.hbits { position: absolute; inset: 0; pointer-events: none; overflow: hidden; } .hbits span { position: absolute; bottom: -24px; font-size: 18px; opacity: .35; animation: rise linear infinite; }
.hico { position: relative; flex: none; width: 104px; height: 104px; border-radius: 28px; background: rgba(255,255,255,.35); box-shadow: inset 0 2px 0 rgba(255,255,255,.6), 0 8px 20px rgba(0,0,0,.2); display: flex; align-items: center; justify-content: center; font-size: 60px; line-height: 1; animation: bob 3.2s ease-in-out infinite; }
.hico.sm { width: 44px; height: 44px; border-radius: 12px; font-size: 26px; animation: none; background: rgba(255,255,255,.5); }
.htitle { position: relative; display: flex; flex-direction: column; gap: 5px; min-width: 0; flex: 1; } .htitle small { font-size: 11px; font-weight: 900; letter-spacing: 2px; opacity: .75; } .htitle h2 { font-size: 30px; line-height: 1; } .hblurb { font-weight: 800; font-size: 13px; opacity: .85; }
.hpill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.4); font-weight: 900; font-size: 12px; white-space: nowrap; } .hpill small { font-weight: 800; opacity: .75; }
.hnext { position: relative; flex: none; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 16px; border-radius: 14px; background: rgba(6,20,40,.5); color: #fff; min-width: 220px; text-align: center; }
.hnext > small:first-child { font-size: 10px; font-weight: 900; letter-spacing: 2px; opacity: .8; } .hnext.ready { box-shadow: 0 0 0 2px var(--gold), 0 0 24px rgba(255,209,102,.5); }
.htrack { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; padding: 6px 4px 2px; position: relative; }
.htrack::before { content: ''; position: absolute; left: 8%; right: 8%; top: 29px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.12); }
.hstep { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; flex: 1; min-width: 0; text-align: center; animation: cardin .45s cubic-bezier(.2,1.1,.4,1) backwards; animation-delay: var(--d); }
.hstep .hdot { width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 2px var(--line2); }
.hstep b { font-size: 12px; } .hstep small { font-size: 10px; color: var(--mut); font-weight: 800; white-space: nowrap; }
.hstep.done .hdot { background: linear-gradient(180deg, #6fe08f, #38b45f); color: #06301a; box-shadow: none; font-weight: 900; }
.hstep.now .hdot { background: linear-gradient(180deg, #7cefff, #22b8d6); box-shadow: 0 0 0 3px rgba(124,239,255,.35), 0 0 18px rgba(73,227,255,.7); animation: pulse3 1.6s ease-in-out infinite; } .hstep.now b { color: var(--acc2); }
.hstep.next .hdot { box-shadow: inset 0 0 0 2px var(--gold); } .hstep.next b { color: var(--gold); }
.hstep.locked { opacity: .45; }
.rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.rcard { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: var(--r2); background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--line); animation: cardin .4s cubic-bezier(.2,1.1,.4,1) backwards; animation-delay: var(--d); transition: transform .12s; }
.rcard:hover { transform: translateY(-2px); } .rcard b { font-size: 14px; } .rcard small { color: var(--mut); font-weight: 700; font-size: 12px; flex: 1; }
.rcard .rico { width: 44px; height: 44px; border-radius: 12px; background: rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; font-size: 24px; box-shadow: inset 0 0 0 2px var(--line2); }
.rcard .rfoot { display: flex; justify-content: flex-start; margin-top: 2px; }
.rcard.built { box-shadow: inset 0 0 0 1.5px rgba(90,214,125,.6); background: rgba(90,214,125,.08); } .rcard.built .rico { box-shadow: inset 0 0 0 2px var(--ok); }
.rcard.locked { opacity: .55; filter: saturate(.5); }
@media (max-width: 640px) { .hbanner { flex-wrap: wrap; gap: 12px; padding: 14px; } .hico { width: 72px; height: 72px; font-size: 42px; border-radius: 20px; } .htitle h2 { font-size: 24px; } .hnext { width: 100%; min-width: 0; } .htrack { flex-wrap: wrap; gap: 10px 4px; } .htrack::before { display: none; } .hstep { flex: 1 1 30%; } .hstep .hdot { width: 38px; height: 38px; font-size: 18px; } }
/* ===== Upgrades: tiles + side panel ===== */
.ulayout { display: grid; grid-template-columns: 1fr; gap: 12px; align-items: start; }
@media (min-width: 820px) { .ulayout { grid-template-columns: 1fr 320px; } .upanel { position: sticky; top: 0; } }
@media (max-width: 819px) { .ulayout { display: flex; flex-direction: column-reverse; } }
.ugrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(126px, 1fr)); gap: 8px; }
.utile { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 8px; border-radius: var(--r2); background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--line); text-align: center; min-width: 0; animation: cardin .4s cubic-bezier(.2,1.1,.4,1) backwards; animation-delay: var(--d); transition: transform .12s, box-shadow .12s; }
.utile:hover { transform: translateY(-2px); } .utile b { font-size: 12px; line-height: 1.1; } .utile small { font-size: 11px; color: var(--mut); font-weight: 800; }
.utile .uico { width: 42px; height: 42px; border-radius: 12px; background: rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; font-size: 22px; box-shadow: inset 0 0 0 2px var(--line2); }
.utile .lvl { flex-wrap: wrap; justify-content: center; max-width: 100%; } .utile .lvl i { width: 7px; height: 7px; }
.utile.can { box-shadow: inset 0 0 0 1.5px rgba(90,214,125,.55); } .utile.can small { color: var(--ok); }
.utile.on { box-shadow: inset 0 0 0 2.5px var(--acc), 0 0 18px rgba(255,181,69,.4); background: rgba(255,181,69,.1); } .utile.on .uico { box-shadow: inset 0 0 0 2px var(--acc); }
.utile.maxed { opacity: .7; } .utile.maxed small { color: var(--gold); }
.upanel { gap: 12px; } .uhead { display: flex; align-items: center; gap: 12px; } .uhead h2 { font-size: 22px; }
.uico.big { width: 60px; height: 60px; border-radius: 16px; font-size: 32px; background: rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; box-shadow: inset 0 0 0 2px var(--acc); flex: none; }
.udesc { margin: 0; color: var(--mut); font-weight: 700; font-size: 13px; }
.ueffect { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r2); background: rgba(0,0,0,.25); } .ueffect > div { display: flex; flex-direction: column; gap: 2px; } .ueffect small { font-size: 10px; font-weight: 900; letter-spacing: 1.5px; color: var(--mut); } .ueffect b { font-size: 15px; } .ueffect .arrow { font-size: 20px; color: var(--acc); }
.utrack { display: flex; flex-direction: column; gap: 4px; } .utrack small { font-size: 11px; font-weight: 800; }
/* ===== icons: inline SVG glyphs sized by the text around them ===== */
.ico-svg { width: 1.15em; height: 1.15em; vertical-align: -0.22em; display: inline-block; flex: none; }
.ico-svg.coin, .ico-svg.gem { width: 1.1em; height: 1.1em; vertical-align: -0.2em; }
.round .ico .ico-svg, .tab .ico .ico-svg { width: 1em; height: 1em; vertical-align: middle; }
.rowcard .ic .ico-svg, .rcard .rico .ico-svg, .utile .uico .ico-svg, .uico.big .ico-svg, .hdot .ico-svg, .hico .ico-svg, .medal .mi .ico-svg, .sheet .ic .ico-svg, .chno .ico-svg { width: 1em; height: 1em; vertical-align: middle; }
.pill .ico-svg, .btn .ico-svg, .badge .ico-svg { vertical-align: -0.2em; }
.hbits .ico-svg, .tbits .ico-svg { width: 1em; height: 1em; }
.flycoin .ico-svg { width: 22px; height: 22px; }
/* ===== reward reveal: the payout moment ===== */
.rmodal { position: fixed; inset: 0; z-index: 45; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(4,8,22,.74); backdrop-filter: blur(6px); opacity: 0; transition: opacity .25s; }
.rmodal.in { opacity: 1; }
.rcard2 { --tint: #ffd166; position: relative; overflow: hidden; width: min(400px, 100%); display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 18px 18px; border-radius: 22px; text-align: center;
  background: radial-gradient(120% 55% at 50% 0%, color-mix(in srgb, var(--tint) 22%, transparent), transparent 62%), radial-gradient(90% 60% at 50% 100%, rgba(73,120,255,.22), transparent 70%), linear-gradient(180deg, #1c2a56 0%, #111a3a 55%, #0b1026 100%);
  box-shadow: inset 0 0 0 1.5px rgba(255,209,102,.5), inset 0 1px 0 rgba(255,255,255,.16), 0 0 48px rgba(73,120,255,.35), 0 0 24px rgba(255,209,102,.18), 0 26px 60px rgba(0,0,0,.72); transform: translateY(24px) scale(.72); opacity: 0; }
.rmodal.in .rcard2 { animation: rcardin .55s cubic-bezier(.2,1.35,.35,1) both; }
@keyframes rcardin { 0% { opacity: 0; transform: translateY(24px) scale(.72); } 60% { opacity: 1; transform: translateY(-4px) scale(1.04); } 100% { opacity: 1; transform: none; } }
.rcard2 > :not(.rrays):not(.rflash) { position: relative; }
.rflash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; animation: rflash .5s ease-out .05s both; } @keyframes rflash { 0% { opacity: .55; } 100% { opacity: 0; } }
.rrays { position: absolute; top: -170px; left: 50%; width: 440px; height: 440px; margin-left: -220px; border-radius: 50%; background: repeating-conic-gradient(color-mix(in srgb, var(--tint) 18%, transparent) 0deg 8deg, transparent 8deg 22deg); -webkit-mask-image: radial-gradient(circle, #000 16%, transparent 60%); mask-image: radial-gradient(circle, #000 16%, transparent 60%); animation: sweep 22s linear infinite; pointer-events: none; }
.rrays.back { background: repeating-conic-gradient(rgba(73,227,255,.14) 0deg 5deg, transparent 5deg 17deg); animation: sweep 30s linear infinite reverse; }
.rhero { display: grid; place-items: center; height: 92px; margin-bottom: 2px; }
.rmedal { position: relative; display: grid; place-items: center; width: 88px; height: 88px; border-radius: 50%; background: radial-gradient(circle at 50% 38%, rgba(255,230,138,.35), rgba(73,120,255,.3) 62%, rgba(10,16,38,.9) 100%); animation: rmedalin .6s cubic-bezier(.2,1.5,.4,1) .1s both, rmedalglow 2.4s ease-in-out .8s infinite; }
.rmedal.custom { background: none; } .rmedal.custom .rart .medal { --mpx: 88px; }
@keyframes rmedalin { from { opacity: 0; transform: scale(.2) rotate(-30deg); } to { opacity: 1; transform: none; } }
@keyframes rmedalglow { 0%, 100% { box-shadow: 0 0 0 2px rgba(255,209,102,.7), 0 0 0 6px rgba(255,209,102,.12), 0 0 26px rgba(255,209,102,.4); } 50% { box-shadow: 0 0 0 2px rgba(255,233,168,.95), 0 0 0 9px rgba(255,209,102,.16), 0 0 42px rgba(255,209,102,.65); } }
.rmedal.custom { animation: rmedalin .6s cubic-bezier(.2,1.5,.4,1) .1s both; } .rmedal.custom .medal { animation: rmedalglow 2.4s ease-in-out .8s infinite; }
.rart { display: grid; place-items: center; width: 60px; height: 60px; font-size: 44px; line-height: 1; filter: drop-shadow(0 5px 10px rgba(0,0,0,.55)); animation: rbob 2.4s ease-in-out .8s infinite; } .rart .ico-svg { width: 56px; height: 56px; } .rmedal.custom .rart { width: 88px; height: 88px; }
@keyframes rbob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-3px) rotate(-4deg); } }
.rshock { position: absolute; inset: -4px; border-radius: 50%; border: 3px solid rgba(255,233,168,.9); opacity: 0; pointer-events: none; animation: rshock .8s cubic-bezier(.1,.6,.3,1) .28s both; } @keyframes rshock { 0% { opacity: .95; transform: scale(.9); } 100% { opacity: 0; transform: scale(2.3); border-width: 1px; } }
.rorbit { position: absolute; inset: -14px; pointer-events: none; animation: sweep 6s linear infinite; } .rorbit span { position: absolute; font-size: 12px; line-height: 1; color: #ffe9a8; text-shadow: 0 0 8px rgba(255,209,102,.9); animation: rtwinkle 1.6s ease-in-out infinite; }
.rorbit span:nth-child(1) { top: 0; left: 50%; margin-left: -6px; } .rorbit span:nth-child(2) { right: 0; top: 50%; margin-top: -6px; animation-delay: -.4s; font-size: 9px; } .rorbit span:nth-child(3) { bottom: 0; left: 50%; margin-left: -6px; animation-delay: -.8s; } .rorbit span:nth-child(4) { left: 0; top: 50%; margin-top: -6px; animation-delay: -1.2s; font-size: 9px; }
@keyframes rtwinkle { 0%, 100% { opacity: .35; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.2); } }
.rconfetti { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; } .rconfetti i { position: absolute; width: var(--w); height: var(--h); margin: calc(var(--h) / -2) 0 0 calc(var(--w) / -2); background: var(--c); opacity: 0; animation: rconf 1.5s cubic-bezier(.15,.7,.35,1) calc(.25s + var(--delay)) both; }
@keyframes rconf { 0% { opacity: 1; transform: translate(0,0) rotate(0) scale(.6); } 45% { opacity: 1; transform: translate(var(--dx), var(--dy)) rotate(calc(var(--spin) * .5)) scale(1); } 100% { opacity: 0; transform: translate(var(--dx), calc(var(--dy) + var(--fall))) rotate(var(--spin)) scale(.9); } }
.rkick { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 999px; border: 1px solid rgba(255,209,102,.45); background: linear-gradient(180deg, rgba(255,209,102,.2), rgba(255,209,102,.06)); font-size: 11px; font-weight: 900; letter-spacing: 2px; text-transform: uppercase; color: #ffe9a8; animation: rrise .4s ease-out .3s both; } .rkick i { font-style: normal; font-size: .7em; color: var(--gold); }
.rcard2 h2 { font-size: 28px; line-height: 1.08; text-align: center; background: linear-gradient(100deg, #fff 0%, #fff 40%, #ffe9a8 48%, #ffd166 52%, #fff 60%, #fff 100%); background-size: 260% 100%; background-position: 100% 0; -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 0 rgba(0,0,0,.45)); animation: rrise .4s ease-out .38s both, rglint 1.4s ease-in-out .7s both; }
@keyframes rrise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } } @keyframes rglint { from { background-position: 100% 0; } to { background-position: 0% 0; } }
.rsub { color: #b9c6ea; font-weight: 700; font-size: 13px; text-align: center; animation: rrise .4s ease-out .45s both; } .rsub.bad { color: #ffb3b3; }
.rloot { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 6px 0 10px; max-width: 100%; }
.rtile { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 94px; padding: 10px 6px 8px; border-radius: 16px; background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--rc, var(--tint)) 24%, transparent), transparent 70%), rgba(0,0,0,.32); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rc, var(--tint)) 50%, rgba(255,255,255,.06)), inset 0 1px 0 rgba(255,255,255,.08), 0 2px 0 rgba(0,0,0,.35); animation: rtilein .5s cubic-bezier(.2,1.3,.4,1) calc(.45s + var(--i, 0) * 90ms) both; }
.rtile::before { content: ''; position: absolute; top: 0; left: -60%; width: 45%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent); transform: skewX(-18deg); pointer-events: none; animation: rtileshine .7s ease-out calc(.9s + var(--i, 0) * 90ms) both; }
@keyframes rtilein { from { transform: translateY(14px) scale(.5); opacity: 0; } } @keyframes rtileshine { from { left: -60%; } to { left: 130%; } }
.rtile b { font-size: 13px; text-align: center; line-height: 1.1; } .rtile small { font-size: 10px; font-weight: 900; letter-spacing: 1px; color: var(--mut); }
.rtile .ric { position: relative; display: grid; place-items: center; width: 58px; height: 58px; } .rtile .ric .ico-svg { width: 48px; height: 48px; } .ricwrap { position: relative; display: grid; place-items: center; }
.rtile.coins b { font-size: 20px; color: #ffe6a8; } .rtile .rn { position: absolute; right: -10px; top: -6px; padding: 2px 7px; border-radius: 999px; background: var(--acc); color: #3a2206; font-size: 11px; font-weight: 900; }
.rtile .medal { --mpx: 54px; }
.rcta { position: relative; overflow: hidden; align-self: stretch; font-size: 18px; padding: 13px; border-radius: 18px; letter-spacing: 1.5px; animation: rbreathe 1.8s ease-in-out 1s infinite; }
@keyframes rbreathe { 0%, 100% { transform: scale(1); box-shadow: 0 4px 0 #b55f1b, 0 10px 24px rgba(255,159,67,.4); } 50% { transform: scale(1.03); box-shadow: 0 4px 0 #b55f1b, 0 0 0 8px rgba(255,181,69,.18), 0 14px 30px rgba(255,159,67,.55); } }
.rcta-shine { position: absolute; top: -50%; bottom: -50%; left: -30%; width: 30%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent); transform: skewX(-20deg); animation: shine 2.4s ease-in-out 1.2s infinite; pointer-events: none; }
.rcta:disabled { animation: none; }
@media (max-width: 420px) { .rtile { width: 84px; } .rcard2 h2 { font-size: 24px; } }

.ico-img { width: 1.35em; height: 1.35em; vertical-align: -0.33em; object-fit: contain; image-rendering: auto; filter: drop-shadow(0 1px 1px rgba(0,0,0,.35)); }
.round .ico .ico-img, .tab .ico .ico-img { width: 1.55em; height: 1.55em; vertical-align: middle; }
.rowcard .ic .ico-img, .rcard .rico .ico-img, .utile .uico .ico-img, .uico.big .ico-img, .hdot .ico-img, .hico .ico-img, .sheet .ic .ico-img, .chno .ico-img, .gift .ico .ico-img { width: 1.55em; height: 1.55em; vertical-align: middle; }
.medal .mi .ico-img { width: 1.75em; height: 1.75em; } .tpop .medal .mi .ico-img { width: 1.6em; height: 1.6em; }
.hbits .ico-img, .tbits .ico-img { width: 1.2em; height: 1.2em; }
.ranklbl .ico-img, .pill .ico-img, .btn .ico-img, .badge .ico-img, .hint .ico-img, small .ico-img { width: 1.2em; height: 1.2em; vertical-align: -0.28em; }
.trophy.stamp { animation: tstamp .6s cubic-bezier(.2,1.4,.4,1) both; } @keyframes tstamp { 0% { transform: scale(1.12); box-shadow: inset 0 0 0 3px var(--ok), 0 0 30px rgba(90,214,125,.8); } 100% { transform: none; } } .trophy.stamp .tdone { animation: pop .5s ease-out .15s both; }

/* ===== new flinger reveal ===== */
.creveal { --cc: #ffd166; position: fixed; inset: 0; z-index: 46; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: calc(16px + var(--sat, 0px)) 16px calc(16px + var(--sab, 0px)); overflow: hidden; text-align: center; user-select: none;
  background: radial-gradient(70% 55% at 50% 40%, color-mix(in srgb, var(--cc) 30%, #0b1026), #070b1c 72%); opacity: 0; transition: opacity .3s, background .4s; }
.creveal.in { opacity: 1; } .creveal.out { opacity: 0; transition: opacity .3s; }
.creveal.charge { background: radial-gradient(60% 45% at 50% 40%, #141c3c, #04060f 75%); }
.cr-rays { position: absolute; top: 40%; left: 50%; width: 1300px; height: 1300px; margin: -650px 0 0 -650px; border-radius: 50%; pointer-events: none; opacity: 0;
  background: repeating-conic-gradient(color-mix(in srgb, var(--cc) 34%, transparent) 0deg 7deg, transparent 7deg 20deg); -webkit-mask-image: radial-gradient(circle, #000 8%, transparent 58%); mask-image: radial-gradient(circle, #000 8%, transparent 58%); animation: sweep 26s linear infinite; transition: opacity .5s; }
.cr-rays.back { background: repeating-conic-gradient(rgba(255,233,168,.16) 0deg 4deg, transparent 4deg 15deg); animation: sweep 38s linear infinite reverse; }
.creveal.boom .cr-rays { opacity: 1; }
.cr-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.creveal.boom .cr-flash { animation: crflash .6s ease-out both; } @keyframes crflash { 0% { opacity: .95; } 100% { opacity: 0; } }
.cr-stage { position: relative; display: grid; place-items: center; width: min(300px, 70vw); height: min(300px, 38vh); flex: none; }
.cr-hero { position: relative; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; width: 100%; height: 100%; min-height: 0; }
.cr-spr { grid-area: 1 / 1; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.cr-blob { width: 60%; aspect-ratio: 1; border-radius: 50%; background: var(--cc); }
.cr-sil { filter: brightness(0) drop-shadow(0 0 14px color-mix(in srgb, var(--cc) 80%, #fff)); animation: crquake .09s linear infinite, crgrow 1.45s cubic-bezier(.5,0,.9,.6) both; }
.cr-face { opacity: 0; filter: drop-shadow(0 14px 22px rgba(0,0,0,.55)); }
@keyframes crquake { 0% { translate: 0 0; } 25% { translate: -2px 1px; } 50% { translate: 2px -1px; } 75% { translate: -1px -2px; } }
@keyframes crgrow { from { transform: scale(.55); } to { transform: scale(.9); } }
.creveal.boom .cr-sil { animation: none; opacity: 0; transition: opacity .15s; }
.creveal.boom .cr-face { opacity: 1; animation: crpop .7s cubic-bezier(.2,1.6,.4,1) both, crbob 2.6s ease-in-out .9s infinite; }
@keyframes crpop { 0% { transform: scale(.4) rotate(-10deg); } 55% { transform: scale(1.18) rotate(4deg); } 100% { transform: none; } }
@keyframes crbob { 50% { transform: translateY(-8px) rotate(-2deg); } }
.cr-glow { position: absolute; width: 80%; height: 80%; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--cc) 75%, #fff) 0%, transparent 65%); opacity: .25; animation: crglow 1.45s ease-in both; }
@keyframes crglow { from { transform: scale(.3); opacity: .1; } to { transform: scale(1.1); opacity: .9; } }
.creveal.boom .cr-glow { animation: crglowon 2.6s ease-in-out infinite; opacity: .7; } @keyframes crglowon { 50% { transform: scale(1.12); opacity: .95; } }
.cr-ring { position: absolute; width: 50%; height: 50%; border-radius: 50%; border: 5px solid color-mix(in srgb, var(--cc) 50%, #fff); opacity: 0; pointer-events: none; }
.creveal.boom .cr-ring { animation: crring .9s cubic-bezier(.1,.6,.3,1) both; } .creveal.boom .cr-ring.r2 { animation-delay: .12s; } .creveal.boom .cr-ring.r3 { animation-delay: .26s; border-color: #ffe9a8; }
@keyframes crring { 0% { opacity: 1; transform: scale(.6); } 100% { opacity: 0; transform: scale(3.4); border-width: 1px; } }
.cr-sparks { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; }
.cr-sparks i { position: absolute; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px 2px var(--cc); opacity: 0; animation: crspark .55s ease-in var(--sd) infinite; }
@keyframes crspark { 0% { opacity: 0; transform: translate(var(--sx), var(--sy)) scale(1.4); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(0, 0) scale(.3); } }
.creveal.boom .cr-sparks { display: none; }
.cr-burst { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; display: none; } .creveal.boom .cr-burst { display: block; }
.cr-burst i { position: absolute; width: var(--w); height: var(--h); margin: calc(var(--h) / -2) 0 0 calc(var(--w) / -2); background: var(--c); opacity: 0; animation: rconf 1.8s cubic-bezier(.15,.7,.35,1) calc(.05s + var(--delay)) both; }
.cr-text { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; width: min(440px, 100%); opacity: 0; }
.creveal.boom .cr-text { opacity: 1; }
.cr-kick { display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px; border-radius: 999px; border: 1px solid rgba(255,209,102,.5); background: linear-gradient(180deg, rgba(255,209,102,.24), rgba(255,209,102,.06)); font-size: 12px; font-weight: 900; letter-spacing: 2.5px; text-transform: uppercase; color: #ffe9a8; } .cr-kick i { font-style: normal; color: var(--gold); }
.creveal.boom .cr-kick { animation: rrise .4s ease-out .25s both; }
.cr-name { display: flex; justify-content: center; font-size: clamp(44px, 13vw, 72px); line-height: 1; font-weight: 900; letter-spacing: 1px; color: #fff; text-transform: uppercase;
  text-shadow: 0 4px 0 color-mix(in srgb, var(--cc) 70%, #000), 0 8px 0 rgba(0,0,0,.35), 0 0 30px color-mix(in srgb, var(--cc) 70%, transparent); }
.cr-name span { display: inline-block; opacity: 0; }
.creveal.boom .cr-name span { animation: crslam .45s cubic-bezier(.2,1.7,.4,1) calc(.35s + var(--li) * 60ms) both; }
@keyframes crslam { 0% { opacity: 0; transform: translateY(-50px) scale(2.2) rotate(-12deg); } 60% { opacity: 1; transform: translateY(4px) scale(.92); } 100% { opacity: 1; transform: none; } }
.cr-blurb { color: #d4ddf5; font-weight: 800; font-size: 15px; } .creveal.boom .cr-blurb { animation: rrise .4s ease-out .75s both; }
.cr-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 100%; }
.cr-chip { padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 900; background: rgba(0,0,0,.35); opacity: 0; }
.cr-chip.pro { color: #8ff0ad; box-shadow: inset 0 0 0 1.5px rgba(90,214,125,.55); } .cr-chip.con { color: #ffadad; box-shadow: inset 0 0 0 1.5px rgba(255,90,90,.4); }
.creveal.boom .cr-chip { animation: crchip .45s cubic-bezier(.2,1.4,.4,1) calc(.9s + var(--ci) * 70ms) both; } @keyframes crchip { from { opacity: 0; transform: translateY(12px) scale(.5); } to { opacity: 1; transform: none; } }
.cr-cta { position: relative; overflow: hidden; align-self: stretch; margin-top: 6px; font-size: 19px; padding: 14px; border-radius: 18px; letter-spacing: 1.2px; opacity: 0; }
.creveal.boom .cr-cta { animation: rrise .4s ease-out calc(1s + var(--ci) * 70ms) both, rbreathe 1.8s ease-in-out 2.2s infinite; }
.cr-skip { position: absolute; bottom: calc(22px + var(--sab, 0px)); left: 0; right: 0; font-size: 12px; font-weight: 900; letter-spacing: 2px; text-transform: uppercase; color: rgba(255,255,255,.45); animation: crblink 1.2s ease-in-out infinite; } @keyframes crblink { 50% { opacity: .35; } }
.creveal.boom .cr-skip { display: none; }
.cr-name.long { font-size: clamp(34px, 9vw, 52px); }
@media (max-height: 640px) { .cr-stage { height: 32vh; } .cr-name { font-size: 44px; } }

/* ===== swap flinger ===== */
.pick.swapin { animation: swapcard .5s cubic-bezier(.2,1.5,.4,1); box-shadow: inset 0 0 0 3px var(--cc, var(--acc)), 0 0 30px color-mix(in srgb, var(--cc, var(--acc)) 70%, transparent), var(--shadow); }
@keyframes swapcard { 0% { transform: scale(.94); } 50% { transform: scale(1.05); } 100% { transform: none; } }
.pick.swapin canvas { animation: swaphop .6s cubic-bezier(.3,1.6,.5,1); }
@keyframes swaphop { 0% { transform: translateY(0) scale(1, 1); } 20% { transform: translateY(4px) scale(1.12, .86); } 55% { transform: translateY(-26px) scale(.94, 1.08); } 80% { transform: translateY(2px) scale(1.06, .94); } 100% { transform: none; } }
.swapring { position: absolute; top: 60px; left: 50%; width: 90px; height: 90px; margin: -45px 0 0 -45px; border-radius: 50%; border: 4px solid var(--cc, var(--acc)); pointer-events: none; animation: crring .7s cubic-bezier(.1,.6,.3,1) both; }
.swaptag { position: absolute; top: 10px; right: 10px; padding: 3px 10px; border-radius: 999px; background: var(--ok); color: #06301a; font-size: 12px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; box-shadow: 0 3px 0 rgba(0,0,0,.3); pointer-events: none; animation: swaptag 1.5s ease-out both; }
@keyframes swaptag { 0% { opacity: 0; transform: scale(2) rotate(-14deg); } 18% { opacity: 1; transform: scale(.95) rotate(-6deg); } 26% { transform: scale(1) rotate(-6deg); } 80% { opacity: 1; transform: rotate(-6deg); } 100% { opacity: 0; transform: translateY(-8px) rotate(-6deg); } }
@media (prefers-reduced-motion: reduce) { .cr-sil, .cr-sparks i, .cr-name span, .pick.swapin canvas { animation-duration: .01s !important; } }

/* ---- results: the chase row (Sky Chest meter + next landmark) ---- */
.chase { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.chase-box { flex: 1 1 280px; max-width: 520px; min-width: 0; display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.chase-top { display: flex; align-items: baseline; gap: 8px; } .chase-top b { font-size: 14px; display: inline-flex; align-items: center; gap: 6px; } .chase-top small { color: var(--mut); font-weight: 800; font-size: 11px; }
.chase-top .tab { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--gold); }
.chase .meter { position: relative; height: 12px; border-radius: 7px; background: rgba(0,0,0,.35); overflow: hidden; }
.chase .meter i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 7px; }
.chase .meter .was { background: rgba(255,209,102,.35); }
.chase .meter .now { background: linear-gradient(90deg, var(--gold2), var(--gold)); box-shadow: 0 0 12px rgba(255,209,102,.55); transition: width 1.1s cubic-bezier(.2,.8,.2,1); }
.chase .meter .now.reset { transition: width .5s ease-out; }
.chase .meter.alt .now { background: linear-gradient(90deg, #2f8cff, var(--acc2)); box-shadow: 0 0 12px rgba(73,227,255,.45); transition: none; }
.chase .meter .tick { position: absolute; top: -2px; bottom: -2px; width: 3px; margin-left: -1px; border-radius: 2px; background: #fff; }
.chase-box.full { box-shadow: inset 0 0 0 2px var(--gold), 0 0 22px rgba(255,209,102,.35); animation: pop .5s ease-out; }
.chase-box.goal.close { box-shadow: inset 0 0 0 2px var(--acc2), 0 0 18px rgba(73,227,255,.3); } .chase-box.goal.close .chase-top small:not(.tab) { color: var(--acc2); }
.chase .chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chase .chip { font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: rgba(255,255,255,.08); color: var(--txt); } .chase .chip b { color: var(--gold); } .chase .chip.dim { color: var(--mut); background: none; padding-left: 0; }
@media (prefers-reduced-motion: reduce) { .chase .meter .now { transition: none; } }
@media (max-width: 520px) { .chase-box.goal .chips { display: none; } .chase-box { padding: 8px 10px; } }

/* ---- story: chapter rewards as tiles ---- */
.greward { display: flex; flex-direction: column; gap: 6px; }
.greward .glabel { font-size: 11px; font-weight: 900; letter-spacing: 1.5px; text-transform: uppercase; color: var(--mut); }
.gtiles { display: flex; flex-wrap: wrap; gap: 8px; }
.gtile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; width: 84px; padding: 8px 4px 7px; border-radius: 14px; text-align: center;
  background: radial-gradient(circle at 50% 28%, color-mix(in srgb, var(--rc) 26%, transparent), rgba(255,255,255,.04) 70%); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--rc) 70%, transparent);
  animation: gtileIn .35s cubic-bezier(.2,1.4,.4,1) backwards; animation-delay: calc(var(--i) * 45ms); }
.gtile .gic { position: relative; height: 46px; display: flex; align-items: center; justify-content: center; }
.gtile .gic > .icon, .gtile .gic > canvas, .gtile .gic > img { filter: drop-shadow(0 3px 4px rgba(0,0,0,.35)); }
.gtile b { font-size: 11.5px; line-height: 1.15; font-weight: 900; color: var(--txt); }
.gtile small { font-size: 9.5px; font-weight: 900; letter-spacing: .8px; text-transform: uppercase; color: color-mix(in srgb, var(--rc) 80%, #fff); }
.gtile .gn { position: absolute; right: -10px; bottom: -2px; padding: 1px 6px; border-radius: 9px; background: linear-gradient(180deg, var(--gold), var(--gold2)); color: #3a2206; font-size: 10px; font-weight: 900; }
.gtile .gbadge { position: absolute; left: -10px; top: -4px; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #1d3a6b; box-shadow: 0 0 0 1.5px #49e3ff; }
.gtile .gbadge .ico-svg { width: 15px; height: 15px; }
.gtile .gic > .ico-svg { width: 40px; height: 40px; } .gtile.sm .gic > .ico-svg { width: 28px; height: 28px; }
.gtile.sm { width: 64px; padding: 6px 3px 5px; border-radius: 11px; } .gtile.sm .gic { height: 32px; } .gtile.sm b { font-size: 10px; font-weight: 800; }
.gtile.sm .gn { right: -8px; font-size: 9px; } .gtile.sm .gbadge { width: 16px; height: 16px; left: auto; right: -14px; top: -6px; } .gtile.sm .gbadge .ico-svg { width: 11px; height: 11px; }
@keyframes gtileIn { from { opacity: 0; transform: translateY(6px) scale(.9); } }
@media (prefers-reduced-motion: reduce) { .gtile { animation: none; } }

/* ==== Upgrades v2: hue-tinted tiles, hero panel, the buy moment ==== */
.ugrid { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 10px; }
.utile { --hue: var(--acc); position: relative; gap: 6px; padding: 12px 10px 10px; border-radius: 18px; overflow: hidden;
  background: radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--hue) 22%, transparent), transparent 70%), linear-gradient(180deg, #1c2a46, #131d33);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--hue) 30%, transparent), 0 3px 0 rgba(0,0,0,.35); transition: transform .15s, box-shadow .15s; }
.utile:hover { transform: translateY(-3px); } .utile:active { transform: translateY(1px) scale(.97); }
.utile .ubadge { position: relative; width: 54px; height: 54px; }
.utile .uico { width: 54px; height: 54px; border-radius: 50%; font-size: 26px; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--hue) 70%, #fff), color-mix(in srgb, var(--hue) 55%, #000) 75%); box-shadow: inset 0 -4px 0 rgba(0,0,0,.25), inset 0 3px 0 rgba(255,255,255,.25), 0 4px 10px color-mix(in srgb, var(--hue) 35%, transparent); }
.utile .ulv { position: absolute; right: -6px; bottom: -4px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 900; color: #fff; background: #0c1426; box-shadow: 0 0 0 2px color-mix(in srgb, var(--hue) 80%, #fff); }
.utile .uup { position: absolute; left: -6px; top: -6px; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; color: #fff; background: linear-gradient(180deg, #6fe08c, #2fa552); box-shadow: 0 2px 0 #1d6b35; animation: uupbob 1.1s ease-in-out infinite; }
@keyframes uupbob { 50% { transform: translateY(-3px); } }
.utile b { font-size: 12.5px; }
.useg { position: relative; width: 100%; height: 7px; border-radius: 4px; background: rgba(0,0,0,.45); overflow: hidden; }
.useg i { position: absolute; inset: 0 auto 0 0; border-radius: 4px; background: linear-gradient(90deg, color-mix(in srgb, var(--hue) 70%, #000), var(--hue)); transition: width .9s cubic-bezier(.2,.9,.2,1); }
.useg::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(100% / var(--n) - 2px), #0d1528 calc(100% / var(--n) - 2px) calc(100% / var(--n))); }
.useg.big { height: 12px; border-radius: 6px; } .useg.big i { box-shadow: 0 0 12px color-mix(in srgb, var(--hue) 60%, transparent); }
.utile .uprice { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 900; padding: 2px 9px; border-radius: 999px; background: rgba(0,0,0,.35); color: var(--mut); }
.utile .uprice .ico-svg, .ubuy-cost .ico-svg { width: 14px; height: 14px; }
.utile.can { box-shadow: inset 0 0 0 1.5px rgba(90,214,125,.7), 0 3px 0 rgba(0,0,0,.35); } .utile.can .uprice { color: #b6f5c6; background: rgba(47,165,82,.25); }
.utile.on { transform: translateY(-3px); box-shadow: inset 0 0 0 2.5px var(--hue), 0 0 22px color-mix(in srgb, var(--hue) 45%, transparent), 0 3px 0 rgba(0,0,0,.35); background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--hue) 34%, transparent), transparent 75%), linear-gradient(180deg, #22325a, #15203a); }
.utile.maxed { opacity: 1; } .utile.maxed .uprice { color: #3a2206; background: linear-gradient(180deg, var(--gold), var(--gold2)); }
.utile.lvlup::before { content: ''; position: absolute; top: 0; left: -60%; width: 45%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent); transform: skewX(-18deg); animation: ushine .8s ease-out .1s both; }
.utile.lvlup .ulv { animation: ulvpop .6s cubic-bezier(.2,1.6,.4,1) both; } @keyframes ushine { to { left: 130%; } } @keyframes ulvpop { 0% { transform: scale(.4); } 60% { transform: scale(1.5); } }

.upanel { --hue: var(--acc); gap: 12px; overflow: hidden; position: relative; }
.uhero { position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 14px; margin: -2px -2px 0; border-radius: 16px; overflow: hidden;
  background: radial-gradient(90% 120% at 15% 50%, color-mix(in srgb, var(--hue) 40%, transparent), transparent 70%), linear-gradient(135deg, #1d2c4c, #121b31); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--hue) 40%, transparent); }
.urays { position: absolute; left: 46px; top: 50%; width: 240px; height: 240px; margin: -120px 0 0 -120px; background: repeating-conic-gradient(color-mix(in srgb, var(--hue) 22%, transparent) 0 10deg, transparent 10deg 24deg); border-radius: 50%; animation: sweep 18s linear infinite; mask: radial-gradient(circle, #000 20%, transparent 68%); pointer-events: none; }
.uhero-ic { position: relative; width: 66px; height: 66px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 34px; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--hue) 75%, #fff), color-mix(in srgb, var(--hue) 50%, #000) 78%); box-shadow: inset 0 -5px 0 rgba(0,0,0,.25), inset 0 4px 0 rgba(255,255,255,.3), 0 6px 18px color-mix(in srgb, var(--hue) 45%, transparent); }
.uhero-ic .ico-img { width: 1.4em; height: 1.4em; }
.uhero-tx { min-width: 0; position: relative; } .uhero-tx h2 { font-size: 21px; line-height: 1.05; } .uhero-tx p { margin: 3px 0 0; font-size: 12px; font-weight: 700; color: #c9d5ea; line-height: 1.35; }
.ushield { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 58px; height: 64px; clip-path: polygon(50% 0, 100% 16%, 100% 66%, 50% 100%, 0 66%, 0 16%); background: linear-gradient(180deg, var(--gold), var(--gold2)); color: #3a2206; }
.ushield b { font-size: 24px; line-height: .9; } .ushield small { font-size: 9px; font-weight: 900; letter-spacing: 1px; opacity: .8; }
.ushield.pop { animation: ushieldpop .7s cubic-bezier(.2,1.6,.4,1) .05s both; } @keyframes ushieldpop { 0% { transform: scale(.3) rotate(-20deg); } 60% { transform: scale(1.25) rotate(6deg); } }
.upanel .ueffect { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 8px; padding: 0; background: none; }
.unow, .unext { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 14px; background: rgba(0,0,0,.28); min-width: 0; }
.unow small, .unext small { font-size: 9.5px; font-weight: 900; letter-spacing: 1.2px; color: var(--mut); } .unow b, .unext b { font-size: 15px; line-height: 1.15; }
.unext { background: rgba(47,165,82,.16); box-shadow: inset 0 0 0 1.5px rgba(90,214,125,.45); } .unext b { color: #8ff0a8; }
.uarrow { align-self: center; font-size: 18px; color: var(--ok); animation: uarrow 1.2s ease-in-out infinite; } @keyframes uarrow { 50% { transform: translateX(3px); } }
.unow.flash { animation: unowflash .9s ease-out .1s both; } @keyframes unowflash { 0% { background: rgba(90,214,125,.7); transform: scale(1.06); } 100% { background: rgba(0,0,0,.28); } }
.unext.slidein { animation: unextin .5s cubic-bezier(.2,1.2,.4,1) .35s both; } @keyframes unextin { from { opacity: 0; transform: translateX(18px); } }
.ubuy { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 14px 18px; border: 0; border-radius: 16px; cursor: pointer; font: inherit;
  background: linear-gradient(180deg, #5c6a86, #444f66); color: #dfe6f3; box-shadow: 0 5px 0 #2b3346; transition: transform .08s, box-shadow .08s, filter .15s; }
.ubuy b { font-size: 17px; letter-spacing: .5px; } .ubuy-cost { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 999px; background: rgba(0,0,0,.25); font-weight: 900; font-size: 15px; }
.ubuy.ready { background: linear-gradient(180deg, #7ff09a, #33b85a); color: #062a13; box-shadow: 0 5px 0 #1d7a3a, 0 0 22px rgba(90,214,125,.35); }
.ubuy.ready:hover { filter: brightness(1.06); } .ubuy:active:not(:disabled), .ubuy.pressed { transform: translateY(4px); box-shadow: 0 1px 0 #1d7a3a; }
.ubuy:disabled:not(.pressed) { cursor: default; opacity: .75; } .ubuy:disabled:not(.pressed) b { font-size: 14px; }
.ubuy-shine { position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.45) 45%, transparent 60%); transform: translateX(-100%); pointer-events: none; }
.ubuy.ready .ubuy-shine { animation: ubuyshine 2.4s ease-in-out infinite; } @keyframes ubuyshine { 0%, 55% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.umaxed { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px; border-radius: 16px; background: linear-gradient(180deg, var(--gold), var(--gold2)); color: #3a2206; } .umaxed b { font-size: 17px; letter-spacing: 1px; }
.ucenter { text-align: center; font-size: 11px; font-weight: 800; }
.upanel.bought .uhero { animation: uherokick .5s ease-out both; } @keyframes uherokick { 30% { transform: scale(1.02); } }

/* ---- shared purchase FX layer ---- */
.bfx-ring, .bfx-glow, .bfx-spark, .bfx-stamp { position: fixed; pointer-events: none; z-index: 60; }
.bfx-ring { width: var(--s); height: var(--s); border-radius: 50%; border: 4px solid var(--c); transform: translate(-50%,-50%) scale(.6); animation: bfxring .7s cubic-bezier(.2,.8,.3,1) forwards; }
@keyframes bfxring { to { transform: translate(-50%,-50%) scale(2.6); opacity: 0; border-width: 1px; } }
.bfx-glow { width: var(--s); height: var(--s); border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--c) 70%, #fff) 0, transparent 65%); transform: translate(-50%,-50%) scale(.4); animation: bfxglow .7s ease-out forwards; }
@keyframes bfxglow { 30% { opacity: .9; transform: translate(-50%,-50%) scale(1); } to { opacity: 0; transform: translate(-50%,-50%) scale(1.2); } }
.bfx-spark { width: 8px; height: 8px; border-radius: 2px; background: var(--c); box-shadow: 0 0 8px var(--c); }
.bfx-stamp { display: flex; flex-direction: column; align-items: center; transform: translate(-50%,-50%); animation: bfxstamp 1.5s cubic-bezier(.2,1.4,.4,1) forwards; white-space: nowrap; }
.bfx-stamp b { font-size: 30px; font-weight: 900; letter-spacing: 1px; color: #fff; padding: 4px 16px; border-radius: 12px; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 85%, #fff), color-mix(in srgb, var(--c) 70%, #000)); box-shadow: 0 5px 0 rgba(0,0,0,.35), 0 0 30px color-mix(in srgb, var(--c) 60%, transparent); text-shadow: 0 2px 0 rgba(0,0,0,.35); rotate: -6deg; }
.bfx-stamp small { margin-top: 6px; font-size: 12px; font-weight: 900; color: #fff; padding: 2px 10px; border-radius: 999px; background: rgba(8,14,28,.85); }
@keyframes bfxstamp { 0% { transform: translate(-50%, -150%) scale(2.4); opacity: 0; } 18% { transform: translate(-50%,-110%) scale(.92); opacity: 1; } 26% { transform: translate(-50%,-110%) scale(1); } 75% { transform: translate(-50%,-110%) scale(1); opacity: 1; } 100% { transform: translate(-50%,-160%) scale(.9); opacity: 0; } }
.bfx-slam { animation: bfxslam .55s cubic-bezier(.2,1.6,.4,1); } @keyframes bfxslam { 0% { transform: scale(1); } 25% { transform: scale(1.35) rotate(-8deg); } 55% { transform: scale(.9) rotate(4deg); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .bfx-stamp { animation-duration: .01s; } .bfx-slam, .ushield.pop, .unext.slidein, .utile.lvlup::before { animation: none; } }

/* ---- housing: build + move moments ---- */
.rcard { position: relative; transition: transform .15s; }
.rcard.building { animation: rbuild .12s linear infinite; } @keyframes rbuild { 25% { transform: translate(-1px, 1px) rotate(-.4deg); } 75% { transform: translate(1px, -1px) rotate(.4deg); } }
.rcard.building::after { content: ''; position: absolute; inset: auto 10% 6px; height: 30px; border-radius: 50%; background: radial-gradient(ellipse, rgba(220,200,160,.55), transparent 70%); filter: blur(2px); animation: rdust .5s ease-out infinite alternate; pointer-events: none; }
@keyframes rdust { to { transform: scale(1.25); opacity: .5; } }
.rcard.justbuilt { box-shadow: inset 0 0 0 2px var(--ok), 0 0 26px rgba(90,214,125,.45); } .rcard.justbuilt .rico { animation: rdrop .6s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes rdrop { 0% { transform: translateY(-30px) scale(.6); opacity: 0; } 60% { transform: translateY(4px) scale(1.15); opacity: 1; } }
.spreview { display: grid; grid-template-columns: repeat(var(--cols), var(--px)); gap: 1.5px; }
.spreview i { width: var(--px); height: var(--px); border-radius: 1.5px; background: rgba(255,255,255,.28); }
.spreview i.new { background: var(--gold); box-shadow: 0 0 4px rgba(255,209,102,.7); animation: spnew 1.6s ease-in-out infinite; animation-delay: var(--k); } @keyframes spnew { 50% { opacity: .45; } }
.hgain { font-size: 11px; font-weight: 900; color: var(--gold); }
.rtile .spreview { margin: 4px 0; }
.hstep.arrived .hdot { animation: harrive .9s cubic-bezier(.2,1.6,.4,1) .2s both; } @keyframes harrive { 0% { transform: translateY(-26px) scale(.5); } 60% { transform: translateY(3px) scale(1.2); } }

/* ---- community: segmented tabs, ranking rows, player card, friend codes, weekly event tiers ---- */
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 16px; background: rgba(0,0,0,.35); box-shadow: inset 0 0 0 1.5px var(--line); }
.segbtn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 8px; border-radius: 12px; font-weight: 900; font-size: 13px; color: var(--mut); white-space: nowrap; transition: background .15s, color .15s, transform .12s; }
.segbtn .ico-svg { width: 1.25em; height: 1.25em; }
.segbtn.on { background: linear-gradient(180deg, #ffd166, #ff9f43); color: #3a2206; box-shadow: 0 3px 0 #b55f1b, 0 6px 14px rgba(255,159,67,.35); }
.segbtn:not(.on):active { transform: scale(.96); }
.seg.sm { padding: 3px; border-radius: 12px; } .seg.sm .segbtn { padding: 5px 10px; font-size: 11px; border-radius: 9px; }
.seg.sm .segbtn.on { background: linear-gradient(180deg, #5fe8ff, #2f8cff); color: #04223a; box-shadow: 0 2px 0 #1b5fa8; }
.lbbody { display: flex; flex-direction: column; gap: 12px; } .lbbody > .card { animation: cardin .35s cubic-bezier(.2,1.1,.4,1) backwards; }
.lbbanner { min-height: 0; padding: 14px 18px; } .lbbanner .dtitle { gap: 6px; }
.lbme .lbface { box-shadow: 0 0 0 3px #fff, 0 8px 18px rgba(0,0,0,.4); animation: bob 2.8s ease-in-out infinite; }
.lbname { font-size: 24px; letter-spacing: .3px; }
.lbface { position: relative; flex: 0 0 var(--px); width: var(--px); height: var(--px); border-radius: 50%; overflow: hidden; display: inline-flex; align-items: flex-end; justify-content: center; background: radial-gradient(circle at 50% 35%, #6fb6ff, #24408f); box-shadow: 0 0 0 2px rgba(255,255,255,.35); }
.lbface canvas { width: 92%; height: 92%; object-fit: contain; }
.lblist { display: flex; flex-direction: column; gap: 6px; }
.lbrow { display: flex; align-items: center; gap: 10px; padding: 7px 12px 7px 8px; border-radius: 14px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; animation: lbin .32s cubic-bezier(.2,1.1,.4,1) backwards; animation-delay: calc(var(--i, 0) * 28ms); }
@keyframes lbin { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.lbrow .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; } .lbrow .tx b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .lbrow .tx small { color: var(--mut); font-weight: 800; font-size: 11px; } .lbrow .tx small.you { color: var(--acc2); }
.lbrank { flex: 0 0 34px; text-align: center; font-weight: 900; font-size: 15px; color: var(--mut); font-variant-numeric: tabular-nums; } .lbrank .ico-svg { width: 30px; height: 30px; }
.lbscore { font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lbrow.top1 { background: linear-gradient(90deg, rgba(255,209,102,.28), rgba(255,209,102,.05)); box-shadow: inset 0 0 0 1.5px rgba(255,209,102,.7); } .lbrow.top1 .lbscore { color: var(--gold); }
.lbrow.top2 { background: linear-gradient(90deg, rgba(201,211,230,.2), rgba(201,211,230,.04)); box-shadow: inset 0 0 0 1.5px rgba(201,211,230,.5); }
.lbrow.top3 { background: linear-gradient(90deg, rgba(208,138,78,.24), rgba(208,138,78,.04)); box-shadow: inset 0 0 0 1.5px rgba(208,138,78,.55); }
.lbrow.me { box-shadow: inset 0 0 0 2px var(--acc2), 0 0 18px rgba(73,227,255,.28); }
.lbrow.ghost { animation: lbpulse 1.1s ease-in-out infinite; animation-delay: calc(var(--i, 0) * 90ms); } .lbrow.ghost .lbface { background: rgba(255,255,255,.1); box-shadow: none; }
@keyframes lbpulse { 50% { opacity: .45; } }
.lbgap { text-align: center; color: var(--mut); font-weight: 900; letter-spacing: 4px; line-height: 1; }
.lbempty { padding: 14px 6px; }
.lbstat { background: rgba(0,0,0,.3); color: var(--mut); } .lbstat.demo { color: var(--acc); box-shadow: inset 0 0 0 1.5px var(--acc); }
.lbstat.live { color: var(--ok); box-shadow: inset 0 0 0 1.5px var(--ok); } .lbstat.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); animation: lbpulse 1.4s ease-in-out infinite; }
.dbanner .lbstat { background: rgba(0,0,0,.35); color: #fff; }
.tinput { height: 36px; padding: 0 12px; border-radius: 11px; border: 0; outline: none; background: rgba(0,0,0,.4); box-shadow: inset 0 0 0 2px var(--line2); color: #fff; font: inherit; font-weight: 900; font-size: 15px; width: 180px; user-select: text; -webkit-user-select: text; }
.tinput:focus { box-shadow: inset 0 0 0 2px var(--acc2), 0 0 14px rgba(73,227,255,.35); }
.tinput.code { width: 150px; text-align: center; letter-spacing: 6px; font-size: 18px; text-transform: uppercase; } .tinput.code::placeholder { color: rgba(255,255,255,.25); }
.fcode { display: flex; justify-content: center; gap: 6px; } .fcode span { width: 40px; height: 50px; display: flex; align-items: center; justify-content: center; border-radius: 10px; font-size: 26px; font-weight: 900; color: #3a2206; background: linear-gradient(180deg, #fff3c4, #ffc24a); box-shadow: 0 4px 0 #b55f1b, 0 8px 16px rgba(0,0,0,.3); animation: lbin .4s cubic-bezier(.2,1.4,.4,1) backwards; }
.fcode span:nth-child(2) { animation-delay: .05s; } .fcode span:nth-child(3) { animation-delay: .1s; } .fcode span:nth-child(4) { animation-delay: .15s; } .fcode span:nth-child(5) { animation-delay: .2s; } .fcode span:nth-child(6) { animation-delay: .25s; }
.etiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.etier { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; border-radius: 16px; background: linear-gradient(180deg, color-mix(in srgb, var(--tc) 22%, #101832), #0e1530); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--tc) 55%, transparent), inset 0 1.5px 0 rgba(255,255,255,.14); animation: cardin .45s cubic-bezier(.2,1.1,.4,1) backwards; animation-delay: calc(var(--i) * 70ms); min-width: 0; text-align: center; }
.etmedal { width: 54px; height: 54px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 35% 30%, #fff, var(--tc) 55%, color-mix(in srgb, var(--tc) 55%, #000)); box-shadow: 0 4px 0 color-mix(in srgb, var(--tc) 45%, #000), 0 8px 16px rgba(0,0,0,.35); } .etmedal .ico-svg { width: 36px; height: 36px; }
.etname { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--tc); } .ettarget { font-size: 20px; font-weight: 900; }
.etbar { width: 100%; height: 9px; background: rgba(0,0,0,.4); } .etbar i { background: linear-gradient(90deg, color-mix(in srgb, var(--tc) 60%, #fff), var(--tc)); transition: width .8s cubic-bezier(.2,.8,.2,1); }
.etier.ready { box-shadow: inset 0 0 0 2px var(--tc), 0 0 22px color-mix(in srgb, var(--tc) 45%, transparent); } .etier.ready .etmedal { animation: bob 1.8s ease-in-out infinite; }
.etier.claimed { opacity: .8; } .etier.claimed .etmedal { filter: saturate(.5); }
.etier.stamp { animation: pop .5s ease-out; }
.etdone { color: var(--ok); box-shadow: inset 0 0 0 1.5px var(--ok); background: rgba(90,214,125,.12); }
.dday.enext { opacity: 1; padding: 12px 6px; } .dday.enext .ico { font-size: 30px; } .dday.enext b { font-size: 12px; text-align: center; }
@media (max-width: 560px) { .etitem { display: none; } .segbtn { font-size: 11px; padding: 8px 4px; gap: 4px; } .lbname { font-size: 19px; } .lbme .lbface { --px: 56px !important; } .etier { padding: 10px 4px; } .ettarget { font-size: 16px; } .etmedal { width: 44px; height: 44px; } .fcode span { width: 34px; height: 44px; font-size: 22px; } }
@media (prefers-reduced-motion: reduce) { .lbrow, .etier, .fcode span { animation: none; } }

/* ---- replay: controls over the flight view, and the share card ---- */
.rptop { position: absolute; top: calc(10px + var(--sat)); left: calc(12px + var(--sal)); right: calc(12px + var(--sar)); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rptag { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; background: rgba(224,72,72,.92); color: #fff; font-weight: 900; font-size: 12px; letter-spacing: 2px; box-shadow: 0 4px 12px rgba(0,0,0,.35); }
.rpdot { width: 9px; height: 9px; border-radius: 50%; background: #fff; animation: lbpulse 1.2s ease-in-out infinite; }
.rptitle { display: flex; flex-direction: column; padding: 5px 14px; border-radius: 14px; background: var(--glass); box-shadow: inset 0 0 0 1.5px var(--line2); backdrop-filter: blur(8px); min-width: 0; } .rptitle b { font-size: 14px; } .rptitle small { color: var(--mut); font-weight: 800; font-size: 11px; }
.rpnow { margin-left: auto; display: flex; gap: 8px; } .rpnow span { padding: 6px 12px; border-radius: 999px; background: var(--glass); box-shadow: inset 0 0 0 1.5px var(--line2); font-weight: 800; font-size: 13px; font-variant-numeric: tabular-nums; backdrop-filter: blur(8px); }
.rpbar { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(14px + var(--sab)); width: min(760px, calc(100% - 24px)); display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 18px; background: var(--glass); box-shadow: inset 0 1.5px 0 rgba(255,255,255,.14), inset 0 0 0 1.5px var(--line2), var(--shadow); backdrop-filter: blur(12px); animation: cardin .35s cubic-bezier(.2,1.1,.4,1) backwards; }
.rpplay { min-width: 68px; } .rptime { font-weight: 900; font-size: 12px; color: var(--mut); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rpscrub { flex: 1; min-width: 60px; height: 22px; accent-color: var(--gold); cursor: pointer; }
.cardmodal { position: absolute; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(4,8,20,.78); backdrop-filter: blur(6px); animation: fadein .2s ease-out; } @keyframes fadein { from { opacity: 0; } }
.cardbox { display: flex; flex-direction: column; gap: 12px; max-width: min(900px, 100%); animation: cardin .4s cubic-bezier(.2,1.2,.4,1) backwards; } .cardbox img { width: 100%; border-radius: 16px; box-shadow: 0 0 0 2px rgba(255,209,102,.6), 0 20px 50px rgba(0,0,0,.6); }
.cardbox a.btn { text-decoration: none; }
@media (max-width: 620px) { .rpbar { flex-wrap: wrap; justify-content: center; } .rpscrub { flex: 1 1 100%; order: -1; } .rptitle small { display: none; } }

/* ---- the Skyway monument ---- */
.mbanner { min-height: 150px; }
.mtower { position: relative; flex: 0 0 120px; height: 130px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.mtower .mico { font-size: 74px; line-height: 1; filter: drop-shadow(0 8px 14px rgba(0,0,0,.4)); animation: bob 3s ease-in-out infinite; }
.mbeam { position: absolute; left: 50%; bottom: 60px; width: 150px; height: 150px; transform: translateX(-50%); background: radial-gradient(circle, rgba(255,240,180,.75), rgba(255,209,102,.25) 40%, transparent 70%); animation: mglow 2.6s ease-in-out infinite; pointer-events: none; }
@keyframes mglow { 50% { transform: translateX(-50%) scale(1.18); opacity: .7; } }
.mstar { position: absolute; top: -6px; right: -14px; min-width: 54px; padding: 4px 10px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; background: linear-gradient(180deg, #fff3c4, #ffc24a); color: #3a2206; box-shadow: 0 4px 0 #b55f1b, 0 8px 16px rgba(0,0,0,.35); text-shadow: none; } .mstar b { font-size: 24px; line-height: 1; } .mstar small { font-size: 9px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; opacity: 1; }
.mtower.raised .mstar { animation: pop .5s ease-out; } .mtower.raised .mbeam { animation: mflash .9s ease-out, mglow 2.6s ease-in-out .9s infinite; } @keyframes mflash { from { transform: translateX(-50%) scale(2.4); opacity: 1; } }
.mnext { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.mlamps { display: flex; align-items: center; gap: 6px; } .mlamp { width: 16px; height: 16px; border-radius: 50%; background: rgba(255,255,255,.12); box-shadow: inset 0 0 0 2px var(--line2); }
.mlamp.lit { background: radial-gradient(circle at 35% 30%, #fff, var(--gold)); box-shadow: 0 0 10px rgba(255,209,102,.8); } .mlamp.new { animation: pop .5s ease-out; }
.mcache { font-size: 20px; margin-left: 2px; }
@media (max-width: 560px) { .mtower { flex-basis: 84px; height: 100px; } .mtower .mico { font-size: 54px; } .mbeam { width: 110px; height: 110px; bottom: 44px; } }
@media (prefers-reduced-motion: reduce) { .mbeam, .mtower .mico { animation: none; } }
.lbwatch { flex: 0 0 auto; width: 34px; height: 30px; padding: 0; border-radius: 10px; font-size: 12px; }
.fcode.long span { width: 30px; height: 40px; font-size: 20px; } .tinput.code.long { width: 200px; letter-spacing: 4px; font-size: 16px; }
@media (max-width: 560px) { .fcode.long { gap: 3px; } .fcode.long span { width: 26px; height: 36px; font-size: 17px; } .tinput.code.long { width: 150px; letter-spacing: 2px; } }
