/* H2edu Design System — Studio & Gallery Lux
   Inspired by Museum Gallery Lighting, Artsonia Keepsake Previews, and Tactile Studio Materials.
   Zero AI Slop, Pure Hand-crafted CSS Tokens & Interactions. */

:root {
  /* Surface & Canvas Palette */
  --paper: #FAF8F5;
  --paper-2: #F2ECE4;
  --paper-card: #FFFFFF;
  --card: #FFFFFF;
  
  /* Text & Ink Typography */
  --ink: #1C1715;
  --ink-2: #5E524A;
  --ink-3: #8C8077;
  
  /* Primary & Accents */
  --crayon: #D94528;
  --crayon-hover: #BF361C;
  --crayon-light: #FDF1EE;
  --sun: #F5A623;
  --sun-light: #FEF7E8;
  --leaf: #2A8A55;
  --leaf-light: #EDF7F1;
  --sky: #2563EB;
  --sky-light: #EFF6FF;
  --gold: #C89B3C;
  
  /* Gallery Elements */
  --wire: #DDD5C9;
  --line: #E8E1D5;
  --line-light: #F0EAE0;
  
  /* Layered Shadows */
  --shadow-sm: 0 1px 3px rgba(28, 23, 21, 0.05);
  --shadow: 0 4px 14px rgba(28, 23, 21, 0.06), 0 1px 3px rgba(28, 23, 21, 0.04);
  --shadow-lg: 0 12px 32px rgba(28, 23, 21, 0.09), 0 2px 6px rgba(28, 23, 21, 0.04);
  --shadow-art: 0 8px 24px -4px rgba(28, 23, 21, 0.12), 0 2px 6px rgba(28, 23, 21, 0.06);
  --shadow-art-hover: 0 18px 36px -6px rgba(28, 23, 21, 0.18), 0 6px 14px rgba(28, 23, 21, 0.08);
  
  /* Geometry & Typography */
  --radius: 16px;
  --radius-sm: 10px;
  --radius-full: 9999px;
  --display: "Baloo 2", "Be Vietnam Pro", system-ui, -apple-system, sans-serif;
  --body: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.6 var(--body);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--sky); transition: color 0.15s ease; }
