/* ==========================================================================
   Dwight School Seoul · Mindfulness
   Styles. Colors and fonts are set once at the top; change them there.
   ========================================================================== */

:root {
  /* Dwight School Seoul brand colors (as used on dwight.or.kr) */
  --navy: #13234b;
  --red: #cf202f;
  --sky-wash: #e5f0f9;

  --navy-deep: #0c1733;
  --ink: #1a2238;
  --ink-soft: #3e404c;
  --ink-faint: #69727d;
  --paper: #ffffff;
  --paper-2: #f1f6fb;
  --card: #ffffff;
  --line: #d9e2ee;

  /* Supporting colors: grade bands and activity types */
  --honey: #e6a323;   --honey-soft: #fdf1d4;   --honey-ink: #7a5300;
  --sage: #4f9a76;    --sage-soft: #e2f1e8;    --sage-ink: #1f5a40;
  --sky: #3b7fc4;     --sky-soft: #e5f0f9;     --sky-ink: #1c4a80;
  --lavender: #8a74c4; --lavender-soft: #ece6f8; --lavender-ink: #47347f;
  --coral: #cf202f;   --coral-soft: #fbe7e9;   --coral-ink: #a3182a;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(19, 35, 75, 0.06), 0 10px 26px -14px rgba(19, 35, 75, 0.25);
  --shadow-lift: 0 2px 4px rgba(19, 35, 75, 0.07), 0 22px 44px -18px rgba(19, 35, 75, 0.36);
  /* The school uses Brandon Grotesque and Adobe Caslon (licensed fonts).
     Jost and Libre Caslon Text are free typefaces with a very similar look. */
  --font-display: 'Jost', 'Futura', 'Century Gothic', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --font-body: 'Jost', 'Futura', system-ui, -apple-system, 'Segoe UI', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --font-accent: 'Libre Caslon Text', 'Adobe Caslon Pro', 'Big Caslon', Georgia, serif;
  --wrap: 1140px;

  /* defaults for tinted components */
  --t: var(--navy); --t-soft: #e7ebf3; --t-ink: var(--navy);
  --g: var(--navy); --g-soft: #e7ebf3; --g-ink: var(--navy);
}

