/* PlayNolly: Ink & Paper. Light = crumpled paper, ink black, signal red. Dark = grunge charcoal, red slash, green for money.
   Anton for display, Inter Tight for everything you read. Theme tokens and the look are at the end of the file. */
/* tokens live in the theme layer at the end of this file */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0; color: var(--ink); font: 16px/1.5 var(--body);
  background: var(--night);
  background-image: radial-gradient(120% 60% at 50% -10%, #2B1D52 0%, transparent 60%);
  background-attachment: fixed;
}
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.08; margin: 0; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(28px, 7vw, 40px); }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
p { margin: 0; }
a { color: var(--amber); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--amber2); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.money { color: var(--money); }

.shell { max-width: 560px; margin: 0 auto; min-height: 100%; padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }

/* top bar */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 16px; background: color-mix(in srgb, var(--night) 86%, transparent); backdrop-filter: blur(10px);
}
.logo { font-family: var(--display); font-weight: 800; font-size: 24px; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.logo span { color: var(--amber); }
.topstats { display: flex; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 14px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-weight: 800; cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.pill svg { width: 18px; height: 18px; fill: var(--amber); }
.pill.cash { color: var(--money); }
.pill.bump { animation: bump .5s ease-out; }
@keyframes bump { 30% { transform: scale(1.15); } }

main { padding: 4px 16px 24px; }
.view { display: flex; flex-direction: column; gap: 20px; }
.block { display: flex; flex-direction: column; gap: 12px; }
.row-head { display: flex; justify-content: space-between; align-items: baseline; }

/* buttons */
.btn {
  display: inline-flex; justify-content: center; align-items: center; gap: 8px;
  min-height: 52px; padding: 12px 20px; border: 0; border-radius: var(--r-md); cursor: pointer;
  background: var(--amber); color: var(--on-accent); font-weight: 800; font-size: 16px; text-decoration: none;
  transition: transform .08s;
}
.btn:active { transform: scale(.98); }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn.pink { background: var(--pink); color: var(--on-pink); }
.btn.wa { background: #25D366; color: #052B14; }
.btn.small { min-height: 44px; padding: 8px 16px; font-size: 15px; }
.btn:disabled { opacity: .55; cursor: default; }
input, select, textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--deep);
}
textarea { resize: vertical; }
.inline { display: flex; gap: 8px; }
.inline > * { min-width: 0; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.twocol { display: grid; gap: 14px; }
@media (min-width: 560px) { .twocol { grid-template-columns: 1fr 1fr; } }

/* streak strip: 7 days, flames lit */
.streakbar { display: flex; justify-content: space-between; gap: 6px; padding: 12px 14px; border-radius: var(--r-md); background: var(--deep); }
.streakbar .day { flex: 1; line-height: 1.3; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.streakbar .flame { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--panel2); }
.streakbar .flame svg { width: 16px; height: 16px; fill: var(--line); }
.streakbar .on .flame { background: color-mix(in srgb, var(--amber) 18%, transparent); }
.streakbar .on .flame svg { fill: var(--amber); }
.streakbar .now .flame { box-shadow: 0 0 0 2px var(--amber); }

/* today's wahala: the hero */
.today { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--deep); }
.stage {
  position: relative; aspect-ratio: 9 / 13; max-height: 62vh; width: 100%;
  display: flex; align-items: flex-end; background: #120306;
}
.stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.stage.poster { aspect-ratio: 4 / 5; }
.stage .still { position: absolute; inset: 0; background: #120306; }
.stage .still .bg { position: absolute; inset: 0; }
.stage .still .bg svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.stage .still .cap {
  position: absolute; left: 18px; right: 18px; top: 18px; margin: 0;
  padding: 12px 14px; border-left: 3px solid var(--amber); border-radius: 0 12px 12px 0;
  background: rgba(5, 8, 26, .72); color: var(--ink); font-size: 15px; line-height: 1.45;
  backdrop-filter: blur(4px);
}
.stage .shade { position: absolute; inset: 0; background: linear-gradient(transparent 40%, rgba(5,8,26,.95)); }
.stage .meta { position: relative; padding: 18px; display: flex; flex-direction: column; gap: 8px; width: 100%; }
.place { display: inline-flex; align-self: flex-start; gap: 6px; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 10%, transparent); font-size: 13px; font-weight: 600; }
.stage h2 { font-size: clamp(30px, 8vw, 44px); }
.qbox { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.question { font-size: 18px; font-weight: 600; }
.choices { display: grid; gap: 10px; }
.choice {
  text-align: left; min-height: 64px; padding: 14px 16px; border-radius: var(--r-md); cursor: pointer;
  border: 1.5px solid var(--line); background: var(--panel); font-weight: 800; font-size: 17px; display: flex; gap: 12px; align-items: center;
}
.choice .k { font-family: var(--display); color: var(--amber); font-size: 22px; }
.choice:hover { border-color: var(--amber); }
.choice.picked { border-color: var(--amber); background: color-mix(in srgb, var(--amber) 12%, transparent); }
.timer { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.timer i { display: block; height: 100%; width: 100%; background: var(--amber); transition: width 1s linear; }
.timer.hot i { background: var(--bad); }
.dropclock { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--line); }
.dropclock b { font-family: var(--display); font-size: 22px; color: var(--amber); font-variant-numeric: tabular-nums; }

/* the reveal */
.reveal { padding: 18px; display: flex; flex-direction: column; gap: 16px; animation: rise .35s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.twist { align-self: flex-start; padding: 4px 12px; border-radius: 999px; background: var(--pink); color: var(--on-pink); font-weight: 800; font-size: 14px; }
.outcome { font-size: 18px; font-weight: 600; }
.deltas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.delta { padding: 12px; border-radius: var(--r-sm); background: var(--panel); display: flex; flex-direction: column; gap: 2px; }
.delta b { font-family: var(--display); font-size: 22px; font-variant-numeric: tabular-nums; }
.delta .up { color: var(--money); } .delta .down { color: var(--bad); } .delta .flat { color: var(--muted); }
.split { display: flex; flex-direction: column; gap: 8px; }
.splitbar { display: flex; height: 40px; border-radius: var(--r-sm); overflow: hidden; font-weight: 800; font-size: 14px; }
.splitbar span { display: flex; align-items: center; padding: 0 12px; white-space: nowrap; min-width: 0; overflow: hidden; }
.splitbar .a { background: var(--amber); color: var(--on-accent); }
.splitbar .b { background: var(--pink); color: var(--on-pink); justify-content: flex-end; }
.lesson { padding: 14px; border-radius: var(--r-sm); border: 1px dashed var(--money); color: var(--ink); font-size: 15px; }

.archive { display: grid; gap: 10px; }
.arch { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--r-md); background: var(--panel); border: 1px solid var(--line); cursor: pointer; text-align: left; width: 100%; }
.arch .dot { width: 12px; height: 12px; border-radius: 50%; flex: none; background: var(--amber); }
.arch.done .dot { background: var(--line); }
.arch .t { flex: 1; min-width: 0; }
.arch .t b { display: block; }

/* PH life */
.scene { border-radius: var(--r-lg); overflow: hidden; line-height: 0; border: 1px solid var(--line); }
.scene svg { width: 100%; height: auto; display: block; }
.lifehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.who { color: var(--pink); font-weight: 800; }
.worth { text-align: right; display: flex; flex-direction: column; }
.worth b { font-family: var(--display); font-size: 26px; color: var(--money); font-variant-numeric: tabular-nums; }
.progress { height: 10px; border-radius: 5px; background: var(--deep); overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--amber), var(--pink)); width: 0; transition: width .8s ease-out; }
.statgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stat { padding: 12px; border-radius: var(--r-md); background: var(--panel); display: flex; flex-direction: column; gap: 6px; }
.stat b { font-family: var(--display); font-size: 24px; }
.stat .mini { height: 6px; border-radius: 3px; background: var(--deep); overflow: hidden; }
.stat .mini i { display: block; height: 100%; background: var(--amber); }
.persona { padding: 16px 18px; border-radius: var(--r-md); background: var(--panel2); display: flex; flex-direction: column; gap: 8px; }
.traits { display: flex; flex-wrap: wrap; gap: 6px; }
.traits span { padding: 4px 10px; border-radius: 999px; background: var(--deep); font-size: 13px; font-weight: 600; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.flexcard { width: 62%; max-width: 260px; align-self: center; border-radius: var(--r-md); border: 1px solid var(--line); }
.tabs { display: flex; gap: 6px; padding: 4px; border-radius: var(--r-md); background: var(--deep); }
.tabs button { flex: 1; min-height: 44px; border: 0; border-radius: var(--r-sm); background: transparent; font-weight: 800; cursor: pointer; color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--panel2); color: var(--ink); }
.shop { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.item { position: relative; border-radius: var(--r-md); background: var(--panel); border: 1px solid var(--line); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.item .art { aspect-ratio: 16 / 10; display: grid; place-items: center; border-radius: var(--r-sm); background: radial-gradient(90% 80% at 50% 70%, #5A1E28, #2A0A10); padding: 6px; }
.item .art svg { width: 100%; height: 100%; }
.item .name { font-weight: 800; line-height: 1.25; }
.item .price { font-family: var(--display); color: var(--money); font-size: 18px; }
.item .tier { font-size: 12px; color: var(--muted); }
.item .specs { display: flex; gap: 10px; font-size: 12px; color: var(--muted); }
.item.owned { border-color: var(--amber); }
.item .badge { position: absolute; top: 10px; left: 10px; padding: 2px 8px; border-radius: 999px; background: var(--amber); color: var(--on-accent); font-size: 12px; font-weight: 800; }
.item .btn { min-height: 44px; font-size: 14px; padding: 8px 10px; }
.item.locked .art { filter: grayscale(.8) brightness(.6); }

/* race */
.racehero { display: flex; flex-direction: column; gap: 8px; }
.racebox { position: relative; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: var(--deep); }
#raceCanvas { display: block; width: 100%; height: 260px; touch-action: manipulation; cursor: pointer; }
.racehud { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; }
.racehud p { font-weight: 800; }
#raceResult:not(:empty) { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.times { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.times div { padding: 12px; border-radius: var(--r-sm); background: var(--panel); }
.times b { display: block; font-family: var(--display); font-size: 22px; font-variant-numeric: tabular-nums; }
.search { display: flex; gap: 8px; }
.opponents { display: grid; gap: 10px; }
.opp { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-md); background: var(--panel); border: 1px solid var(--line); }
.opp .car { width: 92px; flex: none; }
.opp .car svg { width: 100%; height: auto; }
.opp .t { flex: 1; min-width: 0; }
.opp .t b { display: block; overflow: hidden; text-overflow: ellipsis; }

/* chat */
.empty { color: var(--muted); text-align: center; padding: 30px 12px; }

/* ranks */
.pagetitle { margin-top: 8px; }
.board { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.board li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); background: var(--panel); cursor: pointer; }
.board .n { font-family: var(--display); font-size: 20px; width: 30px; color: var(--muted); }
.board li:nth-child(1) .n { color: var(--amber); }
.board li:nth-child(2) .n { color: #8E9AA6; }
.board li:nth-child(3) .n { color: #D08A4E; }
.board .u { flex: 1; min-width: 0; }
.board .u b { display: block; overflow: hidden; text-overflow: ellipsis; }
.board .v { font-weight: 800; font-variant-numeric: tabular-nums; }
.board li.me { outline: 2px solid var(--amber); }
.storylink { text-align: center; padding: 14px; }

/* bottom tab bar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6;
  display: flex; justify-content: center; gap: 4px;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--deep) 94%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
}
.tabbar a { flex: 1; max-width: 110px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; border-radius: var(--r-sm); color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 800; }
.tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.tabbar a[aria-current="page"] { color: var(--amber); }
.tabbar a[aria-current="page"] svg { fill: color-mix(in srgb, var(--amber) 18%, transparent); }

/* sheet and toast */
.sheet { position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-end; justify-content: center; background: rgba(4,6,18,.72); padding: 12px; }
.sheetbox { position: relative; width: 100%; max-width: 520px; max-height: 88vh; overflow-y: auto; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); padding: 22px 18px calc(18px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 14px; animation: rise .25s ease-out; }
#sheetBody { display: flex; flex-direction: column; gap: 12px; }
.close { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--deep); font-size: 24px; cursor: pointer; }
.err { color: var(--bad); font-weight: 600; font-size: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { width: 22px; height: 22px; min-height: 0; flex: none; margin-top: 1px; }
.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 30; max-width: 90vw; padding: 12px 18px; border-radius: 999px; background: var(--ink); color: var(--night); font-weight: 800; box-shadow: 0 8px 30px rgba(0,0,0,.4); }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 25; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

#raceBox { scroll-margin-top: 84px; }

/* ---------- free drive ---------- */
.drivecard {
  position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 20px; display: flex; flex-direction: column; gap: 10px;
  background: linear-gradient(160deg, #4A1520 0%, #2A0A10 70%); border: 1px solid var(--line);
}
.drivecard .road {
  position: absolute; right: -40px; bottom: -30px; width: 220px; height: 160px; opacity: .55; pointer-events: none;
  background:
    linear-gradient(90deg, transparent 47%, var(--amber2) 47%, var(--amber2) 53%, transparent 53%) center / 100% 28px repeat-y,
    linear-gradient(90deg, var(--amber) 0 6%, #272B42 6% 94%, var(--amber) 94%);
  transform: perspective(160px) rotateX(55deg); transform-origin: bottom;
}
.drivecard h2 { font-size: 26px; position: relative; }
.drivecard p { position: relative; max-width: 34ch; }
.drivecard .bests { display: flex; gap: 16px; position: relative; font-size: 14px; }
.drivecard .btn { position: relative; align-self: flex-start; }
.raceh { font-size: 20px; margin-top: 8px; }
.boatcard { background: linear-gradient(165deg, #4A1520 0%, #123A4F 55%, #0E2A3A 100%); gap: 12px; }
.boatcard .water {
  position: absolute; inset: auto 0 0 0; height: 90px; opacity: .5; pointer-events: none;
  background: repeating-linear-gradient(170deg, transparent 0 14px, rgba(127,216,255,.22) 14px 16px), linear-gradient(transparent, #1F6E8A);
}
.boatcard .actions, .boatcard .routes { position: relative; }
.boatcard .actions { display: flex; flex-wrap: wrap; gap: 8px; }

html.driving, html.driving body { overflow: hidden; }
.drive {
  position: fixed; inset: 0; z-index: 100; background: #060A20; touch-action: none; user-select: none; -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.drive canvas { position: absolute; inset: 0; display: block; }
.dx-top { position: absolute; top: calc(118px + env(safe-area-inset-top)); left: 10px; display: flex; flex-direction: column; gap: 8px; }
.dx-ic {
  width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer;
  background: color-mix(in srgb, var(--ink) 10%, transparent); color: var(--ink);
}
.dx-ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.dx-ic[data-act=pause] svg { fill: currentColor; stroke: none; }
.dx-ic.off { opacity: .45; }
.dx-pad { position: absolute; bottom: calc(14px + env(safe-area-inset-bottom)); display: flex; gap: 10px; align-items: flex-end; }
.dx-steer { left: 12px; }
.dx-col { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.dx-pedals { right: 12px; }
.dx-pad button {
  border: 0; cursor: pointer; color: var(--ink); font: 800 15px var(--body); touch-action: none;
  background: color-mix(in srgb, var(--ink) 12%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1.5px solid color-mix(in srgb, var(--ink) 18%, transparent); transition: transform .06s, background .06s;
}
.dx-pad button.on { transform: scale(.94); background: color-mix(in srgb, var(--ink) 28%, transparent); }
.dx-steer button { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; }
.dx-steer svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.dx-gas { width: 78px; height: 112px; border-radius: 18px; background: rgba(54,227,154,.28) !important; border-color: rgba(54,227,154,.6) !important; }
.dx-gas.on { background: rgba(54,227,154,.5) !important; }
.dx-brake { width: 64px; height: 76px; border-radius: 16px; background: rgba(255,92,108,.22) !important; border-color: rgba(255,92,108,.5) !important; }
.dx-nitro { position: relative; overflow: hidden; width: 64px; height: 64px; border-radius: 50%; font-size: 12px !important; opacity: .55; }
.dx-nitro.ready { opacity: 1; border-color: #7FD8FF !important; box-shadow: 0 0 16px rgba(127,216,255,.5); }
.dx-nitro i { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(127,216,255,.45); transition: height .2s; }
.dx-nitro span { position: relative; }
.dx-menu { position: absolute; inset: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--deep) 70%, transparent); }
.dx-menubox { display: flex; flex-direction: column; gap: 12px; width: min(300px, 80vw); text-align: center; }
.dx-menubox h2 { font-size: 34px; margin-bottom: 8px; }
.driveresult { display: flex; flex-direction: column; gap: 12px; }
.driveresult .big { font: 800 52px/1 var(--display); color: var(--ink); }
.driveresult .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.driveresult .grid div { background: var(--deep); border-radius: var(--r-sm); padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.driveresult .grid b { font-size: 20px; }
.newbest { align-self: flex-start; padding: 4px 10px; border-radius: 999px; background: var(--money); color: #04281A; font-weight: 800; font-size: 13px; }
@media (min-width: 900px) and (pointer: fine) { .dx-pad { opacity: .7; } }

/* ---------- street fight hub ---------- */
#rankTabs { overflow-x: auto; scrollbar-width: none; }
#rankTabs button { flex: 1 0 auto; padding: 0 12px; }
.tabbar a { min-width: 0; }
.tabbar a span { white-space: nowrap; }
.fighthero {
  display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: end; padding: 16px 16px 0; border-radius: var(--r-lg);
  background: radial-gradient(120% 90% at 20% 0%, #C4386A 0%, #3B0F18 55%, #120814 100%); overflow: hidden; border: 1px solid var(--line);
}
.fighthero canvas { width: 120px; height: 170px; display: block; }
.fighthero-t { padding-bottom: 16px; display: flex; flex-direction: column; gap: 8px; }
.fighthero h1 { font-size: 30px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches button { width: 30px; height: 30px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--ink) 20%, transparent); background: var(--c); cursor: pointer; }
.swatches button[aria-checked="true"] { border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 15%, transparent); }
.ladder { display: flex; flex-direction: column; gap: 8px; }
.rung { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: var(--r-md); background: var(--panel); border: 1px solid var(--line); }
.rung.next { border-color: var(--pink); box-shadow: 0 0 0 1px rgba(255,107,154,.3) inset; }
.rung.locked { opacity: .55; }
.rung .avatar { width: 56px; height: 72px; }
.rung .t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rung .pw { display: inline-flex; gap: 4px; margin-left: 8px; vertical-align: middle; }
.rung .pw svg, .power .orb svg { width: 16px; height: 16px; fill: var(--pc); }
.rung .lock svg { width: 24px; height: 24px; fill: none; stroke: var(--muted); stroke-width: 2; }
.powers { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.power { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: var(--r-md); background: var(--panel); border: 1px solid var(--line); }
.power.on { border-color: var(--pc); box-shadow: 0 0 18px -6px var(--pc); }
.power.notowned .orb { filter: grayscale(.6); opacity: .7; }
.power .orb {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle, color-mix(in srgb, var(--pc) 45%, transparent) 0%, transparent 70%);
}
.power .orb svg { width: 28px; height: 28px; filter: drop-shadow(0 0 6px var(--pc)); }
.power.on .orb { animation: orb 2.2s ease-in-out infinite; }
.power.big { align-items: center; border: 0; background: transparent; }
.power.big .orb { width: 96px; height: 96px; animation: orb 2.2s ease-in-out infinite; }
.power.big .orb svg { width: 56px; height: 56px; }
@keyframes orb { 50% { transform: scale(1.08); filter: brightness(1.25); } }

/* ---------- in the fight ---------- */
.fight { position: fixed; inset: 0; z-index: 100; background: #05060B; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.fight canvas { position: absolute; inset: 0; display: block; }
.fx-top { top: calc(10px + env(safe-area-inset-top)); flex-direction: row; }
.fx-pad { position: absolute; bottom: calc(14px + env(safe-area-inset-bottom)); display: flex; gap: 14px; align-items: flex-end; }
.fx-solo { left: 12px; right: 12px; justify-content: space-between; }
.fx-left { left: 10px; }
.fx-right { right: 10px; flex-direction: row-reverse; }
.fx-dpad { display: grid; grid-template-columns: repeat(3, 52px); grid-template-rows: repeat(3, 46px); gap: 4px; }
.fx-dpad [data-k=up] { grid-area: 1 / 2; }
.fx-dpad [data-k=left] { grid-area: 2 / 1; }
.fx-dpad [data-k=right] { grid-area: 2 / 3; }
.fx-dpad [data-k=down] { grid-area: 3 / 2; }
.fx-act { display: grid; grid-template-columns: 70px 70px; grid-template-rows: 54px 70px; gap: 8px; }
.fx-pad button {
  border: 1.5px solid color-mix(in srgb, var(--ink) 18%, transparent); border-radius: 14px; cursor: pointer; color: var(--ink); touch-action: none;
  background: color-mix(in srgb, var(--ink) 10%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  font: 800 14px var(--body); display: grid; place-items: center; transition: transform .06s, background .06s;
}
.fx-pad button.on { transform: scale(.92); background: color-mix(in srgb, var(--ink) 28%, transparent); }
.fx-pad svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.fx-punch, .fx-kick { border-radius: 50% !important; }
.fx-punch { background: rgba(255,107,154,.26) !important; border-color: rgba(255,107,154,.6) !important; }
.fx-kick { background: color-mix(in srgb, var(--amber) 26%, transparent) !important; border-color: color-mix(in srgb, var(--amber) 60%, transparent) !important; }
.fx-pow { position: relative; overflow: hidden; opacity: .55; font-size: 12px !important; }
.fx-pow i { position: absolute; left: 0; right: 0; bottom: 0; background: color-mix(in srgb, var(--pc, #7FD8FF) 50%, transparent); transition: height .15s; }
.fx-pow span { position: relative; }
.fx-pow.ready { opacity: 1; border-color: var(--pc, #7FD8FF) !important; box-shadow: 0 0 14px var(--pc, #7FD8FF); }
.fight.two .fx-dpad { grid-template-columns: repeat(3, 40px); grid-template-rows: repeat(3, 36px); }
.fight.two .fx-act { grid-template-columns: 52px 52px; grid-template-rows: 40px 52px; gap: 6px; }
.fight.two .fx-pad { gap: 8px; }
@media (max-width: 360px) { .fx-dpad { grid-template-columns: repeat(3, 44px); grid-template-rows: repeat(3, 40px); } .fx-act { grid-template-columns: 60px 60px; grid-template-rows: 46px 60px; } }

/* ---------- living art: cars drive, lights flicker, boats bob ---------- */
.pn-wheel, .pn-body, .pn-bob, .pn-sway, .pn-puff, .pn-smoke, .pn-light, .pn-star { transform-box: fill-box; transform-origin: center; }
.pn-drive .pn-wheel { animation: pnspin .5s linear infinite; }
.pn-drive .pn-body { animation: pnride .3s ease-in-out infinite alternate; }
.pn-drive .pn-puff, .scene .pn-puff { animation: pnpuff 1.5s ease-out infinite; }
.pn-light { animation: pnglow 2.4s ease-in-out infinite; }
.pn-win { animation: pnwin 8s steps(1) infinite; }
.pn-smoke { animation: pnsmoke 2.1s ease-out infinite; }
.pn-sway { transform-origin: 50% 100%; animation: pnsway 4s ease-in-out infinite; }
.pn-bob { animation: pnbob 3s ease-in-out infinite; }
.pn-wake { animation: pnwake 2.5s linear infinite; }
.pn-star { animation: pntwinkle 3s ease-in-out infinite; }
.pn-shoot { animation: pnshoot 9s ease-in infinite; }
.pn-lamp { animation: pnlamp 5s steps(1) infinite; }
@keyframes pnspin { to { transform: rotate(360deg); } }
@keyframes pnride { to { transform: translateY(-1.2px); } }
@keyframes pnpuff { 0% { opacity: .55; transform: translate(0, 0) scale(.6); } 100% { opacity: 0; transform: translate(-18px, -10px) scale(1.8); } }
@keyframes pnglow { 50% { opacity: .65; transform: scale(1.25); } }
@keyframes pnwin { 0%, 90% { opacity: 1; } 91% { opacity: .35; } 93% { opacity: 1; } 96% { opacity: .5; } 97% { opacity: 1; } }
.pn-win.off { animation-name: pnwinoff; }
@keyframes pnwinoff { 0%, 70% { opacity: 1; } 71%, 85% { opacity: 1; fill: #F3D27A; } 86% { opacity: 1; } }
@keyframes pnsmoke { 0% { opacity: .6; transform: translate(0, 0) scale(.5); } 100% { opacity: 0; transform: translate(6px, -22px) scale(2); } }
@keyframes pnsway { 50% { transform: rotate(3deg); } }
@keyframes pnbob { 0%, 100% { transform: translateY(0) rotate(0); } 30% { transform: translateY(-2px) rotate(-1deg); } 70% { transform: translateY(1px) rotate(.8deg); } }
@keyframes pnwake { from { transform: translateX(0); } to { transform: translateX(-24px); } }
@keyframes pntwinkle { 50% { opacity: .15; } }
@keyframes pnshoot { 0%, 88% { opacity: 0; transform: translate(0, 0); } 90% { opacity: 1; } 96% { opacity: 0; transform: translate(120px, 42px); } 100% { opacity: 0; } }
@keyframes pnlamp { 0%, 80% { opacity: .1; } 81% { opacity: .02; } 83% { opacity: .12; } 85% { opacity: .03; } 87% { opacity: .1; } }

/* showroom: cars roll on a moving road, the card lifts when you touch it */
.item .art { position: relative; overflow: hidden; }
.item .art .road { position: absolute; left: 0; right: 0; bottom: 6px; height: 3px; opacity: .5;
  background: repeating-linear-gradient(90deg, var(--amber2) 0 14px, transparent 14px 30px); animation: pnroad .6s linear infinite; }
@keyframes pnroad { to { background-position: -30px 0; } }
.item { transition: transform .2s ease, box-shadow .2s ease; }
.item:hover, .item:focus-within { transform: translateY(-3px); box-shadow: 0 10px 24px -12px rgba(0,0,0,.7); }

/* "It's yours!" reveal after buying */
.reveal-item { position: relative; display: grid; place-items: center; padding: 18px 0 6px; }
.reveal-item::before { content: ""; position: absolute; width: 78%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--amber) 45%, transparent), transparent 65%); animation: pnhalo 2.4s ease-in-out infinite; }
.reveal-item .art { position: relative; width: 100%; max-width: 320px; animation: pnreveal .7s cubic-bezier(.2,1.4,.4,1) both; }
.reveal-item .art svg { width: 100%; height: auto; display: block; }
@keyframes pnhalo { 50% { transform: scale(1.1); opacity: .7; } }
@keyframes pnreveal { from { transform: scale(.4) translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .pn-wheel, .pn-body, .pn-bob, .pn-sway, .pn-puff, .pn-smoke, .pn-light, .pn-star, .pn-win, .pn-wake, .pn-shoot, .pn-lamp,
  .item .art .road, .reveal-item::before, .reveal-item .art, .power .orb { animation: none !important; }
}
.item .badge { z-index: 2; }
.league { margin: 14px 0 4px; padding: 14px; border-radius: var(--r-md); background: linear-gradient(120deg, #D9527A, #8A3B3B 60%, #2A0A10); }
.league h3 { font-size: 20px; }
.league p { color: #F5E6EE; }

/* ---------- fighter select ---------- */
.fighthero { grid-template-columns: 140px 1fr; background: radial-gradient(120% 90% at 20% 0%, color-mix(in srgb, var(--hc, #C4386A) 70%, #000) 0%, #3B0F18 55%, #120814 100%); }
.fighthero canvas { width: 140px; height: 200px; }
.fighthero h1 { font-size: 28px; line-height: 1.05; }
.kit { display: flex; flex-direction: column; gap: 6px; }
.kit .chip { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 12px; background: rgba(0,0,0,.35); border: 1px solid color-mix(in srgb, var(--pc) 50%, transparent); }
.kit .chip svg { width: 20px; height: 20px; fill: var(--pc); filter: drop-shadow(0 0 4px var(--pc)); }
.kit .chip b { display: block; font-size: 14px; }
.kit .chip small { display: block; color: var(--muted); font-size: 11px; }
.roster { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.char { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 6px 10px; border-radius: var(--r-md); cursor: pointer; text-align: center;
  background: radial-gradient(90% 70% at 50% 30%, color-mix(in srgb, var(--cc) 30%, transparent), var(--panel) 75%); border: 1.5px solid var(--line); color: var(--ink); font: inherit; }
.char canvas { width: 80px; height: 110px; }
.char b { font-size: 13px; line-height: 1.15; }
.char .small { font-size: 11px; line-height: 1.2; }
.char.on { border-color: var(--cc); box-shadow: 0 0 0 2px color-mix(in srgb, var(--cc) 40%, transparent), 0 8px 20px -10px var(--cc); }
.char.locked { opacity: .75; }
.bigchar { width: 100%; height: 260px; display: block; }
/* three power buttons on top, punch and kick below */
.fx-act { grid-template-columns: 60px 60px 60px; grid-template-rows: 50px 70px; }
.fx-act [data-k=p1] { grid-area: 1 / 1; } .fx-act [data-k=p2] { grid-area: 1 / 2; } .fx-act [data-k=p3] { grid-area: 1 / 3; }
.fx-act .fx-punch { grid-area: 2 / 1 / 3 / 3; width: 70px; justify-self: end; margin-right: 6px; }
.fx-act .fx-kick { grid-area: 2 / 3; width: 70px; }
.fight.two .fx-act { grid-template-columns: 46px 46px 46px; grid-template-rows: 38px 52px; }
.fight.two .fx-act .fx-punch, .fight.two .fx-act .fx-kick { width: 52px; }

/* ---------- circuit race card ---------- */
.circuitcard { position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 20px; display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--line);
  background: linear-gradient(135deg, color-mix(in srgb, var(--night) 20%, transparent), color-mix(in srgb, var(--night) 95%, transparent) 60%), repeating-linear-gradient(90deg, #FBEFD9 0 14px, #14141A 14px 28px) top / 100% 14px no-repeat, linear-gradient(160deg, #5A1320, #2A0A10); }
.circuitcard .ctop { padding-top: 10px; }
.circuitcard h2 { font-size: 28px; }
.routes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.route { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--ink) 6%, transparent); border: 1.5px solid var(--line); color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
.route b { font-size: 14px; }
.route.on { border-color: var(--amber); background: color-mix(in srgb, var(--amber) 12%, transparent); }
.podium { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.podium li { display: grid; grid-template-columns: 44px 1fr auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: var(--r-sm); background: var(--deep); }
.podium li.me { background: color-mix(in srgb, var(--amber) 16%, transparent); }
.podium li.friend b { color: var(--pink); }
.podium .n { font-weight: 800; color: var(--muted); }
.newbest.lost { background: var(--bad); color: var(--on-pink); }
.hoops { position: fixed; inset: 0; z-index: 100; background: #2A0A10; touch-action: none; user-select: none; -webkit-user-select: none; } .hoops canvas { position: absolute; inset: 0; display: block; } .hx-top { top: calc(10px + env(safe-area-inset-top)); flex-direction: row; }

/* ---------- hoops tab ---------- */
.hoopshero { position: relative; overflow: hidden; display: flex; justify-content: space-between; gap: 12px; padding: 20px; border-radius: var(--r-lg); border: 1px solid var(--line);
  background: radial-gradient(70% 60% at 25% 85%, #F3D27A 0%, transparent 60%), linear-gradient(180deg, #2A0A10 0%, #C4386A 55%, #FFB05A 100%); }
.hoopshero h1 { font-size: 34px; }
.hoopshero p { color: #FCE9EF; max-width: 30ch; }
.hoopshero .bests { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; font-size: 14px; color: #FCE9EF; }
.hoopball { flex: 0 0 auto; width: 92px; height: 92px; border-radius: 50%; align-self: center; border: 3px solid #1A0C06;
  background: radial-gradient(circle at 35% 30%, #FFA15A, #C24E12 70%), #C24E12; box-shadow: 0 10px 24px -8px rgba(0,0,0,.6); position: relative; animation: hoopbounce 1.2s cubic-bezier(.3,0,.7,1) infinite alternate; }
.hoopball::before, .hoopball::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2.5px solid #2A1206; }
.hoopball::before { clip-path: inset(0 48% 0 48%); }
.hoopball::after { clip-path: inset(48% 0 48% 0); }
@keyframes hoopbounce { from { transform: translateY(-10px); } to { transform: translateY(8px) scale(1.04, .96); } }
.modes { display: grid; gap: 10px; }
.mode { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 16px; border-radius: var(--r-md); background: var(--panel); border: 1px solid var(--line); color: var(--ink); font: inherit; cursor: pointer; }
.mode b { font-size: 17px; }
.robots { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
@media (prefers-reduced-motion: reduce) { .hoopball { animation: none; } }
.tabbar a span { font-size: 11px; }

/* ---------- profile and account ---------- */
.avatar-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; text-decoration: none; font-weight: 800; color: var(--on-accent);
  background: var(--amber); border: 2px solid var(--amber2); position: relative; flex: 0 0 auto; }
.avatar-btn.guest { background: var(--panel2); color: var(--ink); border-color: var(--line); }
.avatar-btn.guest::after { content: ""; position: absolute; top: -2px; right: -2px; width: 11px; height: 11px; border-radius: 50%; background: var(--pink); border: 2px solid var(--night); }
.avatar-btn[aria-current] { box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber) 35%, transparent); }
.profilehead { display: flex; align-items: center; gap: 16px; padding: 8px 0; }
.bigavatar { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; font: 800 34px var(--display); color: var(--on-accent);
  background: radial-gradient(circle at 30% 30%, var(--amber2), var(--amber)); flex: 0 0 auto; }
.profilehead h1 { font-size: 28px; word-break: break-word; }
.savecard { border-color: var(--pink); }
.authform { display: flex; flex-direction: column; gap: 12px; }
.authform label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.pstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pstat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.pstat b { font-size: 17px; }
.powned { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pitem { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.pitem.on { border-color: var(--amber); }
.pitem .art svg { width: 100%; height: auto; display: block; }
.acct .row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.acct .row:last-of-type { border-bottom: 0; }
.topstats { align-items: center; }
@media (max-width: 380px) { .pstats, .powned { grid-template-columns: repeat(2, 1fr); } }

/* ---------- episodes ---------- */
.nextep { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.nextep small { font-weight: 600; opacity: .75; font-size: 13px; }
.seasondone { margin-top: 6px; padding: 18px; border-radius: var(--r-md); text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center;
  background: radial-gradient(90% 80% at 50% 0%, color-mix(in srgb, var(--amber) 22%, transparent), transparent 70%), var(--panel); border: 1.5px dashed var(--amber); }
.seasondone .badge { position: static; padding: 4px 12px; border-radius: 999px; background: var(--money); color: #04281A; font-weight: 800; font-size: 13px; }
.seasondone h3 { font-size: 22px; }
.seasondone .dropclock { justify-content: center; }
.seasondone .actions { justify-content: center; }
.eprog { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; font-weight: 700; font-size: 14px; }
.eprog .bar { height: 8px; border-radius: 999px; background: var(--deep); overflow: hidden; }
.eprog .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--amber), var(--money)); }

/* ---------- video player ---------- */
.stage video { cursor: pointer; }
.vplayer { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.vbig { pointer-events: auto; position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); width: 76px; height: 76px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: color-mix(in srgb, var(--night) 72%, transparent); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); box-shadow: 0 0 0 2px color-mix(in srgb, var(--amber) 70%, transparent); }
.vbig svg { width: 34px; height: 34px; fill: currentColor; margin-left: 4px; }
.vbig[hidden] { display: none; }
.vbar { pointer-events: auto; position: absolute; left: 10px; right: 10px; top: 10px; display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 999px;
  background: rgba(5,8,26,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transform: translateY(-6px); transition: opacity .2s, transform .2s; }
.stage.vshow .vbar, .stage.vpaused .vbar, .vbar:focus-within { opacity: 1; transform: none; }
.vbtn { flex: 0 0 auto; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: #fff; cursor: pointer; display: grid; place-items: center; }
.vbtn:hover { background: color-mix(in srgb, var(--ink) 12%, transparent); }
.vbtn svg { width: 22px; height: 22px; fill: currentColor; stroke: currentColor; stroke-width: 0; }
.vbtn svg path[d^="M4 9V4"], .vbtn svg path[d^="M9 4v5"], .vbtn svg path[d*="M16 8.5"], .vbtn svg path[d*="M17 9l5"] { fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.vseek { flex: 1 1 auto; min-width: 0; height: 4px; accent-color: var(--amber); cursor: pointer; padding: 0; min-height: 0; border: 0; background: transparent; }
.vtime { flex: 0 0 auto; font-size: 12px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.stage.vfull { max-height: none; aspect-ratio: auto; width: 100vw; height: 100vh; background: #000; }
.stage.vfull video { object-fit: contain; }
.stage.vfull .shade, .stage.vfull .meta { display: none; }
@media (max-width: 360px) { .vtime { display: none; } }
.vsound { pointer-events: auto; position: absolute; right: 12px; top: 64px; display: flex; align-items: center; gap: 6px; padding: 8px 14px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--amber); color: var(--on-accent); font: 800 14px var(--body); animation: vpulse 1.6s ease-in-out infinite; }
.vsound svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@keyframes vpulse { 50% { transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .vsound { animation: none; } }

/* ---------- hoops 1 on 1 controls ---------- */
.hp-pad { position: absolute; bottom: calc(16px + env(safe-area-inset-bottom)); display: flex; gap: 14px; align-items: flex-end; }
.hp-solo { left: 14px; right: 14px; justify-content: space-between; }
.hp-left { left: 10px; } .hp-right { right: 10px; flex-direction: row-reverse; }
.hp-move, .hp-act { display: flex; gap: 10px; align-items: flex-end; }
.hp-pad button { border: 1.5px solid color-mix(in srgb, var(--ink) 20%, transparent); color: #fff; cursor: pointer; touch-action: none; display: grid; place-items: center; font: 800 15px var(--body);
  background: color-mix(in srgb, var(--ink) 12%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: transform .06s, background .06s; }
.hp-pad button.on { transform: scale(.92); background: color-mix(in srgb, var(--ink) 30%, transparent); }
.hp-move button { width: 72px; height: 72px; border-radius: 50%; }
.hp-move svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.hp-jump { width: 70px; height: 70px; border-radius: 50%; background: rgba(127,216,255,.28) !important; border-color: rgba(127,216,255,.6) !important; }
.hp-shoot { width: 88px; height: 88px; border-radius: 50%; background: color-mix(in srgb, var(--amber) 32%, transparent) !important; border-color: color-mix(in srgb, var(--amber) 70%, transparent) !important; }
.hp-shoot.dunk { background: rgba(255,122,26,.6) !important; border-color: #FF7A1A !important; box-shadow: 0 0 18px rgba(255,122,26,.7); }
.hp-pad.def .hp-shoot { background: rgba(54,227,154,.3) !important; border-color: rgba(54,227,154,.7) !important; }
.hoops.two .hp-move button { width: 54px; height: 54px; } .hoops.two .hp-jump { width: 54px; height: 54px; } .hoops.two .hp-shoot { width: 64px; height: 64px; font-size: 13px; }
.howto ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; color: var(--muted); } .howto b { color: var(--ink); }

/* ---------- Niger Delta Boat Race Championship ---------- */
.champcard { position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 22px 20px; display: flex; flex-direction: column; gap: 12px;
  background: linear-gradient(170deg, #5A1A26 0%, #8A3B3B 30%, #1E5A78 75%, #0E2A3A 100%); border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent); }
.champcard h2 { font-size: 28px; line-height: 1.05; position: relative; max-width: 14ch; }
.champcard p { position: relative; max-width: 38ch; margin: 0; }
.champcard .btn { position: relative; align-self: flex-start; }
.champcard .water { position: absolute; inset: auto 0 0 0; height: 110px; opacity: .55; pointer-events: none;
  background: repeating-linear-gradient(172deg, transparent 0 12px, color-mix(in srgb, var(--ink) 18%, transparent) 12px 14px), linear-gradient(transparent, #123A4F); }
.champstates { position: relative; display: flex; flex-wrap: wrap; gap: 6px; }
.champstates .st { font-size: 13px; padding: 4px 10px; border-radius: 99px; background: color-mix(in srgb, var(--deep) 55%, transparent); border-left: 4px solid var(--c); }

html.storying, html.storying body { overflow: hidden; }
.bs { position: fixed; inset: 0; z-index: 90; background: var(--deep); display: flex; flex-direction: column; }
.bs-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--night); }
.bs-top b { font-family: var(--display); font-size: 16px; line-height: 1.15; }
.bs-x { min-width: 44px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: transparent; color: var(--ink); font: 700 20px var(--body); cursor: pointer; padding: 0 10px; }
.bs-main { flex: 1; min-height: 0; display: grid; grid-template-rows: 1fr minmax(150px, 28vh); }
.bs-stage { overflow-y: auto; }
.bs-scene { position: relative; aspect-ratio: 16 / 9; max-height: 30vh; width: 100%; overflow: hidden; background: #000; }
.bs-scene video, .bs-art, .bs-art svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.bs-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 16px 12px; background: linear-gradient(transparent, color-mix(in srgb, var(--deep) 90%, transparent)); }
.bs-cap .node { font: 700 12px var(--body); color: var(--amber); }
.bs-cap h2 { font-size: 24px; line-height: 1.1; margin: 2px 0 4px; }
.bs-cap p { margin: 0; font-size: 14px; color: #F0E2CB; max-width: 60ch; }
.bs-body { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.bs-prompt { font: 800 18px/1.25 var(--display); margin: 0; }
.bs-choices { display: flex; flex-direction: column; gap: 8px; }
.bs-choices.grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.bs-choice { text-align: left; padding: 12px 14px; border-radius: var(--r-md); border: 1.5px solid var(--line); background: var(--panel); color: var(--ink); font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.bs-choice b { font-size: 15px; }
.bs-choice span { font-size: 13px; color: var(--muted); }
.bs-choice:hover, .bs-choice:focus-visible { border-color: var(--amber); }
.bs-choice.risk { border-color: rgba(255,92,108,.5); }
.bs-choice.flag { border-left: 6px solid var(--c); padding: 10px; }
.bs-choice.flag b { font-size: 14px; }
.bs-lock { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--r-md); background: color-mix(in srgb, var(--amber) 10%, transparent); border: 1.5px solid var(--amber); }
.bs-lock h3, .bs-modal h3 { margin: 0; font-size: 20px; line-height: 1.15; }
.bs-lock p, .bs-modal p { margin: 0; }
.bs-badge { width: 120px; aspect-ratio: 4 / 5; border-radius: 10px; object-fit: cover; background: var(--panel); }
.bs-share { display: flex; flex-wrap: wrap; gap: 8px; }
.bs-share .btn { padding: 10px 16px; }
.linkbtn { background: none; border: 0; color: var(--muted); text-decoration: underline; font: inherit; cursor: pointer; padding: 6px 0; align-self: flex-start; text-align: left; }
.bs-panel { min-height: 0; display: flex; flex-direction: column; border-top: 1px solid var(--line); background: var(--night); }
.bs-tabs { display: flex; gap: 4px; padding: 8px 12px 0; }
.bs-tabs button { flex: 1; padding: 9px 8px; border: 0; border-radius: 10px 10px 0 0; background: transparent; color: var(--muted); font: 700 14px var(--body); cursor: pointer; }
.bs-tabs button[aria-selected="true"] { background: var(--panel); color: var(--ink); }
.bs-gist, .bs-lounge { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 6px; padding: 8px 12px 12px; background: var(--panel); }
.bs-gist > p, .bs-lounge > p { margin: 0; }
.bs-feed, .bs-msgs { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.gist-post { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 12px; background: color-mix(in srgb, var(--ink) 4%, transparent); animation: gistIn .35s ease-out; }
.gist-post.good { background: rgba(54,227,154,.08); }
.gist-post.bad { background: rgba(255,92,108,.09); }
.gist-post .av { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font: 800 14px var(--display); color: var(--on-accent); text-transform: uppercase; }
.gist-post b { font-size: 14px; }
.gist-post .chip { font-size: 11px; margin-left: 6px; padding: 1px 6px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 10%, transparent); color: var(--muted); }
.gist-post p { margin: 2px 0 0; font-size: 14px; line-height: 1.35; }
@keyframes gistIn { from { opacity: 0; transform: translateY(-6px); } }
.bs-compose { display: flex; gap: 8px; }
.bs-compose input { flex: 1; min-width: 0; }
.bs-end { display: flex; flex-direction: column; gap: 12px; }
.bs-end .tag { align-self: flex-start; font: 700 12px var(--body); padding: 3px 10px; border-radius: 99px; background: color-mix(in srgb, var(--amber) 16%, transparent); color: var(--amber); }
.bs-end.C .tag, .bs-end.D .tag { background: rgba(255,92,108,.16); color: var(--bad); }
.bs-end .bs-choices { flex-direction: row; flex-wrap: wrap; align-items: center; }
.bs-table ol { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.bs-table li { display: flex; justify-content: space-between; padding: 6px 10px; border-radius: 8px; background: var(--panel); font-size: 14px; }
.bs-table li.me { outline: 1.5px solid var(--amber); }
/* inside the race */
.bs-over { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.bs-ticker { position: absolute; left: 68px; right: 12px; top: 100px; max-width: 360px; }
.bs-ticker .gist-post { background: color-mix(in srgb, var(--night) 88%, transparent); border: 1px solid var(--line); transition: opacity .5s, transform .5s; }
.bs-ticker .gist-post.out { opacity: 0; transform: translateY(-8px); }
.bs-host { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; }
.bs-host:empty { display: none; }
.bs-modal { pointer-events: auto; width: min(420px, 100%); max-height: 90%; overflow-y: auto; padding: 18px; border-radius: var(--r-lg); background: color-mix(in srgb, var(--night) 96%, transparent); border: 1.5px solid var(--amber); display: flex; flex-direction: column; gap: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
@media (min-width: 900px) {
  .bs-main { grid-template-rows: none; grid-template-columns: 1fr 380px; }
  .bs-panel { border-top: 0; border-left: 1px solid var(--line); }
  .bs-scene { max-height: 56vh; }
}
@media (max-width: 380px) { .bs-choices.grid { grid-template-columns: repeat(2, 1fr); } }
@media (prefers-reduced-motion: reduce) { .gist-post { animation: none; } }

/* ---------- the Wahala cinema ---------- */
body { overflow-x: clip; }
/* the top bar's band runs the full width of the window, like the cinema below it */
.topbar { box-shadow: 0 0 0 100vmax color-mix(in srgb, var(--night) 86%, transparent); clip-path: inset(0 -100vmax); }
#todayCard { margin: -4px -16px 0; }
.today.cinema { position: relative; display: flex; flex-direction: column; height: calc(100dvh - 160px); border-radius: 0; overflow: hidden; background: #030409; }
@media (min-width: 600px) { #todayCard { width: 100vw; margin-left: calc(50% - 50vw); margin-right: 0; } }
.cinema .stage { flex: 1 1 auto; min-height: 0; max-height: none; aspect-ratio: auto; background: #000; align-items: stretch; overflow: hidden; }
.cinema .stage video { object-fit: contain; z-index: 1; }
.cinema .stage.poster .still { z-index: 1; }
.cinema .stage .ambient { position: absolute; inset: -12%; width: 124%; height: 124%; filter: blur(48px) saturate(1.5) brightness(.75); opacity: .9; z-index: 0; pointer-events: none; }
.cinema .vignette { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(0,0,0,.55)); }
.cinema .vbig { top: 50%; width: 84px; height: 84px; background: rgba(0,0,0,.45); box-shadow: 0 0 0 2px color-mix(in srgb, var(--amber) 85%, transparent), 0 10px 40px rgba(0,0,0,.5); }
.cinema .vbar { top: auto; left: 0; right: 0; bottom: 0; border-radius: 0; flex-direction: column; align-items: stretch; gap: 2px; padding: 34px 14px 8px;
  background: linear-gradient(transparent, rgba(0,0,0,.82)); backdrop-filter: none; -webkit-backdrop-filter: none; transform: translateY(8px); }
.cinema .vseek { width: 100%; height: 4px; }
.vrow { display: flex; align-items: center; gap: 6px; }
.vsp { flex: 1; }
.cinema .vsound { top: auto; right: auto; left: 50%; bottom: 78px; transform: translateX(-50%); animation: none; box-shadow: 0 6px 24px rgba(0,0,0,.4); }
.seat { flex: 0 0 auto; max-height: 56%; overflow-y: auto; padding: 14px 18px 16px; display: flex; flex-direction: column; gap: 10px;
  background: linear-gradient(#07080F, #1A0509); border-top: 1px solid color-mix(in srgb, var(--amber) 22%, transparent); }
.seat > * { width: 100%; max-width: 760px; margin-left: auto; margin-right: auto; }
.marquee { display: flex; flex-direction: column; gap: 4px; }
.marquee .place { background: none; padding: 0; color: var(--amber); font-size: 13px; }
.marquee h2 { font-size: clamp(22px, 5.6vw, 32px); }
.seat .qbox { padding: 0; gap: 10px; }
.seat .question { font-size: 15.5px; line-height: 1.45; font-weight: 500; color: #E4E0D6; }
.seat .choices { grid-template-columns: 1fr 1fr; gap: 8px; }
.seat .choice { min-height: 56px; padding: 10px 12px; font-size: 15px; line-height: 1.25; background: color-mix(in srgb, var(--ink) 4%, transparent); }
.seat .choice .k { font-size: 20px; }
.seat .timer { height: 3px; }
.asklink { align-self: flex-start; font-size: 13px; font-weight: 700; color: #6EE7A0; text-decoration: none; }
.asklink:hover { text-decoration: underline; }
.seat .reveal { padding: 0; gap: 12px; }
.seat .deltas { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.seat .delta { padding: 8px; }
.seat .delta b { font-size: 18px; }
.seat .dropclock { padding: 10px 0 0; }
.today.cinema + .streakbar, #todayCard + .streakbar { margin-top: 14px; }
@media (max-width: 359px) { .seat .choices { grid-template-columns: 1fr; } }
/* wide screens: the film on the left, the story and choices in a side panel */
@media (min-width: 980px) and (min-aspect-ratio: 5 / 4) {
  .today.cinema { flex-direction: row; }
  .seat { width: 400px; max-height: none; border-top: 0; border-left: 1px solid color-mix(in srgb, var(--amber) 22%, transparent); padding: 24px; }
  .seat > :first-child { margin-top: auto; } .seat > :last-child { margin-bottom: auto; }
  .seat .choices { grid-template-columns: 1fr; }
  .seat .deltas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.cinema .stage.poster { aspect-ratio: auto; }
/* the scene line reads like subtitles at the bottom of the screen */
.cinema .stage .still .cap { top: auto; bottom: 22px; left: 50%; right: auto; transform: translateX(-50%); width: min(86%, 720px); text-align: center;
  border-left: 0; border-radius: 10px; padding: 10px 16px; background: rgba(0,0,0,.62); font-size: 16px; }

/* ---------- game controls readable on any background (bright skies, white clouds, night) ---------- */
.dx-pad, .fx-pad, .hp-pad { opacity: 1 !important; }
.dx-pad button, .fx-pad button, .hp-pad button, .dx-ic {
  background: rgba(10, 14, 36, .78) !important; color: #fff !important; border: 2px solid color-mix(in srgb, var(--ink) 55%, transparent) !important;
  box-shadow: 0 4px 14px rgba(0,0,0,.45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  text-shadow: 0 1px 2px rgba(0,0,0,.6); font-weight: 800;
}
.dx-pad button.on, .fx-pad button.on, .hp-pad button.on { background: color-mix(in srgb, var(--ink) 35%, transparent) !important; }
.dx-pad .dx-gas { background: rgba(20, 120, 80, .85) !important; border-color: #36E39A !important; }
.dx-pad .dx-brake { background: rgba(140, 30, 45, .85) !important; border-color: #FF5C6C !important; }
.fx-pad .fx-punch { background: rgba(150, 30, 70, .88) !important; border-color: #C23B4E !important; }
.fx-pad .fx-kick { background: color-mix(in srgb, var(--amber) 80%, #000) !important; border-color: var(--amber) !important; }
.hp-pad .hp-jump { background: rgba(20, 90, 140, .85) !important; border-color: #7FD8FF !important; }
.hp-pad .hp-shoot { background: color-mix(in srgb, var(--amber) 80%, #000) !important; border-color: var(--amber) !important; }
.hp-pad.def .hp-shoot { background: rgba(20, 120, 80, .88) !important; border-color: #36E39A !important; }
/* powers and nitro: dimmer while charging, glowing when ready, but always visible */
.fx-pow, .dx-nitro { opacity: .85 !important; }
.fx-pow.ready, .dx-nitro.ready { opacity: 1 !important; }

/* the funny card a choice earns you */
.pcard { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 16px;
  background: linear-gradient(var(--panel), var(--panel)) padding-box, linear-gradient(135deg, var(--amber), var(--pink)) border-box; border: 2px solid transparent;
  animation: cardIn .45s cubic-bezier(.2,1.3,.4,1) both; }
.pcard .lbl { font-size: 12px; font-weight: 700; color: var(--muted); }
.pcard b { font-family: var(--display); font-size: 22px; line-height: 1.1; color: var(--amber); }
.pcard p { font-size: 14.5px; line-height: 1.4; color: #E4E0D6; }
.pcard .share { align-self: flex-start; margin-top: 4px; font-size: 13px; font-weight: 800; color: #6EE7A0; text-decoration: none; }
.pcard .share:hover { text-decoration: underline; }
@keyframes cardIn { from { opacity: 0; transform: translateY(10px) rotate(-1.5deg) scale(.96); } }
@media (prefers-reduced-motion: reduce) { .pcard { animation: none; } }

/* decision countdown */
.timer { display: flex; align-items: center; gap: 10px; height: auto !important; background: none !important; overflow: visible !important; }
.timer[hidden] { display: none; }
.timer .track { flex: 1; height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; }
.timer .track i { display: block; height: 100%; width: 100%; background: var(--amber); transition: width 1s linear; }
.timer b { min-width: 2ch; text-align: right; font-family: var(--display); font-size: 22px; color: var(--amber); font-variant-numeric: tabular-nums; }
.timer.hot .track i { background: var(--bad); } .timer.hot b { color: var(--bad); }
.bigcount { position: absolute; top: 16px; right: 16px; z-index: 4; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0,0,0,.55); border: 3px solid var(--amber); color: #fff; font: 800 28px var(--display); font-variant-numeric: tabular-nums; pointer-events: none;
  box-shadow: 0 6px 24px rgba(0,0,0,.4); }
.bigcount.hot { border-color: var(--bad); color: #FFD6DA; }
.bigcount.tick { animation: tick .35s ease-out; }
@keyframes tick { from { transform: scale(1.25); } }
@media (prefers-reduced-motion: reduce) { .bigcount.tick { animation: none; } }

/* 3D shop pictures */
.art3d { width: 100%; height: 100%; display: grid; place-items: center; }
.art3d img { width: 100%; height: 100%; object-fit: contain; display: block; }
.art3d svg { width: 100%; height: 100%; }
.reveal-item .art3d img { height: auto; }
.pitem .art3d img { height: auto; }

/* ---------- My PH Life in 3D ---------- */
.life3d { position: fixed; inset: 0; z-index: 90; background: var(--deep); color: var(--ink); touch-action: none; overscroll-behavior: none; }
.life3d canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
.life3d canvas:active { cursor: grabbing; }
.l3-top, .l3-angles, .l3-hint, .l3-panel, .l3-bottom { position: absolute; left: 12px; right: 12px; }
.l3-top { top: calc(10px + env(safe-area-inset-top)); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.l3-top > div:first-child { display: flex; flex-direction: column; min-width: 0; }
.l3-top b { font-family: var(--display); font-size: 1.25rem; line-height: 1.1; text-shadow: 0 2px 10px #000a; }
.l3-worth { color: var(--money); font-weight: 700; font-size: .9rem; text-shadow: 0 2px 10px #000a; }
.l3-top .l3-btn { white-space: nowrap; padding: 9px 14px; }
.l3-topbtns { display: flex; gap: 8px; align-items: center; }
.l3-angles { top: calc(66px + env(safe-area-inset-top)); display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.l3-angles button { flex: none; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--hair); background: color-mix(in srgb, var(--deep) 80%, transparent); color: var(--ink); font: inherit; font-size: .85rem; cursor: pointer; }
.l3-angles button[aria-pressed="true"] { background: var(--amber); color: var(--on-accent); border-color: var(--amber); font-weight: 700; }
.l3-hint { top: calc(110px + env(safe-area-inset-top)); margin: 0; font-size: .82rem; color: #fff; text-shadow: 0 1px 6px #000; pointer-events: none; }
.l3-btn { padding: 10px 16px; border-radius: 12px; border: 1px solid var(--amber); background: var(--amber); color: var(--on-accent); font: inherit; font-weight: 700; cursor: pointer; }
.l3-btn.ghost { background: color-mix(in srgb, var(--deep) 85%, transparent); color: var(--ink); border-color: var(--hair); }
.l3-btn[aria-pressed="true"] { background: var(--pink); border-color: var(--pink); color: #fff; }
.l3-btn:disabled { opacity: .5; cursor: default; }
.l3-x { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--hair); background: color-mix(in srgb, var(--deep) 85%, transparent); color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.l3-x.small { width: 32px; height: 32px; font-size: 1.1rem; }
.l3-bottom { bottom: calc(14px + env(safe-area-inset-bottom)); display: flex; gap: 10px; }
.l3-bottom .l3-btn { flex: 1; padding: 13px; }
.l3-panel { bottom: calc(74px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--deep) 92%, transparent); border: 1px solid var(--line); border-radius: 16px; padding: 12px; max-width: 520px; margin: 0 auto; }
.l3-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.l3-acts { margin-top: 10px; justify-content: flex-start; flex-wrap: wrap; }
.l3-acts .l3-btn { padding: 8px 12px; font-size: .85rem; }
.l3-swatches { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; margin-top: 10px; }
.l3-sw { aspect-ratio: 1; border-radius: 50%; border: 2px solid #ffffff33; cursor: pointer; padding: 0; }
.l3-sw.on { border-color: #fff; box-shadow: 0 0 0 3px var(--amber); }
.life3d button:focus-visible { outline: 3px solid var(--amber2); outline-offset: 2px; }
@media (min-width: 720px) { .l3-panel { left: auto; right: 16px; width: 360px; bottom: 80px; } .l3-bottom { left: auto; width: 360px; right: 16px; } }

/* PH Life screen: the 3D plot fills the space between the top bar and the tab bar */
/* edge to edge: full width of the screen, from under the top bar down to the tab bar */
html, body { overflow-x: clip; }
.scene.is3d { position: relative; height: calc(100svh - 150px); min-height: 360px; line-height: normal; width: 100vw; margin: -4px 0 0 calc(50% - 50vw); border-radius: 0; border: 0; }
.life3d.inline { position: absolute; z-index: 1; }
.life3d.inline canvas { touch-action: pan-y; }
.life3d.inline.arranging canvas { touch-action: none; }
.life3d.inline .l3-top { top: 12px; }
.life3d.inline .l3-angles { top: 84px; }
.life3d.inline .l3-hint { top: 128px; }
.life3d.inline .l3-bottom { bottom: 12px; }
.life3d.inline .l3-panel { bottom: 70px; }
.l3-worth { font-size: 1.05rem; }
.l3-zoom { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 6px; }
.l3-zoom button { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--hair); background: color-mix(in srgb, var(--deep) 85%, transparent); color: #fff; font-size: 1.3rem; line-height: 1; cursor: pointer; }
.l3-top > div:first-child { background: color-mix(in srgb, var(--deep) 78%, transparent); border: 1px solid var(--hair); border-radius: 14px; padding: 8px 12px; }
.l3-top b, .l3-worth { text-shadow: none; }
#shopTabs { scroll-margin-top: 84px; }

/* anime impact frame: a split second of black-and-white negative on big hits */
.fight.impact .fx-gl, .fight.impact .fx-2d { filter: invert(1) grayscale(1) contrast(1.8); }
@media (prefers-reduced-motion: reduce) { .fight.impact .fx-gl, .fight.impact .fx-2d { filter: none; } }

/* fight hub: the combo list */
.combos summary { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; }
.combos summary::-webkit-details-marker { display: none; }
.combos summary h2 { margin: 0; }
.combos summary h2::after { content: " +"; color: var(--amber); }
.combos[open] summary h2::after { content: " −"; }
.movelist { margin: 12px 0 0; display: grid; gap: 8px; }
.movelist div { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.movelist dt { font-weight: 800; color: var(--amber2); }
.movelist dd { margin: 2px 0 0; color: var(--muted); font-size: .92rem; }
/* Link Up: call your partner in (sits above the power buttons) */
.fx-act { position: relative; }
.fx-act .fx-as { position: absolute; right: 0; bottom: calc(100% + 8px); width: 132px; height: 40px; border-radius: 999px; font-weight: 800; }
.fight.two .fx-act .fx-as { width: 100px; height: 34px; }

/* ---------- Chat ---------- */
.chatview { display: flex; flex-direction: column; gap: 0; margin: -4px -16px -24px; position: relative; background: linear-gradient(180deg, var(--night) 0%, var(--deep) 100%); }
.chattop { padding: 10px 16px 10px; border-bottom: 1px solid var(--line); background: var(--night); }
.rooms { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 8px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.rooms::-webkit-scrollbar { display: none; }
.rooms button { flex: none; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; padding: 7px 13px; border-radius: 999px; cursor: pointer; }
.rooms button[aria-selected="true"] { background: var(--ink); color: var(--night); border-color: var(--ink); }
.roomline { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.roomline h1 { font-family: var(--display); font-size: 20px; line-height: 1.15; margin: 0; }
.roomline p { margin: 2px 0 0; }
.roomline .btn { white-space: nowrap; border-color: #36E39A66; color: var(--money); }
.msgs { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 12px 10px; display: flex; flex-direction: column; gap: 2px; }
.chatempty { margin: auto; text-align: center; display: flex; flex-direction: column; gap: 4px; color: var(--muted); padding: 40px 20px; }
.chatempty b { color: var(--ink); font-family: var(--display); font-size: 18px; }
.daysep { display: flex; justify-content: center; margin: 12px 0 8px; }
.daysep span { font-size: 12px; font-weight: 700; color: var(--muted); background: var(--panel); border: 1px solid var(--line); padding: 3px 10px; border-radius: 999px; }
.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 86%; align-self: flex-start; margin-top: 10px; }
.msg.grouped { margin-top: 2px; }
.msg.grouped .av { visibility: hidden; }
.msg .mcol { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.av { --av: var(--amber); flex: none; width: 32px; height: 32px; border-radius: 50%; border: 0; display: grid; place-items: center; font-weight: 800; font-size: 14px; color: var(--on-accent); background: var(--av); cursor: pointer; padding: 0; }
.av.big { width: 52px; height: 52px; font-size: 22px; cursor: default; }
.msg .by { display: flex; gap: 6px; align-items: baseline; padding-left: 4px; font-size: 12.5px; }
.msg .by span { color: var(--muted); }
.msg .bubble { position: relative; padding: 8px 12px 18px; min-width: 64px; border-radius: 18px 18px 18px 6px; background: var(--panel2); line-height: 1.4; overflow-wrap: anywhere; cursor: pointer; }
.msg.grouped .bubble { border-radius: 6px 18px 18px 6px; }
.msg .bubble time { position: absolute; right: 10px; bottom: 4px; font-size: 10.5px; color: var(--muted); }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg.mine .bubble { background: var(--amber); color: var(--on-accent); border-radius: 18px 18px 6px 18px; cursor: default; }
.msg.mine.grouped .bubble { border-radius: 18px 6px 6px 18px; }
.msg.mine .bubble time { color: #5A4310; }
.msg.pinged .bubble { box-shadow: 0 0 0 2px var(--pink); }
.mention { color: var(--amber2); font-weight: 800; }
.msg.mine .mention { color: #6A2A00; }
.mention.me { background: color-mix(in srgb, var(--amber) 18%, transparent); padding: 0 3px; border-radius: 4px; color: var(--amber); }
.msg .alert { font-size: 12px; color: var(--bad); font-weight: 700; padding-left: 4px; }
.cashcard { align-self: center; display: flex; align-items: center; gap: 12px; margin: 12px 0; padding: 12px 16px; border-radius: 18px; width: min(340px, 92%);
  background: radial-gradient(120% 140% at 0% 0%, #36E39A33, transparent 60%), #13213C; border: 1px solid #36E39A55; }
.cashcard.tome { border-color: var(--money); box-shadow: 0 0 24px #36E39A33; }
.cc-icon { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--money); color: #062414; font-weight: 900; font-size: 20px; }
.cashcard div { flex: 1; min-width: 0; }
.cashcard p { margin: 0; font-size: 13px; color: var(--muted); }
.cashcard p b { color: var(--ink); }
.cashcard strong { display: block; font-family: var(--display); font-size: 22px; color: var(--money); line-height: 1.15; }
.cashcard q { display: block; font-size: 13px; color: var(--ink); margin-top: 2px; overflow-wrap: anywhere; }
.cashcard time { align-self: flex-start; font-size: 11px; color: var(--muted); }
.newmsgs { position: absolute; left: 50%; transform: translateX(-50%); bottom: 118px; z-index: 2; border: 0; border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 13px; font-weight: 800; background: var(--pink); color: #fff; box-shadow: 0 6px 18px #0008; cursor: pointer; }
.emojis { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; padding: 6px 12px; border-top: 1px solid var(--line); background: var(--panel); }
.emojis button { flex: none; border: 0; background: none; font-size: 22px; width: 40px; height: 40px; border-radius: 10px; cursor: pointer; }
.emojis button:hover { background: var(--panel2); }
.composer { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--line); background: var(--night); }
.composer input { flex: 1; min-width: 0; border: 1px solid var(--line); background: var(--deep); color: var(--ink); border-radius: 999px; padding: 11px 16px; font: inherit; font-size: 16px; }
.composer input:focus { outline: none; border-color: var(--amber); }
.cbtn { flex: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: inherit; font-size: 20px; font-weight: 800; display: grid; place-items: center; cursor: pointer; padding: 0; }
.cbtn.cash { color: var(--money); border-color: #36E39A66; }
.cbtn.send { background: var(--amber); border-color: var(--amber); }
.cbtn.send svg { width: 20px; height: 20px; fill: var(--on-accent); }
.cbtn:focus-visible, .rooms button:focus-visible, .av:focus-visible { outline: 3px solid var(--amber2); outline-offset: 2px; }
.chatsafe { margin: 0; padding: 4px 16px 8px; font-size: 11.5px; color: var(--muted); text-align: center; background: var(--night); }
.usercard { display: flex; align-items: center; gap: 12px; }
.usercard div { display: flex; flex-direction: column; }
.usercard b { font-size: 18px; }
.useracts { display: flex; flex-direction: column; gap: 8px; }
.btn.danger { color: var(--bad); border-color: #FF5C6C66; }
.amtwrap { display: flex; align-items: center; gap: 6px; }
.amtwrap span { font-size: 22px; font-weight: 800; color: var(--money); }
.amtwrap input { font-size: 22px; font-weight: 800; }
.amtchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.amtchips .chip { border: 1px solid var(--line); background: var(--panel2); color: var(--ink); border-radius: 999px; padding: 6px 12px; font: inherit; font-weight: 700; cursor: pointer; }
.txlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.txlist li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.txlist li.empty { display: block; }
.txlist li .av { cursor: default; }
.txlist li div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.txlist li strong { font-family: var(--display); white-space: nowrap; }
.txlist li.in strong { color: var(--money); }
.txlist li.out strong { color: var(--ink); }
@media (min-width: 720px) { .chatview { margin: 0; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; } .msg { max-width: 70%; } }

/* special move list in the pause menu */
.dx-moves { text-align: left; background: color-mix(in srgb, var(--night) 90%, transparent); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; max-height: 46vh; overflow-y: auto; }
.dx-moves summary { cursor: pointer; font-weight: 800; }
.dx-moves dl { margin: 8px 0 0; display: flex; flex-direction: column; gap: 6px; }
.dx-moves dt { font-weight: 800; color: var(--amber2); font-size: 14px; }
.dx-moves dd { margin: 0; font-size: 13px; color: var(--muted); }
.dx-menubox { max-height: 92vh; overflow-y: auto; }

/* ---------- Chat: Rooms / Messages, inbox, one-on-one threads ---------- */
.chatmode { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 10px; border-radius: 14px; background: var(--deep); border: 1px solid var(--line); }
.chatmode button { border: 0; border-radius: 10px; padding: 9px 10px; background: none; color: var(--muted); font: inherit; font-weight: 800; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.chatmode button[aria-selected="true"] { background: var(--panel2); color: var(--ink); box-shadow: 0 1px 0 #ffffff14 inset; }
.chatmode button:focus-visible, .backbtn:focus-visible, .thread:focus-visible { outline: 3px solid var(--amber2); outline-offset: 2px; }
.dmcount, .th-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--amber); color: var(--on-accent); font-size: 12px; font-weight: 900; display: inline-grid; place-items: center; }
.roomline .rl-t { flex: 1; min-width: 0; }
.roomline .rl-t h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roomline .av { cursor: default; width: 38px; height: 38px; font-size: 16px; }
.backbtn { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); display: grid; place-items: center; cursor: pointer; padding: 0; }
.backbtn svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.inbox { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.inbox .newdm { align-self: flex-end; margin-bottom: 4px; }
.inbox .chatempty .btn { margin-top: 10px; align-self: center; }
.thread { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px; border-radius: 16px; border: 1px solid transparent; background: var(--panel); color: var(--ink); font: inherit; cursor: pointer; }
.thread:hover { border-color: var(--line); }
.thread .av { width: 46px; height: 46px; font-size: 18px; cursor: inherit; }
.thread .th-t { flex: 1; min-width: 0; }
.th-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.th-top time { font-size: 12px; color: var(--muted); flex: none; }
.thread p { margin: 2px 0 0; color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread.unread { background: var(--panel2); border-color: color-mix(in srgb, var(--amber) 35%, transparent); }
.thread.unread p { color: var(--ink); font-weight: 700; }
.thread.unread .th-top time { color: var(--amber); font-weight: 800; }
.msg .seen { align-self: flex-end; font-size: 11px; color: var(--muted); padding-right: 4px; }
.composer.off { opacity: .55; }
.tabbar a { position: relative; }
.tabdot { position: absolute; top: 6px; right: calc(50% - 16px); width: 9px; height: 9px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 2px var(--night); }

/* ---------- Niger Delta State Duel ---------- */
.statepick { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.stpick { --c: var(--amber); border: 1px solid var(--hair); border-left: 5px solid var(--c); background: color-mix(in srgb, var(--deep) 55%, transparent); color: var(--ink); border-radius: 12px; padding: 9px 8px; font: inherit; font-size: 13.5px; font-weight: 800; text-align: left; cursor: pointer; }
.stpick.on { background: var(--c); color: var(--on-accent); border-color: var(--c); box-shadow: 0 6px 18px #0006; }
.stpick:focus-visible { outline: 3px solid var(--amber2); outline-offset: 2px; }
.champcard .actions { position: relative; display: flex; flex-wrap: wrap; gap: 8px; }
.champstates .st.mine { background: color-mix(in srgb, var(--deep) 85%, transparent); box-shadow: 0 0 0 1px var(--c); }
.champcard .linkbtn { position: relative; align-self: flex-start; background: none; border: 0; padding: 4px 0; color: var(--amber2); font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------- find a player ---------- */
.pill.search { width: 36px; padding: 0; justify-content: center; }
.pill.search svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.findbox input { width: 100%; font-size: 17px; padding: 13px 14px; border-radius: 14px; }
.findlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; }
.findlist .empty, .findlist .err { padding: 10px 4px; }
.findrow { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel2); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.findrow:hover, .findrow:focus-visible { border-color: var(--amber); }
.findrow .fr-t { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.findrow .fr-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.findrow .fr-go { font-size: 24px; color: var(--muted); }
.pcardtop { display: flex; align-items: center; gap: 14px; }
.pcardtop > div { display: flex; flex-direction: column; gap: 2px; }
.pactions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pact { --c: var(--amber); padding: 12px 6px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); background: color-mix(in srgb, var(--c) 16%, var(--panel)); color: var(--ink); font: inherit; font-weight: 800; font-size: 14px; cursor: pointer; }
.pact:hover, .pact:focus-visible { background: color-mix(in srgb, var(--c) 30%, var(--panel)); }
.pact.pa-msg { --c: #6FE7FF; } .pact.pa-fight { --c: #C23B4E; } .pact.pa-race { --c: var(--amber); } .pact.pa-boat { --c: #5CE1E6; } .pact.pa-hoops { --c: #FF7A1A; } .pact.pa-cash { --c: #36E39A; }
/* the top bar fits on small phones now that it has a search button */
.topbar { gap: 8px; }
.topstats { flex: none; min-width: 0; }
@media (max-width: 430px) {
  .logo { font-size: 20px; }
  .topstats { gap: 6px; }
  .pill { padding-left: 9px; padding-right: 9px; font-size: 14px; }
  .pill.search { width: 34px; padding: 0; }
  .avatar-btn { width: 36px; height: 36px; }
}
@media (max-width: 360px) { .logo { font-size: 17px; } .pill.streak { display: none; } }



/* ================= Ink & Paper theme ================= */
/* Light: paper white, ink black, signal red (the default) */
:root {
  color-scheme: light;
  --night: #ECE9E3; --deep: #E1DDD5; --panel: #FBFAF7; --panel2: #F1EEE8;
  --line: #D3CDC2; --edge: #A8A196; --hair: rgba(20,19,19,.16);
  --ink: #141313; --muted: #645F58;
  --amber: #D4202C; --amber2: #F0353F; --on-accent: #FFFFFF;
  --pink: #141313; --on-pink: #FBFAF7;
  --money: #0B7A50; --bad: #B8121C;
  --band: #D4202C; --ghost: rgba(20,19,19,.09);
  --paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012' numOctaves='4' seed='7'/%3E%3CfeDiffuseLighting lighting-color='%23fff' surfaceScale='2.2'%3E%3CfeDistantLight azimuth='45' elevation='58'/%3E%3C/feDiffuseLighting%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E");
  --display: "Anton", "Impact", "Arial Narrow", sans-serif;
  --body: "Inter Tight", "Segoe UI", system-ui, sans-serif;
  --r-lg: 4px; --r-md: 3px; --r-sm: 2px;
}
/* Dark: grunge charcoal, Deku green for money (on when the switch is set) */
:root[data-theme="dark"] {
  color-scheme: dark;
  --night: #0F1110; --deep: #090A0A; --panel: #181B1A; --panel2: #212524;
  --line: #2F3432; --edge: #4A504D; --hair: rgba(241,238,232,.16);
  --ink: #F1EEE8; --muted: #9C978F;
  --amber: #E5303A; --amber2: #FF4D55; --on-accent: #FFFFFF;
  --pink: #F1EEE8; --on-pink: #111211;
  --money: #7CDB8A; --bad: #FF5A5F;
  --band: #9E1A22; --ghost: rgba(241,238,232,.07);
  --paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' seed='3'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .55 0 0 0 0 .5 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}
/* games, videos and poster cards always sit on the dark palette, whichever theme is on */
.drive, .fight, .bs, .life3d, .hoops, .stage, .seat, .dx-menu, .sheet .fx-sel,
.drivecard, .boatcard, .fighthero, .league, .circuitcard, .champcard {
  --night: #0F1110; --deep: #090A0A; --panel: #181B1A; --panel2: #212524;
  --line: #2F3432; --edge: #4A504D; --hair: rgba(241,238,232,.16);
  --ink: #F1EEE8; --muted: #A8A39B; --pink: #F1EEE8; --on-pink: #111211;
  --amber: #E5303A; --amber2: #FF4D55; --money: #7CDB8A; --bad: #FF5A5F;
  --paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' seed='3'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .55 0 0 0 0 .5 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  color: var(--ink);
}

/* page: paper (or grunge) texture */
body { background: var(--paper) center / 600px repeat, var(--night); color: var(--ink); }

/* type: tall condensed headlines, plain readable body */
h1, h2, h3 { font-family: var(--display); font-weight: 400; font-style: normal; letter-spacing: .005em; line-height: 1.02; }
h1 { font-size: clamp(34px, 9vw, 52px); text-transform: uppercase; }
h2 { font-size: 26px; }
h3 { font-size: 19px; letter-spacing: .01em; }
.pagetitle { position: relative; isolation: isolate; }
/* the title echoed huge in outline behind itself */
[data-ghost]::before {
  content: attr(data-ghost); position: absolute; z-index: -1; left: -4px; top: 50%; transform: translateY(-58%);
  font: 400 clamp(64px, 22vw, 128px)/0.9 var(--display); text-transform: uppercase; white-space: nowrap; pointer-events: none;
  color: transparent; -webkit-text-stroke: 1.5px var(--ghost); overflow: hidden; max-width: 100vw;
}
.logo { font-family: var(--display); font-weight: 400; font-size: 28px; letter-spacing: .01em; text-transform: uppercase; color: var(--ink); }
.logo span { color: var(--amber); }

/* top and bottom bars */
.topbar { background: color-mix(in srgb, var(--night) 90%, transparent); box-shadow: 0 0 0 100vmax color-mix(in srgb, var(--night) 90%, transparent); border-bottom: 1px solid var(--line); }
.tabbar { background: color-mix(in srgb, var(--panel) 94%, transparent); border-top: 1px solid var(--line); }
.tabbar a { color: var(--muted); }
.tabbar a[aria-current="page"] { color: var(--ink); }
.tabbar a[aria-current="page"] svg { fill: var(--amber); stroke: var(--amber); }

/* buttons: solid red action, ink pill for the alternative, hairline outline for the rest */
.btn { border-radius: var(--r-sm); background: var(--amber); color: var(--on-accent); box-shadow: none; font-weight: 800; letter-spacing: .005em; transition: background .15s, transform .1s; }
.btn:hover { background: var(--amber2); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--night); }
.btn.pink { background: var(--pink); color: var(--on-pink); }
.btn.pink:hover { background: color-mix(in srgb, var(--pink) 85%, var(--amber)); }
.btn.wa { background: #25D366; color: #052B14; }
.btn:disabled, .btn:disabled:hover { background: var(--line); color: var(--muted); transform: none; }

/* cards: flat sheets with a red corner notch */
.card, .sheetbox { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: 0 1px 0 var(--hair); position: relative; }
.card::after { content: ""; position: absolute; top: -1px; left: -1px; width: 28px; height: 3px; background: var(--amber); pointer-events: none; }
.pill { border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--ink); }
.pill.cash { color: var(--money); }
.avatar-btn { border-radius: 50%; background: var(--ink); color: var(--night); }

/* tabs read like the nav pills in a character menu: the chosen one goes solid */
.tabs { background: transparent; border: 0; padding: 0; gap: 4px; }
.tabs button { border-radius: 999px; color: var(--muted); font-weight: 800; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--night); box-shadow: none; }

input, select, textarea { border-radius: var(--r-sm); background: var(--panel); color: var(--ink); border-color: var(--line); }
input:focus, select:focus, textarea:focus { border-color: var(--ink); }
.money { color: var(--money); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

/* poster cards: dark grunge panels with a red slash, like a character-select screen */
.drivecard, .boatcard, .fighthero, .league, .circuitcard, .champcard {
  background: var(--paper) center / 400px repeat, linear-gradient(160deg, #1E2221 0%, #0F1110 70%);
  border: 1px solid #2F3432; border-radius: var(--r-lg);
}
.boatcard { background: var(--paper) center / 400px repeat, linear-gradient(165deg, #16262A 0%, #0F1110 75%); }
.champcard { background: var(--paper) center / 400px repeat, linear-gradient(170deg, #2A1416 0%, #12191C 60%, #0F1110 100%); }
.fighthero { background: var(--paper) center / 400px repeat, radial-gradient(80% 70% at 20% 10%, color-mix(in srgb, var(--hc, #E5303A) 35%, transparent), transparent 70%), linear-gradient(160deg, #1E2221 0%, #0F1110 70%); }
.league { background: #E5303A; }
.item .art { background: radial-gradient(90% 80% at 50% 70%, var(--panel2), var(--deep)); }
.seat { background: linear-gradient(#0B0C0C, #090A0A); }

/* theme switch in the top bar */
.pill.theme svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.pill.theme .moon { display: none; }
:root[data-theme="dark"] .pill.theme .sun { display: none; }
:root[data-theme="dark"] .pill.theme .moon { display: block; }

@media (max-width: 640px) { [data-ghost]::before { font-size: 72px; } }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }
[data-ghost] { position: relative; isolation: isolate; }
/* money in chat: a clean slip with a green edge, readable in both themes */
.cashcard { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--money); border-radius: var(--r-md); box-shadow: 0 1px 0 var(--hair); }
.cashcard.tome { border-color: var(--money); box-shadow: 0 0 0 1px var(--money); }

/* ================= Races: racing-game controls ================= */
.drive .dx-top { top: calc(10px + env(safe-area-inset-top)); left: calc(10px + env(safe-area-inset-left)); flex-direction: row; }
.drive .dx-pad { bottom: calc(16px + env(safe-area-inset-bottom)); }
.drive .dx-steer { left: calc(16px + env(safe-area-inset-left)); gap: 18px; }
.drive .dx-pedals { right: calc(16px + env(safe-area-inset-right)); gap: 18px; align-items: center; }
/* big chevrons, like the arrows of a racing game */
.drive .dx-pad .dx-arrow { width: 92px; height: 116px; border-radius: 4px !important; background: transparent !important; border: 0 !important; box-shadow: none !important; color: #F1EEE8; display: grid; place-items: center; opacity: .82; }
.drive .dx-arrow svg { width: 72px; height: 96px; fill: none; stroke: currentColor; stroke-width: 7; stroke-linejoin: miter; stroke-linecap: square; filter: drop-shadow(0 2px 3px rgba(0,0,0,.6)); }
.drive .dx-pad .dx-arrow.on { color: #22E3FF; opacity: 1; transform: scale(.94); }
.drive .dx-pad .dx-brake { width: 58px; height: 92px; border-radius: 16px !important; background: rgba(241,238,232,.82) !important; border: 2px solid rgba(0,0,0,.2) !important; color: #3A3F45; display: grid; place-items: center; }
.drive .dx-brake svg { width: 30px; height: 46px; fill: none; stroke: currentColor; stroke-width: 5; stroke-linejoin: miter; }
.drive .dx-pad .dx-brake.on { background: #FF5A5F !important; color: #fff; }
.drive .dx-pad .dx-nitro { width: 84px; height: 84px; border-radius: 50% !important; background: rgba(15,17,16,.72) !important; border: 3px solid #22E3FF !important; color: #22E3FF; display: grid; place-items: center; opacity: .6 !important; overflow: hidden; }
.drive .dx-nitro svg { position: relative; width: 36px; height: 36px; fill: currentColor; }
.drive .dx-nitro i { background: rgba(34,227,255,.28); }
.drive .dx-pad .dx-nitro.ready { opacity: 1 !important; box-shadow: 0 0 0 4px rgba(34,227,255,.25), 0 0 22px rgba(34,227,255,.55); }
.drive .dx-pad .dx-nitro.burn { animation: nitroPulse .5s ease-in-out infinite alternate; }
@keyframes nitroPulse { to { box-shadow: 0 0 0 8px rgba(34,227,255,.15), 0 0 30px rgba(34,227,255,.8); } }
.drive .dx-gas { display: none; }
/* tilt or tap mode: the arrows go away */
.drive[data-ctrl="tilt"] .dx-steer, .drive[data-ctrl="tap"] .dx-steer { display: none; }
@media (max-height: 420px) { .drive .dx-pad .dx-arrow { width: 78px; height: 96px; } .drive .dx-arrow svg { width: 60px; height: 80px; } .drive .dx-pad .dx-nitro { width: 72px; height: 72px; } .drive .dx-pad .dx-brake { width: 52px; height: 80px; } }

/* turn your phone */
.dx-rotate { position: absolute; inset: 0; z-index: 30; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; text-align: center; background: #0F1110; color: #F1EEE8; }
.dx-rotate[hidden] { display: none; }
.dx-rotate svg { width: 96px; height: 96px; fill: none; stroke: #FFC82E; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; animation: turnPhone 1.8s ease-in-out infinite; }
.dx-rotate b { font: 400 30px/1.05 var(--display); text-transform: uppercase; }
.dx-rotate span { color: #A8A39B; max-width: 30ch; }
@keyframes turnPhone { 0%, 30% { transform: rotate(0); } 60%, 100% { transform: rotate(-90deg); } }
@media (prefers-reduced-motion: reduce) { .dx-rotate svg { animation: none; transform: rotate(-90deg); } .drive .dx-pad .dx-nitro.burn { animation: none; } }

/* steering picker: three cards side by side */
.dx-ctrl { position: absolute; inset: 0; z-index: 25; display: grid; place-items: center; padding: 16px; background: rgba(9,10,10,.86); overflow-y: auto; }
.dx-ctrl[hidden] { display: none; }
.dx-ctrlbox { width: min(760px, 100%); display: flex; flex-direction: column; gap: 14px; color: #F1EEE8; }
.dx-ctrlbox h2 { font-size: clamp(24px, 4vw, 34px); text-transform: uppercase; margin: 0; }
.dx-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.dx-modes button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 10px; border-radius: 4px; border: 2px solid #2F3432; background: #181B1A; color: #F1EEE8; font: inherit; cursor: pointer; text-align: center; }
.dx-modes button svg { width: 84px; height: 58px; fill: none; stroke: #F1EEE8; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.dx-modes button b { font: 400 18px var(--display); text-transform: uppercase; color: #FFC82E; }
.dx-modes button span { font-size: 12px; color: #A8A39B; }
.dx-modes button[aria-checked="true"] { border-color: #FFC82E; background: #24221A; }
.dx-modes button[aria-checked="true"]::after { content: "Selected"; font-weight: 800; font-size: 12px; color: #0F1110; background: #FFC82E; padding: 2px 10px; border-radius: 2px; }
.dx-sens { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-weight: 800; }
.dx-sens output { color: #FFC82E; }
.dx-sens input { flex: 1 1 100%; accent-color: #FFC82E; }
.dx-ctrlnote { margin: 0; color: #FF5A5F; font-weight: 700; }
@media (max-width: 520px) and (orientation: portrait) { .dx-modes { grid-template-columns: 1fr; } .dx-modes button { flex-direction: row; text-align: left; } .dx-modes button svg { width: 60px; height: 42px; flex: none; } }
.racestars { display: flex; flex-direction: column; gap: 8px; }
.racestars .stars { display: flex; gap: 6px; font-size: 34px; line-height: 1; }
.racestars .stars span { color: var(--line); }
.racestars .stars span.on { color: #F5B323; text-shadow: 0 2px 0 #9A6A00; }
.racestars ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--muted); }
.racestars li::before { content: "☆ "; }
.racestars li.on { color: var(--ink); font-weight: 700; }
.racestars li.on::before { content: "★ "; color: #F5B323; }
.racestats { display: flex; flex-wrap: wrap; gap: 6px; }
.racestats span { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--muted); }
.racestats b { color: var(--ink); }
@media (max-height: 460px) { .dx-ctrlbox { gap: 8px; } .dx-modes button { padding: 8px; gap: 3px; } .dx-modes button svg { width: 60px; height: 40px; } .dx-ctrlbox h2 { font-size: 22px; } .dx-ctrlbox .btn { padding: 10px; } }

/* ================= Season, race brief, garage, results (racing-game flow) ================= */
.season-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.season-head h2 { font-size: 30px; text-transform: uppercase; margin: 0 0 4px; }
.season-stars { flex: none; font: 400 22px/1 var(--display); color: var(--ink); white-space: nowrap; }
.season-stars i { color: #FFC82E; font-style: normal; }
.season { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 900px) { .season { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.track { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 0 0 10px; text-align: left; cursor: pointer; overflow: hidden;
  background: #121514; border: 1.5px solid #2F3432; border-radius: var(--r-md); color: #F1EEE8; font: inherit; transition: border-color .15s, transform .1s; }
.track:hover { border-color: #E5303A; }
.track:active { transform: translateY(1px); }
.track.done { border-color: #7CDB8A; }
.track .tk-art { aspect-ratio: 16 / 8; margin-bottom: 6px; }
.track > :not(.tk-art) { padding: 0 10px; }
.tk-area { font-size: 11px; font-weight: 800; color: #FF7A50; }
.tk-name { font: 400 17px/1.05 var(--display); text-transform: uppercase; letter-spacing: .01em; }
.tk-meta { font-size: 12px; color: #A8A39B; }
.track .stars { margin-top: 4px; }
.track.locked .tk-art { filter: grayscale(1) brightness(.45); }
.track.locked .tk-name { color: #A8A39B; }
.tk-lock { margin-top: 4px; font-size: 12px; font-weight: 700; color: #A8A39B; }
.tk-lock i { color: #FFC82E; font-style: normal; }
.stars { display: inline-flex; gap: 2px; font-size: 16px; line-height: 1; }
.stars i { font-style: normal; color: #4A504D; }
.stars i.on { color: #FFC82E; text-shadow: 0 0 10px rgba(255,200,46,.45); }

/* track pictures: a sky, a skyline and the road, tinted per theme */
.tk-art { position: relative; display: block; overflow: hidden; background: #0F1110; }
.tk-art > span { position: absolute; left: 0; right: 0; }
.tk-sky { top: 0; bottom: 0; }
.tk-skyline { bottom: 30%; height: 46%; background-repeat: repeat-x; background-size: auto 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='100' viewBox='0 0 240 100'%3E%3Cpath fill='%23000' d='M0 100V62h14V40h16v22h10V22h22v40h8V50h14v-14h18v64h6V30h20v70h8V56h12V44h16v56h10V60h14V34h18v66z'/%3E%3C/svg%3E"); opacity: .55; }
.tk-road { bottom: 0; height: 32%; background: linear-gradient(180deg, #2A2D30, #16181A); clip-path: polygon(40% 0, 60% 0, 100% 100%, 0 100%); }
.tk-road::after { content: ""; position: absolute; left: 49.5%; top: 0; bottom: 0; width: 1%; background: repeating-linear-gradient(180deg, #F2D04A 0 8px, transparent 8px 16px); }
.tk-city .tk-sky { background: linear-gradient(180deg, #3D8FD8 0%, #9FD0F2 70%, #E8F4F8 100%); }
.tk-city .tk-skyline { opacity: .35; filter: invert(18%) sepia(30%) saturate(400%) hue-rotate(180deg); }
.tk-market .tk-sky { background: linear-gradient(180deg, #3A4A7A 0%, #F0B070 75%, #FFD8A0 100%); }
.tk-coast .tk-sky { background: linear-gradient(180deg, #1B2A5C 0%, #F2A35E 70%, #FFD9A0 100%); }
.tk-coast .tk-road { background: linear-gradient(180deg, #3A4A58, #1A2228); }
.tk-neon .tk-sky { background: linear-gradient(180deg, #05020F 0%, #4A1460 80%, #B14CFF 100%); }
.tk-neon .tk-skyline { opacity: .9; }
.tk-neon .tk-road::after { background: repeating-linear-gradient(180deg, #FF2E88 0 8px, transparent 8px 16px); }
.tk-docks .tk-sky { background: linear-gradient(180deg, #070A16 0%, #6A3E28 85%, #C08050 100%); }
.tk-refinery .tk-sky { background: radial-gradient(40% 60% at 70% 75%, #FFB070, transparent 70%), linear-gradient(180deg, #0A0610 0%, #7A2E10 85%, #E07020 100%); }

/* the race brief opens in a wider sheet */
.sheet.wide .sheetbox { max-width: 760px; }
.brief { display: flex; flex-direction: column; gap: 12px; }
.brief-banner { position: relative; border-radius: var(--r-md); overflow: hidden; }
.brief-banner .tk-art { aspect-ratio: 21 / 7; }
.brief-meta { position: absolute; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 8px 12px; background: rgba(9,10,10,.72); color: #F1EEE8; font-weight: 700; font-size: 13px; }
.brief-meta small { display: block; color: #FF7A50; font-size: 11px; font-weight: 800; }
.brief-mode { font: 400 30px/1 var(--display); text-transform: uppercase; color: var(--amber); margin: 4px 0 0; }
.brief > p { margin: 0; }
.objectives { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.objectives li { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.objectives li i { font-style: normal; font-size: 20px; color: var(--line); }
.objectives li.on i { color: #FFC82E; }
.objectives.small li { font-size: 13px; } .objectives.small li i { font-size: 15px; }

/* garage: your car on a lit floor with its numbers */
.garage { display: grid; gap: 10px; padding: 14px; border-radius: var(--r-md); color: #F1EEE8;
  background: radial-gradient(70% 60% at 50% 70%, #2A2E2D 0%, #121514 70%), #121514; }
@media (min-width: 640px) { .garage { grid-template-columns: 1.2fr 1fr; grid-template-areas: "head head" "stage stats"; align-items: center; } .g-head { grid-area: head; } .g-stage { grid-area: stage; } .g-stats { grid-area: stats; } }
.g-head { display: flex; align-items: center; gap: 12px; }
.g-head b { display: block; font: 400 20px/1.05 var(--display); text-transform: uppercase; }
.g-head .muted { color: #A8A39B; }
.g-class { flex: none; width: 38px; height: 38px; display: grid; place-items: center; font: 400 22px/1 var(--display); background: #E5303A; color: #fff; border-radius: var(--r-sm); }
.g-stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 150px; }
.g-stage::before { content: ""; position: absolute; left: 10%; right: 10%; bottom: 6%; height: 26%; border-radius: 50%; border: 3px solid #E0A020; box-shadow: 0 0 22px rgba(224,160,32,.35), inset 0 0 18px rgba(255,255,255,.08); }
.g-car { position: relative; width: 100%; max-width: 340px; }
.g-car img, .g-car svg { width: 100%; height: auto; display: block; }
.g-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 1; width: 36px; height: 52px; border: 1px solid #4A504D; background: rgba(9,10,10,.7); color: #F1EEE8; font-size: 28px; line-height: 1; cursor: pointer; border-radius: var(--r-sm); }
.g-nav.prev { left: 0; } .g-nav.next { right: 0; }
.g-stats { display: flex; flex-direction: column; gap: 8px; }
.statrow { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; font-size: 13px; font-weight: 600; }
.statrow b { font-variant-numeric: tabular-nums; }
.statbar { grid-column: 1 / -1; height: 5px; background: #2F3432; border-radius: 3px; overflow: hidden; }
.statbar i { display: block; height: 100%; background: linear-gradient(90deg, #E5303A, #FFC82E); }
.btn.big { font-size: 18px; padding: 16px 28px; }

/* results: medal, stars, then the table */
.res-top { display: flex; align-items: center; gap: 16px; }
.medal { flex: none; width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; font: 400 40px/1 var(--display); color: #3A2600;
  background: radial-gradient(circle at 35% 30%, #FFF1A8, #F2C230 45%, #B07A10 100%); box-shadow: 0 0 0 4px rgba(242,194,48,.3); }
.medal.p2 { color: #22262A; background: radial-gradient(circle at 35% 30%, #FFFFFF, #C9CED6 45%, #7C848E 100%); box-shadow: 0 0 0 4px rgba(201,206,214,.3); }
.medal.p3 { color: #2A1406; background: radial-gradient(circle at 35% 30%, #FFD0A0, #C8783A 45%, #7A4018 100%); box-shadow: 0 0 0 4px rgba(200,120,58,.3); }
.medal.p4, .medal.dnf { color: var(--ink); background: var(--panel2); box-shadow: 0 0 0 2px var(--line); font-size: 30px; }
.res-stars { display: flex; flex-direction: column; gap: 6px; }
.res-stars > .stars { font-size: 30px; }
.restable { width: 100%; border-collapse: collapse; font-size: 14px; }
.restable th { text-align: left; font-size: 11px; font-weight: 800; color: var(--amber); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.restable td { padding: 8px; border-bottom: 1px solid var(--line); }
.restable td:last-child, .restable th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.restable tr.me td { font-weight: 800; background: color-mix(in srgb, var(--amber) 10%, transparent); }
.restable tr.friend td:nth-child(2) { color: var(--amber); }

/* race tips: a dark band across the screen with an orange title, like a racing game tutorial */
.dx-tip { position: absolute; z-index: 6; left: 50%; top: 24%; transform: translateX(-50%); width: min(720px, 86%); display: flex; align-items: center; gap: 18px;
  padding: 14px 22px; background: rgba(12,13,14,.74); border-top: 2px solid rgba(255,255,255,.85); border-bottom: 2px solid rgba(255,255,255,.85); color: #F5F1E8; pointer-events: none; }
.dx-tip.in { animation: tipIn .35s ease-out both; }
@media (prefers-reduced-motion: reduce) { .dx-tip.in { animation: none; } }
@keyframes tipIn { from { opacity: 0; transform: translateX(-50%) scaleY(.4); } to { opacity: 1; transform: translateX(-50%) scaleY(1); } }
.dx-tip b { display: block; font: 400 17px/1.1 Anton, "Inter Tight", sans-serif; color: #FF9A2E; text-transform: uppercase; letter-spacing: .02em; }
.dx-tip span:not(.dx-tipicon) { display: block; font-weight: 700; font-size: 15px; margin-top: 2px; }
.dx-tipicon { flex: none; width: 54px; height: 54px; background: center / 70% no-repeat; }
.dx-tipicon.arrows { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='none' stroke='%237FF0FF' stroke-width='4' stroke-linejoin='round'%3E%3Cpath d='M30 6L10 24l20 18V6z'/%3E%3C/svg%3E"); filter: drop-shadow(0 0 6px #22E3FF); }
.dx-tipicon.tap { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='none' stroke='%23F5F1E8' stroke-width='3'%3E%3Ccircle cx='24' cy='24' r='8'/%3E%3Ccircle cx='24' cy='24' r='16' opacity='.6'/%3E%3C/svg%3E"); }
.dx-tipicon.tilt { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='none' stroke='%23F5F1E8' stroke-width='3' stroke-linecap='round'%3E%3Crect x='9' y='15' width='30' height='18' rx='3' transform='rotate(-16 24 24)'/%3E%3Cpath d='M6 10a16 16 0 0 1 10-6M42 38a16 16 0 0 1-10 6' stroke='%23FFC82E'/%3E%3C/svg%3E"); }
.dx-tipicon.brake { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Crect x='12' y='4' width='24' height='40' rx='9' fill='%23E8E8E8'/%3E%3Cpath d='M17 14l7 6 7-6M17 22l7 6 7-6M17 30l7 6 7-6' fill='none' stroke='%23555' stroke-width='3'/%3E%3C/svg%3E"); }
.dx-tipicon.nitro { border-radius: 50%; border: 3px solid #22E3FF; box-shadow: 0 0 12px #22E3FF; background-size: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2c1 5 6 7 6 12a6 6 0 0 1-12 0c0-3 2-5 3-6 0 2 1 3 2 3 0-3-1-6 1-9z' fill='%2322E3FF'/%3E%3C/svg%3E"); }
.dx-tipicon.wreck { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='%23FFC82E'%3E%3Cpath d='M24 2l5 13 13-5-6 12 11 6-13 3 3 14-11-9-9 10 1-14-14-1 11-8-8-11 13 3z'/%3E%3C/svg%3E"); }
@media (max-height: 420px) { .dx-tip { top: 20%; padding: 10px 16px; } .dx-tipicon { width: 42px; height: 42px; } .dx-tip span:not(.dx-tipicon) { font-size: 13px; } }

/* ================= Fight: tap and swipe, 3 v 3 teams, end screen ================= */
.fx-shield { display: none !important; }
.fight.tapctl .fx-dpad, .fight.tapctl .fx-punch, .fight.tapctl .fx-kick { display: none !important; }
.fight .fx-pad { pointer-events: none; }
.fight .fx-pad > *, .fight .fx-pad button { pointer-events: auto; }
.fight.tapctl .fx-act { display: flex; flex-direction: row-reverse; align-items: flex-end; gap: 10px; margin-left: auto; }
.fight.tapctl .fx-act .fx-pow { width: 72px; height: 72px; border-radius: 50% !important; font-size: 11px !important; }
.fight.tapctl .fx-act .fx-ult { width: 84px; height: 84px; }
@media (max-height: 460px) { .fight.tapctl .fx-act .fx-pow { width: 62px; height: 62px; } .fight.tapctl .fx-act .fx-ult { width: 72px; height: 72px; } .fight.tapctl .fx-shield { width: 80px; height: 80px; } }
.fight.tapctl .fx-shield { display: grid !important; position: fixed; left: calc(22px + env(safe-area-inset-left)); bottom: calc(26px + env(safe-area-inset-bottom));
  width: 92px; height: 92px; border-radius: 50% !important; background: rgba(10,10,12,.55) !important; border: 3px solid rgba(245,241,232,.6) !important; }
.fight.tapctl .fx-shield svg { width: 40px; height: 40px; stroke-width: 2.4; }
.fight.tapctl .fx-shield.on { border-color: #7FD8FF !important; box-shadow: 0 0 22px rgba(127,216,255,.6); }

/* teammates down the sides: tap one to tag them in */
.fx-team { position: absolute; top: calc(118px + env(safe-area-inset-top)); display: flex; flex-direction: column; gap: 8px; z-index: 3; }
.fx-team[data-side="0"] { left: calc(10px + env(safe-area-inset-left)); }
.fx-team[data-side="1"] { right: calc(10px + env(safe-area-inset-right)); }
.fx-mate { position: relative; width: 62px; height: 66px; padding: 0; border: 2px solid rgba(245,241,232,.25); border-radius: 4px; overflow: hidden; cursor: pointer;
  background: linear-gradient(180deg, color-mix(in srgb, var(--mc) 35%, #111) 0%, #0B0C0E 100%); clip-path: polygon(0 0, 100% 0, 100% 78%, 86% 100%, 0 100%); }
.fx-mate canvas { position: absolute; left: -30%; top: -8%; width: 160%; height: 230%; }
.fx-team[data-side="1"] .fx-mate { cursor: default; clip-path: polygon(0 0, 100% 0, 100% 100%, 14% 100%, 0 78%); }
.fx-mate.on { border-color: #FFC82E; box-shadow: 0 0 0 1px #FFC82E; }
.fx-mate.ready { border-color: rgba(245,241,232,.75); }
.fx-mate:disabled { opacity: 1; }
.fx-mhp { position: absolute; left: 4px; right: 4px; bottom: 4px; height: 4px; background: rgba(0,0,0,.6); }
.fx-mhp b { display: block; height: 100%; background: #F1EEE8; }
.fx-x { position: absolute; inset: 0; display: none; place-items: center; font: 400 44px/1 Anton, "Inter Tight", sans-serif; color: #fff;
  background: linear-gradient(180deg, rgba(150,0,8,.9), rgba(90,0,4,.92)); text-shadow: 0 2px 0 #3A0002; }
.fx-mate.ko .fx-x { display: grid; }
@media (max-height: 460px) { .fx-team { top: calc(84px + env(safe-area-inset-top)); gap: 6px; } .fx-mate { width: 52px; height: 54px; } .fx-x { font-size: 34px; } }

/* YOU WIN / YOU LOSE */
.fx-end { position: absolute; inset: 0; z-index: 8; display: grid; place-items: center; padding: 16px; background: radial-gradient(70% 70% at 50% 45%, rgba(20,20,22,.55), rgba(5,5,6,.92)); }
.fx-end[hidden] { display: none; }
.fx-endbox { width: min(900px, 100%); text-align: center; color: #F1EEE8; }
.fx-endbox h2 { margin: 0 0 8px; font: 400 clamp(54px, 13vw, 110px)/.95 Anton, "Inter Tight", sans-serif; text-transform: uppercase; letter-spacing: .02em; }
.fx-endbox.win h2 { background: linear-gradient(180deg, #FFF1A8, #F2C230 50%, #B07A10); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 10px rgba(0,0,0,.6)); }
.fx-endbox.lose h2 { color: #C8101E; text-shadow: 0 4px 0 #3A0002, 0 0 30px rgba(200,16,30,.4); }
.fx-endteam { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 10px 14px 14px; border: 1px solid rgba(245,241,232,.25); background: rgba(10,10,12,.7);
  clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 14px, 100% calc(100% - 14px), calc(100% - 14px) 100%, 14px 100%, 0 calc(100% - 14px), 0 14px); }
.fx-endmate { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.fx-endmate canvas { width: 100%; max-width: 150px; aspect-ratio: 3 / 4; }
.fx-endmate.lead canvas { transform: scale(1.08); }
.fx-endmate.ko canvas { filter: grayscale(1) brightness(.6); }
.fx-endmate b { font: 400 16px/1.1 Anton, "Inter Tight", sans-serif; text-transform: uppercase; letter-spacing: .03em; }
.fx-endmate span { font-size: 12px; color: #FFC82E; font-weight: 700; }
.fx-endmate i { width: 80%; height: 4px; background: rgba(245,241,232,.15); }
.fx-endmate em { display: block; height: 100%; background: #F1EEE8; }
.fx-endgo { margin-top: 14px; padding: 12px 46px; font: 400 18px/1 Anton, "Inter Tight", sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #F1EEE8; cursor: pointer;
  background: #0B0C0E; border: 1.5px solid rgba(245,241,232,.7); clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 14px 100%, 0 50%); }
.fx-endgo:hover { background: #1A1C1F; }

/* fighter cards: picture on dark, name, attack (skull), level, health (heart), framed in the fighter's colour */
.fcard { position: relative; display: flex; flex-direction: column; align-items: center; padding: 0 0 8px; min-width: 0; overflow: hidden; color: #F1EEE8; font: inherit; text-align: center;
  background: linear-gradient(180deg, #1C1E21 0%, #0B0C0E 100%); border: 2px solid color-mix(in srgb, var(--cc) 70%, #6A4A2A); border-radius: 10px 10px 4px 4px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.6); }
button.fcard { cursor: pointer; }
.fcard canvas { width: 100%; aspect-ratio: 4 / 5; display: block; }
.fc-name { font: 400 14px/1.1 Anton, "Inter Tight", sans-serif; text-transform: uppercase; letter-spacing: .03em; margin-top: -18px; padding: 0 4px; text-shadow: 0 2px 4px #000; }
.fc-stats { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 4px; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.fc-stats > span { display: inline-flex; align-items: center; gap: 3px; }
.fc-stats i { display: inline-grid; width: 13px; height: 13px; color: #CFC8BC; }
.fc-stats i svg { width: 100%; height: 100%; }
.fc-lvl { font: 400 15px/1 Anton, "Inter Tight", sans-serif; color: #fff; }
.fc-badge { position: absolute; top: 6px; left: 6px; padding: 2px 6px; font-size: 10px; font-weight: 800; background: #FFC82E; color: #1A1206; border-radius: 2px; }
.fcard.lead { border-color: #FFC82E; box-shadow: 0 0 0 1px #FFC82E, 0 0 18px rgba(255,200,46,.25); }
.fteam { margin: 12px 0; }
.fteam-head h3 { margin: 0; }
.fteam-head p { margin: 2px 0 8px; }
.fteam-row, .vs-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.char .fc-stats { color: inherit; }
.char.inteam { box-shadow: inset 0 -3px 0 #FFC82E; }

/* VS screen before a team fight */
.vs { display: grid; gap: 12px; }
@media (min-width: 720px) { .vs { grid-template-columns: 1fr auto 1fr; align-items: center; } .vs .actions { grid-column: 1 / -1; justify-content: center; } }
.vs-side h3 { margin: 0 0 6px; font: 400 18px/1 var(--display); text-transform: uppercase; }
.vs-side.them .fcard { border-color: #8A1A22; }
.vs-mid { justify-self: center; font: 400 34px/1 var(--display); color: var(--amber); }

/* fight: "Swipe!" prompt after three taps, a big chevron pointing at the enemy */
.fx-swipe { position: absolute; z-index: 4; top: 30%; left: 50%; transform: translateX(-10%); display: flex; align-items: center; gap: 14px; pointer-events: none; color: #F5F1E8; }
.fx-swipe.left { transform: translateX(-90%); flex-direction: row-reverse; }
.fx-swipe b { font: 400 30px/1 Anton, "Inter Tight", sans-serif; text-transform: uppercase; letter-spacing: .03em; text-shadow: 0 2px 8px rgba(0,0,0,.8); }
.fx-swipe i { width: 150px; height: 96px; background: linear-gradient(90deg, rgba(10,10,12,.0), rgba(10,10,12,.75)); clip-path: polygon(0 0, 72% 0, 100% 50%, 72% 100%, 0 100%, 28% 50%); position: relative; }
.fx-swipe i::after { content: ""; position: absolute; inset: 14px 18px; background: #C8102E; clip-path: polygon(40% 0, 62% 0, 100% 50%, 62% 100%, 40% 100%, 76% 50%); filter: drop-shadow(0 0 8px rgba(200,16,46,.8)); }
.fx-swipe.left i { transform: scaleX(-1); }
.fx-swipe.go i::after { animation: swipePulse .5s ease-in-out infinite alternate; }
@keyframes swipePulse { from { transform: translateX(-10px); opacity: .6; } to { transform: translateX(10px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .fx-swipe.go i::after { animation: none; } }

/* ================= Battle map, daily rewards, achievements ================= */
.battlemap-wrap { display: flex; flex-direction: column; gap: 8px; }
.bm-head { display: flex; align-items: center; gap: 12px; }
.bm-head b { font: 400 18px/1 var(--display); text-transform: uppercase; }
.bm-prog { flex: 1; height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.bm-prog i { display: block; height: 100%; background: var(--amber); }
.battlemap-scroll { overflow-x: auto; overflow-y: hidden; border: 2px solid #3A2A18; border-radius: var(--r-md); background: #D8C39A; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.battlemap { display: block; height: min(430px, 62vh); width: auto; }
.bm-tower { cursor: pointer; outline: none; }
.bm-tower.locked { cursor: not-allowed; }
.bm-tower:focus-visible path:first-of-type, .bm-tower:hover path:first-of-type { stroke: #C8102E; }
.bm-tower.next { filter: drop-shadow(0 0 10px rgba(255,140,30,.7)); }
.bm-num { font: 400 22px/1 Anton, "Inter Tight", sans-serif; }
.bm-place { font: 700 13px/1 "Inter Tight", sans-serif; fill: #3A2A18; }
.bm-region { font: 400 22px/1 Anton, "Inter Tight", sans-serif; fill: #3A2A18; text-transform: uppercase; letter-spacing: .04em; }
.bm-river { font: italic 700 15px/1 "Inter Tight", sans-serif; fill: #24343A; }
.bm-flame { animation: bmFlame .6s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes bmFlame { from { transform: scale(1, .9); } to { transform: scale(1.08, 1.1); } }
@media (prefers-reduced-motion: reduce) { .bm-flame { animation: none; } }
.towerinfo { display: grid; grid-template-columns: 140px 1fr; gap: 14px; align-items: center; }
.towerinfo .tw-pic { width: 140px; height: 190px; }
.towerinfo p { margin: 0 0 6px; }

.rewardbar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.rb-btn { display: flex; align-items: center; gap: 10px; padding: 12px; text-align: left; cursor: pointer; font: inherit; color: var(--ink);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); position: relative; }
.rb-btn b { display: block; font-weight: 800; }
.rb-btn small { color: var(--muted); }
.rb-ico { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--panel2); }
.rb-ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.rb-btn.hot { border-color: var(--amber); }
.rb-btn.hot .rb-ico { background: var(--amber); color: var(--on-accent); }
.rb-btn.hot::after { content: ""; position: absolute; top: 8px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--amber); }

.daycal { list-style: none; margin: 14px 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.daycal li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 4px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel2); }
.daycal li small { font-size: 11px; color: var(--muted); font-weight: 700; }
.daycal li b { font: 400 17px/1 var(--display); }
.daycal li.today { border-color: var(--amber); box-shadow: 0 0 0 2px var(--amber); background: color-mix(in srgb, var(--amber) 10%, var(--panel)); }
.daycal li.got { opacity: .6; }
.daycal .tick { position: absolute; top: 4px; right: 6px; color: var(--money); font-weight: 900; }
@media (max-width: 520px) { .daycal { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.achs { display: flex; flex-direction: column; gap: 8px; }
.ach { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel); }
.ach.ready { border-color: var(--amber); }
.ach.claimed { opacity: .7; }
.ach-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ach-bar { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; margin-top: 4px; }
.ach-bar i { display: block; height: 100%; background: var(--amber); }
.ach-date { font-size: 12px; color: var(--muted); }
.medal-sm { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; }
.medal-sm svg { width: 22px; height: 22px; fill: rgba(0,0,0,.35); }
.medal-sm.bronze { background: radial-gradient(circle at 35% 30%, #FFD0A0, #C8783A 50%, #7A4018); }
.medal-sm.silver { background: radial-gradient(circle at 35% 30%, #FFFFFF, #C9CED6 50%, #7C848E); }
.medal-sm.gold { background: radial-gradient(circle at 35% 30%, #FFF1A8, #F2C230 50%, #B07A10); }
.medal-sm.dim { filter: grayscale(1) opacity(.45); }
.towerinfo .pw { display: inline-flex; gap: 6px; }
.towerinfo .pw svg { width: 26px; height: 26px; }

/* ================= Fight controls: joystick + Punch / Kick / Shadow (Shadow Fight), tap and swipe on the right,
   special cards that light up when your energy is ready (Mortal Kombat) ================= */
.fx-stick, .fx-sf { display: none; }
.fight.stickctl .fx-stick { display: block; position: absolute; z-index: 4; left: calc(28px + env(safe-area-inset-left)); bottom: calc(24px + env(safe-area-inset-bottom)); width: 150px; height: 150px; pointer-events: none; }
.fx-stick-base { position: relative; width: 100%; height: 100%; border-radius: 50%; background: rgba(10,12,14,.38); border: 2px solid rgba(245,241,232,.35); }
.fx-stick.on .fx-stick-base { border-color: rgba(127,232,255,.8); box-shadow: 0 0 22px rgba(34,227,255,.35); }
.fx-stick .a { position: absolute; width: 0; height: 0; border: 9px solid transparent; opacity: .7; }
.fx-stick .a.u { top: 10px; left: calc(50% - 9px); border-bottom: 12px solid #F5F1E8; border-top: 0; }
.fx-stick .a.d { bottom: 10px; left: calc(50% - 9px); border-top: 12px solid #F5F1E8; border-bottom: 0; }
.fx-stick .a.l { left: 10px; top: calc(50% - 9px); border-right: 12px solid #F5F1E8; border-left: 0; }
.fx-stick .a.r { right: 10px; top: calc(50% - 9px); border-left: 12px solid #F5F1E8; border-right: 0; }
.fx-knob { position: absolute; left: calc(50% - 32px); top: calc(50% - 32px); width: 64px; height: 64px; border-radius: 50%; background: rgba(245,241,232,.55); box-shadow: 0 2px 10px rgba(0,0,0,.4); transition: transform .04s; }
.fight.stickctl .fx-dpad, .fight.stickctl .fx-punch, .fight.stickctl .fx-kick, .fight.stickctl .fx-shield { display: none !important; }

/* Punch, Kick and Shadow in an arc, bottom right */
.fight.stickctl .fx-sf { display: block; position: absolute; z-index: 4; right: calc(18px + env(safe-area-inset-right)); bottom: calc(18px + env(safe-area-inset-bottom)); width: 220px; height: 170px; pointer-events: none; }
.fx-sfb { position: absolute; display: grid; place-items: center; border-radius: 50%; cursor: pointer; pointer-events: auto; touch-action: none; color: #F5F1E8;
  background: rgba(10,12,14,.4); border: 2.5px solid rgba(245,241,232,.7); transition: transform .06s; }
.fx-sfb svg { width: 52%; height: 52%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.fx-sfb.on { transform: scale(.9); background: rgba(245,241,232,.25); }
.fx-sfb.punch { right: 0; top: 0; width: 82px; height: 82px; }
.fx-sfb.kick { right: 12px; bottom: 0; width: 82px; height: 82px; }
.fx-sfb.shadow { right: 96px; top: 34px; width: 96px; height: 96px; color: #3A2600; background: radial-gradient(circle at 40% 35%, #FFE27A, #E0A020 65%, #9A6A0A); border-color: #FFE7A0; box-shadow: 0 0 18px rgba(255,200,46,.5); }
.fx-sfb.shadow svg { fill: currentColor; stroke: none; }

/* special cards: three cards that fill with energy and glow when ready */
.fight.stickctl .fx-act { position: absolute; right: calc(18px + env(safe-area-inset-right)); bottom: calc(196px + env(safe-area-inset-bottom)); display: flex; gap: 8px; }
.fight.stickctl .fx-act .fx-pow { width: 66px; height: 88px; border-radius: 6px !important; flex-direction: column; justify-content: flex-end; padding: 0 0 8px;
  background: linear-gradient(180deg, rgba(20,22,26,.85), rgba(8,9,10,.92)) !important; border: 2px solid #4A504D !important; color: #F1EEE8; font: 400 12px/1.05 Anton, "Inter Tight", sans-serif !important; text-transform: uppercase; letter-spacing: .02em; text-align: center; }
.fight.stickctl .fx-act .fx-pow i { opacity: .55; }
.fight.stickctl .fx-act .fx-pow.ready { border-color: var(--pc, #FFC82E) !important; box-shadow: 0 0 16px var(--pc, #FFC82E), inset 0 0 12px color-mix(in srgb, var(--pc, #FFC82E) 40%, transparent); animation: cardReady 1s ease-in-out infinite alternate; }
.fight.stickctl .fx-act .fx-ult { width: 74px; height: 98px; border-color: #8A6A20 !important; }
.fight.stickctl .fx-act .fx-as { width: 56px; height: 74px; }
@keyframes cardReady { from { transform: translateY(0); } to { transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .fight.stickctl .fx-act .fx-pow.ready { animation: none; } }
@media (max-height: 420px) {
  .fight.stickctl .fx-stick { width: 124px; height: 124px; left: calc(18px + env(safe-area-inset-left)); bottom: calc(14px + env(safe-area-inset-bottom)); }
  .fx-knob { width: 52px; height: 52px; left: calc(50% - 26px); top: calc(50% - 26px); }
  .fight.stickctl .fx-sf { width: 190px; height: 146px; bottom: calc(10px + env(safe-area-inset-bottom)); }
  .fx-sfb.punch, .fx-sfb.kick { width: 68px; height: 68px; } .fx-sfb.shadow { width: 80px; height: 80px; right: 80px; top: 30px; }
  .fight.stickctl .fx-act { bottom: auto; top: calc(96px + env(safe-area-inset-top)); }
  .fight.stickctl .fx-act .fx-pow { width: 56px; height: 72px; } .fight.stickctl .fx-act .fx-ult { width: 62px; height: 80px; }
}

/* tips across the middle, like Shadow Fight teaches its controls */
.fx-hint { position: absolute; z-index: 6; left: 50%; top: 26%; transform: translateX(-50%); width: min(720px, 88%); padding: 10px 18px; text-align: center; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(8,9,10,.78) 15%, rgba(8,9,10,.78) 85%, transparent); color: #F1EEE8; font: 700 15px/1.35 "Inter Tight", sans-serif; text-transform: uppercase; letter-spacing: .02em; }
.fx-hint em { font-style: normal; color: #FFC82E; }
.fx-hk { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(245,241,232,.2); border: 1.5px solid rgba(245,241,232,.6); font-size: 13px; vertical-align: middle; }
.fx-hk.sh { background: #E0A020; color: #3A2600; border-color: #FFE7A0; }
.fight.stickctl .fx-solo { inset: 0; left: 0; right: 0; bottom: 0; }

/* ================= Fight: 1 v 1 or 3 v 3, level, chapter title, Shadow Fight style results ================= */
.battlemap-wrap { position: relative; }
.bm-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.bm-lvl { display: flex; align-items: center; gap: 10px; }
.bm-lvl b { font: 400 18px/1 var(--display); text-transform: uppercase; }
.xp-track { display: block; position: relative; width: 120px; height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.xp-track i { display: block; height: 100%; background: linear-gradient(90deg, #FFFFFF, #FFC82E); transition: width 1.2s cubic-bezier(.2, .8, .2, 1); }
.fmt { display: inline-flex; padding: 3px; gap: 3px; border-radius: 999px; background: var(--panel2); border: 1px solid var(--line); }
.fmt button { border: 0; background: transparent; color: var(--muted); font: 800 13px var(--body); padding: 7px 14px; border-radius: 999px; cursor: pointer; }
.fmt button[aria-checked="true"] { background: var(--ink); color: var(--night); }
.chapter { position: absolute; left: 0; right: 0; bottom: 0; top: 72px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; pointer-events: none;
  background: rgba(8,6,4,.62); color: #F5ECD8; animation: chapterOut 2.6s ease forwards; border-radius: var(--r-md); }
.chapter b { font: 400 clamp(40px, 9vw, 72px)/1 var(--display); letter-spacing: .04em; text-transform: uppercase; }
.chapter span:last-child { font: 700 16px/1 var(--body); color: #E0B040; letter-spacing: .12em; text-transform: uppercase; }
.ch-mark { width: 54px; height: 64px; background: linear-gradient(180deg, #F2D27A, #B8862A); clip-path: polygon(50% 0, 70% 18%, 92% 8%, 80% 40%, 62% 40%, 50% 100%, 38% 40%, 20% 40%, 8% 8%, 30% 18%); }
@keyframes chapterOut { 0%, 60% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .chapter { display: none; } }

.sheet.dark .sheetbox { background: radial-gradient(80% 70% at 50% 30%, #1E2124, #0B0C0D); color: #F1EEE8; border-color: #2F3432; }
.sheet.dark #sheetTitle { color: #F2C230; font-size: clamp(40px, 8vw, 64px); text-transform: uppercase; letter-spacing: .03em; }
.sheet.dark .muted { color: #A8A39B; }
.sfres { display: flex; flex-direction: column; gap: 14px; }
.sfres.lose ~ * , .sheet.dark .sfres.lose { }
.sf-rounds { margin: 0; font: 400 22px/1 var(--display); }
.bonuslist { width: 100%; max-width: 420px; border-collapse: collapse; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; font-size: 14px; }
.bonuslist td { padding: 5px 0; border-bottom: 1px solid #2F3432; }
.bonuslist td:last-child { text-align: right; color: #7CDB8A; }
.xpbar { display: flex; align-items: center; gap: 12px; }
.xpbar .xp-l { font: 400 26px/1 var(--display); color: #E0B040; }
.xpbar .xp-track { flex: 1; width: auto; height: 8px; background: #3A3E40; }
.lvlup { margin: 0; font: 400 22px/1 var(--display); color: #FFC82E; text-transform: uppercase; }
.rcards { display: flex; gap: 12px; flex-wrap: wrap; }
.rcard { width: 112px; padding: 12px 8px 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; color: #2A2018;
  background: linear-gradient(180deg, #F2EBDD, #DCD1BC); border: 3px solid #8A8F96; border-radius: 6px; box-shadow: 0 6px 16px rgba(0,0,0,.45); animation: cardIn .45s cubic-bezier(.2, .9, .3, 1.3) both; }
.rcard:nth-child(2) { animation-delay: .12s; } .rcard:nth-child(3) { animation-delay: .24s; } .rcard:nth-child(4) { animation-delay: .36s; }
.rcard.bonus { border-color: #C8962A; } .rcard.new { border-color: #C2582A; } .rcard.xp { border-color: #3A6A8A; }
.rc-ico { width: 54px; height: 54px; } .rc-ico svg { width: 100%; height: 100%; }
.rcard b { font: 400 22px/1 var(--display); }
.rcard small { font-size: 11px; font-weight: 800; text-transform: uppercase; color: #6A5E50; }
@keyframes cardIn { from { opacity: 0; transform: translateY(30px) rotateY(90deg); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .rcard { animation: none; } .xp-track i { transition: none; } }

/* ===== shop: more tabs, haggling, businesses ===== */
#shopTabs.scrolly { overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
#shopTabs.scrolly::-webkit-scrollbar { display: none; }
#shopTabs.scrolly button { flex: 1 0 auto; padding-inline: 14px; }
.bizbar { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; border-radius: var(--r-md); background: var(--panel2); border: 1px solid var(--hair); }
.bizbar p { margin: 4px 0 0; max-width: 52ch; }
.bizbar .btn { flex: none; }
.haggle { padding: 10px 14px; border-radius: var(--r-md); background: var(--panel2); border-left: 3px solid var(--money); }
.haggle p { margin: 0 0 6px; }
.haggle s { color: var(--muted); }
.haggle ul { margin: 0; padding-left: 18px; color: var(--muted); }

/* ===== what your stats do, and the people you know ===== */
.peoplecard { padding: 16px 18px; border-radius: var(--r-md); background: var(--panel2); display: flex; flex-direction: column; gap: 10px; }
.peoplecard h3 { margin: 0; font-size: 1rem; }
.statuse { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.statuse li { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; border-bottom: 1px solid var(--hair); padding-bottom: 6px; }
.statuse li span { color: var(--muted); text-align: right; }
.peoplecard .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.people { display: grid; gap: 8px; }
.person { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--hair); background: var(--panel); }
.person > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.person.on { border-color: var(--money); }
.person .btn { flex: none; white-space: nowrap; }
.badge.on { position: static; background: var(--money); color: #fff; }

/* ===== PH Life: walking and driving ===== */
.l3-walkhud { position: absolute; inset: 0; pointer-events: none; }
.l3-walkhud[hidden] { display: none; }
.l3-where { position: absolute; top: calc(66px + env(safe-area-inset-top)); left: 12px; padding: 7px 12px; border-radius: 999px; background: color-mix(in srgb, var(--deep) 82%, transparent); color: var(--ink); font-weight: 700; font-size: .85rem; }
.l3-stick { position: absolute; left: 18px; bottom: calc(22px + env(safe-area-inset-bottom)); width: 120px; height: 120px; border-radius: 50%; background: color-mix(in srgb, var(--deep) 45%, transparent); border: 2px solid color-mix(in srgb, var(--ink) 30%, transparent); pointer-events: auto; touch-action: none; display: grid; place-items: center; }
.l3-stick i { width: 52px; height: 52px; border-radius: 50%; background: color-mix(in srgb, var(--ink) 75%, transparent); box-shadow: 0 4px 14px rgba(0,0,0,.35); transition: transform .06s; }
.l3-walkbtns { position: absolute; right: 12px; bottom: calc(22px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: auto; max-width: 52%; }
.l3-walkbtns [data-act=action] { font-size: 1rem; padding: 14px 18px; }
.life3d.walking .l3-angles, .life3d.walking .l3-bottom, .life3d.walking .l3-hint, .life3d.walking .l3-panel { display: none; }
@media (prefers-reduced-motion: reduce) { .l3-stick i { transition: none; } }
.morebelow { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 12px 16px; border: 0; border-bottom: 1px solid var(--hair); background: var(--panel2); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.morebelow span { display: inline-block; animation: pnbob 1.4s ease-in-out infinite; }
@keyframes pnbob { 50% { transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .morebelow span { animation: none; } }

/* needs, using things, and the sports meter */
.l3-needs { position: absolute; top: calc(104px + env(safe-area-inset-top)); left: 12px; width: 168px; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, var(--deep) 82%, transparent); color: var(--ink); display: grid; gap: 4px; font-size: .75rem; }
.l3-mood { font-size: .85rem; }
.l3-bars { display: grid; gap: 3px; }
.l3-bars span { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 6px; }
.l3-bars i { font-style: normal; color: var(--muted); }
.l3-bars em { height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--ink) 18%, transparent); overflow: hidden; }
.l3-bars u { display: block; height: 100%; background: var(--money); text-decoration: none; transition: width .4s; }
.l3-bars u.low { background: var(--bad); }
.l3-veil { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.45); color: #fff; font-weight: 800; font-size: 1.3rem; animation: l3fade .3s both; pointer-events: none; }
@keyframes l3fade { from { opacity: 0; } }
.l3-sport { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.35); padding: 16px; }
.l3-sbox { width: min(420px, 100%); padding: 18px; border-radius: 14px; background: var(--panel); color: var(--ink); display: grid; gap: 12px; box-shadow: 0 10px 40px rgba(0,0,0,.4); }
.l3-sbox b { font-size: 1.2rem; }
.l3-sline { margin: 0; color: var(--muted); }
.l3-sline.hit { color: var(--money); font-weight: 800; }
.l3-sline.miss { color: var(--bad); font-weight: 800; }
.l3-meter { position: relative; height: 34px; border-radius: 17px; background: var(--deep); overflow: hidden; }
.l3-zone { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--money) 70%, transparent); transition: left .2s, width .2s; }
.l3-mark { position: absolute; top: 3px; bottom: 3px; width: 6px; margin-left: -3px; border-radius: 3px; background: var(--ink); }
.l3-sscore { margin: 0; font-weight: 800; }
.l3-sbtns { display: flex; gap: 10px; }
.l3-sbtns [data-s=go] { flex: 1; font-size: 1.1rem; padding: 14px; }
@media (max-width: 520px) { .l3-needs { width: 140px; } }
@media (prefers-reduced-motion: reduce) { .l3-veil { animation: none; } .l3-bars u, .l3-zone { transition: none; } }
/* drift button in races and the speedboat */
.dx-drift { width: 64px; height: 52px; border-radius: 14px; background: rgba(255,181,71,.22) !important; border-color: rgba(255,181,71,.6) !important; }
.dx-drift b { font: 800 .72rem/1 var(--font, system-ui); letter-spacing: .02em; color: #FFD08A; }
.dx-drift.on { background: rgba(255,181,71,.55) !important; }

/* the "use it?" bubble over your head, and traffic-light colours on the life bars */
.l3-ask { position: absolute; transform: translate(-50%, -100%); display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 12px; border-radius: 999px; background: var(--panel); color: var(--ink); box-shadow: 0 6px 20px rgba(0,0,0,.35); pointer-events: auto; white-space: nowrap; font-weight: 700; font-size: .9rem; z-index: 3; }
.l3-ask[hidden] { display: none; }
.l3-ask::after { content: ""; position: absolute; left: 50%; bottom: -6px; margin-left: -6px; border: 6px solid transparent; border-bottom: 0; border-top-color: var(--panel); }
.l3-ask .l3-btn { padding: 7px 12px; font-size: .85rem; }
.l3-bars u { background: #2EB872; }
.l3-bars u.mid { background: #F4C430; }
.l3-bars u.low { background: #E5484D; }
.l3-mood.ok { color: #46D38A; }
.l3-mood.mid { color: #F4C430; }
.l3-mood.low { color: #FF6B6B; }
/* choices on the street: ring, rob, police, food, billboards */
.l3-choice { z-index: 6; }
.l3-sbtns.l3-col { flex-direction: column; }
.l3-sbtns.l3-col .l3-btn { width: 100%; text-align: left; padding: 13px 14px; }
.l3-adform label { display: grid; gap: 6px; font-weight: 700; font-size: .9rem; }
.l3-adform input { font: inherit; padding: 12px; border-radius: 10px; border: 1px solid var(--hair); background: var(--deep); color: var(--ink); text-transform: uppercase; }

/* fainting: the screen goes dark and wakes up slowly */
.l3-veil.faint { background: radial-gradient(circle at 50% 50%, rgba(0,0,0,.55), rgba(0,0,0,.92)); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; animation: l3faint 7s ease-in-out both; }
.l3-veil.faint small { font-weight: 600; font-size: .95rem; opacity: .8; }
@keyframes l3faint { 0% { opacity: 0; } 12% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; } }

/* needs bars: the track shows red, yellow and green zones, the fill takes the colour of where you are */
.l3-bars em { position: relative; height: 8px; background: linear-gradient(90deg, #E5484D33 0 30%, #F4C43033 30% 60%, #2EB87233 60% 100%); }
.l3-bars em::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent calc(30% - 1px), #0006 30%, transparent calc(30% + 1px), transparent calc(60% - 1px), #0006 60%, transparent calc(60% + 1px)); pointer-events: none; }
.l3-bars span { grid-template-columns: 44px 1fr 26px; }
.l3-bars span b { font-size: .7rem; text-align: right; font-weight: 700; }
.l3-bars span b.low { color: #FF6B6B; } .l3-bars span b.mid { color: #F4C430; } .l3-bars span b.ok { color: #46D38A; }

/* how many people are on PlayNolly: total visits and who's active today */
.sitebar { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 5px 12px; font-size: 13px; font-weight: 700; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--night); }
.sitebar span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.sitebar svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.sitebar b { color: var(--ink); font-variant-numeric: tabular-nums; }
.sitebar .live b { color: #2EB872; }
.sitebar .dot { width: 8px; height: 8px; border-radius: 50%; background: #2EB872; box-shadow: 0 0 0 0 #2EB87299; animation: pnlive 2s infinite; }
@keyframes pnlive { 70% { box-shadow: 0 0 0 7px #2EB87200; } 100% { box-shadow: 0 0 0 0 #2EB87200; } }
@media (prefers-reduced-motion: reduce) { .sitebar .dot { animation: none; } }

/* ---------- Chat, polished: wallpaper, real bubbles with tails, clear names ---------- */
:root { --chatbg: #EAE4D9; --bub-in: #FFFFFF; --bub-me: #D6F5DA; --bub-me-ink: #10241A; --bub-shadow: 0 1px 1.5px rgba(30,20,10,.16); --chatdoodle: rgba(60,45,30,.06); }
:root[data-theme="dark"] { --chatbg: #0E1513; --bub-in: #1E2A27; --bub-me: #135C3E; --bub-me-ink: #F1FFF6; --bub-shadow: 0 1px 1.5px rgba(0,0,0,.4); --chatdoodle: rgba(255,255,255,.035); }
.chatview { background-color: var(--chatbg); background-image:
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' opacity='.9'%3E%3Cpath d='M20 34c4-10 14-12 20-6M30 28v22'/%3E%3Ccircle cx='86' cy='26' r='9'/%3E%3Cpath d='M82 26h8M86 22v8'/%3E%3Cpath d='M70 84l8-14 8 14z'/%3E%3Cpath d='M18 92c6-6 14-6 20 0'/%3E%3Cpath d='M100 96l6 6M106 96l-6 6'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 120px 120px; }
.chatview { --dood: var(--chatdoodle); }
.chatview::before { content: ""; position: absolute; inset: 0; background: var(--chatbg); opacity: .93; pointer-events: none; z-index: 0; }
.chatview > * { position: relative; z-index: 1; }
.chattop { background: color-mix(in srgb, var(--night) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.roomline h1 { font-size: 18px; letter-spacing: .01em; }
.rooms button { background: var(--night); }
.rooms button[aria-selected="true"] { background: var(--amber); border-color: var(--amber); color: var(--on-accent); }
.msgs { padding: 12px 14px 12px; gap: 1px; }
.msg { max-width: 80%; margin-top: 8px; }
.msg .bubble { background: var(--bub-in); color: var(--ink); box-shadow: var(--bub-shadow); border-radius: 4px 14px 14px 14px; padding: 7px 10px 17px 11px; font-size: 15.5px; }
.msg:not(.grouped):not(.mine) .bubble::before { content: ""; position: absolute; left: -7px; top: 0; border: 8px solid transparent; border-top-color: var(--bub-in); border-right-color: var(--bub-in); border-width: 0 8px 9px 0; border-color: transparent var(--bub-in) transparent transparent; }
.msg.grouped .bubble { border-radius: 14px; }
.msg.mine .bubble { background: var(--bub-me); color: var(--bub-me-ink); border-radius: 14px 4px 14px 14px; }
.msg.mine:not(.grouped) .bubble::after { content: ""; position: absolute; right: -7px; top: 0; border-style: solid; border-width: 0 0 9px 8px; border-color: transparent transparent transparent var(--bub-me); }
.msg.mine.grouped .bubble { border-radius: 14px; }
.msg .bubble time, .msg.mine .bubble time { font-size: 10.5px; color: color-mix(in srgb, currentColor 55%, transparent); }
.msg .by { padding-left: 2px; margin-bottom: 1px; font-size: 13px; }
:root:not([data-theme="dark"]) .msg .by b { filter: brightness(.7) saturate(1.3); }
.msg .av { width: 30px; height: 30px; font-size: 13px; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.daysep span { background: var(--bub-in); border: 0; box-shadow: var(--bub-shadow); color: var(--muted); font-weight: 700; }
.cashcard { background: var(--bub-in); border: 0; border-left: 4px solid #2EB872; box-shadow: var(--bub-shadow); }
.cashcard p b, .cashcard q { color: var(--ink); }
.composer { background: color-mix(in srgb, var(--night) 94%, transparent); border-top: 0; padding: 8px 10px 6px; }
.composer input { background: var(--bub-in); border: 0; box-shadow: var(--bub-shadow); padding: 12px 16px; }
.composer input:focus { box-shadow: 0 0 0 2px var(--amber); }
.cbtn { border: 0; background: var(--bub-in); box-shadow: var(--bub-shadow); }
.cbtn.send { background: var(--amber); }
.chatsafe { background: color-mix(in srgb, var(--night) 94%, transparent); padding-top: 0; }
.chatview > .newmsgs { position: absolute; z-index: 2; }
.chatview::before { opacity: .955; }
.msg.pinged .bubble { box-shadow: var(--bub-shadow), inset 3px 0 0 var(--amber); }

/* Responsive play layout: touch-first phones, tablets and narrow desktop windows */
html { -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; }
button, input, select, textarea { font: inherit; }
button, .btn, a { touch-action: manipulation; }
img, canvas, video { max-width: 100%; }

@media (max-width: 760px) {
  .app, .shell, .page, main { min-width: 0; max-width: 100%; }
  .topbar { padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
  .view { width: 100%; min-width: 0; padding-left: 12px; padding-right: 12px; }
  .pagetitle { font-size: clamp(1.35rem, 5vw, 1.9rem); line-height: 1.15; }
  .grid, .statgrid, .pstats, .shopgrid, .cards, .two-col, .three-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
  }
  .card, .block, .panel, .shopcard { min-width: 0; }
  .tabbar {
    position: fixed; z-index: 120; left: 0; right: 0; bottom: 0;
    display: flex; justify-content: space-around; gap: 2px;
    padding: 7px 4px calc(7px + env(safe-area-inset-bottom));
    overflow-x: auto; overscroll-behavior-x: contain;
  }
  .tabbar a { flex: 1 0 0; min-width: 0; min-height: 48px; padding: 5px 2px; }
  .tabbar a span { font-size: 10px; white-space: nowrap; }
  main, .main, .content { padding-bottom: calc(82px + env(safe-area-inset-bottom)); }
  .scene, #scene, .life3d { width: 100%; max-width: 100%; min-width: 0; }
  .life3d canvas { display: block; width: 100%; height: 100%; touch-action: pan-y; }
  .l3-top { left: 8px; right: 8px; top: 8px; gap: 6px; }
  .l3-topbtns { gap: 5px; }
  .l3-btn, .l3-x, .l3-angles button, .l3-action button { min-height: 42px; }
  .l3-angles { max-width: calc(100% - 16px); overflow-x: auto; }
  .l3-walkhud { left: 8px; right: 8px; bottom: calc(12px + env(safe-area-inset-bottom)); }
  .l3-walkbtns { display: flex; gap: 6px; flex-wrap: wrap; }
  .l3-walkbtns button { flex: 1 1 90px; min-height: 44px; }
  .l3-stick { width: 104px; height: 104px; }
  .l3-choice, .l3-sport { padding: 12px; align-items: flex-end; }
  .l3-sbox { width: min(100%, 460px); max-height: min(78dvh, 650px); overflow-y: auto; padding: 16px; border-radius: 18px; }
  .l3-sbtns, .actions { flex-wrap: wrap; }
  .l3-sbtns button, .actions .btn { flex: 1 1 140px; min-height: 44px; }
  .sheet { align-items: flex-end; padding: 0; }
  .sheetbox { width: 100%; max-width: 100%; max-height: 88dvh; overflow-y: auto; border-radius: 20px 20px 0 0; padding: 20px 14px calc(18px + env(safe-area-inset-bottom)); }
  .composer { gap: 6px; padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .composer input { min-width: 0; font-size: 16px; }
  .msgs { min-width: 0; }
  .chattop { padding-left: 10px; padding-right: 10px; }
  .rooms, .tabs, .actions { max-width: 100%; overflow-x: auto; }
  .rooms button, .tabs button { flex: 0 0 auto; }
  .table-wrap, table { max-width: 100%; }
}

@media (max-width: 420px) {
  .view { padding-left: 9px; padding-right: 9px; }
  .grid, .statgrid, .pstats, .shopgrid, .cards, .two-col, .three-col {
    grid-template-columns: minmax(0, 1fr);
  }
  .tabbar a span { font-size: 9px; }
  .l3-title { font-size: 13px; }
  .l3-top .l3-worth { font-size: 11px; }
  .l3-angles button { padding: 7px 9px; }
}

@media (max-height: 520px) and (orientation: landscape) {
  .tabbar { padding-top: 3px; padding-bottom: 3px; }
  .tabbar a { min-height: 38px; }
  .sheetbox, .l3-sbox { max-height: 82dvh; }
}

/* Battle card sizing fix only: keep all three stats inside narrow fighter cards. */
.vs-row .fcard { min-width: 0; box-sizing: border-box; }
.vs-row .fc-stats {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  justify-items: center;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  gap: 2px;
  padding: 0 3px;
  margin-top: 4px;
  font-size: clamp(9px, 1.2vw, 11px);
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.vs-row .fc-stats > span {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 2px;
  min-width: 0;
  white-space: nowrap;
}
.vs-row .fc-stats i { width: 10px; height: 10px; flex: 0 0 10px; }
.vs-row .fc-lvl { font-size: 11px; }
@media (max-width: 600px) {
  .vs-row { gap: 4px; }
  .vs-row .fc-stats { font-size: 9px; gap: 1px; padding: 0 2px; }
  .vs-row .fc-stats > span { gap: 1px; }
  .vs-row .fc-stats i { width: 8px; height: 8px; flex-basis: 8px; }
  .vs-row .fc-lvl { font-size: 10px; }
}

/* Niger Delta Boat Championship: independent responsive tab */
.championship-view { display:flex; flex-direction:column; gap:18px; padding-bottom:28px; }
.championship-view[hidden] { display:none; }
.champ-hero {
  isolation:isolate; position:relative; min-height:390px; display:flex; align-items:center; overflow:hidden;
  padding:clamp(24px,4vw,48px); border-radius:24px; color:#fff;
  background:
    radial-gradient(circle at 88% 16%, rgba(255,217,128,.55), rgba(255,217,128,0) 22%),
    linear-gradient(140deg, #0a3d2c 0%, #0d5d4d 20%, #15415a 58%, #25140f 100%);
  border:1px solid rgba(214,196,112,.48);
  box-shadow:0 18px 40px rgba(6,16,18,.22), inset 0 1px 0 rgba(255,255,255,.06);
}
.champ-hero::before {
  content:""; position:absolute; inset:0; z-index:-2; opacity:.22;
  background:
    linear-gradient(90deg, rgba(255,255,255,.07) 0 12px, transparent 12px 24px),
    linear-gradient(0deg, rgba(255,255,255,.06) 0 12px, transparent 12px 24px);
  background-size:24px 24px;
  mask-image:linear-gradient(90deg, #000 0, #000 54%, transparent 100%);
}
.champ-hero:after {
  content:""; z-index:-1; position:absolute; inset:0;
  background:
    linear-gradient(90deg, rgba(5,21,18,.84) 4%, rgba(5,21,18,.76) 38%, rgba(5,21,18,.18) 100%),
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(0,0,0,.16));
}
.champ-art { position:absolute; inset:0 0 0 auto; width:min(75%,820px); height:100%; z-index:-3; filter:saturate(1.05) contrast(1.02); }
.champ-hero-copy { max-width:540px; position:relative; z-index:1; }
.champ-eyebrow { display:flex; align-items:center; gap:10px; color:#e4f8dc; font-weight:900; font-size:11px; letter-spacing:.12em; }
.champ-live-dot { width:8px; height:8px; border-radius:50%; background:#43f1b4; box-shadow:0 0 0 4px #35e6c12a; }
.champ-hero h1 { color:#fff; margin:18px 0 16px; line-height:.94; font-size:clamp(36px,5vw,72px); font-weight:950; letter-spacing:-.04em; text-transform:uppercase; }
.champ-hero h1 em { font-style:normal; color:#ffe08a; text-shadow:0 2px 12px rgba(255,208,116,.15); }
.champ-hero p { max-width:400px; color:#edf4e6; line-height:1.58; }
.champ-hero-actions { display:flex; flex-wrap:wrap; gap:9px; margin-top:22px; }
.champ-primary,.champ-secondary { min-height:46px; padding:12px 16px; border-radius:12px; border:1px solid #dcc56f; font-weight:850; cursor:pointer; }
.champ-primary { background:linear-gradient(180deg,#ffe29b,#e7bb55); color:#1f2612; box-shadow:0 10px 20px rgba(255,210,124,.16); }
.champ-secondary { color:#f8f4d8; background:linear-gradient(180deg,#155542d9,#0d3546d9); border-color:#7fb39f; }
.champ-hero-chips { display:flex; flex-wrap:wrap; gap:8px; margin-top:24px; }
.champ-hero-chips span { padding:8px 10px; background:linear-gradient(180deg, rgba(13,60,47,.76), rgba(17,45,55,.66)); border:1px solid rgba(226,212,149,.28); border-radius:999px; font-size:10px; font-weight:800; color:#edf7f1; }
.champ-dashboard { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.champ-metric {
  padding:17px 18px; border:1px solid rgba(155,126,72,.45); border-radius:18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0)),
    linear-gradient(135deg,#113827,#153c4c 52%, #2c1f17 100%);
  color:#f7fcf9; min-width:0; position:relative; overflow:hidden;
}
.champ-metric::after { content:""; position:absolute; right:-18px; bottom:-18px; width:86px; height:86px; border-radius:50%; background:radial-gradient(circle, rgba(255,215,126,.16), rgba(255,215,126,0) 70%); }
.champ-metric span { display:block; color:#d5dfba; font-size:10px; font-weight:900; letter-spacing:.12em; }
.champ-metric strong { display:block; margin:7px 0; font-size:clamp(17px,2.7vw,28px); overflow-wrap:anywhere; }
.champ-metric small { color:#d4d6c6; font-size:11px; }
.champ-layout { display:grid; grid-template-columns:minmax(0,1.65fr) minmax(250px,1fr); gap:16px; align-items:start; }
.champ-left,.champ-right { display:grid; gap:16px; min-width:0; }
.champ-panel {
  background:
    linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,0)),
    linear-gradient(155deg,#103c31,#0b2f3d 58%, #221611 100%);
  color:#f3f9f7; border:1px solid rgba(137,118,79,.52); border-radius:20px; padding:clamp(16px,2.8vw,27px); min-width:0;
  box-shadow:0 8px 28px rgba(8,14,18,.1), inset 0 1px 0 rgba(255,255,255,.05);
}
.champ-panel h2 { margin:0; font-size:clamp(22px,2.4vw,33px); color:#fff6d7; line-height:1.05; }
.champ-panel>h2 { margin-bottom:6px; }
.champ-panel p { color:#d8e2d8; line-height:1.5; margin:5px 0 14px; }
.champ-panel-head { display:flex; gap:12px; align-items:start; margin:0 0 16px; }
.champ-panel-head:not(:first-child) { margin-top:22px; }
.champ-panel-head p { margin:6px 0 0; }
.champ-step { display:grid; flex:none; place-items:center; width:38px; height:38px; border:1px solid rgba(245,201,122,.58); color:#ffe29a; border-radius:12px; font-weight:900; background:rgba(255,210,128,.08); }
.champ-mini-tags { display:flex; flex-wrap:wrap; gap:6px; margin:-2px 0 12px; }
.champ-mini-tags span { padding:5px 8px; border-radius:999px; font-size:10px; font-weight:800; letter-spacing:.05em; color:#f6f1cf; background:rgba(255,220,140,.08); border:1px solid rgba(255,220,140,.18); }
.championship-view .statepick { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.championship-view .stpick {
  border-left:4px solid var(--c); background:linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.04));
  color:#f1faf8; border-radius:12px; padding:11px 8px; min-height:52px; text-wrap:balance;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05);
}
.championship-view .stpick.on { color:#152116; background:linear-gradient(180deg,#ffe29a,#e7b75d); }
.championship-view .stpick:focus-visible { outline:3px solid #fff; outline-offset:2px; }
.championship-view .champstates { display:grid; gap:8px; }
.championship-view .champstates .st {
  border-radius:12px; padding:12px; color:#f4faf8;
  background:linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
  border:1px solid rgba(255,255,255,.14); border-left:4px solid var(--c);
}
.champ-prize { font-size:13px; color:#f0e1b5 !important; }
.champ-panel .actions { display:flex; flex-wrap:wrap; gap:9px; }
.champ-panel .actions button { flex:1 1 160px; min-height:46px; }
.champ-refresh,.champ-text-btn { cursor:pointer; }
.champ-refresh { margin-top:12px; }
.champ-text-btn { margin-top:12px; border:0; background:transparent; color:#ffe4a1; font-size:12px; padding:7px 0; text-decoration:underline; }
.champ-milestones,.champ-history { display:grid; gap:8px; }
.champ-goal,.champ-entry {
  display:flex; align-items:center; gap:10px; padding:11px; border:1px solid rgba(255,255,255,.11);
  border-radius:12px; background:linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02)); min-width:0;
}
.champ-goal-icon { flex:none; display:grid; place-items:center; width:28px; height:28px; border-radius:50%; border:1px solid #c6b06c; color:#e2d89f; }
.champ-goal.complete .champ-goal-icon { background:#3acb8b; color:#103a36; border-color:#3acb8b; }
.champ-goal>div,.champ-entry>div { min-width:0; }
.champ-goal b,.champ-entry b { display:block; font-size:13px; }
.champ-goal small,.champ-entry small { color:#d7dfda; display:block; margin-top:4px; font-size:11px; overflow-wrap:anywhere; }
.champ-entry { justify-content:space-between; align-items:start; }
.champ-entry-meta { text-align:right; flex:none; }
.champ-entry-meta strong { color:#ffe09b; font-size:11px; }
.champ-entry-meta strong.won { color:#6ef0c1; }
.champ-speedstats { display:flex; flex-wrap:wrap; gap:18px; margin:12px 0; }
.champ-speedstats span { color:#e5ecd5; }
.champ-speedstats b { color:#ffe29a; }
.championship-view .routes { max-width:100%; }
.championship-view .route { min-width:0; }
.tabbar a[data-tab="championship"][aria-current="page"] { color:#e8b759; }
@media(max-width:780px) {
  .champ-layout { grid-template-columns:minmax(0,1fr); }
  .champ-dashboard { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .champ-metric:first-child { grid-column:1/-1; }
  .champ-hero { min-height:410px; align-items:flex-start; }
  .champ-hero:after { background:linear-gradient(180deg, rgba(5,21,18,.86) 8%, rgba(5,21,18,.75) 55%, rgba(5,21,18,.28) 100%); }
  .champ-art { width:100%; opacity:.7; transform:translate(16%,20%); }
}
@media(max-width:480px) {
  .champ-hero { min-height:440px; padding:22px 17px; }
  .champ-hero h1 { font-size:clamp(32px,9.5vw,48px); }
  .champ-hero-actions button { flex:1 1 135px; }
  .champ-hero-chips span { font-size:9px; padding:6px 8px; }
  .championship-view .statepick { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .champ-panel { padding:15px 12px; }
  .champ-metric { padding:12px; }
  .tabbar a[data-tab="championship"] span { font-size:9px; }
}
@media(prefers-reduced-motion:reduce) { .championship-view * { scroll-behavior:auto!important; transition:none!important; } }


/* ===============================================================
   BOAT CHAMPIONSHIP — PlayNolly's original red / white / ink look.
   This intentionally overrides the previous green championship theme.
   Other game tabs and the fighter-number fit rules remain untouched.
   =============================================================== */
/* Keep Boat Race the same centered 560px content width as the Race tab. */
body:has(#v-championship:not([hidden])) .shell { max-width: 560px; }
body:has(#v-championship:not([hidden])) main { padding-inline: 16px; }
.championship-view {
  --champ-red: #d7192d;
  --champ-red-dark: #ad1222;
  --champ-ink: #17191c;
  --champ-muted: #63646b;
  --champ-border: #e7e1dc;
  --champ-surface: #fff;
  --champ-soft: #f5f1ee;
  gap: 20px;
  color: var(--champ-ink);
  max-width: 100%;
  min-width: 0;
}
.championship-view > * { min-width: 0; }
.champ-hero {
  padding: clamp(24px, 4vw, 48px);
  min-height: 350px;
  background: linear-gradient(118deg, #fff 0%, #fff 42%, #f4e7e6 100%);
  border: 1px solid #e8dedb;
  border-radius: 16px;
  color: var(--champ-ink);
  box-shadow: 0 8px 28px rgba(52, 30, 30, .055);
}
.champ-hero::before { display: none; }
.champ-hero::after {
  background: linear-gradient(90deg, rgba(255,255,255,.99) 5%, rgba(255,255,255,.97) 35%, rgba(255,255,255,.58) 56%, rgba(255,255,255,0) 100%);
}
.champ-art { width: min(65%, 730px); opacity: .96; filter: none; }
.champ-hero-copy { max-width: 535px; }
.champ-eyebrow {
  color: var(--champ-red);
  font-size: 11px;
  letter-spacing: .12em;
  font-weight: 900;
}
.champ-live-dot { background: var(--champ-red); box-shadow: 0 0 0 4px rgba(215,25,45,.1); }
.champ-hero h1 { color: #141414; font-size: clamp(36px, 5vw, 70px); line-height: .98; margin: 15px 0; text-wrap: balance; }
.champ-hero h1 em { color: var(--champ-red); text-shadow: none; }
.champ-hero p { color: #5c5c60; max-width: 365px; font-size: 15px; }
.champ-primary, .champ-secondary {
  border-radius: 9px; min-height: 46px; font-weight: 800;
  transition: transform .15s ease, background-color .15s ease;
}
.champ-primary { background: var(--champ-red); color: #fff; border-color: var(--champ-red); box-shadow: none; }
.champ-primary:hover { background: var(--champ-red-dark); transform: translateY(-1px); }
.champ-secondary { background: #fff; color: #27272a; border-color: #d5d0cc; }
.champ-secondary:hover { background: #f8f5f3; }
.champ-hero-chips span {
  color: #5f5656; background: #f6f1ef; border: 1px solid #ebe4e0;
  border-radius: 6px; padding: 6px 9px; font-size: 10px;
}
.champ-dashboard { gap: 12px; }
.champ-metric {
  background: #fff; color: var(--champ-ink); border: 1px solid var(--champ-border);
  border-radius: 12px; padding: 18px 20px; box-shadow: 0 3px 12px rgba(30,20,20,.035);
  border-top: 3px solid var(--champ-red);
}
.champ-metric::after { display: none; }
.champ-metric span { color: var(--champ-red); font-size: 10px; }
.champ-metric strong { color: #191919; font-size: clamp(20px, 2.5vw, 30px); line-height: 1.1; }
.champ-metric small { color: #757179; }
.champ-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: 18px;
}
.champ-left, .champ-right { min-width: 0; gap: 18px; }
.champ-panel {
  background: var(--champ-surface); color: var(--champ-ink);
  border: 1px solid var(--champ-border); border-radius: 13px;
  padding: clamp(18px, 2.2vw, 28px); box-shadow: 0 4px 18px rgba(44,30,30,.045);
}
.champ-panel h2 { color: #171719; font-size: clamp(22px, 2.2vw, 30px); line-height: 1.06; }
.champ-panel p { color: #68656a; line-height: 1.5; }
.champ-panel-head { gap: 12px; }
.champ-step {
  width: 34px; height: 34px; background: #fdecee;
  border: 1px solid #f4ced3; color: var(--champ-red);
  border-radius: 9px; font-size: 13px;
}
.champ-mini-tags span { color: #a52032; background: #fff2f3; border-color: #f5dfe2; border-radius: 6px; }
.championship-view .statepick { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 9px; }
.championship-view .stpick {
  background: #faf8f7; color: #252326; border: 1px solid #e6dfdc;
  border-left: 4px solid var(--c); border-radius: 9px;
  box-shadow: none; padding: 11px 10px; min-height: 54px;
  font-size: 13px; font-weight: 800; overflow-wrap: anywhere;
}
.championship-view .stpick.on {
  background: #fff0f1; color: #a61729;
  border-color: #d7192d; border-left-color: #d7192d;
  box-shadow: inset 0 0 0 1px #d7192d;
}
.championship-view .stpick:focus-visible { outline: 2px solid var(--champ-red); outline-offset: 2px; }
.championship-view .champstates .st {
  color: #29272a; background: #faf9f8; border: 1px solid #ece6e3;
  border-left: 4px solid var(--c); border-radius: 9px;
}
.champ-panel .actions { gap: 10px; }
.champ-panel .actions button { flex: 1 1 170px; }
.champ-panel .btn:not(.ghost) { background: var(--champ-red); color: #fff; }
.champ-panel .btn:not(.ghost):hover { background: var(--champ-red-dark); }
.champ-panel .btn.ghost { color: #28272b; background: #fff; border: 1px solid #ded6d3; }
.champ-panel .btn.ghost:hover { background: #faf4f3; }
.champ-prize { color: #625e62 !important; }
.champ-panel .money, .champ-prize .money { color: #b41428; }
.champ-text-btn { color: var(--champ-red); }
.champ-goal, .champ-entry { background: #faf9f8; border-color: #ede6e3; border-radius: 9px; }
.champ-goal-icon { border-color: #d9c6c8; color: #b82233; }
.champ-goal.complete .champ-goal-icon { background: #d7192d; color: white; border-color: #d7192d; }
.champ-goal b, .champ-entry b { color: #252426; }
.champ-goal small, .champ-entry small { color: #6c6a70; }
.champ-entry-meta strong { color: #b41428; }
.champ-entry-meta strong.won { color: #07805b; }
.champ-speedstats span { color: #616067; }
.champ-speedstats b { color: #b41428; }
.championship-view .route { background: #faf8f7; color: #232225; border-color: #e9e2df; }
.championship-view .route.on, .championship-view .route[aria-checked="true"] { border-color: var(--champ-red); background: #fff0f2; }
.tabbar a[data-tab="championship"][aria-current="page"] { color: #d7192d; }
@media (max-width: 1000px) {
  .champ-layout { grid-template-columns: minmax(0, 1fr); }
  .champ-hero h1 { max-width: 12ch; }
}
@media (max-width: 780px) {
  .champ-hero { min-height: 340px; align-items: center; }
  .champ-hero::after { background: linear-gradient(90deg, #fff 0%, rgba(255,255,255,.96) 45%, rgba(255,255,255,.5) 100%); }
  .champ-art { width: 76%; opacity: .68; transform: none; }
  .champ-dashboard { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .champ-metric:first-child { grid-column: 1/-1; }
}
@media (max-width: 560px) {
  .championship-view { gap: 14px; }
  .champ-hero { padding: 23px 18px; min-height: 360px; border-radius: 12px; align-items: flex-start; }
  .champ-hero::after { background: linear-gradient(180deg, #fff 0%, rgba(255,255,255,.97) 55%, rgba(255,255,255,.45) 100%); }
  .champ-art { width: 112%; height: 54%; top: auto; bottom: 0; left: 4%; opacity: .72; transform: none; }
  .champ-hero-copy { max-width: 100%; }
  .champ-hero h1 { font-size: clamp(31px, 8vw, 43px); max-width: 13ch; margin: 10px 0; }
  .champ-hero p { font-size: 13px; line-height: 1.42; max-width: 32ch; }
  .champ-hero-actions { margin-top: 14px; }
  .champ-hero-actions button { flex: 1 1 135px; font-size: 13px; }
  .champ-hero-chips { margin-top: 12px; }
  .champ-hero-chips span { font-size: 9px; padding: 5px 7px; }
  .champ-dashboard { gap: 8px; }
  .champ-metric { padding: 12px; }
  .champ-metric strong { font-size: 19px; }
  .champ-panel { padding: 18px 14px; border-radius: 11px; }
  .champ-panel h2 { font-size: 24px; }
  .championship-view .statepick { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 7px; }
  .championship-view .stpick { min-height: 52px; padding: 9px 6px; font-size: 11px; }
  .champ-panel .actions button { flex-basis: 100%; }
  .champ-speedstats { gap: 8px; }
}
@media (max-width: 360px) {
  .championship-view .statepick { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .champ-hero { min-height: 405px; }
}
@media (prefers-reduced-motion: reduce) {
  .championship-view .champ-primary:hover { transform: none; }
}

/* Boat Race width alignment — cards stack naturally within the standard Race column. */
.championship-view { width: 100%; max-width: 100%; min-width: 0; }
.champ-layout { grid-template-columns: minmax(0, 1fr); }
.champ-dashboard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.champ-metric:first-child { grid-column: 1 / -1; }
.champ-hero { padding: 22px 20px; min-height: 350px; }
.champ-hero h1 { font-size: clamp(33px, 6vw, 49px); max-width: 13ch; }
.champ-art { width: 92%; opacity: .7; }
.championship-view .statepick { grid-template-columns: repeat(3, minmax(0,1fr)); }
@media (max-width: 560px) {
  body:has(#v-championship:not([hidden])) main { padding-inline: 12px; }
  .champ-layout { gap: 14px; }
  .champ-dashboard { gap: 8px; }
  .champ-hero { min-height: 360px; padding: 22px 17px; }
  .champ-hero h1 { font-size: clamp(31px, 8vw, 43px); }
  .champ-art { width: 112%; opacity: .72; }
}

/* PH Life — mobile tap-to-walk and switchable movement controls */
.life3d.walking canvas { touch-action: none; cursor: crosshair; }
.life3d.walking[data-movement="joystick"] canvas,
.life3d.walking[data-movement="arrows"] canvas { cursor: grab; }
.life3d.walking[data-movement="tap"] .l3-stick,
.life3d.walking[data-movement="arrows"] .l3-stick { display: none; }
.l3-movehint {
  position: absolute; bottom: calc(22px + env(safe-area-inset-bottom)); left: 16px;
  width: min(48%, 380px); padding: 9px 12px; color: #fff; font-size: 12px;
  font-weight: 700; line-height: 1.4; border-radius: 12px;
  background: rgba(12, 13, 16, .85); border: 1px solid rgba(255,255,255,.16);
  text-shadow: 0 1px 2px #000; pointer-events: none;
}
.life3d.walking[data-movement="joystick"] .l3-movehint { left: 148px; width: min(36%, 260px); }
.l3-movesettings-btn {
  position: absolute; top: calc(175px + env(safe-area-inset-top)); right: 12px;
  display: block; padding: 8px 11px; border: 1px solid rgba(255,255,255,.24);
  border-radius: 10px; background: rgba(19,20,23,.9); color: #fff;
  font-family: inherit; font-size: 12px; font-weight: 800; line-height: 1.25; cursor: pointer; pointer-events: auto;
}
.l3-movesettings {
  position: absolute; z-index: 20; top: calc(215px + env(safe-area-inset-top)); right: 12px;
  width: min(280px, calc(100vw - 24px)); max-height: min(380px, 60vh); overflow-y: auto;
  background: #fff; color: #171717; border: 1px solid #d5d0c9;
  border-radius: 15px; padding: 14px; box-shadow: 0 14px 36px rgba(0,0,0,.4);
  pointer-events: auto;
}
.l3-movesettings[hidden] { display: none !important; }
.l3-movesettings b { display: block; margin-bottom: 10px; font-size: 14px; }
.l3-movesettings button {
  display: block; width: 100%; padding: 11px 12px; margin: 5px 0; text-align: left;
  font-family: inherit; font-size: 13px; font-weight: 700; line-height: 1.4; color: #222; background: #f5f3f0;
  border: 1px solid #ddd6ce; border-radius: 10px; cursor: pointer;
}
.l3-movesettings button[aria-pressed="true"] { background: #ed2536; color: #fff; border-color: #ed2536; }
.l3-movesettings small { display: block; padding-top: 8px; font-size: 11px; line-height: 1.5; color: #555; }
@media (max-width: 600px) {
  .l3-movesettings-btn { top: calc(155px + env(safe-area-inset-top)); font-size: 11px; }
  .l3-movesettings { top: calc(194px + env(safe-area-inset-top)); }
  .l3-movehint { font-size: 11px; left: 10px; width: min(52%, 260px); bottom: calc(14px + env(safe-area-inset-bottom)); }
  .life3d.walking[data-movement="joystick"] .l3-movehint { display: none; }
}
.l3-arrowpad { display: none; }
.life3d.walking[data-movement="arrows"] .l3-arrowpad {
  display: grid; position: absolute; left: 12px;
  bottom: calc(20px + env(safe-area-inset-bottom)); width: 140px; height: 130px;
  grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr);
  gap: 5px; pointer-events: auto;
}
.l3-arrowpad button {
  border: 1px solid rgba(255,255,255,.32); border-radius: 11px;
  background: rgba(14,15,18,.82); color: #fff; font-size: 20px;
  cursor: pointer; touch-action: none; user-select: none;
}
.l3-arrowpad button.active { background: #ed2536; }
.l3-arrowpad [data-direction="arrowup"] { grid-column: 2; grid-row: 1; }
.l3-arrowpad [data-direction="arrowleft"] { grid-column: 1; grid-row: 2; }
.l3-arrowpad [data-direction="arrowdown"] { grid-column: 2; grid-row: 2; }
.l3-arrowpad [data-direction="arrowright"] { grid-column: 3; grid-row: 2; }
.life3d.walking[data-movement="arrows"] .l3-movehint { left: 160px; width: min(35%, 280px); }
@media (max-width: 600px) { .life3d.walking[data-movement="arrows"] .l3-movehint { display:none; } }


/* PlayNolly demo banner ads: edit the SVG image without altering HTML. */
.pn-ad-slot.pn-ad-demo:not([hidden]) {
  display:block; width:100%; max-width:560px; height:auto; min-height:0;
  margin:18px auto 22px; padding:7px; overflow:hidden;
  border-radius:12px; border:1px solid var(--line, #ddd8d2);
  background:var(--panel, #fff); box-shadow:0 2px 10px rgba(17,17,17,.045);
}
.pn-ad-demo .pn-ad-label {
  display:flex; justify-content:center; gap:7px; align-items:center;
  padding:0 2px 6px; text-transform:uppercase; letter-spacing:.12em;
  font:700 9px/1.2 system-ui,sans-serif; color:var(--muted,#777);
}
.pn-ad-demo .pn-ad-label span { font-size:8px; color:#d51e2c; }
.pn-ad-demo img { display:block; width:100%; max-width:100%; height:auto; aspect-ratio:4/1; object-fit:cover; border-radius:7px; }
@media(max-width:600px) {
  .pn-ad-slot.pn-ad-demo:not([hidden]) { margin:14px auto 18px; padding:5px; border-radius:10px; }
  .pn-ad-demo .pn-ad-label { font-size:8px; padding-bottom:5px; }
}

/* Actual sponsor banners: preserve the whole 16:9 design at the site's 560px width. */
.pn-ad-demo img { aspect-ratio: 1672 / 941; object-fit: contain; background:#fff; }
.pn-ad-slot.pn-ad-demo:not([hidden]) { max-width:560px; }
@media (max-width: 430px) { .pn-ad-slot.pn-ad-demo:not([hidden]) { margin:12px auto 18px; padding:4px; } }

/* === Mobile layout correction: November 2026 === */
@media (max-width: 760px) {
  /* Chat occupies the full available width, rather than inheriting regular page padding. */
  body.pn-chat-active .shell { width: 100%; max-width: none; }
  body.pn-chat-active main { padding: 0 !important; margin: 0 !important; width: 100%; max-width: none; }
  body.pn-chat-active #v-chat.chatview {
    box-sizing: border-box; width: 100%; max-width: none; min-width: 0;
    margin: 0 !important; padding: 0 !important;
    height: calc(100dvh - 158px - env(safe-area-inset-bottom, 0px));
    min-height: min(440px, 65dvh); border-radius: 0; overflow: hidden;
  }
  body.pn-chat-active #v-chat .chattop,
  body.pn-chat-active #v-chat .msgs,
  body.pn-chat-active #v-chat .composer,
  body.pn-chat-active #v-chat .chatsafe,
  body.pn-chat-active #v-chat .inbox { width: 100%; min-width: 0; box-sizing: border-box; }
  body.pn-chat-active #v-chat .roomline { min-width: 0; }
  body.pn-chat-active #v-chat .rl-t { flex: 1; min-width: 0; }
  body.pn-chat-active #v-chat .roomline .btn { flex-shrink: 0; padding: 8px 10px; font-size: 12px; }
  body.pn-chat-active #v-chat .chatempty { max-width: 100%; }

  /* Seven navigation destinations must all fit inside a narrow screen. */
  .tabbar { width: 100%; box-sizing: border-box; overflow-x: hidden !important;
    gap: 0; padding: 5px max(2px, env(safe-area-inset-left)) calc(5px + env(safe-area-inset-bottom, 0px)) max(2px, env(safe-area-inset-right)); }
  .tabbar a { flex: 1 1 0 !important; max-width: none; min-width: 0; padding: 5px 0; gap: 3px; }
  .tabbar a span { display: block; font-size: clamp(8px, 2.35vw, 10px) !important; letter-spacing: -.3px; white-space: nowrap; line-height: 1.2; }
  .tabbar svg { height: 21px; width: 21px; }

  /* The site header cannot push cash and profile beyond the phone's right edge. */
  .topbar { width: 100%; box-sizing: border-box; gap: 5px !important; overflow: hidden; }
  .topbar .logo { font-size: clamp(15px, 4.7vw, 21px) !important; white-space: nowrap; min-width: 0; flex-shrink: 1; }
  .topstats { margin-left: auto; gap: 4px !important; min-width: 0; flex: 0 0 auto; }
  .topstats .pill { min-height: 34px; padding: 5px 7px; font-size: 11px; }
  .topstats .pill.search { width: 34px; justify-content: center; }
  .topstats .pill svg { width: 15px; height: 15px; }
  .topstats .avatar-btn { width: 34px; height: 34px; flex: 0 0 34px; }

  /* Modal actions stay accessible above the home indicator and site navigation. */
  .sheet { z-index: 300 !important; width: 100%; height: 100dvh; overflow: hidden; padding: 0 !important; }
  .sheetbox { width: 100% !important; max-width: 100% !important;
    max-height: calc(100dvh - env(safe-area-inset-top, 0px) - 8px) !important;
    overflow-x: hidden; overflow-y: auto; overscroll-behavior-y: contain;
    padding: 18px 14px calc(28px + env(safe-area-inset-bottom, 0px)) !important; }
  .sheetbox .actions { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); overflow: visible !important; width: 100%; }
  .sheetbox .actions .btn { min-width: 0; width: 100%; white-space: normal; overflow-wrap: anywhere; padding: 11px 8px; font-size: 13px; }
  .sheetbox .actions .btn:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .sheetbox .restable { width: 100%; table-layout: fixed; font-size: 12px; }
  .sheetbox .restable td, .sheetbox .restable th { overflow-wrap: anywhere; padding: 8px 4px; }
  .sheetbox .restable th:nth-child(2), .sheetbox .restable td:nth-child(2) { width: 24%; }
  .sheetbox .restable th:nth-child(3), .sheetbox .restable td:nth-child(3) { width: 32%; }
  .sheetbox .res-top { min-width: 0; }
}
@media (max-width: 370px) {
  .topstats .pill.streak { display: none !important; }
  .topstats .pill.cash { font-size: 10px; padding-left: 5px; padding-right: 5px; }
  .topbar .logo { font-size: 15px !important; }
  .tabbar a span { font-size: 8px !important; }
}
/* The driving engine's overlay belongs above the page's header, tabs and sheets. */
html.driving .drive { position: fixed !important; inset: 0 !important;
  width: 100vw !important; height: 100dvh !important; z-index: 1000 !important; }
html.driving body > .shell, html.driving body > .sheet { visibility: hidden !important; }
html.driving body > .drive { visibility: visible !important; }
html.driving .drive .dx-top { top: calc(8px + env(safe-area-inset-top, 0px)); }
html.driving .drive .dx-pad { bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }

/* 9ja Cruise: genuine edge-to-edge mobile 3D scene and compact touch controls.
   Overrides the older `.scene { width:100% }` narrow-screen rule. */
@media (max-width: 760px) {
  #v-life { min-width: 0; }
  #v-life #scene.scene.is3d {
    position: relative;
    box-sizing: border-box;
    width: 100vw !important;
    max-width: none !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: 0 !important;
    overflow: hidden;
    border: 0;
    border-radius: 0;
  }
  #v-life .life3d.inline { inset: 0; width: 100% !important; max-width: none !important; }
  #v-life .life3d canvas { width: 100% !important; height: 100% !important; }
  #v-life .l3-top { top: 8px; left: 8px; right: 8px; align-items: flex-start; }
  #v-life .l3-top > div:first-child { padding: 6px 8px; border-radius: 9px; }
  #v-life .l3-title { font-size: 13px; }
  #v-life .l3-worth { font-size: 11px; }
  #v-life .l3-btn { font-size: 12px; line-height: 1.2; min-height: 34px; padding: 8px 10px; border-radius: 9px; }
  #v-life .l3-top .l3-btn { padding: 8px 10px; }
  #v-life .l3-angles { top: 76px; left: 8px; right: 8px; width: auto; max-width: none; gap: 4px; scrollbar-width: none; }
  #v-life .l3-angles button { font-size: 11px; min-height: 32px; padding: 6px 9px; }
  #v-life .l3-hint { top: 115px; left: 8px; right: 8px; font-size: 11px; line-height: 1.3; }
  #v-life .l3-bottom { bottom: 10px; left: 8px; right: 8px; gap: 6px; }
  #v-life .l3-bottom .l3-btn { min-width: 0; flex: 1 1 0; font-size: 12px; padding: 9px 5px; }
  #v-life .l3-zoom { right: 8px; }
  #v-life .l3-zoom button { width: 34px; height: 34px; }
  #v-life .l3-where { top: 62px; left: 8px; font-size: 11px; max-width: 47%; }
  #v-life .l3-needs { top: 108px; left: 8px; width: min(154px, 44vw); font-size: 10px; padding: 6px 8px; }
  #v-life .l3-walkbtns { bottom: 14px; right: 8px; max-width: min(38%, 130px); gap: 5px; flex-direction: column; flex-wrap: nowrap; }
  #v-life .l3-walkbtns button { flex: none; width: auto; min-width: 0; min-height: 34px; padding: 8px 10px; font-size: 12px; }
  #v-life .l3-walkbtns [data-act="action"] { font-size: 12px; padding: 9px 10px; max-width: 100%; white-space: normal; }
  #v-life .l3-movesettings-btn { right: 8px; font-size: 11px; padding: 6px 9px; max-width: 48%; }
  #v-life .l3-movehint { bottom: 12px; left: 8px; width: min(47%, 190px); font-size: 10px; padding: 7px; }
  #v-life .l3-ask { max-width: calc(100vw - 28px); white-space: normal; font-size: 11px; }
  #v-life .l3-ask .l3-btn { font-size: 11px; padding: 6px 8px; }
  #v-life .l3-stick { width: 80px; height: 80px; }
  #v-life .l3-stick i { width: 34px; height: 34px; }
}
/* Walk around becomes an immersive viewport layer; Done returns to normal page. */
@media (max-width: 760px) {
  html.pn-life-immersive,
  html.pn-life-immersive body { overflow: hidden !important; overscroll-behavior: none; }
  html.pn-life-immersive #v-life #scene.scene.is3d {
    position: fixed !important; inset: 0 !important;
    width: 100vw !important; height: 100dvh !important;
    max-width: none !important; min-height: 0 !important;
    margin: 0 !important; padding: 0 !important;
    z-index: 250 !important; background: #101010;
    isolation: isolate;
  }
  html.pn-life-immersive #v-life .life3d.inline {
    position: absolute !important; inset: 0 !important;
    width: 100% !important; height: 100% !important;
  }
  html.pn-life-immersive #v-life .l3-walkhud { inset: 0 !important; }
  html.pn-life-immersive #v-life .l3-top { top: max(8px, env(safe-area-inset-top)); }
  html.pn-life-immersive #v-life .l3-walkbtns { bottom: max(12px, env(safe-area-inset-bottom)); }
  html.pn-life-immersive #v-life .l3-movehint { bottom: max(12px, env(safe-area-inset-bottom)); }
}
@media (max-width: 380px) {
  #v-life .l3-bottom .l3-btn { font-size: 11px; padding: 7px 3px; }
  #v-life .l3-top .l3-btn { font-size: 11px; }
  #v-life .l3-angles button { font-size: 10px; padding: 5px 7px; }
}

/* Mobile control and fight-card polish (2026-11-20) */
@media (max-width:760px) {
  #v-fight .roster { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  #v-fight .char { box-sizing:border-box; min-width:0; padding:8px 5px; overflow:hidden; }
  #v-fight .char canvas { max-width:100%; width:min(100%,92px); height:auto; aspect-ratio:8/11; }
  #v-fight .char b, #v-fight .char .small { max-width:100%; overflow-wrap:anywhere; }
  #v-fight .fcard { min-width:0; }
  #v-fight .fcard .fc-name { font-size:clamp(10px,2.7vw,14px); max-width:100%; overflow-wrap:anywhere; white-space:normal; }
  #v-fight .fc-stats { gap:4px; max-width:100%; flex-wrap:wrap; font-size:11px; }
  .l3-zoom { gap:4px; }
  .l3-zoom button { width:35px;height:35px;min-height:35px;font-size:18px; touch-action:manipulation; }
  .life3d.walking.driving .l3-arrowpad { display:grid !important; position:absolute; left:10px; bottom:calc(15px + env(safe-area-inset-bottom)); width:132px;height:122px; grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(2,1fr);gap:4px;pointer-events:auto; }
  .life3d.walking.driving .l3-stick { display:none !important; }
  .life3d.walking.driving .l3-movehint { bottom:calc(145px + env(safe-area-inset-bottom)) !important; max-width:155px; width:40vw; left:10px; font-size:10px; }
}
@media (hover:none) and (pointer:coarse) and (orientation:landscape) {
  .fight.stickctl .fx-act .fx-pow { width:clamp(46px,7.2vw,60px) !important; min-width:0 !important; height:clamp(50px,15vh,66px) !important; padding:5px 3px !important; font-size:clamp(8px,1.5vw,11px) !important; line-height:1.1 !important; overflow:hidden; box-sizing:border-box; }
  .fight.stickctl .fx-act .fx-pow span { display:block; overflow-wrap:anywhere; word-break:break-word; white-space:normal; max-height:100%; }
  .fight.stickctl .fx-act { gap:3px !important; max-width:45vw; }
}

/* Fight-only mobile viewport, gesture protection, and uncluttered landscape controls */
html.pn-fight-active, html.pn-fight-active body { overflow: hidden !important; overscroll-behavior: none; }
html.pn-fight-active .fight {
  position: fixed !important; inset: 0 !important; width: 100vw !important;
  height: 100vh; height: 100dvh; z-index: 2147483000 !important;
  overflow: hidden; touch-action: none !important; overscroll-behavior: none;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
html.pn-fight-active .fight canvas, html.pn-fight-active .fight button { touch-action: none !important; }
html.pn-fight-active .fight .fx-fullscreen { display: grid; }
@media (hover: none) and (pointer: coarse) and (orientation: landscape) {
  .fight .fx-top { top: calc(5px + env(safe-area-inset-top)); gap: 6px; }
  .fight .dx-top .dx-ic { width: 39px; height: 39px; min-height: 39px; }
  .fight.stickctl .fx-stick { width: min(21vh, 112px); height: min(21vh, 112px); left: calc(10px + env(safe-area-inset-left)); bottom: calc(8px + env(safe-area-inset-bottom)); }
  .fight.stickctl .fx-sf { width: 176px; height: 126px; right: calc(8px + env(safe-area-inset-right)); bottom: calc(8px + env(safe-area-inset-bottom)); }
  .fight.stickctl .fx-sfb.punch, .fight.stickctl .fx-sfb.kick { width: 58px; height: 58px; }
  .fight.stickctl .fx-sfb.shadow { width: 70px; height: 70px; right: 73px; top: 23px; }
  .fight.stickctl .fx-act { top: calc(66px + env(safe-area-inset-top)); right: calc(8px + env(safe-area-inset-right)); bottom: auto; gap: 4px; }
  .fight.stickctl .fx-act .fx-pow { width: 51px; height: 54px; font-size: 10px !important; }
  .fight.stickctl .fx-act .fx-ult { width: 54px; height: 60px; }
  .fight .fx-team { top: calc(80px + env(safe-area-inset-top)); gap: 4px; }
  .fight .fx-mate { width: 41px; height: 42px; }
  .fight .fx-hint { top: 48%; max-width: min(550px, 70%); font-size: 12px; }
}
@media (hover: none) and (pointer: coarse) and (orientation: portrait) {
  .fight .fx-top { top: calc(8px + env(safe-area-inset-top)); }
  .fight .fx-hint { top: 31%; }
}
