@font-face {
  font-family: 'Lilita One';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/LilitaOne-400-latin-ext.f40903e46b.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Lilita One';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/LilitaOne-400-latin.d2575d4fa3.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/Nunito-700-latin-ext.2c8d792869.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/Nunito-700-latin.ba344451ea.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(/assets/fonts/Nunito-700-latin-ext.2c8d792869.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(/assets/fonts/Nunito-700-latin.ba344451ea.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url(/assets/fonts/Nunito-700-latin-ext.2c8d792869.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url(/assets/fonts/Nunito-700-latin.ba344451ea.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Tiny Run: Big House — UI styles. Chunky "toy box" buttons, glassy cards, bouncy motion. */
:root {
  --ink: #2b2140; --ink2: #6a5d82; --paper: #fffaf0; --card: rgba(255, 251, 243, 0.95);
  --orange: #ff922b; --orange-d: #c8500f; --yellow: #ffd43b; --yellow-d: #d99a00;
  --red: #fa5252; --blue: #4dabf7; --blue-d: #1971c2; --green: #51cf66; --green-d: #237032;
  --purple: #7950f2; --purple-d: #4c2fb0;
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px); --sar: env(safe-area-inset-right, 0px);
  --display: 'Lilita One', 'Nunito', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #f6e4c8; color: var(--ink); }
body { font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif; font-weight: 800; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; touch-action: none; overscroll-behavior: none; }
button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
img.ic { width: 1.15em; height: 1.15em; vertical-align: -0.2em; }
#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; }
#touch { position: fixed; inset: 0; z-index: 2; pointer-events: none; touch-action: none; }
body.running #touch { pointer-events: auto; }
body.running alphaflow-badge { display: none !important; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4em;
  font: 900 19px/1 'Nunito', sans-serif; letter-spacing: 0.03em; color: #fff;
  background: linear-gradient(180deg, #ffb24a 0%, #ff7f1f 100%); border: 0; border-radius: 18px; padding: 16px 24px;
  box-shadow: 0 6px 0 var(--orange-d), 0 14px 24px -8px rgba(120, 50, 0, 0.5), inset 0 2px 0 rgba(255, 255, 255, 0.5);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.18); transition: transform 0.08s, box-shadow 0.08s, filter 0.2s; position: relative;
}
.btn:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--orange-d), 0 4px 10px -4px rgba(120, 50, 0, 0.5), inset 0 2px 0 rgba(255, 255, 255, 0.5); }
.btn.sm { font-size: 15px; padding: 11px 14px; border-radius: 14px; }
.btn.disabled { filter: grayscale(0.85) brightness(1.05); opacity: 0.7; }
.btn-play { font-family: var(--display); font-size: clamp(26px, 6vw, 34px); font-weight: 400; letter-spacing: 0.04em; padding: 18px 30px 14px; flex-direction: column; gap: 4px;
  background: linear-gradient(180deg, #7ee88b 0%, #2fb14a 100%); box-shadow: 0 7px 0 var(--green-d), 0 16px 30px -8px rgba(20, 90, 30, 0.55), inset 0 2px 0 rgba(255, 255, 255, 0.55); animation: breathe 1.6s ease-in-out infinite; }
.btn-play small { font: 800 11px 'Nunito', sans-serif; letter-spacing: 0.1em; opacity: 0.8; }
.btn-play:active { box-shadow: 0 1px 0 var(--green-d), inset 0 2px 0 rgba(255, 255, 255, 0.5); animation: none; }
.btn-ok { background: linear-gradient(180deg, #6cc3ff, #2b8ae0); box-shadow: 0 6px 0 var(--blue-d), inset 0 2px 0 rgba(255, 255, 255, 0.5); }
.btn-gold { background: linear-gradient(180deg, #ffe066, #fab005); color: #5c3b00; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); box-shadow: 0 6px 0 var(--yellow-d), 0 14px 24px -8px rgba(140, 90, 0, 0.5), inset 0 2px 0 rgba(255, 255, 255, 0.6); }
.btn-ghost { background: #fff; color: var(--ink); text-shadow: none; box-shadow: 0 6px 0 #d8cbe8, 0 12px 20px -10px rgba(43, 33, 64, 0.4); }
.btn-ghost:active { box-shadow: 0 1px 0 #d8cbe8; }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
.round-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; color: var(--ink); font: 900 26px/1 'Nunito'; display: grid; place-items: center; box-shadow: 0 4px 0 #d8cbe8, 0 8px 16px -8px rgba(43, 33, 64, 0.45); flex: none; }
.round-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #d8cbe8; }
.round-btn svg { width: 24px; height: 24px; fill: var(--ink); }
.link { background: none; border: 0; color: var(--ink2); font-weight: 800; padding: 10px; text-decoration: underline; text-underline-offset: 3px; }
.link.danger { color: #c92a2a; }
.chip-btn { border: 0; background: #f1ebf9; border-radius: 999px; padding: 7px 11px; font-size: 13px; font-weight: 900; color: var(--ink); flex: none; }
.pill { display: inline-flex; align-items: center; gap: 6px; background: #fff; border-radius: 999px; padding: 7px 13px 7px 9px; font-weight: 900; font-size: 16px; box-shadow: 0 3px 0 #e6dcf0, 0 6px 14px -8px rgba(43, 33, 64, 0.4); font-variant-numeric: tabular-nums; }
.pill.sm { font-size: 13px; padding: 5px 11px; }

/* ---------- screens ---------- */
.screen { position: fixed; inset: 0; z-index: 10; display: none; flex-direction: column; padding: calc(12px + var(--sat)) calc(14px + var(--sar)) calc(12px + var(--sab)) calc(14px + var(--sal)); }
.screen.on { display: flex; animation: scrIn 0.28s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes scrIn { from { opacity: 0; transform: translateY(14px) scale(0.985); } }
.screen.modal { z-index: 20; align-items: center; justify-content: center; background: rgba(35, 22, 58, 0.5); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.card { width: min(420px, 100%); max-height: 100%; overflow: auto; background: var(--card); border-radius: 28px; padding: 22px; box-shadow: 0 30px 60px -20px rgba(30, 10, 60, 0.55), inset 0 0 0 2px #fff; display: flex; flex-direction: column; gap: 12px; }
.card.center { align-items: center; text-align: center; }
.card h2, .topbar h2 { font-family: var(--display); font-weight: 400; font-size: 30px; margin: 0; letter-spacing: 0.03em; color: var(--ink); }
.topbar { display: flex; align-items: center; gap: 8px; min-height: 48px; }
.topbar h2 { font-size: 24px; text-shadow: 0 2px 0 #fff; }
.spacer { flex: 1; }
.muted { color: var(--ink2); margin: 0; font-size: 14px; }

/* ---------- home ---------- */
#s-home { align-items: stretch; }
.best-chip { background: var(--ink); color: #ffd43b; border-radius: 999px; padding: 8px 14px; font-size: 13px; letter-spacing: 0.08em; box-shadow: 0 3px 0 #120c1e; }
.best-chip b { color: #fff; margin-left: 4px; font-size: 15px; }
.logo { text-align: center; margin-top: clamp(4px, 2vh, 24px); pointer-events: none; }
.logo-main { font-family: var(--display); font-size: clamp(54px, 15vw, 104px); line-height: 0.9; letter-spacing: 0.02em; white-space: nowrap; }
.logo-main span { display: inline-block; color: #ff7f1f; -webkit-text-stroke: 0.07em #fff; paint-order: stroke fill; text-shadow: 0 0.07em 0 #b8430a, 0 0.12em 0.18em rgba(80, 30, 0, 0.35); animation: bob 2.4s ease-in-out infinite; }
.logo-main span:nth-child(2n) { color: #ffcc1f; text-shadow: 0 0.07em 0 #c48a00, 0 0.12em 0.18em rgba(80, 30, 0, 0.35); }
.logo-main span:nth-child(3n) { color: #4dabf7; text-shadow: 0 0.07em 0 #1864ab, 0 0.12em 0.18em rgba(0, 30, 80, 0.35); }
.logo-main span:nth-child(5n) { color: #51cf66; text-shadow: 0 0.07em 0 #237032, 0 0.12em 0.18em rgba(0, 60, 20, 0.35); }
.logo-main span:nth-child(1) { animation-delay: 0s; } .logo-main span:nth-child(2) { animation-delay: 0.1s; } .logo-main span:nth-child(3) { animation-delay: 0.2s; } .logo-main span:nth-child(4) { animation-delay: 0.3s; } .logo-main span:nth-child(5) { animation-delay: 0.45s; } .logo-main span:nth-child(6) { animation-delay: 0.55s; } .logo-main span:nth-child(7) { animation-delay: 0.65s; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-6%) rotate(2deg); } }
.logo-sub { display: inline-block; margin-top: 6px; font-family: var(--display); font-size: clamp(16px, 4.2vw, 24px); letter-spacing: 0.32em; padding: 6px 14px 6px 20px; color: #ffd43b; background: var(--ink); border-radius: 10px; transform: rotate(-3deg); box-shadow: 0 4px 0 #120c1e; }
.home-stage { flex: 1; min-height: 110px; }
.home-bottom { margin-top: auto; width: min(520px, 100%); align-self: center; display: flex; flex-direction: column; gap: 14px; padding-bottom: 58px; }
.mission-card { text-align: left; border: 0; border-radius: 22px; padding: 12px 14px; background: rgba(255, 251, 243, 0.9); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 5px 0 #e3d6ee, 0 14px 30px -14px rgba(43, 33, 64, 0.5); display: flex; flex-direction: column; gap: 6px; }
.mc-head { display: flex; justify-content: space-between; align-items: center; font-family: var(--display); font-weight: 400; letter-spacing: 0.06em; font-size: 15px; }
.mult-chip { background: var(--purple); color: #fff; border-radius: 999px; padding: 3px 10px; font-size: 13px; box-shadow: 0 2px 0 var(--purple-d); }
.mrow { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 3px 10px; }
.mrow .mtxt { font-size: 14px; line-height: 1.2; }
.mrow .mbar { grid-column: 1 / -1; height: 8px; border-radius: 99px; background: #ece4f5; overflow: hidden; }
.mrow .mbar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #845ef7, #b197fc); transition: width 0.4s; }
.mrow .mval { grid-row: 1; grid-column: 2; font-size: 12px; color: var(--ink2); }
.mrow.done .mbar i { background: linear-gradient(90deg, #40c057, #8ce99a); }
.mrow.done .mtxt::before { content: '✓ '; color: #2f9e44; }
.mrow.compact .mtxt { font-size: 13px; }
.mrow.compact .mbar { height: 6px; }
.home-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tile { position: relative; border: 0; border-radius: 18px; background: #fff; padding: 10px 4px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; box-shadow: 0 5px 0 #e3d6ee, 0 10px 20px -12px rgba(43, 33, 64, 0.5); transition: transform 0.08s; }
.tile:active { transform: translateY(4px); box-shadow: 0 1px 0 #e3d6ee; }
.tile-ic { font-size: 26px; line-height: 30px; height: 30px; width: 30px; display: grid; place-items: center; }
img.tile-ic { width: 30px; height: 30px; }
.tile-ic.hunt { width: auto; font: 900 13px/1 'Nunito'; display: flex; gap: 2px; }
.tile-ic.hunt i { font-style: normal; width: 15px; height: 20px; display: grid; place-items: center; background: #eee6f6; border-radius: 4px; color: transparent; }
.tile-ic.hunt i.got { background: var(--yellow); color: #8a3b00; }
.dot { position: absolute; top: 6px; right: 12px; width: 12px; height: 12px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px #fff; animation: pulse 1s infinite; }
.dot[hidden] { display: none; }
@keyframes pulse { 50% { transform: scale(1.3); } }

/* ---------- characters ---------- */
.char-stage { flex: 1; min-height: 80px; }
.sheet { width: min(560px, 100%); align-self: center; background: var(--card); border-radius: 26px; padding: 14px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 20px 50px -20px rgba(30, 10, 60, 0.5); margin-bottom: 52px; }
.char-info { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.char-info h3 { font-family: var(--display); font-weight: 400; font-size: 28px; margin: 0; }
.char-info p { margin: 0; color: var(--ink2); font-size: 14px; }
.swatches { display: flex; gap: 8px; }
.sw { width: 54px; height: 54px; border-radius: 16px; border: 3px solid transparent; background: #f3eefa; padding: 0; overflow: hidden; }
.sw img { width: 100%; height: 100%; object-fit: cover; }
.sw.on { border-color: var(--orange); }
.sw.lock img { filter: grayscale(0.7) brightness(0.9); }
.char-list { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 8px; scroll-snap-type: x mandatory; touch-action: pan-x; }
.ccard { flex: none; width: 100px; scroll-snap-align: start; border: 3px solid transparent; border-radius: 20px; background: #fff; padding: 6px 6px 8px; display: flex; flex-direction: column; align-items: center; gap: 2px; box-shadow: 0 4px 0 #e3d6ee; }
.ccard img.th { width: 80px; height: 80px; object-fit: contain; }
.ccard b { font-family: var(--display); font-weight: 400; font-size: 16px; }
.ccard span { font-size: 12px; color: var(--ink2); }
.ccard.active { border-color: var(--orange); transform: translateY(-3px); }
.ccard.locked img.th { filter: brightness(0.3) contrast(0.8); }

/* ---------- upgrades / missions ---------- */
.panel { width: min(560px, 100%); align-self: center; margin-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.panel.scroll { overflow-y: auto; touch-action: pan-y; padding-bottom: 60px; }
.urow { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 20px; padding: 12px; box-shadow: 0 4px 0 #e3d6ee; }
.uic { width: 48px; height: 48px; flex: none; }
.uinfo { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.uinfo b { font-size: 16px; }
.uinfo span { font-size: 13px; color: var(--ink2); }
.pips { display: flex; gap: 4px; margin-top: 3px; }
.pips i { width: 18px; height: 7px; border-radius: 4px; background: #e9e1f3; }
.pips i.on { background: linear-gradient(90deg, #ff922b, #ffd43b); }
.maxed { font-family: var(--display); color: var(--purple); }
.mult-hero { text-align: center; background: linear-gradient(135deg, #7950f2, #9775fa); color: #fff; border-radius: 24px; padding: 14px; box-shadow: 0 5px 0 var(--purple-d); }
.mult-big { font-family: var(--display); font-size: 54px; line-height: 1; }
.mult-hero p { margin: 4px 0 0; font-size: 14px; }
.mcard { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 20px; padding: 12px; box-shadow: 0 4px 0 #e3d6ee; }
.mcard .mrow { flex: 1; }
.hunt { background: var(--card); border-radius: 22px; padding: 14px; box-shadow: 0 4px 0 #e3d6ee; text-align: center; }
.hunt h3 { margin: 0 0 8px; font-family: var(--display); font-weight: 400; letter-spacing: 0.05em; }
.hunt h3 small { font-family: 'Nunito'; font-size: 12px; color: var(--ink2); letter-spacing: 0; }
.hunt .tiles { display: flex; justify-content: center; gap: 6px; }
.tile-l { width: 40px; height: 44px; border-radius: 10px; display: grid; place-items: center; font-family: var(--display); font-size: 24px; background: #ece4f5; color: #b5a8c9; box-shadow: 0 4px 0 #d6cbe3; }
.tile-l.got { background: var(--yellow); color: #c92a2a; box-shadow: 0 4px 0 #e8590c; }
.hunt p { margin: 10px 0 0; font-size: 14px; color: var(--ink2); }

/* ---------- spin ---------- */
.wheel-wrap { position: relative; width: min(300px, 74vw); aspect-ratio: 1; margin: 6px auto; }
#wheel { width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 0 0 8px #ff922b, 0 0 0 12px #fff, 0 18px 40px -12px rgba(0, 0, 0, 0.5); }
.wheel-pin { position: absolute; top: -14px; left: 50%; width: 34px; height: 40px; transform: translateX(-50%); background: #fa5252; clip-path: polygon(0 0, 100% 0, 50% 100%); filter: drop-shadow(0 3px 0 #a51111); }
#spin-msg { margin: 0; min-height: 22px; }

/* ---------- settings ---------- */
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 2px; }
.toggle { width: 58px; height: 32px; border-radius: 99px; border: 0; background: #ddd3e8; position: relative; transition: background 0.2s; flex: none; }
.toggle::after { content: ''; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25); transition: transform 0.2s cubic-bezier(.3, 1.5, .5, 1); }
.toggle.on { background: var(--green); }
.toggle.on::after { transform: translateX(26px); }
.seg { display: flex; background: #ece4f5; border-radius: 12px; padding: 3px; }
.seg button { border: 0; background: none; padding: 7px 11px; border-radius: 9px; font-weight: 900; font-size: 13px; color: var(--ink2); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 2px 6px -2px rgba(0, 0, 0, 0.3); }
.howto { background: #f6f1fb; border-radius: 16px; padding: 10px 12px; font-size: 13px; }
.howto summary { font-weight: 900; cursor: pointer; }
.howto table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.howto td { padding: 4px 0; border-bottom: 1px solid #e6dcf0; vertical-align: top; }
.howto td:last-child { text-align: right; color: var(--ink2); }
.howto p { color: var(--ink2); line-height: 1.4; }
.powered-row { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #eef6f8; padding: 10px 14px; border-radius: 18px; background: linear-gradient(160deg, #121b23, #070b10); box-shadow: inset 0 0 0 1px rgba(184, 220, 231, 0.22), 0 10px 22px -12px rgba(0, 0, 0, 0.7); }
.powered-row img { width: 36px; height: 36px; flex: none; }
.powered-row span { display: flex; flex-direction: column; flex: 1; line-height: 1.15; }
.powered-row small { font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: #9fb6bf; }
.powered-row b { font-size: 15px; font-weight: 900; }
.powered-row em { font-style: normal; font-size: 12px; color: #9cf4f8; }
.powered-row i { font-style: normal; font-size: 24px; color: #9fb6bf; }
.ver { margin: 0; text-align: center; font-size: 12px; color: var(--ink2); }

/* ---------- continue ---------- */
.ring { position: relative; width: 120px; height: 120px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 9; }
.ring-bg { stroke: #ece4f5; }
.ring-fg { stroke: var(--orange); stroke-linecap: round; stroke-dasharray: 289; stroke-dashoffset: 0; }
.ring span { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: 48px; }

/* ---------- summary ---------- */
#s-summary { align-items: center; justify-content: center; background: radial-gradient(ellipse at center, rgba(43, 33, 64, 0.25), rgba(43, 33, 64, 0.6)); }
.sum-card { width: min(440px, 100%); max-height: 100%; overflow-y: auto; background: var(--card); border-radius: 30px; padding: 20px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 30px 60px -20px rgba(30, 10, 60, 0.6), inset 0 0 0 2px #fff; touch-action: pan-y; }
.sum-cause { text-align: center; font-size: 15px; color: var(--ink2); }
.sum-score { text-align: center; position: relative; }
.sum-score small { display: block; letter-spacing: 0.2em; color: var(--ink2); font-size: 12px; }
.sum-score b { font-family: var(--display); font-weight: 400; font-size: clamp(46px, 13vw, 64px); line-height: 1; color: #ff7f1f; -webkit-text-stroke: 0.06em #fff; paint-order: stroke fill; text-shadow: 0 4px 0 #b8430a; font-variant-numeric: tabular-nums; }
.newbest { display: inline-block; margin-top: 6px; background: var(--red); color: #fff; font-family: var(--display); letter-spacing: 0.08em; padding: 5px 14px; border-radius: 999px; transform: rotate(-4deg); animation: pulse 0.9s infinite; box-shadow: 0 3px 0 #a51111; }
.newbest[hidden] { display: none; }
.sum-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sum-grid div { background: #fff; border-radius: 16px; padding: 8px 4px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 1px; box-shadow: 0 3px 0 #e3d6ee; }
.sum-grid b { font-size: 17px; }
.sum-grid small { font-size: 10.5px; color: var(--ink2); }
.sum-grid .ic, .gi { font-size: 20px; width: 22px; height: 22px; }
.sum-zones { display: flex; justify-content: center; gap: 6px; font-size: 24px; }
.sum-missions h4 { margin: 6px 0 6px; font-family: var(--display); font-weight: 400; letter-spacing: 0.05em; font-size: 15px; }
.sum-missions .mrow { margin-bottom: 6px; }
.mdone { color: #2f9e44; font-size: 14px; margin-bottom: 4px; }
.sum-bank { text-align: center; font-size: 14px; color: var(--ink2); }
.sum-actions { display: flex; flex-direction: column; gap: 12px; }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; z-index: 5; pointer-events: none; }
#hud[hidden] { display: none; }
.hud-tl { position: absolute; top: calc(10px + var(--sat)); left: calc(12px + var(--sal)); display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.hud-score { display: flex; align-items: center; gap: 8px; }
#h-score { font-family: var(--display); font-size: clamp(30px, 7vw, 40px); color: #fff; line-height: 1; -webkit-text-stroke: 0.09em var(--ink); paint-order: stroke fill; text-shadow: 0 3px 0 var(--ink); font-variant-numeric: tabular-nums; }
.mult { font-family: var(--display); font-size: 18px; color: #fff; background: var(--purple); padding: 3px 9px 2px; border-radius: 10px; box-shadow: 0 3px 0 var(--purple-d); }
.mult.boost { background: linear-gradient(90deg, #f76707, #fab005); box-shadow: 0 3px 0 #a33e00; animation: pulse 0.5s infinite; }
.mult.bump, .pill.bump { animation: bump 0.35s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes bump { 40% { transform: scale(1.3); } }
.hud-missions { display: flex; gap: 5px; }
.hm { width: 34px; height: 7px; border-radius: 9px; background: rgba(43, 33, 64, 0.35); overflow: hidden; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.7); }
.hm i { display: block; height: 100%; width: 100%; transform-origin: left; background: #b197fc; transition: transform 0.3s; }
.hm.done i { background: #69db7c; }
.hud-powers { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.pchip { display: flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, 0.92); border-radius: 999px; padding: 4px 10px 4px 4px; box-shadow: 0 3px 0 rgba(43, 33, 64, 0.25); animation: scrIn 0.25s; }
.pchip img { width: 28px; height: 28px; }
.pbar { width: 64px; height: 7px; border-radius: 9px; background: #ece4f5; overflow: hidden; }
.pbar i { display: block; height: 100%; background: linear-gradient(90deg, #845ef7, #4dabf7); transform-origin: left; }
.pchip.low { animation: blink 0.25s infinite alternate; }
@keyframes blink { to { opacity: 0.45; } }
.hud-pause { pointer-events: auto; position: absolute; top: calc(10px + var(--sat)); left: 50%; transform: translateX(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.92); display: flex; align-items: center; justify-content: center; gap: 4px; box-shadow: 0 3px 0 rgba(43, 33, 64, 0.25); }
.hud-pause i { width: 4px; height: 15px; background: var(--ink); border-radius: 2px; }
.hud-tr { position: absolute; top: calc(10px + var(--sat)); right: calc(12px + var(--sar)); display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.jar { position: absolute; right: calc(14px + var(--sar)); top: 50%; transform: translateY(-50%); width: 34px; display: flex; flex-direction: column; align-items: center; }
.jar-glass { width: 26px; height: 110px; border-radius: 14px; background: rgba(255, 255, 255, 0.4); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.95), 0 3px 0 rgba(43, 33, 64, 0.25); overflow: hidden; display: flex; align-items: flex-end; }
.jar-fill { width: 100%; height: 100%; transform-origin: bottom; transform: scaleY(0); background: linear-gradient(180deg, #f6c177, #c47a2c); transition: transform 0.2s; }
.jar-ic { width: 34px; height: 34px; margin-top: -10px; filter: drop-shadow(0 2px 0 rgba(43, 33, 64, 0.3)); }
.jar.full .jar-glass { box-shadow: inset 0 0 0 3px #ffd43b, 0 0 20px 4px rgba(255, 212, 59, 0.85); }
.jar.full .jar-fill { background: linear-gradient(180deg, #ffe066, #ff922b); }
.bubble-btn { pointer-events: auto; position: absolute; right: calc(16px + var(--sar)); bottom: calc(20px + var(--sab)); width: 66px; height: 66px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.85); box-shadow: 0 4px 0 rgba(43, 33, 64, 0.3), 0 0 0 3px rgba(116, 192, 252, 0.6); display: grid; place-items: center; }
.bubble-btn img { width: 46px; height: 46px; }
.bubble-btn span { position: absolute; top: -4px; right: -4px; min-width: 24px; height: 24px; border-radius: 12px; background: var(--blue-d); color: #fff; font-size: 13px; display: grid; place-items: center; box-shadow: 0 0 0 2px #fff; }
.bubble-btn.empty { opacity: 0.45; filter: grayscale(1); }
.bubble-btn.active { box-shadow: 0 4px 0 rgba(43, 33, 64, 0.3), 0 0 0 4px #74c0fc, 0 0 24px 6px rgba(116, 192, 252, 0.8); animation: pulse 0.8s infinite; }
.bubble-btn.shake { animation: shake 0.35s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.combo { position: absolute; top: calc(112px + var(--sat)); left: 50%; transform: translateX(-50%); font-family: var(--display); font-size: 26px; color: #ffd43b; -webkit-text-stroke: 0.1em var(--ink); paint-order: stroke fill; opacity: 0; transition: opacity 0.2s; white-space: nowrap; }
.combo.on { opacity: 1; }
.combo.pop { animation: comboPop 0.25s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes comboPop { 40% { transform: translateX(-50%) scale(1.25); } }
.banner { position: absolute; left: 50%; top: 30%; transform: translate(-50%, -50%) scale(0.6); opacity: 0; text-align: center; font-family: var(--display); font-size: clamp(28px, 7vw, 46px); line-height: 1.05; color: #fff; -webkit-text-stroke: 0.08em var(--ink); paint-order: stroke fill; text-shadow: 0 4px 0 var(--ink); white-space: nowrap; transition: opacity 0.3s, transform 0.3s; }
.banner small { display: block; font-family: 'Nunito'; font-weight: 900; font-size: clamp(13px, 3.4vw, 17px); -webkit-text-stroke: 0; text-shadow: 0 2px 0 rgba(43, 33, 64, 0.6); margin-top: 6px; }
.banner.on { opacity: 1; transform: translate(-50%, -50%) scale(1); animation: bannerIn 0.45s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes bannerIn { from { transform: translate(-50%, -50%) scale(0.4) rotate(-6deg); } }
.banner.cat { color: #ffa94d; }
.banner.cookie { color: #ffd43b; }
.banner.gold { color: #ffe066; }
.hint { position: absolute; left: 50%; bottom: calc(26% + var(--sab)); transform: translateX(-50%) translateY(10px); opacity: 0; background: rgba(43, 33, 64, 0.82); color: #fff; font-size: clamp(15px, 4vw, 19px); padding: 10px 18px; border-radius: 999px; white-space: nowrap; transition: opacity 0.25s, transform 0.25s; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.6); }
.hint b { color: #ffd43b; }
.hint.on { opacity: 1; transform: translateX(-50%) translateY(0); }
.zone-toast { position: absolute; top: calc(64px + var(--sat)); left: 50%; transform: translate(-50%, -20px); opacity: 0; display: flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, 0.95); border-radius: 999px; padding: 8px 16px 8px 10px; box-shadow: 0 4px 0 var(--zc, #ff922b), 0 12px 24px -12px rgba(0, 0, 0, 0.5); transition: opacity 0.35s, transform 0.35s cubic-bezier(.2, 1.5, .4, 1); white-space: nowrap; }
.zone-toast span { font-size: 22px; }
.zone-toast b { font-family: var(--display); font-weight: 400; font-size: 20px; letter-spacing: 0.03em; }
.zone-toast em { font-style: normal; font-size: 12px; color: var(--ink2); }
.zone-toast.on { opacity: 1; transform: translate(-50%, 0); }
#floaters { position: fixed; inset: 0; z-index: 6; pointer-events: none; overflow: hidden; }
.floater { position: absolute; transform: translate(-50%, -50%); font-family: var(--display); font-size: clamp(18px, 4.6vw, 26px); color: #fff; -webkit-text-stroke: 0.09em var(--ink); paint-order: stroke fill; white-space: nowrap; animation: floatUp 1.15s cubic-bezier(.2, .9, .3, 1) forwards; }
.floater.near { color: #66d9e8; }
.floater.combo { color: #ffd43b; }
.floater.power { color: #e5dbff; }
.floater.route { color: #8ce99a; }
@keyframes floatUp { 0% { opacity: 0; transform: translate(-50%, -30%) scale(0.5); } 15% { opacity: 1; transform: translate(-50%, -80%) scale(1.15); } 70% { opacity: 1; transform: translate(-50%, -150%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -190%) scale(0.95); } }
#toasts { position: fixed; top: calc(12px + var(--sat)); left: 50%; transform: translateX(-50%); z-index: 30; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(420px, 92vw); }
.toast { background: var(--ink); color: #fff; border-radius: 18px; padding: 10px 16px; text-align: center; box-shadow: 0 14px 30px -10px rgba(0, 0, 0, 0.6); animation: toastIn 0.4s cubic-bezier(.2, 1.5, .4, 1); transition: opacity 0.4s, transform 0.4s; }
.toast b { color: #ffd43b; }
.toast small { display: block; color: #cfc4e2; font-size: 12.5px; margin-top: 2px; }
.toast.out { opacity: 0; transform: translateY(-14px); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-24px) scale(0.9); } }
#countdown { position: fixed; inset: 0; z-index: 25; display: grid; place-items: center; font-family: var(--display); font-size: 120px; color: #fff; -webkit-text-stroke: 0.06em var(--ink); paint-order: stroke fill; pointer-events: none; }
#countdown[hidden] { display: none; }
#countdown.pop { animation: cdPop 0.5s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes cdPop { from { transform: scale(2); opacity: 0; } }

/* ---------- full-screen effects ---------- */
#fx-glow { position: fixed; inset: -20%; z-index: 4; pointer-events: none; opacity: 0; transition: opacity 0.5s; background: radial-gradient(ellipse at center, transparent 48%, rgba(255, 196, 64, 0.26) 78%, rgba(255, 140, 20, 0.5) 100%), repeating-conic-gradient(from 0deg at 50% 60%, rgba(255, 230, 140, 0.08) 0deg 7deg, transparent 7deg 22deg); mix-blend-mode: screen; }
body.cookie #fx-glow { opacity: 1; animation: spinRays 6s linear infinite; }
@keyframes spinRays { to { transform: rotate(360deg); } }
#fx-danger { position: fixed; inset: 0; z-index: 4; pointer-events: none; opacity: 0; box-shadow: inset 0 0 90px 20px rgba(250, 50, 50, 0.6); transition: opacity 0.4s; }
#fx-danger.on { opacity: 1; animation: blink 0.5s infinite alternate; }

/* ---------- loading ---------- */
#loading { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; background: radial-gradient(circle at 50% 40%, #fff6e6, #f6e4c8); transition: opacity 0.6s; }
#loading.done { opacity: 0; pointer-events: none; }
.load-bar { width: 180px; height: 10px; border-radius: 9px; background: #ead9bf; overflow: hidden; }
.load-bar i { display: block; height: 100%; width: 40%; border-radius: 9px; background: var(--orange); animation: load 1s ease-in-out infinite; }
@keyframes load { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
.load-err { max-width: 320px; text-align: center; font-size: 17px; }

/* ---------- wide screens: panels on the right, character stage on the left ---------- */
@media (min-aspect-ratio: 5/4) {
  #s-home.on, #s-chars.on { display: grid; grid-template-columns: 1fr min(440px, 42vw); grid-template-rows: auto auto 1fr; column-gap: 3vw; }
  #s-home .topbar, #s-chars .topbar { grid-column: 1 / -1; }
  #s-home .logo { grid-column: 1; grid-row: 2; }
  #s-home .home-stage { grid-column: 1; grid-row: 3; }
  #s-home .home-bottom { grid-column: 2; grid-row: 2 / 4; align-self: end; width: 100%; padding-bottom: 4px; }
  #s-chars .char-stage { grid-column: 1; grid-row: 2 / 4; }
  #s-chars .sheet { grid-column: 2; grid-row: 2 / 4; align-self: end; width: 100%; margin-bottom: 0; }
  #s-chars .char-list { flex-wrap: wrap; overflow: visible; }
  #s-chars .ccard { width: calc(33.3% - 7px); }
}

/* ---------- small / landscape phones ---------- */
@media (max-height: 560px) {
  .logo-main { font-size: clamp(36px, 9vh, 60px); }
  .logo-sub { font-size: 14px; }
  .home-bottom { gap: 8px; padding-bottom: 8px; width: min(440px, 60vw); margin-right: 0; }
  .mission-card { display: none; }
  .btn-play { padding: 12px 20px 10px; }
  .tile { padding: 6px 4px; }
  .jar-glass { height: 76px; }
  .sheet { margin-bottom: 4px; }
  .char-list .ccard img { width: 56px; height: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  .logo-main span, .btn-play, .dot, body.cookie #fx-glow { animation: none !important; }
}

/* ---------- install / play on your phone ---------- */
.install-chip { align-self: center; border: 0; border-radius: 999px; padding: 9px 18px; background: rgba(255, 251, 243, 0.92); color: var(--ink); font: 900 14px 'Nunito', sans-serif; box-shadow: 0 3px 0 #e3d6ee, inset 0 0 0 2px rgba(255, 146, 43, 0.55); cursor: pointer; }
.install-chip[hidden] { display: none; }
.inst-body { text-align: left; font-size: 15px; line-height: 1.45; margin: 4px 0 14px; }
.inst-body ol { margin: 0; padding-left: 22px; }
.inst-body li { margin: 6px 0; }
.inst-body img { display: block; width: 210px; height: 210px; margin: 4px auto 10px; image-rendering: pixelated; border-radius: 12px; background: #fff; padding: 8px; }
.inst-body p { text-align: center; margin: 6px 0; }
.inst-body code { display: block; text-align: center; font-size: 13px; word-break: break-all; opacity: 0.8; }
@media (pointer: coarse) { .btn-play small { display: none; } }

/* ---------- rendering pass: a soft vignette pulls the eye to the runner ---------- */
#fx-vignette { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(ellipse 85% 75% at 50% 46%, rgba(0, 0, 0, 0) 60%, rgba(26, 16, 44, 0.28) 100%); }

/* ---------- maps: start-point picker ---------- */
.map-chip { align-self: center; display: flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 7px 10px 7px 14px; background: rgba(255, 251, 243, 0.94); color: var(--ink); font: 900 15px 'Nunito', sans-serif; box-shadow: 0 4px 0 var(--zc, #ff922b), 0 10px 20px -12px rgba(0, 0, 0, 0.5); cursor: pointer; }
.map-chip .mc-label { font-size: 10px; letter-spacing: 0.12em; color: var(--ink2); }
.map-chip i { font-style: normal; font-size: 20px; line-height: 1; color: var(--ink2); margin-left: 2px; }
.maps-sub { margin: 4px 0 12px; font-size: 13px; }
.map-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
.map-card { position: relative; border: 0; border-radius: 16px; padding: 12px 10px; text-align: left; background: #fff; color: var(--ink); font: 900 14px 'Nunito', sans-serif; display: flex; align-items: center; gap: 10px; box-shadow: 0 4px 0 var(--zc, #ddd), inset 0 0 0 2px rgba(43, 33, 64, 0.06); cursor: pointer; min-height: 58px; }
.map-card .mi { font-size: 26px; line-height: 1; }
.map-card small { display: block; font-weight: 800; font-size: 11px; color: var(--ink2); margin-top: 2px; }
.map-card.on { box-shadow: 0 4px 0 var(--zc), inset 0 0 0 3px var(--zc); }
.map-card.on::after { content: '✓'; position: absolute; top: 6px; right: 9px; font-size: 14px; color: var(--zc); }
.map-card.locked { cursor: default; background: #f1edf6; color: rgba(43, 33, 64, 0.45); box-shadow: inset 0 0 0 2px rgba(43, 33, 64, 0.06); }
.map-card.locked .mi { filter: grayscale(1); opacity: 0.45; }

/* ---------- DAYDREAM realm title cards ---------- */
.title-card { position: absolute; left: 50%; top: calc(86px + var(--sat)); transform: translateX(-50%) rotate(-3deg); text-align: center; pointer-events: none; opacity: 0; white-space: nowrap; }
.title-card b { display: block; font-family: var(--display); font-weight: 400; font-size: clamp(30px, 8.4vw, 54px); letter-spacing: 0.04em; color: #fdfcf7; text-shadow: 0 0 1px rgba(255,255,255,.6), 0 3px 0 rgba(60, 66, 76, 0.35);
  -webkit-mask-image: var(--grain); mask-image: var(--grain); -webkit-mask-size: 90px; mask-size: 90px; clip-path: inset(-10% 100% -10% 0); }
.title-card i { display: block; height: 7px; margin: 4px auto 0; width: 0; border-radius: 6px; background: linear-gradient(90deg, #c97a6d, #d9a85a, #7ea5b3, #8aac96); -webkit-mask-image: var(--grain); mask-image: var(--grain); -webkit-mask-size: 60px; mask-size: 60px; }
.title-card em { display: block; margin-top: 6px; font: 900 13px 'Nunito', sans-serif; font-style: normal; letter-spacing: 0.14em; color: rgba(253, 252, 247, 0.85); text-shadow: 0 1px 0 rgba(60, 66, 76, 0.5); opacity: 0; }
.title-card.on { opacity: 1; transition: opacity 0.4s 2.2s; }
.title-card.on b { animation: scrawl 0.95s steps(14) forwards; }
.title-card.on i { animation: underline 0.5s 0.85s ease-out forwards; }
.title-card.on em { animation: fadein 0.4s 1.1s forwards; }
.title-card:not(.on) { opacity: 0; transition: opacity 0.5s; }
@keyframes scrawl { from { clip-path: inset(-10% 100% -10% 0); } to { clip-path: inset(-10% 0 -10% 0); } }
@keyframes underline { from { width: 0; } to { width: 78%; } }
@keyframes fadein { to { opacity: 1; } }

.map-chip[hidden] { display: none; }
.logo-sub.long { letter-spacing: 0.16em; font-size: clamp(13px, 3.4vw, 20px); white-space: nowrap; padding: 6px 12px 6px 14px; }

/* realm transitions: the iris closing on the manhole, the white burst out of the gusher */
#iris { position: fixed; inset: 0; z-index: 4; pointer-events: none; display: none; background: radial-gradient(circle at var(--ix, 50%) var(--iy, 50%), rgba(4, 8, 7, 0) var(--ir, 0px), #040807 calc(var(--ir, 0px) + 3px)); }
#flash { position: fixed; inset: 0; z-index: 4; pointer-events: none; display: none; opacity: 0; background: radial-gradient(circle at 50% 30%, #ffffff, #fff8e1 70%); }
.title-card.tc-drain b { color: #d9ffec; text-shadow: 0 0 14px rgba(93, 255, 160, 0.85), 0 0 3px #ffffff, 0 3px 0 rgba(10, 30, 24, 0.6); }
.title-card.tc-drain i { background: linear-gradient(90deg, #7dffb2, #fff08a, #d0a8ff); box-shadow: 0 0 10px rgba(125, 255, 178, 0.7); }

/* ---------------- DUEL ---------------- */
.btn-duel { font-family: var(--display); font-size: clamp(19px, 4.6vw, 24px); letter-spacing: 0.04em; padding: 10px 20px 8px; flex-direction: column; gap: 2px; margin-top: 8px;
  background: linear-gradient(180deg, #ff8a3c, #e8590c); color: #fff; box-shadow: 0 5px 0 #a93a00, 0 10px 22px rgba(232, 89, 12, 0.35); }
.btn-duel small { font: 800 10.5px 'Nunito', sans-serif; letter-spacing: 0.08em; opacity: 0.9; }
.btn-duel:active { transform: translateY(3px); box-shadow: 0 2px 0 #a93a00; }
.banner.red { color: #ff8787; }
#duel-ui { position: fixed; inset: 0; pointer-events: none; z-index: 40; font-family: 'Nunito', sans-serif; color: #fff; }
#duel-ui [hidden] { display: none !important; }
#duel-ui button { pointer-events: auto; }
.du-lobby, .du-results, .du-load { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(16, 18, 40, 0.62); pointer-events: auto; padding: 16px; }
.du-load b { font-family: var(--display); font-size: 26px; letter-spacing: 0.05em; animation: duPulse 0.8s ease-in-out infinite alternate; }
@keyframes duPulse { from { opacity: 0.5; } to { opacity: 1; } }
.du-card { width: min(440px, 100%); max-height: 100%; overflow: auto; background: linear-gradient(180deg, #2b2d5e, #1c1d3f); border-radius: 24px; padding: 20px 18px 16px; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), inset 0 0 0 2px rgba(255, 255, 255, 0.08); display: flex; flex-direction: column; gap: 10px; }
.du-title { font-family: var(--display); font-size: 40px; text-align: center; letter-spacing: 0.05em; background: linear-gradient(90deg, #ffd43b, #ff8a3c, #ff6fb5); -webkit-background-clip: text; background-clip: text; color: transparent; }
.du-sub { text-align: center; font-weight: 800; opacity: 0.8; margin-top: -8px; font-size: 13px; }
.du-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.du-racer { background: rgba(255, 255, 255, 0.07); border-radius: 14px; padding: 8px 10px; border-left: 5px solid var(--c); display: flex; flex-direction: column; }
.du-racer b { color: var(--c); font-family: var(--display); font-size: 18px; letter-spacing: 0.04em; }
.du-racer span { font-size: 11.5px; opacity: 0.75; font-weight: 700; }
.du-how { margin: 0; padding-left: 18px; font-size: 12.5px; line-height: 1.4; opacity: 0.92; display: flex; flex-direction: column; gap: 4px; }
.du-how b { color: #ffd43b; }
.du-invite, .du-back, .du-home, .du-quit { background: rgba(255, 255, 255, 0.1); color: #fff; border: 0; border-radius: 14px; padding: 10px; font: 800 14px 'Nunito', sans-serif; display: flex; flex-direction: column; align-items: center; }
.du-invite small { font-weight: 700; opacity: 0.6; font-size: 11px; }
.du-invite:disabled { opacity: 0.55; }
.du-hud { position: absolute; inset: 0; }
.du-top { position: absolute; left: 12px; right: 12px; top: calc(10px + env(safe-area-inset-top)); display: flex; align-items: center; gap: 10px; }
.du-pos { font-family: var(--display); font-size: 44px; line-height: 1; text-shadow: 0 3px 0 rgba(0, 0, 0, 0.35); min-width: 74px; }
.du-pos sup { font-size: 20px; } .du-pos small { font-size: 17px; opacity: 0.8; margin-left: 2px; }
.du-prog { position: relative; flex: 1; height: 10px; border-radius: 6px; background: rgba(20, 20, 50, 0.45); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.25); }
.du-prog em { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px #1b1b2e; transition: left 0.1s linear; }
.du-prog em.me { width: 18px; height: 18px; margin: -9px 0 0 -9px; box-shadow: 0 0 0 3px #fff; z-index: 2; }
.du-flag { position: absolute; right: -6px; top: -16px; font-style: normal; font-size: 18px; }
.du-time { font: 900 16px 'Nunito', sans-serif; min-width: 40px; text-align: right; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35); }
.du-x { width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.85); color: #333; font-weight: 900; font-size: 16px; }
.du-warn { position: absolute; left: 50%; top: 22%; transform: translateX(-50%); background: #e03131; padding: 8px 16px; border-radius: 12px; font: 900 16px 'Nunito', sans-serif; letter-spacing: 0.04em; animation: duPulse 0.25s infinite alternate; white-space: nowrap; }
.du-count { position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%); font-family: var(--display); font-size: 110px; text-shadow: 0 6px 0 rgba(0, 0, 0, 0.35); color: #ffd43b; }
.du-count.pop { animation: duPop 0.6s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes duPop { from { transform: translate(-50%, -50%) scale(2.2); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
.du-pausebox { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 12px; align-items: center; justify-content: center; background: rgba(16, 18, 40, 0.6); pointer-events: auto; }
.du-pausebox b { font-family: var(--display); font-size: 40px; }
.du-item, .du-nos { position: absolute; bottom: calc(24px + env(safe-area-inset-bottom)); width: 84px; height: 84px; border-radius: 50%; border: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; touch-action: none; -webkit-user-select: none; user-select: none; }
.du-item { left: 18px; background: rgba(255, 255, 255, 0.18); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.45); color: #fff; }
.du-item span { font-size: 36px; line-height: 1; min-height: 36px; }
.du-item small, .du-nos span { font: 900 11px 'Nunito', sans-serif; letter-spacing: 0.1em; }
.du-item.has { background: rgba(255, 212, 59, 0.9); box-shadow: 0 0 0 4px #fff, 0 0 24px rgba(255, 212, 59, 0.8); color: #1b1b2e; animation: duPulse 0.5s infinite alternate; }
.du-nos { right: 18px; width: 96px; height: 96px; color: #fff; background: conic-gradient(#3bc9ff calc(var(--k, 0) * 360deg), rgba(20, 20, 50, 0.55) 0); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3); }
.du-nos i { position: absolute; inset: 8px; border-radius: 50%; background: linear-gradient(180deg, #1c3d7a, #10224a); }
.du-nos span { position: relative; font-size: 14px; }
.du-nos.full { box-shadow: 0 0 0 3px #fff, 0 0 26px #3bc9ff; }
.du-nos.on i, .du-nos.burn i { background: linear-gradient(180deg, #3bc9ff, #1c7ed6); }
.du-podium { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.du-podium li { display: flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, 0.07); border-radius: 12px; padding: 8px 12px; border-left: 5px solid var(--c); }
.du-podium li.me { background: rgba(255, 212, 59, 0.18); }
.du-podium b { font-family: var(--display); font-size: 22px; min-width: 44px; } .du-podium span { flex: 1; font-weight: 900; color: var(--c); } .du-podium em { font-style: normal; font-weight: 800; opacity: 0.8; }
/* the fight: comic words where a hit lands, the K.O. counter, K.O.s on the results */
.floater.hit { font-size: clamp(30px, 8.5vw, 44px); color: #ffd43b; -webkit-text-stroke: 0.1em #c92a2a; letter-spacing: 0.02em; animation: hitPop 0.75s cubic-bezier(.2, 1.4, .4, 1) forwards; }
.floater.hit.ko { font-size: clamp(40px, 12vw, 62px); color: #fff; -webkit-text-stroke: 0.1em #c92a2a; animation-duration: 1.05s; }
.floater.hit.far { font-size: clamp(18px, 5vw, 26px); opacity: 0.9; }
@keyframes hitPop { 0% { opacity: 0; transform: translate(-50%, -50%) scale(2.2) rotate(-14deg); } 14% { opacity: 1; transform: translate(-50%, -50%) scale(0.92) rotate(-6deg); } 24% { transform: translate(-50%, -50%) scale(1.08) rotate(-8deg); } 70% { opacity: 1; transform: translate(-50%, -75%) scale(1) rotate(-8deg); } 100% { opacity: 0; transform: translate(-50%, -110%) scale(0.9) rotate(-8deg); } }
.du-ko { position: absolute; left: 14px; top: calc(62px + env(safe-area-inset-top)); font: 900 18px 'Nunito', sans-serif; background: rgba(20, 20, 50, 0.5); border-radius: 14px; padding: 3px 10px 3px 6px; display: flex; align-items: center; gap: 4px; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35); }
.du-ko b { color: #ffd43b; min-width: 12px; }
.du-ko.pop { animation: koPop 0.5s cubic-bezier(.2, 1.8, .4, 1); }
@keyframes koPop { from { transform: scale(1.9); background: #e03131; } }
.du-kos { font-style: normal; font-size: 13px; color: #fff; opacity: 0.85; margin-left: 4px; } .du-kos.top { color: #ffd43b; opacity: 1; }
.du-reward small { display: block; font-size: 12px; opacity: 0.75; }
.du-reward { text-align: center; font: 900 18px 'Nunito', sans-serif; color: #ffd43b; }
/* PC: key labels on the duel buttons and a controls strip (only with a mouse or trackpad; phones stay clean) */
.du-hud kbd, .du-keys { display: none; }
@media (hover: hover) and (pointer: fine) {
  .du-hud kbd { display: block; position: absolute; top: -8px; right: -6px; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 8px; background: #fff; color: #1b1b2e; font: 900 15px/26px 'Nunito', sans-serif; box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35); }
  .du-keys { display: block; position: absolute; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%); padding: 7px 14px; border-radius: 12px; background: rgba(20, 20, 50, 0.55); font: 800 13px 'Nunito', sans-serif; color: rgba(255, 255, 255, 0.85); white-space: nowrap; pointer-events: none; }
  .du-keys b { color: #ffd43b; margin: 0 3px 0 10px; }
  .du-keys b:first-child { margin-left: 0; }
}
/* DUEL online: the lobby's online box and the waiting room */
.du-online { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 14px; background: rgba(77, 216, 255, 0.1); box-shadow: inset 0 0 0 2px rgba(77, 216, 255, 0.35); }
.du-net-status { display: flex; align-items: center; justify-content: center; gap: 6px; font: 800 12.5px 'Nunito', sans-serif; opacity: 0.9; }
.du-net-status i { width: 9px; height: 9px; border-radius: 50%; background: #868e96; }
.du-net-status i.on { background: #51cf66; box-shadow: 0 0 8px #51cf66; } .du-net-status i.off { background: #ff6b6b; } .du-net-status i.wait { background: #ffd43b; animation: duPulse 0.5s infinite alternate; }
.du-quick { background: linear-gradient(180deg, #4dd8ff, #1c7ed6) !important; }
.du-row { display: flex; gap: 6px; }
.du-row button, .du-share, .du-leave { flex: 1; background: rgba(255, 255, 255, 0.12); color: #fff; border: 0; border-radius: 12px; padding: 10px 8px; font: 800 13.5px 'Nunito', sans-serif; }
.du-code { width: 74px; text-align: center; text-transform: uppercase; letter-spacing: 0.12em; border: 0; border-radius: 12px; padding: 8px; font: 900 16px 'Nunito', sans-serif; background: rgba(255, 255, 255, 0.92); color: #1b1b2e; }
.du-name { display: flex; align-items: center; gap: 8px; font: 800 12.5px 'Nunito', sans-serif; opacity: 0.9; }
.du-name input { flex: 1; min-width: 0; border: 0; border-radius: 10px; padding: 7px 10px; font: 800 14px 'Nunito', sans-serif; background: rgba(255, 255, 255, 0.92); color: #1b1b2e; }
.du-room { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(16, 18, 40, 0.72); pointer-events: auto; z-index: 5; }
.du-room[hidden] { display: none; }
.du-room-code { text-align: center; font: 800 15px 'Nunito', sans-serif; opacity: 0.9; }
.du-room-code b { font-family: var(--display); font-size: 30px; letter-spacing: 0.12em; color: #ffd43b; margin-left: 6px; }
.du-seats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.du-seat { padding: 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.1); display: flex; flex-direction: column; gap: 2px; }
.du-seat b { font: 900 15px 'Nunito', sans-serif; } .du-seat span { font: 700 11.5px 'Nunito', sans-serif; opacity: 0.75; }
.du-seat.me { background: rgba(255, 212, 59, 0.2); box-shadow: inset 0 0 0 2px #ffd43b; }
.du-seat.ai { opacity: 0.6; border: 2px dashed rgba(255, 255, 255, 0.3); background: transparent; }
.du-room-msg { text-align: center; font: 800 14px 'Nunito', sans-serif; min-height: 20px; }
/* inviting friends: the home chip, the share buttons in the waiting room, the stores line */
.home-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.invite-chip { background: linear-gradient(180deg, #4dd8ff, #1c7ed6) !important; color: #fff !important; box-shadow: 0 3px 0 #155e9c !important; }
.stores-soon { margin: 2px 0 0; text-align: center; font: 800 12px 'Nunito', sans-serif; color: var(--ink2, #6b5b7b); opacity: 0.9; }
.du-sharebox { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 14px; background: rgba(255, 255, 255, 0.08); }
.du-sharebox[hidden] { display: none; }
.du-share-msg { font: 700 12.5px 'Nunito', sans-serif; text-align: center; opacity: 0.9; }
.du-share-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.du-share-btns .sh { display: flex; align-items: center; justify-content: center; border: 0; border-radius: 10px; padding: 9px 4px; font: 900 13px 'Nunito', sans-serif; color: #fff; text-decoration: none; background: rgba(255, 255, 255, 0.16); cursor: pointer; }
.du-share-btns .sh-wa { background: #25a35a; } .du-share-btns .sh-tg { background: #2a8fd6; } .du-share-btns .sh-em { background: #7048e8; } .du-share-btns .sh-sms { background: #e8590c; }
.du-share-btns .sh[hidden] { display: none; }
.du-stores { text-align: center; font: 800 11.5px 'Nunito', sans-serif; opacity: 0.75; }
.du-install { align-self: center; }
#stores-soon { align-self: center; padding: 4px 12px; border-radius: 999px; background: rgba(255, 251, 243, 0.9); color: var(--ink, #2a1f3d); opacity: 1; box-shadow: 0 2px 0 rgba(0, 0, 0, 0.12); }
/* names, who's online, an invite arriving */
.set-name input { flex: 1; min-width: 0; margin: 0 8px; border: 0; border-radius: 10px; padding: 8px 10px; font: 800 15px 'Nunito', sans-serif; background: rgba(255, 255, 255, 0.9); color: var(--ink, #2a1f3d); box-shadow: inset 0 0 0 2px rgba(42, 31, 61, 0.15); }
.set-save, .du-nm-save { border: 0; border-radius: 10px; padding: 8px 12px; font: 900 13px 'Nunito', sans-serif; background: #ff922b; color: #fff; }
.set-name-msg, .du-name-msg { font: 700 12px 'Nunito', sans-serif; text-align: center; opacity: 0.85; min-height: 16px; }
.set-name-msg.good, .du-name-msg.good { color: #2b8a3e; opacity: 1; } .set-name-msg.bad, .du-name-msg.bad { color: #e03131; opacity: 1; }
.du-name-msg.good { color: #8ce99a; } .du-name-msg.bad { color: #ff8787; }
.du-name { display: flex; align-items: center; gap: 6px; font: 800 12.5px 'Nunito', sans-serif; }
.du-people-box { display: flex; flex-direction: column; gap: 4px; max-height: 150px; overflow-y: auto; }
.du-people-box[hidden] { display: none; }
.du-people-title { font: 900 11.5px 'Nunito', sans-serif; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.7; }
.du-person { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; background: rgba(255, 255, 255, 0.07); font: 700 12px 'Nunito', sans-serif; }
.du-person b { font: 900 14px 'Nunito', sans-serif; } .du-person span { flex: 1; opacity: 0.7; }
.du-person.none { justify-content: center; opacity: 0.7; }
.du-person i { width: 8px; height: 8px; border-radius: 50%; background: #51cf66; } .du-person i.waiting { background: #ffd43b; } .du-person i.racing { background: #ff6b6b; }
.du-invite-btn { border: 0; border-radius: 9px; padding: 5px 10px; font: 900 12px 'Nunito', sans-serif; background: #1c7ed6; color: #fff; }
.du-invite-btn:disabled { background: #2b8a3e; }
.du-invited { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(16, 18, 40, 0.7); pointer-events: auto; z-index: 8; }
.du-invited[hidden] { display: none; }
.du-inv-text { text-align: center; font: 800 16px 'Nunito', sans-serif; } .du-inv-from { color: #ffd43b; font-size: 20px; }
.du-inv-no { background: rgba(255, 255, 255, 0.12); color: #fff; border: 0; border-radius: 12px; padding: 10px; font: 800 14px 'Nunito', sans-serif; }