.t-honey { --t: var(--honey); --t-soft: var(--honey-soft); --t-ink: var(--honey-ink); }
.t-sage { --t: var(--sage); --t-soft: var(--sage-soft); --t-ink: var(--sage-ink); }
.t-sky { --t: var(--sky); --t-soft: var(--sky-soft); --t-ink: var(--sky-ink); }
.t-lavender { --t: var(--lavender); --t-soft: var(--lavender-soft); --t-ink: var(--lavender-ink); }
.t-coral { --t: var(--coral); --t-soft: var(--coral-soft); --t-ink: var(--coral-ink); }
.t-navy { --t: var(--navy); --t-soft: #e7ebf3; --t-ink: var(--navy); }

.g-ec { --g: var(--honey); --g-soft: var(--honey-soft); --g-ink: var(--honey-ink); }
.g-ls { --g: var(--sage); --g-soft: var(--sage-soft); --g-ink: var(--sage-ink); }
.g-ms { --g: var(--sky); --g-soft: var(--sky-soft); --g-ink: var(--sky-ink); }
.g-us { --g: var(--lavender); --g-soft: var(--lavender-soft); --g-ink: var(--lavender-ink); }

/* ---- Base ------------------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.no-scroll { overflow: hidden; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 18px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
main:focus, main:focus-visible { outline: none; }
img, svg, canvas { max-width: 100%; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.ic { flex: none; vertical-align: middle; }

:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 999px; text-decoration: none; font-weight: 700;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 800px; }
.section { padding-top: 60px; padding-bottom: 60px; }
.wrap.section { padding-top: 48px; padding-bottom: 48px; }
.section-tight { padding-top: 44px; padding-bottom: 20px; }
.section-tinted { background: var(--paper-2); }
.section-head .h2::before { content: ''; display: block; width: 44px; height: 3px; background: var(--red); margin-bottom: 14px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.section-lead { color: var(--ink-soft); margin-top: 6px; max-width: 64ch; }

.h2, .page-title, .hero-title { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; line-height: 1.08; text-transform: uppercase; color: var(--navy); }
.h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.005em; color: var(--navy); }
.h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
.h3 { font-size: 1.2rem; line-height: 1.25; }
.lead { font-size: 1.16rem; color: var(--ink-soft); max-width: 62ch; }
.muted { color: var(--ink-faint); }
.eyebrow { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--red); margin-bottom: 12px; }
.prose > * + * { margin-top: 16px; }
.prose .h2 { margin-top: 40px; }

/* ---- Buttons, chips, pills --------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border: 2px solid var(--navy); border-radius: 8px;
  background: var(--navy); color: #fff; font-weight: 700; font-size: 0.86rem; line-height: 1.2; letter-spacing: 0.06em; text-transform: uppercase;
  text-decoration: none; transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-lg { padding: 15px 26px; font-size: 0.94rem; }
.btn-sm { padding: 8px 14px; font-size: 0.76rem; }
.btn-soft { background: var(--card); color: var(--navy); border-color: var(--line); }
.btn-soft:hover { border-color: var(--navy); }
.btn-ghost { background: transparent; color: var(--navy); border-color: transparent; }
.btn-ghost:hover { background: rgba(27, 45, 91, 0.07); box-shadow: none; }
.btn-light { background: #fff; color: var(--navy); border-color: #fff; }
.btn-block { width: 100%; margin-top: 12px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn-row-center { justify-content: center; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 15px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--card); font-weight: 700; font-size: 0.92rem; color: var(--ink-soft);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.chip:hover { border-color: var(--navy); color: var(--navy); }
.chip[aria-pressed='true'] { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip[class*='g-']::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--g); }

.gchips { display: inline-flex; flex-wrap: wrap; gap: 5px; }
.gchip { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--g-soft); color: var(--g-ink); font-size: 0.74rem; font-weight: 800; white-space: nowrap; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; background: rgba(27, 45, 91, 0.08); color: var(--navy); font-size: 0.74rem; font-weight: 800; white-space: nowrap; }
.meta { display: inline-flex; align-items: center; gap: 5px; font-size: 0.84rem; font-weight: 700; color: var(--ink-soft); }
.meta-on { color: var(--t-ink); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--g); }

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px;
  background: var(--card); border: 1.5px solid var(--line); font-weight: 700; font-size: 0.9rem; text-decoration: none; color: var(--navy);
  transition: border-color 0.15s, transform 0.15s;
}
.pill:hover { border-color: var(--navy); transform: translateX(2px); }
.pill-arrow { display: inline-flex; opacity: 0.55; }

.text-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 0.86rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--red); text-decoration: none; border-bottom: 2px solid transparent; }
.text-link:hover { border-bottom-color: currentColor; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 0.92rem; color: var(--ink-soft); text-decoration: none; margin-bottom: 18px; }
.back-link:hover { color: var(--navy); }

.callout { background: var(--t-soft); border-radius: var(--radius-sm); padding: 18px 20px; border-left: 5px solid var(--t); }
.callout strong { display: block; font-family: var(--font-display); font-size: 1.05rem; margin-bottom: 4px; color: var(--t-ink); }
.callout:not([class*='t-']) { --t: var(--navy); --t-soft: var(--sky-wash); --t-ink: var(--navy); }
.note { background: rgba(27, 45, 91, 0.06); border-radius: var(--radius-sm); padding: 12px 16px; font-size: 0.94rem; color: var(--ink-soft); }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.panel > * + * { margin-top: 12px; }
.panel-title { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; }
.icon-btn { display: inline-grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; color: var(--ink-faint); }
.icon-btn:hover { background: rgba(27, 45, 91, 0.08); color: var(--navy); }

/* ---- Forms -------------------------------------------------------------------- */

.form > * + * { margin-top: 18px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-weight: 800; font-size: 0.9rem; color: var(--ink); }
.field-hint { font-size: 0.86rem; color: var(--ink-faint); }
.input {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font-size: 1rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 4px rgba(74, 143, 207, 0.2); }
textarea.input { resize: vertical; min-height: 84px; }
.range { width: 100%; accent-color: var(--navy); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.96rem; }
.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--navy); flex: none; }
.form-msg { color: #b3261e; font-weight: 700; min-height: 0; }
.form-msg:empty { display: none; }
.fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.fieldset > legend { padding: 0; margin-bottom: 14px; }
.fieldset > * + * { margin-top: 14px; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---- Toast & dialog ------------------------------------------------------------ */

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 30px); z-index: 300;
  background: var(--navy-deep); color: #fff; padding: 12px 22px; border-radius: 999px; font-weight: 700; font-size: 0.95rem;
  box-shadow: var(--shadow-lift); opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.25s; max-width: calc(100vw - 32px); text-align: center;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

.dialog { border: 0; border-radius: 18px; padding: 0; width: min(480px, calc(100vw - 32px)); max-height: calc(100vh - 40px); background: var(--paper); color: var(--ink); box-shadow: var(--shadow-lift); }
.dialog--wide { width: min(620px, calc(100vw - 32px)); }
.dialog::backdrop { background: rgba(16, 26, 56, 0.55); backdrop-filter: blur(3px); }
.dialog-body { padding: 30px 28px 26px; }
.dialog-text { font-size: 1.1rem; font-weight: 600; padding-right: 26px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.dialog-x { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(27, 45, 91, 0.08); display: grid; place-items: center; z-index: 2; }
.dialog-x:hover { background: rgba(27, 45, 91, 0.16); }

/* ---- Header --------------------------------------------------------------------- */

.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, 0.94); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 18px; min-height: 78px; }
.brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; margin-right: auto; min-width: 0; }
.brand-logo { height: 50px; width: auto; flex: none; display: block; }
.brand-rule { width: 1px; height: 40px; background: #c3cddc; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.14rem; letter-spacing: 0.03em; text-transform: uppercase; color: var(--navy); white-space: nowrap; }
.brand-school { font-size: 0.62rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--red); margin-top: 4px; white-space: nowrap; }
@media (max-width: 560px) { .brand { gap: 10px; } .brand-logo { height: 42px; } .brand-rule { height: 32px; } .brand-name { font-size: 0.96rem; } .brand-school { display: none; } }

.nav { display: flex; align-items: center; gap: 2px; }
.nav-link { padding: 9px 11px; border-radius: 8px; font-weight: 600; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; color: var(--navy); transition: background 0.15s, color 0.15s; }
.nav-link:hover { background: rgba(27, 45, 91, 0.07); color: var(--navy); }
.nav-link[aria-current='page'] { background: var(--navy); color: #fff; }
.nav-cta { margin-left: 10px; background: var(--red); border-color: var(--red); }
.nav-toggle { display: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(27, 45, 91, 0.07); place-items: center; color: var(--navy); }

/* On narrow screens the menu folds into a button. */
@media (max-width: 940px) {
  .nav-toggle { display: grid; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 4px;
    padding: 14px 20px 20px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lift);
  }
  .nav.is-open { display: flex; }
  .nav-link { padding: 13px 16px; font-size: 0.95rem; }
  .nav-cta { margin: 8px 0 0; }
}
/* With community sharing switched on the menu is longer (Community + Share), so it folds sooner. Same rules as above. */
@media (min-width: 941px) and (max-width: 1120px) {
  .has-community .nav-toggle { display: grid; }
  .has-community .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 4px;
    padding: 14px 20px 20px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lift);
  }
  .has-community .nav.is-open { display: flex; }
  .has-community .nav-link { padding: 13px 16px; font-size: 0.95rem; }
  .has-community .nav-cta { margin: 8px 0 0; }
}