a:hover { color: var(--crayon); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--crayon); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 248, 245, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}
.topbar .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
  transition: transform 0.15s ease;
}
.brand:hover { transform: scale(1.02); }
.brand-mark {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--crayon) 0%, #B83219 100%);
  display: grid;
  place-items: center;
  color: #fff;
  font: 800 20px/1 var(--display);
  box-shadow: 0 2px 8px rgba(217, 69, 40, 0.35);
  transform: rotate(-3deg);
  transition: transform 0.2s ease;
}
.brand:hover .brand-mark { transform: rotate(0deg) scale(1.05); }
.brand-name {
  font: 800 16px/1.2 var(--display);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav a {
  text-decoration: none;
  color: var(--ink-2);
  font-weight: 600;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  transition: all 0.18s ease;
}
.nav a:hover {
  background: var(--paper-2);
  color: var(--ink);
}
.nav a[aria-current="page"] {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 2px 6px rgba(28, 23, 21, 0.2);
}

/* ---------- hero ---------- */
.hero {
  padding: 40px 0 16px;
}
.hero h1 {
  font: 800 clamp(30px, 5.5vw, 48px)/1.15 var(--display);
  margin: 0 0 14px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.hero h1 em {
  font-style: normal;
  color: var(--crayon);
  background: linear-gradient(135deg, var(--crayon) 0%, #DE6B35 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  margin: 0;
  color: var(--ink-2);
  max-width: 64ch;
  font-size: 16px;
  line-height: 1.65;
}
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-top: 24px;
}
.stat {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 10px 18px;
  border-radius: 14px;
  border: 1px solid rgba(220, 210, 195, 0.7);
  box-shadow: 0 2px 8px rgba(28, 23, 21, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(28, 23, 21, 0.07);
}
.stat b {
  font: 800 26px/1.1 var(--display);
  color: var(--ink);
  display: block;
}
.stat span {
  font-size: 13px;
  color: var(--ink-2);
  font-weight: 600;
}

/* ---------- filters ---------- */
.filters {
  position: sticky;
  top: 64px;
  z-index: 30;
  background: rgba(250, 248, 245, 0.96);
  backdrop-filter: blur(8px);
  padding: 14px 0 12px;
  border-bottom: 1px solid var(--line-light);
}
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(28, 23, 21, 0.04);
}
.chip:hover {
  background: #fff;
  border-color: var(--ink-3);
  transform: translateY(-1px);
}
.chip small {
  color: var(--ink-2);
  font-weight: 500;
  margin-left: 4px;
}
.chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  box-shadow: 0 2px 8px rgba(28, 23, 21, 0.25);
}
.chip[aria-pressed="true"] small { color: #E8E1D5; }
.select {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 12px;
  padding: 8px 12px;
  font-weight: 500;
}

/* ---------- the wall (Studio Gallery Wall) ---------- */
.wall {
  --cell: 28px;
  background-color: #F6F1E8;
  background-image: 
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.85) 0%, transparent 75%),
    radial-gradient(circle, #D8CFBE 1.1px, transparent 1.1px);
  background-size: 100% 100%, var(--cell) var(--cell);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 32px 18px 40px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(156px, 1fr));
  gap: 36px 20px;
  margin-bottom: 48px;
  box-shadow: inset 0 3px 12px rgba(43, 35, 32, 0.04), 0 2px 8px rgba(0, 0, 0, 0.02);
}
@media (min-width: 720px) {
  .wall {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    padding: 44px 34px 52px;
    gap: 44px 32px;
  }
}
.art {
  position: relative;
  background: #FFFFFF;
  padding: 12px 12px 16px;
  border-radius: 8px;
  border: 1px solid rgba(220, 210, 195, 0.5);
  box-shadow: 0 10px 28px -4px rgba(28, 23, 21, 0.12), 0 3px 8px rgba(28, 23, 21, 0.05);
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.28s ease;
  cursor: pointer;
  text-align: left;
  width: 100%;
}
.art:hover {
  transform: rotate(0deg) translateY(-8px) scale(1.025);
  box-shadow: 0 20px 40px -8px rgba(28, 23, 21, 0.2), 0 8px 18px rgba(28, 23, 21, 0.08);
  z-index: 10;
}
/* Refined Gallery Brass Clip */
.art::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  width: 34px;
  height: 18px;
  margin-left: -17px;
  background: linear-gradient(180deg, #D4AF37 0%, #AA771C 100%);
  border-radius: 4px 4px 5px 5px;
  box-shadow: 0 3px 8px rgba(170, 119, 28, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  z-index: 2;
}
.art::after {
  content: "";
  position: absolute;
  top: -22px;
  left: 50%;
  width: 24px;
  height: 14px;
  margin-left: -12px;
  border: 2px solid #E5C365;
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
  box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.1);
  z-index: 1;
}
.art .ph {
  aspect-ratio: 3 / 4;
  background: var(--paper-2);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08), inset 0 2px 6px rgba(0, 0, 0, 0.04);
}
.art .ph img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.art:hover .ph img {
  transform: scale(1.035);
}
.art .meta {
  padding: 12px 2px 0;
}
.art .t {
  font: 800 15.5px/1.3 var(--display);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
}
.art .s {
  font-size: 13px;
  color: var(--ink-2);
  margin: 3px 0 0;
  font-weight: 500;
}
.art .likes {
  position: absolute;
  right: 14px;
  bottom: 64px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-full);
  padding: 4px 11px;
  font-size: 12px;
  font-weight: 700;
  color: var(--crayon);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(220, 210, 195, 0.7);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.art:hover .likes {
  transform: scale(1.08);
}
.empty {
  text-align: center;
  padding: 56px 20px;
  color: var(--ink-2);
  grid-column: 1 / -1;
}
.empty b {
  display: block;
  font: 700 18px var(--display);
  color: var(--ink);
  margin-bottom: 6px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 22px;
  border-radius: 12px;
  border: 0;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: var(--shadow-sm);
}
.btn:active {
  transform: scale(0.98);
}
.btn-primary {
  background: linear-gradient(135deg, var(--crayon) 0%, #C9391E 100%);
  color: #fff;
  box-shadow: 0 3px 10px rgba(217, 69, 40, 0.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #E24A2D 0%, var(--crayon) 100%);
  color: #fff;
  box-shadow: 0 5px 16px rgba(217, 69, 40, 0.4);
  transform: translateY(-1px);
}
.btn-sky {
  background: linear-gradient(135deg, var(--sky) 0%, #1D4ED8 100%);
  color: #fff;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.3);
}
.btn-sky:hover {
  background: #1D4ED8;
  color: #fff;
  transform: translateY(-1px);
}
.btn-ghost {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover {
  background: var(--paper-2);
  border-color: var(--ink-3);
  color: var(--ink);
}
.btn-dark {
  background: var(--ink);
  color: #fff;
}
.btn-dark:hover {
  background: #2E2724;
  color: #fff;
}
.btn-sm {
  min-height: 38px;
  padding: 6px 14px;
  font-size: 14px;
  border-radius: 10px;
}
.btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-row .btn { flex: 1 1 160px; }

/* ---------- sheet (bottom sheet on phones, dialog on desktop) ---------- */
.sheet-bg {
  position: fixed;
  inset: 0;
  background: rgba(28, 22, 20, 0.65);
  backdrop-filter: blur(4px);
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  background: var(--paper);
  width: 100%;
  max-width: 740px;
  max-height: 94vh;
  overflow: auto;
  border-radius: 24px 24px 0 0;
  padding: 22px 20px 28px;
  animation: up 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.25);
}
@media (min-width: 760px) {
  .sheet-bg { align-items: center; }
  .sheet { border-radius: 24px; padding: 28px; }
}
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .sheet { animation: none; }
  .art, .art:hover { transition: none; }
}
.sheet-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 14px; }
.sheet-head h2 { font: 800 22px/1.2 var(--display); margin: 0; flex: 1; color: var(--ink); }
.x {
  border: 0;
  background: var(--paper-2);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  font-size: 20px;
  cursor: pointer;
  flex: none;
  transition: background 0.15s ease;
}
.x:hover { background: #E4DCCF; }
.viewer img {
  width: 100%;
  max-height: 62vh;
  object-fit: contain;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.viewer .who { margin: 14px 0 4px; font-weight: 700; font-size: 16px; }
.viewer .comment {
  background: var(--card);
  border-left: 4px solid var(--sun);
  padding: 12px 14px;
  border-radius: 0 12px 12px 0;
  margin: 12px 0 16px;
  font-size: 15px;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.badge {
  display: inline-block;
  background: var(--sun-light);
  color: #925800;
  border: 1px solid rgba(245, 166, 35, 0.3);
  border-radius: var(--radius-full);
  padding: 3px 12px;
  font-size: 13px;
  font-weight: 700;
}
.muted { color: var(--ink-2); font-size: 14px; }
/* ---------- certificate modal & tab switch ---------- */
.cert-tab-switch {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  background: var(--paper-2);
  padding: 5px;
  border-radius: 14px;
  border: 1px solid var(--line);
}
.cert-tab-btn {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.cert-tab-btn:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.6);
}
.cert-tab-btn.active, .cert-tab-btn[aria-selected="true"] {
  background: var(--card);
  color: var(--ink);
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(28, 23, 21, 0.08);
}
.cert-preview-wrap {
  position: relative;
  text-align: center;
  background: radial-gradient(circle at center, #FDFCFB 0%, #F5EFEB 100%);
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  margin-bottom: 16px;
}
.cert-preview {
  width: 100%;
  max-height: 68vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 16px 40px -10px rgba(21, 34, 56, 0.2), 0 4px 12px rgba(21, 34, 56, 0.08);
  background: #fff;
  transition: transform 0.25s ease;
}
.cert-preview:hover {
  transform: scale(1.008);
}
.cert-loading {
  padding: 40px 20px;
  text-align: center;
  background: var(--paper-2);
  border-radius: 14px;
  margin-bottom: 16px;
}
.hint {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  color: #1E40AF;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  margin: 12px 0;
}

/* ---------- keepsake merchandise ---------- */
.products {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 16px 0;
}
.product {
  border: 1.5px solid var(--line);
  background: var(--card);
  border-radius: 14px;
  padding: 10px;
  text-align: left;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: var(--shadow-sm);
}
.product:hover {
  border-color: var(--ink-3);
  transform: translateY(-2px);
}
.product[aria-pressed="true"] {
  border-color: var(--crayon);
  box-shadow: 0 0 0 3px rgba(217, 69, 40, 0.15), var(--shadow);
}
.product canvas {
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: var(--paper-2);
}
.product b {
  display: block;
  font-size: 14.5px;
  margin-top: 8px;
  line-height: 1.3;
  color: var(--ink);
}
.product .price {
  color: var(--crayon);
  font-weight: 800;
  font-size: 15px;
}
.q { font-size: 12px; font-weight: 700; margin-top: 4px; }
.q.ok { color: var(--leaf); }
.q.warn { color: #9A6200; }

/* ---------- forms ---------- */
.form { display: grid; gap: 14px; }
.field label {
  display: block;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--ink);
}
.field input, .field select, .field textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  background: var(--card);
  border-radius: 12px;
  padding: 11px 14px;
  min-height: 48px;
  font-size: 15px;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--crayon);
  box-shadow: 0 0 0 3px rgba(217, 69, 40, 0.12);
  outline: none;
}
.field textarea { min-height: 90px; resize: vertical; }
.field input[type="checkbox"], .field input[type="radio"] { width: auto; min-height: 0; padding: 0; }
.field small { color: var(--ink-2); font-size: 13px; }
.grid2 { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
@media (max-width: 480px) { .grid2 { grid-template-columns: 1fr; } }
.error { color: var(--crayon-hover); font-weight: 600; font-size: 14px; }
.success {
  background: #EDF7F1;
  border: 1px solid #A8D8BA;
  color: #1B5E36;
  border-radius: 14px;
  padding: 16px;
}
.code { font: 800 24px/1.2 var(--display); letter-spacing: 0.03em; color: var(--ink); }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 12px 22px;
  border-radius: 14px;
  z-index: 90;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  max-width: calc(100% - 36px);
  text-align: center;
}

/* ---------- album header ---------- */
.kid {
  display: flex;
  gap: 20px;
  align-items: center;
  background: #FFFFFF;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 4px 20px -2px rgba(28, 23, 21, 0.06), 0 2px 6px rgba(28, 23, 21, 0.03);
  margin-top: 24px;
  border: 1px solid rgba(220, 210, 195, 0.6);
  position: relative;
  overflow: hidden;
}
.kid::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  bottom: 0;
  background: linear-gradient(180deg, var(--sun) 0%, var(--crayon) 100%);
  border-radius: 4px 0 0 4px;
}
.kid .avatar {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--sun) 0%, #DE8A1D 100%);
  display: grid;
  place-items: center;
  font: 800 30px var(--display);
  color: #fff;
  flex: none;
  transform: rotate(-2deg);
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(245, 166, 35, 0.35);
  border: 2px solid #FFFFFF;
}
.kid .avatar img { width: 100%; height: 100%; object-fit: cover; }
.kid h1 { font: 800 28px/1.15 var(--display); margin: 0 0 4px; color: var(--ink); }
.stars { font-weight: 800; color: #9A6200; font-size: 15.5px; display: inline-flex; align-items: center; gap: 4px; }

/* ---------- footer ---------- */
.foot {
  border-top: 1px solid var(--line);
  padding: 28px 0 44px;
  color: var(--ink-2);
  font-size: 13.5px;
}
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { color: var(--crayon); text-decoration: underline; }

/* ---------- english corner (AI Buddy Speaking Studio) ---------- */
.phrases {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  margin: 20px 0 32px;
}
.phrase {
  background: #FFFFFF;
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 4px 16px -2px rgba(28, 23, 21, 0.05), 0 2px 4px rgba(28, 23, 21, 0.02);
  border: 1.5px solid rgba(220, 210, 195, 0.7);
  position: relative;
  transition: all 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.phrase:hover {
  border-color: var(--sky);
  box-shadow: 0 12px 28px -4px rgba(37, 99, 235, 0.12), 0 4px 10px rgba(28, 23, 21, 0.04);
  transform: translateY(-3px);
}
.phrase.done {
  border-color: var(--leaf);
  background: linear-gradient(180deg, #FFFFFF 0%, #F4FAF6 100%);
  box-shadow: 0 0 0 2px rgba(42, 138, 85, 0.2), 0 8px 24px -4px rgba(42, 138, 85, 0.12);
}
.phrase .en {
  font: 700 22px/1.25 var(--display);
  margin: 0 0 4px;
  color: var(--ink);
}
.phrase .vi {
  color: var(--ink-2);
  margin: 0 0 14px;
  font-size: 14.5px;
}
.phrase .lvl {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 12px;
  font-weight: 700;
  color: #9A6200;
  background: var(--sun-light);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}
.heard {
  margin-top: 12px;
  font-size: 14.5px;
  padding: 8px 12px;
  background: var(--paper-2);
  border-radius: 8px;
}
.score { font: 800 32px/1 var(--display); }
.score.pass { color: var(--leaf); }
.score.fail { color: var(--crayon); }
.board {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.board ol { margin: 0; padding-left: 24px; }
.board li { padding: 6px 0; font-weight: 600; }
.two { display: grid; gap: 18px; }
@media (min-width: 820px) { .two { grid-template-columns: 1fr 1fr; } }

/* ---------- admin shell ---------- */
.admin-shell { padding-bottom: 60px; }
.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 14px 0;
  scrollbar-width: none;
  position: sticky;
  top: 64px;
  background: var(--paper);
  z-index: 20;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none;
  border: 0;
  background: var(--card);
  border-radius: var(--radius-full);
  padding: 10px 18px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 0 0 1px var(--line) inset;
  transition: all 0.15s ease;
}
.tab:hover { background: var(--paper-2); }
.tab[aria-selected="true"] {
  background: var(--ink);
  color: #fff;
  box-shadow: none;
}
.tab .dot {
  display: inline-block;
  min-width: 20px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  background: var(--crayon);
  color: #fff;
  font-size: 12px;
  margin-left: 6px;
}
.panel {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  border: 1px solid var(--line);
}
.panel h2 { font: 800 20px/1.2 var(--display); margin: 0 0 14px; color: var(--ink); }
.panel h3 { font: 700 17px/1.2 var(--display); margin: 18px 0 10px; color: var(--ink); }
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); margin-bottom: 20px; }
@media (min-width: 820px) { .kpis { grid-template-columns: repeat(6, 1fr); } }
.kpi {
  background: var(--card);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
}
.kpi b { font: 800 26px/1.1 var(--display); display: block; color: var(--ink); }
.kpi span { font-size: 13px; color: var(--ink-2); }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 110px; margin-top: 8px; }
.bars div { flex: 1; background: var(--sky); border-radius: 4px 4px 0 0; min-height: 2px; position: relative; }
.bars-x { display: flex; gap: 4px; font-size: 10.5px; color: var(--ink-2); margin-top: 4px; }
.bars-x span { flex: 1; text-align: center; }
.target { display: grid; gap: 10px; }
.meter { height: 10px; background: var(--paper-2); border-radius: var(--radius-full); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--leaf); border-radius: var(--radius-full); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th, .tbl td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-size: 13px; color: var(--ink-2); font-weight: 700; }
.tbl td.n, .tbl th.n { text-align: right; font-variant-numeric: tabular-nums; }
.scroll-x { overflow-x: auto; }
.list { display: grid; gap: 12px; }
.row { display: flex; gap: 14px; align-items: flex-start; background: var(--paper); border-radius: 14px; padding: 12px; border: 1px solid var(--line-light); }
.row .thumb { width: 68px; height: 84px; object-fit: cover; border-radius: 8px; flex: none; background: var(--paper-2); }
.row .body { flex: 1; min-width: 0; }
.row .body b { display: block; font-size: 15px; }
.row .acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  background: var(--paper-2);
  color: var(--ink-2);
  margin-right: 4px;
}
.tag.ok { background: #EDF7F1; color: #1B5E36; }
.tag.warn { background: #FEF7E8; color: #925800; }
.tag.off { background: #FDF1EE; color: #9A2410; }
.art-admin { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.art-admin .card { background: var(--paper); border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.art-admin img { aspect-ratio: 3/4; object-fit: cover; width: 100%; }
.art-admin .card .body { padding: 10px; font-size: 13.5px; }
.art-admin .card.hidden img { opacity: .4; }
.uploads { display: grid; gap: 12px; }
.up { display: flex; gap: 12px; align-items: center; background: var(--paper); border-radius: 12px; padding: 10px; border: 1px solid var(--line); }
.up img { width: 56px; height: 70px; object-fit: cover; border-radius: 8px; }
.up input { flex: 1; }
.up .st { font-size: 13px; font-weight: 700; min-width: 60px; text-align: right; }
.login { max-width: 400px; margin: 60px auto; }

/* ---------- art-supply shop ---------- */
.shop {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  margin: 16px 0 28px;
}
.supply {
  display: flex;
  gap: 16px;
  background: #FFFFFF;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 4px 16px -2px rgba(28, 23, 21, 0.05), 0 2px 4px rgba(28, 23, 21, 0.02);
  border: 1.5px solid rgba(220, 210, 195, 0.7);
  transition: all 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.supply:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px -4px rgba(28, 23, 21, 0.12), 0 4px 10px rgba(28, 23, 21, 0.04);
}
.supply.picked {
  border-color: var(--crayon);
  box-shadow: 0 0 0 2px rgba(217, 69, 40, 0.2), 0 8px 24px -4px rgba(217, 69, 40, 0.15);
}
.supply .pic {
  width: 96px;
  height: 96px;
  flex: none;
  border-radius: 12px;
  background: var(--paper-2);
  display: grid;
  place-items: center;
  font-size: 38px;
  overflow: hidden;
}
.supply .pic img { width: 100%; height: 100%; object-fit: cover; }
.supply .body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.supply h2 { font: 700 16.5px/1.3 var(--display); margin: 0 0 4px; color: var(--ink); }
.supply .muted { margin: 0 0 8px; font-size: 13.5px; }
.supply .buy { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.supply .price { color: var(--crayon); font-weight: 800; font-size: 16px; }
.stepper { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: var(--radius-full); overflow: hidden; background: #fff; }
.stepper button { width: 38px; height: 36px; border: 0; background: var(--paper-2); font-size: 18px; font-weight: 700; cursor: pointer; transition: background 0.15s ease; }
.stepper button:hover { background: #E4DCCF; }
.stepper output { min-width: 32px; text-align: center; font-weight: 800; font-size: 15px; }
.cartbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(28, 23, 21, 0.08);
  padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
}
.cartbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.cartbar b { font: 800 22px var(--display); color: var(--ink); }
@media (max-width: 440px) { .brand-name { display: none; } .nav a { padding: 8px 10px; font-size: 13px; } }
@media (max-width: 819px) { .kpi.wide { grid-column: span 2; } }
@media (min-width: 820px) { .kpis { grid-template-columns: repeat(7, 1fr); } }
.supply.soldout { opacity: .55; filter: grayscale(0.5); }

/* ---------- site pages: home (parents) and /truong-hoc (schools) ---------- */
.home-hero h1 { max-width: 17ch; }
.home-hero p { max-width: 64ch; }
.section-h { font: 800 24px/1.2 var(--display); margin: 36px 0 16px; color: var(--ink); }
.mini-wall { margin-bottom: 12px; }
.mini-wall .art { text-decoration: none; color: inherit; display: block; }
.features {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.feature {
  background: #FFFFFF;
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: 0 4px 20px -2px rgba(28, 23, 21, 0.06), 0 2px 6px rgba(28, 23, 21, 0.03);
  border: 1px solid rgba(220, 210, 195, 0.6);
  border-top: 5px solid var(--sun);
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.22s ease;
  position: relative;
}
.feature:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px -4px rgba(28, 23, 21, 0.12), 0 4px 10px rgba(28, 23, 21, 0.05);
}
.feature:nth-child(2) { border-top-color: var(--crayon); }
.feature:nth-child(3) { border-top-color: var(--sky); }
.feature h3 { font: 800 19px/1.3 var(--display); margin: 0 0 10px; color: var(--ink); }
.feature p { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.65; }
.lead {
  margin: 40px 0 52px;
  border: 2px solid var(--crayon);
  background: radial-gradient(circle at 100% 0%, rgba(217, 69, 40, 0.04) 0%, transparent 60%), #FFFDFC;
  border-radius: 24px;
  box-shadow: 0 12px 36px -6px rgba(217, 69, 40, 0.12), 0 4px 12px rgba(28, 23, 21, 0.04);
}
.doc .tbl th[scope="row"] { width: 38%; color: var(--ink); font-size: 14px; font-weight: 700; }
.doc ul { margin: 0; padding-left: 22px; }
.doc li { padding: 4px 0; }
@media print {
  .topbar, .foot, .no-print { display: none !important; }
  body { background: #fff; }
  .panel { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
}

/* ---------- học vẽ từng bước (/hoc-ve) ---------- */
.ka-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
@media (max-width: 560px) { .nav { overflow-x: auto; scrollbar-width: none; } .nav::-webkit-scrollbar { display: none; } }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px;
  font: 700 12px/1 var(--body); letter-spacing: .08em; text-transform: uppercase;
  color: var(--crayon); background: var(--crayon-light); padding: 8px 12px; border-radius: var(--radius-full);
}
.learn-hero { display: grid; gap: 32px; align-items: center; padding: 36px 0 20px; }
@media (min-width: 900px) { .learn-hero { grid-template-columns: 1.2fr .8fr; } }
.learn-hero h1 { font: 800 clamp(32px, 5.6vw, 52px)/1.1 var(--display); margin: 0 0 14px; letter-spacing: -0.02em; }
.learn-hero h1 em { font-style: normal; background: linear-gradient(135deg, var(--crayon), #E8812E); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead-in { color: var(--ink-2); font-size: 16.5px; line-height: 1.65; max-width: 60ch; margin: 0; }
.how { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 10px; }
@media (min-width: 600px) { .how { grid-template-columns: repeat(3, 1fr); } }
.how li { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 14px 14px 54px; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); box-shadow: var(--shadow-sm); }
.how b { display: block; font: 800 15.5px/1.3 var(--display); color: var(--ink); margin-bottom: 2px; }
.how .n { position: absolute; left: 14px; top: 14px; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font: 800 15px/1 var(--display); color: #fff; background: var(--ink); transform: rotate(-4deg); }
.how li:nth-child(2) .n { background: var(--crayon); }
.how li:nth-child(3) .n { background: var(--leaf); }

.paper {
  position: relative; aspect-ratio: 1; border-radius: 22px; overflow: hidden;
  background: #FFFDF8 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .38 0 0 0 0 .3 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  box-shadow: var(--shadow-art), inset 0 0 0 1px rgba(28, 23, 21, .05);
}
.paper svg { display: block; width: 100%; height: 100%; }
.paper .fresh { stroke: var(--crayon); }
.paper .pen { transition: opacity .2s ease; }
.hero-demo { width: 100%; max-width: 400px; justify-self: center; transform: rotate(1.5deg); }

.who-card { display: flex; align-items: center; gap: 16px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px 18px; box-shadow: var(--shadow-sm); margin: 8px 0 18px; }
.who-card .avatar { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; font-size: 26px; background: var(--sun-light); flex: none; }
.who-main { flex: 1; min-width: 0; display: grid; gap: 4px; }
.who-main b { font: 800 19px/1.2 var(--display); }
.who-main .meter { max-width: 360px; }

.lesson-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); margin: 18px 0 44px; }
.lesson-card {
  position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line);
  border-radius: 22px; overflow: hidden; text-decoration: none; color: inherit; box-shadow: var(--shadow);
  transition: transform .22s cubic-bezier(.2,.8,.2,1), box-shadow .22s ease;
}
.lesson-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-art-hover); color: inherit; }
.lesson-card[hidden] { display: none; }
.lesson-card .thumb { aspect-ratio: 1; padding: 18px; background: #FFFDF8; border-bottom: 1px solid var(--line-light); }
.lesson-card .thumb svg { width: 100%; height: 100%; display: block; }
.lesson-card .body { padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.lesson-card h2 { font: 800 20px/1.2 var(--display); margin: 0; }
.lesson-card p { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.55; }
.lesson-card .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 13px; font-weight: 600; color: var(--ink-3); }
.lesson-card .skills { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px; }
.lesson-card .skills .tag { margin: 0; }
.lvl-dots { display: inline-flex; gap: 3px; vertical-align: middle; }
.lvl-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.lvl-dots i.on { background: var(--sun); }
.state { position: absolute; z-index: 2; top: 12px; left: 12px; font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: var(--radius-full); background: #fff; color: var(--ink-2); box-shadow: var(--shadow-sm); }
.state.reviewed, .state.ai { background: var(--leaf-light); color: #1B5E36; }
.state.waiting { background: var(--sun-light); color: #925800; }
.state.rejected { background: var(--crayon-light); color: #9A2410; }
.state.next { background: var(--crayon); color: #fff; }

.results { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); margin-bottom: 40px; }
.result-card { display: grid; grid-template-columns: 104px 1fr; gap: 14px; align-items: start; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 12px; box-shadow: var(--shadow-sm); }
.result-card img { width: 104px; height: 130px; object-fit: cover; border-radius: 12px; background: var(--paper-2); }
.result-card b { display: block; font: 800 16px/1.25 var(--display); }
.result-card .when { font-size: 12.5px; }
.result-card .by { display: block; margin-top: 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--leaf); }
.result-card .fb { margin: 4px 0 6px; font-size: 14.5px; line-height: 1.55; color: var(--ink); }
.result-card .fb.warn { color: #9A2410; }
.crit { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; margin-top: 8px; font-size: 12px; color: var(--ink-2); }
.crit .bar { height: 6px; margin-top: 3px; background: var(--paper-2); border-radius: var(--radius-full); overflow: hidden; }
.crit .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--sun), var(--leaf)); border-radius: inherit; }
.dots::after { content: "…"; display: inline-block; animation: ka-blink 1.2s steps(3) infinite; width: 1.2em; text-align: left; }
@keyframes ka-blink { 0% { opacity: .2; } 50% { opacity: 1; } 100% { opacity: .2; } }

/* player */
.learn { padding-bottom: 56px; }
.crumb { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 18px 0 14px; font-size: 14px; font-weight: 600; }
.crumb a { color: var(--ink-2); text-decoration: none; }
.crumb a:hover { color: var(--crayon); }
.player { display: grid; gap: 22px; align-items: start; }
@media (min-width: 920px) { .player { grid-template-columns: minmax(0, 1.08fr) minmax(330px, .92fr); } }
.stage { position: relative; }
.step-badge { position: absolute; top: 14px; left: 14px; background: var(--ink); color: #fff; font: 800 14px/1 var(--display); padding: 9px 13px; border-radius: var(--radius-full); box-shadow: var(--shadow); }
.steps-bar { display: flex; gap: 6px; margin-top: 14px; }
.steps-bar button { flex: 1; height: 10px; padding: 0; border: 0; border-radius: var(--radius-full); background: var(--line); cursor: pointer; transition: background .2s ease, transform .2s ease; }
.steps-bar button:hover { transform: scaleY(1.4); }
.steps-bar button.done { background: var(--ink-3); }
.steps-bar button.cur { background: var(--crayon); }
.coach { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 22px; box-shadow: var(--shadow); }
@media (min-width: 920px) { .coach { position: sticky; top: 84px; } }
.coach h1 { font: 800 clamp(26px, 3.4vw, 34px)/1.12 var(--display); margin: 2px 0 0; letter-spacing: -0.01em; }
.coach-meta { margin: 0; font-size: 13px; font-weight: 600; color: var(--ink-3); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.say-box { margin: 18px 0 12px; padding: 18px 18px 20px; background: var(--sun-light); border: 1px solid #F6DFAE; border-radius: 18px; }
.say-box .part { font: 700 12px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; color: #925800; }
.say-box p { margin: 8px 0 0; font: 700 clamp(19px, 2.3vw, 23px)/1.42 var(--display); color: var(--ink); min-height: 3em; }
.tip-line { display: flex; gap: 8px; margin: 0 0 4px; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.tip-line[hidden] { display: none; }
.controls { display: grid; grid-template-columns: 52px 1fr 52px; gap: 10px; margin-top: 16px; }
.icon-btn { height: 52px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; font: 700 24px/1 var(--display); color: var(--ink); cursor: pointer; transition: all .15s ease; }
.icon-btn:hover:not(:disabled) { border-color: var(--ink); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.controls .btn { min-height: 52px; font-size: 16px; }
.toggles { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.toggle { border: 1.5px solid var(--line); background: #fff; border-radius: var(--radius-full); padding: 8px 14px; font-size: 13.5px; font-weight: 600; cursor: pointer; color: var(--ink-2); transition: all .15s ease; }
.toggle:hover { border-color: var(--ink-3); color: var(--ink); }
.toggle[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.toggle[hidden] { display: none; }
.prep { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; font-size: 14px; color: var(--ink-2); }
.prep summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.prep h3 { font: 800 15px var(--display); margin: 12px 0 4px; color: var(--ink); }
.prep ul { margin: 0; padding-left: 20px; }
.model-mini { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.model-mini .paper { width: 92px; border-radius: 12px; flex: none; }

.finish { margin-top: 30px; padding: 26px; border-radius: 24px; border: 1px solid #F1D8C4; background: radial-gradient(circle at 100% 0%, rgba(245,166,35,.14), transparent 55%), linear-gradient(135deg, #FFF8EC, #FDF1EE); }
.finish[hidden] { display: none; }
.finish h2 { font: 800 clamp(24px, 3.4vw, 30px)/1.2 var(--display); margin: 0 0 12px; }
.finish-grid { display: grid; gap: 18px; }
@media (min-width: 760px) { .finish-grid { grid-template-columns: 1fr auto; align-items: start; } }
.finish-side { display: flex; flex-direction: column; gap: 10px; }
.create { background: #fff; border: 1.5px dashed #E8B9A6; border-radius: 14px; padding: 14px 16px; margin: 0 0 14px; line-height: 1.55; }
.shoot { cursor: pointer; margin: 8px 0 14px; }
.shot { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-bottom: 14px; }
.shot img { width: 132px; height: 164px; object-fit: cover; border-radius: 14px; box-shadow: var(--shadow); }
.shot > div { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 80; overflow: hidden; }
.confetti i { position: absolute; top: 55%; width: 10px; height: 14px; border-radius: 3px; animation: ka-pop var(--d) cubic-bezier(.2,.7,.3,1) forwards; }
@keyframes ka-pop { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 100% { transform: translate(var(--x), -60vh) rotate(var(--r)); opacity: 0; } }

/* classroom projector mode */
body.present { background: #FFFDF8; }
body.present .topbar, body.present .foot, body.present .crumb, body.present #history, body.present .finish, body.present .prep { display: none; }
body.present .learn { max-width: none; padding: 18px 26px; }
body.present .player { grid-template-columns: minmax(0, 1fr) minmax(360px, 36vw); gap: 28px; align-items: center; min-height: calc(100vh - 36px); }
body.present .stage .paper { width: min(100%, calc(100vh - 80px)); margin: 0 auto; }
body.present .steps-bar { width: min(100%, calc(100vh - 80px)); margin: 14px auto 0; }
body.present .coach { position: static; box-shadow: none; border: 0; background: transparent; padding: 0; }
body.present .coach h1 { font-size: clamp(30px, 3vw, 46px); }
body.present .say-box p { font-size: clamp(26px, 2.6vw, 42px); }
body.present .step-badge { font-size: 20px; padding: 12px 18px; }

/* admin: lesson submissions */
.sub-row { display: grid; gap: 16px; background: var(--paper); border: 1px solid var(--line-light); border-radius: 16px; padding: 14px; }
@media (min-width: 720px) { .sub-row { grid-template-columns: 180px 1fr; } }
.sub-row .shot-lg { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 12px; background: var(--paper-2); }
.ai-box { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 13.5px; margin: 8px 0; }
.ai-box .crit { grid-template-columns: repeat(4, 1fr); }
.sub-row textarea { width: 100%; min-height: 84px; }

/* ---------- child link: nav entry, home section, wall scope note ---------- */
.nav a.nav-kid { color: var(--crayon); box-shadow: inset 0 0 0 1.5px var(--crayon); }
.nav a.nav-kid:hover { background: var(--crayon-light); color: var(--crayon-hover); }
.kid-corner { margin-top: 28px; }
.kid-corner h2 { margin-top: 0; }
.kid-corner p { color: var(--ink-2); max-width: 680px; }
.kid-corner .btn[hidden] { display: none; }
.scope-note {
  background: var(--sun-light);
  border: 1px solid #F3D9A4;
  color: var(--ink-2);
  border-radius: 14px;
  padding: 12px 16px;
  margin: 0 0 14px;
  font-size: 14px;
}
.scope-note a { font-weight: 600; margin-left: 4px; }

/* ---------- curriculum locked for visitors ---------- */
.locked-panel { text-align: center; max-width: 560px; margin: 24px auto; }
.locked-panel .lock { font-size: 40px; line-height: 1; margin-bottom: 8px; }
.locked-panel .btn-row { max-width: 460px; margin: 14px auto 0; }
.thumb.locked-thumb { display: grid; place-items: center; font-size: 44px; background: var(--paper-2); color: var(--ink-3); }
.lock-tag { display: inline-block; align-self: flex-start; width: fit-content; font-size: 12px; font-weight: 700; color: var(--ink-2); background: var(--paper-2); border-radius: 999px; padding: 2px 10px; margin-top: 8px; }
#acts[hidden], #stage[hidden], .toggles[hidden] { display: none; }
