/* lumejo.org site styles. Tokens from /_kit/lumejo-tokens.css (brand kit). Phone first, 16px gutters. */
:root {
  --ink-soft: #5A5246;
  --rule: #DDD3BD;
  --gutter: 16px;
  --measure: 1080px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
/* Ethiopic script (Amharic). The brand fonts have no Ethiopic letters, so each glyph falls back to the
   first font that has it: Noto (Android, Linux, if installed), Kefa (Apple), Nyala and Ebrima (Windows).
   Latin words keep the brand fonts. Ethiopic has no italic: never slant it artificially. */
html:lang(am) {
  --lj-font-text: "Playpen Sans", "Noto Sans Ethiopic", "Kefa", "Nyala", "Ebrima", system-ui, sans-serif;
  --lj-font-title: "Alegreya", "Noto Serif Ethiopic", "Kefa", "Nyala", "Ebrima", Georgia, serif;
  font-synthesis-style: none;
}
/* Devanagari script (Hindi), the same way: Noto (Android, Linux), Kohinoor (Apple), Nirmala UI and Mangal
   (Windows). Devanagari has no italic either. */
html:lang(hi) {
  --lj-font-text: "Playpen Sans", "Noto Sans Devanagari", "Kohinoor Devanagari", "Nirmala UI", "Mangal", system-ui, sans-serif;
  --lj-font-title: "Alegreya", "Noto Serif Devanagari", "Kohinoor Devanagari", "Nirmala UI", "Mangal", Georgia, serif;
  font-synthesis-style: none;
}
:lang(am) h1, :lang(am) h2, :lang(hi) h1, :lang(hi) h2 { line-height: 1.3; }
@media (max-width: 699px) { html { scroll-padding-top: 132px; } }
body {
  margin: 0;
  background: var(--lj-paper);
  color: var(--lj-ink);
  font: 400 var(--lj-size-text)/1.55 var(--lj-font-text);
  overflow-x: hidden;
}
a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--lj-sun); outline-offset: 2px; }
h1, h2 { font-family: var(--lj-font-title); font-style: italic; font-weight: 600; line-height: 1.15; }
h1 { font-size: clamp(1.8rem, 5vw, var(--lj-size-title)); margin: 0.2em 0 0.4em; }
h2 { font-size: var(--lj-size-heading); margin: 1.6em 0 0.5em; }
h3 { font-size: 1.05rem; margin: 1.2em 0 0.4em; }
.lede { font-size: 1.15rem; max-width: 42em; }
.hint { color: var(--ink-soft); font-size: var(--lj-size-label); }
.eyebrow { font-size: var(--lj-size-label); font-weight: 600; color: var(--ink-soft); margin: 0; }

.dev-banner { margin: 0; padding: 4px var(--gutter); background: var(--lj-ochre); font-size: var(--lj-size-label); text-align: center; }

