/* Nibbles design system and app styles */

@font-face {
  font-family: 'Figtree';
  src: url('/fonts/figtree-latin.woff2') format('woff2');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Unbounded';
  src: url('/fonts/unbounded-latin.woff2') format('woff2');
  font-weight: 500 800;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --font-ui: 'Figtree', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Unbounded', 'Figtree', ui-sans-serif, system-ui, sans-serif;

  --brand: #c8f542;
  --brand-hi: #d9ff5c;
  --brand-ink: #0b0b12;
  --violet: #8b6cff;
  --pink: #ff5fa2;
  --orange: #ff8a3d;
  --cyan: #3dd6f5;
  --yellow: #ffd23f;
  --green: #2fd087;
  --red: #ff5470;

  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-pill: 999px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --sidebar-w: 256px;
  --topbar-h: 72px;
  --tabbar-h: 64px;
  --gutter: clamp(16px, 2.2vw, 40px);

  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);

  color-scheme: dark;
  --bg: #0a0a10;
  --bg-2: #0e0e16;
  --surface: #14141e;
  --surface-2: #1b1b28;
  --surface-3: #252535;
  --glass: rgba(12, 12, 19, 0.74);
  --glass-2: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.13);
  --text: #f4f4f8;
  --text-2: #b7b7c9;
  --text-3: #8a8aa0;
  --brand-text: var(--brand);
  --danger-text: #ff7d93;
  --brand-soft: rgba(200, 245, 66, 0.14);
  --shadow: 0 18px 50px -24px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 30px 80px -30px rgba(0, 0, 0, 0.85);
  --scrim: linear-gradient(180deg, rgba(8, 8, 14, 0) 0%, rgba(8, 8, 14, 0.62) 48%, rgba(8, 8, 14, 0.92) 100%);
}

[data-theme='light'] {
  color-scheme: light;
  --bg: #f4f4ef;
  --bg-2: #ecece6;
  --surface: #ffffff;
  --surface-2: #f2f2ec;
  --surface-3: #e5e5de;
  --glass: rgba(250, 250, 246, 0.8);
  --glass-2: rgba(10, 10, 16, 0.05);
  --line: rgba(12, 12, 20, 0.08);
  --line-2: rgba(12, 12, 20, 0.15);
  --text: #0e0e15;
  --text-2: #4b4b5a;
  --text-3: #656573;
  --brand-text: #557400;
  --danger-text: #c0203d;
  --brand-soft: rgba(132, 170, 20, 0.16);
  --shadow: 0 18px 40px -26px rgba(30, 30, 60, 0.35);
  --shadow-lg: 0 30px 70px -34px rgba(30, 30, 60, 0.45);
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
  scroll-padding-top: calc(var(--topbar-h) + 12px);
}
body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed;
  inset: -30vh -10vw auto -10vw;
  height: 90vh;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(38% 50% at 18% 30%, rgba(139, 108, 255, 0.16), transparent 70%),
    radial-gradient(30% 42% at 70% 18%, rgba(200, 245, 66, 0.08), transparent 70%),
    radial-gradient(28% 40% at 92% 46%, rgba(255, 95, 162, 0.1), transparent 70%);
}
[data-theme='light'] body::before {
  opacity: 0.6;
}
img,
svg,
canvas {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}
h1,
h2,
h3,
h4,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}
::selection {
  background: var(--brand);
  color: var(--brand-ink);
}
[hidden] {
  display: none !important;
}
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.ic {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.js .ssr {
  display: none;
}
.mobile-only {
  display: none;
}
.play-bar .tile-meta a:hover {
  color: var(--text);
}
.play-bar .tile-meta span + span::before,
.play-bar .tile-meta a + span::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  margin: 0 8px 2px 0;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
}
.ssr,
.noscript {
  max-width: 760px;
  padding: 24px 0;
  color: var(--text-2);
}
.ssr h1 {
  color: var(--text);
  margin-bottom: 12px;
}
.ssr a {
  color: var(--brand-text);
}

/* ---------- App layout ---------- */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100dvh;
}
.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.view {
  flex: 1;
  min-width: 0;
  padding: 28px var(--gutter) 56px;
  outline: none;
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 14px 18px;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  overflow-y: auto;
  scrollbar-width: none;
  z-index: 20;
}
.sidebar::-webkit-scrollbar {
  display: none;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 18px;
}
.brand-mark {
  width: 38px;
  height: 38px;
  filter: drop-shadow(0 6px 16px rgba(200, 245, 66, 0.28));
  transition: transform 0.5s var(--spring);
}
.brand:hover .brand-mark {
  transform: rotate(-8deg) scale(1.06);
}
.brand-word {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 23px;
  letter-spacing: -0.045em;
  line-height: 1;
  padding-bottom: 2px;
}
.side-nav,
.side-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.side-group {
  margin-top: 18px;
}
.side-title {
  padding: 0 12px 8px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}
.side-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 44px;
  padding: 0 12px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-2);
  transition: background 0.2s, color 0.2s;
}
.side-link:hover {
  background: var(--glass-2);
  color: var(--text);
}
.side-link[aria-current='page'] {
  background: var(--brand-soft);
  color: var(--text);
}
.side-link[aria-current='page'] .ic {
  color: var(--brand-text);
}
.side-link .ic {
  width: 21px;
  height: 21px;
}
.side-dot,
.tab-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 0 3px var(--bg);
}
.side-dot {
  margin-left: auto;
}
.cat-ic {
  width: 28px;
  height: 28px;
  margin-left: -4px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--c) 18%, transparent);
  color: var(--c);
}
[data-theme='light'] .cat-ic {
  background: color-mix(in srgb, var(--c) 26%, transparent);
  color: color-mix(in srgb, var(--c) 55%, #000);
}
.cat-ic .ic {
  width: 16px;
  height: 16px;
}
.side-recent {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.side-recent a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
}
.side-recent a:hover {
  background: var(--glass-2);
  color: var(--text);
}
.side-recent img {
  width: 30px;
  height: 30px;
  border-radius: 9px;
}
.side-foot {
  margin-top: auto;
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.side-promo {
  padding: 16px;
  border-radius: 20px;
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(200, 245, 66, 0.22), transparent 60%),
    var(--surface-2);
  border: 1px solid var(--line);
}
.side-promo-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
}
.side-promo-text {
  font-size: 13px;
  color: var(--text-2);
  margin: 4px 0 12px;
  line-height: 1.4;
}
.theme-toggle {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.theme-toggle button {
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--text-3);
  transition: background 0.2s, color 0.2s;
}
.theme-toggle button:hover {
  color: var(--text);
}
.theme-toggle button[aria-pressed='true'] {
  background: var(--surface-3);
  color: var(--text);
}
.theme-toggle .ic {
  width: 17px;
  height: 17px;
}
.side-legal {
  display: flex;
  gap: 14px;
  padding: 0 6px;
  font-size: 12.5px;
  color: var(--text-3);
}
.side-legal a:hover {
  color: var(--text);
}

/* Top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 var(--gutter);
  background: var(--glass);
  -webkit-backdrop-filter: saturate(170%) blur(20px);
  backdrop-filter: saturate(170%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.brand-top {
  display: none;
  padding: 0;
}
.brand-top .brand-mark {
  flex: none;
  width: 32px;
  height: 32px;
}
.brand-top .brand-word {
  font-size: 21px;
}
.search {
  position: relative;
  flex: 1;
  max-width: 620px;
  height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 0 16px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.search:focus-within {
  border-color: color-mix(in srgb, var(--brand) 60%, transparent);
  box-shadow: 0 0 0 4px var(--brand-soft);
}
.search > .ic {
  color: var(--text-3);
}
.search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 15px;
  font-weight: 500;
}
.search input::placeholder {
  color: var(--text-3);
}
.search input::-webkit-search-cancel-button {
  display: none;
}
kbd {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  border-radius: 8px;
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-2);
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
}
.search-pop {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  padding: 8px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-lg);
  animation: pop-in 0.18s var(--ease);
}
.search-pop .row {
  border-radius: 14px;
}
.search-pop .row[aria-selected='true'] {
  background: var(--surface-2);
}
.search-empty {
  padding: 14px;
  color: var(--text-3);
  font-size: 14px;
}
.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.search-mobile {
  display: none !important;
}
.streak {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 14px 0 11px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--line);
  font-weight: 800;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  transition: transform 0.2s var(--spring);
}
.streak .ic {
  width: 18px;
  height: 18px;
  color: var(--text-3);
  stroke: none;
}
.streak.is-hot .ic {
  color: #ff7a2f;
  filter: drop-shadow(0 0 6px rgba(255, 122, 47, 0.6));
}
.streak:hover {
  transform: translateY(-1px);
}
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  background: linear-gradient(135deg, var(--a1, #8b6cff), var(--a2, #ff5fa2));
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--line-2);
  transition: transform 0.25s var(--spring);
}
.avatar:hover {
  transform: scale(1.06);
}

/* Bottom tab bar (mobile) */
.tabbar {
  display: none;
}