/* ---- Footer --------------------------------------------------------------------- */

.site-footer { background: var(--navy); color: #d3daea; padding: 54px 0 44px; margin-top: 40px; border-top: 4px solid var(--red); }
.footer-logo { display: block; height: 66px; width: auto; margin-bottom: 20px; }
.footer-grid { display: grid; grid-template-columns: 2.2fr 1fr 1fr 1fr; gap: 36px; }
.footer-name { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; letter-spacing: 0.03em; text-transform: uppercase; color: #fff; margin-bottom: 8px; }
.footer-small { font-size: 0.86rem; opacity: 0.7; margin-top: 12px; }
.footer-head { font-weight: 800; font-size: 0.76rem; letter-spacing: 0.14em; text-transform: uppercase; color: #fff; margin-bottom: 12px; }
.footer-links li + li { margin-top: 8px; }
.footer-links a { text-decoration: none; opacity: 0.85; }
.footer-links a:hover { opacity: 1; text-decoration: underline; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }

/* ---- Page head -------------------------------------------------------------------- */

.page-head { position: relative; overflow: hidden; padding: 54px 0 40px; background: linear-gradient(180deg, var(--sky-wash), var(--paper)); }
.page-head::after { content: ''; position: absolute; right: -30px; top: 14px; width: 380px; height: 244px; background: url('../img/dwight/dwight-lion-navy.svg') no-repeat center / contain; opacity: 0.05; pointer-events: none; }
.page-head > .wrap { position: relative; z-index: 1; }
.page-title { font-size: clamp(2rem, 4.4vw, 3.2rem); margin-bottom: 14px; }
.page-head .chips, .page-head .tabs { margin-top: 26px; }

/* ---- Home ------------------------------------------------------------------------- */

.hero { position: relative; overflow: hidden; padding: 60px 0 72px; background: var(--sky-wash); }
.hero::before { content: ''; position: absolute; left: 50%; top: 50%; width: min(1100px, 150%); aspect-ratio: 114 / 73; transform: translate(-50%, -46%); background: url('../img/dwight/dwight-lion-navy.svg') no-repeat center / contain; opacity: 0.05; pointer-events: none; }
.hero > .wrap { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center; }
.hero-lion { display: block; width: 84px; height: auto; margin-bottom: 20px; }
.hero-title { font-size: clamp(2.6rem, 6.2vw, 4.8rem); line-height: 1; margin-bottom: 22px; }
.hero-title em { font-style: normal; color: var(--red); }
.hero-copy .lead { margin-bottom: 28px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 8px 26px; margin-top: 30px; color: var(--ink-soft); font-weight: 500; }
.hero-stats strong { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; color: var(--navy); margin-right: 2px; }

.hero-art { position: relative; width: min(420px, 100%); aspect-ratio: 1; margin: 0 auto; display: grid; place-items: center; }
.orb-ring, .orb-core { position: absolute; border-radius: 50%; animation: breathe 8s ease-in-out infinite; }
.orb-ring.r3 { width: 100%; height: 100%; background: rgba(19, 35, 75, 0.06); }
.orb-ring.r2 { width: 78%; height: 78%; background: rgba(19, 35, 75, 0.08); animation-delay: -0.25s; }
.orb-ring.r1 { width: 58%; height: 58%; background: rgba(59, 127, 196, 0.24); animation-delay: -0.5s; }
.orb-core { width: 42%; height: 42%; background: radial-gradient(circle at 34% 26%, #30509a, var(--navy) 72%); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8%; box-shadow: 0 18px 50px -12px rgba(19, 35, 75, 0.6); animation-delay: -0.75s; }
.orb-spark { display: block; width: 26%; }
.orb-spark svg { display: block; width: 100%; height: auto; }
.hero-breath-label { font-family: var(--font-display); font-weight: 600; font-size: clamp(0.68rem, 1.15vw, 0.86rem); letter-spacing: 0.1em; text-transform: uppercase; color: #fff; text-align: center; }
@keyframes breathe { 0%, 100% { transform: scale(0.84); } 50% { transform: scale(1.05); } }

@media (max-width: 860px) {
  .hero { padding: 44px 0 40px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { width: min(280px, 72vw); order: -1; }
}

.today { display: flex; align-items: center; gap: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 26px; box-shadow: var(--shadow); margin-top: -22px; position: relative; z-index: 2; }
.today-icon { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: var(--honey-soft); color: var(--honey-ink); flex: none; }
.today-label { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--red); }
.today-text { font-family: var(--font-accent); font-style: italic; font-size: clamp(1.1rem, 2vw, 1.4rem); line-height: 1.35; color: var(--navy); }

.door-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.door { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 28px; border-radius: 18px; background: var(--t-soft); text-decoration: none; overflow: hidden; transition: transform 0.2s, box-shadow 0.2s; }
.door::after { content: ''; position: absolute; right: -50px; top: -50px; width: 170px; height: 170px; border-radius: 50%; background: var(--t); opacity: 0.2; transition: transform 0.4s; }
.door:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.door:hover::after { transform: scale(1.25); }
.door-icon { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 18px; background: #fff; color: var(--t-ink); position: relative; z-index: 1; }
.door-title { font-family: var(--font-display); font-weight: 600; font-size: 1.6rem; }
.door p { color: var(--ink-soft); flex: 1; }
.door-go { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--t-ink); }
@media (max-width: 860px) { .door-grid { grid-template-columns: 1fr; } }

.grade-grid, .age-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.grade-card, .age-card { display: flex; flex-direction: column; gap: 8px; padding: 24px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); border-top: 6px solid var(--g); text-decoration: none; transition: transform 0.2s, box-shadow 0.2s; }
a.grade-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.grade-range { font-size: 0.76rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--g-ink); }
.grade-name { font-family: var(--font-display); font-weight: 600; font-size: 1.4rem; }
.grade-card p { color: var(--ink-soft); font-size: 0.96rem; flex: 1; }
.grade-count { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 0.9rem; color: var(--g-ink); margin-top: 6px; }
.age-card .pills { flex-direction: column; align-items: flex-start; margin: 6px 0; }
.age-note { font-size: 0.93rem; color: var(--ink-soft); border-top: 1px dashed var(--line); padding-top: 12px; margin-top: auto; }
@media (max-width: 980px) { .grade-grid, .age-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grade-grid, .age-grid { grid-template-columns: 1fr; } }

.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.tcard { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); text-decoration: none; transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; }
.tcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: var(--t); }
.tcard-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--t-soft); color: var(--t-ink); flex: none; }
.tcard-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.tcard-text strong { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; }
.tcard-text span { font-size: 0.88rem; color: var(--ink-soft); line-height: 1.35; }
.tcard-arrow { color: var(--ink-faint); display: inline-flex; transition: transform 0.2s; }
.tcard:hover .tcard-arrow { transform: translateX(4px); color: var(--t-ink); }