/* ---------- shell ---------- */
.site-head-bar { position: sticky; top: 0; z-index: 10; background: var(--lj-paper); border-bottom: 2px solid var(--rule); }
.site-head, main, .site-foot { max-width: var(--measure); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.site-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding-top: 10px; padding-bottom: 8px; }
.logo img { display: block; height: 52px; width: auto; }
@media (min-width: 700px) { .site-head .doors { margin-left: 40px; gap: 4px 22px; } }
.doors { display: flex; gap: 4px 16px; flex-wrap: wrap; }
.doors a { font-weight: 600; text-decoration: none; padding: 6px 2px; border-bottom: 3px solid transparent; }
.doors a[aria-current] { border-bottom-color: var(--lj-sun); }
.lang { position: relative; margin-left: auto; font-size: var(--lj-size-label); font-weight: 600; }
.lang summary { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 2px solid var(--lj-ink); border-radius: 999px; background: var(--lj-parchment); cursor: pointer; list-style: none; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary::after { content: ""; width: 7px; height: 7px; margin: -4px 2px 0 2px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.lang[open] summary::after { margin-top: 3px; transform: rotate(225deg); }
.lang svg { width: 18px; height: 18px; }
.lang ul { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 180px; max-width: 220px; list-style: none; margin: 0; padding: 6px; background: #fff; border: 2px solid var(--lj-ink); border-radius: 12px; box-shadow: 3px 3px 0 var(--lj-ink); }
.lang li a, .lang li span { display: block; padding: 8px 10px; border-radius: 8px; text-decoration: none; }
.lang li a:hover { background: var(--lj-parchment); }
.lang li span[aria-current] { background: var(--lj-sun); }
.lang .lang-note { margin-top: 4px; padding: 6px 10px 2px; border-top: 1px solid var(--rule); color: var(--ink-soft); font-weight: 400; font-size: 0.8rem; line-height: 1.35; }
.draft-banner { margin: 0; padding: 4px var(--gutter); background: #CFE0F2; font-size: var(--lj-size-label); text-align: center; }
.lang + .who { margin-left: 0; }
@media (max-width: 699px) {
  .site-head .lang { order: 1; }
  .site-head .doors { order: 2; flex: 1 1 100%; justify-content: space-between; gap: 0 8px; flex-wrap: wrap; font-size: 0.88rem; }
  .site-head .who { order: 3; }
}
.who { margin-left: auto; font-size: var(--lj-size-label); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
main { padding-top: 8px; padding-bottom: 48px; min-height: 60vh; }
.site-foot { border-top: 2px solid var(--rule); padding-top: 12px; padding-bottom: 32px; font-size: var(--lj-size-label); color: var(--ink-soft); }
.site-foot p { margin: 4px 0; }
.narrow { max-width: 640px; }

/* ---------- buttons and forms ---------- */
button, .button {
  display: inline-block; font: 600 var(--lj-size-label)/1 var(--lj-font-text); color: var(--lj-ink); text-decoration: none;
  min-height: 44px; padding: 13px 18px; background: var(--lj-sun);
  border: var(--lj-line); border-radius: var(--lj-edge); cursor: pointer; box-shadow: 2px 2px 0 var(--lj-ink);
}
button.secondary, .button.secondary { background: var(--lj-parchment); }
button.danger { background: #fff; color: var(--lj-vermilion); border-color: var(--lj-vermilion); box-shadow: none; }
button.link { background: none; border: 0; box-shadow: none; padding: 6px 0; min-height: 0; text-decoration: underline; font-weight: 400; }
button.link.danger { color: var(--lj-vermilion); }
input, textarea { font: inherit; padding: 10px 12px; border: 2px solid var(--lj-ink); border-radius: 8px; background: #fff; width: 100%; max-width: 420px; }
label { display: block; font-weight: 600; font-size: var(--lj-size-label); }
label input, label textarea { display: block; margin-top: 4px; font-weight: 400; font-size: var(--lj-size-text); }
.stack > * + * { margin-top: 12px; }
.inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.inline label { flex: 1 1 220px; }
.sign-out { margin-top: 32px; }
.error { color: var(--lj-vermilion); font-weight: 600; }
.warn { background: var(--lj-parchment); border-left: 4px solid var(--lj-ochre); padding: 8px 14px; margin: 12px 0; }
.warn p { margin: 6px 0; }
.ok { border-left: 4px solid var(--lj-leaf); padding: 4px 12px; }
.dev-note { background: #fff; border: 2px dashed var(--lj-ochre); padding: 10px 14px; overflow-wrap: anywhere; }
.code { font-family: ui-monospace, Menlo, monospace; font-weight: 700; letter-spacing: 0.04em; }
.code.big { font-size: 1.2em; background: var(--lj-parchment); padding: 2px 8px; border-radius: 6px; }
.danger-zone { margin-top: 40px; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- home: the three doors as panels ---------- */
.panels { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); margin: 16px 0 8px; }
@media (min-width: 700px) { .panels { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.panel {
  display: flex; flex-direction: column; text-decoration: none; overflow: hidden;
  background: var(--lj-parchment); border: var(--lj-line); border-radius: var(--lj-edge);
  box-shadow: 4px 4px 0 var(--lj-ink); transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.panel:hover, .panel:focus-visible { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--lj-ink); }
.panel-art { position: relative; display: block; aspect-ratio: 3 / 2; overflow: hidden; border-bottom: var(--lj-line); background: var(--lj-paper); }
.panel-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.panel-watch .panel-art img { object-position: 50% 100%; }
.panel-play .panel-art img { object-position: 22% 50%; }
.panel-art .panel-figure { position: absolute; right: 2%; bottom: 0; width: auto; height: 92%; object-fit: contain; }
.panel-text { display: flex; flex-direction: column; gap: 6px; padding: 12px 16px 16px; flex: 1; }
.panel-title { font-family: var(--lj-font-title); font-style: italic; font-weight: 600; font-size: 2rem; line-height: 1; }
.panel-line { font-size: 0.95rem; flex: 1; }
.panel-go { align-self: flex-start; margin-top: 6px; font-weight: 700; font-size: var(--lj-size-label); padding: 8px 14px; background: var(--lj-sun); border: 2px solid var(--lj-ink); border-radius: var(--lj-edge); }
.panel-go::after { content: " →"; }
.panel-play .panel-go { background: #CFE5B4; }
.panel-teach .panel-go { background: #CFE0F2; }
/* Phones: all three doors on the first screen, picture beside the words. */
@media (max-width: 699px) {
  .panels { gap: 12px; margin-top: 12px; }
  .panel { flex-direction: row; min-height: 150px; }
  .panel-art { flex: 0 0 42%; aspect-ratio: auto; border-bottom: 0; border-right: var(--lj-line); }
  .panel-art .panel-figure { height: 80%; }
  .panel-text { padding: 10px 12px 12px; gap: 4px; }
  .panel-title { font-size: 1.6rem; }
  .panel-line { font-size: 0.82rem; line-height: 1.35; }
  .panel-go { margin-top: 2px; padding: 6px 10px; font-size: 0.8rem; }
}
@media (prefers-reduced-motion: reduce) { .panel { transition: none; } .panel:hover { transform: none; } }

/* ---------- home (proposal 2026-10-20): blocks in order, see src/pages/home.js ---------- */
.home section { margin-top: 44px; }
.home section:first-child { margin-top: 12px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin-bottom: 12px; }
.section-head h2 { margin: 0; }
.section-head .hint { margin: 0; max-width: 40em; }
.more { margin: 14px 0 0; font-weight: 600; font-size: var(--lj-size-label); }
.more a::after { content: " →"; }
.chip { display: inline-block; font-style: normal; font-weight: 700; font-size: 0.72rem; letter-spacing: 0.02em; padding: 2px 8px; border: 1.5px solid var(--lj-ink); border-radius: 999px; background: #fff; white-space: nowrap; }
.ink-icon { width: 44px; height: 44px; flex: none; }

/* 1. hero */
.hero { display: grid; gap: 20px; align-items: center; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 860px) { .hero { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; } }
.hero h1 { font-size: clamp(1.9rem, 4.6vw, 2.9rem); margin: 0.1em 0 0.35em; }
.hero .lede { margin: 0 0 18px; }
.hero-ways { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-art { order: -1; border: var(--lj-line); border-radius: var(--lj-edge); overflow: hidden; box-shadow: 4px 4px 0 var(--lj-ink); background: var(--lj-parchment); aspect-ratio: 3 / 2; }
.hero-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; }
@media (min-width: 860px) { .hero-art { order: 0; } }

/* 2. promise */
.promise ul { list-style: none; margin: 0; padding: 16px; display: grid; gap: 14px 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  background: var(--lj-sun); border: var(--lj-line); border-radius: var(--lj-edge); box-shadow: 4px 4px 0 var(--lj-ink); }
.promise li { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: start; }
.promise .ink-icon { grid-row: span 2; width: 38px; height: 38px; }
.promise b { font-family: var(--lj-font-title); font-style: italic; font-size: 1.25rem; line-height: 1.1; }
.promise span { font-size: var(--lj-size-label); line-height: 1.4; }

/* 3. try it now */
.sample .kind { align-self: flex-start; font-weight: 700; font-size: 0.75rem; padding: 2px 10px; border: 1.5px solid var(--lj-ink); border-radius: 999px; background: #fff; }
.sample-video .kind { background: var(--lj-sun); }
.sample-game .kind { background: #CFE5B4; }
.sample-cards .kind { background: #CFE0F2; }
.samples { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 600px) { .samples { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .samples { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* 4. resources: two doors */
.doors-2 { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.door { display: flex; flex-direction: column; padding: 0 18px 18px; background: var(--lj-parchment); border: var(--lj-line); border-radius: var(--lj-edge); box-shadow: 4px 4px 0 var(--lj-ink); overflow: hidden; }
.door h3 { font-family: var(--lj-font-title); font-style: italic; font-size: 1.7rem; margin: 12px 0 6px; }
.door-art { display: flex; justify-content: center; align-items: flex-end; gap: 0; margin: 0 -18px; height: 150px; background: #CFE0F2; border-bottom: var(--lj-line); overflow: hidden; }
.door-students .door-art { background: #CFE5B4; }
.door-art img { height: 130px; width: auto; margin: 0 -10px; }
.door-art img.wide { height: 100%; width: 100%; margin: 0; object-fit: cover; }
.door-list { list-style: none; padding: 0; margin: 0 0 16px; flex: 1; }
.door-list li { padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: 0.95rem; }
.door-list li a { display: block; text-decoration: none; }
.door-list li a b { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.door-list li span { color: var(--ink-soft); }
.door-list li.soon b { color: var(--ink-soft); }
.door-list .chip { margin-left: 4px; }
.door .button { align-self: flex-start; }

/* 5. ideas */
.idea-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.idea-list li { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; background: #fff; border: 2px solid var(--lj-ink); border-radius: var(--lj-edge); }
.idea-list img { width: 72px; height: 72px; border-radius: 50%; border: 2px solid var(--lj-ink); background: var(--lj-parchment); object-fit: cover; }
.idea-list b { font-family: var(--lj-font-title); font-style: italic; font-size: 1.3rem; line-height: 1.15; }
.idea-list span { font-size: 0.95rem; }

/* 6. toward a complete school */
.school-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 600px) { .school-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .school-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.school-list li { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; row-gap: 4px; align-content: start; padding: 14px 16px; border: 2px dashed var(--ink-soft); border-radius: var(--lj-edge); background: var(--lj-paper); }
.school-list li.status-building { border-style: solid; border-color: var(--lj-ink); background: var(--lj-parchment); }
.school-list li.status-live { border: var(--lj-line); background: #fff; box-shadow: 3px 3px 0 var(--lj-ink); }
.school-list .ink-icon { grid-row: span 3; color: var(--lj-ultramarine); }
.school-list b { font-weight: 700; }
.school-list span { font-size: 0.9rem; color: var(--ink-soft); }
.school-list .chip { justify-self: start; }
.status-building .chip { background: var(--lj-ochre); }

/* 7. partners */
.partners { display: grid; gap: 20px; align-items: center; grid-template-columns: minmax(0, 1fr); padding: 18px; background: #CFE0F2; border: var(--lj-line); border-radius: var(--lj-edge); box-shadow: 4px 4px 0 var(--lj-ink); }
@media (min-width: 860px) { .partners { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); padding: 24px 28px; } }
.partners h2 { margin-top: 0; }
.partner-list { list-style: none; padding: 0; margin: 0 0 16px; }
.partner-list li { padding: 6px 0; }
.partner-list b { display: block; font-family: var(--lj-font-title); font-style: italic; font-size: 1.2rem; }
.partners-art { position: relative; aspect-ratio: 3 / 2; border: var(--lj-line); border-radius: var(--lj-edge); overflow: hidden; background: var(--lj-paper); }
.partners-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.partners-art .panel-figure { position: absolute; right: 4%; bottom: 0; width: 46%; height: auto; object-fit: contain; }
.tiers li { margin-bottom: 8px; }

/* ---------- home and lists ---------- */
.tiles { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.tile a {
  display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 14px 16px; text-decoration: none;
  background: var(--lj-parchment); border: var(--lj-line); border-radius: var(--lj-edge); box-shadow: 3px 3px 0 var(--lj-ink);
}
.tile a:hover { background: #fff; }
.tile-art, .series-art, .link-art { display: block; overflow: hidden; background: var(--lj-paper); }
.tile-art { margin: -14px -16px 6px; aspect-ratio: 16 / 9; border-bottom: var(--lj-line); border-radius: 12px 12px 0 0; }
.tile-art img, .series-art img, .link-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.series-cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.series-cards a { display: flex; flex-direction: column; height: 100%; text-decoration: none; overflow: hidden; background: var(--lj-parchment); border: var(--lj-line); border-radius: var(--lj-edge); box-shadow: 3px 3px 0 var(--lj-ink); }
.series-cards a:hover { background: #fff; }
.series-art { aspect-ratio: 16 / 9; border-bottom: var(--lj-line); }
.series-text { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px 12px; }
.series-text b { font-family: var(--lj-font-title); font-style: italic; font-size: 1.2rem; }
.link-card { display: flex; gap: 12px; align-items: center; text-decoration: none; }
.link-card:hover span b { text-decoration: underline; }
.link-art { flex: 0 0 120px; aspect-ratio: 16 / 9; border: 2px solid var(--lj-ink); border-radius: 8px; }
.tile-title { font-family: var(--lj-font-title); font-style: italic; font-weight: 600; font-size: 1.25rem; line-height: 1.2; }
.tile-q { font-size: var(--lj-size-label); color: var(--ink-soft); }
.series-list, .class-list, .pupil-list, .link-list { list-style: none; padding: 0; margin: 0; }
.series-list li a, .class-list li a { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--rule); text-decoration: none; }
.series-list li a:hover b, .class-list li a:hover b { text-decoration: underline; }
.family h3 { margin-top: 1.4em; }
.link-list li { padding: 6px 0; }
.pupil-list li { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--rule); }
.pupil-list li b { flex: 1 1 140px; }

/* ---------- episode ---------- */
.ep-head h1 { max-width: 24em; }
.ep-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 16px; }
.ep-tabs a {
  font-weight: 600; font-size: var(--lj-size-label); text-decoration: none; padding: 11px 16px; min-height: 44px;
  background: var(--lj-parchment); border: var(--lj-line); border-radius: var(--lj-edge);
}
.ep-tabs a[aria-current] { background: var(--lj-sun); box-shadow: 2px 2px 0 var(--lj-ink); }
.ep-tabs .print-link { margin-left: auto; background: #fff; }
.watch-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 860px) { .watch-grid { grid-template-columns: minmax(0, 1fr) 260px; } }
.player { width: 100%; aspect-ratio: 16 / 9; background: var(--lj-ink); border-radius: 10px; display: block; }
.player.placeholder { position: relative; display: grid; place-items: end start; overflow: hidden; color: var(--lj-paper); }
.player.placeholder img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.player.placeholder p { position: relative; margin: 10px; padding: 4px 10px; font-size: var(--lj-size-label); background: rgb(28 23 18 / 0.75); border-radius: 6px; }
.ep-question { font-family: var(--lj-font-title); font-style: italic; font-size: 1.3rem; margin: 16px 0 8px; }
.ep-aside dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0 0 12px; font-size: var(--lj-size-label); }
.ep-aside dt { font-weight: 600; }
.ep-aside dd { margin: 0; }
.history summary { cursor: pointer; font-weight: 600; font-size: var(--lj-size-label); }
.history ol { padding-left: 18px; font-size: var(--lj-size-label); }
.with-card .ep-panel main, .with-card .card { max-width: 820px; }

/* ---------- results ---------- */
.table-wrap { overflow-x: auto; max-width: 100%; }
.results { border-collapse: collapse; font-size: var(--lj-size-label); min-width: 100%; }
.results th, .results td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.results thead th { font-weight: 700; border-bottom: 2px solid var(--lj-ink); }
.r-seq { display: inline-flex; gap: 4px; align-items: center; }
.r-ok { color: var(--lj-leaf); font-weight: 700; }
.r-no { color: var(--lj-vermilion); font-weight: 700; cursor: help; }
.r-none { color: var(--ink-soft); }

/* ---------- pupils ---------- */
.join h1 { font-size: clamp(1.6rem, 6vw, 2.2rem); }
.code-input { text-transform: uppercase; font-family: ui-monospace, Menlo, monospace; font-size: 1.4rem; letter-spacing: 0.08em; max-width: 220px; }
.pick-list { list-style: none; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.pick-list a { display: block; padding: 16px; text-align: center; font-weight: 700; text-decoration: none; background: var(--lj-parchment); border: var(--lj-line); border-radius: var(--lj-edge); }
.chosen { list-style: none; display: flex; gap: 10px; padding: 0; margin: 8px 0 14px; }
.chosen li { width: 64px; height: 64px; display: grid; place-items: center; overflow: hidden; border: 2px dashed var(--ink-soft); border-radius: 12px; background: #fff; }
.chosen li img { width: 100%; height: 100%; }
.pic-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 460px; }
.pic-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 560px; }
.pic { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 4px 8px; border: var(--lj-line); border-radius: var(--lj-edge); background: #fff; cursor: pointer; font-weight: 600; }
.pic:hover { background: var(--lj-parchment); }
.pic:active { background: var(--lj-sun); }
.pic input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.pic img { width: 100%; height: auto; max-width: 120px; aspect-ratio: 1; }
.pic-label { font-size: 0.8rem; text-align: center; line-height: 1.2; }
@media (max-width: 420px) {
  .pic-grid.cols-4 { gap: 8px; }
  .pic-grid.cols-4 .pic { padding: 6px 1px 8px; }
  .pic-grid.cols-4 .pic-label { font-size: 0.66rem; letter-spacing: -0.01em; }
}
.pic-actions { margin-top: 14px; display: flex; gap: 10px; }

/* ---------- pupil sheet ---------- */
.pupil-sheet { list-style: none; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.pupil-card { border: 2px dashed var(--ink-soft); border-radius: 10px; padding: 12px 14px; background: #fff; break-inside: avoid; }
.pc-name { margin: 0 0 6px; font-size: var(--lj-size-label); display: flex; gap: 6px; }
.pc-name .blank { flex: 1; border-bottom: 1px solid var(--lj-ink); }
.pc-label { font-weight: 700; font-size: 1.2rem; margin: 0; }
.pc-pics { display: flex; gap: 12px; padding: 0; margin: 8px 0; list-style: none; counter-reset: pic; }
.pc-pics li { counter-increment: pic; display: flex; flex-direction: column; align-items: center; font-size: 0.75rem; text-align: center; max-width: 72px; }
.pc-pics li::before { content: counter(pic); font-weight: 700; font-size: 0.75rem; }
.pc-pics img { width: 64px; height: 64px; }
.pc-how { margin: 0; font-size: 0.8rem; }

@media print {
  body { background: #fff; }
  .site-head-bar, .site-head, .site-foot, .dev-banner, .draft-banner, .ep-tabs, .ep-head, .no-print { display: none !important; }
  main { max-width: none; padding: 0; }
  .pupil-sheet { grid-template-columns: repeat(2, 1fr); }
}