/* ---------- Buttons and controls ---------- */
.btn {
  --btn-h: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--btn-h);
  padding: 0 20px;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  user-select: none;
  transition: transform 0.18s var(--ease), background 0.2s, box-shadow 0.25s, color 0.2s, opacity 0.2s;
}
.btn:active {
  transform: scale(0.96);
}
.btn .ic {
  width: 18px;
  height: 18px;
}
.btn-primary {
  background: var(--brand);
  color: var(--brand-ink);
  box-shadow: 0 10px 30px -10px rgba(200, 245, 66, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.btn-primary:hover {
  background: var(--brand-hi);
  box-shadow: 0 14px 36px -10px rgba(200, 245, 66, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-secondary:hover {
  background: var(--surface-3);
}
.btn-ghost {
  color: var(--text-2);
  background: transparent;
}
.btn-ghost:hover {
  color: var(--text);
  background: var(--glass-2);
}
.btn-glass {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.btn-glass:hover {
  background: rgba(255, 255, 255, 0.22);
}
.btn-danger {
  color: var(--red);
  background: color-mix(in srgb, var(--red) 12%, transparent);
}
.btn-danger:hover {
  background: color-mix(in srgb, var(--red) 20%, transparent);
}
.btn-sm {
  --btn-h: 36px;
  padding: 0 14px;
  font-size: 14px;
}
.btn-lg {
  --btn-h: 54px;
  padding: 0 28px;
  font-size: 16.5px;
}
.btn-xl {
  --btn-h: 62px;
  padding: 0 40px;
  font-size: 18px;
  font-weight: 800;
}
.btn-block {
  width: 100%;
}
.icon-btn {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform 0.18s var(--ease), background 0.2s, color 0.2s;
}
.icon-btn:hover {
  color: var(--text);
  background: var(--surface-2);
}
.icon-btn:active {
  transform: scale(0.92);
}
.icon-btn.is-on {
  color: var(--pink);
}
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px;
  margin: -2px;
}
.chips::-webkit-scrollbar {
  display: none;
}
.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 16px;
  border-radius: var(--r-pill);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}
.chip:hover {
  color: var(--text);
  border-color: var(--line-2);
}
.chip:active {
  transform: scale(0.96);
}
.chip[aria-pressed='true'],
.chip[aria-selected='true'] {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.chip .ic {
  width: 16px;
  height: 16px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 11px;
  border-radius: var(--r-pill);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.pill .ic {
  width: 14px;
  height: 14px;
}
.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  height: 24px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-ink);
  background: var(--brand);
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.5);
}
.badge[data-badge='Hot'] {
  background: linear-gradient(135deg, #ff9a3d, #ff4f6e);
  color: #1f0700;
}
.badge[data-badge='Daily'] {
  background: #fff;
  color: #0b0b12;
}
.switch {
  position: relative;
  width: 50px;
  height: 30px;
  flex: none;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  transition: background 0.25s;
}
.switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s var(--spring);
}
.switch[aria-checked='true'] {
  background: var(--brand);
}
.switch[aria-checked='true']::after {
  transform: translateX(20px);
}
.segmented {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.segmented button {
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.2s, color 0.2s;
}
.segmented button[aria-pressed='true'] {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 2px 10px -4px rgba(0, 0, 0, 0.4);
}
[data-theme='light'] .segmented button[aria-pressed='true'] {
  background: #fff;
}
.segmented .ic {
  width: 16px;
  height: 16px;
}

/* ---------- Sections ---------- */
.section {
  margin-top: clamp(32px, 4vw, 52px);
}
.section-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.section-head h2 {
  font-size: clamp(19px, 1.6vw, 24px);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-head h2 .ic {
  width: 22px;
  height: 22px;
  color: var(--brand-text);
}
.section-head p {
  color: var(--text-3);
  font-size: 14.5px;
}
.section-head .spacer {
  flex: 1;
}
.see-all {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-2);
}
.see-all:hover {
  color: var(--text);
}
.see-all .ic {
  width: 16px;
  height: 16px;
}
.page-head {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.page-head h1 {
  font-size: clamp(30px, 3.6vw, 52px);
  font-weight: 800;
  letter-spacing: -0.035em;
}
.page-head p {
  color: var(--text-2);
  font-size: 16px;
  margin-top: 8px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.eyebrow .ic {
  width: 15px;
  height: 15px;
}

/* ---------- Game cards ---------- */
.grid {
  display: grid;
  gap: clamp(14px, 1.4vw, 22px);
}
.grid-tiles {
  grid-template-columns: repeat(auto-fill, minmax(clamp(150px, 13vw, 210px), 1fr));
}
.grid-cards {
  grid-template-columns: repeat(auto-fill, minmax(clamp(240px, 19vw, 340px), 1fr));
}
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  --lift: 0px;
}
.tile-art,
.card-art {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--c1), var(--c2));
  isolation: isolate;
  transform: translateY(var(--lift));
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
  box-shadow: 0 0 0 1px var(--line) inset;
}
.tile-art {
  aspect-ratio: 1;
}
.tile-art img,
.card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.tile-art::after,
.card-art::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  pointer-events: none;
}
.play-fab {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--brand-ink);
  background: var(--brand);
  box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translateY(8px) scale(0.85);
  transition: opacity 0.25s, transform 0.35s var(--spring);
}
.play-fab .ic {
  width: 20px;
  height: 20px;
  margin-left: 2px;
}
.tile-body {
  min-width: 0;
  padding: 0 2px;
}
.tile-title {
  font-family: var(--font-ui);
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tile-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
}
.tile-meta .best {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-2);
}
.tile-meta .best .ic {
  width: 13px;
  height: 13px;
  color: var(--yellow);
}
@media (hover: hover) {
  .tile:hover,
  .card:hover {
    --lift: -6px;
  }
  .tile:hover .tile-art,
  .card:hover .card-art {
    box-shadow: 0 22px 46px -18px color-mix(in srgb, var(--c1) 75%, transparent), 0 0 0 1px var(--line) inset;
  }
  .tile:hover img,
  .card:hover .card-art img {
    transform: scale(1.06);
  }
  .tile:hover .play-fab,
  .card:hover .play-fab {
    opacity: 1;
    transform: none;
  }
}
.tile:active .tile-art,
.card:active .card-art {
  transform: scale(0.97);
}

/* Wide card with overlay text */
.card {
  position: relative;
  display: block;
  min-width: 0;
  --lift: 0px;
}
.card-art {
  aspect-ratio: 16 / 10;
}
.card-art img {
  position: absolute;
  inset: 0;
  object-position: center 40%;
}
.card-info {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 1;
  padding: 44px 18px 16px;
  background: var(--scrim);
  color: #fff;
}
.card-info h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
}
.card-info p {
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 52px;
}