.share-banner {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: 34px 38px; border-radius: 18px; color: #fff; background: var(--navy);
}
.share-banner::after { content: ''; position: absolute; right: -24px; bottom: -46px; width: 330px; height: 224px; background: url('../img/dwight/dwight-lion-white.svg') no-repeat center / contain; opacity: 0.09; pointer-events: none; }
.share-banner > * { position: relative; z-index: 1; }
.share-banner .h2 { color: #fff; }
.share-banner p { opacity: 0.88; max-width: 58ch; margin-top: 6px; }

/* ---- Video cards ------------------------------------------------------------------- */

.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.vcard { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; transition: transform 0.2s, box-shadow 0.2s; }
a.vcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.vposter, .yt-frame { position: relative; aspect-ratio: 16 / 9; background: var(--navy-deep); overflow: hidden; }
.vposter-art { display: block; width: 100%; height: 100%; object-fit: cover; }
.vplay { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%; background: rgba(255, 255, 255, 0.94); color: var(--navy); display: grid; place-items: center; padding-left: 4px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3); transition: transform 0.2s; }
.vcard:hover .vplay, .yt-poster:hover .vplay { transform: scale(1.1); }
.vtime { position: absolute; right: 10px; bottom: 10px; padding: 3px 9px; border-radius: 999px; background: rgba(16, 26, 56, 0.82); color: #fff; font-size: 0.78rem; font-weight: 800; }
.vbody { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; flex: 1; }
.vmeta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.vtitle { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; line-height: 1.25; }
.vby { font-size: 0.84rem; font-weight: 700; color: var(--ink-faint); }
.vblurb { font-size: 0.94rem; color: var(--ink-soft); flex: 1; }
.vcard-yt .text-link { font-size: 0.86rem; align-self: flex-start; margin-top: 4px; }
.yt-poster { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; background: var(--navy-deep) center / cover no-repeat; }
.yt-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-missing { display: grid; place-items: center; color: #cdd4e8; font-weight: 700; }

/* ---- Player ------------------------------------------------------------------------- */

.player { background: var(--navy-deep); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-lift); outline: none; }
.player:focus-visible { box-shadow: 0 0 0 4px var(--sky), var(--shadow-lift); }
.stage { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: calc(100vh - 210px); min-height: 230px; }
.stage-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage-caption {
  position: absolute; left: 6%; right: 6%; bottom: 7%; margin: 0; text-align: center; color: #fff;
  font-family: var(--font-display); font-weight: 600; font-size: clamp(1.05rem, 3.1vw, 2.3rem); line-height: 1.25;
  text-shadow: 0 2px 14px rgba(8, 12, 30, 0.75), 0 0 2px rgba(8, 12, 30, 0.6); opacity: 0; pointer-events: none; text-wrap: balance;
}
.stage-caption.is-in { opacity: 1; transition: opacity 0.7s; }
.stage-count { position: absolute; top: 5%; right: 4%; min-width: 2.2em; height: 2.2em; padding: 0 0.4em; border-radius: 999px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.14); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.1rem, 2.6vw, 2rem); pointer-events: none; }
.stage-count:empty { display: none; }
.stage-start {
  position: absolute; left: 50%; top: 80%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 30px 14px 16px; border: 0; border-radius: 999px; background: #fff; color: var(--navy); font-weight: 800; font-size: clamp(1rem, 2vw, 1.3rem);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.4); transition: opacity 0.3s, transform 0.2s;
}
.stage-start:hover { transform: translate(-50%, -50%) scale(1.05); }
.stage-start-icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--navy); color: #fff; padding-left: 4px; }
.player[data-state='playing'] .stage-start { opacity: 0; pointer-events: none; }
.player[data-state='idle'] .stage-caption, .player[data-state='idle'] .stage-count { display: none; }
.player[data-state='paused'] .stage-caption, .player[data-state='done'] .stage-caption { bottom: auto; top: 6%; }

