/* app.css — Quickzy.
   Chunky, bold and game-like on purpose: this is a product kids pick up in a
   classroom, so every control is a big, pressable shape with a clear edge,
   and colour is loud where it means something (the four answer colours, the
   brand spark) and quiet everywhere else. */

:root {
  /* brand */
  --night: #17133f;
  --night-2: #221c5c;
  --night-3: #2e2675;
  --zing: #ffcd1f;
  --zing-deep: #e0a800;
  --violet: #6b4cff;
  --violet-deep: #4a2fd6;

  /* the four answer colours, each with its shadow */
  --a0: #ff4772; --a0d: #c92651;   /* coral — bolt */
  --a1: #2f9bff; --a1d: #1a6fcc;   /* sky — drop */
  --a2: #ffcd1f; --a2d: #d9a400;   /* zing — star */
  --a3: #12c9a6; --a3d: #0a9479;   /* teal — hex */
  --a4: #ff8a2a; --a4d: #cf6510;   /* orange */
  --a5: #a560ff; --a5d: #7a36d6;   /* grape */

  --ok: #19c37d; --okd: #0f8f59;
  --bad: #ff4772; --badd: #c92651;

  /* surfaces */
  --bg: #f2f0ff;
  --card: #ffffff;
  --ink: #1a1640;
  --ink-2: #4e4a75;
  --muted: #8a86ad;
  --line: #e2def7;
  --line-2: #cfc9ee;

  --r: 14px;
  --r-lg: 20px;
  --press: 5px;
  --shadow: 0 2px 0 rgba(23, 19, 63, 0.06), 0 12px 30px -18px rgba(23, 19, 63, 0.45);

  --display: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
  --sans: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
#app { min-height: 100%; }
[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--violet); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { display: block; }
::selection { background: var(--zing); color: var(--night); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3, .display { font-family: var(--display); font-weight: 400; letter-spacing: 0.01em; margin: 0; line-height: 1.12; }
h1 { font-size: 2.3rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 0.86rem; }
.center { text-align: center; }

/* ------------------------------------------------------------- the top bar */

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 14px;
  padding: 10px 20px; background: var(--night); color: #fff;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.15);
}
.logo { display: flex; align-items: center; gap: 9px; color: #fff; text-decoration: none !important; }
.logo-mark { width: 38px; height: 38px; overflow: visible; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.15)); transition: transform 0.2s var(--spring); }
.logo:hover .logo-mark { transform: rotate(-8deg) scale(1.06); }
.logo-word em { font-style: normal; color: var(--zing); }
.logo-word { font-family: var(--display); font-size: 1.55rem; letter-spacing: 0.02em; }
.nav { display: flex; gap: 4px; margin-left: 10px; }
.nav a {
  color: rgba(255, 255, 255, 0.78); padding: 8px 13px; border-radius: 11px; font-weight: 800;
  text-decoration: none !important; transition: background 0.15s, color 0.15s;
}
.nav a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.nav a.is-on { background: rgba(255, 255, 255, 0.14); color: #fff; }
.topbar-end { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.me-chip {
  display: flex; align-items: center; gap: 9px; background: rgba(255, 255, 255, 0.1);
  border-radius: 999px; padding: 4px 13px 4px 4px; color: #fff; border: 0; cursor: pointer;
}
.me-chip .blook { width: 32px; height: 32px; }
.me-chip span { font-weight: 800; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 720px) {
  .nav { display: none; }
  .topbar { padding: 9px 12px; }
  .me-chip span { display: none; }
  .me-chip { padding: 4px; }
}

/* the bottom bar on phones, where the nav goes */
.tabbar { display: none; }
@media (max-width: 720px) {
  .tabbar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
    background: var(--card); border-top: 2px solid var(--line);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a {
    flex: 1; display: grid; justify-items: center; gap: 2px; padding: 5px 0; border-radius: 12px;
    color: var(--muted); font-size: 0.72rem; font-weight: 900; text-decoration: none !important;
  }
  .tabbar a.is-on { color: var(--violet); background: #efebff; }
  .page { padding-bottom: 90px !important; }
}

/* ----------------------------------------------------------------- layout */

.page { max-width: 1120px; margin: 0 auto; padding: 26px 20px 60px; animation: page-in 0.3s var(--ease); }
.page.narrow { max-width: 520px; }
.page.mid { max-width: 820px; }
.page.wide { max-width: 1280px; }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } }

.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.spread { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack { display: grid; gap: 14px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }

.card {
  background: var(--card); border-radius: var(--r-lg); padding: 22px;
  border: 2px solid var(--line); box-shadow: var(--shadow);
}
.card.flat { box-shadow: none; }

.pattern {
  background-color: var(--night);
  background-image:
    radial-gradient(circle at 20% 15%, rgba(107, 76, 255, 0.45), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(255, 71, 114, 0.28), transparent 45%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M26 6 L16 22 h7 l-2 12 L33 18 H25 Z' fill='%23ffffff' fill-opacity='0.04'/%3E%3C/svg%3E");
  color: #fff;
}

/* ---------------------------------------------------------------- buttons */

/* every button is a slab you press: the bottom edge is its shadow, and
   pressing moves it down onto that edge */
.btn {
  --b: var(--card); --bd: var(--line-2); --fg: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; cursor: pointer; user-select: none;
  background: var(--b); color: var(--fg);
  padding: 12px 20px; border-radius: var(--r); min-height: 48px;
  font-weight: 900; font-size: 1rem; letter-spacing: 0.01em;
  box-shadow: 0 var(--press) 0 var(--bd);
  transform: translateY(0);
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.15s ease;
  text-decoration: none !important; white-space: nowrap;
}
.btn:hover { filter: brightness(1.04); }
.btn:active, .btn.is-pressed { transform: translateY(var(--press)); box-shadow: 0 0 0 var(--bd); }
.btn:disabled { opacity: 0.55; cursor: default; filter: none; }
.btn:disabled:active { transform: none; box-shadow: 0 var(--press) 0 var(--bd); }
.btn:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; }
.btn-main { --b: var(--zing); --bd: var(--zing-deep); --fg: var(--night); }
.btn-violet { --b: var(--violet); --bd: var(--violet-deep); --fg: #fff; }
.btn-ok { --b: var(--ok); --bd: var(--okd); --fg: #fff; }
.btn-bad { --b: var(--bad); --bd: var(--badd); --fg: #fff; }
.btn-dark { --b: var(--night-3); --bd: #120f33; --fg: #fff; }
.btn-ghost { --b: transparent; --bd: transparent; box-shadow: none; }
.btn-ghost:hover { background: rgba(23, 19, 63, 0.06); }
.btn-ghost:active { transform: none; }
.btn-lg { font-size: 1.2rem; padding: 16px 28px; min-height: 60px; border-radius: 17px; --press: 6px; }
.btn-xl { font-size: 1.5rem; padding: 18px 34px; min-height: 72px; border-radius: 20px; --press: 7px; font-family: var(--display); font-weight: 400; letter-spacing: 0.02em; }
.btn-sm { padding: 7px 13px; min-height: 36px; font-size: 0.88rem; --press: 3px; border-radius: 11px; }
.btn-icon { padding: 0; width: 44px; min-height: 44px; }
.btn-block { width: 100%; }

/* ----------------------------------------------------------------- inputs */

.field { display: grid; gap: 6px; }
.field > span { font-size: 0.86rem; font-weight: 900; color: var(--ink-2); }
.input, .textarea, .select {
  width: 100%; border: 2px solid var(--line-2); background: var(--card); border-radius: 13px;
  padding: 12px 14px; font-weight: 700; font-size: 1rem; outline: 0; color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(107, 76, 255, 0.15); }
.input.is-bad { border-color: var(--bad); }
.textarea { resize: vertical; min-height: 84px; }
.input-xl { font-family: var(--display); font-size: 2rem; text-align: center; letter-spacing: 0.12em; padding: 14px; }
.hint { font-size: 0.82rem; color: var(--muted); }
.error-text { color: var(--badd); font-size: 0.88rem; font-weight: 800; }

.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 800; }
.check input { width: 20px; height: 20px; accent-color: var(--violet); }

.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i {
  position: absolute; inset: 0; background: var(--line-2); border-radius: 999px; cursor: pointer;
  transition: background 0.2s;
}
.switch i::after {
  content: ''; position: absolute; width: 22px; height: 22px; left: 4px; top: 4px;
  background: #fff; border-radius: 50%; transition: transform 0.2s var(--spring);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.switch input:checked + i { background: var(--violet); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:focus-visible + i { outline: 3px solid var(--violet); outline-offset: 2px; }

.seg { display: inline-flex; background: #ebe7ff; border-radius: 13px; padding: 4px; gap: 4px; flex-wrap: wrap; }
.seg button {
  border: 0; background: transparent; padding: 8px 14px; border-radius: 10px; cursor: pointer;
  font-weight: 900; color: var(--ink-2);
}
.seg button.is-on { background: var(--card); color: var(--ink); box-shadow: 0 2px 0 var(--line-2); }

/* ------------------------------------------------------------------ pills */

.pill {
  display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 4px 11px;
  font-size: 0.78rem; font-weight: 900; background: #ebe7ff; color: var(--violet-deep);
}
.pill-zing { background: #fff3c4; color: #8a6400; }
.pill-ok { background: #d8f6e8; color: var(--okd); }
.pill-bad { background: #ffe0e7; color: var(--badd); }
.pill-dark { background: rgba(255, 255, 255, 0.14); color: #fff; }

.verified {
  display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%;
  background: var(--sky, #2f9bff); background: var(--a1); color: #fff; flex: none;
  vertical-align: -3px;
}
.verified svg { width: 12px; height: 12px; }
.verified.is-official { background: none; border-radius: 6px; width: 20px; height: 20px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.25)); }
.verified.is-official svg { width: 100%; height: 100%; }
.verified.is-owner { background: var(--ok); }
.verified.is-kg { background: #e8112d; }
.verified.is-kg svg { width: 100%; height: 100%; }
.badge-set { display: inline-flex; gap: 3px; align-items: center; vertical-align: middle; }
.badge-pill.is-verified { background: #e3f1ff; color: #1a6fcc; }
.badge-pill.is-official { background: linear-gradient(135deg, #3a24a8, #17133f); color: #ffcd1f; }
.badge-pill.is-owner { background: #e3f9ef; color: var(--okd); }

/* ----------------------------------------------------------------- blooks */

.blook { display: inline-block; width: 64px; height: 64px; flex: none; vertical-align: middle; }
.blook svg { width: 100%; height: 100%; }

/* ---------------------------------------------------------------- toasts */

#toasts {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100;
  display: grid; gap: 8px; justify-items: center; pointer-events: none; width: min(92vw, 460px);
}
.toast {
  background: var(--night); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 800;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5); animation: toast-in 0.3s var(--spring);
  pointer-events: auto; text-align: center;
}
.toast.is-bad { background: var(--badd); }
.toast.is-ok { background: var(--okd); }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(0.96); } }

/* ---------------------------------------------------------------- modals */

.modal-back {
  position: fixed; inset: 0; z-index: 80; background: rgba(15, 12, 45, 0.6);
  display: grid; place-items: center; padding: 18px; animation: fade 0.2s ease;
  backdrop-filter: blur(3px);
}
.modal {
  background: var(--card); border-radius: 22px; padding: 26px; width: min(100%, 460px);
  max-height: 90vh; overflow: auto; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.6);
  animation: pop-in 0.3s var(--spring);
}
.modal.wide { width: min(100%, 720px); }
.modal h2 { margin-bottom: 8px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: scale(0.94) translateY(10px); } }

/* --------------------------------------------------------------- spinner */

.spinner {
  width: 34px; height: 34px; border-radius: 50%; border: 4px solid rgba(107, 76, 255, 0.2);
  border-top-color: var(--violet); animation: spin 0.8s linear infinite;
}
.spinner.light { border-color: rgba(255, 255, 255, 0.25); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: grid; place-items: center; min-height: 50vh; }

.empty { text-align: center; padding: 50px 20px; color: var(--muted); display: grid; justify-items: center; gap: 10px; }

/* ================================================================= pages */

/* the front page */
.hero {
  border-radius: 28px; padding: 46px 40px; position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 30px; align-items: center;
}
.hero h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); line-height: 1.02; }
.hero h1 em { font-style: normal; color: var(--zing); }
.hero p { font-size: 1.12rem; color: rgba(255, 255, 255, 0.82); max-width: 32ch; margin: 14px 0 22px; }
.join-box {
  background: #fff; border-radius: 22px; padding: 22px; display: grid; gap: 12px; color: var(--ink);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
}
.join-box h2 { font-size: 1.45rem; text-align: center; }
.hero-blooks { position: absolute; inset: 0; pointer-events: none; opacity: 0.9; }
.hero-blooks .blook { position: absolute; width: 58px; height: 58px; animation: bob 4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-10px) rotate(3deg); } }
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding: 32px 22px; }
  .hero-blooks { display: none; }
}

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 36px 0 14px; }
.section-head h2 { font-size: 1.5rem; }

.features { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.mode-card {
  border-radius: 20px; padding: 18px; color: #fff; position: relative; overflow: hidden; min-height: 170px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 4px;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.18);
}
.mode-card h3 { font-size: 1.4rem; }
.mode-card p { margin: 0; font-size: 0.9rem; opacity: 0.9; }
.mode-card .mode-art { position: absolute; right: -6px; top: -6px; width: 120px; height: 120px; opacity: 0.95; }

/* quiz cards */
.quiz-card {
  background: var(--card); border-radius: 18px; overflow: hidden; border: 2px solid var(--line);
  display: flex; flex-direction: column; cursor: pointer; transition: transform 0.15s var(--ease), box-shadow 0.15s;
  box-shadow: 0 4px 0 var(--line);
}
.quiz-card:hover { transform: translateY(-3px); box-shadow: 0 8px 0 var(--line); }
.quiz-cover {
  height: 112px; position: relative; display: grid; place-items: center; overflow: hidden;
}
.quiz-cover .cover-icon { width: 60px; height: 60px; color: rgba(255, 255, 255, 0.95); }
.quiz-cover .count {
  position: absolute; right: 10px; bottom: 10px; background: rgba(0, 0, 0, 0.35); color: #fff;
  border-radius: 999px; padding: 3px 10px; font-size: 0.76rem; font-weight: 900;
}
.quiz-body { padding: 13px 15px 15px; display: grid; gap: 6px; }
.quiz-title { font-weight: 900; font-size: 1.04rem; line-height: 1.25; }
.quiz-meta { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.82rem; }
.quiz-meta .blook { width: 22px; height: 22px; }

/* auth */
.auth { display: grid; gap: 14px; }
.auth h1 { font-size: 2rem; text-align: center; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 0.85rem; }
.divider::before, .divider::after { content: ''; flex: 1; height: 2px; background: var(--line); }
.google-btn { --b: #fff; --bd: var(--line-2); --fg: var(--ink); border: 2px solid var(--line-2); }
.strength { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.strength i { display: block; height: 100%; transition: width 0.3s var(--ease), background 0.3s; }

/* profile */
.profile-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.profile-head .blook { width: 96px; height: 96px; }

/* settings */
.set-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 2px solid var(--line); }
.set-row:first-child { border-top: 0; }
.set-row .grow p { margin: 0; }

/* blook picker */
.blook-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 10px; }
.blook-pick {
  border: 3px solid transparent; background: #f5f3ff; border-radius: 16px; padding: 8px; cursor: pointer;
  display: grid; justify-items: center; gap: 2px; transition: transform 0.12s var(--spring), border-color 0.12s;
}
.blook-pick:hover { transform: translateY(-2px) scale(1.04); }
.blook-pick.is-on { border-color: var(--violet); background: #ece7ff; }
.blook-pick .blook { width: 56px; height: 56px; }
.blook-pick small { font-size: 0.7rem; color: var(--muted); font-weight: 900; }
.blook-pick.is-locked { opacity: 0.4; cursor: not-allowed; }

/* the editor */
.editor { display: grid; grid-template-columns: 250px 1fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .editor { grid-template-columns: 1fr; } }
.q-list { display: grid; gap: 8px; position: sticky; top: 76px; }
@media (max-width: 900px) { .q-list { position: static; } }
.q-thumb {
  display: flex; align-items: center; gap: 10px; background: var(--card); border: 2px solid var(--line);
  border-radius: 14px; padding: 10px 12px; cursor: pointer; text-align: left; width: 100%;
}
.q-thumb.is-on { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(107, 76, 255, 0.15); }
.q-thumb.is-bad { border-color: var(--bad); }
.q-thumb .n {
  width: 28px; height: 28px; border-radius: 9px; background: var(--night); color: #fff; flex: none;
  display: grid; place-items: center; font-weight: 900; font-size: 0.85rem;
}
.q-thumb .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.9rem; }
.q-edit { display: grid; gap: 16px; }
.q-text {
  font-family: var(--display); font-size: 1.6rem; text-align: center; padding: 22px; min-height: 110px;
  border-radius: 18px; border: 3px dashed var(--line-2); background: #fff; resize: vertical;
}
.q-text:focus { border-style: solid; }
.opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .opt-grid { grid-template-columns: 1fr; } }
.opt {
  display: flex; align-items: center; gap: 10px; border-radius: 16px; padding: 10px 12px;
  color: #fff; min-height: 70px; box-shadow: 0 5px 0 rgba(0, 0, 0, 0.2);
}
.opt .shape { width: 34px; height: 34px; flex: none; }
.opt input[type='text'] {
  flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: inherit;
  font-weight: 900; font-size: 1.08rem;
}
.opt input[type='text']::placeholder { color: rgba(255, 255, 255, 0.7); }
.opt.is-dark-text input[type='text']::placeholder { color: rgba(23, 19, 63, 0.55); }
.opt .mark {
  width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.85);
  display: grid; place-items: center; cursor: pointer; flex: none; background: transparent; padding: 0;
}
.opt .mark.is-on { background: #fff; color: var(--okd); }
.opt.is-dark-text .mark { border-color: rgba(23, 19, 63, 0.6); }
.opt .mark svg { width: 20px; height: 20px; }
.opt .x { background: rgba(0, 0, 0, 0.18); border: 0; color: inherit; width: 30px; height: 30px; border-radius: 9px; cursor: pointer; }

/* the four answer colours, used everywhere a choice appears */
.c0 { background: var(--a0); --cd: var(--a0d); }
.c1 { background: var(--a1); --cd: var(--a1d); }
.c2 { background: var(--a2); --cd: var(--a2d); color: var(--night) !important; }
.c3 { background: var(--a3); --cd: var(--a3d); }
.c4 { background: var(--a4); --cd: var(--a4d); }
.c5 { background: var(--a5); --cd: var(--a5d); }
.c0, .c1, .c2, .c3, .c4, .c5 { box-shadow: 0 6px 0 var(--cd); }

/* host setup */
.mode-pick { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.mode-opt {
  border: 3px solid transparent; border-radius: 18px; padding: 14px; cursor: pointer; text-align: left;
  color: #fff; min-height: 128px; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px;
  position: relative; overflow: hidden; box-shadow: 0 5px 0 rgba(0, 0, 0, 0.2);
  transition: transform 0.12s var(--spring);
}
.mode-opt:hover { transform: translateY(-2px); }
.mode-opt.is-on { border-color: #fff; outline: 4px solid var(--violet); }
.mode-opt b { font-family: var(--display); font-weight: 400; font-size: 1.25rem; }
.mode-opt small { opacity: 0.9; font-size: 0.8rem; }
.mode-opt .mode-art { position: absolute; right: -8px; top: -8px; width: 86px; height: 86px; }

/* ------------------------------------------------------------ blook cards */

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; }
.bcard {
  --rc: #9aa3c0; position: relative; display: grid; justify-items: center; gap: 6px; padding: 26px 8px 12px;
  border-radius: 16px; background: #fff; border: 3px solid var(--rc); box-shadow: 0 5px 0 var(--rc);
  font: inherit; color: var(--ink); text-align: center; overflow: hidden; min-height: 150px; align-content: center;
}
button.bcard { cursor: pointer; transition: transform 0.15s var(--spring); }
button.bcard:hover { transform: translateY(-3px) rotate(-1deg); }
.bcard-rarity {
  position: absolute; top: 0; left: 0; right: 0; background: var(--rc); color: #fff; font-size: 0.68rem;
  font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; padding: 3px 0;
}
.bcard-art .blook { width: 72px; height: 72px; }
.bcard-name { font-size: 0.92rem; }
.bcard-count { position: absolute; right: 8px; bottom: 6px; font-size: 0.75rem; font-weight: 900; color: var(--muted); }
.bcard.is-locked { background: #ecebf5; box-shadow: 0 5px 0 #cfc9ee; border-color: #cfc9ee; }
.bcard.is-locked .bcard-art { filter: brightness(0); opacity: 0.85; }
.bcard.is-slot { border-style: dashed; box-shadow: none; color: var(--muted); gap: 8px; }
button.bcard.is-slot { color: var(--violet); border-color: var(--violet); background: #f5f3ff; }
.bcard.r-epic:not(.is-locked) { background: linear-gradient(160deg, #fff, #f1e6ff); }
.bcard.r-legendary:not(.is-locked) { background: linear-gradient(160deg, #fffaf0, #ffe9a8); }
.bcard.r-legendary:not(.is-locked)::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.85) 50%, transparent 65%);
  background-size: 250% 100%; animation: shine 2.6s ease-in-out infinite;
}
@keyframes shine { from { background-position: 150% 0; } to { background-position: -100% 0; } }
.blook.is-legendary { filter: drop-shadow(0 0 6px rgba(255, 184, 0, 0.7)); }
.bcard.is-big { width: 190px; min-height: 240px; }
.bcard.is-big .bcard-art .blook { width: 130px; height: 130px; }
.bcard.is-flip { animation: flip-in 0.7s var(--spring) both; }
@keyframes flip-in { from { transform: rotateY(90deg) scale(0.6); opacity: 0; } }
.blook-pick { border-bottom: 4px solid var(--rc, transparent); }

/* level and coins */
.level-card { display: flex; align-items: center; gap: 18px; }
.level-badge {
  width: 78px; height: 78px; border-radius: 22px; background: var(--violet); color: #fff; display: grid; place-content: center;
  text-align: center; box-shadow: 0 5px 0 var(--violet-deep); flex: none;
}
.level-badge small { font-weight: 900; font-size: 0.7rem; text-transform: uppercase; opacity: 0.85; }
.level-badge b { font-family: var(--display); font-weight: 400; font-size: 2.1rem; line-height: 1; }
.xp-bar { height: 14px; border-radius: 999px; background: var(--line); overflow: hidden; }
.xp-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--violet), #a560ff); border-radius: 999px; transition: width 0.8s var(--ease); }
.coins { display: inline-flex; align-items: center; gap: 6px; font-family: var(--display); font-size: 1.3rem; }
.coin {
  display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--zing);
  color: var(--night); font: 900 0.7rem var(--sans); box-shadow: inset 0 -3px 0 var(--zing-deep); flex: none;
}

/* boxes */
.boxes { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.box-card { border-radius: 20px; padding: 18px; color: #fff; display: grid; gap: 8px; justify-items: center; text-align: center; box-shadow: 0 6px 0 rgba(0, 0, 0, 0.18); }
.box-card h3 { color: #fff; font-size: 1.3rem; }
.box-card p { margin: 0; font-weight: 800; }
.box-art { width: 90px; height: 90px; animation: bob 3s ease-in-out infinite; }
.box-card.is-locked { filter: grayscale(0.7); opacity: 0.75; }
.odds { list-style: none; padding: 8px 12px; margin: 0; display: grid; gap: 2px; font-size: 0.8rem; font-weight: 800; background: rgba(0, 0, 0, 0.22); border-radius: 12px; text-align: left; }
.odds i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }

/* reveal */
.reveal { display: grid; justify-items: center; gap: 10px; text-align: center; position: relative; padding-top: 10px; }
.reveal h2 { font-size: 2rem; }
.reveal p { margin: 0; }
.reveal-burst {
  position: absolute; top: -10px; width: 260px; height: 260px; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, var(--rc) 0%, transparent 65%); opacity: 0.35; animation: pop-in 0.6s var(--spring);
}
.reveal .bcard { z-index: 1; }

/* custom blook builder */
.builder-preview { display: grid; place-items: center; padding: 10px; background: #f5f3ff; border-radius: 18px; margin-bottom: 8px; }
.builder-preview .blook { width: 130px; height: 130px; }
.part-btn {
  border: 2px solid var(--line-2); background: #fff; border-radius: 12px; padding: 6px 10px; font: 800 0.85rem var(--sans);
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px; text-transform: capitalize; color: var(--ink);
}
.part-btn.is-on { border-color: var(--violet); background: #ece7ff; box-shadow: 0 0 0 3px rgba(107, 76, 255, 0.2); }
.part-btn.is-locked { opacity: 0.45; cursor: not-allowed; }
.part-btn small { font-size: 0.68rem; color: var(--muted); }
.swatch { width: 22px; height: 22px; border-radius: 7px; display: inline-block; }

/* level road map */
.roadmap { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.roadmap li { display: flex; align-items: center; gap: 14px; background: var(--card); border: 2px solid var(--line); border-radius: 14px; padding: 10px 14px; }
.roadmap li > div { flex: 1; font-weight: 700; }
.roadmap .lv { width: 36px; height: 36px; border-radius: 11px; background: var(--line); display: grid; place-items: center; font-family: var(--display); flex: none; }
.roadmap li.is-done { border-color: #b7eed6; }
.roadmap li.is-done .lv { background: var(--ok); color: #fff; }
.roadmap li.is-done svg { color: var(--ok); }

/* discover */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 2px solid var(--line-2); background: #fff; color: var(--ink); border-radius: 999px; padding: 7px 16px;
  font: 900 0.92rem var(--sans); cursor: pointer; transition: transform 0.12s var(--spring);
}
.chip:hover { transform: translateY(-2px); }
.chip.is-on { background: var(--night); border-color: var(--night); color: #fff; }
.shelf { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 260px); gap: 16px; overflow-x: auto; padding: 4px 2px 14px; scroll-snap-type: x mandatory; }
.shelf > * { scroll-snap-align: start; }
.quiz-play { justify-self: start; margin-top: 4px; }

/* quiz of the day */
.daily { display: flex; gap: 20px; align-items: center; margin-top: 22px; flex-wrap: wrap; }
.daily .daily-cover { width: 260px; height: 170px; border-radius: 16px; flex: none; }
@media (max-width: 640px) { .daily .daily-cover { width: 100%; } }

/* owner */
.nav-owner { display: inline-flex; align-items: center; gap: 6px; color: #b9f5d8 !important; }
.announce { display: flex; align-items: center; gap: 10px; padding: 10px 18px; background: var(--zing); color: var(--night); font-weight: 800; }
.announce[hidden] { display: none; }
.announce-x { border: 0; background: rgba(0, 0, 0, 0.1); border-radius: 8px; width: 30px; height: 30px; display: grid; place-items: center; cursor: pointer; color: inherit; }
.owner-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.owner-stat { background: var(--card); border: 2px solid var(--line); border-radius: 16px; padding: 14px 16px; display: grid; gap: 2px; color: var(--violet); }
.owner-stat b { font-family: var(--display); font-weight: 400; font-size: 2rem; color: var(--ink); line-height: 1.1; }
.owner-stat small { color: var(--muted); font-weight: 800; }
.owner-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 0; border-top: 2px solid var(--line); }
.owner-row:first-child { border-top: 0; }
.owner-row-main { display: grid; gap: 2px; min-width: 200px; color: inherit; text-decoration: none; }

/* loading screen */
.loader { display: grid; justify-items: center; align-content: center; gap: 18px; padding: 60px 20px; min-height: 50vh; text-align: center; }
.loader.is-full { min-height: 100vh; min-height: 100dvh; color: #fff; }
.loader-logo { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-size: 2.6rem; }
.loader-logo .logo-mark { width: 64px; height: 64px; animation: zap 1.6s var(--spring) infinite; }
@keyframes zap { 0%, 100% { transform: rotate(0) scale(1); } 12% { transform: rotate(-12deg) scale(1.12); } 24% { transform: rotate(8deg) scale(1.04); } 36% { transform: rotate(0) scale(1); } }
.loader-blooks { display: flex; gap: 14px; align-items: flex-end; height: 86px; }
.loader-blooks .blook { width: 56px; height: 56px; animation: hop 1.1s ease-in-out infinite; }
@keyframes hop { 0%, 60%, 100% { transform: translateY(0) scale(1, 1); } 10% { transform: translateY(0) scale(1.15, 0.85); } 30% { transform: translateY(-26px) scale(0.92, 1.08); } 50% { transform: translateY(0) scale(1.1, 0.9); } }
.loader-bar { width: min(280px, 70vw); height: 10px; border-radius: 999px; background: rgba(107, 76, 255, 0.15); overflow: hidden; }
.loader.is-full .loader-bar { background: rgba(255, 255, 255, 0.15); }
.loader-bar i { display: block; height: 100%; width: 40%; border-radius: 999px; background: linear-gradient(90deg, var(--violet), var(--zing)); animation: slide 1.3s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(-110%); } to { transform: translateX(260%); } }
.loader-text { margin: 0; font-weight: 800; color: var(--muted); }
.loader-tipbox { max-width: 420px; display: grid; gap: 4px; background: var(--card); border: 2px solid var(--line); border-radius: 16px; padding: 12px 16px; }
.loader.is-full .loader-tipbox { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.15); }
.loader-tipbox b { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--violet); }
.loader.is-full .loader-tipbox b { color: var(--zing); }
.loader-tip { margin: 0; font-weight: 700; min-height: 2.6em; transition: opacity 0.28s, transform 0.28s; }
.loader-tip.is-out { opacity: 0; transform: translateY(6px); }
[data-motion='calm'] .loader-blooks .blook, [data-motion='calm'] .loader-logo .logo-mark { animation: none; }

/* make with AI */
.ai-steps { display: grid; gap: 16px; padding-left: 22px; margin: 0; }
.ai-steps li { display: grid; gap: 8px; }
.ai-steps li::marker { font-family: var(--display); color: var(--violet); }
.ai-prompt { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.78rem; background: #f5f3ff; color: var(--ink-2); }
.ai-ok { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--okd); font-weight: 900; }
.ai-skipped summary { cursor: pointer; color: var(--muted); font-weight: 800; font-size: 0.88rem; }
.ai-skipped ul { margin: 6px 0 0; padding-left: 20px; font-size: 0.85rem; color: var(--muted); }

/* packs */
.box-card { position: relative; overflow: hidden; }
.box-peek { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; }
.box-peek .blook { width: 30px; height: 30px; background: rgba(255, 255, 255, 0.2); border-radius: 9px; padding: 2px; }
.box-peek .blook.is-unknown svg { filter: brightness(0); opacity: 0.85; }
.limited-tag { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 4px; background: #e2384d; color: #fff; font-weight: 900; font-size: 0.72rem; border-radius: 999px; padding: 4px 10px; box-shadow: 0 3px 0 #a61e30; }
.box-card.is-limited { box-shadow: 0 6px 0 #133a8f, 0 0 0 3px #fff inset; }
.box-card.is-limited > * { position: relative; z-index: 1; }
.snow { position: absolute !important; inset: 0; z-index: 0 !important; pointer-events: none;
  background-image: radial-gradient(3px 3px at 20% 30%, #fff 60%, transparent 61%), radial-gradient(2px 2px at 70% 20%, #fff 60%, transparent 61%),
    radial-gradient(3px 3px at 40% 70%, #fff 60%, transparent 61%), radial-gradient(2px 2px at 85% 60%, #fff 60%, transparent 61%),
    radial-gradient(2px 2px at 10% 85%, #fff 60%, transparent 61%), radial-gradient(3px 3px at 60% 90%, #fff 60%, transparent 61%);
  background-size: 140px 140px; animation: snowfall 6s linear infinite; opacity: 0.85; }
@keyframes snowfall { from { background-position: 0 -140px; } to { background-position: 30px 0; } }
[data-motion='calm'] .snow { animation: none; }

/* ------------------------------------------------------------ intro cutscene */
.cs-root { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 50% 40%, var(--night-3), var(--night) 70%); color: #fff; animation: cs-in .35s ease both; }
.cs-root.cs-out { animation: cs-fade .35s ease both; }
@keyframes cs-in { from { opacity: 0; transform: scale(1.04); } }
@keyframes cs-fade { to { opacity: 0; transform: scale(.97); } }
.cs-stars { position: absolute; inset: -50%; background-image:
  radial-gradient(2px 2px at 20% 30%, #fff8, transparent), radial-gradient(2px 2px at 70% 60%, #fff6, transparent),
  radial-gradient(1.5px 1.5px at 40% 80%, #fff7, transparent), radial-gradient(2px 2px at 85% 20%, #fff9, transparent),
  radial-gradient(1.5px 1.5px at 10% 70%, #fff6, transparent);
  background-size: 260px 260px; animation: cs-drift 40s linear infinite; }
@keyframes cs-drift { to { transform: translate(260px, 130px); } }
.cs-stage { position: relative; width: min(760px, 100% - 32px); }
.cs-scene { display: grid; justify-items: center; gap: 22px; text-align: center; animation: cs-pop .45s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes cs-pop { from { opacity: 0; transform: translateY(30px) scale(.9); } }
.cs-skip { position: absolute; top: 16px; right: 16px; }
.cs-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: #ffffff1a; }
.cs-bar i { display: block; height: 100%; width: 100%; background: var(--zing); transform-origin: left; animation: cs-grow linear both; }
@keyframes cs-grow { from { transform: scaleX(0); } }
.cs-flash { position: fixed; inset: 0; background: #fff; pointer-events: none; animation: cs-flash .6s .35s ease-out both; opacity: 0; }
@keyframes cs-flash { 0% { opacity: .9; } 100% { opacity: 0; } }
.cs-big-logo { width: 150px; height: 150px; animation: cs-zap .9s cubic-bezier(.2, 1.8, .4, 1) both; filter: drop-shadow(0 0 30px #ffcd1f88); }
.cs-big-logo.cs-small { width: 96px; height: 96px; }
.cs-big-logo svg { width: 100%; height: 100%; }
@keyframes cs-zap { 0% { transform: scale(0) rotate(-200deg); } 70% { transform: scale(1.15) rotate(8deg); } }
.cs-title { font-family: 'Bricolage Grotesque', sans-serif; font-size: clamp(48px, 12vw, 110px); line-height: 1; margin: 0; letter-spacing: 1px; }
.cs-title.cs-final { font-size: clamp(34px, 7vw, 64px); }
.cs-title em { color: var(--zing); font-style: normal; }
.cs-word { display: inline-block; }
.cs-em { color: var(--zing); }
.cs-letter { display: inline-block; animation: cs-bounce .6s cubic-bezier(.2, 1.8, .4, 1) both; text-shadow: 0 6px 0 #0005; }
@keyframes cs-bounce { from { opacity: 0; transform: translateY(-120px) rotate(-20deg); } }
.cs-sub { font-size: 20px; font-weight: 800; animation: cs-pop .5s 1.1s both; margin: 0; }
.cs-head { font-family: 'Bricolage Grotesque', sans-serif; font-size: clamp(28px, 6vw, 48px); margin: 0; color: var(--zing); text-shadow: 0 4px 0 #0006; }
.cs-card { background: #fff; color: var(--ink); border-radius: 24px; padding: 20px; width: min(560px, 100%); box-shadow: 0 14px 0 #0004; }
.cs-q { font-weight: 900; font-size: 22px; margin-bottom: 14px; }
.cs-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cs-tile { display: flex; align-items: center; gap: 10px; padding: 16px; border-radius: 16px; color: #fff; font-weight: 900; font-size: 18px;
  box-shadow: inset 0 -5px 0 #0003; animation: cs-pop .4s cubic-bezier(.2, 1.6, .4, 1) both; }
.cs-tile b { background: #fff3; border-radius: 8px; padding: 2px 8px; }
.cs-right { animation: cs-pop .4s .58s cubic-bezier(.2, 1.6, .4, 1) both, cs-win .5s 1.5s ease both; position: relative; }
.cs-right::after { content: '✓'; position: absolute; right: 12px; font-size: 26px; animation: cs-pop .4s 1.5s both; }
@keyframes cs-win { 50% { transform: scale(1.12); } 100% { transform: scale(1.05); box-shadow: 0 0 0 5px #fff, 0 0 30px #fff; } }
.cs-tiles .cs-tile:not(.cs-right) { animation: cs-pop .4s cubic-bezier(.2, 1.6, .4, 1) both, cs-dim .3s 1.5s both; }
@keyframes cs-dim { to { opacity: .35; } }
.cs-pin { display: flex; gap: 8px; }
.cs-pin span { font-family: 'Bricolage Grotesque', sans-serif; font-size: clamp(40px, 10vw, 80px); background: #fff; color: var(--night); border-radius: 16px;
  width: 1.1em; text-align: center; box-shadow: 0 8px 0 #0005; animation: cs-type .3s cubic-bezier(.2, 1.8, .4, 1) both; }
@keyframes cs-type { from { opacity: 0; transform: scale(0); } }
.cs-crowd { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.cs-drop { animation: cs-drop .6s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes cs-drop { from { opacity: 0; transform: translateY(-300px); } }
.cs-modes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: 100%; }
.cs-mode { border-radius: 18px; overflow: hidden; background: #ffffff14; aspect-ratio: 1; display: grid; place-items: center;
  animation: cs-spin .7s cubic-bezier(.2, 1.6, .4, 1) both; }
.cs-mode svg { width: 100%; height: 100%; }
@keyframes cs-spin { from { opacity: 0; transform: rotate(-30deg) scale(.3); } }
.cs-zoom { position: absolute; top: 40%; left: -100px; animation: cs-fly 2.6s .5s ease-in-out both; }
@keyframes cs-fly { 0% { transform: translate(0, 0) rotate(-10deg); } 50% { transform: translate(50vw, -60px) rotate(15deg); } 100% { transform: translate(110vw, 20px) rotate(360deg); } }
.cs-flip { perspective: 900px; width: 200px; height: 260px; }
.cs-flip-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; animation: cs-turn 1s .3s cubic-bezier(.3, 1.4, .5, 1) both; }
@keyframes cs-turn { from { transform: rotateY(0) scale(.8); } to { transform: rotateY(180deg) scale(1); } }
.cs-face { position: absolute; inset: 0; border-radius: 22px; display: grid; place-items: center; backface-visibility: hidden; }
.cs-back { background: linear-gradient(140deg, var(--violet), var(--a5)); box-shadow: 0 10px 0 #0005; padding: 50px; }
.cs-back svg { width: 100%; }
.cs-front { transform: rotateY(180deg); background: linear-gradient(160deg, #ffe680, #ff9a1f); color: #5a2a00; align-content: center; gap: 8px;
  box-shadow: 0 0 0 4px #fff, 0 0 60px #ffcd1f; font-family: 'Bricolage Grotesque', sans-serif; font-size: 24px; letter-spacing: 2px; }
.cs-go { animation: cs-pop .5s .6s both, cs-pulse 1.4s 1.2s ease-in-out infinite; }
@keyframes cs-pulse { 50% { transform: scale(1.07); } }
.cs-calm *, .cs-calm { animation-duration: .01ms !important; animation-delay: 0ms !important; }
@media (max-width: 560px) { .cs-modes { grid-template-columns: repeat(2, 1fr); width: 70%; } .cs-tile { padding: 12px; font-size: 15px; } }
.cs-root .blook { display: inline-block; flex: none; }
.cs-root .blook svg { width: 100%; height: 100%; display: block; }

/* ---------------------------------------------------------------- settings */
.set-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; padding: 26px; border-radius: 28px; color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(circle at 85% 10%, #a560ff 0, transparent 45%), radial-gradient(circle at 10% 100%, #2f9bff 0, transparent 50%), linear-gradient(135deg, var(--night), var(--night-3));
  box-shadow: 0 10px 0 #0002; }
.set-hero::after { content: ''; position: absolute; right: -40px; bottom: -40px; width: 180px; height: 180px; border-radius: 40px; background: #ffffff10; transform: rotate(20deg); }
.set-hero h1 { color: #fff; font-family: 'Bricolage Grotesque', sans-serif; font-size: clamp(28px, 5vw, 40px); }
.set-hero-sub { opacity: .75; font-weight: 800; }
.set-hero-blook { padding: 14px; border-radius: 28px; background: #ffffff14; animation: set-bob 3s ease-in-out infinite; }
@keyframes set-bob { 50% { transform: translateY(-6px) rotate(-3deg); } }
.set-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 99px; background: #ffffff1f; font-weight: 900; font-size: 14px; }
.set-chip-gold { background: var(--zing); color: var(--night); }
.set-xp { height: 12px; border-radius: 99px; background: #ffffff22; overflow: hidden; max-width: 420px; }
.set-xp i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--zing), #ff8a2a); }
.set-ghost { color: #fff; }
.set-tabs { display: flex; gap: 8px; overflow-x: auto; position: sticky; top: 64px; z-index: 5; padding: 6px 0; }
.set-tab { display: inline-flex; align-items: center; gap: 6px; padding: 9px 15px; border-radius: 99px; background: var(--card); font-weight: 900; color: var(--ink);
  box-shadow: 0 4px 0 #0000001a; white-space: nowrap; transition: transform .12s var(--spring); }
.set-tab:hover { transform: translateY(-2px); }
.set-card { scroll-margin-top: 120px; }
.set-title { display: flex; align-items: center; gap: 10px; }
.set-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--violet); color: #fff; box-shadow: 0 3px 0 var(--violet-deep); }
.gear-btn.is-on { background: var(--violet); color: #fff; }

/* ------------------------------------------------------- question pictures */
.q-pic { display: grid; place-items: center; margin: 6px auto; max-width: min(520px, 100%); }
.q-pic img { max-width: 100%; max-height: 32vh; border-radius: 18px; box-shadow: 0 6px 0 #0002; object-fit: contain; background: #fff; }
.q-pic-blook .blook { width: min(26vh, 180px); height: min(26vh, 180px); animation: set-bob 3s ease-in-out infinite; }
.q-pic.q-pic-small img { max-height: 18vh; }
.q-pic-small.q-pic-blook .blook { width: 90px; height: 90px; }
.pic-edit { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pic-edit .q-pic { margin: 0; }
.pic-edit .q-pic img { max-height: 90px; }
.pic-edit .q-pic-blook .blook { width: 72px; height: 72px; animation: none; }
.q-pic.q-pic-host img { max-height: 38vh; max-width: 36vw; }
.q-pic-host.q-pic-blook .blook { width: min(30vh, 220px); height: min(30vh, 220px); }

/* ---------------------------------------------------------- box opening */
.ub-root { position: fixed; inset: 0; z-index: 150; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 16px; text-align: center;
  color: #fff; background: radial-gradient(circle at 50% 45%, var(--night-3), var(--night) 70%); animation: cs-in .3s ease both; overflow: hidden; }
.ub-root.ub-out { animation: cs-fade .25s ease both; }
.ub-name { color: #fff; font-family: 'Bricolage Grotesque', sans-serif; font-size: clamp(26px, 6vw, 40px); margin: 0; opacity: .9; }
.ub-stage { position: relative; width: 240px; height: 260px; display: grid; place-items: center; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; }
.ub-box { width: 190px; height: 190px; position: relative; z-index: 1; animation: ub-drop .6s cubic-bezier(.3, 1.6, .5, 1) both; filter: drop-shadow(0 12px 0 #0005); }
.ub-box svg { width: 100%; height: 100%; }
@keyframes ub-drop { from { transform: translateY(-120vh) rotate(-20deg); } }
.ub-glow { position: absolute; inset: -40px; border-radius: 50%; opacity: 0; transition: opacity .3s, background .3s; animation: ub-pulse 1.2s ease-in-out infinite; }
@keyframes ub-pulse { 50% { transform: scale(1.12); } }
.ub-shake1 { animation: ub-shake .35s ease; }
.ub-shake2 { animation: ub-shake .45s ease 2; }
.ub-shake3 { animation: ub-shake-hard .45s ease infinite; }
@keyframes ub-shake { 25% { transform: rotate(-9deg) scale(1.05); } 50% { transform: rotate(8deg) scale(.97); } 75% { transform: rotate(-5deg); } }
@keyframes ub-shake-hard { 20% { transform: translate(-6px, 2px) rotate(-12deg) scale(1.12); } 40% { transform: translate(6px, -3px) rotate(12deg) scale(1.15); }
  60% { transform: translate(-4px, 3px) rotate(-8deg) scale(1.18); } 80% { transform: translate(4px, -2px) rotate(9deg) scale(1.2); } }
.ub-hint { font-weight: 900; font-size: 22px; margin: 0; min-height: 30px; animation: ub-bounce 1s ease-in-out infinite; }
@keyframes ub-bounce { 50% { transform: translateY(-6px); } }
.ub-dots { display: flex; gap: 10px; }
.ub-dots i { width: 16px; height: 16px; border-radius: 50%; background: #ffffff33; transition: transform .2s; }
.ub-dots i.is-on { transform: scale(1.3); box-shadow: 0 0 12px currentColor; }
.ub-skip { position: absolute; top: 16px; right: 16px; }
.ub-rays { position: absolute; inset: -50%; opacity: 0; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, var(--rc, #fff) 0deg 10deg, transparent 10deg 30deg); }
.ub-burst .ub-rays { animation: ub-rays-in .6s ease both, ub-spin 14s linear infinite; }
@keyframes ub-rays-in { to { opacity: .16; } }
@keyframes ub-spin { to { transform: rotate(360deg); } }
.ub-legendary .ub-rays, .ub-epic .ub-rays { animation: ub-rays-big .6s ease both, ub-spin 8s linear infinite; }
@keyframes ub-rays-big { to { opacity: .32; } }
.ub-burst .ub-box { animation: ub-pop .42s ease-in both; }
@keyframes ub-pop { 60% { transform: scale(1.35); filter: brightness(2.5); } 100% { transform: scale(0); opacity: 0; } }
.ub-burst::before { content: ''; position: fixed; inset: 0; background: var(--rc); pointer-events: none; animation: ub-flash .6s ease-out both; }
@keyframes ub-flash { from { opacity: .85; } to { opacity: 0; } }
.ub-spark { position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; border-radius: 3px; animation: ub-fly .7s ease-out forwards; }
@keyframes ub-fly { to { transform: translate(var(--dx), var(--dy)) rotate(200deg); opacity: 0; } }
.ub-card { position: relative; z-index: 1; animation: ub-card-in .8s cubic-bezier(.2, 1.5, .4, 1) both; }
@keyframes ub-card-in { 0% { transform: translateY(80px) rotateY(540deg) scale(.2); } 100% { transform: none; } }
.ub-legendary .ub-card { box-shadow: 0 0 0 4px #fff, 0 0 50px var(--rc), 0 0 120px var(--rc); }
.ub-legendary .ub-card::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, #ffffffaa 48%, transparent 66%); background-size: 250% 100%; animation: ub-gleam 1.8s 1s ease-in-out infinite; }
@keyframes ub-gleam { from { background-position: 150% 0; } to { background-position: -100% 0; } }
.ub-shine { position: absolute; inset: -30px; border-radius: 50%; background: radial-gradient(circle, var(--rc) 0%, transparent 62%); opacity: .6; animation: ub-pulse 1.6s ease-in-out infinite; }
.ub-result { display: grid; justify-items: center; gap: 8px; animation: cs-pop .45s .35s cubic-bezier(.2, 1.6, .4, 1) both; position: relative; z-index: 1; }
.ub-result p { margin: 0; font-weight: 800; font-size: 18px; }
.ub-rarity { font-family: 'Bricolage Grotesque', sans-serif; font-size: clamp(40px, 10vw, 64px); margin: 0; text-shadow: 0 5px 0 #0007; animation: ub-slam .5s .3s cubic-bezier(.2, 1.8, .4, 1) both; }
@keyframes ub-slam { from { transform: scale(3); opacity: 0; } }
.ub-new { display: inline-block; background: var(--zing); color: var(--night); border-radius: 8px; padding: 1px 8px; font-weight: 900; animation: ub-bounce .8s ease-in-out infinite; }
.ub-calm *, .ub-calm, .ub-calm::before { animation-duration: .01ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; }
.set-hero .badge-set, .set-hero h1 > .verified { transform: scale(1.45); transform-origin: left center; margin-left: 4px; }

/* ---------------------------------------------------------------- channels */
.channel { background: var(--card); border-radius: 28px; overflow: hidden; box-shadow: 0 8px 0 #0000001a; }
.channel-banner { height: 150px; position: relative; overflow: hidden; }
.channel-floaters i { position: absolute; width: 60px; height: 60px; border-radius: 18px; background: #ffffff2a; left: calc(var(--i) * 22% + 4%); top: 20%;
  transform: rotate(calc(var(--i) * 17deg)); animation: chan-float calc(5s + var(--i) * 1s) ease-in-out infinite alternate; }
.channel-floaters i:nth-child(even) { border-radius: 50%; top: 52%; width: 40px; height: 40px; }
@keyframes chan-float { to { transform: translateY(-18px) rotate(calc(var(--i) * 17deg + 30deg)); } }
.channel-body { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 18px; padding: 0 24px 16px; margin-top: -56px; position: relative; }
.channel-avatar { background: var(--card); border-radius: 30px; padding: 10px; box-shadow: 0 6px 0 #0000001a; }
.channel-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid #0000000d; }
.channel-stats > div { display: grid; justify-items: center; padding: 12px 6px; }
.channel-stats b { font-family: 'Bricolage Grotesque', sans-serif; font-size: 26px; color: var(--ink); }
.channel-stats small { color: var(--ink-2); font-weight: 800; }
.follow-btn { min-width: 130px; justify-content: center; }
.follow-btn.is-following { background: var(--ok); color: #fff; box-shadow: 0 4px 0 var(--okd); }
.channels-hero { padding: 26px; border-radius: 28px; color: #fff; background: radial-gradient(circle at 90% 0, #ff4772, transparent 50%), linear-gradient(135deg, var(--violet), var(--night)); }
.channels-hero h1 { color: #fff; margin: 0; font-family: 'Bricolage Grotesque', sans-serif; font-size: clamp(32px, 6vw, 48px); }
.channels-hero p { margin: 6px 0 0; font-weight: 700; opacity: .9; }
.channel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.channel-card { display: grid; justify-items: center; gap: 6px; text-align: center; background: var(--card); border-radius: 22px; padding-bottom: 14px; overflow: hidden;
  box-shadow: 0 6px 0 #0000001a; color: var(--ink); transition: transform .15s var(--spring); }
.channel-card:hover { transform: translateY(-4px) rotate(-1deg); }
.channel-card-top { width: 100%; height: 96px; display: grid; place-items: center; }
@media (max-width: 560px) { .channel-stats b { font-size: 20px; } .channel-body { padding: 0 16px 14px; } }

/* box opening: the mystery card, the fake-out, the legendary slam */
.ub-mystery { --rc: #6b6790; position: relative; z-index: 1; background: linear-gradient(160deg, #2b2560, #17133f); border: 4px solid var(--rc);
  box-shadow: 0 0 40px var(--rc); display: grid; place-items: center; transition: border-color .2s, box-shadow .2s; animation: ub-mspin 1s cubic-bezier(.2, 1.5, .4, 1) both, ub-wobble 1.2s .9s ease-in-out infinite; }
.ub-mystery .blook.is-unknown svg { filter: brightness(0) drop-shadow(0 0 6px var(--rc)); }
.ub-q { position: absolute; top: 8px; font-family: 'Bricolage Grotesque', sans-serif; font-size: 40px; color: var(--rc); text-shadow: 0 3px 0 #0006; }
@keyframes ub-mspin { from { transform: rotateY(720deg) scale(.2); } }
@keyframes ub-wobble { 25% { transform: rotate(-3deg) scale(1.02); } 75% { transform: rotate(3deg) scale(1.02); } }
.ub-mystery.ub-crack { animation: ub-shake-hard .3s ease infinite; }
.ub-root { --rc: #fff; }
.ub-root .ub-glow, .ub-root .ub-rays { transition: background .2s; }
.ub-hint.ub-wait { font-family: 'Bricolage Grotesque', sans-serif; font-size: 56px; color: #ff4772; animation: ub-slam .35s cubic-bezier(.2, 1.8, .4, 1) both; text-shadow: 0 5px 0 #0007; }
.ub-hint.ub-up { font-family: 'Bricolage Grotesque', sans-serif; font-size: 36px; color: var(--rc); animation: ub-slam .3s cubic-bezier(.2, 1.8, .4, 1) both; }
.ub-dark::after { content: ''; position: fixed; inset: 0; background: #000; opacity: .88; animation: cs-in .25s both; z-index: 2; pointer-events: none; }
.ub-word { position: fixed; inset: 0; z-index: 3; display: flex; justify-content: center; align-items: center; gap: .04em; pointer-events: none;
  font-family: 'Bricolage Grotesque', sans-serif; font-size: clamp(40px, 11vw, 110px); text-shadow: 0 0 30px currentColor, 0 6px 0 #0008; }
.ub-word span { display: inline-block; animation: ub-slam .3s cubic-bezier(.2, 1.8, .4, 1) both; }
.ub-ring { position: absolute; width: 220px; height: 220px; border-radius: 50%; border: 8px solid var(--rc); animation: ub-ring .8s ease-out forwards; pointer-events: none; }
@keyframes ub-ring { from { transform: scale(.3); opacity: 1; } to { transform: scale(2.4); opacity: 0; } }
.ub-coin { position: fixed; top: -40px; z-index: 4; animation: ub-rain linear both; pointer-events: none; }
@keyframes ub-rain { to { transform: translateY(115vh) rotate(720deg); } }

/* ------------------------------------------------------------- admin abuse */
.abuse-msg { position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 300; display: grid; justify-items: center; gap: 6px;
  padding: 22px 30px; border-radius: 26px; max-width: calc(100% - 32px); text-align: center; color: #fff;
  background: linear-gradient(135deg, #ff4772, #a560ff 50%, #2f9bff); box-shadow: 0 0 0 5px #fff, 0 20px 60px #0008;
  animation: abuse-in .5s cubic-bezier(.2, 1.8, .4, 1) both; pointer-events: none; }
.abuse-msg b { font-family: 'Bricolage Grotesque', sans-serif; font-size: clamp(28px, 7vw, 64px); line-height: 1.05; text-shadow: 0 4px 0 #0005; }
.abuse-msg.is-out { animation: cs-fade .4s ease both; }
@keyframes abuse-in { from { transform: translate(-50%, -50%) scale(.2) rotate(-12deg); opacity: 0; } }
.abuse-by { font-weight: 900; font-size: 13px; letter-spacing: 3px; background: #17133f; color: #ffcd1f; padding: 3px 10px; border-radius: 99px; }
.abuse-tag { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; gap: 8px; align-items: center;
  padding: 6px 8px; border-radius: 99px; background: #fff; color: #17133f; font-weight: 900; box-shadow: 0 6px 20px #0004; animation: streak-in .4s both; pointer-events: none; }
.abuse-coin { position: fixed; top: -40px; z-index: 290; animation: ub-rain linear both; pointer-events: none; }
.abuse-runner { position: fixed; left: -140px; z-index: 290; pointer-events: none; animation: abuse-run linear both; }
@keyframes abuse-run { 0% { transform: translateX(0) rotate(0); } 25% { transform: translateX(30vw) translateY(-20px) rotate(10deg); }
  50% { transform: translateX(60vw) rotate(-8deg); } 100% { transform: translateX(calc(100vw + 280px)) translateY(-10px) rotate(6deg); } }
.abuse-disco { animation: abuse-disco 1s linear infinite; }
@keyframes abuse-disco { from { filter: hue-rotate(0deg) saturate(1.6); } to { filter: hue-rotate(360deg) saturate(1.6); } }
.abuse-quake { animation: abuse-quake .12s linear 20; }
@keyframes abuse-quake { 25% { transform: translate(-6px, 4px) rotate(-.6deg); } 50% { transform: translate(5px, -5px) rotate(.5deg); } 75% { transform: translate(-4px, -3px); } }

/* ------------------------------------------------------------ special events */
.event-bar { display: flex; align-items: center; gap: 10px; padding: 8px 16px; color: #17133f; font-weight: 800; background-size: 200% 100% !important;
  animation: event-slide 6s linear infinite; text-shadow: 0 1px 0 #fff6; }
.event-bar[hidden] { display: none !important; }
@keyframes event-slide { to { background-position: 200% 0; } }
.event-spark { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #fff; animation: ub-bounce 1s ease-in-out infinite; }
.event-left { background: #17133f; color: #fff; border-radius: 99px; padding: 2px 10px; font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .event-blurb { display: none; } .event-bar { justify-content: space-between; } }
.abuse-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.abuse-btn { display: grid; gap: 3px; text-align: left; padding: 14px; border: 0; border-radius: 18px; cursor: pointer; color: #fff; font: inherit;
  background: linear-gradient(140deg, #6b4cff, #a560ff); box-shadow: 0 5px 0 #0003; transition: transform .12s var(--spring); }
.abuse-btn:hover { transform: translateY(-3px) rotate(-1deg); }
.abuse-btn:active { transform: translateY(2px); }
.abuse-btn b { font-family: 'Bricolage Grotesque', sans-serif; font-size: 20px; font-weight: 400; }
.abuse-btn small { opacity: .9; font-weight: 700; }
.abuse-btn.is-message { background: linear-gradient(140deg, #ff4772, #a560ff); }
.abuse-btn.is-confetti { background: linear-gradient(140deg, #ff8a2a, #ff4772); }
.abuse-btn.is-coins { background: linear-gradient(140deg, #ffcd1f, #ff8a2a); color: #17133f; }
.abuse-btn.is-disco { background: linear-gradient(90deg, #ff4772, #ffcd1f, #12c9a6, #2f9bff, #a560ff); }
.abuse-btn.is-blooks { background: linear-gradient(140deg, #12c9a6, #19c37d); }
.abuse-btn.is-quake { background: linear-gradient(140deg, #4e4a75, #17133f); }
.abuse-btn.is-points { background: linear-gradient(140deg, #2f9bff, #6b4cff); }
.event-pick { color: #17133f; text-shadow: 0 1px 0 #fff8; }
.event-pick.is-on { box-shadow: 0 0 0 4px #17133f, 0 5px 0 #0003; }
.channel-stats.no-channel { grid-template-columns: repeat(3, 1fr); }

/* ---------------------------------------------------------------- sidebar */
.sidebar { display: none; }
@media (min-width: 721px) {
  #app.with-side { padding-left: 248px; }
  #app.with-side > .topbar { display: none; }
  .sidebar {
    display: flex; flex-direction: column; gap: 14px; position: fixed; left: 0; top: 0; bottom: 0; width: 248px; z-index: 40;
    padding: 18px 14px; overflow-y: auto; color: #fff;
    background: radial-gradient(circle at 0 0, #3a2ca0 0, transparent 55%), linear-gradient(180deg, var(--night), #0f0b2e);
    box-shadow: 4px 0 0 rgba(0, 0, 0, 0.12);
  }
  .event-bar, .announce { position: relative; z-index: 2; }
}
.side-logo { padding: 2px 6px 6px; }
.side-logo .ver { margin-left: auto; font-weight: 900; font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--zing); color: var(--night); }
.side-join { justify-content: center; width: 100%; }
.side-nav { display: grid; gap: 14px; }
.side-group { display: grid; gap: 2px; }
.side-group > small { font-weight: 900; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(255, 255, 255, 0.45); padding: 0 10px 4px; }
.side-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; color: rgba(255, 255, 255, 0.8); font-weight: 800; font: inherit; font-weight: 800;
  background: none; border: 0; cursor: pointer; text-align: left; text-decoration: none !important; width: 100%; transition: background .15s, color .15s, transform .15s var(--spring); }
.side-link:hover { background: rgba(255, 255, 255, 0.08); color: #fff; transform: translateX(3px); }
.side-link.is-on { background: linear-gradient(90deg, rgba(107, 76, 255, 0.9), rgba(107, 76, 255, 0.35)); color: #fff; box-shadow: inset 3px 0 0 var(--zing); }
.side-link svg { flex: none; }
.side-end { margin-top: auto; display: grid; gap: 2px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.side-me { margin-top: 8px; padding: 6px 12px 6px 6px; border-radius: 16px; }
.side-me .blook { width: 36px; height: 36px; }
.side-auth { display: flex; gap: 8px; margin-top: 8px; }
.side-auth .btn { flex: 1; justify-content: center; }
.top-chip { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, 0.1); }
.top-chip .blook { width: 32px; height: 32px; }

/* ------------------------------------------------------------- what's new */
.wn { display: grid; gap: 14px; }
.wn-hero { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 22px; color: #fff; background: linear-gradient(135deg, #6b4cff, #ff4772); }
.wn-hero h2 { color: #fff; margin: 0; font-family: 'Bricolage Grotesque', sans-serif; font-size: 30px; }
.wn-hero .logo-mark { width: 64px; height: 64px; }
.wn-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.wn-list li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; background: #f5f3ff; }
.wn-list li b { display: block; }
.wn-list li small { color: var(--ink-2); font-weight: 700; }
.wn-ic { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; color: #fff; }

/* ------------------------------------------------------- the 1.1 flight film */
.fl-root { position: fixed; inset: 0; z-index: 160; overflow: hidden; color: #fff; animation: cs-in .35s ease both; }
.fl-root.fl-out { animation: cs-fade .35s ease both; }
.fl-root.fl-shake { animation: abuse-quake .1s linear 5; }
.fl-sky { position: absolute; inset: 0; transition: background 1.2s; background: linear-gradient(180deg, #78cbff, #cdf6c4); }
.fl-sky.is-storm { background: linear-gradient(180deg, #1b1840, #4a3f78 60%, #7a5a6a); }
.fl-sky.is-storm::after { content: ''; position: absolute; inset: 0; background: #fff; opacity: 0; animation: fl-lightning 2.6s infinite; }
@keyframes fl-lightning { 0%, 88%, 100% { opacity: 0; } 90% { opacity: .5; } 92% { opacity: 0; } 94% { opacity: .35; } }
.fl-sky.is-clear { background: linear-gradient(180deg, #3aa8ff, #b9e9ff 70%, #fff3c9); }
.fl-sky.is-sunset { background: linear-gradient(180deg, #ff9f5a, #ffd29a 60%, #ffe9c4); }
.fl-world { position: absolute; inset: 0; }
.fl-skip { position: absolute; top: 16px; right: 16px; z-index: 5; }
.fl-plane { position: absolute; left: 12%; top: 40%; width: min(300px, 46vw); z-index: 3; transition: left 1.5s ease, top 1.5s ease, transform 1.5s ease; }
.fl-plane svg { width: 100%; display: block; filter: drop-shadow(0 10px 10px #0004); }
.fl-pilot { position: absolute; left: 77%; top: 26%; transform: translate(-50%, -50%); }
.fl-plane.is-dodge { animation: fl-dodge 2.4s ease-in-out infinite; }
@keyframes fl-dodge { 0%, 100% { transform: translateY(0) rotate(0); } 20% { transform: translateY(-80px) rotate(-10deg); } 45% { transform: translateY(60px) rotate(8deg); }
  70% { transform: translateY(-30px) rotate(-5deg); } }
.fl-plane.is-hover { animation: fl-bob 1.6s ease-in-out infinite; }
@keyframes fl-bob { 50% { transform: translateY(-10px) rotate(-2deg); } }
.fl-plane.is-cruise { left: 30%; top: 22%; animation: fl-bob 2s ease-in-out infinite; }
.fl-plane.is-land { animation: fl-land 2.6s cubic-bezier(.3, .1, .3, 1) forwards; top: 0; left: 0; }
@keyframes fl-land { 0% { transform: translate(-10vw, 18vh) rotate(8deg); } 70% { transform: translate(28vw, 62vh) rotate(3deg); } 100% { transform: translate(38vw, 64vh) rotate(0); } }
.fl-puff { position: absolute; bottom: 4%; left: calc(40% + var(--d)); width: 26px; height: 26px; border-radius: 50%; background: #fff; opacity: .9; animation: fl-puff 1s ease-out forwards; }
@keyframes fl-puff { to { transform: translate(-60px, -20px) scale(2.4); opacity: 0; } }
.fl-rock { position: absolute; left: 105%; border-radius: 42% 58% 51% 49% / 55% 41% 59% 45%; z-index: 2;
  background: radial-gradient(circle at 30% 30%, #b3a49a, #6b5a52 60%, #3b302c); box-shadow: inset -6px -8px 0 #0003, 0 0 18px #ff8a2a66;
  animation: fl-rock linear forwards; }
@keyframes fl-rock { to { transform: translateX(calc(-100vw - 200px)) rotate(var(--spin)); } }
.fl-rock.is-frozen { animation-play-state: paused; filter: grayscale(.5) brightness(1.2); box-shadow: 0 0 0 3px #9be7ff, 0 0 20px #9be7ff; }
.fl-rock.is-drop { animation-play-state: paused; translate: 0 120vh; transition: translate 1.4s ease-in; }
.fl-caption { position: absolute; left: 50%; bottom: 8%; transform: translateX(-50%); z-index: 4; text-align: center; width: max-content; max-width: calc(100% - 32px); }
.fl-caption span { display: inline-block; padding: 10px 20px; border-radius: 99px; background: #17133fcc; font-weight: 900; font-size: clamp(16px, 3vw, 22px); animation: cs-pop .4s both; }
.fl-caption.is-alert span { background: #ff4772; font-family: 'Bricolage Grotesque', sans-serif; font-size: clamp(28px, 7vw, 54px); animation: ub-slam .35s both; }
.fl-caption.is-good span { background: #19c37d; font-family: 'Bricolage Grotesque', sans-serif; font-size: clamp(24px, 5vw, 40px); }
.fl-radio { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 6; width: min(560px, calc(100% - 32px)); padding: 20px; border-radius: 24px;
  background: #fff; color: var(--ink); box-shadow: 0 0 0 5px #ffcd1f, 0 20px 60px #0008; animation: cs-pop .45s cubic-bezier(.2, 1.6, .4, 1) both; }
.fl-radio h2 { margin: 8px 0 14px; font-size: clamp(18px, 3.4vw, 24px); }
.fl-radio-top { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; background: #17133f; color: #ffcd1f; font-weight: 900; font-size: 13px; }
.fl-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fl-opt { border: 0; border-radius: 16px; padding: 16px 10px; color: #fff; font: inherit; font-weight: 900; font-size: 18px; cursor: pointer; box-shadow: inset 0 -5px 0 #0003; transition: transform .12s var(--spring); }
.fl-opt:hover { transform: translateY(-3px); }
.fl-opt.is-wrong { opacity: .35; text-decoration: line-through; }
.fl-opt.is-right { box-shadow: 0 0 0 4px #17133f, 0 0 30px #19c37d; transform: scale(1.06); }
.fl-note { margin: 12px 0 0; font-weight: 800; color: var(--ink-2); text-align: center; }
.fl-wobble { animation: fl-wobble .4s ease; }
@keyframes fl-wobble { 25% { transform: translate(-52%, -50%) rotate(-1.5deg); } 75% { transform: translate(-48%, -50%) rotate(1.5deg); } }
.fl-mountains { position: absolute; left: 0; right: 0; bottom: 0; height: 45%; animation: fl-scroll 4.5s linear both; }
.fl-mountains svg { width: 200%; height: 100%; }
@keyframes fl-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.fl-flag { position: absolute; right: 10%; top: 18%; animation: cs-pop .6s .5s both, fl-bob 2s 1s ease-in-out infinite; }
.fl-airport { position: absolute; inset: 0; }
.fl-terminal { position: absolute; left: 50%; bottom: 22%; transform: translateX(-50%); width: min(720px, 92%); height: 34%; border-radius: 20px 20px 0 0;
  background: linear-gradient(180deg, #e8ecff, #c9cff5); box-shadow: inset 0 -10px 0 #0001; display: grid; align-content: start; justify-items: center; padding-top: 12px; color: #17133f; }
.fl-terminal b { font-family: 'Bricolage Grotesque', sans-serif; font-size: clamp(20px, 4vw, 34px); letter-spacing: 3px; background: #17133f; color: #ffcd1f; padding: 2px 16px; border-radius: 10px; }
.fl-terminal span { font-weight: 900; margin-top: 4px; }
.fl-runway { position: absolute; left: 0; right: 0; bottom: 0; height: 22%; background: #3b3f55; display: flex; align-items: center; justify-content: space-around; }
.fl-runway i { width: 5%; height: 6px; background: #fff; border-radius: 3px; }
.fl-crowd { position: absolute; left: 50%; bottom: 22%; transform: translateX(-50%); display: flex; gap: 4px; z-index: 2; }
.fl-fan { animation: fl-cheer .5s ease-in-out infinite alternate; }
@keyframes fl-cheer { from { transform: translateY(0) rotate(-6deg); } to { transform: translateY(-22px) rotate(6deg); } }
.fl-hero { position: absolute; left: 58%; bottom: 23%; z-index: 4; animation: fl-hop 1.2s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes fl-hop { 0% { transform: translate(-60px, -60px) scale(.3); } 60% { transform: translate(0, -50px) scale(1.1); } 100% { transform: translate(0, 0) scale(1); } }
.fl-card { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 6; width: min(520px, calc(100% - 32px)); max-height: calc(100% - 32px); overflow-y: auto;
  display: grid; gap: 14px; padding: 22px; border-radius: 26px; background: #fff; color: var(--ink); box-shadow: 0 0 0 5px #ffcd1f, 0 20px 80px #000a; animation: cs-pop .5s cubic-bezier(.2, 1.6, .4, 1) both; }
.fl-card-head { display: flex; align-items: center; gap: 14px; }
.fl-card-head .logo-mark { width: 70px; height: 70px; animation: cs-zap .9s both; }
.fl-card-head small { font-weight: 900; color: var(--ink-2); letter-spacing: 2px; text-transform: uppercase; }
.fl-card-head h1 { margin: 0; font-family: 'Bricolage Grotesque', sans-serif; font-size: clamp(32px, 7vw, 46px); background: linear-gradient(90deg, #6b4cff, #ff4772); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fl-card .wn-list li { animation: cs-pop .4s both; }

.verified.is-pro { background: linear-gradient(135deg, #ffe45c, #ffb21f 60%, #e08a00); box-shadow: 0 0 0 2px #fff6 inset, 0 0 8px #ffcd1f99; color: #5a3300; }

/* --------------------------------------------------------------------- pro */
.btn-gold { background: linear-gradient(135deg, #ffe45c, #ffb21f); color: #5a3300; box-shadow: 0 4px 0 #d98c00; }
.side-pro { color: #ffe45c !important; }
.mode-opt { position: relative; }
.mode-opt.is-pro-only { filter: saturate(.55); }
.pro-tag { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 99px;
  background: linear-gradient(135deg, #ffe45c, #ffb21f); color: #5a3300; font-weight: 900; font-size: 11px; }
.pro-hero { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 34px 20px; border-radius: 28px; color: #fff;
  background: radial-gradient(circle at 50% 0, #ffcd1f55, transparent 60%), linear-gradient(160deg, #2a1580, var(--night)); box-shadow: 0 0 0 3px #ffcd1f; }
.pro-hero h1 { margin: 0; color: #fff; font-family: 'Bricolage Grotesque', sans-serif; font-size: clamp(36px, 7vw, 58px);
  background: linear-gradient(90deg, #ffe45c, #ffb21f, #ffe45c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pro-hero p { margin: 0; max-width: 560px; font-weight: 700; opacity: .9; }
.pro-hero-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 6px; border-radius: 99px; background: #ffffff1a; font-weight: 900; letter-spacing: 2px; color: #ffe45c; }
.pro-hero-badge .verified { transform: scale(1.3); }
.pro-price { display: grid; justify-items: center; gap: 6px; margin-top: 6px; }
.pro-price > b { font-family: 'Bricolage Grotesque', sans-serif; font-size: 48px; color: #ffe45c; line-height: 1; }
.pro-price > span { font-weight: 800; opacity: .85; margin-top: -4px; }
.pro-price small { opacity: .8; font-weight: 700; }
.pro-member { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 99px; background: #ffcd1f; color: #3a2000; font-weight: 900; }
.pro-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; align-items: start; }
.pro-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pro-list li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; background: #fff8e1; }
.pro-list.is-free li { background: #f5f3ff; }
.pro-list li.is-soon { opacity: .75; }
.pro-list b { display: block; }
.pro-list small { color: var(--ink-2); font-weight: 700; }
.pro-ic { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: linear-gradient(135deg, #ffe45c, #ffb21f); color: #5a3300; }
.pro-list.is-free .pro-ic { background: var(--violet); color: #fff; }
.letter { display: grid; gap: 12px; padding: 10px 6px; font-size: 17px; line-height: 1.55; background: repeating-linear-gradient(#fff, #fff 30px, #f1eefc 31px); }
.letter p { margin: 0; }
.letter-seal { justify-self: center; width: 70px; animation: cs-zap .9s both; }
.letter-seal .logo-mark { width: 70px; height: 70px; }
.letter-to { font-weight: 900; font-size: 20px; }
.letter-sign { text-align: right; }
.pro-trial { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 99px; background: #19c37d; color: #fff; font-weight: 900; }

/* -------------------------------------------------------- question videos */
.q-video { position: relative; width: min(900px, 100%); margin: 8px auto; display: grid; gap: 4px; justify-items: center; }
.q-video iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 18px; background: #000; box-shadow: 0 8px 0 #0003; }
.q-video-time { font-weight: 800; opacity: .7; }
.q-video.is-small { width: min(420px, 100%); }
.video-edit { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.video-edit .q-video { margin: 0; width: 220px; }
.together-note { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; background: #eef7ff; color: #0f4c8a; font-weight: 800; }

/* --------------------------------------------------------------- countdown */
.count-bar { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px; padding: 8px 16px; color: #fff; position: relative; z-index: 2;
  background: linear-gradient(90deg, #17133f, #6b4cff, #ff4772, #17133f); background-size: 300% 100%; animation: event-slide 8s linear infinite; }
.count-bar[hidden] { display: none !important; }
.count-title { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 400; font-size: 1.15rem; letter-spacing: .5px; }
.count-cells { display: inline-flex; gap: 6px; }
.count-cell { display: inline-grid; justify-items: center; min-width: 46px; padding: 3px 6px; border-radius: 10px; background: #ffffff22; }
.count-cell[hidden] { display: none; }
.count-cell b { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 400; font-size: 1.3rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.count-cell small { font-size: 10px; font-weight: 900; text-transform: uppercase; opacity: .8; }
.count-bar.is-done { background: linear-gradient(90deg, #ffcd1f, #ff8a2a, #ffcd1f); color: #17133f; }

/* Sky Race */
.pro-tag.is-soon { background: #17133f; color: #fff; }
.pro-tag.is-new { background: #12c9a6; color: #fff; }
.sr-bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(23, 19, 63, .55)); z-index: 3; }
.sr-charge { display: flex; flex-direction: column; align-items: center; gap: 4px; color: #fff; font-weight: 800; font-size: 13px; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.sr-pips { display: flex; gap: 6px; }
.sr-pips i { width: 18px; height: 18px; border-radius: 50%; background: rgba(255,255,255,.3); border: 2px solid #fff; transition: transform .2s, background .2s; }
.sr-pips i.is-on { background: #ffcd1f; transform: scale(1.15); }
.sr-boost { font-family: 'Bricolage Grotesque', system-ui; font-size: 26px; letter-spacing: 1px; padding: 14px 34px; border-radius: 18px; background: #4a5068; color: #fff; border: none; }
.sr-boost.is-ready { background: linear-gradient(140deg, #ff8a2a, #ff4772); box-shadow: 0 6px 0 #b5121b, 0 0 24px rgba(255, 138, 42, .8); animation: sr-pulse .7s ease-in-out infinite alternate; }
.sr-boost:disabled { opacity: .6; }
@keyframes sr-pulse { to { transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .sr-boost.is-ready { animation: none; } }

/* Quickzy 1.2 film */
.f12-root { position: fixed; inset: 0; z-index: 1000; background: #f4c79a; overflow: hidden; color: #fff; transition: opacity .4s; }
.f12-root.f12-out { opacity: 0; }
.f12-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.f12-bars::before, .f12-bars::after { content: ''; position: absolute; left: 0; right: 0; height: 9vh; background: #000; z-index: 2; pointer-events: none; }
.f12-bars::before { top: 0; } .f12-bars::after { bottom: 0; }
.f12-load { position: absolute; inset: 0; display: none; place-content: center; justify-items: center; gap: 14px; background: #17133f; font-weight: 800; z-index: 5; }
.f12-load .logo-mark { width: 80px; height: 80px; animation: sr-pulse .8s ease-in-out infinite alternate; }
.f12-root.is-loading .f12-load { display: grid; }
.f12-skip { position: absolute; top: calc(9vh + 12px); right: 16px; z-index: 7; }
.f12-caption { position: absolute; left: 0; right: 0; bottom: calc(9vh + 22px); text-align: center; z-index: 4; pointer-events: none; padding: 0 16px; }
.f12-caption span { display: inline-block; padding: 8px 18px; border-radius: 12px; background: rgba(0,0,0,.45); font: 400 clamp(18px, 3.4vw, 30px) 'Bricolage Grotesque', system-ui; letter-spacing: .5px; animation: f12-in .4s both; }
.f12-caption.is-alert span { background: rgba(200, 20, 40, .85); }
.f12-caption.is-good span { background: rgba(18, 160, 120, .85); }
.f12-caption.is-boost span { background: linear-gradient(140deg, #ff8a2a, #ff4772); font-size: clamp(30px, 7vw, 64px); }
.f12-root.is-alert::after { content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none; box-shadow: inset 0 0 120px 20px rgba(255, 30, 50, .55); animation: f12-alarm .5s ease-in-out infinite alternate; }
.f12-hud { position: absolute; top: calc(9vh + 18px); left: 0; right: 0; display: grid; justify-items: center; gap: 6px; z-index: 4; pointer-events: none; }
.f12-pips { display: flex; gap: 10px; }
.f12-pips i { width: 26px; height: 26px; border-radius: 50%; border: 3px solid #fff; background: rgba(0,0,0,.3); transition: transform .25s, background .25s; }
.f12-pips i.is-on { background: #ffcd1f; transform: scale(1.2); }
.f12-right { font: 400 22px 'Bricolage Grotesque', system-ui; color: #9bffcf; text-shadow: 0 2px 6px rgba(0,0,0,.5); animation: f12-in .3s both; }
.f12-boost { position: absolute; left: 50%; top: 58%; transform: translate(-50%, -50%); z-index: 6; border: none; cursor: pointer; color: #fff;
  font: 400 clamp(34px, 8vw, 72px) 'Bricolage Grotesque', system-ui; padding: 18px 54px; border-radius: 26px;
  background: linear-gradient(140deg, #ff8a2a, #ff4772); box-shadow: 0 10px 0 #b5121b, 0 0 60px rgba(255, 138, 42, .9); animation: f12-boost .6s ease-in-out infinite alternate; }
.f12-flash { position: absolute; inset: 0; background: #fff; opacity: 0; z-index: 3; pointer-events: none; }
.f12-flash.is-on { animation: f12-flash .7s ease-out; }
.f12-title { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; z-index: 4; pointer-events: none; opacity: 0; transition: opacity 1s, transform 1.4s; transform: scale(1.15); }
.f12-title.is-on { opacity: 1; transform: none; }
.f12-title small { font: 800 clamp(14px, 2.4vw, 22px) Figtree, system-ui; letter-spacing: 6px; text-transform: uppercase; text-shadow: 0 2px 10px rgba(0,0,0,.4); }
.f12-title h1 { margin: 0; font: 400 clamp(56px, 14vw, 150px) 'Bricolage Grotesque', system-ui; letter-spacing: 4px; line-height: 1;
  background: linear-gradient(180deg, #fff 30%, #ffd27a); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 6px 18px rgba(80, 30, 0, .55)); }
.f12-title p { margin: 6px 0 0; font-weight: 800; font-size: clamp(14px, 2.4vw, 22px); text-shadow: 0 2px 8px rgba(0,0,0,.5); }
.f12-card { z-index: 8; }
@keyframes f12-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes f12-alarm { from { opacity: .4; } to { opacity: 1; } }
@keyframes f12-boost { to { transform: translate(-50%, -50%) scale(1.1); } }
@keyframes f12-flash { 0% { opacity: .9; } 100% { opacity: 0; } }

/* Pro games: Treasure Hunt, Fishing Frenzy, Candy Factory */
.th-root, .cf-root { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 16px; text-align: center; overflow-y: auto;
  background: radial-gradient(circle at 50% 30%, #ffe9a8, #c98a3c 70%, #6b4120); color: #3a2209; }
.th-title { margin: 0; font: 400 clamp(28px, 6vw, 44px) 'Bricolage Grotesque', system-ui; color: #fff; text-shadow: 0 3px 0 #6b4120; }
.th-status { margin: 0; font-weight: 900; font-size: 18px; }
.th-chests { display: flex; gap: clamp(10px, 3vw, 28px); }
.th-chest { position: relative; width: clamp(84px, 24vw, 140px); height: clamp(76px, 21vw, 120px); border: none; background: none; cursor: pointer; padding: 0; transition: transform .15s; }
.th-chest:not(:disabled):hover { transform: translateY(-6px) scale(1.04); }
.th-chest:disabled { cursor: default; filter: saturate(.75); }
.th-box { position: absolute; left: 0; right: 0; bottom: 0; height: 58%; border-radius: 10px; background: linear-gradient(#a8703c, #6b4120); border: 4px solid #3a2209; box-shadow: inset 0 0 0 4px #ffcd1f; }
.th-lid { position: absolute; left: 0; right: 0; top: 6%; height: 40%; border-radius: 40px 40px 8px 8px; background: linear-gradient(#c98a5a, #8a5a2b); border: 4px solid #3a2209; box-shadow: inset 0 -6px 0 #ffcd1f; transform-origin: 50% 100%; transition: transform .35s cubic-bezier(.3, 1.6, .5, 1); z-index: 1; }
.th-chest.is-open .th-lid { transform: rotate(-28deg) translate(-8px, -18px); }
.th-chest.is-shaking { animation: th-shake .12s linear infinite; }
.th-prize { position: absolute; left: 50%; top: -34%; transform: translateX(-50%); z-index: 2; font: 400 clamp(22px, 5vw, 34px) 'Bricolage Grotesque', system-ui; color: #ffe45c; text-shadow: 0 3px 0 #3a2209, 0 0 18px rgba(255, 220, 80, .9); animation: th-pop .5s cubic-bezier(.3, 1.8, .5, 1) both; white-space: nowrap; }
.th-chest.is-lose .th-prize, .th-chest.is-none .th-prize { color: #ffd0d8; }
.th-pick { background: rgba(255, 255, 255, .9); border-radius: 18px; padding: 14px; display: grid; gap: 10px; max-width: 520px; }
.th-pick-list { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.th-target { display: grid; justify-items: center; gap: 2px; padding: 8px 12px; border-radius: 14px; border: 3px solid #ffcd1f; background: #fff; cursor: pointer; font-weight: 800; }
.th-target:hover { background: #fff6d6; }
.th-screen { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 12px; padding: 20px; background: radial-gradient(circle at 50% 0, #ffe9a8, #8a5a2b); color: #3a2209; }
.th-screen h2 { margin: 0; text-align: center; font: 400 40px 'Bricolage Grotesque', system-ui; color: #fff; text-shadow: 0 3px 0 #3a2209; }
.fi-screen { background: linear-gradient(#ffb86b, #2fb8ff 40%, #0b3a7a); }
.cf-screen { background: linear-gradient(140deg, #ff8fb1, #a560ff); }
.th-board { display: grid; gap: 8px; }
.th-bar { display: flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, .88); border-radius: 14px; padding: 6px 14px; font-weight: 900; }
.th-bar-track { flex: 0 1 40%; height: 14px; border-radius: 99px; background: rgba(0, 0, 0, .1); overflow: hidden; }
.th-bar-track i { display: block; height: 100%; background: linear-gradient(90deg, #ffcd1f, #ff8a2a); border-radius: 99px; transition: width .5s; }
.th-gold { min-width: 80px; text-align: right; }
.th-feed { margin-top: auto; display: grid; gap: 4px; }
.th-feed p { margin: 0; padding: 6px 12px; border-radius: 10px; background: rgba(23, 19, 63, .75); color: #fff; font-weight: 800; animation: f12-in .4s both; }
@keyframes th-shake { 0% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } 100% { transform: rotate(-4deg); } }
@keyframes th-pop { from { transform: translate(-50%, 30px) scale(.4); opacity: 0; } }
.fi-ui { position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 12px; align-items: center; justify-content: center; padding: 12px; z-index: 2; }
.fi-info { color: #fff; font-weight: 900; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.fi-btn.is-reel { background: linear-gradient(140deg, #ff8a2a, #ff4772); animation: sr-pulse .4s ease-in-out infinite alternate; }
.cf-root { justify-content: flex-start; background: linear-gradient(160deg, #ffe0ec, #e6d6ff); color: #17133f; }
.cf-top { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; justify-content: center; }
.cf-top h2 { margin: 0; font: 400 32px 'Bricolage Grotesque', system-ui; color: #ff4772; }
.cf-cash { font: 400 30px 'Bricolage Grotesque', system-ui; color: #12a37f; }
.cf-belt { position: relative; width: min(560px, 100%); height: 46px; border-radius: 12px; background: repeating-linear-gradient(90deg, #4e4a75 0 14px, #3a365c 14px 28px); overflow: hidden; }
.cf-belt.is-on { animation: cf-belt 1s linear infinite; }
.cf-belt i { position: absolute; top: 10px; left: -30px; width: 26px; height: 26px; border-radius: 50%; border: 3px solid #fff; animation: cf-move 4.2s linear infinite; }
.cf-shop { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; width: min(760px, 100%); }
.cf-machine { position: relative; display: grid; gap: 2px; justify-items: start; text-align: left; padding: 12px; border-radius: 16px; border: 3px solid var(--c); background: #fff; cursor: pointer; font-family: inherit; color: inherit; }
.cf-machine:disabled { opacity: .55; cursor: default; }
.cf-machine.is-bought { animation: th-pop .4s both; }
.cf-icon { width: 30px; height: 30px; border-radius: 50%; background: var(--c); }
.cf-cost { position: absolute; top: 10px; right: 10px; font-weight: 900; color: #12a37f; }
@keyframes cf-belt { to { background-position: 28px 0; } }
@keyframes cf-move { to { left: calc(100% + 30px); } }

/* Invites */
.invite-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; background: linear-gradient(135deg, #fff0f5, #f1ecff); border: 2px solid #ffc2d6; color: #17133f; text-align: left; }
.invite-card b { display: block; }
.invite-card small { display: block; color: #5b5680; font-weight: 700; }
.invite-card.is-compact { max-width: 460px; margin: 6px auto; }
@media (max-width: 480px) { .invite-card { flex-wrap: wrap; justify-content: center; text-align: center; } }

/* Teachers */
.tch-hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: center; padding: 30px; border-radius: 28px; color: #fff;
  background: linear-gradient(135deg, #6b4cff, #4a2fd6 55%, #ff4772); }
.tch-hero h1 { margin: 10px 0; font: 400 clamp(30px, 5vw, 48px) 'Bricolage Grotesque', system-ui; line-height: 1.05; }
.tch-hero p { font-weight: 700; opacity: .95; }
.tch-hero .pill { background: rgba(255,255,255,.2); color: #fff; }
.tch-hero-art { display: grid; justify-items: center; gap: 14px; }
.tch-screen { display: grid; justify-items: center; gap: 2px; padding: 16px 26px; border-radius: 18px; background: #fff; color: #17133f; box-shadow: 0 10px 0 rgba(0,0,0,.15); }
.tch-screen .logo-mark { width: 44px; height: 44px; }
.tch-screen b { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: #6b6890; }
.tch-screen span { font: 400 34px 'Bricolage Grotesque', system-ui; letter-spacing: 2px; }
.tch-kids { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.tch-kids > * { animation: sr-pulse .9s ease-in-out infinite alternate; }
.tch-kids > *:nth-child(2n) { animation-delay: .3s; }
.tch-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.tch-step { display: flex; gap: 12px; padding: 16px; border-radius: 18px; background: var(--card, #fff); border: 2px solid var(--line); }
.tch-step p, .tch-card p { margin: 4px 0 0; color: var(--muted, #6b6890); font-weight: 600; font-size: 14px; }
.tch-num { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #6b4cff; color: #fff; font: 400 18px 'Bricolage Grotesque', system-ui; }
.tch-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.tch-card { padding: 18px; border-radius: 18px; background: var(--card, #fff); border: 2px solid var(--line); animation: f12-in .4s both; }
.tch-ic { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: #efeaff; color: #6b4cff; margin-bottom: 8px; }
.tch-cta { text-align: center; padding: 30px 20px; border-radius: 28px; background: linear-gradient(135deg, #ffcd1f, #ff8a2a); color: #3a2209; }
.tch-cta h2 { margin: 0 0 6px; font: 400 32px 'Bricolage Grotesque', system-ui; }
@media (max-width: 760px) { .tch-hero { grid-template-columns: 1fr; padding: 22px; } }

/* Profiles (1.2): banner, emblem, stats, tabs, achievements */
.bn { position: absolute; inset: 0; overflow: hidden; }
.bn-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.bn-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bn-drift { animation: bn-drift 9s ease-in-out infinite alternate; animation-delay: calc(var(--d) * -1.3s); }
.bn-twinkle { animation: bn-twinkle 2.4s ease-in-out infinite; animation-delay: calc(var(--d) * -0.35s); }
.bn-bob { animation: bn-bob 3s ease-in-out infinite alternate; animation-delay: calc(var(--d) * -0.6s); }
@keyframes bn-drift { to { transform: translateX(40px); } }
@keyframes bn-twinkle { 50% { opacity: .2; } }
@keyframes bn-bob { to { transform: translateY(-14px); } }
.bn-parade { position: absolute; left: 0; bottom: 6px; display: flex; gap: 14px; width: max-content; animation: bn-parade 28s linear infinite; }
.bn-parade span { animation: bn-hop .7s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -.12s); }
@keyframes bn-parade { to { transform: translateX(-50%); } }
@keyframes bn-hop { to { transform: translateY(-8px); } }
.bn-sparkles i { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #fff; left: calc(var(--i) * 5.5%); top: calc(10% + (var(--i) * 37 % 60) * 1%); box-shadow: 0 0 10px #fff; animation: bn-twinkle 1.8s ease-in-out infinite; animation-delay: calc(var(--i) * -.2s); }
.emblem { display: inline-grid; grid-template-columns: auto auto; grid-template-rows: auto auto; align-items: center; column-gap: 6px; padding: 4px 12px 4px 6px; border-radius: 10px; line-height: 1; position: relative; clip-path: polygon(0 0, 100% 0, 92% 50%, 100% 100%, 0 100%); }
.emblem-mark { grid-row: span 2; width: 28px; height: 28px; display: grid; place-items: center; }
.emblem-mark .logo-mark { width: 28px; height: 28px; }
.emblem b { font-size: 12px; letter-spacing: 1.5px; }
.emblem small { font-size: 10px; font-weight: 800; opacity: .85; }
.emblem-owner { background: linear-gradient(135deg, #ffe45c, #ffb21f); color: #5a3300; box-shadow: 0 3px 0 #b5860b; animation: emblem-shine 3s ease-in-out infinite; }
.emblem-official { background: #17133f; color: #fff; }
.emblem-pro { background: linear-gradient(135deg, #ffe45c, #ffb21f); color: #5a3300; padding-left: 12px; grid-template-columns: auto; }
@keyframes emblem-shine { 50% { filter: brightness(1.15) drop-shadow(0 0 8px #ffd34d); } }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.ach { display: grid; justify-items: center; gap: 4px; text-align: center; padding: 16px 12px; border-radius: 18px; background: var(--card); border: 2px solid var(--line); opacity: .55; filter: grayscale(1); animation: f12-in .4s both; }
.ach.is-done { opacity: 1; filter: none; border-color: var(--c); }
.ach-medal { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; color: #fff; background: var(--c); box-shadow: 0 4px 0 #0002; }
.ach.is-done .ach-medal { animation: bn-hop .9s ease-in-out infinite alternate; }
.ach small { color: var(--ink-2); font-weight: 700; }
.about-bio { font-size: 18px; font-weight: 700; margin: 0; }
.about-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.about-facts > div { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.banner-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.banner-pick button { position: relative; height: 56px; border-radius: 12px; overflow: hidden; border: 3px solid transparent; cursor: pointer; padding: 0; }
.banner-pick button.is-on { border-color: #6b4cff; box-shadow: 0 0 0 3px #6b4cff44; }
.banner-pick span { position: absolute; left: 6px; bottom: 4px; color: #fff; font-weight: 900; font-size: 11px; text-shadow: 0 1px 3px #0008; }
@media (prefers-reduced-motion: reduce) { .bn-parade, .bn-drift, .bn-bob, .bn-twinkle, .bn-owner { animation: none; } }
.quiz-cover .cover-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.quiz-cover.has-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, #0009); pointer-events: none; }
.quiz-cover.has-photo .cover-title, .quiz-cover.has-photo .count { z-index: 1; }
.quiz-cover.has-photo .cover-title { text-shadow: 0 2px 8px #000a; }
/* Discover (1.2) */
.hero-carousel { position: relative; overflow: hidden; border-radius: 26px; height: clamp(240px, 38vw, 360px); background: #17133f; }
.hero-track { display: flex; height: 100%; transition: transform .6s cubic-bezier(.3, .8, .3, 1); }
.hero-slide { position: relative; flex: 0 0 100%; height: 100%; cursor: pointer; overflow: hidden; }
.hero-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform 6s ease; }
.hero-slide:hover img { transform: scale(1.1); }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, #17133fe6 0%, #17133f99 45%, transparent 75%); }
.hero-text { position: absolute; left: clamp(18px, 4vw, 44px); top: 50%; transform: translateY(-50%); max-width: min(520px, 80%); color: #fff; display: grid; gap: 8px; justify-items: start; }
.hero-text .pill { background: #ffcd1f; color: #5a3300; display: inline-flex; gap: 4px; align-items: center; }
.hero-text h2 { margin: 0; font: 400 clamp(26px, 4.4vw, 46px) 'Bricolage Grotesque', system-ui; line-height: 1.05; text-shadow: 0 3px 12px #0008; }
.hero-text p { margin: 0; font-weight: 700; opacity: .92; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero-meta { font-weight: 800; font-size: 13px; opacity: .85; }
.hero-arrow { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: none; background: #ffffffd9; color: #17133f; display: grid; place-items: center; cursor: pointer; }
.hero-arrow.is-left { right: auto; left: 12px; transform: translateY(-50%) rotate(180deg); }
.hero-dots { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.hero-dots button { width: 10px; height: 10px; border-radius: 99px; border: none; background: #ffffff80; cursor: pointer; padding: 0; transition: width .3s; }
.hero-dots button.is-on { width: 28px; background: #fff; }
.shelf-more { margin-left: 6px; }
@media (max-width: 640px) {
  .hero-arrow { display: none; }
  .hero-shade { background: linear-gradient(180deg, transparent 20%, #17133fee 85%); }
  .hero-text { top: auto; bottom: 30px; transform: none; max-width: calc(100% - 36px); }
  .hero-text p { display: none; }
}
/* Box opening: the reveal (1.2) */
.ub-card { position: relative; transform-style: preserve-3d; transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .12s ease-out;
  animation: ub-flipin 1s cubic-bezier(.2, 1.3, .4, 1) backwards; box-shadow: 0 0 0 4px var(--rc), 0 0 50px var(--rc), 0 20px 40px #0006; }
@keyframes ub-flipin { 0% { transform: perspective(900px) rotateY(720deg) scale(.15) translateY(80px); filter: brightness(4); } 65% { transform: perspective(900px) rotateY(-14deg) scale(1.12); filter: brightness(1.4); } 100% { transform: perspective(900px) rotateY(0) scale(1); filter: none; } }
.ub-holo { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; mix-blend-mode: color-dodge; opacity: .65;
  background: linear-gradient(115deg, transparent 32%, rgba(255,255,255,.75) 46%, transparent 58%), conic-gradient(from var(--hx, 0deg) at 50% 50%, #ff477299, #ffcd1f99, #12c9a699, #2f9bff99, #a560ff99, #ff477299);
  background-size: 260% 100%, 100% 100%; animation: ub-sweep 2.6s ease-in-out infinite; }
@keyframes ub-sweep { 0% { background-position: 120% 0, 0 0; } 100% { background-position: -120% 0, 0 0; } }
.ub-card-legendary .ub-holo { opacity: .9; }
.ub-beams { position: absolute; left: 50%; top: 42%; width: 0; height: 0; pointer-events: none; z-index: 0; animation: spin-slow 14s linear infinite; }
.ub-beams i { position: absolute; left: -30px; top: 0; width: 60px; height: 70vmax; transform-origin: 50% 0; transform: rotate(calc(var(--k) * 30deg));
  background: linear-gradient(var(--rc), transparent 70%); opacity: .28; clip-path: polygon(40% 0, 60% 0, 100% 100%, 0 100%); }
.ub-stars i { position: absolute; width: 10px; height: 10px; left: calc(8% + var(--k) * 5.6%); top: calc(12% + (var(--k) * 41 % 70) * 1%); background: #fff; pointer-events: none;
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); animation: ub-twinkle 1.6s ease-in-out infinite; animation-delay: calc(var(--k) * -.17s); }
@keyframes ub-twinkle { 0%, 100% { transform: scale(.3) rotate(0); opacity: .3; } 50% { transform: scale(1.4) rotate(90deg); opacity: 1; } }
.ub-revealed .ub-stage, .ub-revealed .ub-result { position: relative; z-index: 2; }
.ub-result { animation: f12-in .5s .5s both; }
.ub-rarity { font-family: 'Bricolage Grotesque', system-ui; font-size: clamp(34px, 7vw, 56px); text-shadow: 0 4px 0 #0003, 0 0 24px currentColor; animation: th-pop .6s .35s cubic-bezier(.3, 1.8, .5, 1) both; }
@media (prefers-reduced-motion: reduce) { .ub-card, .ub-holo, .ub-beams, .ub-stars i { animation: none; } }
/* Homework */
.hw-head { display: grid; grid-template-columns: minmax(0, 340px) 1fr; gap: 20px; align-items: center; background: var(--card); border-radius: 24px; padding: 16px; box-shadow: 0 6px 0 #0000000f; }
.hw-head .quiz-cover { border-radius: 16px; }
.hw-info { display: grid; gap: 8px; justify-items: start; }
.hw-info h1 { margin: 0; font: 400 clamp(26px, 4vw, 38px) 'Bricolage Grotesque', system-ui; }
.hw-due { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 14px; background: #e8fff6; color: #0b7a5a; }
.hw-due.is-closed { background: #ffe8ec; color: #b5121b; }
.hw-due small { font-weight: 700; opacity: .8; }
.hw-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.hw-stats > div { background: var(--card); border-radius: 18px; padding: 16px; text-align: center; display: grid; box-shadow: 0 4px 0 #0000000d; }
.hw-stats b { font: 400 32px 'Bricolage Grotesque', system-ui; color: #6b4cff; }
.hw-stats small { font-weight: 800; color: var(--ink-2); }
.hw-row { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.hw-row small { display: block; }
.hw-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: #efeaff; color: #6b4cff; }
.hw-hero { background: linear-gradient(135deg, #12c9a6, #2f9bff); }
@media (max-width: 640px) { .hw-head { grid-template-columns: 1fr; } .hw-stats b { font-size: 24px; } }
/* Presentation+ */
.pres-badge { display: inline-block; padding: 4px 12px; border-radius: 99px; font-weight: 900; font-size: 12px; letter-spacing: 1px; color: #5a3300; background: linear-gradient(135deg, #ffe45c, #ffb21f); box-shadow: 0 2px 0 #b5860b; }
.pres-hero { display: grid; justify-items: start; gap: 10px; padding: 30px; border-radius: 28px; color: #fff; background: radial-gradient(circle at 85% 20%, #ff477266, transparent 40%), linear-gradient(135deg, #17133f, #3a2399 60%, #6b4cff); }
.pres-hero h1 { margin: 0; font: 400 clamp(30px, 5vw, 50px) 'Bricolage Grotesque', system-ui; }
.pres-hero p { margin: 0; max-width: 620px; font-weight: 700; opacity: .9; }
.pres-upsell { justify-items: center; }
.pres-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.pres-card { display: grid; gap: 6px; padding: 10px; border-radius: 20px; background: var(--card); text-decoration: none; color: inherit; box-shadow: 0 4px 0 #0000000f; transition: transform .15s; }
.pres-card:hover { transform: translateY(-4px); }
.pres-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; container-type: inline-size; }
.pres-thumb .slide { position: absolute; inset: 0; font-size: 4.2cqw; }
.slide { position: relative; width: 100%; height: 100%; color: #fff; display: grid; align-content: center; padding: 6% 7%; box-sizing: border-box; overflow: hidden; font-size: clamp(14px, 2.2vw, 30px); }
.slide h1 { font: 400 3.2em 'Bricolage Grotesque', system-ui; margin: 0; line-height: 1.05; }
.slide h2 { font: 400 2em 'Bricolage Grotesque', system-ui; margin: 0 0 .5em; line-height: 1.1; }
.sl-title { text-align: center; } .sl-title p { font-size: 1.2em; font-weight: 800; opacity: .9; margin: .4em 0 0; }
.sl-content { display: grid; gap: 4%; align-items: center; } .sl-content.has-img { grid-template-columns: 1.2fr 1fr; }
.sl-content ul { margin: 0; padding-left: 1.1em; font-weight: 800; font-size: 1.1em; line-height: 1.5; }
.sl-content img { width: 100%; max-height: 70%; object-fit: cover; border-radius: .6em; box-shadow: 0 .3em 1em #0005; }
.sl-q { text-align: center; }
.sl-bars { display: flex; gap: 3%; align-items: flex-end; height: 55%; }
.sl-bar { flex: 1; display: grid; grid-template-rows: 1fr auto; gap: .3em; height: 100%; transition: opacity .3s; }
.sl-bar.is-wrong { opacity: .4; }
.sl-bar-track { display: flex; align-items: flex-end; background: #ffffff1f; border-radius: .4em; }
.sl-bar-track i { display: grid; place-items: start center; width: 100%; min-height: 1.6em; border-radius: .4em; transition: height .5s cubic-bezier(.3, 1.4, .5, 1); }
.sl-bar-track b { font: 400 1.1em 'Bricolage Grotesque', system-ui; padding-top: .2em; }
.sl-bar > span { display: flex; justify-content: center; align-items: center; gap: .3em; padding: .4em; border-radius: .4em; font-weight: 900; text-align: center; font-size: .8em; }
.sl-bar.is-right > span { box-shadow: 0 0 0 .2em #fff, 0 0 1em #fff; }
.sl-guess { position: relative; height: 50%; margin: 0 2%; }
.sl-hist { display: flex; align-items: flex-end; gap: 2px; height: 85%; border-bottom: .15em solid #fffa; }
.sl-hist i { flex: 1; background: #ffffffb3; border-radius: .2em .2em 0 0; transition: height .5s; min-height: 2px; }
.sl-axis { display: flex; justify-content: space-between; font-weight: 900; font-size: .8em; margin-top: .3em; }
.sl-mark { position: absolute; top: -6%; bottom: 10%; width: .2em; transform: translateX(-50%); }
.sl-mark small { position: absolute; top: -1.6em; left: 50%; transform: translateX(-50%); white-space: nowrap; padding: .15em .5em; border-radius: .4em; font-weight: 900; font-size: .7em; }
.sl-mark.is-avg { background: #ffcd1f; } .sl-mark.is-avg small { background: #ffcd1f; color: #3a2209; }
.sl-mark.is-ans { background: #12c9a6; animation: th-pop .5s both; } .sl-mark.is-ans small { background: #12c9a6; top: auto; bottom: -1.8em; }
.sl-pin { position: absolute; top: 3%; right: 3%; display: grid; justify-items: center; padding: .4em .9em; border-radius: .6em; background: #fff; color: #17133f; font-size: .6em; }
.sl-pin b { font: 400 2em 'Bricolage Grotesque', system-ui; letter-spacing: .1em; }
.pres-editor { max-width: 1400px; }
.pres-top { margin-bottom: 14px; gap: 10px; } .pres-title { font-weight: 900; font-size: 20px; max-width: 420px; }
.pres-layout { display: grid; grid-template-columns: 220px 1fr; gap: 16px; align-items: start; }
.pres-rail { display: grid; gap: 8px; max-height: 80vh; overflow-y: auto; padding-right: 4px; }
.pres-mini { display: grid; grid-template-columns: 18px 1fr; gap: 6px; align-items: start; padding: 4px; border-radius: 12px; border: 3px solid transparent; background: none; cursor: pointer; font-weight: 900; color: var(--ink-2); }
.pres-mini.is-on { border-color: #6b4cff; }
.pres-add { display: flex; flex-wrap: wrap; gap: 4px; padding-top: 6px; border-top: 2px dashed var(--line); }
.pres-preview { aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; box-shadow: 0 8px 24px #0002; container-type: inline-size; }
.pres-preview .slide { font-size: 2.4cqw; }
.pres-bg { width: 40px; height: 28px; border-radius: 8px; border: 3px solid transparent; cursor: pointer; } .pres-bg.is-on { border-color: #17133f; }
.pres-live { position: fixed; inset: 0; background: #0b0920; display: grid; grid-template-rows: 1fr auto; }
.pres-stage { display: grid; place-items: center; padding: 1vmin; overflow: hidden; container-type: size; }
.pres-stage .slide { width: min(100cqw, 177.7cqh); height: min(56.25cqw, 100cqh); border-radius: 1vmin; font-size: min(2.3cqw, 4cqh); }
.pres-controls { display: flex; justify-content: center; align-items: center; gap: 8px; padding: 10px; background: #17133f; flex-wrap: wrap; }
.pres-count { color: #fff; font-weight: 900; min-width: 60px; text-align: center; }
.aud { min-height: 100dvh; display: grid; grid-template-rows: auto 1fr; background: linear-gradient(160deg, #17133f, #3a2399); color: #fff; }
.aud-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; background: #0003; }
.aud-box { display: grid; align-content: center; justify-items: center; gap: 16px; padding: 20px 16px; text-align: center; }
.aud-box h2 { margin: 0; font: 400 clamp(24px, 6vw, 36px) 'Bricolage Grotesque', system-ui; }
.aud-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: min(560px, 100%); }
.aud-opt { min-height: 90px; border: none; border-radius: 18px; color: #fff; font: 900 18px Figtree, system-ui; padding: 12px; cursor: pointer; box-shadow: 0 6px 0 #0004; transition: transform .1s; }
.aud-opt:active { transform: translateY(4px); box-shadow: 0 2px 0 #0004; }
.aud-opt:disabled { opacity: .55; } .aud-opt.is-mine { opacity: 1; outline: 4px solid #fff; }
.aud-opt.is-right { opacity: 1; outline: 4px solid #12c9a6; } .aud-opt.is-wrong:not(.is-mine) { opacity: .3; }
.aud-num { font: 400 64px 'Bricolage Grotesque', system-ui; }
.aud-range { width: min(520px, 100%); accent-color: #ffcd1f; height: 40px; }
.aud-sent { font-weight: 900; font-size: 18px; }
.aud-look { display: grid; justify-items: center; gap: 10px; } .aud-look .logo-mark { width: 80px; height: 80px; }
@media (max-width: 760px) { .pres-layout { grid-template-columns: 1fr; } .pres-rail { grid-auto-flow: column; grid-auto-columns: 150px; max-height: none; overflow-x: auto; } .sl-content.has-img { grid-template-columns: 1fr; } }
.sl-bars { height: 9em; } .sl-guess { height: 7em; margin-top: 1.4em; }
.pres-controls .btn-ghost { color: #fff; }
.sl-full { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #0b0920; }
.pres-note { opacity: .8; font-weight: 700; }
.pres-tip { display: flex; align-items: center; gap: 6px; margin: 0 0 12px; color: var(--ink-2); font-weight: 800; }
.slide .sl-full { position: absolute; inset: 0; width: 100%; height: 100% !important; max-height: none; object-fit: cover; border-radius: 0; box-shadow: none; }
.install-steps { text-align: left; display: grid; gap: 8px; font-weight: 700; margin: 0; padding-left: 22px; }
.install-steps svg { vertical-align: middle; }
.install-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: var(--night); color: #fff; }
.install-card small { display: block; opacity: .8; font-weight: 700; }

/* Dark mode (Settings → Theme) */
:root[data-theme="dark"] {
  --bg: #0d0b24;
  --card: #1a1640;
  --ink: #f1efff;
  --ink-2: #c3bfe6;
  --muted: #8f8ab8;
  --line: #2c2660;
  --line-2: #3a3375;
  --shadow: 0 2px 0 rgba(0, 0, 0, 0.3), 0 12px 30px -18px rgba(0, 0, 0, 0.8);
  color-scheme: dark;
}
:root[data-theme="dark"] body { background: var(--bg); color: var(--ink); }
:root[data-theme="dark"] .input, :root[data-theme="dark"] .textarea, :root[data-theme="dark"] select { background: #120f33; color: var(--ink); border-color: var(--line-2); }
:root[data-theme="dark"] .btn:not(.btn-main):not(.btn-dark):not(.btn-violet):not(.btn-ok):not(.btn-gold):not(.btn-ghost) { background: #262058; color: var(--ink); box-shadow: 0 var(--press) 0 #0b0920; }
:root[data-theme="dark"] .chip { background: #262058; color: var(--ink); }
:root[data-theme="dark"] .chip.is-on { background: var(--violet); color: #fff; }
:root[data-theme="dark"] .modal, :root[data-theme="dark"] .card, :root[data-theme="dark"] .quiz-card, :root[data-theme="dark"] .set-row { color: var(--ink); }
:root[data-theme="dark"] .ach, :root[data-theme="dark"] .tch-card, :root[data-theme="dark"] .tch-step, :root[data-theme="dark"] .th-bar { background: var(--card); color: var(--ink); }
:root[data-theme="dark"] .invite-card { background: linear-gradient(135deg, #2a1f55, #1f1a4a); border-color: #4a3a8a; color: var(--ink); }
:root[data-theme="dark"] .invite-card small { color: var(--ink-2); }
:root[data-theme="dark"] .hw-due { background: #0f3b33; color: #9bffdf; }
:root[data-theme="dark"] .hw-due.is-closed { background: #4a1426; color: #ffc2d0; }
:root[data-theme="dark"] .tabbar { background: #120f33; border-color: var(--line); }
:root[data-theme="dark"] .table th, :root[data-theme="dark"] .table td { border-color: var(--line); }
:root[data-theme="dark"] .seg { background: #120f33; }
:root[data-theme="dark"] .seg button { color: var(--ink-2); }
:root[data-theme="dark"] .seg button.is-on { background: #2e2675; color: #fff; box-shadow: none; }
:root[data-theme="dark"] .join-box { background: #1a1640; }
:root[data-theme="dark"] .join-box h2 { color: var(--ink); }
/* phones: joining is what most people come for, so it goes first */
@media (max-width: 640px) {
  .hero .hero-join { order: -1; }
  .hero { padding: 22px 18px; gap: 20px; }
  .hero h1 { font-size: 2rem; }
  .hero p { margin: 10px 0 16px; font-size: 1rem; }
}

/* Sidebar (calm edition) */
.side-nav { display: grid; gap: 2px; }
.side-sep { height: 1px; margin: 8px 10px; background: rgba(255, 255, 255, 0.1); }
.side-link { padding: 9px 12px; }
.side-tag { margin-left: auto; font-size: 10px; font-weight: 900; letter-spacing: 1px; padding: 2px 7px; border-radius: 99px; background: linear-gradient(135deg, #ffe45c, #ffb21f); color: #5a3300; }
.side-end { margin-top: auto; display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.side-card { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 16px; background: rgba(255, 255, 255, 0.06); color: #fff; text-decoration: none; transition: background .15s, transform .15s; }
.side-card:hover { background: rgba(255, 255, 255, 0.12); transform: translateY(-1px); }
.side-card .blook { width: 40px; height: 40px; flex: none; }
.side-card-text { display: grid; min-width: 0; flex: 1; }
.side-card-text b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-card-text small { font-size: 11px; font-weight: 800; color: rgba(255, 255, 255, 0.6); }
.side-coins { color: #ffe45c; }
.streak-chip { flex: none; display: inline-flex; align-items: center; gap: 2px; padding: 3px 8px; border-radius: 99px; background: #ff8a2a; color: #fff; font-weight: 900; font-size: 12px; box-shadow: 0 0 12px #ff8a2a88; animation: emblem-shine 2.4s ease-in-out infinite; }
.side-tools { display: flex; justify-content: space-between; gap: 6px; }
.side-tool { flex: 1; display: grid; place-items: center; height: 38px; border-radius: 12px; border: none; background: rgba(255, 255, 255, 0.06); color: rgba(255, 255, 255, 0.8); cursor: pointer; text-decoration: none; transition: background .15s, transform .15s, color .15s; }
.side-tool:hover { background: rgba(255, 255, 255, 0.14); color: #fff; transform: translateY(-2px); }
.side-tool.is-on { background: var(--violet); color: #fff; }
.side-install { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px; border-radius: 12px; border: 1px dashed rgba(255, 255, 255, 0.3); background: none; color: #fff; font: inherit; font-weight: 800; font-size: 13px; cursor: pointer; }
.side-install:hover { background: rgba(255, 255, 255, 0.08); }
.side-auth { display: grid; gap: 6px; }
/* Daily streak */
.daily-flame { font-size: 64px; line-height: 1; animation: bn-float 1.6s ease-in-out infinite; display: inline-block; }
.daily-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.daily-day { display: grid; justify-items: center; gap: 2px; padding: 6px 2px; border-radius: 12px; background: var(--line); font-size: 18px; }
.daily-day small { font-size: 10px; font-weight: 900; color: var(--ink-2); }
.daily-day.is-on { background: #ffe3c7; }
.daily-day.is-today { outline: 3px solid #ff8a2a; animation: th-pop .5s both; }
.daily-chest { position: relative; width: 120px; height: 100px; margin: 4px auto; border: none; background: none; cursor: pointer; animation: th-shake .5s ease-in-out infinite; }
.daily-chest.is-open { animation: none; cursor: default; }
.dc-box { position: absolute; left: 0; right: 0; bottom: 0; height: 58%; border-radius: 10px; background: linear-gradient(#ffb21f, #c97a0b); border: 4px solid #6b4120; box-shadow: inset 0 0 0 4px #ffe45c; }
.dc-lid { position: absolute; left: 0; right: 0; top: 4%; height: 42%; border-radius: 40px 40px 8px 8px; background: linear-gradient(#ffd34d, #e8a21a); border: 4px solid #6b4120; transform-origin: 50% 100%; transition: transform .4s cubic-bezier(.3, 1.6, .5, 1); z-index: 1; }
.daily-chest.is-open .dc-lid { transform: rotate(-35deg) translate(-12px, -22px); }
.daily-coins { font: 400 56px 'Bricolage Grotesque', system-ui; color: #ff8a2a; text-shadow: 0 3px 0 #0002; animation: th-pop .6s cubic-bezier(.3, 1.8, .5, 1) both; }
.daily-after p { margin: -6px 0 6px; font-weight: 900; color: var(--ink-2); }
/* Solo minigames */
.solo-modes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.solo-mode { position: relative; display: grid; justify-items: start; gap: 4px; text-align: left; padding: 14px; border-radius: 18px; border: 3px solid var(--c); background: var(--card); color: var(--ink); font: inherit; cursor: pointer; box-shadow: 0 5px 0 var(--c); transition: transform .12s, box-shadow .12s; }
.solo-mode:hover { transform: translateY(-3px); }
.solo-mode:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--c); }
.solo-mode.is-off { opacity: .45; cursor: default; }
.solo-mode-ic { font-size: 28px; line-height: 1; }
.solo-mode small { color: var(--ink-2); font-weight: 700; font-size: 12px; }
.solo-mode-best { position: absolute; top: 10px; right: 10px; display: inline-flex; gap: 3px; align-items: center; font-size: 11px; font-weight: 900; padding: 2px 8px; border-radius: 99px; background: var(--c); color: #fff; }
.solo-hearts { letter-spacing: 2px; }
.solo-speed { font-weight: 900; padding: 2px 10px; border-radius: 99px; background: #ff8a2a; color: #fff; }
.bp { position: fixed; inset: 0; display: grid; grid-template-rows: auto auto 1fr; background: radial-gradient(circle at 50% 120%, #2fb8ff, #0b3a7a 70%); color: #fff; z-index: 5; }
.bp-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; gap: 10px; }
.bp-head .solo-top { flex: 1; }
.bp-q { margin: 4px 16px 0; text-align: center; font: 400 clamp(20px, 4vw, 32px) 'Bricolage Grotesque', system-ui; text-shadow: 0 2px 8px #0006; }
.bp-canvas { width: 100%; height: 100%; touch-action: none; cursor: pointer; }
.fc { min-height: 100dvh; display: grid; align-content: center; justify-items: center; gap: 18px; padding: 20px 16px; background: linear-gradient(160deg, #12c9a6, #2f9bff); }
.fc .solo-top { width: min(560px, 100%); color: #fff; }
.fc-card { position: relative; width: min(560px, 100%); aspect-ratio: 3 / 2; border: none; background: none; cursor: pointer; perspective: 1200px; padding: 0; }
.fc-face { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; gap: 10px; padding: 20px; border-radius: 24px; background: #fff; color: #17133f; box-shadow: 0 12px 0 #0002, 0 20px 40px #0003; backface-visibility: hidden; transition: transform .55s cubic-bezier(.3, 1.3, .5, 1); text-align: center; }
.fc-face h2 { margin: 0; font: 400 clamp(22px, 4vw, 34px) 'Bricolage Grotesque', system-ui; }
.fc-face small { font-weight: 900; color: #6b6890; text-transform: uppercase; letter-spacing: 1px; font-size: 11px; }
.fc-back { transform: rotateY(180deg); background: linear-gradient(135deg, #fff, #e8fff9); }
.fc-card.is-flipped .fc-front { transform: rotateY(-180deg); }
.fc-card.is-flipped .fc-back { transform: rotateY(0); }
.fc .solo-top { display: flex; justify-content: space-between; align-items: center; font-weight: 900; }
/* Home: cycling hero word, how it works, trust, footer, reveal */
.hero-cycle { display: inline-block; transition: opacity .28s, transform .28s; }
.hero-cycle.is-out { opacity: 0; transform: translateY(10px); }
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .9, .3, 1.1); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
.mode-card h3, .mode-card p { position: relative; z-index: 1; text-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.mode-card { min-height: 190px; transition: transform .15s; }
.mode-card:hover { transform: translateY(-4px) rotate(-.6deg); }
.mode-card .mode-art { width: 104px; height: 104px; }
.how { margin: 44px 0 10px; text-align: center; width: 100%; justify-self: stretch; }
.how-steps { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important; }
.how-steps { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 16px; text-align: left; }
.how-step { position: relative; padding: 22px 18px 18px; border-radius: 20px; background: var(--card); border: 2px solid var(--line); }
.how-step h3 { margin: 10px 0 4px; }
.how-step p { margin: 0; color: var(--ink-2); }
.how-n { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: var(--c); color: #fff; font: 400 22px 'Bricolage Grotesque', system-ui; box-shadow: 0 4px 0 rgba(0, 0, 0, .18); transform: rotate(-6deg); }
.trust { margin: 44px 0 10px; padding: 26px 20px; border-radius: 26px; background: #17133f; color: #fff; display: grid; justify-items: center; gap: 14px; text-align: center; overflow: hidden; }
.trust h2 { color: #fff; margin: 0; }
.trust-grid { display: grid; gap: 12px; width: 100%; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); text-align: left; }
.trust-item { display: grid; gap: 4px; padding: 14px; border-radius: 16px; background: rgba(255, 255, 255, .07); }
.trust-item small { color: rgba(255, 255, 255, .72); }
.trust-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #12c9a6; color: #fff; }
.trust .btn { background: #fff; color: #17133f; }
.orn-band { max-width: 100%; }
.orn-horn { stroke-dasharray: 90; stroke-dashoffset: 90; animation: ornDraw 1.4s ease forwards; }
@keyframes ornDraw { to { stroke-dashoffset: 0; } }
.site-foot { margin-top: 56px; padding-top: 18px; border-top: 2px solid var(--line); display: grid; gap: 10px; justify-items: center; text-align: center; color: var(--ink-2); }
.site-foot-row { display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: space-between; align-items: center; width: 100%; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.site-foot a { color: inherit; font-weight: 800; }
@media (max-width: 600px) { .features { grid-template-columns: 1fr 1fr; gap: 10px; } .mode-card { min-height: 150px; padding: 12px; } .mode-card h3 { font-size: 1.1rem; } .mode-card p { font-size: .78rem; } .mode-card .mode-art { width: 72px; height: 72px; } }
/* Create chooser */
.create-kinds { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.create-kind { display: grid; gap: 8px; align-content: start; padding: 20px; border-radius: 22px; background: var(--card); color: var(--ink); border: 3px solid var(--c); box-shadow: 0 6px 0 var(--c); text-decoration: none; transition: transform .12s, box-shadow .12s; }
.create-kind:hover { transform: translateY(-4px); }
.create-kind:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--c); }
.create-kind b { display: flex; gap: 8px; align-items: center; font: 400 1.4rem 'Bricolage Grotesque', system-ui; }
.create-kind small { color: var(--ink-2); font-weight: 700; }
.create-kind-ic { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: var(--c); color: #fff; transform: rotate(-5deg); }
.create-kind.is-locked { opacity: .7; }
/* People search */
.people:empty { display: none; }
.people { display: grid; gap: 10px; }
.people-row { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.person { flex: 0 0 auto; display: grid; justify-items: center; gap: 2px; width: 120px; padding: 14px 8px; border-radius: 18px; background: var(--card); border: 2px solid var(--line); color: var(--ink); text-decoration: none; text-align: center; transition: transform .12s; }
.person:hover { transform: translateY(-3px); }
.person .blook { width: 56px; height: 56px; }
.person b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person small { color: var(--ink-2); font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

/* ---- Game cards: a lit stage for the art, glass text, shine on hover ---- */
.mode-pick { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.mode-opt, .mode-card { position: relative; display: flex; flex-direction: column; justify-content: flex-start; gap: 0; padding: 0; min-height: 0; overflow: hidden; border-radius: 22px; isolation: isolate; color: #fff; text-align: left;
  box-shadow: 0 6px 0 rgba(0,0,0,.22), 0 14px 30px rgba(0,0,0,.18); transition: transform .18s var(--spring, cubic-bezier(.3,1.4,.5,1)), box-shadow .18s; }
.mode-opt::after, .mode-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.35) 50%, transparent 65%); transform: translateX(-120%); transition: transform .7s ease; pointer-events: none; z-index: 3; }
.mode-opt:hover::after, .mode-card:hover::after { transform: translateX(120%); }
.mode-opt:hover, .mode-card:hover { transform: translateY(-5px) rotate(-.4deg); box-shadow: 0 10px 0 rgba(0,0,0,.2), 0 22px 40px rgba(0,0,0,.25); }
.mode-opt:active { transform: translateY(2px); }
.mode-stage { position: relative; display: grid; place-items: center; height: 118px; overflow: hidden; }
.mode-spot { position: absolute; inset: 0; background: radial-gradient(ellipse 60% 70% at 50% 60%, rgba(255,255,255,.38), transparent 70%), repeating-linear-gradient(135deg, rgba(255,255,255,.06) 0 10px, transparent 10px 20px); }
.mode-opt .mode-art, .mode-card .mode-art { position: relative; inset: auto; right: auto; top: auto; width: 100px; height: 100px; filter: drop-shadow(0 8px 10px rgba(0,0,0,.35)); animation: mode-float 3.4s ease-in-out infinite; transition: transform .25s; }
.mode-opt:hover .mode-art, .mode-card:hover .mode-art { transform: scale(1.12) rotate(-4deg); }
@keyframes mode-float { 50% { translate: 0 -6px; } }
.mode-text { position: relative; display: grid; gap: 3px; padding: 12px 14px 14px; flex: 1; background: linear-gradient(180deg, rgba(10,8,30,.25), rgba(10,8,30,.55)); backdrop-filter: blur(2px); }
.mode-text b, .mode-text h3 { margin: 0; font: 400 1.35rem/1.1 var(--display, 'Bricolage Grotesque'), system-ui; text-shadow: 0 2px 6px rgba(0,0,0,.35); }
.mode-text small, .mode-text p { margin: 0; font-size: .82rem; font-weight: 700; opacity: .92; line-height: 1.35; }
.mode-opt .pro-tag, .mode-card .pro-tag { left: 10px; right: auto; top: 10px; z-index: 2; box-shadow: 0 3px 8px rgba(0,0,0,.25); }
.mode-opt.is-on { outline: 4px solid #fff; outline-offset: 0; border-color: transparent; box-shadow: 0 0 0 8px rgba(107,76,255,.55), 0 14px 34px rgba(107,76,255,.45); transform: translateY(-3px); }
.mode-opt.is-on .mode-art { animation-duration: 1.6s; }
.mode-check { position: absolute; top: 10px; right: 10px; z-index: 2; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #fff; color: #6b4cff; box-shadow: 0 3px 10px rgba(0,0,0,.3); animation: mode-pop .3s var(--spring, ease); }
@keyframes mode-pop { from { transform: scale(0); } }
.mode-opt.is-pro-only { filter: saturate(.55) brightness(.9); }
.mode-card { min-height: 0; }
@media (max-width: 600px) { .mode-stage { height: 92px; } .mode-opt .mode-art, .mode-card .mode-art { width: 76px; height: 76px; } .mode-text b, .mode-text h3 { font-size: 1.1rem; } }
@media (prefers-reduced-motion: reduce) { .mode-opt .mode-art, .mode-card .mode-art { animation: none; } }

/* ---- Profiles (1.3): a real, calm profile page: cover photo, avatar, name, bio, counts ---- */
.pf { background: var(--card); border-radius: 20px; overflow: hidden; box-shadow: 0 1px 2px rgba(23,19,63,.06), 0 8px 28px rgba(23,19,63,.08); border: 1px solid rgba(23,19,63,.06); }
.pf-cover { position: relative; height: clamp(150px, 26vw, 290px); overflow: hidden; background: #c9d6e3; }
.pf-cover .bn { position: absolute; inset: 0; }
.bn-real img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; display: block; animation: pf-kenburns 40s ease-in-out infinite alternate; }
.bn-real::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,.28)); }
@keyframes pf-kenburns { to { transform: scale(1.06) translate(-1%, -1%); } }
.pf-credit { position: absolute; right: 12px; bottom: 8px; z-index: 1; font-size: 11px; font-weight: 600; color: rgba(255,255,255,.8); text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.pf-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 0 24px; margin-top: calc(clamp(88px, 12vw, 132px) / -2); position: relative; }
.pf-avatar { width: clamp(88px, 12vw, 132px); aspect-ratio: 1; border-radius: 50%; background: linear-gradient(160deg, #f4f1ff, #e6e0ff); border: 5px solid var(--card); box-shadow: 0 4px 14px rgba(23,19,63,.18); display: grid; place-items: center; overflow: hidden; }
.pf-avatar .blook { width: 78%; height: 78%; }
.pf-actions { display: flex; gap: 8px; padding-bottom: 6px; }
.pf-actions .btn { border-radius: 999px; padding: 9px 18px; font-size: 15px; }
.pf-id { padding: 10px 24px 4px; display: grid; gap: 6px; }
.pf-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; font: 800 clamp(24px, 3.2vw, 30px)/1.15 var(--display); letter-spacing: -.5px; color: var(--ink); }
.pf-handle { color: var(--ink-2); font-weight: 600; font-size: 15px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.pf-role { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--ink); }
.pf-role .logo-mark { width: 18px; height: 18px; }
.pf-bio { margin: 2px 0 0; font-size: 16px; line-height: 1.5; color: var(--ink); max-width: 60ch; font-weight: 500; }
.pf-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--ink-2); font-size: 14px; font-weight: 600; }
.pf-meta span { display: inline-flex; align-items: center; gap: 5px; }
.pf-counts { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 15px; color: var(--ink-2); font-weight: 600; margin-top: 2px; }
.pf-counts b { color: var(--ink); font-weight: 800; font-variant-numeric: tabular-nums; margin-right: 3px; }
.pf-earned { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.pf-earned span { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--ink); background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); }
.pf-earned span svg { color: var(--c); }
.pf .profile-tabs { display: flex; gap: 4px; padding: 0 16px; margin-top: 14px; border-top: 1px solid var(--line); overflow-x: auto; }
.pf .profile-tabs button { border: none; background: none; padding: 14px 12px 12px; font: inherit; font-weight: 700; font-size: 15px; color: var(--ink-2); cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; }
.pf .profile-tabs button.is-on { color: var(--ink); border-bottom-color: var(--ink); }
@media (max-width: 640px) {
  .pf { border-radius: 16px; }
  .pf-head, .pf-id { padding-left: 16px; padding-right: 16px; }
  .pf-actions .btn { padding: 8px 14px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { .bn-real img { animation: none; } }
@keyframes spin-slow { to { transform: rotate(360deg); } }
.pf-avatar > * { width: 80% !important; height: 80% !important; max-width: none; }
.pf-actions .btn { box-shadow: none; border: 1px solid var(--line); background: var(--card); color: var(--ink); }
.pf-actions .btn:hover { background: var(--bg, #f6f4ff); }
.pf-actions .follow-btn.btn-main { background: var(--ink); color: #fff; border-color: var(--ink); }
@media (max-width: 640px) { .pf-actions { padding-bottom: 0; } .pf-actions .btn { padding: 7px 14px; } }

/* ---- The Quickzy app (/app): solo play anywhere, even offline ---- */
.app-shell { min-height: 100vh; min-height: 100dvh; color: #fff; padding: 0 clamp(16px, 4vw, 40px) 40px; padding-top: env(safe-area-inset-top);
  background: radial-gradient(1200px 600px at 85% -10%, rgba(107,76,255,.55), transparent 60%), radial-gradient(900px 500px at -10% 30%, rgba(18,201,166,.22), transparent 60%), linear-gradient(180deg, #120d33, #0b0824 60%, #08061a); }
.app-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 14px 0; margin: 0 calc(-1 * clamp(16px, 4vw, 40px)); padding-left: clamp(16px, 4vw, 40px); padding-right: clamp(16px, 4vw, 40px);
  background: rgba(11,8,36,.72); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); border-bottom: 1px solid rgba(255,255,255,.07); }
.app-brand { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; }
.app-brand .logo-mark { width: 34px; height: 34px; }
.app-brand .wordmark { height: 22px; }
.app-status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; background: rgba(18,201,166,.14); color: #7ff0d6; border: 1px solid rgba(18,201,166,.35); white-space: nowrap; }
.app-status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.app-status.is-off { background: rgba(255,205,31,.12); color: #ffd85c; border-color: rgba(255,205,31,.35); }
.app-install { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 999px; border: none; font: inherit; font-weight: 800; font-size: 14px; cursor: pointer; color: #17133f; background: linear-gradient(180deg, #ffe066, #ffc61a); box-shadow: 0 6px 20px rgba(255,198,26,.3); }
.app-site { display: inline-flex; align-items: center; gap: 4px; color: rgba(255,255,255,.65); font-size: 13px; font-weight: 700; text-decoration: none; }
.app-site svg { transform: rotate(45deg); }
.app-site:hover { color: #fff; }
.app-hero { display: grid; grid-template-columns: 1.3fr 1fr; align-items: center; gap: 24px; padding: clamp(28px, 6vw, 64px) 0 clamp(20px, 4vw, 40px); }
.app-hero h1 { margin: 0; font: 800 clamp(34px, 6vw, 62px)/1.02 var(--display); letter-spacing: -1.5px;
  background: linear-gradient(180deg, #fff 30%, #c9bfff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.app-hero p { margin: 14px 0 0; max-width: 44ch; font-size: clamp(16px, 1.8vw, 19px); line-height: 1.5; color: rgba(255,255,255,.72); font-weight: 600; }
.app-modes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.app-modes span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 12px; font-size: 13px; font-weight: 800; background: color-mix(in srgb, var(--c) 18%, transparent); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); }
.app-modes i { font-style: normal; }
.app-hero-art { display: grid; place-items: center; }
.app-phone { width: min(200px, 46vw); aspect-ratio: 9 / 18.5; border-radius: 34px; padding: 9px; background: linear-gradient(160deg, #3a3466, #16122f); box-shadow: 0 30px 80px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.12) inset, 0 0 90px rgba(107,76,255,.35); transform: rotate(-8deg); animation: app-float 6s ease-in-out infinite; }
.app-phone-screen { height: 100%; border-radius: 26px; overflow: hidden; display: grid; grid-template-rows: 1.3fr repeat(4, auto); gap: 8px; padding: 14px 12px; background: linear-gradient(180deg, #6b4cff, #2a1f7a 60%, #120d33); }
.app-phone-logo { display: grid; place-items: center; }
.app-phone-logo .logo-mark { width: 58%; height: auto; filter: drop-shadow(0 8px 20px rgba(0,0,0,.4)); }
.app-phone-screen i { height: 30px; border-radius: 10px; background: rgba(255,255,255,.16); }
.app-phone-screen i:nth-child(2) { background: #ff4772; } .app-phone-screen i:nth-child(3) { background: #2f9bff; }
.app-phone-screen i:nth-child(4) { background: #ffcd1f; } .app-phone-screen i:nth-child(5) { background: #12c9a6; }
@keyframes app-float { 50% { transform: rotate(-6deg) translateY(-10px); } }
.app-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.app-tabs { display: inline-flex; padding: 4px; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); }
.app-tabs button { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: none; border-radius: 10px; background: none; color: rgba(255,255,255,.7); font: inherit; font-weight: 800; font-size: 14px; cursor: pointer; }
.app-tabs button span { font-size: 12px; padding: 1px 7px; border-radius: 999px; background: rgba(255,255,255,.1); }
.app-tabs button.is-on { background: #fff; color: #17133f; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.app-tabs button.is-on span { background: #ece8ff; }
.app-search { flex: 1 1 220px; max-width: 340px; padding: 11px 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.06); color: #fff; font: inherit; font-weight: 700; }
.app-search::placeholder { color: rgba(255,255,255,.45); }
.app-search:focus { outline: 2px solid #8b73ff; outline-offset: 1px; }
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 14px; }
.app-tile-wrap { position: relative; }
.app-tile { width: 100%; display: grid; padding: 0; border: 1px solid rgba(255,255,255,.08); border-radius: 18px; overflow: hidden; background: rgba(255,255,255,.05); color: #fff; font: inherit; text-align: left; cursor: pointer; transition: transform .18s, border-color .18s, background .18s; }
.app-tile:hover { transform: translateY(-4px); border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.08); }
.app-tile .quiz-cover { height: 118px; border-radius: 0; }
.app-tile .quiz-cover .cover-title, .app-tile .quiz-cover .count { display: none; }
.app-tile-text { display: grid; gap: 3px; padding: 12px 14px 14px; }
.app-tile-text b { font-size: 16px; line-height: 1.25; }
.app-tile-text small { color: rgba(255,255,255,.6); font-weight: 700; }
.app-tile-rm { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; display: grid; place-items: center; border: none; border-radius: 50%; background: rgba(0,0,0,.45); color: #fff; cursor: pointer; opacity: .8; }
.app-tile-rm:hover { opacity: 1; background: #ff4772; }
.app-empty { grid-column: 1 / -1; display: grid; justify-items: center; gap: 8px; text-align: center; padding: 40px 16px; border-radius: 18px; border: 1px dashed rgba(255,255,255,.18); }
.app-empty b { font-size: 18px; } .app-empty p { margin: 0 0 6px; max-width: 46ch; color: rgba(255,255,255,.65); font-weight: 600; }
.app-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 36px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.08); color: rgba(255,255,255,.5); font-size: 13px; font-weight: 700; }
.app-foot a { color: #c9bfff; }
.app-back { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: 14px; color: var(--ink-2); text-decoration: none; }
.app-back svg { transform: rotate(90deg); }
.app-pick { margin: 6px 0 0; font-size: 18px; }
@media (max-width: 720px) {
  .app-hero { grid-template-columns: 1fr; }
  .app-hero-art { display: none; }
  .app-site { display: none; }
  .app-tools { flex-direction: column; align-items: stretch; }
  .app-tabs { width: 100%; } .app-tabs button { flex: 1; justify-content: center; }
  .app-search { max-width: none; flex: none; }
  .app-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .app-tile .quiz-cover { height: 90px; }
  .app-tile-text b { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { .app-phone { animation: none; } }
.app-win { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 999px; font-weight: 800; font-size: 14px; color: #fff; text-decoration: none; background: linear-gradient(180deg, #2b8cff, #0067d8); box-shadow: 0 6px 20px rgba(0,103,216,.35); }
.app-win span { display: inline-grid; }
@media (max-width: 720px) { .app-win { display: none; } }

/* ---- Blooks (1.3): tabs, tidy collection panels ---- */
.bk-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); width: max-content; max-width: 100%; overflow-x: auto; position: sticky; top: 8px; z-index: 4; box-shadow: 0 6px 18px rgba(23,19,63,.08); }
.bk-tabs button { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border: none; border-radius: 10px; background: none; font: inherit; font-weight: 800; font-size: 15px; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.bk-tabs button.is-on { background: #17133f; color: #fff; }
.bk-body { display: grid; gap: 16px; }
.bk-body .box-grid, .bk-body .boxes { align-items: stretch; }
.bk-progress { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.bk-progress b { display: block; font-size: 18px; } .bk-progress small { color: var(--ink-2); font-weight: 700; }
.bk-filters { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.bk-filters .chip { display: inline-flex; align-items: center; gap: 6px; }
.chip-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); display: inline-block; }
.bk-search { min-width: 200px; padding: 9px 12px; }
.bk-owned { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; white-space: nowrap; cursor: pointer; }
.set-panel { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px 16px; box-shadow: 0 1px 2px rgba(23,19,63,.05); }
.set-panel header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.set-panel h3 { margin: 0; font-size: 17px; white-space: nowrap; }
.set-meter { flex: 1; height: 6px; border-radius: 99px; background: #ece9f8; overflow: hidden; max-width: 260px; }
.set-meter i { display: block; height: 100%; background: linear-gradient(90deg, #6b4cff, #a560ff); border-radius: inherit; }
.set-count { margin-left: auto; font-size: 13px; font-weight: 800; color: var(--ink-2); white-space: nowrap; }
.set-count.is-done { color: var(--okd, #0e9f6e); }
.set-grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
@media (max-width: 640px) { .bk-tabs { width: 100%; } .bk-tabs button { flex: 1; justify-content: center; padding: 9px 8px; font-size: 14px; } .bk-search { min-width: 0; flex: 1; } .bk-filters > .row { width: 100%; } .set-meter { display: none; } }

/* ---- Home (1.3): "Questions in. Games out." ---- */
.hm { display: grid; gap: clamp(36px, 6vw, 72px); }
.hm-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(24px, 4vw, 56px); align-items: center; padding: clamp(20px, 4vw, 48px) clamp(20px, 3.5vw, 44px); border-radius: 28px; color: #fff; position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(900px 500px at 100% 0%, rgba(107,76,255,.55), transparent 60%), radial-gradient(700px 400px at 0% 100%, rgba(255,71,114,.25), transparent 60%), #120d33; }
.hm-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; opacity: .5; background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(ellipse at 70% 40%, #000, transparent 75%); }
.hm-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; letter-spacing: .3px; color: rgba(255,255,255,.75); }
.hm-eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: #12c9a6; box-shadow: 0 0 0 4px rgba(18,201,166,.2); }
.hm-hero h1 { margin: 14px 0 0; font: 800 clamp(40px, 6.4vw, 78px)/.98 var(--display); letter-spacing: -2.5px; }
.hm-hero h1 span { background: linear-gradient(90deg, #ffcd1f, #ff8a2a 45%, #ff4772); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hm-lede { margin: 18px 0 0; max-width: 48ch; font-size: clamp(16px, 1.6vw, 18px); line-height: 1.55; color: rgba(255,255,255,.75); font-weight: 600; }
.hm-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hm-ghost { background: rgba(255,255,255,.08) !important; color: #fff !important; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2) !important; }
.hm-pin { display: flex; align-items: center; gap: 8px; margin-top: 22px; padding: 6px 6px 6px 16px; border-radius: 16px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); max-width: 440px; }
.hm-pin > span { font-weight: 800; font-size: 14px; color: rgba(255,255,255,.7); white-space: nowrap; }
.hm-pin-input { flex: 1; min-width: 0; border: none; background: none; color: #fff; font: 900 20px Figtree, system-ui; letter-spacing: 3px; padding: 8px 4px; outline: none; }
.hm-pin-input::placeholder { color: rgba(255,255,255,.35); letter-spacing: 1px; font-weight: 800; font-size: 16px; }
.hm-pin-input.is-bad { color: #ff8aa3; }
.hm-pin-go { border: none; border-radius: 11px; padding: 10px 18px; font: inherit; font-weight: 900; background: #fff; color: #17133f; cursor: pointer; }
.hm-pin-scan { border: none; border-radius: 11px; width: 42px; height: 42px; display: grid; place-items: center; background: rgba(255,255,255,.1); color: #fff; cursor: pointer; }
.hm-stage { position: relative; padding-bottom: 28px; }
.hm-screen { position: relative; border-radius: 18px; padding: 16px; background: linear-gradient(180deg, #1d1650, #150f3d); border: 1px solid rgba(255,255,255,.12); box-shadow: 0 30px 80px rgba(0,0,0,.5), 0 0 0 8px rgba(255,255,255,.04); min-height: 330px; display: grid; grid-template-rows: auto auto 1fr; gap: 12px; overflow: hidden; }
.hm-screen-top { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 800; color: rgba(255,255,255,.6); }
.hm-live { display: inline-flex; align-items: center; gap: 5px; color: #ff4772; letter-spacing: 1px; }
.hm-live i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: hm-blink 1.2s infinite; }
@keyframes hm-blink { 50% { opacity: .25; } }
.hm-pinbadge { margin-left: auto; padding: 3px 8px; border-radius: 6px; background: rgba(255,255,255,.08); letter-spacing: 1px; }
.hm-timer { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #17133f; font-size: 15px; }
.hm-q { font: 800 clamp(18px, 2vw, 24px)/1.25 Figtree, system-ui; text-align: center; padding: 10px 6px 4px; min-height: 2.6em; }
.hm-answers { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-content: end; transition: opacity .3s; }
.hm-ans { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; font-weight: 800; overflow: hidden; color: #fff; transition: opacity .35s, transform .35s; }
.hm-ans > i { position: absolute; left: 0; bottom: 0; height: 4px; width: 0; background: rgba(255,255,255,.75); transition: width .5s ease; }
.hm-ans em { margin-left: auto; font-style: normal; font-size: 13px; opacity: .85; font-variant-numeric: tabular-nums; }
.hm-ans-0 { background: #e2334f; } .hm-ans-1 { background: #1f7ae0; } .hm-ans-2 { background: #d89a00; } .hm-ans-3 { background: #138a56; }
.hm-shape { display: grid; place-items: center; }
.is-reveal .hm-ans:not(.is-right) { opacity: .25; transform: scale(.97); }
.is-reveal .hm-ans.is-right { box-shadow: 0 0 0 3px #fff, 0 10px 30px rgba(255,255,255,.25); }
.hm-board { position: absolute; inset: 64px 16px 16px; margin: 0; padding: 12px; list-style: none; border-radius: 14px; background: rgba(13,10,40,.92); backdrop-filter: blur(6px); display: grid; gap: 8px; align-content: start; opacity: 0; transform: translateY(14px); transition: opacity .35s, transform .35s; pointer-events: none; }
.is-board .hm-board { opacity: 1; transform: none; }
.hm-board li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; background: rgba(255,255,255,.07); font-weight: 800; animation: hm-row .4s both; animation-delay: var(--d); }
.hm-board li:first-child { background: linear-gradient(90deg, rgba(255,205,31,.3), rgba(255,255,255,.07)); }
@keyframes hm-row { from { opacity: 0; transform: translateX(-12px); } }
.hm-rank { width: 22px; text-align: center; color: rgba(255,255,255,.6); }
.hm-phone { position: absolute; right: -6px; bottom: -4px; width: 104px; aspect-ratio: 9 / 17; border-radius: 20px; padding: 6px; background: #0b0824; border: 1px solid rgba(255,255,255,.18); box-shadow: 0 20px 50px rgba(0,0,0,.55); transform: rotate(6deg); }
.hm-phone-in { height: 100%; border-radius: 15px; display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 6px; background: #150f3d; }
.hm-phone-in span { border-radius: 8px; display: grid; place-items: center; color: #fff; }
.hm-phone-in span:nth-child(2) { animation: hm-tap 3s ease-in-out infinite; }
@keyframes hm-tap { 0%, 70%, 100% { transform: none; } 78% { transform: scale(.88); filter: brightness(1.3); } }
.hm-h2 { margin: 0; font: 800 clamp(24px, 3vw, 34px)/1.15 var(--display); letter-spacing: -.8px; }
.hm-steps ol { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 2px solid var(--ink, #17133f); }
.hm-steps li { padding: 18px 22px 0 0; }
.hm-steps li + li { padding-left: 22px; border-left: 1px solid var(--line); }
.hm-steps li b { font: 900 14px Figtree, system-ui; color: #6b4cff; letter-spacing: 1px; }
.hm-steps h3 { margin: 6px 0 6px; font-size: 20px; }
.hm-steps p { margin: 0; color: var(--ink-2); font-weight: 600; line-height: 1.5; }
.hm-modes-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.hm-modes-head p { margin: 4px 0 0; font-weight: 600; }
.hm-arrow { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; cursor: pointer; color: var(--ink); }
.hm-arrow:first-child svg { transform: rotate(180deg); }
.hm-rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 260px); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 14px; scrollbar-width: thin; }
.hm-rail > * { scroll-snap-align: start; }
.hm-bento { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: minmax(170px, auto); gap: 14px; }
.hm-tile { position: relative; overflow: hidden; display: block; padding: 22px; border-radius: 22px; text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid var(--line); transition: transform .2s, box-shadow .2s; }
.hm-tile:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(23,19,63,.12); }
.hm-tile small { font-weight: 800; font-size: 12px; letter-spacing: .6px; text-transform: uppercase; color: #6b4cff; }
.hm-tile h3 { margin: 6px 0 6px; font: 800 clamp(20px, 2.2vw, 26px)/1.15 var(--display); letter-spacing: -.4px; }
.hm-tile p { margin: 0; max-width: 34ch; color: var(--ink-2); font-weight: 600; line-height: 1.5; }
.hm-tile-app { grid-column: span 3; grid-row: span 2; background: linear-gradient(160deg, #120d33, #2a1f7a); color: #fff; border: none; }
.hm-tile-app small { color: #7ff0d6; } .hm-tile-app p { color: rgba(255,255,255,.7); }
.hm-tile-phone { position: absolute; right: 26px; bottom: -40px; width: 150px; aspect-ratio: 9 / 17; border-radius: 26px; padding: 12px 10px; display: grid; grid-template-rows: repeat(4, 1fr); gap: 8px; background: #0b0824; border: 6px solid #3a3466; transform: rotate(-6deg); }
.hm-tile-phone i { border-radius: 9px; } .hm-tile-phone i:nth-child(1) { background: #e2334f; } .hm-tile-phone i:nth-child(2) { background: #1f7ae0; } .hm-tile-phone i:nth-child(3) { background: #d89a00; } .hm-tile-phone i:nth-child(4) { background: #138a56; }
.hm-tile-present { grid-column: span 3; }
.hm-slide { position: absolute; right: 18px; bottom: 16px; width: 130px; aspect-ratio: 16 / 10; border-radius: 8px; background: #fff; border: 1px solid var(--line); box-shadow: 0 8px 20px rgba(23,19,63,.12); padding: 10px; display: grid; gap: 5px; align-content: start; }
.hm-slide b { height: 8px; width: 70%; border-radius: 4px; background: #17133f; } .hm-slide i { height: 5px; border-radius: 3px; background: #d8d4ee; } .hm-slide i + i { width: 80%; }
.hm-slide span { margin-top: 4px; height: 22px; border-radius: 5px; background: linear-gradient(90deg, #e2334f 25%, #1f7ae0 25% 50%, #d89a00 50% 75%, #138a56 75%); }
.hm-tile-blooks { grid-column: span 3; }
.hm-blook-row { display: flex; gap: 4px; margin-top: 14px; }
.hm-tile-safe { grid-column: span 6; background: #fff8e1; border-color: #ffe7a3; }
@media (max-width: 980px) { .hm-hero { grid-template-columns: minmax(0, 1fr); } .hm-bento { grid-template-columns: 1fr 1fr; } .hm-bento > * { grid-column: span 1 !important; grid-row: auto !important; } .hm-tile-app { grid-column: span 2 !important; min-height: 260px; } }
@media (max-width: 640px) {
  .hm-hero { border-radius: 20px; }
  .hm-hero h1 { letter-spacing: -1.5px; }
  .hm-steps ol { grid-template-columns: 1fr; }
  .hm-steps li + li { padding-left: 0; border-left: none; border-top: 1px solid var(--line); }
  .hm-steps li { padding: 16px 0; }
  .hm-bento { grid-template-columns: 1fr; } .hm-tile-app { grid-column: span 1 !important; }
  .hm-phone { display: none; }
  .hm-slide { display: none; }
  .hm-screen { min-height: 300px; }
}
@media (prefers-reduced-motion: reduce) { .hm-live i, .hm-phone-in span, .hm-board li { animation: none; } }
.hm > * { min-width: 0; }
.hm-stage { padding-right: 40px; }
.hm-phone { right: -2px; bottom: -10px; width: 92px; }
.hm { min-width: 0; max-width: 100%; } #page { min-width: 0; } .hm-modes, .hm-rail { min-width: 0; max-width: 100%; }
@media (max-width: 640px) { .hm-pinbadge { display: none; } .hm-screen-top small { margin-right: auto; } }

/* ---- Presentation+ (1.3): themes, layouts, PowerPoint-style editor ---- */
.slide { --ink: #fff; --muted: rgba(255,255,255,.78); --accent: #ffcd1f; --hf: 'Bricolage Grotesque', system-ui; --hw: 400; --bf: Figtree, system-ui, sans-serif; color: var(--ink); text-align: left; }
.slide h1, .slide h2 { font-family: var(--hf); font-weight: var(--hw); }
.slide .sl-deco { position: absolute; inset: 0; pointer-events: none; }
.slide > :not(.sl-deco):not(.sl-pin):not(.sl-full) { position: relative; }
.slide p, .slide li, .slide blockquote, .slide figcaption { font-family: var(--bf); }
/* themes */
.th-clean { background: #fff; --ink: #1c1b29; --muted: #5d5b72; --accent: #6b4cff; --hf: Inter, system-ui, sans-serif; --hw: 800; --bf: Inter, system-ui, sans-serif; }
.th-clean .sl-deco { border-bottom: .45em solid var(--accent); background: linear-gradient(90deg, var(--accent) 0 .45em, transparent .45em) left top / 100% 18% no-repeat; }
.th-midnight { background: radial-gradient(120% 90% at 85% 0%, #23306b, #0d1024 60%); --ink: #eef1ff; --muted: #a9b0d6; --accent: #7cc4ff; --hf: 'Space Grotesk', system-ui, sans-serif; --hw: 700; --bf: Inter, system-ui, sans-serif; }
.th-midnight .sl-deco { background: radial-gradient(circle at 92% 88%, rgba(124,196,255,.25), transparent 30%); }
.th-paper { background: #f6f0e4; --ink: #2b2118; --muted: #6e5d4b; --accent: #b4532a; --hf: Fraunces, Georgia, serif; --hw: 800; --bf: Inter, system-ui, sans-serif; }
.th-paper .sl-deco { box-shadow: inset 0 0 0 .5em #f6f0e4, inset 0 0 0 .58em #d8c9ae; }
.th-ocean { background: linear-gradient(160deg, #0b4f6c, #01baef 140%); --accent: #ffe066; --hf: 'Space Grotesk', system-ui, sans-serif; --hw: 700; --bf: Inter, system-ui, sans-serif; }
.th-ocean .sl-deco { background: radial-gradient(ellipse 80% 30% at 50% 110%, rgba(255,255,255,.18), transparent 70%); }
.th-sunset { background: linear-gradient(135deg, #ff6b6b, #c44569 55%, #574b90); --accent: #ffe29a; --hf: Fraunces, Georgia, serif; --hw: 800; --bf: Inter, system-ui, sans-serif; }
.th-forest { background: #14362b; --ink: #f3efe2; --muted: #c9c2a9; --accent: #e9c46a; --hf: Fraunces, Georgia, serif; --hw: 600; --bf: Inter, system-ui, sans-serif; }
.th-forest .sl-deco { background: linear-gradient(180deg, transparent 82%, rgba(233,196,106,.15) 82%); }
.th-kyrgyz { background: #c8102e; --accent: #ffd100; --hf: 'Space Grotesk', system-ui, sans-serif; --hw: 700; --bf: Inter, system-ui, sans-serif; }
.th-kyrgyz .sl-deco { background: radial-gradient(circle at 100% 100%, transparent 18%, rgba(255,209,0,.9) 18.5% 20%, transparent 20.5%), repeating-conic-gradient(from 0deg at 100% 100%, rgba(255,209,0,.18) 0 3deg, transparent 3deg 9deg); }
.th-quickzy { --accent: #ffcd1f; }
/* layouts */
.slide .sl-rule { display: block; width: 3.2em; height: .3em; border-radius: .2em; background: var(--accent); margin-bottom: .9em; }
.sl-title { text-align: left; }
.sl-title h1 { font-size: 3.1em; line-height: 1.02; letter-spacing: -.02em; margin: 0; }
.slide .sl-sub { font-size: 1.15em; color: var(--muted); font-weight: 600; margin: .6em 0 0; opacity: 1; }
.th-quickzy .sl-title, .th-quickzy .sl-q { text-align: center; } .th-quickzy .sl-rule { margin-inline: auto; }
.sl-section { display: grid; gap: .2em; }
.sl-num { font: 700 1.1em var(--bf); color: var(--accent); letter-spacing: .1em; }
.sl-section h1 { font-size: 2.8em; line-height: 1.05; margin: 0; }
.sl-col h2, .sl-two h2 { font-size: 1.9em; margin: 0 0 .5em; line-height: 1.1; }
.slide .sl-points { margin: 0; padding-left: 1.1em; font-size: 1.05em; font-weight: 600; line-height: 1.55; color: var(--ink); }
.slide .sl-points li::marker { color: var(--accent); }
.sl-points.is-edit { padding-left: 0; white-space: pre-wrap; border-left: .2em solid var(--accent); padding-left: .7em; }
.sl-content { display: grid; gap: 5%; align-items: center; }
.sl-content.has-img { grid-template-columns: 1.15fr 1fr; }
.slide .sl-pic { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: .5em; box-shadow: 0 .4em 1.2em rgba(0,0,0,.25); }
.sl-img-empty { display: grid; place-items: center; align-content: center; gap: .3em; border: .12em dashed var(--muted); color: var(--muted); font-size: .7em; text-align: center; box-shadow: none !important; }
.sl-two .sl-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 6%; }
.sl-image { display: grid; gap: .5em; height: 100%; align-content: center; }
.sl-image .sl-pic { aspect-ratio: auto; height: 74%; min-height: 6em; }
.sl-image .sl-cap { margin: 0; font-size: 1em; color: var(--muted); text-align: center; font-weight: 600; }
.sl-quote { margin: 0; padding: 0 6%; }
.sl-qmark { position: absolute; left: -.05em; top: -.55em; font: 800 6em/1 Fraunces, Georgia, serif; color: var(--accent); opacity: .9; }
.sl-quote blockquote { margin: 0; font: 600 1.9em/1.25 Fraunces, Georgia, serif; letter-spacing: -.01em; }
.sl-quote figcaption { margin-top: .9em; font-size: 1em; color: var(--muted); font-weight: 700; }
.sl-quote figcaption::before { content: '— '; }
.sl-big { text-align: center; display: grid; justify-items: center; }
.sl-big b { font: var(--hw) 7em/1 var(--hf); color: var(--accent); letter-spacing: -.04em; }
.sl-big p { margin: .2em 0 0; font-size: 1.3em; font-weight: 600; color: var(--muted); }
.th-clean .sl-bar-track, .th-paper .sl-bar-track { background: rgba(0,0,0,.06); }
.th-clean .sl-bar > span, .th-paper .sl-bar > span { color: #fff; }
.th-clean .sl-hist i, .th-paper .sl-hist i { background: var(--accent); }
.th-clean .sl-hist, .th-paper .sl-hist { border-bottom-color: rgba(0,0,0,.25); }
/* editing in place */
.slide.is-editing [contenteditable] { outline: none; border-radius: .15em; cursor: text; min-width: 2em; }
.slide.is-editing [contenteditable]:hover { box-shadow: 0 0 0 .08em rgba(127,127,160,.55); }
.slide.is-editing [contenteditable]:focus { box-shadow: 0 0 0 .1em #4c8dff; }
.slide.is-editing [contenteditable]:empty::before { content: attr(data-ph); color: var(--muted); opacity: .7; }
/* transitions */
.fx-in-fade { animation: fx-fade .5s ease both; }
.fx-in-push.fx-fwd, .fx-in-push:not(.fx-back) { animation: fx-push .55s cubic-bezier(.2,.8,.2,1) both; }
.fx-in-push.fx-back { animation: fx-push-back .55s cubic-bezier(.2,.8,.2,1) both; }
.fx-in-zoom { animation: fx-zoom .55s cubic-bezier(.2,.8,.2,1) both; }
.fx-in-flip { animation: fx-flip .6s cubic-bezier(.2,.8,.2,1) both; transform-origin: center; }
@keyframes fx-fade { from { opacity: 0; } }
@keyframes fx-push { from { transform: translateX(100%); } }
@keyframes fx-push-back { from { transform: translateX(-100%); } }
@keyframes fx-zoom { from { transform: scale(.7); opacity: 0; } }
@keyframes fx-flip { from { transform: perspective(1400px) rotateY(80deg); opacity: 0; } }
/* the editor */
.pp { display: grid; grid-template-rows: auto auto auto 1fr auto; height: calc(100vh - 24px); height: calc(100dvh - 24px); margin: -8px -4px 0; background: #f3f2f8; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.pp-top { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #b7472a; color: #fff; }
.pp-logo { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: #fff; color: #b7472a; font: 900 14px Inter, system-ui; }
.pp-name { display: grid; }
.pp-title { border: 1px solid transparent; background: transparent; color: #fff; font: 700 16px Inter, system-ui; padding: 3px 6px; border-radius: 6px; min-width: 200px; }
.pp-title:hover, .pp-title:focus { border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.1); outline: none; }
.pp-status { font-size: 11px; opacity: .8; padding-left: 7px; }
.pp-top .btn-ghost { color: #fff; }
.pp-top .btn-main { background: #fff; color: #b7472a; box-shadow: none; }
.pp-tabs { display: flex; gap: 2px; padding: 0 10px; background: #fff; border-bottom: 1px solid #e3e1ec; overflow-x: auto; }
.pp-tabs button { border: none; background: none; padding: 9px 14px 8px; font: 600 14px Inter, system-ui; color: #444; cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; }
.pp-tabs button.is-on { color: #b7472a; border-bottom-color: #b7472a; }
.pp-ribbon { display: flex; align-items: stretch; gap: 0; padding: 6px 8px; background: #fff; border-bottom: 1px solid #e3e1ec; overflow-x: auto; min-height: 96px; box-shadow: 0 2px 6px rgba(0,0,0,.04); }
.pp-group { position: relative; display: flex; align-items: flex-start; gap: 4px; padding: 0 10px 18px; border-right: 1px solid #ececf3; }
.pp-group > small { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; font: 500 11px Inter, system-ui; color: #888; white-space: nowrap; }
.pp-btn { display: grid; justify-items: center; gap: 4px; min-width: 62px; padding: 6px 6px; border: 1px solid transparent; border-radius: 6px; background: none; font: 500 12px Inter, system-ui; color: #333; cursor: pointer; }
.pp-btn:hover:not(:disabled) { background: #f4f1fb; border-color: #e6e1f5; }
.pp-btn:disabled { opacity: .35; cursor: default; }
.pp-btn svg { color: #b7472a; }
.pp-drop { position: relative; }
.pp-pop { display: none; position: absolute; top: 100%; left: 0; z-index: 30; width: min(560px, 90vw); padding: 12px; background: #fff; border: 1px solid #dcd8ea; border-radius: 10px; box-shadow: 0 16px 40px rgba(0,0,0,.18); }
.pp-drop.is-open .pp-pop { display: grid; gap: 8px; }
.pp-pop > b { font: 700 13px Inter, system-ui; }
.pp-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.pp-g, .pp-theme, .pp-fx { display: grid; gap: 4px; padding: 4px; border: 2px solid transparent; border-radius: 8px; background: none; cursor: pointer; font: 500 11px Inter, system-ui; color: #444; text-align: center; }
.pp-g:hover, .pp-theme:hover, .pp-fx:hover { border-color: #e2dcf5; background: #faf9ff; }
.pp-theme.is-on, .pp-fx.is-on { border-color: #b7472a; }
.pp-g .pres-thumb, .pp-theme .pres-thumb { border-radius: 4px; box-shadow: 0 0 0 1px #e3e1ec; }
.pp-themes { flex-wrap: nowrap; }
.pp-theme { width: 104px; flex: none; }
.pp-fx { width: 74px; }
.pp-fx-art { position: relative; display: block; height: 40px; border-radius: 4px; background: #eceaf6; overflow: hidden; }
.pp-fx-art i { position: absolute; inset: 6px 8px; border-radius: 3px; background: #b7472a; opacity: .85; }
.pp-fx-art i + i { background: #6b4cff; opacity: .6; }
.pp-fx:hover .fx-fade i + i { animation: fx-fade 1s infinite alternate; } .pp-fx:hover .fx-push i + i { animation: fx-push 1s infinite; } .pp-fx:hover .fx-zoom i + i { animation: fx-zoom 1s infinite; } .pp-fx:hover .fx-flip i + i { animation: fx-flip 1s infinite; }
.fx-none i + i { display: none; }
.pp-help { margin: 0; max-width: 360px; font: 400 12px/1.5 Inter, system-ui; color: #555; }
.pp-body { display: grid; grid-template-columns: 188px minmax(0, 1fr) 240px; min-height: 0; }
.pp-rail { overflow-y: auto; padding: 10px 8px 10px 4px; display: grid; gap: 8px; align-content: start; border-right: 1px solid #e3e1ec; background: #f8f7fc; }
.pp-mini { display: grid; grid-template-columns: 20px 1fr; gap: 4px; padding: 3px; border: 2px solid transparent; border-radius: 6px; background: none; cursor: pointer; font: 600 12px Inter, system-ui; color: #666; text-align: right; }
.pp-mini .pres-thumb { border-radius: 3px; box-shadow: 0 0 0 1px #dedbea; }
.pp-mini.is-on { border-color: #b7472a; }
.pp-mini.is-on .pres-thumb { box-shadow: 0 0 0 1px #b7472a; }
.pp-mini.is-over { border-color: #6b4cff; border-style: dashed; }
.pp-mini.is-drag { opacity: .4; }
.pp-n { display: grid; justify-items: end; gap: 4px; }
.pp-live-dot { width: 8px; height: 8px; border-radius: 50%; background: #12c9a6; }
.pp-mini-add { display: flex; align-items: center; justify-content: center; gap: 6px; margin-left: 24px; padding: 10px; border: 2px dashed #d6d2e6; border-radius: 6px; background: none; font: 600 12px Inter, system-ui; color: #777; cursor: pointer; }
.pp-main { display: grid; grid-template-rows: 1fr auto; min-height: 0; min-width: 0; }
.pp-canvas-wrap { display: grid; place-items: center; padding: 18px; min-height: 0; overflow: auto; container-type: size; }
.pp-canvas { width: min(100cqw - 4px, (100cqh - 4px) * 16 / 9); aspect-ratio: 16 / 9; container-type: inline-size; box-shadow: 0 2px 10px rgba(0,0,0,.12), 0 0 0 1px rgba(0,0,0,.06); background: #fff; }
.pp-canvas .slide { font-size: 2.4cqw; }
.pp-notes { border: none; border-top: 1px solid #e3e1ec; padding: 10px 14px; font: 400 13px/1.5 Inter, system-ui; resize: vertical; background: #fff; min-height: 64px; }
.pp-notes:focus { outline: none; background: #fffdf7; }
.pp-side { border-left: 1px solid #e3e1ec; background: #fff; padding: 12px; overflow-y: auto; }
.pp-side-card { display: grid; gap: 8px; font-family: Inter, system-ui; }
.pp-swatch { width: 12px; height: 28px; border-radius: 3px; flex: none; }
.pp-foot { display: flex; gap: 18px; padding: 4px 12px; background: #f0eef6; border-top: 1px solid #e3e1ec; font: 500 11px Inter, system-ui; color: #666; }
@media (max-width: 1000px) { .pp-body { grid-template-columns: 150px minmax(0, 1fr); } .pp-side { display: none; } }
@media (max-width: 680px) {
  .pp { height: auto; grid-template-rows: auto; }
  .pp-body { grid-template-columns: 1fr; }
  .pp-rail { grid-auto-flow: column; grid-auto-columns: 130px; overflow-x: auto; border-right: none; border-bottom: 1px solid #e3e1ec; }
  .pp-canvas-wrap { container-type: inline-size; } .pp-canvas { width: 100%; }
  .pp-side { display: block; border-left: none; border-top: 1px solid #e3e1ec; }
  .pp-title { min-width: 0; width: 100%; }
}
/* presenting */
.pres-live .pres-stage { cursor: pointer; }
.pres-progress { height: 3px; background: #1d1946; } .pres-progress i { display: block; height: 100%; background: #ffcd1f; transition: width .4s ease; }
.pres-black { position: fixed; inset: 0; z-index: 20; background: #000; cursor: pointer; }
.pres-notes { position: fixed; right: 16px; bottom: 70px; z-index: 15; width: min(380px, 90vw); max-height: 40vh; overflow: auto; padding: 14px 16px; border-radius: 12px; background: rgba(15,12,40,.95); color: #fff; font: 400 15px/1.5 Inter, system-ui; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.pres-notes small { color: #b9b4dd; font-weight: 600; } .pres-notes p { margin: 4px 0 10px; white-space: pre-wrap; }
.pres-pin { color: #ffcd1f; font-weight: 900; letter-spacing: 1px; padding: 0 6px; }
.pres-stage .slide { overflow: hidden; }
.pp { overflow: visible; }
.pp-top { border-radius: 16px 16px 0 0; }
.pp-ribbon { overflow: visible; flex-wrap: wrap; position: relative; z-index: 6; }
@media (max-width: 680px) { .pp-ribbon { flex-wrap: nowrap; overflow-x: auto; } .pp-pop { position: fixed; left: 8px; right: 8px; top: 120px; width: auto; } }
/* the 1.3 film */
.f13-signal { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); z-index: 4; display: flex; align-items: flex-end; gap: 4px; padding: 8px 14px; border-radius: 999px; background: rgba(10,8,30,.65); color: #fff; backdrop-filter: blur(6px); animation: f13-pulse 1.2s ease-in-out infinite; }
.f13-signal i { width: 5px; border-radius: 2px; background: rgba(255,255,255,.35); }
.f13-signal i:nth-child(1) { height: 6px; background: #ff4772; } .f13-signal i:nth-child(2) { height: 10px; } .f13-signal i:nth-child(3) { height: 14px; } .f13-signal i:nth-child(4) { height: 18px; }
.f13-signal b { margin-left: 8px; font: 800 13px Inter, system-ui; letter-spacing: .5px; }
@keyframes f13-pulse { 50% { opacity: .55; } }
.f12-caption b { display: inline-block; padding: 10px 20px; border-radius: 14px; background: rgba(8,6,26,.6); backdrop-filter: blur(6px); color: #fff; font: 800 clamp(20px, 3.4vw, 34px) Inter, system-ui; letter-spacing: -.3px; }
.f12-caption small { display: block; margin-top: 8px; color: rgba(255,255,255,.9); font: 600 clamp(14px, 1.8vw, 18px) Inter, system-ui; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.f12-caption.is-in b, .f12-caption.is-in small { animation: f12-in .5s both; } .f12-caption.is-in small { animation-delay: .15s; }
.f12-title.f13-title { place-content: end center; padding-bottom: 11vh; }
.f13-title h1 { text-shadow: 0 4px 30px rgba(0,0,0,.35); }
.f13-title h1 { font: 800 clamp(48px, 10vw, 120px) var(--display); letter-spacing: -3px; }

/* ---- Loading (1.3): the logo draws itself; a real progress bar ---- */
.ld-mark { display: inline-block; filter: drop-shadow(0 10px 24px rgba(58,36,184,.35)); }
.ld-ring { stroke-dasharray: 100; stroke-dashoffset: 100; animation: ld-ring 2.4s cubic-bezier(.65,0,.35,1) infinite; }
.ld-tail { transform-origin: 37.5px 37.5px; animation: ld-tail 2.4s cubic-bezier(.3,1.4,.5,1) infinite; }
.ld-smile { stroke-dasharray: 10; stroke-dashoffset: 10; animation: ld-smile 2.4s ease infinite; }
.ld-eyes { transform-origin: 30px 28px; animation: ld-blink 2.4s ease infinite; }
@keyframes ld-ring { 0% { stroke-dashoffset: 100; } 45%, 85% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -100; } }
@keyframes ld-tail { 0%, 35% { transform: scale(0); } 50%, 88% { transform: scale(1); } 100% { transform: scale(0); } }
@keyframes ld-smile { 0%, 45% { stroke-dashoffset: 10; } 60%, 88% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 10; } }
@keyframes ld-blink { 0%, 40% { opacity: 0; transform: scaleY(1); } 48% { opacity: 1; } 70% { transform: scaleY(1); } 73% { transform: scaleY(.1); } 76%, 88% { transform: scaleY(1); opacity: 1; } 100% { opacity: 0; } }
.loader:not(.ld-boot) { gap: 14px; }
.loader:not(.ld-boot) .loader-tipbox { border: none; background: none; padding: 0; max-width: 360px; }
.loader:not(.ld-boot) .loader-tip { color: var(--ink-2); font-weight: 600; font-size: 14px; min-height: 2.8em; }
.ld-boot { position: relative; min-height: 100vh; min-height: 100dvh; padding: 0; gap: 0; grid-template-rows: 1fr auto; color: #fff; overflow: hidden;
  background: radial-gradient(1100px 700px at 50% 38%, #241a6b 0%, #120d36 45%, #090620 100%); }
.ld-glow { position: absolute; left: 50%; top: 38%; width: 520px; height: 520px; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, rgba(107,76,255,.35), transparent 65%); filter: blur(10px); animation: ld-breathe 4s ease-in-out infinite; pointer-events: none; }
@keyframes ld-breathe { 50% { transform: translate(-50%, -50%) scale(1.12); opacity: .75; } }
.ld-center { position: relative; display: grid; justify-items: center; align-content: center; gap: 18px; }
.ld-word .logo-word { font-size: 2.3rem; color: #fff; }
.ld-progress { width: min(320px, 72vw); display: grid; gap: 8px; margin-top: 8px; }
.ld-track { height: 4px; border-radius: 99px; background: rgba(255,255,255,.12); overflow: hidden; }
.ld-track i { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(0); border-radius: inherit; background: linear-gradient(90deg, #8b73ff, #ffcd1f); box-shadow: 0 0 12px rgba(255,205,31,.6); }
.ld-row { display: flex; justify-content: space-between; font: 600 13px Inter, Figtree, system-ui; color: rgba(255,255,255,.65); }
.ld-pct { font-variant-numeric: tabular-nums; }
.ld-foot { position: relative; display: grid; justify-items: center; gap: 14px; padding: 0 20px calc(22px + env(safe-area-inset-bottom)); text-align: center; }
.ld-tip { max-width: 440px; display: grid; gap: 4px; }
.ld-tip b { font: 700 11px Inter, system-ui; letter-spacing: .12em; text-transform: uppercase; color: #ffcd1f; }
.ld-tip .loader-tip { color: rgba(255,255,255,.82); font-weight: 600; font-size: 15px; }
.ld-foot small { color: rgba(255,255,255,.4); font-weight: 600; font-size: 12px; }
[data-motion='calm'] .ld-ring, [data-motion='calm'] .ld-tail, [data-motion='calm'] .ld-smile, [data-motion='calm'] .ld-eyes, [data-motion='calm'] .ld-glow { animation: none; stroke-dashoffset: 0; opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .ld-ring, .ld-tail, .ld-smile, .ld-eyes, .ld-glow { animation: none; stroke-dashoffset: 0; opacity: 1; transform: none; } }
.ld-mark .logo-mark { width: 100%; height: 100%; }
.ld-bounce { animation: ld-bounce 1.6s cubic-bezier(.3,1.4,.5,1) infinite; }
@keyframes ld-bounce { 0%, 100% { transform: translateY(0) rotate(0); } 30% { transform: translateY(-10px) rotate(-6deg); } 55% { transform: translateY(0) rotate(3deg) scale(1.04, .96); } }
@media (prefers-reduced-motion: reduce) { .ld-bounce { animation: none; } }
[data-motion='calm'] .ld-bounce { animation: none; }
/* Bricolage Grotesque: bold and a little quirky; it reads best a touch tighter */
h1, h2, h3, .display { letter-spacing: -0.02em; }
.logo-word { letter-spacing: -0.03em; }

/* ---- Security (1.3) ---- */
.code-input { font: 800 28px var(--display); letter-spacing: .25em; text-align: center; max-width: 240px; margin: 0 auto; }
.code-ic { display: grid; place-items: center; width: 60px; height: 60px; margin: 0 auto; border-radius: 18px; background: #ece8ff; color: #6b4cff; }
.sec-check { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; padding: 14px 16px; margin-bottom: 6px; border-radius: 16px; border: 1px solid var(--line); }
.sec-check.is-good { background: #e9fbf3; border-color: #b9ecd5; } .sec-check.is-ok { background: #fff8e1; border-color: #ffe7a3; } .sec-check.is-low { background: #ffeef1; border-color: #ffc6d1; }
.sec-score b { display: block; font: 800 28px var(--display); }
.sec-score small { font-weight: 800; color: var(--ink-2); }
.sec-check ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.sec-check li { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; font-size: 13px; font-weight: 800; background: rgba(0,0,0,.05); color: var(--ink-2); }
.sec-check li.is-on { background: #12c9a6; color: #fff; }
.sec-tips { margin-top: 10px; padding: 10px 14px; border-radius: 12px; background: var(--bg, #f6f4ff); }
.sec-tips summary { cursor: pointer; font-weight: 800; }
.sec-tips ul { margin: 8px 0 0; padding-left: 18px; color: var(--ink-2); font-weight: 600; line-height: 1.55; }
.tfa-steps { margin: 0; padding-left: 20px; display: grid; gap: 10px; font-weight: 600; }
.tfa-steps .code-input { margin: 8px 0 0; }
.tfa-scan { list-style: none; margin-left: -20px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.tfa-qr { width: 168px; height: 168px; padding: 8px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.tfa-qr svg { width: 100%; height: 100%; display: block; }
.tfa-key { display: block; font: 700 15px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .05em; padding: 8px 10px; border-radius: 8px; background: var(--bg, #f6f4ff); word-break: break-all; max-width: 260px; }

/* ---- Sidebar (1.3): calmer, sharper, grouped ---- */
@media (min-width: 721px) {
  .sidebar { gap: 16px; padding: 16px 12px; background: linear-gradient(180deg, #151036 0%, #0e0a26 100%); box-shadow: none; border-right: 1px solid rgba(255,255,255,.06); }
}
.side-logo { padding: 4px 8px 2px; }
.side-logo .logo-mark { width: 32px; height: 32px; }
.side-logo .ver { background: rgba(255,255,255,.1); color: rgba(255,255,255,.75); font-size: 11px; font-weight: 800; letter-spacing: .02em; }
.side-join { min-height: 0; padding: 11px 14px; border-radius: 12px; font-size: 15px; flex-direction: row; gap: 8px; }
.side-nav { display: grid; gap: 18px; }
.side-group { display: grid; gap: 1px; }
.side-group > small { padding: 0 10px 6px; font: 700 11px var(--sans); letter-spacing: .09em; text-transform: uppercase; color: rgba(255,255,255,.38); }
.side-link { gap: 11px; padding: 8px 10px; border-radius: 10px; font: 600 14.5px var(--sans); color: rgba(255,255,255,.72); position: relative; transition: background .15s, color .15s; }
.side-link svg { width: 18px; height: 18px; opacity: .8; }
.side-link:hover { transform: none; background: rgba(255,255,255,.05); color: #fff; }
.side-link.is-on { background: rgba(255,255,255,.09); color: #fff; box-shadow: none; }
.side-link.is-on::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--zing); }
.side-link.is-on svg { opacity: 1; color: var(--zing); }
.side-link .verified { transform: scale(.9); }
.side-end { gap: 8px; padding-top: 12px; border-top-color: rgba(255,255,255,.07); }
.side-card { padding: 8px 10px 8px 8px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06); }
.side-card:hover { transform: none; background: rgba(255,255,255,.08); }
.side-card .blook { width: 36px; height: 36px; border-radius: 10px; background: rgba(255,255,255,.06); }
.side-card-text b { font: 700 14px var(--sans); }
.side-tools { gap: 4px; }
.side-tool { height: 34px; border-radius: 9px; background: transparent; color: rgba(255,255,255,.6); }
.side-tool:hover { transform: none; background: rgba(255,255,255,.07); }

/* ---- Settings (1.3): a calm, serious layout like a real app ---- */
.set-page { max-width: 1060px; display: grid; gap: 18px; }
.set-titlebar h1 { margin: 0; font: 800 clamp(26px, 3vw, 32px) var(--display); letter-spacing: -0.02em; }
.set-head { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.set-head-avatar { width: 64px; height: 64px; border-radius: 16px; background: var(--bg, #f3f1fb); display: grid; place-items: center; overflow: hidden; flex: none; }
.set-head-avatar > * { width: 54px !important; height: 54px !important; }
.set-head h1 { font: 700 20px var(--sans); letter-spacing: 0; }
.set-head-sub { color: var(--ink-2); font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-head-stats { display: flex; gap: 22px; }
.set-head-stats > div { display: grid; text-align: center; }
.set-head-stats b { font: 700 18px var(--sans); }
.set-head-stats small { color: var(--ink-2); font-weight: 600; font-size: 12px; }
.set-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
.set-nav { position: sticky; top: 16px; display: grid; gap: 2px; }
.set-nav .set-tab { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; background: none; box-shadow: none; border: none; font: 600 14.5px var(--sans); color: var(--ink-2); text-decoration: none; }
.set-nav .set-tab:hover { background: rgba(23,19,63,.05); color: var(--ink); }
.set-nav .set-tab.is-on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(23,19,63,.08), inset 0 0 0 1px var(--line); }
.set-nav .set-tab.is-on svg { color: #6b4cff; }
.set-main .set-card { padding: 20px 22px; border-radius: 16px; border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(23,19,63,.04); scroll-margin-top: 16px; }
.set-main .set-title { font: 700 18px var(--sans); letter-spacing: -0.01em; margin: 0 0 4px; }
.set-main .set-ic { width: 30px; height: 30px; border-radius: 9px; background: #f1eeff; color: #6b4cff; box-shadow: none; }
.set-main .set-row { padding: 14px 0; border-top: 1px solid var(--line); }
.set-main .set-row b { font: 600 15px var(--sans); }
.set-main .set-row .muted { font-weight: 500; line-height: 1.45; }
/* Quickzy Pro */
.pro-card { display: grid; gap: 12px; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg, #f7f6fc); margin-bottom: 8px; }
.pro-card.is-pro { background: linear-gradient(135deg, #fff8dc, #fff1c4); border-color: #f5d77a; }
.pro-card-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.pro-card-top b { display: block; font: 700 16px var(--sans); }
.pro-card-top small { color: var(--ink-2); font-weight: 600; }
.pro-card-top .verified { width: 28px; height: 28px; }
.pro-free-dot { width: 12px; height: 12px; border-radius: 50%; background: #c9c4e2; }
.pro-days { text-align: center; } .pro-days b { font: 800 24px var(--display); } .pro-days small { display: block; }
.pro-bar { height: 6px; border-radius: 99px; background: rgba(0,0,0,.08); overflow: hidden; } .pro-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffb21f, #ff8a2a); border-radius: inherit; }
.pro-limits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 6px; }
.pro-limits > div { position: relative; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); overflow: hidden; }
.pro-limits small { display: block; color: var(--ink-2); font-weight: 600; font-size: 12px; }
.pro-limits b { font: 700 15px var(--sans); }
.pro-limits i { position: absolute; left: 0; bottom: 0; height: 3px; width: var(--w); background: #6b4cff; }
/* text size */
html[data-text='large'] { font-size: 112.5%; } html[data-text='large'] body { font-size: 17.5px; }
html[data-text='larger'] { font-size: 125%; } html[data-text='larger'] body { font-size: 19.5px; }
@media (max-width: 860px) {
  .set-layout { grid-template-columns: 1fr; gap: 12px; }
  .set-nav { position: sticky; top: 56px; z-index: 6; display: flex; overflow-x: auto; gap: 6px; padding: 6px; margin: 0 -4px; border-radius: 12px; background: var(--bg, #f3f1fb); }
  .set-nav .set-tab { white-space: nowrap; padding: 8px 12px; }
  .pro-limits { grid-template-columns: 1fr 1fr; }
  .set-head-stats { width: 100%; justify-content: space-around; }
}

/* ---- home: the changelog and the invite link, right on the page ---- */
.cl { display: grid; gap: 14px; padding: clamp(18px, 3vw, 28px); border-radius: 22px; background: var(--card); border: 1px solid var(--line); }
.cl-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cl-head .hm-h2 { margin: 2px 0 0; }
.cl-ver { display: inline-block; font-weight: 800; font-size: 12px; letter-spacing: .6px; text-transform: uppercase; color: #6b4cff; }
.cl-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.cl-list li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; background: var(--bg, #f6f4ff); }
.cl-list b { display: block; font-weight: 800; color: var(--ink); }
.cl-list p { margin: 2px 0 0; font-size: 14px; line-height: 1.45; color: var(--ink-2); font-weight: 600; }
.cl-ic { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; color: #fff; }
.cl-old { border-top: 1px solid var(--line); padding-top: 10px; }
.cl-old summary { cursor: pointer; font-weight: 800; color: var(--ink); display: flex; align-items: center; gap: 10px; list-style: none; }
.cl-old summary::before { content: '▸'; color: var(--ink-2); transition: transform .2s; }
.cl-old[open] summary::before { transform: rotate(90deg); }
.cl-old summary small { color: var(--ink-2); font-weight: 600; }
.cl-old .cl-list { margin-top: 10px; }
.inv { display: flex; gap: 18px; align-items: center; padding: clamp(18px, 3vw, 26px); border-radius: 22px; background: linear-gradient(135deg, #fff0f5, #f1ecff); border: 1px solid #ffc2d6; color: #17133f; }
.inv-art { flex: none; width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; background: #fff; box-shadow: 0 6px 18px rgba(255,71,114,.18); }
.inv-body { flex: 1; min-width: 0; display: grid; gap: 6px; }
.inv-body h2 { margin: 0; font: 800 clamp(20px, 2.4vw, 26px)/1.15 var(--display); }
.inv-body p { margin: 0; color: #5b5680; font-weight: 600; }
.inv-row { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.inv-url { flex: 1 1 240px; min-width: 0; font-family: ui-monospace, monospace; font-size: 14px; background: #fff; }
.inv .btn.is-done { background: #12c9a6; border-color: #12c9a6; }
@media (max-width: 560px) { .inv { flex-direction: column; text-align: center; } .inv-row { justify-content: center; } }
:root[data-theme="dark"] .inv { background: linear-gradient(135deg, #2a1f55, #1f1a4a); border-color: #4a3a8a; color: var(--ink); }
:root[data-theme="dark"] .inv-body p { color: var(--ink-2); }
:root[data-theme="dark"] .inv-art { background: #17133f; }
:root[data-theme="dark"] .inv-url { background: var(--card); color: var(--ink); }

/* ---- settings: one pane at a time, search, and one save bar ---- */
.set-pane[hidden], .set-row[hidden], .set-card[hidden] { display: none !important; }
.set-search { margin-bottom: 8px; padding: 9px 12px; font-size: 14px; border-radius: 10px; }
.set-none { margin: 8px 2px; }
.set-head-view { margin-left: auto; }
.set-avatar { width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(160deg, #f4f1ff, #e6e0ff); box-shadow: inset 0 0 0 1px var(--line); flex: none; }
.set-avatar .blook { width: 88px !important; height: 88px !important; }
.set-savebar { position: sticky; bottom: 12px; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 12px 10px 16px; margin-top: 6px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 6px 22px rgba(23,19,63,.08); }
.set-save-note { font-weight: 600; font-size: 14px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 8px; }
.set-save-note::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #12c9a6; }
.set-savebar .btn-ghost { display: none; }
.set-savebar.is-dirty { border-color: #ffb21f; box-shadow: 0 8px 26px rgba(255,178,31,.22); }
.set-savebar.is-dirty .set-save-note { color: var(--ink); }
.set-savebar.is-dirty .set-save-note::before { background: #ffb21f; }
.set-savebar.is-dirty .btn-ghost { display: inline-flex; }
@media (max-width: 860px) { .set-search { flex: none; width: 150px; margin: 0; } .set-head-view { margin-left: 0; } .set-savebar { bottom: 74px; } }

/* ---- profile: level, most played, collection, finish-your-profile ---- */
.pf-level { display: flex; align-items: center; gap: 10px; max-width: 360px; font-weight: 700; font-size: 14px; color: var(--ink); }
.pf-level small { color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.pf-level-bar { flex: 1; height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.pf-level-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #6b4cff, #ff4772); }
.pf-star { display: grid; gap: 4px; padding: 16px 18px; border-radius: 16px; text-decoration: none; color: #fff; background: linear-gradient(120deg, #17133f, #3b2a9a); box-shadow: 0 8px 24px rgba(23,19,63,.18); transition: transform .2s; }
.pf-star:hover { transform: translateY(-2px); }
.pf-star b { font: 800 20px/1.2 var(--display); }
.pf-star small { opacity: .75; font-weight: 600; }
.pf-star-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: #ffcd1f; }
.pf-collect-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-collect-item { width: 60px; height: 60px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--rc) 14%, var(--card)); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--rc) 45%, transparent); }
.pf-todo { display: grid; gap: 8px; padding: 14px 16px; border-radius: 16px; background: var(--card); border: 1px dashed #c9bfff; }
.pf-todo-head { display: flex; justify-content: space-between; gap: 10px; }
.pf-todo-head small { color: var(--ink-2); font-weight: 600; }
.pf-todo-bar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.pf-todo-bar i { display: block; height: 100%; background: #12c9a6; border-radius: inherit; }
.pf-todo-list { display: flex; flex-wrap: wrap; gap: 6px; }
.pf-todo-item { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; font-size: 13px; font-weight: 700; color: var(--ink); background: var(--bg, #f6f4ff); text-decoration: none; }
a.pf-todo-item:hover { background: #ece7ff; }
.pf-todo-item.is-done { color: #0f8f76; background: #e3f8f2; text-decoration: line-through; }
.pf-actions .btn svg { margin-right: 2px; }
.cl { text-align: left; justify-items: stretch; }
.cl > * { width: 100%; }
.cl-head { text-align: left; }

/* ---- More settings: a menu of buttons, each opening its own page ---- */
.set-view[hidden], .set-menu[hidden] { display: none !important; }
.set-pane.is-searching .set-view { display: grid !important; }
.set-pane.is-searching .set-menu, .set-pane.is-searching .set-back { display: none !important; }
.set-menu { padding: 20px 22px 10px; }
.set-link { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 6px; border: 0; border-top: 1px solid var(--line); background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; border-radius: 0; }
.set-link:hover { background: rgba(23,19,63,.035); }
.set-link b { display: block; font: 600 15px var(--sans); }
.set-link small { display: block; color: var(--ink-2); font-weight: 500; font-size: 13.5px; margin-top: 2px; }
.set-link > svg { color: var(--ink-2); flex: none; }
.set-link-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: #f1eeff; color: #6b4cff; flex: none; }
.set-back { justify-self: start; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px 6px 6px; border: 0; background: none; font: 600 14px var(--sans); color: #6b4cff; cursor: pointer; border-radius: 8px; }
.set-back:hover { background: #f1eeff; }

/* ===================================================== 1.4: sign-up questions */
.wl { max-width: 620px; margin: 0 auto; display: grid; gap: 18px; padding-top: clamp(12px, 4vh, 40px); }
.wl-top { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.wl-top .logo-mark, .wl-top svg { width: 34px; height: 34px; }
.wl-top > b { flex: 1; }
.wl-dots { display: flex; gap: 6px; }
.wl-dots i { width: 22px; height: 6px; border-radius: 6px; background: var(--line-2); transition: background .3s; }
.wl-dots i.is-on { background: var(--violet); }
.wl-card { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: clamp(20px, 4vw, 34px); display: grid; gap: 14px; box-shadow: var(--shadow); animation: wl-in .35s ease both; }
.wl-card h1 { margin: 0; font-size: clamp(24px, 4vw, 32px); }
.wl-card p { margin: 0; }
.wl-step { font-size: 12px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--violet); }
.wl-back { justify-self: start; margin: -6px 0 -4px -8px; }
.wl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.wl-choice { font: inherit; font-weight: 800; padding: 16px 14px; border-radius: 16px; border: 2px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; text-align: left; transition: transform .15s, border-color .15s, background .15s; }
.wl-choice:hover { transform: translateY(-2px); border-color: var(--violet); }
.wl-choice.is-on { background: var(--violet); border-color: var(--violet); color: #fff; }
.wl-age { text-align: center; }
.wl-uses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.wl-use { font: inherit; display: grid; gap: 8px; justify-items: center; text-align: center; padding: 20px 14px; border-radius: 20px; border: 2px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; transition: transform .15s, border-color .15s; }
.wl-use:hover { transform: translateY(-3px); border-color: var(--violet); }
.wl-use b { display: inline-flex; align-items: center; gap: 6px; font-size: 18px; }
.wl-use small { color: var(--ink-2); font-weight: 600; line-height: 1.4; }
.wl-use-art { display: inline-flex; padding: 8px; border-radius: 50%; background: var(--card); }
.wl-saving { display: grid; justify-items: center; gap: 12px; padding: 30px 0; }
.wl-saving .blook, .wl-saving > :first-child { animation: wl-bob 1s ease-in-out infinite alternate; }
.wl-done { display: grid; gap: 14px; text-align: center; justify-items: stretch; }
.wl-blooks { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.wl-blooks > * { animation: wl-pop .5s cubic-bezier(.3, 1.6, .5, 1) both; }
.wl-blooks > :nth-child(2) { animation-delay: .06s; } .wl-blooks > :nth-child(3) { animation-delay: .12s; } .wl-blooks > :nth-child(4) { animation-delay: .18s; } .wl-blooks > :nth-child(5) { animation-delay: .24s; }
.wl-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.wl-link { display: grid; gap: 4px; justify-items: center; padding: 14px 8px; border-radius: 16px; background: var(--bg); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: transform .15s; }
.wl-link:hover { transform: translateY(-2px); }
.wl-link svg { color: var(--violet); }
.wl-link small { color: var(--muted); font-weight: 600; }
.wl-join { flex-wrap: nowrap; }
.wl-join .input { flex: 1; min-width: 0; }
@keyframes wl-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes wl-pop { from { opacity: 0; transform: scale(.4); } }
@keyframes wl-bob { to { transform: translateY(-8px); } }
@media (max-width: 520px) { .wl-uses, .wl-links { grid-template-columns: 1fr; } }

/* ============================================================== 1.4: classes */
.side-new { margin-left: auto; font-size: 10px; font-weight: 800; letter-spacing: .5px; padding: 2px 7px; border-radius: 999px; background: var(--zing); color: var(--night); }
.cls-hero { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; padding: clamp(20px, 4vw, 34px); border-radius: 24px; color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, #6b4cff 0%, #2e2675 45%, #17133f 100%); }
.cls-hero h1 { margin: 8px 0 6px; color: #fff; }
.cls-hero p { margin: 0; opacity: .88; max-width: 560px; }
.cls-hero .pill { background: rgba(255, 255, 255, .14); color: #fff; }
.cls-join { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 16px 18px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.cls-join > div:not(.cls-join-row) { display: grid; gap: 2px; flex: 1; min-width: 180px; }
.cls-join.is-compact { padding: 0; border: 0; background: none; }
.cls-join-row { flex: 1; flex-wrap: nowrap; min-width: 240px; }
.cls-join-row .input { flex: 1; min-width: 0; }
.cl-code-input { text-transform: uppercase; letter-spacing: 3px; font-weight: 800; }
.cls-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.cls-card { --cls: #6b4cff; display: grid; grid-template-rows: auto 1fr; border-radius: 20px; overflow: hidden; background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: transform .15s, box-shadow .15s; }
.cls-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.cls-card-top { display: grid; gap: 4px; padding: 18px; min-height: 92px; align-content: end; color: #fff; background: linear-gradient(135deg, var(--cls), color-mix(in srgb, var(--cls) 55%, #17133f)); }
.cls-card-top b { font-size: 19px; }
.cls-card-top small { opacity: .85; font-weight: 600; }
.cls-card-end { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 18px; font-weight: 700; font-size: 14px; }
.cls-card-end > span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.cls-colors { gap: 8px; }
.cls-color { width: 30px; height: 30px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; box-shadow: 0 0 0 2px var(--line); }
.cls-color.is-on { border-color: var(--card); box-shadow: 0 0 0 3px var(--ink); }
.cls-banner { --cls: #6b4cff; display: grid; gap: 4px; padding: clamp(20px, 4vw, 32px); border-radius: 24px; color: #fff; min-height: 150px; align-content: end; position: relative;
  background: linear-gradient(135deg, var(--cls), color-mix(in srgb, var(--cls) 45%, #17133f)); }
.cls-banner h1 { margin: 0; color: #fff; }
.cls-banner p { margin: 0; opacity: .88; font-weight: 600; }
.cls-back { position: absolute; top: 14px; left: 16px; display: inline-flex; align-items: center; gap: 6px; color: #fff; opacity: .85; font-weight: 800; text-decoration: none; font-size: 14px; }
.cls-back:hover { opacity: 1; }
.cls-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
@media (max-width: 900px) { .cls-layout { grid-template-columns: 1fr; } .cls-side.is-teacher { order: -1; } }
.cls-compose { gap: 12px; }
.cls-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.cls-tabs .chip { display: inline-flex; align-items: center; gap: 6px; }
.cls-compose textarea { resize: vertical; min-height: 80px; }
.cls-q-edit { flex-wrap: nowrap; gap: 8px; }
.cls-q-edit .input { flex: 1; min-width: 0; }
.cls-right { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--card); color: transparent; display: grid; place-items: center; cursor: pointer; }
.cls-right.is-on { background: var(--ok); border-color: var(--ok); color: #fff; }
.cls-post { display: grid; gap: 12px; animation: wl-in .3s ease both; }
.cls-post-head { display: flex; align-items: center; gap: 10px; }
.cls-post-head > div { display: grid; }
.cls-post-ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; flex: none; }
.cls-text { margin: 0; white-space: pre-wrap; line-height: 1.5; }
.cls-game { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-radius: 16px; background: var(--night); color: #fff; }
.cls-game > div { display: grid; }
.cls-game small { opacity: .75; font-weight: 700; }
.cls-game b { font-size: 30px; letter-spacing: 3px; }
.cls-hw { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--bg); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.cls-hw > div { display: grid; }
.cls-hw-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #12c9a6; color: #fff; flex: none; }
.cls-q { display: grid; gap: 10px; }
.cls-q-text { font-size: 18px; }
.cls-q-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 520px) { .cls-q-opts { grid-template-columns: 1fr; } }
.cls-q-opt { --q: #6b4cff; font: inherit; font-weight: 800; padding: 14px; border-radius: 14px; border: 0; background: var(--q); color: #fff; cursor: pointer; text-align: left; box-shadow: 0 4px 0 color-mix(in srgb, var(--q) 70%, #000); transition: transform .12s, opacity .2s; }
.cls-q-opt:hover:not(:disabled) { transform: translateY(-2px); }
.cls-q-opt:disabled { cursor: default; }
.cls-q-opt.is-right { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 40%, transparent); }
.cls-q-opt.is-wrong { background: var(--bad); }
.cls-q-opt.is-dim { opacity: .45; }
.cls-q-bar { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--bg); overflow: hidden; font-weight: 700; }
.cls-q-bar i { position: absolute; inset: 0 auto 0 0; opacity: .22; transition: width .5s; }
.cls-q-bar > span, .cls-q-bar > b { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.cls-q-bar.is-right { outline: 2px solid var(--ok); }
.cls-q-who summary { cursor: pointer; font-weight: 800; color: var(--ink-2); font-size: 14px; }
.cls-q-who ul { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 4px; }
.cls-q-who li { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.cls-q-who li.is-right svg { color: var(--ok); } .cls-q-who li.is-wrong svg { color: var(--bad); }
.cls-codecard { display: grid; gap: 8px; text-align: center; justify-items: center; }
.cls-codecard > small:first-child { font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--violet); }
.cls-code { font-size: 34px; letter-spacing: 5px; }
.cls-people h3 { font-size: 16px; }
.cls-people ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.cls-person { display: flex; align-items: center; gap: 10px; }
.cls-person > a, .cls-person > div { display: grid; color: var(--ink); text-decoration: none; min-width: 0; }
.cls-person b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cls-added { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; color: var(--ok); font-weight: 700; }
.cls-added li { display: flex; align-items: center; gap: 6px; }
.cls-send { --cls: #6b4cff; justify-content: flex-start; gap: 10px; }
.cls-send > i { width: 14px; height: 14px; border-radius: 50%; background: var(--cls); flex: none; }
.hm-classes { display: grid; gap: 14px; padding: clamp(18px, 3vw, 28px); border-radius: 22px; background: var(--card); border: 1px solid var(--line); text-align: left; }
.hm-classes-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hm-classes-head h2 { margin: 2px 0 0; }
.hm-class-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.hm-class { display: grid; gap: 2px; padding: 14px 16px; border-radius: 16px; background: var(--bg); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.hm-class small { color: var(--muted); font-weight: 600; }
.owner-bar { display: grid; grid-template-columns: 160px 1fr 50px; align-items: center; gap: 10px; font-weight: 700; }
.owner-bar i { height: 12px; border-radius: 8px; background: var(--violet); min-width: 2px; }
.owner-bar b { text-align: right; }

/* ============================================ 1.4 polish: welcome + classes */
.wl-stage { position: relative; min-height: calc(100vh - 40px); display: grid; align-content: start; overflow: hidden;
  background: radial-gradient(60% 50% at 15% 10%, rgba(107, 76, 255, .16), transparent 70%), radial-gradient(50% 45% at 90% 80%, rgba(255, 71, 114, .14), transparent 70%), radial-gradient(40% 40% at 85% 10%, rgba(18, 201, 166, .14), transparent 70%); }
.wl-stage .wl { position: relative; z-index: 1; width: 100%; }
.wl-float span { position: absolute; opacity: .9; animation: wl-drift 7s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -1.2s); filter: drop-shadow(0 8px 14px rgba(23, 19, 63, .18)); }
.wl-float span:nth-child(1) { top: 12%; left: 4%; } .wl-float span:nth-child(2) { top: 58%; left: 6%; transform: rotate(-8deg); }
.wl-float span:nth-child(3) { top: 30%; left: 13%; } .wl-float span:nth-child(4) { top: 14%; right: 5%; }
.wl-float span:nth-child(5) { top: 52%; right: 4%; } .wl-float span:nth-child(6) { top: 78%; right: 13%; }
@keyframes wl-drift { from { translate: 0 0; rotate: -6deg; } to { translate: 0 -18px; rotate: 6deg; } }
@media (max-width: 1100px) { .wl-float { display: none; } }
.wl-dots i { width: 28px; height: 8px; }
.wl-dots i.is-on { background: linear-gradient(90deg, #6b4cff, #ff4772); }
.wl-card { border: 0; box-shadow: 0 2px 0 rgba(23, 19, 63, .04), 0 30px 60px -30px rgba(23, 19, 63, .35); position: relative; overflow: hidden; }
.wl-card::before { content: ''; position: absolute; inset: 0 0 auto; height: 6px; background: linear-gradient(90deg, #ff4772, #ffcd1f, #12c9a6, #2f9bff, #6b4cff); }
.wl-choice { --c: #6b4cff; display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--card); border-color: var(--line); animation: wl-in .35s ease both; }
.wl-choice:hover { border-color: var(--c); box-shadow: 0 8px 20px -12px var(--c); }
.wl-choice.is-on { background: var(--c); border-color: var(--c); }
.wl-emoji { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 21px; background: color-mix(in srgb, var(--c) 14%, transparent); }
.wl-dial { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 8px 0; }
.wl-step-btn { width: 60px; height: 60px; border-radius: 50%; border: 0; font: inherit; font-size: 30px; font-weight: 800; cursor: pointer; color: #fff; background: var(--violet); box-shadow: 0 5px 0 var(--violet-deep); transition: transform .1s; }
.wl-step-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--violet-deep); }
.wl-age-box { display: grid; justify-items: center; }
.wl-age { width: 150px; font: inherit; font-size: 64px; font-weight: 800; text-align: center; border: 0; border-bottom: 4px solid var(--line-2); background: none; color: var(--ink); padding: 0; -moz-appearance: textfield; }
.wl-age::-webkit-outer-spin-button, .wl-age::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.wl-age:focus { outline: none; border-color: var(--violet); }
.wl-age.is-bad { border-color: var(--bad); animation: wl-shake .3s; }
.wl-age-box small { color: var(--muted); font-weight: 700; margin-top: 4px; }
@keyframes wl-shake { 25% { translate: -6px 0; } 75% { translate: 6px 0; } }
.wl-lock { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-weight: 700; font-size: 13px; }
.wl-use { position: relative; overflow: hidden; border: 0; color: #fff; padding: 22px 16px 18px; box-shadow: 0 6px 0 rgba(0, 0, 0, .15); }
.wl-use-personal { background: linear-gradient(160deg, #ff8a2a, #ff4772); }
.wl-use-teacher { background: linear-gradient(160deg, #12c9a6, #2f6bff); }
.wl-use::after { content: ''; position: absolute; width: 180px; height: 180px; border-radius: 50%; background: rgba(255, 255, 255, .1); top: -70px; right: -60px; }
.wl-use small { color: rgba(255, 255, 255, .9); }
.wl-use-art { background: rgba(255, 255, 255, .22); }
.wl-use-go { margin-top: 4px; display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; background: rgba(255, 255, 255, .22); font-weight: 800; font-size: 14px; }
.wl-use:hover { transform: translateY(-4px) rotate(-.5deg); }
.wl-link { background: var(--card); box-shadow: 0 4px 0 var(--line); }
.wl-link:nth-child(1) svg { color: #ffb21f; } .wl-link:nth-child(2) svg { color: #ff4772; } .wl-link:nth-child(3) svg { color: #2f9bff; }

.cls-hero { position: relative; overflow: hidden; align-items: center; min-height: 220px; padding-right: clamp(20px, 34%, 380px);
  background: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .09) 1px, transparent 0) 0 0 / 22px 22px, radial-gradient(120% 140% at 100% 0%, #7b5cff 0%, #2e2675 48%, #17133f 100%); }
.cls-hero-copy { display: grid; gap: 4px; justify-items: start; }
.cls-hero-copy .btn { margin-top: 10px; }
.cls-hero-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.cls-hero-stats span { display: inline-flex; align-items: baseline; gap: 6px; padding: 8px 14px; border-radius: 14px; background: rgba(255, 255, 255, .1); font-weight: 700; font-size: 14px; }
.cls-hero-stats b { font-size: 20px; color: var(--zing); }
.cls-hero-art { position: absolute; right: 24px; bottom: 0; width: min(34%, 340px); height: 190px; }
.cls-board { position: absolute; right: 10px; top: 0; width: 78%; height: 96px; border-radius: 12px; background: #1d5e4c; border: 6px solid #8a5a2b; box-shadow: 0 10px 24px rgba(0, 0, 0, .3); display: grid; align-content: center; gap: 8px; padding: 0 18px; }
.cls-board i { height: 5px; border-radius: 4px; background: rgba(255, 255, 255, .7); }
.cls-board i:nth-child(2) { width: 70%; } .cls-board i:nth-child(3) { width: 45%; background: #ffcd1f; }
.cls-kid { position: absolute; bottom: 6px; left: calc(var(--i) * 19%); animation: wl-drift 3.5s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -.6s); filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .3)); }
.cls-kid:first-of-type { left: auto; right: -6px; bottom: 30px; }
@media (max-width: 760px) { .cls-hero { padding-right: clamp(20px, 4vw, 34px); padding-bottom: 170px; } .cls-hero-art { left: 20px; right: 20px; width: auto; height: 150px; } .cls-board { height: 70px; } }
.cls-join { gap: 14px; box-shadow: 0 4px 0 var(--line); }
.cls-join-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #ffb21f, #ff8a2a); flex: none; }
.cls-card { box-shadow: 0 4px 0 var(--line); }
.cls-card-top { position: relative; min-height: 120px; padding-top: 56px; overflow: hidden;
  background: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .14) 1px, transparent 0) 0 0 / 16px 16px, linear-gradient(135deg, var(--cls), color-mix(in srgb, var(--cls) 50%, #17133f)); }
.cls-card-top::after { content: ''; position: absolute; width: 140px; height: 140px; border-radius: 50%; right: -40px; top: -60px; background: rgba(255, 255, 255, .12); }
.cls-initial { position: absolute; top: 14px; left: 16px; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .22); font-weight: 800; font-size: 19px; }
.cls-card-code { position: absolute; top: 18px; right: 14px; z-index: 1; display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: rgba(0, 0, 0, .22); font-weight: 800; font-size: 12px; letter-spacing: 1.5px; }
.cls-role { font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--cls) 15%, transparent); color: var(--cls); }
.cls-new-tile { font: inherit; display: grid; place-items: center; align-content: center; gap: 6px; min-height: 172px; border-radius: 20px; border: 2px dashed var(--line-2); background: transparent; color: var(--ink-2); cursor: pointer; transition: border-color .15s, color .15s, transform .15s; }
.cls-new-tile:hover { border-color: var(--violet); color: var(--violet); transform: translateY(-3px); }
.cls-new-tile > span { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: var(--card); box-shadow: 0 4px 0 var(--line); }
.cls-new-tile small { color: var(--muted); font-weight: 700; }
.cls-banner { overflow: hidden; min-height: 190px; padding-top: 52px; padding-right: clamp(20px, 30%, 300px);
  background: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .14) 1px, transparent 0) 0 0 / 18px 18px, linear-gradient(135deg, var(--cls), color-mix(in srgb, var(--cls) 45%, #17133f)); }
.cls-banner::after { content: ''; position: absolute; width: 300px; height: 300px; border-radius: 50%; right: -80px; bottom: -160px; background: rgba(255, 255, 255, .1); }
.cls-banner-art { position: absolute; right: 36px; bottom: 18px; z-index: 1; animation: wl-drift 4s ease-in-out infinite alternate; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .3)); }
.cls-banner-tag { justify-self: start; display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, .18); font-weight: 800; font-size: 13px; }
.cls-banner h1 { font-size: clamp(28px, 4.5vw, 44px); }
.cls-banner-code { justify-self: start; margin-top: 8px; display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 14px; border: 0; font: inherit; cursor: pointer; color: var(--night); background: #fff; box-shadow: 0 4px 0 rgba(0, 0, 0, .2); }
.cls-banner-code small { font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.cls-banner-code b { font-size: 20px; letter-spacing: 3px; }
@media (max-width: 640px) { .cls-banner-art { right: 14px; top: 14px; bottom: auto; transform: scale(.7); } .cls-banner { padding-right: 20px; } }
.cls-compose-head { display: flex; align-items: center; gap: 10px; }
.cls-compose-head > div { display: grid; }
.cls-post { border-left: 5px solid var(--k, #6b4cff); }
.cls-post.is-note { --k: #2f9bff; } .cls-post.is-game { --k: #ff4772; } .cls-post.is-homework { --k: #12c9a6; } .cls-post.is-question { --k: #ffb21f; }
.cls-post-ic { background: var(--k, #6b4cff); }
.cls-game { background: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .1) 1px, transparent 0) 0 0 / 16px 16px, linear-gradient(135deg, #17133f, #3a2c99); }
.cls-empty { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 30px 20px; }
.cls-empty p { margin: 0; }
.cls-codecard { background: linear-gradient(160deg, var(--card), color-mix(in srgb, var(--violet) 8%, var(--card))); }
.wl-blooks { flex-wrap: nowrap; }
.wl-link, .wl-link:hover { text-decoration: none; }
@media (max-width: 520px) { .wl-blooks .blook, .wl-blooks > * { max-width: 54px; } .wl-blooks svg, .wl-blooks img { width: 50px; height: 50px; } }

/* ======================================== Candy Factory + Treasure Hunt, rebuilt */
.cf-root { padding: 64px 14px 18px; gap: 14px; background: radial-gradient(circle at 1px 1px, rgba(255, 71, 114, .12) 1.5px, transparent 0) 0 0 / 22px 22px, linear-gradient(170deg, #fff0f6, #f1e6ff 60%, #e3f6ff); }
.cf-factory { position: relative; width: min(640px, 100%); border-radius: 22px 22px 16px 16px; padding: 30px 16px 14px; color: #fff;
  background: linear-gradient(160deg, #ff6f9c, #c84bd8); box-shadow: 0 6px 0 #9c2f8f, 0 18px 30px -16px rgba(156, 47, 143, .6); display: grid; gap: 10px; }
.cf-roof { position: absolute; left: 18px; top: -26px; display: flex; gap: 10px; }
.cf-roof i { width: 26px; height: 36px; border-radius: 6px 6px 0 0; background: linear-gradient(#ff9ab8, #e05b8c); position: relative; }
.cf-roof i::before { content: ''; position: absolute; left: 50%; top: -18px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: rgba(255, 255, 255, .7); animation: cf-puff 2.4s ease-out infinite; }
.cf-roof i:nth-child(2)::before { animation-delay: -.8s; } .cf-roof i:nth-child(3)::before { animation-delay: -1.6s; }
@keyframes cf-puff { from { transform: translateY(8px) scale(.4); opacity: .9; } to { transform: translateY(-30px) scale(1.6); opacity: 0; } }
.cf-sign { justify-self: center; display: inline-flex; align-items: center; gap: 8px; padding: 6px 18px; border-radius: 999px; background: #fff; color: #e0457b; font: 400 clamp(22px, 4.5vw, 30px) 'Bricolage Grotesque', system-ui; box-shadow: 0 4px 0 rgba(0, 0, 0, .15); }
.cf-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cf-stats > div { display: grid; padding: 8px 12px; border-radius: 14px; background: rgba(255, 255, 255, .16); }
.cf-stats small { font-weight: 800; opacity: .85; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.cf-cash, .cf-rate { font: 400 clamp(24px, 5vw, 34px) 'Bricolage Grotesque', system-ui; color: #fff; }
.cf-cash { color: #c8ffe9; }
.cf-belt { width: 100%; height: 54px; border-radius: 12px; border: 4px solid #6b3a7a; background: repeating-linear-gradient(90deg, #4b3f78 0 18px, #3b3163 18px 36px); }
.cf-belt.is-on { animation: cf-belt 1s linear infinite; }
.cf-belt i { position: absolute; top: 6px; left: -40px; width: auto; height: auto; border: 0; background: none; font-size: 30px; font-style: normal; line-height: 1; animation: cf-move 4.2s linear infinite; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .35)); }
.cf-answer { font: inherit; display: inline-flex; align-items: center; gap: 10px; padding: 14px 26px; border: 0; border-radius: 18px; cursor: pointer; font-size: 20px; font-weight: 900; color: #17133f;
  background: linear-gradient(#ffe066, #ffc21f); box-shadow: 0 6px 0 #d99a00, 0 14px 22px -12px rgba(217, 154, 0, .8); transition: transform .1s; }
.cf-answer:not(:disabled) > span { display: inline-block; animation: cf-breathe 1.2s ease-in-out infinite; }
.cf-answer:active { transform: translateY(4px); box-shadow: 0 2px 0 #d99a00; }
.cf-answer:disabled { filter: grayscale(.5); opacity: .7; cursor: default; }
.cf-answer > span { font-size: 24px; }
@keyframes cf-breathe { 50% { transform: scale(1.25) rotate(-8deg); } }
.cf-hint { margin: -4px 0 0; font-weight: 800; color: #7a4a8a; }
.cf-shop { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; width: min(820px, 100%); }
.cf-machine { padding: 14px 14px 16px; gap: 3px; border: 0; background: #fff; color: #17133f; box-shadow: 0 4px 0 color-mix(in srgb, var(--c) 45%, #ddd); transition: transform .15s, box-shadow .15s; overflow: hidden; font: inherit; cursor: pointer; }
.cf-machine.is-ready { box-shadow: 0 4px 0 var(--c), 0 0 0 3px var(--c); animation: cf-ready 1.4s ease-in-out infinite; }
.cf-machine.is-ready:hover { transform: translateY(-3px); }
.cf-machine:disabled { opacity: 1; filter: saturate(.55); }
.cf-machine:disabled .cf-icon { filter: grayscale(.4); }
@keyframes cf-ready { 50% { box-shadow: 0 4px 0 var(--c), 0 0 0 5px color-mix(in srgb, var(--c) 40%, transparent); } }
.cf-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 30px; background: color-mix(in srgb, var(--c) 18%, #fff); margin-bottom: 4px; }
.cf-owned { position: absolute; top: 12px; left: 52px; padding: 2px 8px; border-radius: 999px; background: var(--c); color: #fff; font-weight: 900; font-size: 13px; }
.cf-machine small { color: #6b6890; font-weight: 700; }
.cf-cost { position: static; margin-top: 6px; padding: 4px 10px; border-radius: 10px; background: color-mix(in srgb, #12c9a6 14%, #fff); color: #0b8f6c; font-weight: 900; }
.cf-machine:disabled .cf-cost { background: #f2f0f7; color: #8a86ad; }
.cf-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: #f0ecf8; }
.cf-bar i { display: block; height: 100%; background: var(--c); transition: width .4s; }

.th-root { padding: 64px 14px 18px; background: linear-gradient(#7fd3ff 0%, #bfeaff 40%, #ffe9b0 62%, #f3c97a 100%); overflow: hidden; }
.th-root > :not(.th-scene) { position: relative; z-index: 1; }
.th-scene { position: absolute; inset: 0; pointer-events: none; }
.th-sun { position: absolute; top: 9%; right: 12%; width: 74px; height: 74px; border-radius: 50%; background: radial-gradient(#fff6c4, #ffd23f); box-shadow: 0 0 60px 20px rgba(255, 220, 90, .5); }
.th-sea { position: absolute; left: 0; right: 0; top: 46%; height: 14%; background: linear-gradient(#2fb8e8, #1a8fc9); }
.th-sea::after { content: ''; position: absolute; left: 0; right: 0; top: -6px; height: 12px; background: radial-gradient(circle at 10px 12px, #fff 6px, transparent 7px) 0 0 / 24px 12px repeat-x; opacity: .7; animation: th-waves 3s linear infinite; }
@keyframes th-waves { to { background-position: 24px 0; } }
.th-sand { position: absolute; left: -10%; right: -10%; top: 57%; bottom: 0; border-radius: 50% 50% 0 0 / 14% 14% 0 0; background: linear-gradient(#ffe4a3, #f0c26b); }
.th-palm { position: absolute; bottom: 18%; font-size: clamp(70px, 14vw, 130px); filter: drop-shadow(0 8px 6px rgba(0, 0, 0, .2)); transform-origin: bottom center; animation: th-sway 4s ease-in-out infinite alternate; }
.th-palm.is-l { left: 3%; } .th-palm.is-r { right: 3%; animation-delay: -2s; transform: scaleX(-1); }
@keyframes th-sway { from { rotate: -3deg; } to { rotate: 3deg; } }
.th-ship { position: absolute; top: 38%; left: 10%; font-size: 40px; animation: th-sail 30s linear infinite; }
@keyframes th-sail { from { left: -10%; } to { left: 110%; } }
.th-title { color: #fff; text-shadow: 0 3px 0 #b5652a, 0 6px 14px rgba(0, 0, 0, .2); }
.th-status { padding: 6px 16px; border-radius: 999px; background: rgba(255, 255, 255, .8); color: #5a3412; }
.th-chests { gap: clamp(14px, 4vw, 34px); margin: 8px 0; }
.th-chest { width: clamp(96px, 26vw, 150px); height: clamp(86px, 23vw, 130px); overflow: visible; }
/* the chest's insides bob, not the button itself, so it is still easy to tap */
.th-chest:not(:disabled) > .th-box, .th-chest:not(:disabled) > .th-lid { animation: th-bob 1.6s ease-in-out infinite; }
.th-chest:not(:disabled):nth-child(2) > span { animation-delay: -.5s; } .th-chest:not(:disabled):nth-child(3) > span { animation-delay: -1s; }
@keyframes th-bob { 50% { translate: 0 -6px; } }
.th-glow { position: absolute; inset: -20% -15% -10%; border-radius: 50%; background: radial-gradient(rgba(255, 230, 100, .8), transparent 65%); opacity: 0; transition: opacity .3s; }
.th-chest:not(:disabled) .th-glow { opacity: 1; animation: th-glow 1.6s ease-in-out infinite; }
@keyframes th-glow { 50% { opacity: .45; } }
.th-box { background: linear-gradient(90deg, transparent 18%, #f3c13a 18% 26%, transparent 26% 74%, #f3c13a 74% 82%, transparent 82%), linear-gradient(#b8763d, #7a4a22); border: 4px solid #4a2a0c; border-radius: 8px 8px 12px 12px; }
.th-lid { background: linear-gradient(90deg, transparent 18%, #f3c13a 18% 26%, transparent 26% 74%, #f3c13a 74% 82%, transparent 82%), linear-gradient(#d6955a, #9c6230); border: 4px solid #4a2a0c; z-index: 1; transform-origin: 10% 100%; transition: transform .45s cubic-bezier(.3, 1.6, .5, 1); }
.th-lock { position: absolute; left: 50%; top: 2px; width: 22px; height: 24px; margin-left: -11px; border-radius: 4px 4px 8px 8px; background: linear-gradient(#ffe36b, #e0a800); border: 3px solid #4a2a0c; z-index: 2; }
.th-chest.is-open .th-lid { transform: rotate(-38deg) translate(-6px, -14px); }
.th-chest.is-open .th-lock { opacity: 0; }
.th-burst { position: absolute; left: 50%; bottom: 40%; translate: -50% 0; font-size: clamp(36px, 8vw, 54px); z-index: 3; animation: th-pop-up .6s cubic-bezier(.3, 1.6, .5, 1) both; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .3)); }
@keyframes th-pop-up { from { transform: translateY(30px) scale(.2); opacity: 0; } }
.th-prize { top: -46%; z-index: 4; text-shadow: 0 3px 0 #7a4a22, 0 0 14px rgba(0, 0, 0, .25); }
.th-answer { background: linear-gradient(#ffe066, #ffc21f); }
.th-pick { background: rgba(255, 255, 255, .95); box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .35); }
.th-screen { background: linear-gradient(#7fd3ff 0%, #bfeaff 30%, #ffe4a3 55%, #f0c26b 100%); }
.th-screen h2 { text-shadow: 0 3px 0 #b5652a; }
.cf-screen { background: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .2) 1.5px, transparent 0) 0 0 / 22px 22px, linear-gradient(140deg, #ff8fb1, #a560ff); }
.cf-screen h2 { text-shadow: 0 3px 0 #9c2f8f; }
.hm-bento { justify-items: stretch; text-align: left; } .hm-bento > .hm-tile { width: auto; margin: 0; }
.hm-tile-present p { max-width: 24ch; }