/* Bento: first card spans two rows and columns */
.bento {
  display: grid;
  gap: clamp(14px, 1.4vw, 22px);
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-flow: dense;
}
/* Big card plus six fills two rows of five; hide the rest. */
.bento > :nth-child(n + 8) {
  display: none;
}
@media (min-width: 900px) and (max-width: 1279px) {
  .bento {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .bento > :nth-child(n + 8) {
    display: block;
  }
}
.bento .card-art {
  aspect-ratio: auto;
  height: 100%;
  min-height: clamp(160px, 13vw, 230px);
}
.bento .card {
  height: 100%;
}
.bento .card.is-big {
  grid-column: span 2;
  grid-row: span 2;
}
.bento .card.is-big .card-info {
  padding: 80px 26px 24px;
}
.bento .card.is-big .card-info h3 {
  font-size: clamp(24px, 2.4vw, 36px);
}
.bento .card.is-big .card-info p {
  font-size: 15px;
  white-space: normal;
}

/* Horizontal scroller */
.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(250px, 21vw, 360px);
  gap: clamp(14px, 1.4vw, 22px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 4px var(--gutter) 10px;
  margin: -4px calc(var(--gutter) * -1) -10px;
  scroll-padding-inline: var(--gutter);
}
.rail::-webkit-scrollbar {
  display: none;
}
.rail > * {
  scroll-snap-align: start;
}
.rail-nav {
  display: flex;
  gap: 8px;
}
.rail-nav .icon-btn {
  width: 38px;
  height: 38px;
}

/* Compact row */
.row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px;
  border-radius: 18px;
  min-width: 0;
  transition: background 0.2s;
}
.row:hover {
  background: var(--glass-2);
}
.row img {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  flex: none;
  background: linear-gradient(135deg, var(--c1), var(--c2));
}
.row-body {
  flex: 1;
  min-width: 0;
}
.row-title {
  font-weight: 800;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-meta {
  font-size: 13px;
  color: var(--text-3);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-go {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--text);
  flex: none;
  transition: background 0.2s, color 0.2s;
}
.row:hover .row-go {
  background: var(--brand);
  color: var(--brand-ink);
}
.row-go .ic {
  width: 16px;
  height: 16px;
  margin-left: 2px;
}

/* ---------- Home ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(300px, 25vw, 430px);
  gap: clamp(14px, 1.4vw, 22px);
}
.carousel {
  position: relative;
  min-width: 0;
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.slides {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  height: 100%;
}
.slides::-webkit-scrollbar {
  display: none;
}
.slide {
  position: relative;
  flex: 0 0 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  min-height: clamp(360px, 44vh, 540px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  padding: clamp(28px, 3.6vw, 64px);
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  background: linear-gradient(125deg, var(--c1), var(--c2));
}
.slide::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(90% 120% at 0% 100%, rgba(5, 5, 12, 0.62), transparent 62%),
    radial-gradient(50% 70% at 80% 20%, rgba(255, 255, 255, 0.28), transparent 70%);
}
.slide::after {
  content: '';
  position: absolute;
  z-index: -1;
  right: -8%;
  top: 50%;
  width: min(62vw, 760px);
  aspect-ratio: 1;
  transform: translateY(-50%);
  border-radius: 50%;
  background: repeating-radial-gradient(circle, rgba(255, 255, 255, 0.1) 0 2px, transparent 2px 46px);
  -webkit-mask: radial-gradient(circle, #000 30%, transparent 70%);
  mask: radial-gradient(circle, #000 30%, transparent 70%);
}
.slide-content {
  position: relative;
  z-index: 1;
  max-width: min(640px, 56%);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}
.slide .eyebrow {
  height: 30px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  background: rgba(0, 0, 0, 0.28);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  letter-spacing: 0.1em;
  font-size: 11.5px;
}
.slide-title {
  font-size: clamp(40px, 4.2vw, 86px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.95;
  text-shadow: 0 6px 30px rgba(0, 0, 0, 0.25);
}
.slide-tag {
  font-size: clamp(16px, 1.3vw, 20px);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  max-width: 34ch;
  line-height: 1.4;
}
.slide-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.slide-cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.slide-art {
  position: absolute;
  top: 50%;
  right: clamp(28px, 4.5vw, 84px);
  height: min(80%, 430px);
  max-width: 40%;
  aspect-ratio: 1;
  border-radius: clamp(36px, 3vw, 56px);
  transform: translateY(-46%) rotate(-7deg);
  box-shadow: 0 40px 80px -24px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  overflow: hidden;
  transition: transform 0.8s var(--spring);
}
.slide-art img {
  width: 100%;
  height: 100%;
}
.slide.is-active .slide-art {
  transform: translateY(-50%) rotate(-4deg);
}
.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.carousel-ui {
  position: absolute;
  left: clamp(28px, 3.6vw, 64px);
  bottom: 22px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dot {
  position: relative;
  width: 30px;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.3);
  transition: width 0.4s var(--ease);
}
.dot[aria-current='true'] {
  width: 54px;
}
.dot i {
  position: absolute;
  inset: 0;
  background: #fff;
  transform: scaleX(0);
  transform-origin: left;
}
.dot[aria-current='true'] i {
  animation: dot-fill var(--dur, 7s) linear forwards;
}
.carousel.is-paused .dot i {
  animation-play-state: paused;
}
.carousel-arrows {
  position: absolute;
  right: 22px;
  bottom: 18px;
  z-index: 3;
  display: flex;
  gap: 8px;
}
.carousel-arrows .icon-btn {
  color: #fff;
  background: rgba(0, 0, 0, 0.28);
  border-color: rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
@keyframes dot-fill {
  to {
    transform: scaleX(1);
  }
}

.hero-side {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: clamp(14px, 1.4vw, 22px);
  min-width: 0;
}
.panel {
  position: relative;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 22px;
  overflow: hidden;
  min-width: 0;
}
.daily-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background:
    radial-gradient(130% 110% at 100% 0%, rgba(200, 245, 66, 0.2), transparent 55%),
    radial-gradient(90% 90% at 0% 100%, rgba(61, 214, 245, 0.12), transparent 60%),
    var(--surface);
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.daily-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-2);
}
.daily-card .eyebrow {
  color: var(--brand-text);
}
.daily-card h3 {
  font-size: 22px;
  font-weight: 700;
}
.daily-card p {
  color: var(--text-2);
  font-size: 14px;
}
.mini-tiles {
  display: flex;
  gap: 6px;
}
.mini-tiles span {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  color: var(--text);
}
.mini-tiles .g {
  background: #13b57b;
  border-color: #13b57b;
  color: #fff;
}
.mini-tiles .y {
  background: #e9ad22;
  border-color: #e9ad22;
  color: #fff;
}
.daily-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.countdown {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.countdown .ic {
  width: 15px;
  height: 15px;
}
/* Game of the day banner on the home page. */
.gotd {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px 14px 14px;
  background:
    radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--c1, #c8f542) 30%, transparent), transparent 60%),
    var(--surface);
  transition: transform 0.2s var(--spring), border-color 0.2s;
}
.gotd:hover {
  transform: translateY(-2px);
  border-color: var(--line-2);
}
.gotd img {
  flex: none;
  width: 72px;
  height: 72px;
  border-radius: 18px;
}
.gotd-body {
  flex: 1;
  min-width: 0;
}
.gotd-body .eyebrow {
  color: var(--brand-text);
}
.gotd-body h3 {
  margin: 2px 0;
  font-size: 20px;
  font-weight: 700;
}
.gotd-body p {
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
}
/* Your progress: games with stars, newest first. */
.progress-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 4px 12px;
}
.pg-stars {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #ffc83d;
  font-weight: 800;
}
.pg-stars .ic {
  width: 13px;
  height: 13px;
}
.side-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 8px -8px -8px;
}
.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.panel-title h3 {
  font-size: 16px;
  font-weight: 700;
}

.perks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(14px, 1.4vw, 22px);
}
.perk {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 20px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
}
.perk-ic {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--c) 16%, transparent);
  color: var(--c);
}
.perk h3 {
  font-family: var(--font-ui);
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: 0;
}
.perk p {
  font-size: 14px;
  color: var(--text-2);
  margin-top: 3px;
  line-height: 1.45;
}

.site-foot {
  margin-top: 64px;
  padding: 28px 0 8px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--text-3);
}
.site-foot .brand {
  padding: 0;
}
.site-foot .brand-mark {
  width: 26px;
  height: 26px;
  filter: none;
}
.site-foot .brand-word {
  font-size: 17px;
  color: var(--text);
}
.site-foot nav {
  display: flex;
  gap: 18px;
  margin-left: auto;
  flex-wrap: wrap;
}
.site-foot a:hover {
  color: var(--text);
}

