@font-face { font-family: 'Poppins'; font-weight: 700; font-display: swap; src: url('../assets/fonts/Poppins-Bold.woff') format('woff'); }
@font-face { font-family: 'Poppins'; font-weight: 500; font-display: swap; src: url('../assets/fonts/Poppins-Medium.woff') format('woff'); }
@font-face { font-family: 'Poppins'; font-weight: 400; font-display: swap; src: url('../assets/fonts/Poppins-Regular.woff') format('woff'); }
@font-face { font-family: 'InterDisplay'; font-weight: 900; font-display: swap; src: url('../assets/fonts/InterDisplay-Black.woff') format('woff'); }

:root {
  --ink: #241c5c;
  --ink2: #5b4fa8;
  --accent: #ffce2c;
  --accent-d: #c48c0a;
  --mint: #46ecbe;
  --pink: #ff5c86;
  --violet: #7461e2;
  --glass: rgba(255, 255, 255, 0.55);
  --glass-b: rgba(255, 255, 255, 0.7);
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #1c1544; }
body {
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
  overscroll-behavior: none;
  background: radial-gradient(120% 80% at 50% 0%, #4b3aa8 0%, #1c1544 70%);
}
button { font-family: inherit; color: inherit; }
[hidden] { display: none !important; }

#app {
  position: relative; margin: 0 auto; height: 100%;
  width: min(100vw, calc(100vh * 0.5625));
  overflow: hidden; touch-action: none;
}
@media (min-aspect-ratio: 3/5) { #app { box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45); } }
#game { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  backdrop-filter: blur(16px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 8px 22px rgba(30, 10, 90, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* ---------- HUD ---------- */
.hud { position: absolute; left: 0; right: 0; top: calc(var(--sat) + 10px); display: flex; justify-content: space-between; align-items: center; padding: 0 14px; pointer-events: none; gap: 8px; }
.chip { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 20px; font-size: 13px; white-space: nowrap; }
.chip b { font-size: 16px; font-weight: 700; letter-spacing: 0.2px; }
.chip span { color: var(--ink2); font-weight: 500; font-size: 12px; }
.chip.small { height: 30px; padding: 0 11px; }
.chip.col { flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; height: 46px; border-radius: 18px; padding: 0 16px; line-height: 1.15; }
.chip.col b { font-size: 15px; }
.chip.col span { font-size: 11px; }
.chip .par { background: rgba(255, 255, 255, 0.7); padding: 2px 8px; border-radius: 10px; font-weight: 700; color: var(--ink); font-size: 11px; }
#hud-shots b { font-family: 'InterDisplay', 'Poppins', sans-serif; font-size: 19px; min-width: 12px; text-align: center; }
#hud-shots b.bump { animation: bump 0.35s ease-out; }
@keyframes bump { 0% { transform: scale(1.5); } 100% { transform: scale(1); } }

.bottombar { position: absolute; left: 0; right: 0; bottom: calc(var(--sab) + 12px); display: flex; align-items: center; justify-content: space-between; padding: 0 14px; }
.iconbtn { position: relative; width: 46px; height: 46px; border-radius: 23px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, 0.65); cursor: pointer; padding: 0; }
.iconbtn svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
#btn-ghosts svg { fill: rgba(255, 255, 255, 0.8); }
.ghostcount { position: absolute; top: -4px; right: -4px; background: var(--pink); color: #fff; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; }
.dots { display: flex; gap: 6px; padding: 8px 12px; border-radius: 16px; background: rgba(20, 10, 60, 0.28); }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.25); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.2); }
.dots i.miss { background: #d9d4f2; }
.dots i.rim { background: var(--accent); }
.dots i.hit { background: var(--mint); box-shadow: 0 0 8px var(--mint); }
.dots i.now { outline: 2px solid rgba(255, 255, 255, 0.85); outline-offset: 1px; }

.hint { position: absolute; left: 50%; bottom: calc(var(--sab) + 74px); transform: translateX(-50%); background: rgba(20, 10, 60, 0.55); color: #fff; font-size: 13px; font-weight: 500; padding: 9px 16px; border-radius: 18px; white-space: nowrap; animation: hintpulse 2.4s ease-in-out infinite; pointer-events: none; }
@keyframes hintpulse { 50% { opacity: 0.65; } }

.ghostbanner { position: absolute; left: 50%; top: calc(var(--sat) + 60px); transform: translateX(-50%); padding: 8px 14px; border-radius: 18px; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.avatar { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.6); flex: none; }

.stamp { position: absolute; left: 50%; top: 40%; width: 74%; transform: translate(-50%, -50%) scale(0.3); opacity: 0; pointer-events: none; filter: drop-shadow(0 10px 14px rgba(30, 10, 90, 0.25)); }
.stamp.show { animation: stampin 1.5s cubic-bezier(.2, 1.6, .4, 1) forwards; }
.stamp.stay { animation: stampstay 0.5s cubic-bezier(.2, 1.6, .4, 1) forwards; }
@keyframes stampin { 0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3) rotate(-4deg); } 18% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-4deg); } 78% { opacity: 1; transform: translate(-50%, -52%) scale(1) rotate(-4deg); } 100% { opacity: 0; transform: translate(-50%, -60%) scale(0.92) rotate(-4deg); } }
@keyframes stampstay { 0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3) rotate(-4deg); } 100% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-4deg); } }