.player-bar { display: flex; align-items: center; gap: 4px; padding: 10px 14px; background: var(--navy-deep); color: #cdd4e8; }
.pbtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 42px; height: 42px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; color: #cdd4e8; font-weight: 800; font-size: 0.86rem; }
.pbtn:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.pbtn[aria-pressed='false'] { opacity: 0.45; }
.pbtn-text { letter-spacing: 0.04em; }
.pbtn-toggle[aria-pressed='true'] { background: rgba(255, 255, 255, 0.14); color: #fff; }
.pbar { flex: 1; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.16); margin: 0 10px; overflow: hidden; min-width: 40px; }
.pbar-fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #8db4e2, #ffffff); }
.ptime { font-variant-numeric: tabular-nums; font-size: 0.86rem; font-weight: 700; margin-right: 6px; white-space: nowrap; }
@media (max-width: 620px) {
  .pbtn-step, .ptime, .pbtn-text { display: none; }
  .player { border-radius: 20px; }
  .stage-start { top: 70%; padding: 8px 20px 8px 8px; gap: 10px; }
  .stage-start-icon { width: 40px; height: 40px; }
  .stage-start-icon .ic { width: 20px; height: 20px; }
}

.player:fullscreen { width: 100vw; height: 100vh; border-radius: 0; display: flex; flex-direction: column; }
.player:-webkit-full-screen { width: 100vw; height: 100vh; border-radius: 0; display: flex; flex-direction: column; }
.player.is-max { position: fixed; inset: 0; z-index: 400; border-radius: 0; display: flex; flex-direction: column; }
.player:fullscreen .stage, .player.is-max .stage { flex: 1; aspect-ratio: auto; min-height: 0; max-height: none; }
.player:-webkit-full-screen .stage { flex: 1; aspect-ratio: auto; min-height: 0; max-height: none; }
.player:fullscreen .stage-caption { font-size: clamp(1.6rem, 4vw, 4rem); }

.watch-wrap { padding-top: 34px; padding-bottom: 50px; }
.watch-info { display: grid; grid-template-columns: 1.5fr 1fr; gap: 30px; margin-top: 28px; align-items: start; }
.watch-main > * + * { margin-top: 12px; }
.keys { font-size: 0.9rem; }
@media (max-width: 800px) { .watch-info { grid-template-columns: 1fr; } }

/* ---- Activities ----------------------------------------------------------------------- */

.filters { display: flex; flex-direction: column; gap: 12px; padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.filter-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.filter-label { width: 52px; font-size: 0.76rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); flex: none; display: inline-flex; }
.search-input { max-width: 340px; border-radius: 999px; padding: 9px 16px; }
.result-count { margin: 20px 0 14px; font-weight: 800; color: var(--ink-soft); }

.activity-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.acard { display: flex; flex-direction: column; gap: 8px; padding: 20px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); text-decoration: none; transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; }
.acard:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: var(--t); }
.acard-top, .sheet-top { display: flex; align-items: center; gap: 10px; }
.acard-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; background: var(--t-soft); color: var(--t-ink); flex: none; }
.acard-cat { font-size: 0.74rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--t-ink); }
.acard-title { font-family: var(--font-display); font-weight: 600; font-size: 1.18rem; line-height: 1.25; }
.acard-blurb { font-size: 0.94rem; color: var(--ink-soft); flex: 1; }
.acard-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-top: 4px; }

.sheet { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: clamp(24px, 5vw, 48px); box-shadow: var(--shadow); }
.sheet > * + * { margin-top: 18px; }
.sheet-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.sheet-materials { background: var(--sky-wash); border-radius: var(--radius-sm); padding: 12px 16px; }
.steps { counter-reset: step; display: grid; gap: 14px; }
.steps li { counter-increment: step; position: relative; padding-left: 54px; min-height: 40px; display: flex; align-items: center; font-size: 1.08rem; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 40px; height: 40px; border-radius: 50%; background: var(--t-soft); color: var(--t-ink); display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; }
.sheet-credit { font-size: 0.8rem; color: var(--ink-faint); border-top: 1px solid var(--line); padding-top: 12px; }

/* ---- Tools: shared ---------------------------------------------------------------------- */

.section-tool { padding-top: 10px; }