/* ---------- Explore ---------- */
.explore-search {
  display: none;
}
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(180px, 15vw, 260px), 1fr));
  gap: clamp(12px, 1.2vw, 18px);
}
.cat-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  min-height: 132px;
  padding: 18px;
  border-radius: var(--r-lg);
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(140deg, color-mix(in srgb, var(--c) 34%, var(--surface)), var(--surface) 75%);
  border: 1px solid var(--line);
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.cat-tile:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--c) 50%, transparent);
}
.cat-tile .cat-ic {
  width: 44px;
  height: 44px;
  margin: 0;
  border-radius: 14px;
  background: var(--c);
  color: #0b0b12;
}
.cat-tile .cat-ic .ic {
  width: 22px;
  height: 22px;
}
.cat-tile h3 {
  font-size: 18px;
}
.cat-tile p {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-3);
  margin-top: 2px;
}
.cat-tile .stack {
  position: absolute;
  right: -14px;
  bottom: -14px;
  display: flex;
  z-index: -1;
}
.cat-tile .stack img {
  width: 78px;
  height: 78px;
  border-radius: 20px;
  margin-left: -34px;
  transform: rotate(-10deg);
  box-shadow: -6px 6px 20px rgba(0, 0, 0, 0.35);
  opacity: 0.95;
}
.empty {
  display: grid;
  place-items: center;
  text-align: center;
  gap: 12px;
  padding: 56px 20px;
  border-radius: var(--r-xl);
  border: 1px dashed var(--line-2);
  color: var(--text-2);
}
.empty .ic {
  width: 34px;
  height: 34px;
  color: var(--text-3);
}
.empty h3 {
  font-size: 18px;
  color: var(--text);
}

/* ---------- Daily ---------- */
.week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  max-width: 560px;
}
.day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-3);
}
.day b {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13.5px;
  color: var(--text-2);
  background: var(--surface-2);
}
.day.is-done b {
  background: var(--brand);
  color: var(--brand-ink);
}
.day.is-done b .ic,
.day.is-covered b .ic {
  width: 16px;
  height: 16px;
  stroke-width: 3;
}
.day.is-covered b {
  background: color-mix(in srgb, var(--cyan) 22%, transparent);
  color: var(--text);
}
.day.is-today {
  border-color: color-mix(in srgb, var(--brand) 55%, transparent);
  color: var(--text);
}
.daily-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(280px, 26vw, 420px), 1fr));
  gap: clamp(14px, 1.4vw, 22px);
}
.dcard {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.dcard:hover {
  transform: translateY(-4px);
  border-color: var(--line-2);
}
.dcard-art {
  position: relative;
  height: 170px;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  overflow: hidden;
}
.dcard-art img {
  position: absolute;
  right: 18px;
  bottom: -28px;
  width: 170px;
  height: 170px;
  border-radius: 34px;
  transform: rotate(-8deg);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}
.dcard-art .num {
  position: absolute;
  left: 20px;
  top: 18px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
}
.dcard-art .big {
  position: absolute;
  left: 18px;
  bottom: 14px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 44px;
  line-height: 1;
  color: #fff;
  letter-spacing: -0.04em;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.dcard-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.dcard-body h3 {
  font-size: 19px;
}
.dcard-body p {
  font-size: 14px;
  color: var(--text-2);
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 11px;
  border-radius: var(--r-pill);
  font-size: 12.5px;
  font-weight: 800;
  width: fit-content;
  background: var(--surface-2);
  color: var(--text-2);
}
.status .ic {
  width: 14px;
  height: 14px;
}
.status.is-done {
  background: var(--brand-soft);
  color: var(--brand-text);
}
.status.is-fail {
  background: color-mix(in srgb, var(--red) 14%, transparent);
  color: var(--red);
}
.dcard-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* ---------- You ---------- */
.profile {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: clamp(20px, 2.4vw, 32px);
  border-radius: var(--r-xl);
  background:
    radial-gradient(100% 140% at 100% 0%, rgba(139, 108, 255, 0.22), transparent 60%),
    radial-gradient(80% 120% at 0% 100%, rgba(200, 245, 66, 0.1), transparent 60%),
    var(--surface);
  border: 1px solid var(--line);
}
.profile .avatar {
  width: 76px;
  height: 76px;
  font-size: 28px;
  box-shadow: 0 0 0 4px var(--surface), 0 0 0 5px var(--line-2);
}
.profile h1 {
  font-size: clamp(24px, 2.4vw, 34px);
  font-weight: 800;
}
.profile p {
  color: var(--text-2);
  font-size: 14.5px;
  margin-top: 4px;
}
.profile-name {
  display: flex;
  align-items: center;
  gap: 8px;
}
.profile-name input {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(22px, 2.2vw, 32px);
  letter-spacing: -0.02em;
  background: transparent;
  border: 0;
  border-bottom: 2px dashed transparent;
  outline: 0;
  padding: 0;
  width: min(14ch, 60vw);
}
.profile-name input:hover,
.profile-name input:focus {
  border-bottom-color: var(--line-2);
}
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: clamp(12px, 1.2vw, 18px);
}
.stat {
  padding: 18px 20px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
}
.stat-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-3);
}
.stat-label .ic {
  width: 15px;
  height: 15px;
}
.stat-value {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.2vw, 32px);
  font-weight: 700;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.settings {
  display: flex;
  flex-direction: column;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}