.toast { position: absolute; left: 50%; top: calc(var(--sat) + 64px); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 20px; font-size: 14px; font-weight: 600; box-shadow: 0 10px 24px rgba(20, 10, 60, 0.35); z-index: 50; white-space: nowrap; animation: toast 2.4s ease forwards; }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, -10px); } 10%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }

/* ---------- buttons ---------- */
.btn { border: 0; cursor: pointer; font-weight: 700; font-size: 16px; border-radius: 26px; height: 52px; padding: 0 22px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform 0.08s, box-shadow 0.08s; white-space: nowrap; }
.btn.primary { color: var(--ink); background: linear-gradient(#ffe36e, #ffc81f); box-shadow: 0 6px 0 var(--accent-d), 0 14px 26px rgba(150, 100, 0, 0.3), inset 0 2px 0 rgba(255, 255, 255, 0.6); }
.btn.primary:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--accent-d), 0 6px 12px rgba(150, 100, 0, 0.3), inset 0 2px 0 rgba(255, 255, 255, 0.6); }
.btn.secondary { color: var(--ink); background: rgba(255, 255, 255, 0.85); box-shadow: 0 4px 0 rgba(90, 70, 180, 0.35), 0 10px 20px rgba(40, 20, 110, 0.15); }
.btn.secondary:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(90, 70, 180, 0.35); }
.btn.ghost { color: #fff; background: rgba(255, 255, 255, 0.16); height: 42px; font-size: 14px; padding: 0 14px; border: 1px solid rgba(255, 255, 255, 0.35); }
.btn.big { height: 62px; font-size: 19px; border-radius: 31px; padding: 0 34px; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.link { background: none; border: 0; color: var(--ink2); font-weight: 600; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 6px; }

/* ---------- screens ---------- */
.screen { position: absolute; inset: 0; z-index: 20; }
.home { display: flex; align-items: center; justify-content: center; background: rgba(40, 24, 120, 0.28); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: fadein 0.35s ease; }
@keyframes fadein { from { opacity: 0; } }
.home-inner { width: 100%; padding: calc(var(--sat) + 20px) 22px calc(var(--sab) + 22px); display: flex; flex-direction: column; align-items: center; gap: 18px; height: 100%; justify-content: center; }
.logo { width: 86%; max-width: 420px; filter: drop-shadow(0 16px 24px rgba(20, 8, 70, 0.35)); animation: logoin 0.7s cubic-bezier(.2, 1.5, .4, 1); }
@keyframes logoin { from { transform: scale(0.6) translateY(20px); opacity: 0; } }
.pill { padding: 8px 16px; border-radius: 18px; font-weight: 600; font-size: 14px; }
.home-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; }
.home-foot { display: flex; flex-direction: column; align-items: center; gap: 10px; min-height: 80px; }
.streak { display: flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 20px; font-weight: 600; font-size: 14px; }
.streak b { font-family: 'InterDisplay', 'Poppins', sans-serif; font-size: 18px; }
.flame { width: 18px; height: 22px; background: radial-gradient(circle at 50% 70%, #ffd84a 0 28%, transparent 30%), linear-gradient(#ff9a3c, #ff5a2c); clip-path: path('M9 0 C12 6 18 9 18 15 C18 19.5 14 22 9 22 C4 22 0 19.5 0 15 C0 11 3 9 5 6 C6 9 7 10 8 10 C8 6 8 3 9 0 Z'); }
.countdown { color: #fff; font-weight: 600; font-size: 14px; opacity: 0.92; text-shadow: 0 1px 6px rgba(20, 8, 70, 0.4); font-variant-numeric: tabular-nums; }
.challenge { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 20px; font-size: 14px; max-width: 360px; line-height: 1.35; }
.challenge b { font-weight: 700; }

.sheetwrap { display: flex; align-items: flex-end; background: rgba(20, 10, 60, 0.35); animation: fadein 0.25s ease; }
.sheet { width: 100%; max-height: 92%; overflow-y: auto; background: rgba(250, 248, 255, 0.94); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border-radius: 30px 30px 0 0; padding: 10px 22px calc(var(--sab) + 22px); display: flex; flex-direction: column; align-items: center; gap: 12px; box-shadow: 0 -10px 40px rgba(20, 10, 60, 0.3); animation: sheetup 0.4s cubic-bezier(.2, 1.2, .4, 1); }
@keyframes sheetup { from { transform: translateY(60%); } }
.grab { width: 44px; height: 5px; border-radius: 3px; background: rgba(36, 28, 92, 0.18); margin-bottom: 4px; }
.sheet h2 { margin: 6px 0 0; font-size: 22px; }
.sheet h3 { margin: 6px 0 0; font-size: 15px; color: var(--ink2); }
.muted { color: var(--ink2); margin: 0; text-align: center; font-size: 14px; line-height: 1.4; }
.small { font-size: 12px; }
.btnrow { display: flex; gap: 10px; width: 100%; }
.btnrow .btn { flex: 1; padding: 0 10px; font-size: 15px; }
.links { display: flex; gap: 4px 12px; flex-wrap: wrap; justify-content: center; }

.res-stamp { width: 70%; max-width: 330px; margin-top: -4px; filter: drop-shadow(0 10px 14px rgba(30, 10, 90, 0.2)); }
.res-title { font-size: 24px; font-weight: 700; margin-top: -6px; }
.res-sub { color: var(--ink2); font-weight: 500; font-size: 14px; margin-top: -10px; }
.res-shots { display: flex; gap: 6px; }
.res-shots i { width: 16px; height: 16px; border-radius: 50%; display: block; }
.res-shots i.miss { background: #d4cff0; }
.res-shots i.rim { background: var(--accent); }
.res-shots i.hit { background: var(--mint); box-shadow: 0 0 10px var(--mint); }
.res-streak { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 18px; font-weight: 600; background: rgba(255, 154, 60, 0.12); border-color: rgba(255, 154, 60, 0.4); }
.res-unlock { display: flex; align-items: center; gap: 10px; background: linear-gradient(90deg, #fff4c8, #fff); border: 1px solid #ffd970; padding: 10px 14px; border-radius: 16px; font-weight: 600; font-size: 14px; }
.res-unlock canvas { width: 40px; height: 40px; }
.friends { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.friend { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 16px; padding: 8px 10px; box-shadow: 0 2px 8px rgba(40, 20, 110, 0.08); }
.friend .nm { flex: 1; font-weight: 600; font-size: 15px; }
.friend .sc { color: var(--ink2); font-weight: 500; font-size: 14px; }
.friend.me { background: #fff6cc; }
.friend button { border: 0; background: var(--violet); color: #fff; border-radius: 14px; height: 30px; padding: 0 12px; font-weight: 700; font-size: 13px; cursor: pointer; }
.invite { width: 100%; text-align: center; font-size: 13px; color: var(--ink2); background: rgba(116, 97, 226, 0.08); border-radius: 14px; padding: 10px 12px; line-height: 1.4; }
#res-count, #result .countdown { color: var(--ink2); text-shadow: none; }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; }
.tile { background: #fff; border-radius: 16px; padding: 10px 6px; text-align: center; box-shadow: 0 2px 8px rgba(40, 20, 110, 0.08); }
.tile b { display: block; font-family: 'InterDisplay', 'Poppins', sans-serif; font-size: 26px; }
.tile span { font-size: 11px; color: var(--ink2); font-weight: 500; }
.bars { width: 100%; display: flex; flex-direction: column; gap: 5px; }
.bar { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.bar span { width: 16px; text-align: right; }
.bar i { display: block; height: 22px; min-width: 26px; border-radius: 8px; background: #cfc8f2; color: var(--ink); font-style: normal; font-size: 12px; text-align: right; padding: 3px 8px; }
.bar i.me { background: var(--mint); }

.skingrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; width: 100%; }
.skin { background: #fff; border-radius: 18px; padding: 10px 6px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; border: 2px solid transparent; cursor: pointer; box-shadow: 0 2px 8px rgba(40, 20, 110, 0.08); position: relative; }
.skin canvas { width: 64px; height: 64px; }
.skin b { font-size: 13px; }
.skin span { font-size: 11px; color: var(--ink2); }
.skin.sel { border-color: var(--violet); }
.skin.locked canvas { filter: grayscale(0.7) brightness(0.75); opacity: 0.6; }
.skin.locked::after { content: ''; position: absolute; top: 28px; left: 50%; width: 22px; height: 22px; transform: translateX(-50%); background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23241c5c'%3E%3Cpath d='M7 10V7a5 5 0 0 1 10 0v3h1a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1zm2 0h6V7a3 3 0 0 0-6 0z'/%3E%3C/svg%3E"); }

.row { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 12px 4px; border-bottom: 1px solid rgba(36, 28, 92, 0.08); font-weight: 600; position: relative; }
.row input[type=checkbox] { position: absolute; opacity: 0; }
.sw { width: 50px; height: 30px; border-radius: 15px; background: #d6d1ee; position: relative; transition: background 0.2s; flex: none; }
.sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); transition: transform 0.2s; }
.row input:checked + .sw { background: var(--mint); }
.row input:checked + .sw::after { transform: translateX(20px); }
.row input[type=text], .textin { font: inherit; font-weight: 600; border: 2px solid #ddd8f3; border-radius: 14px; padding: 10px 12px; width: 52%; color: var(--ink); background: #fff; -webkit-user-select: text; user-select: text; }
.textin { width: 100%; font-size: 18px; text-align: center; }

.onboard { display: flex; align-items: center; justify-content: center; background: rgba(40, 24, 120, 0.4); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); padding: 22px; }
.ob-card { width: 100%; max-width: 380px; border-radius: 30px; padding: 22px; display: flex; flex-direction: column; align-items: center; gap: 14px; background: rgba(255, 255, 255, 0.82); }
.ob-view { width: 100%; overflow: hidden; border-radius: 22px; }
.ob-slides { width: 100%; display: flex; transition: transform 0.4s cubic-bezier(.3, 1.2, .4, 1); will-change: transform; }
.ob-slide { flex: 0 0 100%; text-align: center; }
.ob-slide h2 { margin: 12px 0 4px; font-size: 22px; }
.ob-slide p { margin: 0; color: var(--ink2); font-size: 15px; line-height: 1.45; }
.ob-art { height: 150px; border-radius: 22px; background: linear-gradient(#bcb4f6, #9184e8); position: relative; overflow: hidden; box-shadow: inset 4px 6px 12px rgba(30, 10, 90, 0.3); }
.ob-ball { position: absolute; width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 0 10%, #ffcd2a 30%, #d99a00 100%); box-shadow: 6px 9px 8px rgba(40, 20, 110, 0.3); }
.art-aim .ob-ball { left: 40%; top: 48%; }
.ob-finger { position: absolute; width: 38px; height: 38px; border-radius: 50%; border: 3px solid #fff; background: rgba(255, 255, 255, 0.3); left: 40%; top: 48%; animation: drag 2s ease-in-out infinite; }
@keyframes drag { 0%, 15% { transform: translate(-6px, -6px); } 60%, 80% { transform: translate(-60px, 40px); } 100% { transform: translate(-6px, -6px); opacity: 0; } }
.ob-dots { display: flex; gap: 6px; }
.ob-dots i { width: 8px; height: 8px; border-radius: 4px; background: #d6d1ee; transition: all 0.3s; }
.ob-dots i.on { width: 22px; background: var(--violet); }
.art-cup .ob-cup { position: absolute; left: 50%; bottom: 18px; width: 70px; height: 56px; margin-left: -35px; border: 7px solid var(--mint); border-top: 0; border-radius: 0 0 10px 10px; background: rgba(70, 236, 190, 0.25); }
.art-cup .ob-ball.drop { left: 50%; margin-left: -13px; animation: drop 1.8s cubic-bezier(.5, 0, .7, .4) infinite; }
@keyframes drop { 0% { top: -30px; } 60% { top: 92px; } 70% { top: 80px; } 80%, 100% { top: 92px; } }
.art-day { display: grid; place-items: center; }
.ob-cal { width: 92px; height: 96px; border-radius: 18px; background: #fff; display: grid; place-items: center; font-family: 'InterDisplay', 'Poppins', sans-serif; font-size: 54px; color: var(--violet); box-shadow: 0 10px 0 #d6d1ee, 0 18px 30px rgba(30, 10, 90, 0.25); border-top: 18px solid var(--pink); }

.loading { position: absolute; inset: 0; display: grid; place-items: center; background: #5a47c8; z-index: 100; transition: opacity 0.4s; }
.loading.gone { opacity: 0; pointer-events: none; }
.spinner { width: 42px; height: 42px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, 0.3); border-top-color: #fff; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .hint, .ob-finger, .ob-ball.drop { animation: none; }
}

/* ---------- modes: trick chip, bottom bar extras ---------- */
.trickchip { position: absolute; left: 50%; top: calc(var(--sat) + 64px); transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 7px 14px 7px 10px; border-radius: 18px; font-size: 13px; font-weight: 600; white-space: nowrap; pointer-events: none; }
.trickchip b { background: rgba(36, 28, 92, 0.1); border-radius: 10px; padding: 1px 8px; font-size: 12px; }
.trickchip.ok b { background: var(--mint); }
.trickchip.broken { background: rgba(255, 92, 134, 0.85); color: #fff; }
.trickchip.broken b { background: rgba(255, 255, 255, 0.25); }
.tk-icon { width: 18px; height: 18px; background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ff9a3c'%3E%3Cpath d='M12 2l2.2 6.3L21 10.5l-6.8 2.2L12 19l-2.2-6.3L3 10.5l6.8-2.2z'/%3E%3C/svg%3E"); }
.bb-right { display: flex; gap: 8px; }
.target { padding: 8px 14px; border-radius: 16px; font-size: 12px; font-weight: 600; display: flex; gap: 10px; align-items: center; }
.target .st { color: #ffb400; letter-spacing: -1px; font-size: 13px; }

/* ---------- hub ---------- */
.home-inner { overflow-y: auto; justify-content: flex-start; gap: 14px; padding-top: calc(var(--sat) + 28px); }
.home .logo { width: 72%; max-width: 330px; margin-top: 6px; }
.today-head { display: flex; align-items: baseline; gap: 10px; width: 100%; max-width: 400px; color: #fff; font-size: 14px; font-weight: 500; text-shadow: 0 1px 6px rgba(20, 8, 70, 0.35); }
.today-head b { font-size: 20px; font-weight: 700; }
.today-head .countdown { margin-left: auto; font-size: 13px; }
.cards { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 400px; }
.card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 22px; text-align: left; cursor: pointer; font: inherit; color: var(--ink); transition: transform 0.1s; }
.card:active { transform: scale(0.98); }
.cicon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.12), 0 4px 10px rgba(30, 10, 90, 0.15); }
.cicon svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.c-daily { background: linear-gradient(#8a74ff, #6a52e8); }
.c-one { background: linear-gradient(#ff7aa0, #ff4f7c); }
.c-trick { background: linear-gradient(#ffb25c, #ff8a2c); }
.ctext { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ctext b { font-size: 16px; }
.ctext small { font-size: 12.5px; line-height: 1.3; color: var(--ink2); font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cstat { flex: none; font-weight: 700; font-size: 13px; padding: 6px 12px; border-radius: 14px; background: linear-gradient(#ffe36e, #ffc81f); box-shadow: 0 3px 0 var(--accent-d); }
.cstat.done { background: rgba(70, 236, 190, 0.25); box-shadow: none; color: #137a5d; }
.cstat.miss { background: rgba(36, 28, 92, 0.08); box-shadow: none; color: var(--ink2); }
.adv { width: 100%; max-width: 400px; border: 0; cursor: pointer; text-align: left; border-radius: 24px; padding: 16px 18px; color: #fff; font: inherit; position: relative; display: flex; flex-direction: column; gap: 2px;
  background: radial-gradient(120% 140% at 0% 0%, #9a86ff 0%, #5a40d8 60%, #3d27a8 100%); box-shadow: 0 6px 0 #2c1b86, 0 16px 30px rgba(20, 8, 70, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.adv:active { transform: translateY(3px); box-shadow: 0 3px 0 #2c1b86; }
.adv-label { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; opacity: 0.8; }
.adv b { font-size: 20px; }
.adv small { font-size: 13px; opacity: 0.9; }
.adv-go { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); background: linear-gradient(#ffe36e, #ffc81f); color: var(--ink); font-weight: 700; font-size: 14px; padding: 10px 16px; border-radius: 18px; box-shadow: 0 4px 0 var(--accent-d); }
.home .streak { margin-bottom: 8px; }

/* ---------- adventure map ---------- */
.mapscreen { display: flex; flex-direction: column; background: rgba(28, 18, 84, 0.55); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); animation: fadein 0.3s ease; }
.maphead { display: flex; align-items: center; gap: 12px; padding: calc(var(--sat) + 12px) 16px 10px; color: #fff; }
.maphead b { font-size: 22px; flex: 1; }
.mapstars { padding: 7px 14px; border-radius: 16px; font-weight: 700; color: var(--ink); font-size: 14px; }
.mapscroll { flex: 1; overflow-y: auto; padding: 4px 16px calc(var(--sab) + 30px); display: flex; flex-direction: column; gap: 18px; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
.world { border-radius: 26px; padding: 14px; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.22); }
.world-head { display: flex; align-items: center; gap: 10px; color: #fff; margin-bottom: 12px; }
.world-head .wn { font-size: 11px; font-weight: 700; letter-spacing: 1.4px; opacity: 0.75; }
.world-head b { font-size: 18px; display: block; }
.world-head small { font-size: 12px; opacity: 0.8; }
.world-head .wstars { margin-left: auto; font-weight: 700; font-size: 13px; background: rgba(255, 255, 255, 0.18); padding: 5px 10px; border-radius: 12px; }
.world.locked { opacity: 0.55; }
.lvgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 9px; }
.lv { aspect-ratio: 1; border-radius: 16px; border: 0; cursor: pointer; font: inherit; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; color: var(--ink); background: linear-gradient(#ffffff, #e9e4ff); box-shadow: 0 4px 0 rgba(60, 40, 160, 0.45); }
.lv b { font-family: 'InterDisplay', 'Poppins', sans-serif; font-size: 18px; line-height: 1; }
.lv .s { font-size: 10px; letter-spacing: -1px; color: #ffb400; height: 11px; line-height: 11px; }
.lv .s .off { color: rgba(36, 28, 92, 0.18); }
.lv.cur { background: linear-gradient(#ffe36e, #ffc81f); box-shadow: 0 4px 0 var(--accent-d); animation: lvpulse 1.6s ease-in-out infinite; }
.lv.locked { background: rgba(255, 255, 255, 0.14); box-shadow: none; color: rgba(255, 255, 255, 0.55); cursor: default; }
.lv:active:not(.locked) { transform: translateY(3px); box-shadow: 0 1px 0 rgba(60, 40, 160, 0.45); }
@keyframes lvpulse { 50% { transform: scale(1.06); } }

/* ---------- result extras ---------- */
.res-stars { display: flex; gap: 6px; margin-top: -8px; }
.res-stars i { width: 44px; height: 44px; display: block; background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ddd8f3'%3E%3Cpath d='M12 2.5l2.9 6.1 6.6.8-4.9 4.6 1.3 6.6L12 17.3l-5.9 3.3 1.3-6.6-4.9-4.6 6.6-.8z'/%3E%3C/svg%3E"); }
.res-stars i.on { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffc21a' stroke='%23e09a00' stroke-width='0.8'%3E%3Cpath d='M12 2.5l2.9 6.1 6.6.8-4.9 4.6 1.3 6.6L12 17.3l-5.9 3.3 1.3-6.6-4.9-4.6 6.6-.8z'/%3E%3C/svg%3E"); animation: starpop 0.45s cubic-bezier(.2, 1.8, .4, 1) both; }
.res-stars i:nth-child(2).on { animation-delay: 0.18s; }
.res-stars i:nth-child(3).on { animation-delay: 0.36s; }
.res-stars i:nth-child(2) { transform: translateY(-8px); }
@keyframes starpop { from { transform: scale(0) rotate(-40deg); } }
.res-trick { font-size: 14px; font-weight: 600; padding: 6px 12px; border-radius: 14px; background: rgba(255, 154, 60, 0.14); color: #9a4b00; }
.btnrow:empty { display: none; }
.btn.next { flex: 2; }
.challenge .chgo { flex: none; height: 38px; padding: 0 18px; font-size: 14px; }