/* Breathing Studio */
.studio-main { display: grid; gap: 18px; }
.studio-info { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.studio-info > div:first-child > * + * { margin-top: 6px; }
.studio-title { font-family: var(--font-display); font-weight: 600; font-size: 1.7rem; }
.studio-blurb { color: var(--ink-soft); max-width: 56ch; }
.studio-choose { margin: 36px 0 14px; }
.pattern-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.pattern-card { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-align: left; padding: 16px 18px; border-radius: var(--radius-sm); background: var(--card); border: 2px solid var(--line); transition: border-color 0.15s, transform 0.15s; }
.pattern-card:hover { border-color: var(--navy); transform: translateY(-2px); }
.pattern-card[aria-pressed='true'] { border-color: var(--navy); background: #eef1f8; }
.pattern-name { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; }
.pattern-count { font-size: 0.86rem; font-weight: 700; color: var(--ink-soft); }
.pattern-grades { display: flex; gap: 4px; margin-top: 4px; }

/* Mindful Coloring */
.color-tool { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 26px; align-items: start; }
.color-stage { position: sticky; top: 90px; }
.color-board { background: #fff; border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow); padding: clamp(8px, 2vw, 18px); max-width: 680px; margin: 0 auto; }
.coloring-svg { display: block; width: 100%; height: auto; border-radius: 16px; touch-action: manipulation; }
.region { cursor: pointer; transition: fill 0.18s; }
.region:hover { stroke-width: 4; }
.color-tip { text-align: center; font-family: var(--font-accent); font-style: italic; color: var(--ink-soft); margin-top: 14px; }
.color-side { display: grid; gap: 14px; }
.design-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.design-thumb { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 6px; border-radius: 14px; border: 2px solid var(--line); background: #fff; transition: border-color 0.15s; }
.design-thumb svg { border-radius: 8px; }
.design-thumb:hover, .design-thumb[aria-pressed='true'] { border-color: var(--navy); }
.design-thumb[aria-pressed='true'] { background: #eef1f8; }
.design-name { font-weight: 800; font-size: 0.8rem; line-height: 1.2; }
.design-level { font-size: 0.7rem; color: var(--ink-faint); font-weight: 700; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.swatch { width: 38px; height: 38px; border-radius: 50%; border: 3px solid #fff; background: var(--c); box-shadow: 0 0 0 1.5px var(--line); transition: transform 0.12s, box-shadow 0.12s; padding: 0; }
.swatch:hover { transform: scale(1.1); }
.swatch[aria-pressed='true'] { box-shadow: 0 0 0 3px var(--navy); transform: scale(1.12); }
.swatch-eraser { background: #fff linear-gradient(135deg, transparent 45%, #cf202f 45%, #cf202f 55%, transparent 55%); }
.swatch-gap { width: 100%; height: 0; }
.share-preview { max-width: 220px; margin: 0 auto; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.ambient { display: grid; gap: 10px; }
@media (max-width: 980px) { .color-tool { grid-template-columns: 1fr; } .color-stage { position: static; } }

/* Glitter Jar */
.jar-tool { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 30px; align-items: center; }
.jar-stage { position: relative; border-radius: 18px; overflow: hidden; background: var(--navy-deep); box-shadow: var(--shadow-lift); }
.jar-canvas { display: block; width: 100%; aspect-ratio: 4 / 5; max-height: 72vh; touch-action: none; cursor: grab; }
.jar-timer { position: absolute; top: 14px; right: 16px; color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; font-variant-numeric: tabular-nums; opacity: 0.85; }
.jar-side { display: grid; gap: 18px; justify-items: start; }
.jar-status { font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; line-height: 1.25; }
@media (max-width: 860px) { .jar-tool { grid-template-columns: 1fr; } }

/* Grounding */
.ground-card { max-width: 660px; margin: 0 auto; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: clamp(26px, 5vw, 48px); text-align: center; box-shadow: var(--shadow); }
.ground-card > * + * { margin-top: 16px; }
.ground-card .lead { margin-left: auto; margin-right: auto; }
.ground-progress { display: flex; justify-content: center; gap: 8px; }
.ground-pip { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 0.9rem; background: var(--paper-2); color: var(--ink-faint); }
.ground-pip.is-done { background: var(--sage); color: #fff; }
.ground-pip.is-now { background: var(--navy); color: #fff; }
.ground-emoji { font-size: 4rem; line-height: 1; }
.ground-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.6rem, 4vw, 2.4rem); }
.ground-number { color: var(--coral); font-size: 1.4em; }
.ground-dots { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; padding: 8px 0; }
.ground-dot { width: 66px; height: 66px; border-radius: 50%; border: 3px dashed #c9bfae; background: var(--paper); font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: var(--ink-faint); display: grid; place-items: center; transition: transform 0.15s, background 0.2s; }
.ground-dot:hover { transform: scale(1.08); border-color: var(--sage); }
.ground-dot[aria-pressed='true'] { background: var(--sage); border: 3px solid var(--sage); color: #fff; }

/* Gratitude Jar */
.grat-tool { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.grat-prompt { font-family: var(--font-accent); font-style: italic; color: var(--ink-soft); font-size: 1.1rem; }
.grat-side { text-align: center; display: grid; gap: 14px; }
.grat-jar-wrap { width: 210px; margin: 0 auto; }
.grat-lid { height: 20px; width: 72%; margin: 0 auto; background: #c9b592; border-radius: 9px 9px 3px 3px; }
.grat-jar { height: 240px; border: 3px solid rgba(27, 45, 91, 0.22); border-radius: 24px 24px 44px 44px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(225, 238, 250, 0.7)); display: flex; flex-wrap: wrap-reverse; align-content: flex-start; justify-content: center; gap: 6px 4px; padding: 16px 14px; overflow: hidden; }
.slip { width: 36px; height: 15px; border-radius: 4px; background: var(--t); transform: rotate(var(--r, 0deg)); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15); }
.grat-count { font-weight: 800; color: var(--ink-soft); }
.grat-card { background: var(--honey-soft); border-radius: var(--radius); padding: 22px; transform: rotate(-1.2deg); box-shadow: var(--shadow); }
.grat-card-text { font-family: var(--font-accent); font-style: italic; font-size: 1.3rem; line-height: 1.35; color: var(--navy); }
.grat-date { font-size: 0.8rem; color: var(--ink-faint); font-weight: 700; white-space: nowrap; }
.grat-all { grid-column: 1 / -1; }
.grat-list { display: grid; gap: 8px; margin-top: 14px; }
.grat-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); border-left: 6px solid var(--t); }
.grat-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 800px) { .grat-tool { grid-template-columns: 1fr; } }

/* Inner Weather */
.weather-tool { display: grid; gap: 18px; }
.weather-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 12px; }
.weather-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 18px 10px 14px; border-radius: var(--radius); background: var(--card); border: 2px solid var(--line); transition: transform 0.15s, border-color 0.15s; }
.weather-btn:hover { transform: translateY(-3px); border-color: var(--navy); }
.weather-btn[aria-pressed='true'] { border-color: var(--navy); background: #eef1f8; }
.weather-emoji { font-size: 2.6rem; line-height: 1.1; }
.weather-label { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; }
.weather-words { font-size: 0.76rem; color: var(--ink-faint); font-weight: 700; text-align: center; line-height: 1.3; }
.weather-card { display: flex; gap: 22px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.weather-card > div:last-child > * + * { margin-top: 10px; }
.weather-big { font-size: 4rem; line-height: 1; }
@media (max-width: 560px) { .weather-card { flex-direction: column; } }

/* Bell & Timer */
.timer-tool { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 44px; align-items: center; }
.timer-face { position: relative; width: min(340px, 78vw); aspect-ratio: 1; margin: 0 auto; }
.timer-ring { width: 100%; height: 100%; display: block; }
.timer-track { fill: none; stroke: var(--paper-2); stroke-width: 14; }
.timer-arc { fill: none; stroke: var(--navy); stroke-width: 14; stroke-linecap: round; transition: stroke-dashoffset 0.25s linear; }
.timer-time { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; font-size: clamp(3rem, 9vw, 4.6rem); font-variant-numeric: tabular-nums; color: var(--navy); }
.timer-side { display: grid; gap: 18px; }
.panel-bell { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.panel-bell > * + * { margin-top: 0; }
@media (max-width: 800px) { .timer-tool { grid-template-columns: 1fr; gap: 26px; } }

/* Mindful Moment Picker */
.picker-tool { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 26px; align-items: stretch; }
.picker-controls { display: grid; gap: 16px; align-content: start; justify-items: start; }
.picker-controls .field-label { margin-bottom: 8px; }
.picker-card { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 10px; min-height: 230px; padding: 30px; border-radius: 18px; background: var(--navy); color: #fff; box-shadow: var(--shadow-lift); }
.picker-card .tag { background: rgba(255, 255, 255, 0.16); color: #fff; }
.picker-card p { opacity: 0.88; }
.picker-card .btn { background: #fff; color: var(--navy); border-color: #fff; margin-top: 6px; }
.picker-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.15; }
.picker-card.is-spinning .picker-title { opacity: 0.6; }
.picker-empty { font-family: var(--font-display); font-size: 1.3rem; }
@media (max-width: 800px) { .picker-tool { grid-template-columns: 1fr; } }

/* ---- Students ------------------------------------------------------------------------------ */

.need-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.need-btn { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-radius: var(--radius-sm); background: var(--card); border: 2px solid var(--line); font-weight: 800; text-align: left; transition: border-color 0.15s, transform 0.15s; }
.need-btn:hover { border-color: var(--navy); transform: translateY(-2px); }
.need-btn[aria-pressed='true'] { border-color: var(--navy); background: var(--navy); color: #fff; }
.need-icon { display: inline-flex; }
.need-result { margin-top: 20px; }
.need-result:empty { display: none; }
.need-result > * + * { margin-top: 10px; }
.kit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.kit-card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.kit-card > * + * { margin-top: 10px; }
.kit-num { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--lavender-soft); color: var(--lavender-ink); font-family: var(--font-display); font-weight: 700; }

/* ---- Teachers & families ------------------------------------------------------------------- */

.routine-grid, .plan-grid, .care-grid, .ib-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; }
.routine, .plan-card, .care-card, .ib-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.routine > * + *, .plan-card > * + *, .care-card > * + *, .ib-card > * + * { margin-top: 10px; }
.routine-icon, .care-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--sage-soft); color: var(--sage-ink); }
.routine-when { font-size: 0.74rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--sage-ink); }
.plan-grid { margin-top: 20px; }
.plan-week { display: inline-block; padding: 3px 12px; border-radius: 999px; background: var(--navy); color: #fff; font-size: 0.76rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.plan-card .field-label { margin-top: 14px; font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); }
.plan-ask { border-top: 1px dashed var(--line); padding-top: 12px; margin-top: 16px; font-family: var(--font-accent); font-style: italic; color: var(--navy); }
.plan-ask strong { font-style: normal; font-family: var(--font-body); }
.ib-card { border-top: 4px solid var(--navy); }
.care-icon { background: var(--coral-soft); color: var(--coral-ink); }

.script-list { display: grid; gap: 10px; max-width: 860px; }
.script { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.script summary { display: flex; align-items: center; gap: 12px; padding: 16px 20px; cursor: pointer; font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; list-style: none; }
.script summary::-webkit-details-marker { display: none; }
.script summary > span:first-child { flex: 1; }
.script-chev { display: inline-flex; transition: transform 0.2s; color: var(--ink-faint); }
.script[open] .script-chev { transform: rotate(180deg); }
.script-body { padding: 0 20px 20px; }
.script-body > * + * { margin-top: 12px; }
.script-body p { font-size: 1.06rem; max-width: 66ch; }

.principle-grid { counter-reset: p; display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 16px; }
.principle { counter-increment: p; position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 24px 24px 74px; }
.principle::before { content: counter(p); position: absolute; left: 22px; top: 22px; width: 38px; height: 38px; border-radius: 50%; background: var(--honey-soft); color: var(--honey-ink); display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; }
.principle p { margin-top: 6px; color: var(--ink-soft); font-size: 0.97rem; }

.book-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.book-group { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.book-list { margin-top: 14px; display: grid; gap: 12px; }
.book-list li { display: flex; flex-direction: column; line-height: 1.3; }
.book-list em { font-family: var(--font-display); font-size: 1.04rem; font-weight: 600; }
.book-list span { font-size: 0.86rem; color: var(--ink-faint); font-weight: 700; }
.link-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.link-card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 20px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); text-decoration: none; transition: transform 0.2s, box-shadow 0.2s; }
.link-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.link-name { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; }
.link-text { font-size: 0.93rem; color: var(--ink-soft); }

.isnt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 16px; }
.isnt-card { border-radius: var(--radius); padding: 26px; background: var(--card); border: 1px solid var(--line); }
.isnt-card > * + * { margin-top: 12px; }
.isnt-card.is { background: var(--sage-soft); border-color: transparent; }
.isnt-card.isnt { background: var(--coral-soft); border-color: transparent; }
.isnt-card.korean { background: var(--sky-soft); border-color: transparent; }
.isnt-card.korean p { line-height: 1.8; word-break: keep-all; }
.tick-list { display: grid; gap: 10px; }
.tick-list li { display: flex; gap: 10px; align-items: flex-start; }
.tick-list .ic { margin-top: 5px; }
.rhythm { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.rhythm-step { padding: 24px; border-left: 1px solid var(--line); }
.rhythm-step:first-child { border-left: 0; }
.rhythm-step h3 { color: var(--sky-ink); margin-bottom: 6px; }
@media (max-width: 860px) { .rhythm { grid-template-columns: 1fr 1fr; } .rhythm-step { border-left: 0; border-top: 1px solid var(--line); } }
@media (max-width: 520px) { .rhythm { grid-template-columns: 1fr; } }
.starter-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.starter-list li { background: var(--card); border: 1px solid var(--line); border-radius: 18px 18px 18px 4px; padding: 16px 20px; font-family: var(--font-accent); font-style: italic; font-size: 1.08rem; line-height: 1.4; color: var(--navy); }

/* ---- Community ------------------------------------------------------------------------------- */

.tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 5px; background: rgba(255, 255, 255, 0.85); border: 1px solid var(--line); border-radius: 12px; }
.tab { display: inline-flex; align-items: center; gap: 7px; padding: 10px 18px; border-radius: 8px; font-weight: 700; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; color: var(--ink-soft); }
.tab:hover { color: var(--navy); }
.tab[aria-current='page'] { background: var(--navy); color: #fff; }
.wall-bar { margin-bottom: 22px; }

.post-grid { column-width: 320px; column-gap: 18px; }
.post-grid > * { break-inside: avoid; margin-bottom: 18px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.post { display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); border-top: 5px solid var(--t); }
.post.is-pinned { box-shadow: var(--shadow); }
.post-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.post-type, .post-pin { display: inline-flex; align-items: center; gap: 6px; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--t-ink); }
.post-pin { color: var(--ink-faint); }
.post-art { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.post-art svg { display: block; width: 100%; height: auto; }
.post .yt-frame { border-radius: 14px; }
.post-title { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; line-height: 1.25; overflow-wrap: anywhere; }
.post-body { white-space: pre-line; overflow-wrap: anywhere; color: var(--ink-soft); }
.post-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 0.82rem; font-weight: 700; color: var(--ink-faint); margin-top: 2px; }
.post-who { color: var(--ink-soft); overflow-wrap: anywhere; }
.post-date { margin-left: auto; }

.share-wrap { margin-top: 26px; }
.share-form { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: clamp(22px, 4vw, 40px); box-shadow: var(--shadow); }
.share-form > * + * { margin-top: 30px; }
.type-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.type-option { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-sm); border: 2px solid var(--line); background: #fff; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.type-option input { position: absolute; opacity: 0; pointer-events: none; }
.type-option:hover { border-color: var(--t); }
.type-option:has(input:checked) { border-color: var(--t-ink); background: var(--t-soft); }
.type-option:has(input:focus-visible) { outline: 3px solid var(--sky); outline-offset: 2px; }
.type-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--t-soft); color: var(--t-ink); flex: none; }
.type-option:has(input:checked) .type-icon { background: #fff; }
.type-text { display: flex; flex-direction: column; line-height: 1.35; }
.type-text span { font-size: 0.86rem; color: var(--ink-soft); }
.thanks { text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: clamp(30px, 6vw, 60px); box-shadow: var(--shadow); }
.thanks > * + * { margin-top: 14px; }
.thanks .lead { margin-left: auto; margin-right: auto; }
.thanks-icon { display: inline-grid; place-items: center; width: 70px; height: 70px; border-radius: 50%; background: var(--sage-soft); color: var(--sage-ink); }

/* ---- Committee -------------------------------------------------------------------------------- */

.login-card { max-width: 460px; margin: 0 auto; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 36px; box-shadow: var(--shadow); }
.login-icon { display: inline-grid; place-items: center; width: 58px; height: 58px; border-radius: 18px; background: #e6e9f2; color: var(--navy); }
.admin-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.admin-section { margin-top: 40px; }
.admin-section > .h2 { margin-bottom: 18px; }
.admin-item { display: flex; flex-direction: column; gap: 10px; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.not-found { text-align: left; padding-top: 80px; padding-bottom: 80px; }
.not-found > * + * { margin-top: 16px; }

/* ---- Dwight touches ---------------------------------------------------------------------- */

.section-navy { background: var(--navy); color: #fff; position: relative; overflow: hidden; }
.section-navy::after { content: ''; position: absolute; left: -60px; bottom: -70px; width: 460px; height: 300px; background: url('../img/dwight/dwight-lion-white.svg') no-repeat center / contain; opacity: 0.06; pointer-events: none; }
.section-navy > .wrap { position: relative; z-index: 1; }
.section-navy .h2 { color: #fff; }
.section-navy .section-lead { color: rgba(255, 255, 255, 0.82); }
.pillar-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.pillar { background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.16); border-top: 4px solid var(--red); border-radius: var(--radius); padding: 26px; }
.pillar > * + * { margin-top: 10px; }
.pillar-num { font-family: var(--font-accent); font-style: italic; font-size: 1.1rem; color: #f3a9b0; }
.pillar-title { font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; letter-spacing: 0.02em; text-transform: uppercase; color: #fff; }
.pillar p { color: rgba(255, 255, 255, 0.86); font-size: 0.98rem; }
.pillar-grid.on-light .pillar { background: var(--card); border-color: var(--line); border-top-color: var(--red); }
.pillar-grid.on-light .pillar-num { color: var(--red); }
.pillar-grid.on-light .pillar-title { color: var(--navy); }
.pillar-grid.on-light .pillar p { color: var(--ink-soft); }
@media (max-width: 860px) { .pillar-grid { grid-template-columns: 1fr; } }
.lion-mark { display: block; width: 96px; height: auto; margin-bottom: 18px; }

/* ---- Print ------------------------------------------------------------------------------------- */

.print-sheet, .print-only { display: none; }

@media print {
  .site-header, .site-footer, .no-print, .toast, .share-banner, .skip { display: none !important; }
  body { background: #fff; font-size: 12pt; display: block; }
  .print-only { display: block; }
  .section, .wrap.section { padding: 0; }
  .sheet { border: 0; box-shadow: none; padding: 0; }
  body.is-printing-sheet > *:not(.print-sheet) { display: none !important; }
  body.is-printing-sheet .print-sheet { display: block; text-align: center; }
  .print-sheet svg { width: 100%; max-width: 180mm; height: auto; margin: 0 auto; display: block; }
  .print-sheet p { margin-top: 6mm; font-size: 10pt; color: #555; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .orb-ring, .orb-core, .brand-mark::after { animation: none; }
  .btn, .vcard, .door, .tcard, .acard, .grade-card { transition: none; }
}