.setting {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  min-height: 70px;
}
.setting + .setting {
  border-top: 1px solid var(--line);
}
.setting-ic {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--text-2);
}
.setting-body {
  flex: 1;
  min-width: 0;
}
.setting-body b {
  display: block;
  font-size: 15px;
}
.setting-body span {
  display: block;
  font-size: 13.5px;
  color: var(--text-3);
  margin-top: 1px;
}
.backup-code {
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.claim-row {
  display: flex;
  gap: 8px;
  flex: none;
}
.claim-row input {
  width: 128px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  font-size: 16px;
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.claim-row input:focus {
  outline: 2px solid var(--brand-text);
  outline-offset: 1px;
}
@media (max-width: 560px) {
  [data-claim] {
    flex-wrap: wrap;
  }
  [data-claim] .claim-row {
    width: 100%;
    padding-left: 56px;
  }
  [data-claim] .claim-row input {
    flex: 1;
  }
}
.bests {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 4px 18px;
}
.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(20px, 2.4vw, 40px);
  align-items: start;
}

/* ---------- Prose pages ---------- */
.prose {
  max-width: 760px;
  color: var(--text-2);
  font-size: 16.5px;
  line-height: 1.7;
}
.prose h1 {
  color: var(--text);
  font-size: clamp(30px, 3.4vw, 46px);
  margin-bottom: 8px;
}
.prose h2 {
  color: var(--text);
  font-size: 21px;
  margin: 34px 0 10px;
}
.prose p,
.prose ul {
  margin: 0 0 14px;
}
.prose ul {
  padding-left: 22px;
}
.prose li {
  margin: 6px 0;
}
.prose a {
  color: var(--brand-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.prose strong {
  color: var(--text);
}
.prose .updated {
  color: var(--text-3);
  font-size: 14px;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 18px;
  font-size: 15px;
}
.prose th,
.prose td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.prose th {
  color: var(--text);
  font-weight: 800;
}

/* ---------- Contact ---------- */
.contact-wrap {
  max-width: 760px;
}
.contact-form {
  display: grid;
  gap: 20px;
  margin-top: 6px;
}
.field {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.field[hidden] {
  display: none;
}
.field label {
  color: var(--text);
  font-weight: 800;
  font-size: 15px;
}
.field .opt {
  color: var(--text-3);
  font-weight: 600;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  font-size: 16px;
  line-height: 1.45;
  transition: border-color 0.2s;
}
.field textarea {
  min-height: 168px;
  resize: vertical;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--brand-text);
  outline-offset: 1px;
}
.field [aria-invalid='true'] {
  border-color: var(--danger-text);
}
.select {
  position: relative;
}
.select select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  cursor: pointer;
}
.select .ic {
  position: absolute;
  right: 14px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
}
.field-hint {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-3);
  font-size: 13.5px;
}
.field-hint [data-count] {
  flex: none;
  font-variant-numeric: tabular-nums;
}
.field-hint .is-over {
  color: var(--danger-text);
}
.field-error,
.form-status.is-error {
  color: var(--danger-text);
  font-size: 14px;
  font-weight: 700;
}
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
}
.contact-note {
  color: var(--text-3);
  font-size: 14px;
}
.contact-note a {
  color: var(--brand-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.contact-done h1 {
  font-size: clamp(22px, 2.6vw, 30px);
  color: var(--text);
}
.contact-done h1:focus {
  outline: none;
}
.contact-done .ic {
  color: var(--brand-text);
}
@media (max-width: 560px) {
  .contact-actions .btn {
    width: 100%;
  }
}

/* ---------- Play page ---------- */
.play {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(300px, 24vw, 400px);
  gap: clamp(16px, 1.6vw, 26px);
  align-items: start;
}
.play-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.stage {
  position: relative;
  height: max(540px, calc(100dvh - var(--topbar-h) - 136px));
  border-radius: var(--r-xl);
  overflow: hidden;
  isolation: isolate;
  background: #06060b;
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--line);
  contain: layout paint;
}
.stage:fullscreen {
  height: 100%;
  border-radius: 0;
}
.stage-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: linear-gradient(140deg, color-mix(in srgb, var(--c1) 55%, #05050a), color-mix(in srgb, var(--c2) 40%, #05050a));
}
.stage-bg img {
  position: absolute;
  inset: -15%;
  width: 130%;
  height: 130%;
  max-width: none;
  object-fit: cover;
  filter: blur(60px) saturate(1.5);
  opacity: 0.55;
}
.stage-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 70% at 50% 50%, transparent, rgba(0, 0, 0, 0.55));
}
.hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 6;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  color: #fff;
  pointer-events: none;
}
.hud > * {
  pointer-events: auto;
}
.hud-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  /* Dark glass stays readable on light game backgrounds as well as dark ones. */
  background: rgba(12, 14, 28, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition: transform 0.15s var(--ease), background 0.2s;
}
.hud-btn:hover {
  background: rgba(12, 14, 28, 0.58);
}
.hud-btn:active {
  transform: scale(0.9);
}
.hud-close {
  display: none;
}
.hud-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 15px;
  min-width: 0;
}
.hud-title img {
  width: 30px;
  height: 30px;
  border-radius: 9px;
}
.hud-title span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hud-score {
  position: absolute;
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  pointer-events: none;
  padding: 5px 14px 6px;
  border-radius: 16px;
  background: rgba(12, 14, 28, 0.42);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.hud-score b {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.hud-score b.bump {
  animation: bump 0.3s var(--spring);
}
.hud-score small {
  margin-top: 4px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.85;
}
.hud-right {
  margin-left: auto;
  display: flex;
  gap: 8px;
}
@keyframes bump {
  40% {
    transform: scale(1.25);
  }
}
.viewport {
  position: absolute;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  place-items: center;
  padding: 0 0 12px;
}
.game-root {
  position: relative;
  /* Keeps every game's own z-index values below the stage overlays. */
  isolation: isolate;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  border-radius: 20px;
  background: #0d0d16;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.06);
  opacity: 0;
  transition: opacity 0.3s;
}
.game-root.is-ready {
  opacity: 1;
}
.game-root canvas {
  width: 100%;
  height: 100%;
}
.stage.is-loading .game-root {
  opacity: 0;
}

/* Overlays inside the stage */
.ov {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 72px 20px 24px;
  overflow-y: auto;
  color: #fff;
  background: rgba(6, 6, 12, 0.58);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  animation: fade-in 0.25s var(--ease);
}
.ov-card {
  width: min(440px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  animation: rise-in 0.45s var(--spring);
}
.ov-art {
  width: 128px;
  height: 128px;
  border-radius: 34px;
  box-shadow: 0 24px 50px -16px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.18) inset;
  overflow: hidden;
  margin-bottom: 4px;
  animation: float 5s ease-in-out infinite;
}
.ov-art img {
  width: 100%;
  height: 100%;
}
.ov h2 {
  font-size: clamp(30px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.04em;
}
.ov-sub {
  color: rgba(255, 255, 255, 0.78);
  font-size: 15.5px;
  max-width: 34ch;
}
.ov .btn-primary {
  min-width: 220px;
}
.ov-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(300px, 100%);
}
.ov-actions .btn {
  width: 100%;
}
/* The shop button after a run: gold so it stands out without replacing Play again. */
.ov-actions .ov-second {
  color: #ffe27a;
  border-color: rgba(255, 210, 63, 0.55);
  background: rgba(255, 210, 63, 0.14);
}
.ov-actions .ov-second:hover {
  background: rgba(255, 210, 63, 0.24);
}
.ov-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.ov-modes {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 4px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}
.ov-modes button {
  height: 36px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75);
  transition: background 0.2s, color 0.2s;
}
.ov-modes button[aria-pressed='true'] {
  background: #fff;
  color: #0b0b12;
}
.ov-best {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  max-width: 38ch;
  text-align: left;
  line-height: 1.45;
  font-size: 14px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75);
}
.ov-best .ic {
  flex: none;
  margin-top: 2px;
  width: 16px;
  height: 16px;
  color: var(--yellow);
}
.howto {
  list-style: none;
  margin: 6px 0 0;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.86);
  width: 100%;
}
.howto li {
  display: flex;
  gap: 10px;
}
.howto li::before {
  content: '';
  flex: none;
  width: 7px;
  height: 7px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--brand);
}
.ov-score {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(56px, 9vw, 84px);
  line-height: 1;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}
.ov-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}
.new-best {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--brand-ink);
  background: linear-gradient(135deg, #ffe066, #ffb020);
  box-shadow: 0 10px 30px -8px rgba(255, 176, 32, 0.7);
  animation: pop-in 0.5s var(--spring) 0.2s both;
}
.new-best .ic {
  width: 16px;
  height: 16px;
}
.ov-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 8px;
  width: 100%;
}
.ov-stats div {
  padding: 10px 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}
.ov-stats b {
  display: block;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.ov-stats span {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}
.ov-extra {
  width: 100%;
}
.up-next {
  width: 100%;
  margin-top: 6px;
  text-align: left;
}
.up-next .ov-label {
  display: block;
  margin-bottom: 6px;
  text-align: center;
}
.up-next .row {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.up-next .row:hover {
  background: rgba(255, 255, 255, 0.14);
}
.up-next .row-meta {
  color: rgba(255, 255, 255, 0.6);
}
.ov-link {
  font-size: 14px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  padding: 6px 10px;
}
.ov-link:hover {
  color: #fff;
}
.safe-probe {
  position: absolute;
  width: 0;
  height: env(safe-area-inset-bottom, 0px);
  visibility: hidden;
  pointer-events: none;
}
.loader {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--brand);
  animation: spin 0.8s linear infinite;
}
.play-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.play-bar h1 {
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 800;
}
.play-bar .tile-meta {
  font-size: 13.5px;
}
.play-bar .actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}
.play-side {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 1.4vw, 20px);
  min-width: 0;
}
.play-side .panel {
  padding: 20px;
}
.play-side h2 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}
.play-side .desc {
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.55;
}
.play-side .howto {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--text-2);
  margin: 0;
}
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.controls span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  background: var(--surface-2);
}
.controls .ic {
  width: 16px;
  height: 16px;
}
.report-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  color: var(--text-3);
  font-size: 13.5px;
  font-weight: 700;
}
.report-link:hover {
  color: var(--text);
}
.report-link .ic {
  width: 15px;
  height: 15px;
}
.mybest {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.mybest div {
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--surface-2);
}
.mybest span {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-3);
}
.mybest b {
  display: block;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Toasts and sheets ---------- */
.toasts {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  width: min(520px, calc(100vw - 32px));
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px 12px 16px;
  border-radius: 18px;
  background: var(--text);
  color: var(--bg);
  font-size: 14.5px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.4s var(--spring);
}
.toast.is-out {
  animation: toast-out 0.25s var(--ease) forwards;
}
.toast .ic {
  width: 18px;
  height: 18px;
}
.toast .btn {
  --btn-h: 34px;
  padding: 0 14px;
  font-size: 13.5px;
}
/* Toasts use inverted colors, so the plain button follows the toast, not the page. */
.toast .btn-ghost {
  color: var(--bg);
  opacity: 0.78;
}
.toast .btn-ghost:hover {
  opacity: 1;
  background: color-mix(in srgb, var(--bg) 10%, transparent);
}
.toast-text {
  flex: 1;
  line-height: 1.35;
}
.toast-text a {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.toast-actions {
  display: flex;
  gap: 6px;
  flex: none;
}

/* ---------- Animations ---------- */
@keyframes fade-in {
  from {
    opacity: 0;
  }
}
@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
}
@keyframes pop-in {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }
}
@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes float {
  50% {
    transform: translateY(-6px) rotate(-1.5deg);
  }
}
.view-enter {
  animation: view-in 0.38s var(--ease);
}
@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.22s;
}

