/* =========================================================
   Chalkplay — shared stylesheet
   Paper, chalkboard and sticky-note motifs on a clean grid.
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  --paper: #FBF8F2;
  --paper-2: #F4EFE5;
  --paper-3: #EAE3D4;
  --card: #FFFFFF;
  --ink: #1B2232;
  --ink-2: #4A5367;
  --ink-3: #7C8498;
  --line: #E8E1D3;
  --line-2: #D9D0BE;
  --grid: rgba(61, 126, 234, .075);

  --green: #1E6B52;
  --green-2: #16533F;
  --green-3: #E2F1E9;
  --board: #22493E;
  --board-2: #1A3A31;
  --chalk: #F3F0E6;
  --chalk-2: rgba(243, 240, 230, .74);
  --yellow: #FFC845;
  --yellow-2: #FFE8A6;
  --coral: #EB6544;
  --blue: #3D7EEA;
  --violet: #7C5CE6;
  --pink: #DD4F8A;
  --margin-red: #F0A39A;
  --rule: #DCE7F5;

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --r-xl: 32px;

  --shadow-sm: 0 1px 2px rgba(27, 34, 50, .06);
  --shadow: 0 1px 2px rgba(27, 34, 50, .04), 0 10px 28px -6px rgba(27, 34, 50, .12);
  --shadow-lg: 0 2px 6px rgba(27, 34, 50, .05), 0 28px 56px -12px rgba(27, 34, 50, .22);

  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-hand: "Caveat", "Segoe Print", "Bradley Hand", cursive;

  --header-h: 72px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
svg { flex-shrink: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.1; letter-spacing: -.02em; margin: 0; font-weight: 700; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--yellow-2); color: var(--ink); }
[hidden] { display: none !important; }

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

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 300; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 700; }
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 860px; }
@media (min-width: 768px) { .container { padding: 0 32px; } }

/* ---------- Icons ---------- */
.i { width: 1.25em; height: 1.25em; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Type ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--green); }
.eyebrow .i { width: 16px; height: 16px; }
.h-display { font-size: clamp(42px, 6.2vw, 76px); font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.h1 { font-size: clamp(34px, 4.6vw, 54px); font-weight: 800; letter-spacing: -.035em; line-height: 1.04; }
.h2 { font-size: clamp(28px, 3.6vw, 44px); font-weight: 800; letter-spacing: -.03em; line-height: 1.06; }
.h3 { font-size: 22px; font-weight: 700; }
.h4 { font-size: 18px; font-weight: 700; }
.lead { font-size: clamp(17px, 1.55vw, 20px); color: var(--ink-2); line-height: 1.55; }
.muted { color: var(--ink-3); }
.small { font-size: 14px; }
p > .i:first-child { display: inline-block; width: 1.1em; height: 1.1em; vertical-align: -.2em; margin-right: 2px; }
.hand { font-family: var(--font-hand); font-weight: 600; }
.text-center { text-align: center; }

.marker {
  background: linear-gradient(transparent 56%, var(--yellow) 56%, var(--yellow) 90%, transparent 90%);
  padding: 0 .06em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.scribble { position: relative; white-space: nowrap; display: inline-block; }
.scribble > svg { position: absolute; left: -3%; width: 106%; bottom: -.2em; height: .32em; color: var(--coral); pointer-events: none; }
.scribble > svg path { fill: none; stroke: currentColor; stroke-width: 5; stroke-linecap: round; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  height: 44px; padding: 0 20px; border-radius: 12px;
  border: 1.5px solid transparent;
  font-weight: 700; font-size: 15px; line-height: 1; white-space: nowrap;
  cursor: pointer; text-decoration: none;
  transition: background-color .15s, border-color .15s, color .15s, transform .12s, box-shadow .15s;
}
.btn .i { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green); color: #fff; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .2); }
.btn-primary:hover { background: var(--green-2); }
.btn-accent { background: var(--yellow); color: var(--ink); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .12); }
.btn-accent:hover { background: #FFBD24; }
.btn-dark { background: var(--ink); color: #fff; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .3); }
.btn-dark:hover { background: #2A3348; }
.btn-secondary { background: var(--card); border-color: var(--line-2); color: var(--ink); }
.btn-secondary:hover { border-color: var(--ink-3); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--paper-2); }
.btn-chalk { background: transparent; border-color: rgba(243, 240, 230, .45); color: var(--chalk); }
.btn-chalk:hover { background: rgba(243, 240, 230, .1); border-color: var(--chalk); }
.btn-danger { background: #C8412B; color: #fff; }
.btn-danger:hover { background: #A93522; }
.btn-sm { height: 38px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn-sm .i { width: 16px; height: 16px; }
.btn-lg { height: 54px; padding: 0 26px; font-size: 17px; border-radius: 14px; }
.btn-lg .i { width: 20px; height: 20px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }

.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border-radius: 10px; border: 0; background: transparent; color: var(--ink-2);
  transition: background-color .15s, color .15s;
}
.icon-btn:hover { background: var(--paper-2); color: var(--ink); }
.icon-btn .i { width: 20px; height: 20px; }
.icon-btn.sm { width: 32px; height: 32px; border-radius: 8px; }
.icon-btn.sm .i { width: 17px; height: 17px; }

.link { color: var(--green); font-weight: 700; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.link:hover { color: var(--green-2); }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--green); }
.link-arrow .i { width: 18px; height: 18px; transition: transform .15s; }
.link-arrow:hover .i { transform: translateX(3px); }

/* ---------- Badges & chips ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px;
  border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1; white-space: nowrap;
}
.badge .i { width: 12px; height: 12px; stroke-width: 2.5; }
.badge-free { background: var(--green-3); color: var(--green-2); }
.badge-pro { background: #FFF0C2; color: #6E4B00; }
.badge-live { background: #FCE6EF; color: #9E2A5A; }
.badge-print { background: #ECEFF5; color: #485166; }
.badge-new { background: var(--ink); color: #fff; }
.badge-muted { background: var(--paper-2); color: var(--ink-2); }
.badge-demo { background: #E8F0FD; color: #1F4FA8; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 760px) {
  .chips-scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 2px 20px 6px; }
  .chips-scroll::-webkit-scrollbar { display: none; }
}
.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 15px;
  border-radius: 999px; border: 1.5px solid var(--line-2); background: var(--card);
  font-size: 14px; font-weight: 700; color: var(--ink-2); white-space: nowrap;
  cursor: pointer; transition: background-color .15s, border-color .15s, color .15s;
}
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip .i { width: 16px; height: 16px; }
.chip .count { font-size: 12px; font-weight: 700; opacity: .55; }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--ink-3)); }
.chip.is-active, .chip[aria-pressed="true"], .chip[aria-selected="true"], .chip[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.is-active .dot, .chip[aria-pressed="true"] .dot, .chip[aria-selected="true"] .dot, .chip[aria-current="true"] .dot { box-shadow: 0 0 0 2px #fff; }
.chip.sm { height: 32px; padding: 0 12px; font-size: 13px; }

.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); }
.tag .i { width: 15px; height: 15px; }

.cat-ico {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  background: var(--t); color: var(--d);
}
.cat-ico .i { width: 17px; height: 17px; stroke-width: 2.2; }

/* ---------- Header ---------- */
[data-include="header"] { display: block; height: var(--header-h); }
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(251, 248, 242, .86);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, background-color .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); background: rgba(251, 248, 242, .94); }
.header-inner { display: flex; align-items: center; gap: 20px; height: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 23px; letter-spacing: -.04em; color: var(--ink); }
.logo svg { width: 36px; height: 36px; transition: transform .25s; }
.logo:hover svg { transform: rotate(-8deg); }
.main-nav { display: flex; gap: 2px; margin-left: 8px; }
.main-nav a { position: relative; padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: 15px; color: var(--ink-2); transition: color .15s, background-color .15s; }
.main-nav a:hover { color: var(--ink); background: var(--paper-2); }
.main-nav a[aria-current="page"] { color: var(--ink); }
.main-nav a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 3px; border-radius: 3px; background: var(--yellow); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav-toggle { display: none; }
.mobile-nav { border-top: 1px solid var(--line); background: var(--paper); padding: 12px 20px 20px; max-height: calc(100vh - var(--header-h)); overflow: auto; }
.mobile-nav a { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; font-weight: 700; }
.mobile-nav a .i { color: var(--ink-3); }
.mobile-nav a:hover, .mobile-nav a[aria-current="page"] { background: var(--paper-2); }
.mobile-nav .mobile-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.mobile-nav .mobile-cta .btn { width: 100%; }

@media (max-width: 1100px) {
  .main-nav { display: none; }
  .nav-toggle { display: inline-grid; }
  .header-actions .hide-md { display: none; }
}
@media (max-width: 560px) {
  .header-actions .btn-primary .label { display: none; }
  .header-actions .btn-primary { width: 40px; padding: 0; }
}

/* ---------- Footer ---------- */
.site-footer { margin-top: 112px; padding: 72px 0 28px; position: relative; }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; background: #CDB892; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .08); }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 40px; }
.footer-brand .logo { color: var(--chalk); }
.footer-brand p { margin-top: 14px; max-width: 320px; color: var(--chalk-2); }
.footer-brand .hand { display: block; margin-top: 18px; font-size: 26px; color: var(--yellow); line-height: 1.1; }
.footer-col h3 { font-family: var(--font-body); font-size: 13px; letter-spacing: .09em; text-transform: uppercase; color: #fff; margin-bottom: 12px; font-weight: 800; }
.footer-col a { display: block; padding: 5px 0; color: var(--chalk-2); transition: color .15s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 56px; padding-top: 24px; border-top: 1px dashed rgba(243, 240, 230, .22); font-size: 14px; color: var(--chalk-2); }
.footer-lang { display: inline-flex; align-items: center; gap: 8px; }
.footer-lang select { height: 38px; border-radius: 10px; border: 1px solid rgba(243, 240, 230, .3); background: rgba(0, 0, 0, .15); color: var(--chalk); padding: 0 12px; }
.footer-lang select option { color: var(--ink); }
.footer-mini { padding: 28px 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-3); }
.footer-mini .container { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
.footer-mini nav { display: flex; gap: 20px; }
.footer-mini a:hover { color: var(--ink); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Surfaces ---------- */
.chalk {
  background-color: var(--board);
  background-image:
    radial-gradient(rgba(255, 255, 255, .05) 1px, transparent 1.6px),
    radial-gradient(rgba(255, 255, 255, .035) 1px, transparent 1.6px),
    radial-gradient(140% 90% at 12% 0%, rgba(255, 255, 255, .08), transparent 55%),
    radial-gradient(120% 100% at 100% 100%, rgba(0, 0, 0, .2), transparent 60%);
  background-size: 9px 9px, 17px 17px, 100% 100%, 100% 100%;
  background-position: 0 0, 4px 7px, 0 0, 0 0;
  color: var(--chalk);
}
.paper-grid {
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 30px 30px;
  background-position: -1px -1px;
}
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 22px; }
.panel + .panel { margin-top: 16px; }
.panel-title { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 17px; margin-bottom: 14px; letter-spacing: -.01em; }
.panel-title .i { width: 18px; height: 18px; color: var(--ink-3); }
.panel-title .badge { margin-left: auto; }

/* Notebook paper card */
.notebook {
  position: relative; background-color: #fff; border-radius: 14px; box-shadow: var(--shadow);
  padding: 14px 18px 12px 46px;
  background-image: linear-gradient(transparent 27px, var(--rule) 27px, var(--rule) 28px, transparent 28px);
  background-size: 100% 28px; background-position: 0 14px;
  line-height: 28px;
}
.notebook::before { content: ""; position: absolute; top: 0; bottom: 0; left: 34px; width: 1.5px; background: var(--margin-red); }
.notebook::after {
  content: ""; position: absolute; left: 11px; top: 24px; bottom: 24px; width: 12px;
  background: radial-gradient(circle, var(--paper-3) 4.5px, transparent 5px) center top / 12px 56px repeat-y;
}

/* Chalkboard frame */
.board-frame {
  position: relative; border-radius: 26px; padding: 12px 14px 18px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06), 0 30px 60px -24px rgba(26, 58, 49, .6);
}
.board-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 6px 10px; min-height: 40px; }
.board-title { font-family: var(--font-hand); font-weight: 600; font-size: 28px; line-height: 1; color: var(--chalk); }
.board-dots { display: flex; gap: 6px; }
.board-dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(243, 240, 230, .22); }
.board-dots i:first-child { background: var(--yellow); }
.stage { position: relative; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; background: var(--paper); box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); }
.stage > svg { width: 100%; height: 100%; }
.stage .thumb-swap { position: absolute; inset: 0; animation: swap-in .35s ease both; }
.stage .thumb-swap svg { width: 100%; height: 100%; }
@keyframes swap-in { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.chalk-ledge { position: absolute; left: 9%; right: 9%; bottom: -10px; height: 11px; border-radius: 0 0 10px 10px; background: #CDB892; box-shadow: 0 8px 14px -8px rgba(0, 0, 0, .4); }
.chalk-ledge span { position: absolute; top: -4px; height: 7px; border-radius: 4px; background: #FFFDF6; }
.chalk-ledge span:first-child { left: 10%; width: 36px; }
.chalk-ledge span:last-child { left: 20%; width: 22px; background: var(--yellow-2); }

/* Sticky notes */
.notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 28px; }
.note {
  position: relative; padding: 30px 24px 26px; background: var(--note, #FFF1B0); border-radius: 3px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .05), 0 16px 28px -16px rgba(27, 34, 50, .35);
  rotate: var(--r, -1deg); transition: rotate .25s, translate .25s;
}
.note:hover { rotate: 0deg; translate: 0 -4px; }
.note::before {
  content: ""; position: absolute; top: -11px; left: 50%; width: 88px; height: 24px; translate: -50% 0; rotate: -2deg;
  background: rgba(255, 255, 255, .55); border: 1px solid rgba(0, 0, 0, .04); box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
}
.note .i { width: 28px; height: 28px; color: rgba(27, 34, 50, .75); }
.note h3 { font-size: 21px; margin: 14px 0 8px; }
.note p { color: #3B4256; font-size: 15.5px; }
@media (max-width: 960px) { .notes { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .notes { grid-template-columns: 1fr; } }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-sm { padding: 64px 0; }
.section-tight { padding: 48px 0; }
.section-head { max-width: 760px; margin: 0 auto 44px; text-align: center; }
.section-head .eyebrow { margin-bottom: 14px; }
.section-head .lead { margin-top: 16px; }
.section-head.left { margin-left: 0; text-align: left; }
.section-head.split { max-width: none; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; text-align: left; }
@media (max-width: 760px) { .section { padding: 72px 0; } .section-sm { padding: 48px 0; } }

/* Page head (inner pages) */
.page-head { position: relative; padding: 56px 0 36px; }
.page-head .lead { margin-top: 14px; max-width: 660px; }
.page-head.center { text-align: center; }
.page-head.center .lead { margin-left: auto; margin-right: auto; }
.page-head.grid-bg::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 30px 30px;
  -webkit-mask-image: linear-gradient(#000, transparent 92%);
  mask-image: linear-gradient(#000, transparent 92%);
}
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 14px; color: var(--ink-3); margin-bottom: 18px; }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; }
.breadcrumb .i { width: 14px; height: 14px; }
.breadcrumb [aria-current] { color: var(--ink-2); font-weight: 600; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field + .field { margin-top: 16px; }
.label { font-weight: 700; font-size: 14px; }
.label .opt { font-weight: 500; color: var(--ink-3); }
.hint { font-size: 13px; color: var(--ink-3); line-height: 1.45; }
.error-text { font-size: 13px; color: #B33A24; font-weight: 600; }
.input, .select, .textarea {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 12px;
  border: 1.5px solid var(--line-2); background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 120px; padding: 12px 14px; resize: vertical; line-height: 1.55; }
.input:hover, .select:hover, .textarea:hover { border-color: #C6BCA7; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px rgba(30, 107, 82, .14); }
.input::placeholder, .textarea::placeholder { color: #A2A8B6; }
.input.is-invalid, .textarea.is-invalid { border-color: #D2553D; box-shadow: 0 0 0 4px rgba(210, 85, 61, .12); }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237C8498' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
}
.input-sm, .select.input-sm { height: 40px; border-radius: 10px; font-size: 14px; }
.input-lg { height: 58px; font-size: 18px; border-radius: 14px; padding: 0 18px; }
.input-icon { position: relative; }
.input-icon > .i { position: absolute; left: 15px; top: 50%; translate: 0 -50%; width: 19px; height: 19px; color: var(--ink-3); pointer-events: none; }
.input-icon > .input { padding-left: 44px; }
.input-icon > .input-lg { padding-left: 50px; }
.input-icon > .input-lg + .i, .input-icon.lg > .i { left: 18px; width: 21px; height: 21px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row .field + .field { margin-top: 0; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

.check { display: inline-flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 15px; line-height: 1.45; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--green); flex: none; }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; font-weight: 600; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { position: relative; width: 40px; height: 24px; border-radius: 99px; background: var(--line-2); transition: background-color .2s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s; }
.switch input:checked + .track { background: var(--green); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { outline: 3px solid var(--blue); outline-offset: 2px; }

.seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: 13px; background: var(--paper-2); border: 1px solid var(--line); }
.seg button { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px; border: 0; border-radius: 9px; background: transparent; font-weight: 700; font-size: 14px; color: var(--ink-2); transition: background-color .15s, color .15s, box-shadow .15s; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(27, 34, 50, .12); }
.seg button .badge { height: 20px; font-size: 11px; }
.seg.sm button { height: 30px; padding: 0 10px; font-size: 13px; }
.seg.sm button .i { width: 16px; height: 16px; }

.radio-cards { display: grid; gap: 8px; }
.radio-card { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1.5px solid var(--line-2); border-radius: 12px; cursor: pointer; background: #fff; transition: border-color .15s, background-color .15s; }
.radio-card input { margin: 3px 0 0; accent-color: var(--green); }
.radio-card:has(input:checked) { border-color: var(--green); background: var(--green-3); }
.radio-card strong { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; }
.radio-card strong .i { width: 16px; height: 16px; color: var(--ink-3); }
details.panel > summary { list-style: none; }
details.panel > summary::-webkit-details-marker { display: none; }
details.panel > summary .badge { margin-left: auto; }
.radio-card span { font-size: 13px; color: var(--ink-3); line-height: 1.4; }

/* ---------- Template cards ---------- */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.tpl-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; transition: transform .2s, box-shadow .2s, border-color .2s;
}
.tpl-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-2); }
.tpl-card:focus-within { box-shadow: 0 0 0 3px var(--blue); }
.tpl-thumb { position: relative; aspect-ratio: 16 / 10; background: var(--t); border-bottom: 1px solid var(--line); }
.tpl-thumb svg { width: 100%; height: 100%; }
.tpl-thumb .badge { position: absolute; top: 10px; right: 10px; box-shadow: var(--shadow-sm); }
.tpl-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; flex: 1; }
.tpl-name { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -.015em; }
.tpl-name a::after { content: ""; position: absolute; inset: 0; }
.tpl-name a:focus-visible { outline: none; }
.tpl-desc { font-size: 14px; color: var(--ink-2); line-height: 1.45; }
.tpl-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 10px; }

/* Compact template picker card (button) */
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.pick-card {
  display: flex; flex-direction: column; text-align: left; padding: 0; overflow: hidden;
  border: 1.5px solid var(--line); border-radius: 14px; background: #fff;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.pick-card:hover { border-color: var(--c); transform: translateY(-2px); box-shadow: var(--shadow); }
.pick-card[aria-pressed="true"] { border-color: var(--green); box-shadow: 0 0 0 3px rgba(30, 107, 82, .2); }
.pick-card .tpl-thumb { aspect-ratio: 16 / 9; }
.pick-card .pick-body { padding: 10px 12px 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.pick-card .pick-body > .flex:empty { display: none; }
.pick-card .pick-name { font-weight: 700; font-size: 15px; line-height: 1.2; }

/* ---------- Activity cards ---------- */
.act-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 20px; }
.act-card {
  position: relative; display: flex; flex-direction: column; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.act-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-2); }
.act-card:focus-within { box-shadow: 0 0 0 3px var(--blue); }
.act-thumb { position: relative; aspect-ratio: 16 / 10; background: var(--t); border-bottom: 1px solid var(--line); }
.act-thumb svg { width: 100%; height: 100%; }
.act-thumb .tpl-pill {
  position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px 0 4px; border-radius: 99px; background: rgba(255, 255, 255, .94);
  font-size: 12px; font-weight: 700; box-shadow: var(--shadow-sm);
}
.act-thumb .tpl-pill .cat-ico { width: 20px; height: 20px; border-radius: 99px; }
.act-thumb .tpl-pill .cat-ico .i { width: 12px; height: 12px; }
.act-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 14px; flex: 1; }
.act-title { font-weight: 700; font-size: 16.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.act-title a::after { content: ""; position: absolute; inset: 0; }
.act-title a:focus-visible { outline: none; }
.act-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--ink-3); }
.act-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--ink-3); }
.act-foot .who { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-weight: 600; }
.act-foot .plays { display: inline-flex; align-items: center; gap: 4px; }
.act-foot .plays .i { width: 14px; height: 14px; }
.avatar { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: 11px; font-weight: 800; color: #fff; background: var(--av, var(--green)); flex: none; }
.avatar.lg { width: 44px; height: 44px; font-size: 16px; }
.act-card .card-menu { position: absolute; top: 8px; right: 8px; z-index: 2; }
.act-card .card-menu .icon-btn { background: rgba(255, 255, 255, .92); box-shadow: var(--shadow-sm); }

/* ---------- Toolbar / filters ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 20px; }
.toolbar .grow { flex: 1 1 240px; }
.toolbar .select { width: auto; min-width: 150px; }
.results-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 18px; font-size: 14px; color: var(--ink-3); }
.filters-box { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 16px; margin-bottom: 24px; }
.filters-box .toolbar { margin-bottom: 0; }
.filters-box .toolbar + .toolbar { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }

/* Empty states */
.empty { text-align: center; padding: 56px 24px; border: 2px dashed var(--line-2); border-radius: 22px; background: rgba(255, 255, 255, .55); }
.empty .empty-art { width: 120px; height: 90px; margin: 0 auto 18px; }
.empty h3 { font-size: 22px; }
.empty p { color: var(--ink-2); margin: 8px auto 20px; max-width: 440px; }

/* ---------- Dialogs & toasts ---------- */
dialog.modal {
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 0;
  border-radius: 22px; background: var(--paper); color: var(--ink); box-shadow: var(--shadow-lg);
  overflow: auto;
}
dialog.modal.wide { width: min(760px, calc(100vw - 32px)); }
dialog.modal[open] { animation: pop .22s cubic-bezier(.2, .9, .3, 1.2); }
dialog.modal::backdrop { background: rgba(27, 34, 50, .45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 24px 4px; }
.modal-head h2 { font-size: 24px; }
.modal-head p { color: var(--ink-2); margin-top: 6px; font-size: 15px; }
.modal-body { padding: 16px 24px 24px; }
.modal-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 16px 24px; border-top: 1px solid var(--line); background: #fff; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

.toasts { position: fixed; left: 50%; bottom: 24px; translate: -50% 0; z-index: 400; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 14px; background: var(--ink); color: #fff; font-weight: 600; font-size: 14.5px; box-shadow: var(--shadow-lg); animation: toast-in .25s ease both; pointer-events: auto; }
.toast .i { width: 18px; height: 18px; color: var(--yellow); }
.toast.out { animation: toast-out .25s ease both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

/* Copy field */
.copy-field { display: flex; gap: 8px; }
.copy-field .input { font-size: 14px; color: var(--ink-2); background: var(--paper); }

/* Dropdown menu */
.menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 190px; padding: 6px; border-radius: 14px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.menu button, .menu a { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 9px; background: transparent; font-size: 14px; font-weight: 600; text-align: left; color: var(--ink); }
.menu button:hover, .menu a:hover { background: var(--paper-2); }
.menu .i { width: 17px; height: 17px; color: var(--ink-3); }
.menu .danger { color: #B33A24; }
.menu .danger .i { color: #B33A24; }

/* Tables */
/* Positioned so .sr-only text in cells is clipped by the scroll box instead of widening the page */
.table-wrap { position: relative; overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th, .table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table thead th { font-size: 12.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); background: var(--paper); white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 0 22px; transition: border-color .15s; }
.faq details[open] { border-color: var(--line-2); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; font-weight: 700; font-size: 17px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .i { width: 22px; height: 22px; color: var(--ink-3); transition: rotate .2s; flex: none; }
.faq details[open] summary .i { rotate: 45deg; }
.faq details > div { padding: 0 0 20px; color: var(--ink-2); }
.faq details > div p + p { margin-top: 10px; }

/* Meter */
.meter { height: 8px; border-radius: 99px; background: var(--paper-3); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: inherit; background: var(--green); }

/* Spinner */
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .7s linear infinite; }
.spinner.dark { border-color: rgba(27, 34, 50, .15); border-top-color: var(--ink); }
@keyframes spin { to { rotate: 360deg; } }

/* Demo notice */
.demo-note { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border-radius: 14px; background: #EEF4FE; color: #24467F; font-size: 14px; line-height: 1.45; }
.demo-note .i { width: 18px; height: 18px; margin-top: 1px; flex: none; }

/* =========================================================
   Home
   ========================================================= */
.hero { position: relative; padding: 64px 0 104px; overflow: hidden; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 30px 30px; background-position: -1px -1px;
  -webkit-mask-image: radial-gradient(ellipse 75% 75% at 60% 40%, #000 35%, transparent 78%);
  mask-image: radial-gradient(ellipse 75% 75% at 60% 40%, #000 35%, transparent 78%);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; align-items: center; }
.hero-copy .h-display { margin: 22px 0 22px; }
.hero-copy .lead { max-width: 540px; }
.pill-note { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 99px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); font-size: 14px; font-weight: 600; color: var(--ink-2); transition: border-color .15s; }
.pill-note:hover { border-color: var(--line-2); color: var(--ink); }
.pill-note .badge { height: 24px; }
.pill-note > .i { width: 16px; height: 16px; color: var(--ink-3); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 28px; font-size: 15px; color: var(--ink-2); font-weight: 600; }
.hero-points li { display: inline-flex; align-items: center; gap: 8px; }
.hero-points .i { width: 18px; height: 18px; color: var(--green); stroke-width: 2.6; }

.switcher { position: relative; padding-left: 28px; }
.switcher .board-frame { rotate: .6deg; }
.switcher-bottom { position: relative; display: grid; grid-template-columns: 216px minmax(0, 1fr); gap: 22px; align-items: start; margin-top: -54px; z-index: 2; }
.switcher .notebook { rotate: -3.5deg; margin-left: -28px; }
.nb-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-family: var(--font-display); font-weight: 800; font-size: 16px; }
.nb-title span { font-family: var(--font-body); font-size: 12px; font-weight: 700; color: var(--ink-3); }
.nb-list { font-size: 13.5px; counter-reset: nb; }
.nb-list li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nb-list b { font-weight: 800; color: var(--green); }
.nb-list span { color: var(--ink-2); }
.switcher-pick { padding-top: 76px; }
.switcher-pick .hand { display: flex; align-items: center; gap: 6px; font-size: 25px; color: var(--coral); line-height: 1; margin: 0 0 10px 4px; }
.switcher-pick .hand svg { width: 46px; height: 26px; color: var(--coral); }
.switcher-pick .hand svg path { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.switcher-pick .chips { gap: 6px; }
.switcher-pick .chip { height: 34px; padding: 0 12px 0 6px; font-size: 13.5px; }
.switcher-pick .chip .cat-ico { width: 24px; height: 24px; border-radius: 99px; }
.switcher-pick .chip .cat-ico .i { width: 14px; height: 14px; }
.switcher-pick .chip[aria-selected="true"] .cat-ico { background: rgba(255, 255, 255, .18); color: #fff; }

@media (max-width: 1060px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-copy { text-align: center; }
  .hero-copy .lead { margin: 0 auto; }
  .hero-cta, .hero-points { justify-content: center; }
  .switcher { max-width: 680px; margin: 0 auto; }
}
@media (max-width: 640px) {
  .hero { padding: 40px 0 72px; }
  .switcher { padding-left: 0; }
  .switcher .board-frame { rotate: 0deg; }
  .switcher-bottom { grid-template-columns: 1fr; margin-top: 20px; gap: 16px; }
  .switcher .notebook { rotate: 0deg; margin-left: 0; }
  .switcher-pick { padding-top: 0; }
}

/* Facts strip */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.fact { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 18px 20px; border-radius: 18px; background: #fff; border: 1px solid var(--line); }
.fact strong { font-family: var(--font-hand); font-weight: 700; font-size: 54px; line-height: .8; color: var(--green); }
.fact:nth-child(2) strong { color: var(--blue); }
.fact:nth-child(3) strong { color: var(--coral); }
.fact:nth-child(4) strong { color: var(--violet); }
.fact span { font-weight: 700; color: var(--ink-2); line-height: 1.25; max-width: 110px; }
@media (max-width: 860px) { .facts { grid-template-columns: 1fr 1fr; } }

/* How it works */
.board-band { position: relative; border-radius: var(--r-xl); padding: 72px 56px 80px; overflow: hidden; }
.board-band .section-head h2 { color: #fff; }
.board-band .eyebrow { color: var(--yellow); }
.board-band .lead { color: var(--chalk-2); }
.steps { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.step { position: relative; }
.step-num { display: block; font-family: var(--font-hand); font-weight: 700; font-size: 72px; line-height: .9; color: var(--yellow); }
.step h3 { color: #fff; font-size: 24px; margin: 12px 0 10px; }
.step p { color: var(--chalk-2); }
.step-arrow { position: absolute; top: 18px; right: -34px; width: 56px; height: 32px; color: rgba(243, 240, 230, .5); }
.step-arrow path { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 5 6; }
.chalk-doodle { position: absolute; color: rgba(243, 240, 230, .16); pointer-events: none; }
.chalk-doodle path, .chalk-doodle circle { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 860px) {
  .board-band { padding: 56px 28px 60px; border-radius: 26px; }
  .steps { grid-template-columns: 1fr; gap: 32px; }
  .step-arrow { display: none; }
}

/* Ways to play bento */
.ways { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.way { position: relative; grid-column: span 2; display: flex; flex-direction: column; gap: 10px; padding: 26px; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--line); overflow: hidden; }
.way.big { grid-column: span 3; }
.way .way-ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: var(--t, var(--green-3)); color: var(--d, var(--green)); }
.way .way-ico .i { width: 23px; height: 23px; }
.way h3 { font-size: 22px; margin-top: 6px; }
.way p { color: var(--ink-2); }
.way-art { margin-top: 18px; }
@media (max-width: 960px) { .ways { grid-template-columns: 1fr 1fr; } .way, .way.big { grid-column: span 1; } .way.big { grid-column: 1 / -1; } }
@media (max-width: 600px) { .ways { grid-template-columns: 1fr; } }

/* Mini illustrations inside "ways" */
.mini-board { border-radius: 16px; padding: 10px 10px 14px; max-width: 360px; }
.mini-board .stage { border-radius: 10px; }
.phone-art { display: flex; gap: 14px; align-items: flex-end; }
.phone { width: 150px; flex: none; border-radius: 26px; padding: 8px; background: var(--ink); box-shadow: var(--shadow); }
.phone-screen { border-radius: 19px; background: var(--paper); padding: 18px 12px 14px; text-align: center; }
.phone-screen .ps-label { font-size: 11px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; }
.phone-screen .ps-code { font-family: var(--font-display); font-weight: 800; font-size: 25px; letter-spacing: .06em; margin: 4px 0 10px; }
.phone-screen .ps-btn { height: 30px; border-radius: 9px; background: var(--green); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.players { display: flex; flex-wrap: wrap; gap: 6px; }
.player { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 99px; background: var(--paper-2); font-size: 13px; font-weight: 700; animation: swap-in .4s both; }
.player .avatar { width: 22px; height: 22px; font-size: 10px; }

/* AI section */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split .lead { margin-top: 16px; }
.check-list { display: grid; gap: 12px; margin-top: 24px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; }
.check-list .i { width: 22px; height: 22px; padding: 3px; border-radius: 50%; background: var(--green-3); color: var(--green); stroke-width: 3; flex: none; margin-top: 2px; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 40px; } }

.ai-mock { padding: 22px; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.ai-prompt { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-radius: 14px; border: 1.5px solid var(--line-2); }
.ai-prompt .i { color: var(--violet); }
.ai-prompt .txt { flex: 1; font-weight: 600; color: var(--ink-2); font-size: 15px; }
.ai-prompt .txt::after { content: ""; display: inline-block; width: 2px; height: 1.1em; margin-left: 2px; vertical-align: -3px; background: var(--ink); animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.ai-sources { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 16px; }
.ai-rows { display: grid; gap: 8px; }
.ai-row { display: grid; grid-template-columns: 26px 1fr 1fr; gap: 8px; align-items: center; font-size: 14px; animation: swap-in .4s both; }
.ai-row .n { font-weight: 800; color: var(--ink-3); font-size: 13px; text-align: center; }
.ai-row span:not(.n) { padding: 8px 12px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-row span.k { font-weight: 700; }

/* Library teaser */
.teaser { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr); gap: 56px; align-items: center; }
.teaser form { margin-top: 26px; }
.teaser .chips { margin-top: 14px; }
.teaser .act-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 960px) { .teaser { grid-template-columns: 1fr; gap: 36px; } }
@media (max-width: 560px) { .teaser .act-grid { grid-template-columns: 1fr; } }

/* CTA band */
.cta-band { position: relative; display: grid; grid-template-columns: 1.3fr auto; gap: 32px; align-items: center; padding: 48px 52px; border-radius: var(--r-xl); background-color: #FFF4CF; border: 1px solid #F2DE9C; overflow: hidden; }
.cta-band .lead { margin-top: 12px; color: #4D4A3A; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 860px) { .cta-band { grid-template-columns: 1fr; padding: 36px 28px; } }

.final-cta { text-align: center; border-radius: var(--r-xl); padding: 80px 28px 88px; position: relative; overflow: hidden; }
.final-cta h2 { color: #fff; max-width: 760px; margin: 0 auto; }
.final-cta .hand { display: block; color: var(--yellow); font-size: 30px; margin-bottom: 8px; }
.final-cta .lead { color: var(--chalk-2); margin: 18px auto 0; max-width: 560px; }
.final-cta .hero-cta { justify-content: center; }

/* =========================================================
   Templates
   ========================================================= */
.content-types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ctype { padding: 24px; border-radius: 20px; background: #fff; border: 1px solid var(--line); }
.ctype .ct-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.ctype .ct-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--paper-2); }
.ctype h3 { font-size: 19px; }
.ctype p { color: var(--ink-2); font-size: 14.5px; }
.ctype .chips { margin-top: 14px; gap: 6px; }
.ctype .chip { height: 30px; font-size: 13px; padding: 0 11px; }
@media (max-width: 960px) { .content-types { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .content-types { grid-template-columns: 1fr; } }

/* Catalogue: one group of cards per family */
.tpl-family:not([hidden]) ~ .tpl-family { margin-top: 44px; }
.family-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 18px; }
.family-head h2 { display: flex; align-items: center; gap: 10px; }

/* Template detail */
.tpl-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.tpl-hero .h1 { margin: 14px 0 14px; }
.tpl-hero .badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.tpl-hero .hero-cta { margin-top: 26px; }
.how-list { display: grid; gap: 14px; counter-reset: how; margin-top: 24px; }
.how-list li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; counter-increment: how; color: var(--ink-2); }
.how-list li::before { content: counter(how); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--t, var(--green-3)); color: var(--d, var(--green)); font-weight: 800; font-family: var(--font-display); }
.how-list li strong { display: block; color: var(--ink); }
.modes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.mode { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: 16px; background: #fff; border: 1px solid var(--line); }
.mode .i { width: 24px; height: 24px; color: var(--green); }
.mode.off { background: transparent; border-style: dashed; }
.mode.off .i, .mode.off strong { color: var(--ink-3); }
.mode strong { font-size: 15px; }
.mode span { font-size: 13px; color: var(--ink-3); }
.row-scroll { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 16px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
@media (max-width: 960px) { .tpl-hero { grid-template-columns: 1fr; gap: 36px; } .modes { grid-template-columns: 1fr 1fr; } }

/* =========================================================
   Create (editor)
   ========================================================= */
.stepper { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.stepper li { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; color: var(--ink-3); }
.stepper .n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line-2); font-size: 13px; background: #fff; }
.stepper .n .i { width: 15px; height: 15px; stroke-width: 3; }
.stepper li.is-current { color: var(--ink); }
.stepper li.is-current .n { background: var(--ink); border-color: var(--ink); color: #fff; }
.stepper li.is-done { color: var(--ink-2); }
.stepper li.is-done .n { background: var(--green); border-color: var(--green); color: #fff; }
.stepper .sep { width: 28px; height: 2px; border-radius: 2px; background: var(--line-2); }
.create-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 40px 0 28px; }
.create-head .h1 { font-size: clamp(30px, 3.6vw, 44px); margin-top: 14px; }
.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.sticky-side { position: sticky; top: calc(var(--header-h) + 16px); }
@media (max-width: 1000px) { .editor-layout { grid-template-columns: 1fr; } .sticky-side { position: static; } }

.editor-section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 28px 0 12px; }
.editor-section-title h2 { font-size: 20px; }
.rows { display: flex; flex-direction: column; gap: 10px; }
.row { display: grid; grid-template-columns: 28px minmax(0, 1fr) minmax(0, 1fr) 36px; gap: 10px; align-items: center; }
.row.single { grid-template-columns: 28px minmax(0, 1fr) 36px; }
.row-head { font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.row-num { font-weight: 800; color: var(--ink-3); text-align: center; font-size: 14px; }
.row .input { height: 44px; }
.q-block { border: 1px solid var(--line); border-radius: 18px; padding: 14px; background: #fff; }
.q-head { display: grid; grid-template-columns: 28px minmax(0, 1fr) 36px; gap: 10px; align-items: center; }
.answers { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; padding-left: 38px; }
.answer { display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 4px 0 12px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--paper); transition: border-color .15s, background-color .15s; }
.answer:focus-within { border-color: var(--green); background: #fff; }
.answer.is-correct { border-color: var(--green); background: var(--green-3); }
.answer .letter { font-weight: 800; font-size: 13px; color: var(--ink-3); width: 14px; }
.answer input[type="text"] { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; }
.mark-btn { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; border: 0; background: transparent; color: var(--ink-3); }
.mark-btn:hover { background: rgba(0, 0, 0, .05); color: var(--ink); }
.mark-btn[aria-pressed="true"] { color: #fff; background: var(--green); }
.mark-btn .i { width: 18px; height: 18px; stroke-width: 2.8; }
.q-foot { display: flex; justify-content: flex-start; padding-left: 38px; margin-top: 8px; }
.add-row { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 50px; margin-top: 12px; border: 2px dashed var(--line-2); border-radius: 14px; background: transparent; color: var(--ink-2); font-weight: 700; transition: border-color .15s, color .15s, background-color .15s; }
.add-row:hover { border-color: var(--green); color: var(--green); background: rgba(30, 107, 82, .04); }
.add-row .i { width: 18px; height: 18px; }
.group-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.group-card { border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: #fff; display: flex; flex-direction: column; gap: 10px; }
.group-card .gc-head { display: flex; gap: 8px; align-items: center; }
.group-card .textarea { min-height: 130px; font-size: 14.5px; }
.gap-preview { margin-top: 14px; padding: 16px 18px; border-radius: 14px; background: #fff; border: 1px dashed var(--line-2); line-height: 2; font-size: 15px; }
.gap-preview mark { background: var(--yellow-2); border-radius: 6px; padding: 2px 8px; font-weight: 700; border: 1.5px dashed #D9A514; }
.dropzone { display: grid; place-items: center; gap: 8px; padding: 32px 20px; border: 2px dashed var(--line-2); border-radius: 16px; background: #fff; text-align: center; color: var(--ink-2); cursor: pointer; transition: border-color .15s, background-color .15s; }
.dropzone:hover, .dropzone.is-over { border-color: var(--green); background: rgba(30, 107, 82, .04); }
.dropzone .i { width: 30px; height: 30px; color: var(--ink-3); }
.dropzone img { max-height: 220px; border-radius: 10px; }
.editor-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.selected-tpl { display: flex; gap: 14px; align-items: center; }
.selected-tpl .tpl-thumb { width: 108px; flex: none; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.selected-tpl strong { display: block; font-family: var(--font-display); font-size: 18px; }
.selected-tpl span { font-size: 13px; color: var(--ink-3); }
.ai-box { background: linear-gradient(160deg, #F3EFFF, #fff 60%); border-color: #E2D9FB; }
.ai-box .panel-title .i { color: var(--violet); }
.editor-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.title-input { height: 58px; font-size: 22px; font-weight: 700; font-family: var(--font-display); border-radius: 14px; }

@media (max-width: 640px) {
  .row { grid-template-columns: 24px minmax(0, 1fr) 32px; }
  .row .input + .input { grid-column: 2; }
  .row > .icon-btn { grid-row: 1; grid-column: 3; }
  .row-head.row { display: none; }
  .answers { grid-template-columns: 1fr; padding-left: 0; }
  .q-foot { padding-left: 0; }
  .group-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   Activity page
   ========================================================= */
.activity-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 36px 0 24px; }
.activity-head .h1 { font-size: clamp(28px, 3.4vw, 42px); }
.activity-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 12px; color: var(--ink-3); font-size: 14px; }
.activity-meta .who { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-weight: 700; }
.activity-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.activity-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 28px; align-items: start; }
@media (max-width: 1040px) { .activity-layout { grid-template-columns: 1fr; } }

.play-stage .stage { aspect-ratio: 16 / 9.2; }
.stage-overlay { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(180deg, rgba(26, 58, 49, 0) 30%, rgba(26, 58, 49, .55)); transition: opacity .2s; }
.play-btn { display: inline-flex; align-items: center; gap: 12px; height: 64px; padding: 0 30px 0 22px; border: 0; border-radius: 99px; background: var(--yellow); color: var(--ink); font-family: var(--font-display); font-weight: 800; font-size: 22px; box-shadow: 0 10px 30px -6px rgba(0, 0, 0, .45), inset 0 -4px 0 rgba(0, 0, 0, .12); transition: transform .15s; }
.play-btn:hover { transform: scale(1.04); }
.play-btn .i { width: 28px; height: 28px; }
.stage-msg { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; background: rgba(26, 58, 49, .93); color: var(--chalk); animation: swap-in .3s both; }
.stage-msg .hand { font-size: 40px; color: var(--yellow); line-height: 1; }
.stage-msg p { color: var(--chalk-2); max-width: 420px; margin: 10px auto 20px; }
.stage-msg .btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.stage-controls { display: flex; align-items: center; gap: 6px; }
.stage-controls .icon-btn { color: var(--chalk-2); }
.stage-controls .icon-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.play-modes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 26px; }
.play-mode { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px 14px; border-radius: 16px; border: 1px solid var(--line); background: #fff; font-weight: 700; font-size: 14px; text-align: center; transition: border-color .15s, transform .15s, box-shadow .15s; }
.play-mode:hover { border-color: var(--line-2); transform: translateY(-2px); box-shadow: var(--shadow); }
.play-mode .pm-ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--t); color: var(--d); }
.play-mode .pm-ico .i { width: 21px; height: 21px; }
.play-mode small { font-weight: 500; color: var(--ink-3); font-size: 12px; line-height: 1.3; }
@media (max-width: 720px) { .play-modes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 420px) { .play-modes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.play-as { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 18px; }
.play-as-label { font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.play-as .chips { gap: 6px; }

.options-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px 24px; }
.content-view { display: grid; gap: 8px; }
.cv-q { padding: 12px 14px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); }
.cv-q strong { display: block; margin-bottom: 6px; }
.cv-q .chips { gap: 6px; }
.cv-ans { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 99px; background: #fff; border: 1px solid var(--line); font-size: 13px; }
.cv-ans.ok { background: var(--green-3); border-color: #BFE0CF; color: var(--green-2); font-weight: 700; }
.cv-ans .i { width: 13px; height: 13px; stroke-width: 3; }
.cv-heading { font: inherit; margin: 0; }
.cv-table { border-radius: 12px; }
.cv-table .table th, .cv-table .table td { padding: 10px 14px; }
.cv-table tbody th { width: 38%; background: var(--paper); border-right: 1px solid var(--line); font-weight: 700; }
.cv-img { display: block; width: 100%; max-width: 360px; height: auto; margin-bottom: 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.cv-list { display: flex; flex-wrap: wrap; gap: 8px; }
.cv-list li { padding: 6px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--line); font-size: 15px; }
.cv-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.cv-group { padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.cv-group-name { font-size: inherit; font-weight: 700; margin: 0 0 6px; }
.cv-group .cv-list li { padding: 3px 9px; font-size: 13.5px; background: var(--paper); }
.cv-text { padding: 16px 18px; border-radius: 12px; background: #fff; border: 1px solid var(--line); line-height: 2; }
.cv-text mark { background: var(--yellow-2); padding: 2px 6px; border-radius: 6px; font-weight: 700; }

.switch-panel { padding: 18px 14px 14px; }
.switch-panel .panel-title { padding: 0 6px; }
.switch-panel .input-icon { margin: 0 6px 10px; }
.switch-list { display: flex; flex-direction: column; gap: 2px; max-height: 560px; overflow-y: auto; padding: 0 2px; scrollbar-width: thin; }
.switch-group-label { padding: 12px 8px 6px; font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.switch-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 6px 8px; border: 1.5px solid transparent; border-radius: 12px; background: transparent; text-align: left; font-weight: 600; font-size: 14px; transition: background-color .12s, border-color .12s; }
.switch-item:hover { background: var(--paper-2); }
.switch-item[aria-current="true"] { border-color: var(--ink); background: #fff; }
.switch-item .mini { width: 52px; aspect-ratio: 16 / 10; border-radius: 7px; overflow: hidden; flex: none; border: 1px solid var(--line); background: var(--t); }
.switch-item .mini svg { width: 100%; height: 100%; }
.switch-item .si-name { flex: 1; min-width: 0; line-height: 1.25; }
.switch-item .si-name small { display: block; font-size: 12px; font-weight: 500; color: var(--ink-3); }

.lobby { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: center; }
.join-box { text-align: center; padding: 22px; border-radius: 18px; }
.join-box .jb-url { font-size: 14px; color: var(--chalk-2); }
.join-box .jb-code { font-family: var(--font-display); font-weight: 800; font-size: 44px; letter-spacing: .06em; color: #fff; line-height: 1.1; margin: 6px 0; }
.qr { width: 150px; height: 150px; margin: 0 auto; padding: 10px; border-radius: 14px; background: #fff; }
@media (max-width: 600px) { .lobby { grid-template-columns: 1fr; } }

/* =========================================================
   Dashboard
   ========================================================= */
.dash { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 32px; padding-top: 36px; align-items: start; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a, .side-nav button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 12px; background: transparent; font-weight: 700; font-size: 15px; color: var(--ink-2); text-align: left; transition: background-color .12s, color .12s; }
.side-nav a:hover, .side-nav button:hover { background: var(--paper-2); color: var(--ink); }
.side-nav a[aria-current="page"] { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.side-nav .i { width: 19px; height: 19px; color: var(--ink-3); }
.side-nav a[aria-current="page"] .i { color: var(--green); }
.side-nav .count { margin-left: auto; font-size: 12px; font-weight: 800; color: var(--ink-3); }
.side-label { margin: 22px 12px 6px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.profile-card { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: #fff; border: 1px solid var(--line); margin-bottom: 16px; }
.profile-card strong { display: block; font-size: 15px; }
.profile-card span { font-size: 13px; color: var(--ink-3); }
.plan-card { margin-top: 20px; padding: 16px; border-radius: 16px; background: #FFF4CF; border: 1px solid #F2DE9C; }
.plan-card .usage { display: grid; gap: 10px; margin: 12px 0 14px; font-size: 13px; }
.plan-card .usage > div > div:first-child { display: flex; justify-content: space-between; margin-bottom: 4px; font-weight: 600; }
.plan-card .meter { background: rgba(0, 0, 0, .08); }
.dash-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.dash-head .h2 { font-size: 32px; }
.list-view { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 18px; background: #fff; overflow: visible; }
.list-row { position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr) 150px 120px 44px; gap: 16px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: var(--paper); }
.list-row .lr-thumb { border-radius: 8px; overflow: hidden; aspect-ratio: 16 / 10; border: 1px solid var(--line); background: var(--t); }
.list-row .lr-thumb svg { width: 100%; height: 100%; }
.list-row .lr-title { font-weight: 700; }
.list-row .lr-title a:hover { text-decoration: underline; }
.list-row .lr-sub { font-size: 13px; color: var(--ink-3); }
.list-row .lr-col { font-size: 14px; color: var(--ink-2); }
.menu-wrap { position: relative; }
@media (max-width: 960px) {
  .dash { grid-template-columns: minmax(0, 1fr); padding-top: 24px; }
  .dash aside { display: grid; gap: 12px; }
  .side-nav { flex-direction: row; overflow-x: auto; gap: 6px; scrollbar-width: none; }
  .side-nav a { width: auto; white-space: nowrap; }
  .side-label, .side-folders, .profile-card { display: none; }
  .plan-card { margin-top: 0; }
}
@media (max-width: 720px) {
  .list-row { grid-template-columns: 80px minmax(0, 1fr) 40px; }
  .list-row .lr-col { display: none; }
}

/* =========================================================
   Join
   ========================================================= */
.join-page { position: relative; min-height: calc(100vh - var(--header-h)); display: grid; place-items: center; padding: 56px 20px 80px; overflow: hidden; }
.join-card { position: relative; z-index: 1; width: 100%; max-width: 460px; padding: 40px 36px 36px; border-radius: 26px; background: var(--paper); color: var(--ink); box-shadow: 0 40px 80px -24px rgba(0, 0, 0, .55); text-align: center; }
.join-card .logo { justify-content: center; margin-bottom: 18px; }
.join-card h1 { font-size: 34px; }
.join-card p { color: var(--ink-2); margin-top: 8px; }
.join-card form { margin-top: 26px; display: grid; gap: 12px; }
.code-input { height: 74px; text-align: center; font-family: var(--font-display); font-weight: 800; font-size: 34px; letter-spacing: .14em; border-radius: 16px; border-width: 2px; }
.code-input::placeholder { letter-spacing: .14em; color: #C9CDD6; }
.join-steps { display: flex; justify-content: center; gap: 6px; margin-bottom: 20px; }
.join-steps i { width: 26px; height: 5px; border-radius: 4px; background: var(--line-2); }
.join-steps i.on { background: var(--green); }
.waiting-dots { display: inline-flex; gap: 6px; margin-top: 18px; }
.waiting-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--green); animation: bounce 1.2s infinite ease-in-out; }
.waiting-dots i:nth-child(2) { animation-delay: .15s; }
.waiting-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .4; } 40% { transform: translateY(-8px); opacity: 1; } }
.floaty { position: absolute; color: rgba(243, 240, 230, .18); font-family: var(--font-hand); font-weight: 700; pointer-events: none; user-select: none; line-height: 1; }

/* =========================================================
   Pricing & schools
   ========================================================= */
.billing-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 22px; margin: 30px 0 40px; }
.billing-bar .save { font-family: var(--font-hand); font-size: 24px; color: var(--coral); line-height: 1; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; gap: 18px; padding: 30px 28px; border-radius: 26px; background: #fff; border: 1.5px solid var(--line); }
.plan.is-featured { border-color: var(--green); box-shadow: 0 0 0 4px rgba(30, 107, 82, .12), var(--shadow); }
.plan-ribbon { position: absolute; top: -13px; left: 28px; }
.plan-ribbon .badge { height: 26px; padding: 0 12px; font-size: 12.5px; background: var(--green); color: #fff; }
.plan h2 { font-size: 26px; }
.plan .plan-for { color: var(--ink-2); font-size: 15px; margin-top: 4px; }
.plan-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; min-height: 92px; align-content: flex-start; }
.plan-price .amount { font-family: var(--font-display); font-size: 54px; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.plan-price .per { color: var(--ink-3); font-weight: 600; font-size: 15px; }
.plan-price .billed { flex-basis: 100%; font-size: 13.5px; color: var(--ink-3); }
.plan-list { display: grid; gap: 10px; font-size: 15px; }
.plan-list li { display: flex; gap: 10px; align-items: flex-start; }
.plan-list .i { width: 20px; height: 20px; color: var(--green); stroke-width: 2.6; flex: none; margin-top: 1px; }
.plan-list li.head { font-weight: 800; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-top: 4px; }
.plan .btn { margin-top: auto; }
@media (max-width: 960px) { .plans { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; } }

.compare td .i { width: 20px; height: 20px; color: var(--green); stroke-width: 2.6; }
.compare td .no { color: var(--line-2); }
.compare th:not(:first-child), .compare td:not(:first-child) { text-align: center; width: 18%; }
.compare tbody th { font-weight: 600; text-align: left; }
.compare tr.group td { background: var(--paper); font-weight: 800; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }

.trust-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.trust { padding: 22px; border-radius: 18px; background: #fff; border: 1px solid var(--line); }
.trust .i { width: 26px; height: 26px; color: var(--green); }
.trust h3 { font-size: 17px; margin: 12px 0 6px; }
.trust p { font-size: 14.5px; color: var(--ink-2); }
@media (max-width: 960px) { .trust-row { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .trust-row { grid-template-columns: 1fr; } }

.calc { display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; border-radius: 26px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.calc-in { padding: 32px; }
.calc-out { padding: 32px; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.calc-out .big { font-family: var(--font-display); font-size: 52px; font-weight: 800; letter-spacing: -.04em; color: #fff; line-height: 1; }
.calc-out .small { color: var(--chalk-2); }
.calc-out .hand { font-size: 26px; color: var(--yellow); }
.range { width: 100%; accent-color: var(--green); height: 28px; }
.seat-count { font-family: var(--font-display); font-size: 40px; font-weight: 800; letter-spacing: -.03em; }
.tiers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 18px; }
.tier { padding: 10px; border-radius: 12px; border: 1.5px solid var(--line); text-align: center; font-size: 13px; color: var(--ink-3); transition: border-color .15s, background-color .15s; }
.tier strong { display: block; font-size: 16px; color: var(--ink); }
.tier.on { border-color: var(--green); background: var(--green-3); color: var(--green-2); }
@media (max-width: 800px) { .calc { grid-template-columns: 1fr; } .tiers { grid-template-columns: 1fr 1fr; } }

.integrations { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.integration { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 16px; background: #fff; border: 1px solid var(--line); }
.integration .mono { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; font-family: var(--font-display); font-weight: 800; color: #fff; background: var(--c); flex: none; }
.integration strong { display: block; font-size: 15px; }
.integration span { font-size: 12.5px; color: var(--ink-3); }
@media (max-width: 960px) { .integrations { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .integrations { grid-template-columns: 1fr; } }

.admin-mock { padding: 20px; border-radius: 22px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.admin-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.admin-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.admin-stat { padding: 14px; border-radius: 14px; background: var(--paper); border: 1px solid var(--line); }
.admin-stat span { font-size: 12px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.admin-stat strong { display: block; font-family: var(--font-display); font-size: 28px; letter-spacing: -.03em; }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 120px; margin-top: 16px; padding: 12px 12px 0; border-radius: 14px; background: var(--paper); border: 1px solid var(--line); }
.bars span { flex: 1; border-radius: 6px 6px 0 0; background: var(--green); opacity: .85; }
.bars span:nth-child(2n) { background: var(--yellow); }

/* =========================================================
   Auth
   ========================================================= */
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: calc(100vh - var(--header-h)); }
.auth-main { display: grid; place-items: center; padding: 48px 20px 64px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font-size: 36px; }
.auth-card > p { color: var(--ink-2); margin-top: 8px; }
.auth-card form { margin-top: 24px; }
.sso { display: grid; gap: 10px; margin-top: 26px; }
.btn-sso { justify-content: center; height: 50px; background: #fff; border: 1.5px solid var(--line-2); color: var(--ink); }
.btn-sso:hover { border-color: var(--ink-3); }
.btn-sso svg { width: 20px; height: 20px; }
.divider { display: flex; align-items: center; gap: 14px; margin: 22px 0; color: var(--ink-3); font-size: 13px; font-weight: 600; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.role-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.role-pick label { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; line-height: 1.25; gap: 6px; padding: 14px 8px; border: 1.5px solid var(--line-2); border-radius: 14px; background: #fff; cursor: pointer; font-weight: 700; font-size: 14px; transition: border-color .15s, background-color .15s; }
.role-pick input { position: absolute; opacity: 0; }
.role-pick label:has(input:checked) { border-color: var(--green); background: var(--green-3); }
.role-pick label:has(input:focus-visible) { outline: 3px solid var(--blue); outline-offset: 2px; }
.role-pick .i { width: 24px; height: 24px; color: var(--ink-2); }
.auth-art { position: relative; margin: 16px 16px 16px 0; border-radius: 30px; padding: 56px 48px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.auth-art .hand { font-size: 40px; color: #fff; line-height: 1.15; max-width: 440px; }
.auth-art .hand .y { color: var(--yellow); }
.auth-art ul { display: grid; gap: 12px; color: var(--chalk-2); }
.auth-art li { display: flex; gap: 10px; align-items: center; }
.auth-art li .i { color: var(--yellow); }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth-art { display: none; } }

/* =========================================================
   Help & legal
   ========================================================= */
.help-search { max-width: 640px; margin: 28px auto 0; }
.help-cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.help-cat { display: flex; gap: 14px; align-items: flex-start; padding: 20px; border-radius: 18px; background: #fff; border: 1.5px solid var(--line); text-align: left; transition: border-color .15s, transform .15s, box-shadow .15s; }
.help-cat:hover { border-color: var(--line-2); transform: translateY(-2px); box-shadow: var(--shadow); }
.help-cat[aria-pressed="true"] { border-color: var(--green); background: var(--green-3); }
.help-cat .ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--t); color: var(--d); flex: none; }
.help-cat strong { display: block; font-size: 16px; }
.help-cat span { font-size: 14px; color: var(--ink-3); }
@media (max-width: 900px) { .help-cats { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .help-cats { grid-template-columns: 1fr; } }
.contact-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: 32px; border-radius: 24px; }
.contact-card h2 { color: #fff; font-size: 28px; }
.contact-card p { color: var(--chalk-2); margin-top: 6px; }

.legal { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; align-items: start; }
.legal nav { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 2px; }
.legal nav a { padding: 8px 12px; border-radius: 10px; font-weight: 600; color: var(--ink-2); }
.legal nav a:hover { background: var(--paper-2); color: var(--ink); }
.prose { max-width: 720px; }
.prose h2 { font-size: 30px; margin: 48px 0 12px; scroll-margin-top: calc(var(--header-h) + 20px); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 19px; margin: 26px 0 8px; }
.prose p, .prose li { color: var(--ink-2); }
.prose p + p { margin-top: 12px; }
.prose ul { list-style: disc; padding-left: 22px; margin: 10px 0; display: grid; gap: 6px; }
@media (max-width: 860px) { .legal { grid-template-columns: 1fr; } .legal nav { position: static; display: flex; flex-wrap: wrap; } }

/* 404 */
.notfound { min-height: calc(100vh - var(--header-h) - 120px); display: grid; place-items: center; padding: 48px 20px; }
.notfound .board-frame { max-width: 640px; width: 100%; padding: 56px 32px 64px; text-align: center; }
.notfound .hand { font-size: 110px; line-height: 1; color: var(--yellow); }
.notfound h1 { color: #fff; font-size: 36px; margin-top: 8px; }
.notfound p { color: var(--chalk-2); margin: 12px auto 26px; max-width: 420px; }

/* Utilities */
.mt-0 { margin-top: 0 !important; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.wrap { flex-wrap: wrap; }
.w-full { width: 100%; }