/* ---------- Rail sidebar (tablet landscape, small laptops) ---------- */
@media (min-width: 900px) and (max-width: 1279px) {
  :root {
    --sidebar-w: 92px;
  }
  .sidebar {
    align-items: center;
    padding: 20px 10px;
  }
  .brand {
    padding: 4px 0 16px;
  }
  .sidebar .brand-word,
  .side-title,
  .side-promo,
  .side-legal,
  .side-group[data-side-recent] {
    display: none !important;
  }
  .side-nav,
  .side-group {
    width: 100%;
    align-items: stretch;
  }
  .side-link {
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    height: 62px;
    padding: 0 4px;
    font-size: 11.5px;
    text-align: center;
  }
  .side-group .side-link {
    height: 56px;
  }
  .side-group .side-link .side-label {
    font-size: 11px;
  }
  .side-dot {
    position: absolute;
    top: 10px;
    right: 22px;
  }
  .cat-ic {
    margin: 0;
  }
  .theme-toggle {
    grid-template-columns: 1fr;
    width: 52px;
  }
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
  }
  .play {
    grid-template-columns: minmax(0, 1fr);
  }
  .play-side {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (min-width: 1280px) and (max-width: 1500px) {
  .surprise span {
    display: none;
  }
  .surprise {
    padding: 0 12px;
  }
}

@media (min-width: 1900px) {
  .slide {
    min-height: 580px;
  }
}

/* ---------- Mobile app layout ---------- */
@media (max-width: 899px) {
  :root {
    --topbar-h: 58px;
    --gutter: 16px;
  }
  .app {
    grid-template-columns: minmax(0, 1fr);
  }
  .sidebar {
    display: none;
  }
  .topbar {
    height: calc(var(--topbar-h) + var(--safe-t));
    padding: var(--safe-t) calc(var(--gutter) + var(--safe-r)) 0 calc(var(--gutter) + var(--safe-l));
    gap: 8px;
  }
  .brand-top {
    display: inline-flex;
  }
  .topbar .search,
  .surprise,
  .topbar .avatar {
    display: none !important;
  }
  .search-mobile {
    display: inline-grid !important;
    width: 40px;
    height: 40px;
    background: transparent;
    border-color: transparent;
    color: var(--text);
  }
  .streak {
    height: 36px;
    padding: 0 12px 0 9px;
    font-size: 14px;
  }
  .view {
    padding: 16px calc(var(--gutter) + var(--safe-r)) calc(var(--tabbar-h) + var(--safe-b) + 32px) calc(var(--gutter) + var(--safe-l));
  }
  .tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: calc(var(--tabbar-h) + var(--safe-b));
    padding: 0 var(--safe-r) var(--safe-b) var(--safe-l);
    background: var(--glass);
    -webkit-backdrop-filter: saturate(170%) blur(22px);
    backdrop-filter: saturate(170%) blur(22px);
    border-top: 1px solid var(--line);
  }
  .tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-3);
    transition: color 0.2s;
    user-select: none;
    -webkit-user-select: none;
  }
  .tab-ic {
    position: relative;
    width: 58px;
    height: 30px;
    border-radius: var(--r-pill);
    display: grid;
    place-items: center;
    transition: background 0.25s var(--ease), transform 0.2s var(--spring);
  }
  .tab:active .tab-ic {
    transform: scale(0.9);
  }
  .tab[aria-current='page'] {
    color: var(--text);
  }
  .tab[aria-current='page'] .tab-ic {
    background: var(--brand-soft);
    color: var(--brand-text);
  }
  .tab .ic {
    width: 22px;
    height: 22px;
  }
  .tab-dot {
    position: absolute;
    top: 3px;
    right: 14px;
    box-shadow: 0 0 0 2px var(--bg);
  }

  .section {
    margin-top: 30px;
  }
  .section-head {
    margin-bottom: 14px;
  }
  .page-head {
    margin-bottom: 18px;
  }
  .page-head p {
    font-size: 15px;
  }

  /* Home: swipeable hero cards */
  .greeting-hi {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.1;
  }
  .greeting-sub {
    color: var(--text-2);
    font-size: 15px;
    margin-top: 4px;
  }
  .hero {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 16px;
  }
  .carousel {
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    margin: 0 calc(var(--gutter) * -1);
  }
  .slides {
    gap: 12px;
    padding: 0 var(--gutter) 4px;
    scroll-padding-inline: var(--gutter);
  }
  .slide {
    flex-basis: min(86%, 400px);
    min-height: 0;
    grid-template-columns: 1fr;
    align-content: end;
    gap: 0;
    padding: 0;
    border-radius: 28px;
    aspect-ratio: 4 / 5;
    box-shadow: 0 20px 40px -24px rgba(0, 0, 0, 0.8);
  }
  .slide::after {
    width: 140%;
    right: -20%;
    top: 36%;
  }
  .slide-art {
    position: absolute;
    top: 9%;
    left: 50%;
    width: 58%;
    height: auto;
    max-width: none;
    border-radius: 34px;
    transform: translateX(-50%) rotate(-6deg);
  }
  .slide.is-active .slide-art {
    transform: translateX(-50%) rotate(-3deg);
  }
  .slide-content {
    gap: 8px;
    padding: 64px 20px 20px;
    max-width: none;
    background: linear-gradient(180deg, transparent, rgba(6, 6, 12, 0.5) 40%, rgba(6, 6, 12, 0.72));
  }
  .slide .eyebrow,
  .slide-meta,
  .slide-cta .btn-glass {
    display: none;
  }
  .slide-title {
    font-size: clamp(30px, 8.6vw, 40px);
  }
  .slide-tag {
    font-size: 14.5px;
  }
  .slide-cta {
    margin-top: 8px;
    width: 100%;
  }
  .slide-cta .btn {
    --btn-h: 48px;
    width: 100%;
  }
  .carousel-ui {
    position: static;
    justify-content: center;
    margin-top: 14px;
  }
  .dot {
    width: 7px;
    height: 7px;
    background: var(--line-2);
  }
  .dot[aria-current='true'] {
    width: 24px;
    background: var(--text);
  }
  .dot i,
  .carousel-arrows {
    display: none;
  }
  .hero-side {
    grid-template-rows: none;
    gap: 14px;
  }
  .panel {
    border-radius: 24px;
    padding: 18px;
  }

  .grid-tiles {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px 12px;
  }
  .tile-art {
    border-radius: 20px;
  }
  .tile-title {
    font-size: 15px;
  }
  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .bento > :nth-child(n + 8) {
    display: block;
  }
  .bento .card.is-big {
    grid-column: span 2;
    grid-row: span 1;
  }
  .bento .card-art {
    min-height: 150px;
  }
  .bento .card.is-big .card-art {
    min-height: 0;
    aspect-ratio: 16 / 10;
  }
  .bento .card:not(.is-big) .card-info {
    padding: 36px 12px 12px;
  }
  .bento .card:not(.is-big) .card-info h3 {
    font-size: 15.5px;
  }
  .bento .card:not(.is-big) .card-info p {
    display: none;
  }
  .rail {
    grid-auto-columns: min(78%, 320px);
    gap: 12px;
  }
  .rail-nav {
    display: none;
  }
  .card-art {
    border-radius: 20px;
  }
  .play-fab {
    opacity: 1;
    transform: none;
    width: 38px;
    height: 38px;
  }
  .tile .play-fab {
    display: none;
  }

  .mobile-only {
    display: block;
  }
  .desktop-only {
    display: none !important;
  }
  .explore-search {
    display: flex;
    max-width: none;
    height: 50px;
    margin-bottom: 18px;
    position: sticky;
    top: calc(var(--topbar-h) + var(--safe-t) + 8px);
    z-index: 5;
    box-shadow: 0 10px 30px -14px rgba(0, 0, 0, 0.6);
  }
  .cat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .cat-tile {
    min-height: 118px;
    padding: 16px;
  }
  .two-col {
    grid-template-columns: minmax(0, 1fr);
  }
  .site-foot nav {
    margin-left: 0;
  }
  .toasts {
    bottom: calc(var(--tabbar-h) + var(--safe-b) + 12px);
  }

  /* Play page goes full screen like a native app */
  html[data-route='play'] .topbar,
  html[data-route='play'] .tabbar {
    display: none;
  }
  html[data-route='play'],
  html[data-route='play'] body {
    overflow: hidden;
    overscroll-behavior: none;
  }
  html[data-route='play'] .view {
    padding: 0;
  }
  .play {
    display: block;
  }
  .stage {
    position: fixed;
    inset: 0;
    z-index: 60;
    height: auto;
    min-height: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .hud {
    top: var(--safe-t);
    height: 58px;
    padding: 0 calc(12px + var(--safe-r)) 0 calc(12px + var(--safe-l));
  }
  .hud::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: calc(var(--safe-t) * -1);
    height: calc(var(--safe-t) + 84px);
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.32), rgba(0, 0, 0, 0));
    pointer-events: none;
    z-index: -1;
  }
  .hud-close {
    display: grid;
  }
  .hud-title,
  .hud-fs {
    display: none !important;
  }
  .viewport {
    inset: 0;
    padding: 0;
  }
  .game-root {
    border-radius: 0;
    box-shadow: none;
  }
  .ov {
    padding: calc(72px + var(--safe-t)) 20px calc(24px + var(--safe-b));
  }
  .play-main > :not(.stage),
  .play-side,
  .play-more {
    display: none !important;
  }
}

@media (max-width: 380px) {
  .brand-top .brand-word {
    font-size: 19px;
  }
  .grid-tiles {
    gap: 14px 10px;
  }
}

/* The smallest phones: keep the whole logo in the top bar next to the coins. */
@media (max-width: 340px) {
  .topbar {
    gap: 6px;
  }
  .brand-top {
    gap: 7px;
  }
  .brand-top .brand-mark {
    width: 28px;
    height: 28px;
  }
  .brand-top .brand-word {
    font-size: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
html.reduce-motion *,
html.reduce-motion *::before,
html.reduce-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
}

/* ---------- Rewards ---------- */
.coins {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 14px 0 9px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--line);
  font-weight: 800;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  transition: transform 0.2s var(--spring);
}
.coins:hover {
  transform: translateY(-1px);
}
.coins [data-coin-ic],
.coins .coin {
  width: 22px;
  height: 22px;
  display: block;
}
.gift-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 0 2px var(--bg);
  animation: gift-pulse 1.6s ease-in-out infinite;
}
@keyframes gift-pulse {
  50% {
    transform: scale(1.25);
  }
}
.coin {
  width: 18px;
  height: 18px;
  flex: none;
  vertical-align: -3px;
}
.medal {
  width: 20px;
  height: 20px;
  flex: none;
  vertical-align: -4px;
}
.avatar {
  position: relative;
}
.avatar svg {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}
.avatar.has-frame {
  box-shadow: none;
}
.avatar.has-frame::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--frame);
  z-index: -1;
}
.avatar-lv {
  position: absolute;
  right: -6px;
  bottom: -5px;
  min-width: 20px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--brand);
  color: var(--brand-ink);
  font: 800 10.5px/18px var(--font-display);
  text-align: center;
  box-shadow: 0 0 0 2px var(--bg);
}
.tile-medal {
  display: inline-flex;
  margin-left: 6px;
  vertical-align: -2px;
}
.tile-medal .medal {
  width: 17px;
  height: 17px;
}
.medal-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.medal-slot {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-2);
  filter: grayscale(1);
  opacity: 0.45;
}
.medal-slot.is-on {
  filter: none;
  opacity: 1;
}
.medal-slot .medal {
  width: 24px;
  height: 24px;
}
.medal-row small {
  flex: 1;
  min-width: 140px;
  color: var(--text-3);
  font-weight: 700;
  font-size: 12.5px;
}

/* Rewards strip on the game over card */
.ovr {
  width: 100%;
  max-width: 380px;
  margin: 4px auto 14px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-align: left;
}
.ovr-up {
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  color: #ffe14d;
}
.ovr-up .ic {
  width: 18px;
  height: 18px;
}
.ovr-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ovr-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 10px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 800;
  font-size: 13px;
  animation: ovr-pop 0.5s var(--spring) both;
}
.ovr-chip:nth-child(2) {
  animation-delay: 0.08s;
}
.ovr-chip:nth-child(3) {
  animation-delay: 0.16s;
}
.ovr-chip:nth-child(4) {
  animation-delay: 0.24s;
}
.ovr-chip .ic {
  width: 15px;
  height: 15px;
}
.ovr-chip.is-coin {
  color: #ffe08a;
}
.ovr-chip.is-medal {
  background: rgba(255, 210, 63, 0.22);
  color: #ffe9a8;
}
.ovr-chip.is-gotd {
  background: rgba(200, 245, 66, 0.22);
  color: #e6ff9e;
}
@keyframes ovr-pop {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
}
.ovr-level {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 12px;
}
.ovr-level b {
  font-family: var(--font-display);
  font-size: 13px;
}
.ovr-level small {
  opacity: 0.7;
  font-variant-numeric: tabular-nums;
}
.ovr-bar {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}
.ovr-bar i {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--brand), #ffe14d);
  animation: ovr-fill 1.1s var(--ease) 0.3s both;
}
@keyframes ovr-fill {
  from {
    width: var(--from, 0%);
  }
}
.ovr-level.is-season {
  color: inherit;
  margin-top: 8px;
}
.ovr-level.is-season .ovr-bar i {
  background: linear-gradient(90deg, var(--violet), var(--pink));
}
.ovr-line.is-season .ic {
  color: #c7b5ff;
}
.ov-challenge {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 40ch;
  margin: 4px 0 2px;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(10, 12, 30, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
}
.ov-challenge .ic {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  color: var(--yellow);
}
.ov-challenge.is-win {
  background: color-mix(in srgb, var(--brand) 22%, rgba(10, 12, 30, 0.6));
  border-color: color-mix(in srgb, var(--brand) 60%, transparent);
}
.ovr-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 700;
}
.ovr-line .ic {
  width: 16px;
  height: 16px;
  color: var(--brand);
}
.ovr-line span {
  flex: 1;
}
.ovr-line b {
  color: #ffe08a;
}
.ovr-next {
  margin: 8px 0 0;
  font-size: 12.5px;
  opacity: 0.72;
  font-weight: 700;
}

/* Daily gift calendar */
.gifts-panel {
  padding: 16px;
}
.shields-panel {
  margin-top: 12px;
  padding: 14px 16px;
}
.shields {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.shop-group .shields {
  padding: 14px 16px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
}
.shield-pips {
  display: flex;
  gap: 6px;
}
.shield-pip {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--text-3);
}
.shield-pip.is-on {
  background: color-mix(in srgb, var(--cyan) 22%, var(--surface-2));
  color: var(--cyan);
}
[data-theme='light'] .shield-pip.is-on {
  color: #0a6f86;
}
.shields-body {
  flex: 1;
  min-width: 180px;
}
.shields-body b {
  display: block;
  font-size: 15px;
}
.shields-body span {
  display: block;
  font-size: 13.5px;
  color: var(--text-2);
}
.season {
  padding: 20px;
  background:
    radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--violet) 22%, transparent), transparent 60%),
    var(--surface);
}
.season-top {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.season-title {
  flex: 1;
  min-width: 0;
}
.season-title .eyebrow {
  color: var(--brand-text);
}
.season-title h3 {
  font: 800 clamp(22px, 3vw, 28px) / 1.1 var(--font-display);
  margin: 6px 0 4px;
}
.season-sub {
  margin: 0;
  font-size: 14px;
  color: var(--text-2);
}
.season-tier {
  flex: none;
  width: 76px;
  height: 76px;
  border-radius: 22px;
  display: grid;
  place-content: center;
  text-align: center;
  background: var(--brand);
  color: var(--brand-ink);
}
.season-tier b {
  font: 800 28px / 1 var(--font-display);
}
.season-tier span {
  font-size: 12px;
  font-weight: 800;
}
.season-bar {
  height: 12px;
  margin-top: 16px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  overflow: hidden;
}
.season-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--violet), var(--pink));
  transition: width 0.6s var(--ease);
}
.season-next {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 700;
}
.season-next small {
  color: var(--text-2);
  font-weight: 600;
  white-space: nowrap;
}
.season-prizes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.season-prize {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  border-radius: var(--r-lg);
  background: var(--surface-2);
  border: 1px solid var(--line);
  text-align: center;
}
.season-prize.is-on {
  border-color: color-mix(in srgb, var(--brand) 55%, transparent);
}
.season-prize-art {
  height: 48px;
  display: grid;
  place-items: center;
}
.season-prize b {
  font-size: 13.5px;
  line-height: 1.2;
}
.season-prize span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-2);
}
.season-prize span .ic {
  width: 14px;
  height: 14px;
}
.gifts {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}
.gift {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--text-3);
  font-weight: 700;
}
.gift b {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 14px;
}
.gift .coin,
.gift .ic {
  width: 24px;
  height: 24px;
}
.gift:last-child {
  background: linear-gradient(160deg, rgba(255, 210, 63, 0.18), var(--surface-2));
}
.gift.is-done {
  opacity: 0.55;
}
.gift.is-done .ic {
  color: var(--green);
}
.gift.is-ready {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--text);
  animation: gift-glow 1.6s ease-in-out infinite;
}
@keyframes gift-glow {
  50% {
    box-shadow: 0 0 0 4px var(--brand-soft);
  }
}
.gifts-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

/* Missions */
.missions {
  display: grid;
  gap: 10px;
}
.missions.is-compact {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.mission {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform 0.2s var(--spring), border-color 0.2s;
}
.mission:hover {
  transform: translateY(-2px);
  border-color: var(--line-2);
}
.mission-ic {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  overflow: hidden;
}
.mission-ic img {
  width: 44px;
  height: 44px;
}
.mission-ic .ic {
  width: 22px;
  height: 22px;
  color: var(--brand-text);
}
.mission-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.mission-body b {
  font-size: 14.5px;
  line-height: 1.25;
}
.mission-body small {
  color: var(--text-3);
  font-weight: 700;
  font-size: 12px;
}
.mission-bar {
  height: 7px;
  border-radius: 4px;
  background: var(--surface-3);
  overflow: hidden;
}
.mission-bar i {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--brand), var(--cyan));
}
.mission-reward {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 800;
  font-size: 14px;
}
.mission.is-done {
  border-color: rgba(47, 208, 135, 0.4);
}
.mission.is-done .mission-reward .ic {
  width: 22px;
  height: 22px;
  color: var(--green);
}
.missions-bonus {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 0;
  color: var(--text-2);
  font-weight: 700;
  font-size: 13.5px;
}
.missions-bonus .ic {
  width: 18px;
  height: 18px;
  color: var(--brand-text);
}
.missions-bonus.is-done .ic {
  color: var(--green);
}

/* Level card */
.level-card {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 20px;
  border-radius: var(--r-xl);
  background: linear-gradient(135deg, var(--brand-soft), var(--surface) 60%);
  border: 1px solid var(--line);
}
.avatar-xl {
  width: 84px;
  height: 84px;
  font-size: 28px;
}
.level-main {
  flex: 1;
  min-width: 200px;
}
.level-main .eyebrow {
  font-size: 15px;
  color: var(--brand-text);
}
.level-bar {
  height: 12px;
  margin-top: 10px;
  border-radius: 6px;
  background: var(--surface-3);
  overflow: hidden;
}
.level-bar i {
  display: block;
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--brand), #ffe14d);
}
.level-sub {
  margin: 6px 0 0;
  color: var(--text-3);
  font-weight: 700;
  font-size: 13px;
}
.level-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.level-stats div {
  min-width: 74px;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.level-stats b {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-display);
  font-size: 16px;
}
.level-stats b .ic {
  width: 18px;
  height: 18px;
}
.level-stats span {
  color: var(--text-3);
  font-weight: 700;
  font-size: 11.5px;
}

/* Sticker album */
.album-cat {
  margin-bottom: 18px;
}
.album-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px;
}
.album-head span {
  color: var(--text-3);
  font-weight: 700;
}
.album {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 10px;
}
.sticker {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: center;
}
.sticker img {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  filter: grayscale(1) brightness(0.45);
  transition: filter 0.3s;
}
.sticker.is-on img {
  filter: none;
  box-shadow: 0 0 0 3px #fff, 0 6px 14px -6px rgba(0, 0, 0, 0.5);
  transform: rotate(-3deg);
}
.sticker.is-shiny::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.45) 45%, transparent 60%);
  background-size: 250% 100%;
  animation: shiny 2.6s linear infinite;
  pointer-events: none;
}
.sticker.is-shiny {
  border-color: #ffd23f;
}
@keyframes shiny {
  from {
    background-position: 150% 0;
  }
  to {
    background-position: -100% 0;
  }
}
.sticker-q {
  position: absolute;
  top: 22px;
  font: 800 22px var(--font-display);
  color: rgba(255, 255, 255, 0.7);
}
.sticker-name {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-2);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Achievements */
.achievements {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}
.ach {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  opacity: 0.6;
}
.ach.is-on {
  opacity: 1;
  border-color: rgba(255, 210, 63, 0.35);
}
.ach-ic {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
}
.ach.is-on .ach-ic {
  background: rgba(255, 210, 63, 0.18);
  color: #ffc83d;
}
.ach-ic .ic {
  width: 20px;
  height: 20px;
}
.ach div {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.ach b {
  font-size: 14px;
}
.ach div span {
  color: var(--text-3);
  font-size: 12.5px;
}
.ach-reward {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 800;
  font-size: 13px;
}

/* Shop */
.shop-group {
  margin-bottom: 18px;
}
.shop-group h3 {
  font-size: 15px;
  margin: 0 0 10px;
}
.shop {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}
.shop-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 8px 12px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: center;
}
.shop-item.is-on {
  border-color: var(--brand);
}
.shop-item b {
  font-size: 13.5px;
}
.shop-item .btn {
  --btn-h: 34px;
  padding: 0 12px;
  font-size: 13px;
}
.shop-item .status {
  font-size: 11.5px;
}
.shop-preview {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
}
.shop-preview svg {
  width: 56px;
  height: 56px;
}
.shop-initials {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 800 17px var(--font-display);
  color: #fff;
  background: linear-gradient(135deg, #8b6cff, #ff5fa2);
}
.shop-frame {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--frame);
  position: relative;
}
.shop-frame::after {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: var(--surface-2);
}
.shop-theme {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--c), #fff 140%);
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.12);
}
@media (max-width: 899px) {
  .coins {
    height: 36px;
    padding: 0 11px 0 7px;
    font-size: 14px;
  }
  .gifts {
    gap: 5px;
  }
  .gift {
    padding: 8px 2px;
    font-size: 10.5px;
  }
  .gift b {
    font-size: 12px;
  }
  .gift .coin,
  .gift .ic {
    width: 20px;
    height: 20px;
  }
  .level-card {
    padding: 16px;
    gap: 14px;
  }
}
.shop-item .btn:disabled {
  opacity: 0.45;
  box-shadow: none;
  cursor: not-allowed;
}
