/* Fonts are served from this site (no Google request), all SIL Open Font License: see static/fonts/LICENSE-*. */
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/fraunces-latin-opsz-normal.069cb90e11a3.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/fraunces-latin-ext-opsz-normal.a04d353989ad.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 100 900; font-display: swap; src: url("../fonts/fraunces-latin-opsz-italic.fa7ce081be5e.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 100 900; font-display: swap; src: url("../fonts/fraunces-latin-ext-opsz-italic.53f8865644cd.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Mulish"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/mulish-latin-400-normal.7ef9dd981bae.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Mulish"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/mulish-latin-ext-400-normal.550a07da739a.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Mulish"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/mulish-latin-600-normal.9b22febd2ee0.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Mulish"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/mulish-latin-ext-600-normal.4d4bf2aa2e9e.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Mulish"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/mulish-latin-700-normal.37c0b6908762.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Mulish"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/mulish-latin-ext-700-normal.aa7f7df147f5.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Caveat"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/caveat-latin-500-normal.88f2eabfbc09.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Caveat"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/caveat-latin-700-normal.9700119a3654.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

/* Toothfairy Land storefront
   One memorable thing: the tiny letter under the Fairy Glass. Everything else is quiet paper. */

:root {
  --paper: #fbf8f1;
  --paper-deep: #f3eee2;
  --ink: #22243f;
  --ink-soft: #5f5c78;
  --night: #1b1d36;
  --lavender: #c9b6e8;
  --lavender-light: #ece7f6;
  --gold: #c9962e;
  --gold-light: #f3dfa6;
  --rule: #d9d3e6;
  --card: #ffffff;
  --letter-paper: #ffffff;
  --ok: #3f7a5a;
  --warn: #b4512e;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Mulish", system-ui, -apple-system, "Segoe UI", sans-serif;

  --measure: 62ch;
  --radius: 10px;
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
}
h1, h2, h3, .serif {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.12;
  margin: 0 0 0.5em;
  font-variation-settings: "opsz" 72;
}
h1 { font-size: clamp(2.3rem, 5vw, 3.9rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3, .as-h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; max-width: var(--measure); }
a { color: var(--ink); text-decoration-color: var(--lavender); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--gold); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; display: block; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; }
.skip:focus { left: 8px; z-index: 10; }

/* ---------- header / footer ---------- */
.site-head {
  max-width: var(--wrap); margin: 0 auto; padding: 22px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--serif); font-size: 1.35rem; font-weight: 600; }
.site-head nav { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.site-head nav a { text-decoration: none; font-weight: 600; font-size: 0.97rem; }
.site-head nav a:hover { text-decoration: underline; }
.nav-cta { background: var(--ink); color: var(--paper) !important; padding: 9px 16px; border-radius: 999px; }
.nav-cta:hover { background: var(--night); text-decoration: none !important; }

.site-foot {
  max-width: var(--wrap); margin: 80px auto 0; padding: 40px 20px 50px;
  border-top: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap;
  color: var(--ink-soft); font-size: 0.95rem;
}
.foot-brand { font-family: var(--serif); color: var(--ink); font-size: 1.2rem; margin-bottom: 4px; }
.foot-small { font-style: italic; }

.messages { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.msg { padding: 12px 16px; border-radius: var(--radius); background: var(--lavender-light); margin: 0 0 12px; max-width: none; }
.msg-error { background: #f8e3dc; color: var(--warn); }
.msg-success { background: #e1efe6; color: var(--ok); }

/* ---------- layout helpers ---------- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.section { padding-top: 64px; padding-bottom: 64px; }
.section + .section { border-top: 1px solid var(--rule); position: relative; }
/* A single small star sits on each rule between sections. */
.section + .section::before {
  content: "\2726"; position: absolute; top: -0.72em; left: 50%; transform: translateX(-50%);
  background: var(--paper); padding: 0 12px; color: var(--gold); font-size: 0.95rem; line-height: 1;
}
.hero h1 em { color: color-mix(in srgb, var(--gold) 78%, var(--ink)); }
.lede { font-size: 1.25rem; color: var(--ink-soft); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 820px) { .two-col { grid-template-columns: 1fr; } }

.btn {
  display: inline-block; background: var(--ink); color: var(--paper); border: 0; cursor: pointer;
  font: 600 1rem/1.2 var(--sans); padding: 14px 24px; border-radius: 999px; text-decoration: none;
  vertical-align: middle; text-align: center;
}
.btn:hover { background: var(--night); }
.btn-quiet { background: transparent; color: var(--ink); border: 2px solid var(--ink); padding: 12px 22px; }
.btn-quiet.btn-small { padding: 6px 12px; }
.btn-quiet:hover { background: var(--lavender-light); }
.btn-gold {
  background: var(--gold); color: var(--night); position: relative; overflow: hidden;
  box-shadow: 0 6px 18px rgba(201,150,46,0.22);
}
.btn-gold:hover { background: #b8862a; }
/* A soft light passes across the gold on hover, the way a coin catches a lamp. */
.btn-gold::after {
  content: ""; position: absolute; top: -40%; bottom: -40%; width: 38%; left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.45), transparent);
  transform: skewX(-18deg); pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .btn-gold:hover::after, .btn-gold:focus-visible::after { animation: coin-glint 0.9s ease-out 1; }
}
@keyframes coin-glint { from { left: -60%; } to { left: 130%; } }
.btn-small { padding: 8px 14px; font-size: 0.9rem; }

/* ---------- colour schemes: the palette chosen on the first page tints the whole site ---------- */
:root[data-scheme="seaglass-coral"] { --paper: #f5faf7; --paper-deep: #e6f1ec; --lavender: #a8dcd3; --lavender-light: #e2f1ed; --gold: #e4866c; --gold-light: #f9d2c4; --ink: #1f3737; --ink-soft: #577070; --night: #16302e; --rule: #cfe1da; --card: #ffffff; }
:root[data-scheme="forest-honey"] { --paper: #f7f5ec; --paper-deep: #ebe7d7; --lavender: #a9c7ae; --lavender-light: #e3ede3; --gold: #d9a63b; --gold-light: #f3e0a9; --ink: #233a2c; --ink-soft: #5a6e5f; --night: #182a20; --rule: #cfd8cb; --card: #fffdf6; }
:root[data-scheme="midnight-silver"] { --paper: #eceef7; --paper-deep: #dde1f0; --lavender: #9aa5d6; --lavender-light: #e0e4f3; --gold: #8d97bd; --gold-light: #cfd6ea; --ink: #1f2a5a; --ink-soft: #55618f; --night: #141b3d; --rule: #c7cde3; --card: #f8f9fe; }
:root[data-scheme="peach-mint"] { --paper: #fff8f3; --paper-deep: #fdece1; --lavender: #bfe6cf; --lavender-light: #e8f6ee; --gold: #ef9d74; --gold-light: #ffd8c1; --ink: #3a2f2b; --ink-soft: #7a6a63; --night: #2a211e; --rule: #ecd8ca; --card: #fffdfa; }

/* the fade from one scheme to the next: every tinted surface eases over about a second */
body, .btn, .btn-gold, .btn-quiet, .nav-cta, .product-card, .aside-card, .thread-card, .summary, .panel, .receipt,
.glass-demo, .sealed, .sealed-flap, .sealed-wax, .tooth, table.chart tbody tr, .seg button, .msg, .demo-banner,
.thread-seal, .chart-sticky, .choice label, .firefly-toggle, .site-foot, .site-head, h1, h2, h3, p, a, .lens, .handle, .env-preview .seal {
  transition: background-color 1.1s ease, border-color 1.1s ease, color 0.8s ease, box-shadow 1.1s ease, background 1.1s ease;
}
@media (prefers-reduced-motion: reduce) { body, .btn, .product-card, .sealed-flap, .tooth, h1, h2, h3, p, a { transition: none; } }

/* the picker on the first page */
.scheme-pick { display: flex; align-items: center; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.scheme-pick .label { font: 600 0.85rem var(--sans); color: var(--ink-soft); margin-right: 4px; }
.scheme-pick button { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--card); box-shadow: 0 0 0 1.5px var(--rule), 0 2px 6px rgba(0,0,0,0.12); cursor: pointer; padding: 0; transition: transform 0.2s, box-shadow 0.2s; }
.scheme-pick button:hover { transform: scale(1.12); }
.scheme-pick button[aria-pressed="true"] { box-shadow: 0 0 0 2.5px var(--ink), 0 2px 6px rgba(0,0,0,0.12); transform: scale(1.12); }
.scheme-pick .scheme-name { font: 0.85rem var(--sans); color: var(--ink-soft); min-width: 9ch; }

/* ---------- hero ---------- */
.hero { padding-top: 40px; padding-bottom: 70px; }
.hero .two-col { align-items: center; }
.hero h1 { max-width: 16ch; font-size: clamp(2rem, 3.6vw, 2.9rem); margin-bottom: 0.5em; }
.hero h1 em { font-style: italic; font-weight: 400; }
.hero .lede { max-width: 44ch; font-size: 1.15rem; margin-bottom: 0; }
.hero-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 26px; }
.price-note { color: var(--ink-soft); font-size: 0.95rem; }

/* The Fairy Glass demo. A letter shown at print size, and a lens that magnifies it. */
.glass-demo {
  position: relative; background: var(--paper-deep); border-radius: 18px; padding: 36px;
  overflow: hidden; cursor: none; user-select: none; -webkit-user-select: none; touch-action: none;
  box-shadow: inset 0 0 0 1px var(--rule);
}
.glass-demo::after {
  content: "move the glass"; position: absolute; right: 18px; bottom: 14px; font-size: 0.8rem; color: var(--ink-soft);
  font-style: italic; font-family: var(--serif);
}
.paper {
  position: relative; margin: 0 auto; background: #fff; border-radius: 4px;
  box-shadow: 0 10px 30px rgba(34, 36, 63, 0.12), 0 1px 2px rgba(34, 36, 63, 0.1);
}
.letter-copy {
  position: absolute; left: 0; top: 0; width: 420px; padding: 34px 32px; transform-origin: 0 0;
  font-family: var(--serif); color: var(--ink); background: #fff;
}
.letter-copy .art {
  width: 100%; aspect-ratio: 3 / 2; border-radius: 6px; margin-bottom: 18px;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.7) 0 6px, transparent 7px),
    radial-gradient(circle at 70% 60%, rgba(255,255,255,0.6) 0 5px, transparent 6px),
    radial-gradient(circle at 85% 20%, rgba(255,255,255,0.8) 0 4px, transparent 5px),
    radial-gradient(ellipse at 50% 120%, #e9b6a6 0 30%, transparent 60%),
    linear-gradient(170deg, #cdb9ea, #9fb6d9 55%, #f3d58a);
}
.letter-copy h3 { font-size: 1.35rem; margin-bottom: 2px; }
.letter-copy .place { font-style: italic; color: var(--ink-soft); font-size: 0.85rem; margin-bottom: 14px; }
.letter-copy p { font-size: 0.78rem; line-height: 1.5; max-width: none; margin-bottom: 0.7em; }
.letter-copy .ps { font-style: italic; font-size: 0.72rem; }
.letter-copy .no { position: absolute; right: 28px; top: 20px; font: 600 0.65rem var(--sans); color: var(--ink-soft); }
/* The Dewdrop: a clear glass dome sitting in a turned wooden surround of concentric rings,
   the inner ring cupping the glass, the outer ring for small fingers. */
.lens {
  position: absolute; width: 190px; height: 190px; border-radius: 50%; overflow: hidden; pointer-events: none;
  border: 7px solid #8a5a32;                              /* the inner ring that holds the glass */
  background: #fff; left: 50%; top: 40%; transform: translate(-50%, -50%);
  box-shadow:
    0 0 0 2px #5f3b1f,                                    /* a fine dark line where the rings meet */
    0 0 0 9px #c99a66,                                    /* middle ring, pale oak */
    0 0 0 10px #a7743f,                                   /* growth line */
    0 0 0 16px #b8864f,
    0 0 0 17px #8f6034,                                   /* growth line */
    0 0 0 24px #d4a874,                                   /* outer ring, worn smooth by hands */
    0 0 0 25px rgba(95, 59, 31, 0.55),
    0 18px 30px 22px rgba(27, 29, 54, 0.22),              /* soft shadow on the page */
    inset 0 0 26px rgba(70, 90, 120, 0.28),               /* the curve of the glass, darker at the rim */
    inset 0 -10px 22px rgba(255, 255, 255, 0.25);
  transition: opacity 0.2s;
}
/* Light on a dome: a broad soft bloom across the top and a gentle rim reflection at the bottom. */
.lens::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none; z-index: 1;
  background:
    radial-gradient(ellipse 62% 34% at 42% 17%, rgba(255,255,255,0.75), rgba(255,255,255,0.22) 55%, transparent 72%),
    radial-gradient(ellipse 70% 22% at 52% 96%, rgba(255,255,255,0.5), transparent 70%),
    radial-gradient(circle at 50% 46%, transparent 58%, rgba(110,130,165,0.28) 100%);
}
/* One glint on the glass, up and to the left, where a lamp would catch it. */
.lens::before {
  content: ""; position: absolute; left: 24%; top: 16%; width: 16px; height: 16px; z-index: 2; pointer-events: none;
  background: radial-gradient(circle, rgba(255,255,255,0.95) 0 2px, rgba(255,255,255,0.45) 3px, transparent 7px);
}
@media (prefers-reduced-motion: no-preference) {
  .lens::before { animation: glint-breathe 5s ease-in-out infinite; }
}
@keyframes glint-breathe { 0%, 100% { opacity: 0.55; transform: scale(0.9); } 50% { opacity: 1; transform: scale(1.15); } }
.lens .letter-copy { transform-origin: 0 0; }
.handle[hidden] { display: none !important; }
.handle {
  position: absolute; width: 18px; height: 120px; background: var(--night); border-radius: 9px; pointer-events: none;
  transform-origin: 50% 0; left: 50%; top: 40%; transform: translate(60px, 60px) rotate(-45deg);
  box-shadow: 0 10px 20px rgba(27,29,54,0.3);
}
@media (prefers-reduced-motion: no-preference) { .lens, .handle { transition: left 0.03s linear, top 0.03s linear; } }

/* ---------- content sections ---------- */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 28px 36px; }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step); display: block; font-family: var(--serif); font-size: 2.6rem; line-height: 1; color: var(--gold); margin-bottom: 8px;
  font-variation-settings: "opsz" 144;
}
.steps h3 { margin-bottom: 4px; }
.steps p { color: var(--ink-soft); font-size: 0.98rem; }

.contents { list-style: none; padding: 0; margin: 0; max-width: 60ch; }
.contents li { padding: 14px 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 1fr auto; gap: 16px; }
.contents li strong { font-family: var(--serif); font-weight: 500; font-size: 1.15rem; }
.contents li span { color: var(--ink-soft); font-size: 0.95rem; max-width: 36ch; text-align: right; }
@media (max-width: 560px) { .contents li { grid-template-columns: 1fr; } .contents li span { text-align: left; } }

.aside-card { background: var(--lavender-light); border-radius: 18px; padding: 28px 30px; }
.aside-card h3, .aside-card .as-h3 { margin-bottom: 8px; }
.aside-card p:last-child { margin-bottom: 0; }

.price-block { display: flex; align-items: baseline; gap: 14px; margin: 8px 0 18px; }
.price-block .amount { font-family: var(--serif); font-size: 3rem; line-height: 1; }
.price-block .per { color: var(--ink-soft); }

/* journey list */
.journey { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--lavender); }
.journey li { position: relative; padding: 6px 0 22px 30px; }
.journey li::before { content: ""; position: absolute; left: -7px; top: 14px; width: 12px; height: 12px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); }
.journey .n { font: 600 0.8rem var(--sans); color: var(--ink-soft); display: block; }
.journey .t { font-family: var(--serif); font-size: 1.25rem; }
.journey .pl { color: var(--ink-soft); font-style: italic; display: block; font-size: 0.95rem; }

/* tooth chart (web) */
.mouth { display: grid; gap: 10px; max-width: 640px; margin: 24px 0 36px; }
.arch { display: flex; justify-content: center; gap: 6px; }
.tooth { width: 46px; height: 54px; border: 2px solid var(--ink); border-radius: 12px 12px 16px 16px; background: var(--card); display: grid; place-items: center; font: 700 0.9rem var(--sans); }
.tooth.molar { width: 58px; height: 48px; border-radius: 10px; }
.arch.lower .tooth { border-radius: 16px 16px 12px 12px; }
.arch.lower .tooth.molar { border-radius: 10px; }
.tooth.first { background: var(--gold-light); }
.tooth { cursor: pointer; color: var(--ink); padding: 0; transition: transform 0.15s, box-shadow 0.15s, background 0.15s; }
.tooth.hover, .tooth:hover { background: var(--lavender-light); border-color: var(--lavender); transform: translateY(-3px); box-shadow: 0 6px 14px rgba(34,36,63,0.18), 0 0 0 3px var(--lavender-light); }
.tooth.first.hover, .tooth.first:hover { background: var(--lavender-light); }
.tooth.selected.hover, .tooth.selected:hover { background: var(--gold); border-color: var(--gold); }
.tooth.selected { background: var(--gold); border-color: var(--gold); color: var(--night); box-shadow: 0 0 0 4px rgba(201,150,46,0.25); }
table.chart tbody tr { cursor: pointer; transition: background 0.15s; }
table.chart tbody tr.hover, table.chart tbody tr:hover { background: var(--lavender-light); }
table.chart tbody tr.selected { background: var(--gold-light); }
table.chart tbody tr.selected td.letter { color: color-mix(in srgb, var(--gold) 78%, var(--ink)); }
table.chart tbody tr:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }
.chart-tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 14px; }
.chart-tools .label { font: 600 0.85rem var(--sans); color: var(--ink-soft); }
.seg { display: inline-flex; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; }
.seg button { background: transparent; border: 0; padding: 8px 14px; font: 600 0.9rem var(--sans); color: var(--ink); cursor: pointer; }
.seg button + button { border-left: 2px solid var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.chart-sticky { position: sticky; top: 0; z-index: 5; background: var(--paper); padding: 8px 0 6px; transition: box-shadow 0.2s; }
.chart-sticky.stuck { box-shadow: 0 10px 24px -14px rgba(34,36,63,0.35); }
.chart-sticky .mouth { margin: 10px 0 14px; transition: transform 0.2s; }
.chart-sticky.stuck .mouth { gap: 6px; margin: 0 0 8px; }
.chart-sticky.stuck .tooth { width: 34px; height: 38px; font-size: 0.75rem; }
.chart-sticky.stuck .tooth.molar { width: 42px; height: 34px; }
.chart-sticky.stuck .chart-tools { margin-bottom: 0; }
.stuck-note { font: 600 0.85rem var(--sans); color: color-mix(in srgb, var(--gold) 78%, var(--ink)); }
@media (prefers-reduced-motion: reduce) { .chart-sticky .mouth, .tooth { transition: none; } }
.tale-card { margin-top: 28px; max-width: 640px; }
.tale-card h3 { font-size: 1.35rem; }
table.chart { border-collapse: collapse; width: 100%; max-width: 760px; font-size: 0.95rem; }
table.chart th, table.chart td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--rule); }
table.chart th { font-weight: 700; font-size: 0.85rem; color: var(--ink-soft); }
table.chart td.letter { font-family: var(--serif); font-size: 1.15rem; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--rule); padding: 14px 0; max-width: 70ch; }
.faq summary { font-family: var(--serif); font-size: 1.2rem; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+"; display: inline-block; width: 1.3em; color: var(--gold); }
.faq details[open] summary::before { content: "–"; }
.faq details p { margin-top: 10px; color: var(--ink-soft); }

/* ---------- kit configurator ---------- */
.kit-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.9fr); gap: 48px; align-items: start; }
@media (max-width: 900px) { .kit-layout { grid-template-columns: 1fr; } }
.kit-form fieldset { border: 0; padding: 0; margin: 0 0 44px; }
.kit-form legend { font-family: var(--serif); font-size: 1.5rem; margin-bottom: 6px; padding: 0; }
.kit-form .hint { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 16px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field input[type=text], .field input[type=email], .field input[type=number], .field input[type=password], .field select, .field textarea {
  width: 100%; font: 1rem var(--sans); padding: 11px 13px; border: 1.5px solid var(--rule); border-radius: 8px; background: #fff; color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--ink); outline: none; }
.field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible, .join-row input:focus-visible, .thread-email-row input:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.field .errorlist { list-style: none; padding: 0; margin: 6px 0 0; color: var(--warn); font-size: 0.9rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.name-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.name-chips button { font: 600 0.85rem var(--sans); background: var(--lavender-light); border: 0; padding: 6px 12px; border-radius: 999px; cursor: pointer; color: var(--ink); }
.name-chips button:hover { background: var(--lavender); }

.choice-group { margin-bottom: 26px; }
.choice-group > .label { font-weight: 700; margin-bottom: 10px; display: block; }
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; }
.choice label {
  display: block; padding: 12px 14px; border: 1.5px solid var(--rule); border-radius: 12px; cursor: pointer; background: #fff; height: 100%;
}
.choice .swatch { display: block; height: 34px; border-radius: 8px; margin-bottom: 10px; }
.choice .emoji { font-size: 1.5rem; display: block; margin-bottom: 6px; }
.choice .name { font-weight: 700; display: block; font-size: 0.97rem; }
.choice .desc { display: block; color: var(--ink-soft); font-size: 0.85rem; line-height: 1.35; margin-top: 3px; }
.choice input:checked + label { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }
.choice input:focus-visible + label { outline: 3px solid var(--gold); outline-offset: 2px; }

.addons { list-style: none; padding: 0; margin: 0; }
.addons li { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.addons .ad-name { font-weight: 600; }
.addons .ad-desc { color: var(--ink-soft); font-size: 0.9rem; display: block; }
.addons .price { font-family: var(--serif); font-size: 1.05rem; }
.addons input.qty { width: 64px; font: 1rem var(--sans); padding: 8px; border: 1.5px solid var(--rule); border-radius: 8px; text-align: center; }

.summary { position: sticky; top: 20px; background: var(--card); border: 1px solid var(--rule); border-radius: 18px; padding: 26px 28px; }
.summary h3, .summary .as-h3 { margin-bottom: 14px; }
.summary dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 18px; font-size: 0.95rem; }
.summary dt { color: var(--ink-soft); }
.summary dd { margin: 0; font-weight: 600; }
.summary .totals { border-top: 1px solid var(--rule); padding-top: 14px; display: grid; gap: 6px; }
.summary .totals div { display: flex; justify-content: space-between; }
.summary .totals .grand { font-family: var(--serif); font-size: 1.5rem; margin-top: 6px; }
.summary .btn { width: 100%; text-align: center; margin-top: 18px; }
.summary .fine { font-size: 0.85rem; color: var(--ink-soft); margin: 12px 0 0; }
.env-preview {
  margin: 0 0 18px; aspect-ratio: 7 / 4; border-radius: 10px; position: relative; overflow: hidden;
  background: var(--lavender-light); box-shadow: inset 0 0 0 1px var(--rule);
}
.env-preview .flap { position: absolute; inset: 0 0 auto 0; height: 55%; background: var(--swatch, linear-gradient(135deg,#c9b6e8,#f3d58a)); clip-path: polygon(0 0, 100% 0, 50% 100%); opacity: 0.9; }
.env-preview .to { position: absolute; left: 20px; bottom: 18px; font-family: var(--serif); font-size: 1.15rem; }
.env-preview .to small { display: block; font: 600 0.72rem var(--sans); color: var(--ink-soft); }
.env-preview .seal { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); width: 34px; height: 34px; border-radius: 50%; background: var(--gold); display: grid; place-items: center; font-size: 1.1rem; }

/* ---------- checkout / status ---------- */
.narrow { max-width: 640px; }
.receipt { background: var(--card); border: 1px solid var(--rule); border-radius: 18px; padding: 28px 30px; margin: 24px 0; }
.receipt dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 0; }
.receipt dt { color: var(--ink-soft); }
.receipt dd { margin: 0; }
.progress { list-style: none; padding: 0; margin: 24px 0; }
.progress li { display: flex; gap: 14px; align-items: center; padding: 10px 0; color: var(--ink-soft); }
.progress li::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--rule); flex: none; }
.progress li.done { color: var(--ink); }
.progress li.done::before { background: var(--gold); border-color: var(--gold); }
.demo-banner { background: var(--gold-light); border-radius: var(--radius); padding: 12px 16px; font-size: 0.95rem; margin-bottom: 20px; }

/* ---------- studio ---------- */
.studio { font-size: 0.97rem; }
.studio h1 { font-size: 2rem; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 22px; }
.filters a { text-decoration: none; padding: 6px 12px; border-radius: 999px; background: var(--lavender-light); font-weight: 600; font-size: 0.9rem; }
.filters a.on { background: var(--ink); color: var(--paper); }
table.orders { width: 100%; border-collapse: collapse; }
table.orders th, table.orders td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.orders th { font-size: 0.82rem; color: var(--ink-soft); }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--lavender-light); font-size: 0.82rem; font-weight: 700; white-space: nowrap; }
.pill.paid { background: var(--gold-light); }
.pill.review { background: #e1efe6; color: var(--ok); }
.pill.shipped { background: var(--ink); color: var(--paper); }
.pill.pending, .pill.cancelled { background: var(--paper-deep); color: var(--ink-soft); }

.studio-grid { display: grid; grid-template-columns: 1fr 320px; gap: 36px; align-items: start; }
@media (max-width: 960px) { .studio-grid { grid-template-columns: 1fr; } }
.panel { background: var(--card); border: 1px solid var(--rule); border-radius: 14px; padding: 20px 22px; margin-bottom: 20px; }
.panel h3 { margin-bottom: 10px; font-size: 1.15rem; }
.panel dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: 0.92rem; }
.panel dt { color: var(--ink-soft); }
.panel dd { margin: 0; }
.print-list { list-style: none; padding: 0; margin: 0; }
.print-list li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--rule); align-items: center; }
.print-list small { display: block; color: var(--ink-soft); }
.inline-form { display: inline; }
.letter-card { background: var(--card); border: 1px solid var(--rule); border-radius: 14px; padding: 18px 20px; margin-bottom: 18px; display: grid; grid-template-columns: 150px 1fr; gap: 20px; }
@media (max-width: 640px) { .letter-card { grid-template-columns: 1fr; } }
.letter-card img { border-radius: 8px; width: 100%; }
.letter-card .no-art { aspect-ratio: 2 / 3; background: var(--lavender-light); border-radius: 8px; display: grid; place-items: center; color: var(--ink-soft); font-size: 0.85rem; }
.letter-card textarea, .letter-card input[type=text] { width: 100%; font: 0.92rem/1.45 var(--sans); padding: 8px 10px; border: 1.5px solid var(--rule); border-radius: 8px; }
.letter-card textarea.body { font-family: var(--serif); min-height: 180px; }
.letter-card .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.letter-card .head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.letter-card .head .pill.ok { background: #e1efe6; color: var(--ok); }
.check { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; }
.studio select, .studio input[type=text] { font: 0.95rem var(--sans); padding: 8px 10px; border: 1.5px solid var(--rule); border-radius: 8px; background: #fff; }
.studio textarea.notes { width: 100%; min-height: 70px; font: 0.92rem var(--sans); padding: 8px 10px; border: 1.5px solid var(--rule); border-radius: 8px; }

/* ---------- products + storefront art ---------- */
.products { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 28px; }
@media (max-width: 820px) { .products { grid-template-columns: 1fr; } }
.product-card { background: var(--card); border: 1px solid var(--rule); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s; }
.product-card:hover { border-color: var(--gold-light); box-shadow: 0 14px 34px rgba(34,36,63,0.10), 0 0 0 4px rgba(243,223,166,0.35); }
@media (prefers-reduced-motion: no-preference) { .product-card:hover { transform: translateY(-2px); } }
.product-card .art { margin: 0; }
.product-card .art img, .product-card .art-placeholder { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; border-radius: 0; }
.product-body { padding: 24px 26px 28px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-body h3 { font-size: 1.6rem; margin: 0; }
.product-body .tagline { font-family: var(--serif); font-style: italic; color: var(--ink-soft); margin: 0 0 6px; }
.product-body p { margin: 0; }
.price-row { display: flex; align-items: baseline; gap: 12px; margin-top: 10px; color: var(--ink-soft); }
.price-row .amount { font-family: var(--serif); font-size: 2.2rem; color: var(--ink); line-height: 1; }
.product-body .actions { display: flex; gap: 18px; align-items: center; margin-top: 12px; }

.art { margin: 0; }
.art img, .art-placeholder { width: 100%; border-radius: 16px; display: block; aspect-ratio: 4 / 3; object-fit: cover; }
.art-tall img, .art-tall .art-placeholder { aspect-ratio: 3 / 4; }
.art-wide img, .art-wide .art-placeholder { aspect-ratio: 21 / 9; }
.art figcaption { font-family: var(--serif); font-style: italic; color: var(--ink-soft); font-size: 0.95rem; margin-top: 10px; }
.art-placeholder {
  background:
    radial-gradient(circle at 18% 28%, rgba(255,255,255,0.7) 0 5px, transparent 6px),
    radial-gradient(circle at 72% 62%, rgba(255,255,255,0.6) 0 4px, transparent 5px),
    radial-gradient(circle at 88% 18%, rgba(255,255,255,0.8) 0 3px, transparent 4px),
    radial-gradient(ellipse at 50% 115%, var(--gold-light) 0 30%, transparent 60%),
    linear-gradient(165deg, var(--lavender) 0%, #b7c4e3 55%, var(--paper-deep) 100%);
  box-shadow: inset 0 0 0 1px var(--rule);
}
.art-harbor { background: radial-gradient(ellipse at 50% 110%, #a8e0d8 0 35%, transparent 65%), linear-gradient(165deg, #f3d58a, #c9b6e8 60%, #1e2140); }
.art-calendar, .art-frame { background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.35) 0 40px, transparent 41px), repeating-linear-gradient(90deg, #e8d3b0 0 14px, #dcc39b 14px 16px), linear-gradient(165deg, #e9d6b5, #d4b98a); }
.art-wages { background: radial-gradient(circle at 50% 55%, var(--gold) 0 22px, transparent 23px), radial-gradient(circle at 36% 50%, var(--gold-light) 0 16px, transparent 17px), linear-gradient(165deg, #d9e8f7, #1e2140); }
.art-map { background: radial-gradient(circle at 10% 85%, #a8e0d8 0 60px, transparent 61px), radial-gradient(circle at 90% 15%, #fff 0 20px, transparent 21px), linear-gradient(20deg, #4f7a5a 0%, #c9b6e8 55%, #1e2140 100%); }

/* ---------- fireflies, the thread, the finale ---------- */
#fireflies { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
body > *:not(#fireflies):not(#latch):not(#latch-intro):not(.gf-travel) { position: relative; z-index: 1; }
.join { margin: 0; width: 100%; max-width: 460px; display: grid; gap: 10px; justify-items: center; transition: opacity 0.4s; }
.sealed.opening .join { opacity: 0; pointer-events: none; }
.join label { display: block; font-family: var(--serif); font-size: 1.1rem; margin-bottom: 10px; color: var(--ink); }
.join-row { display: grid; grid-template-columns: 1fr 92px 1fr; gap: 10px; width: 100%; }
.join-row select { font: 1rem var(--sans); padding: 12px 12px; border: 1.5px solid var(--rule); border-radius: 999px; background: #fff; color: var(--ink); min-width: 0; }
@media (max-width: 560px) { .join-row { grid-template-columns: 1fr; } }
.join-row input { width: 100%; min-width: 0; font: 1rem var(--sans); padding: 12px 14px; border: 1.5px solid var(--rule); border-radius: 999px; background: #fff; color: var(--ink); }
.join-row input:focus { border-color: var(--ink); outline: none; }
.join .fine { font-size: 0.85rem; color: var(--ink-soft); margin-top: 10px; }
.finale { margin: 28px 0; }
.finale-kicker { font-family: var(--serif); font-style: italic; color: var(--ink-soft); }
.finale-paper { padding: 34px 36px; font-family: var(--serif); font-size: 1.05rem; line-height: 1.6; }
.finale-paper p { max-width: none; }
.policy h3 { margin-top: 28px; }
.policy .fine { color: var(--ink-soft); font-size: 0.9rem; margin-top: 28px; }
.foot-links { margin-bottom: 6px; }

/* ---------- the sealed envelope shown before the names are given ---------- */
.sealed { background: var(--paper-deep); border-radius: 18px; padding: 32px 36px 30px; box-shadow: inset 0 0 0 1px var(--rule); display: grid; justify-items: center; align-content: center; gap: 22px; min-height: 380px; }
.sealed-env { position: relative; width: 260px; aspect-ratio: 7 / 4; background: #fff; border-radius: 6px; box-shadow: 0 10px 30px rgba(34,36,63,0.12), 0 1px 2px rgba(34,36,63,0.1); overflow: hidden; }
.sealed-flap { position: absolute; inset: 0 0 auto 0; height: 58%; background: linear-gradient(135deg, var(--lavender), var(--gold-light)); clip-path: polygon(0 0, 100% 0, 50% 100%); opacity: 1; }
.sealed-wax { position: absolute; left: 50%; top: 56%; transform: translate(-50%, -50%); width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #f0cf7a, var(--gold) 60%, #a87a1f); box-shadow: 0 2px 6px rgba(0,0,0,0.18), inset 0 0 0 4px rgba(255,255,255,0.35); }
.sealed-to { position: absolute; left: 18px; bottom: 14px; margin: 0; font: 600 0.72rem var(--sans); color: var(--ink-soft); line-height: 1.5; }
.sealed-to span { font-family: var(--serif); font-size: 1.05rem; color: var(--ink); font-weight: 400; }
.sealed-note { margin: 0; font-family: var(--serif); font-style: italic; color: var(--ink-soft); }
.join-row input#join-child { min-width: 0; }


/* ---------- the note from the Post Office (the story thread) ---------- */
.thread { background: var(--lavender-light); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 18px 20px; margin-bottom: 8px; }
.thread-card { max-width: var(--wrap); margin: 0 auto; background: var(--card); border-radius: 14px; padding: 18px 22px 18px 20px; display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: start; box-shadow: 0 8px 24px rgba(34,36,63,0.08), 0 1px 2px rgba(34,36,63,0.08); border-left: 6px solid var(--gold); }
.thread-seal { width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #f0cf7a, var(--gold) 60%, #a87a1f); box-shadow: 0 2px 6px rgba(0,0,0,0.2), inset 0 0 0 3px rgba(255,255,255,0.35); margin-top: 4px; }
.thread-from { margin: 0 0 2px; font: 700 0.78rem var(--sans); color: var(--ink-soft); }
.thread-line { margin: 0; font-family: var(--serif); font-style: italic; font-size: 1.2rem; line-height: 1.4; color: var(--ink); max-width: 72ch; }
.thread-forget { font-size: 0.8rem; color: var(--ink-soft); white-space: nowrap; align-self: start; }
.thread-email { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--rule); }
.thread-ask { margin: 0 0 10px; font-size: 0.98rem; max-width: 72ch; }
.thread-email-row { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.thread-email-row input { font: 1rem var(--sans); padding: 10px 14px; border: 1.5px solid var(--rule); border-radius: 999px; min-width: 240px; }
.thread-email-row input:focus { border-color: var(--ink); outline: none; }
@media (max-width: 640px) { .thread-card { grid-template-columns: 1fr; } .thread-seal { display: none; } }

/* ---------- the Scrivener's draft ---------- */
.draft { max-width: 760px; }
.draft-paper { background: #fffdf7; border-radius: 6px; padding: 40px 44px; box-shadow: 0 10px 30px rgba(34,36,63,0.12), 0 1px 2px rgba(34,36,63,0.1); position: relative;
  background-image: repeating-linear-gradient(transparent 0 31px, #e9e2d2 31px 32px); background-position: 0 14px; }
.draft-paper::before { content: "DRAFT. NOT FOR THE PRESS."; position: absolute; top: 16px; right: 20px; font: 700 0.7rem var(--sans); letter-spacing: 0.08em; color: var(--warn); border: 2px solid var(--warn); padding: 3px 8px; transform: rotate(6deg); opacity: 0.8; }
.draft-paper p { font-family: "Caveat", "Bradley Hand", "Segoe Script", cursive; font-size: 1.75rem; line-height: 32px; margin: 0 0 32px; max-width: none; color: #2b2d4a; }
.draft-paper s { color: var(--warn); text-decoration-thickness: 3px; }
.draft-paper ins { text-decoration: none; color: var(--ok); }
.draft-paper .margin-note { font-family: "Caveat", cursive; color: var(--warn); font-size: 1.1rem; transform: rotate(-3deg); display: inline-block; margin-left: 6px; }
.draft-sig { font-family: "Caveat", cursive; font-size: 1.5rem; }

/* ---------- drafts: tabs and the Council's track changes ---------- */
.draft-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 20px; }
.draft-tabs a { text-decoration: none; font-weight: 700; font-size: 0.92rem; padding: 8px 14px; border-radius: 999px; background: var(--lavender-light); }
.draft-tabs a.on { background: var(--ink); color: var(--paper); }
.tc-legend { list-style: none; padding: 0; margin: 0 0 14px; display: flex; gap: 14px 18px; flex-wrap: wrap; font-size: 0.85rem; color: var(--ink-soft); }
.tc-legend span { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.tc-paper p { font-family: var(--serif); font-size: 1.12rem; line-height: 32px; }
.tc-paper ins.tc { text-decoration: none; color: var(--who); border-bottom: 2px solid var(--who); background: color-mix(in srgb, var(--who) 10%, transparent); }
.tc-paper del.tc { color: var(--who); text-decoration-thickness: 2px; opacity: 0.8; }
.tc-note { display: block; font: 500 0.95rem "Caveat", cursive; color: var(--who); margin: 4px 0 0 24px; padding-left: 10px; border-left: 3px solid var(--who); line-height: 1.3; }
.tc-note b { font-weight: 700; }

/* ---------- the firefly switch on the Council's letter ---------- */
.firefly-row { margin: 4px 0 12px; }
.firefly-toggle { display: inline-flex; align-items: center; gap: 12px; background: var(--card); border: 1.5px solid var(--rule); border-radius: 999px; padding: 8px 16px 8px 10px; cursor: pointer; font: 600 0.95rem var(--sans); color: var(--ink); }
.firefly-toggle:hover { border-color: var(--ink); }
.ff-body { position: relative; width: 26px; height: 26px; border-radius: 50%; background: #3b3d5c; display: grid; place-items: center; }
.ff-light { width: 12px; height: 12px; border-radius: 50%; background: #6c6e8c; }
.firefly-toggle[aria-pressed="true"] .ff-light { background: var(--gold); box-shadow: 0 0 0 6px rgba(201,150,46,0.25), 0 0 18px 6px rgba(240,207,122,0.6); }
/* notes and strikes only by firefly light; when the firefly rests, insertions read as plain text and deletions vanish */
.tc-paper:not(.lit) del.tc, .tc-paper:not(.lit) .tc-note { display: none; }
.tc-paper:not(.lit) ins.tc { color: inherit; border-bottom: 0; background: none; }
.tc-paper.lit { box-shadow: 0 10px 30px rgba(34,36,63,0.12), 0 0 0 1px var(--rule), 0 0 60px 10px rgba(240,207,122,0.35); }

/* ---------- the envelope opens ---------- */
.sealed-env { overflow: hidden; }
.sealed.opening .sealed-env { overflow: visible; }
.sealed-pocket { position: absolute; inset: 0; background: #fff; border-radius: 6px; z-index: 2; clip-path: polygon(0 0, 50% 58%, 100% 0, 100% 100%, 0 100%); }
.sealed-letter { position: absolute; left: 8%; right: 8%; bottom: 7%; height: 86%; background: #fffdf7; border-radius: 4px; z-index: 1;
  box-shadow: 0 2px 8px rgba(34,36,63,0.15); padding: 14px 16px; transform: translateY(0); transition: transform 0.9s cubic-bezier(.2,.7,.2,1); }
.sealed-dear { font-family: var(--serif); font-size: 1.05rem; color: var(--ink); }
.sealed-dear b { font-weight: 500; border-bottom: 1.5px solid var(--gold); }
.sealed-flap { z-index: 3; transform-origin: 50% 0; transition: transform 0.6s cubic-bezier(.3,.6,.2,1); }
.sealed-wax { z-index: 4; transition: opacity 0.3s; }
.sealed-to { z-index: 5; }
.sealed.opening .sealed-flap { transform: rotateX(180deg); }
.sealed.opening .sealed-wax { opacity: 0; }
.sealed.opening .sealed-to { opacity: 0.35; }
.sealed.out .sealed-letter { transform: translateY(-92%); z-index: 6; }
.sealed.out .sealed-note { opacity: 0; }
.sealed-note { transition: opacity 0.4s; }
.sealed-env { perspective: 600px; }
.glass-arrive { animation: glass-in 0.6s ease-out both; }
@keyframes glass-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .sealed-letter, .sealed-flap, .sealed-wax, .sealed-note { transition: none; } .glass-arrive { animation: none; } }
.glass-line { margin: 14px 4px 0; font-family: var(--serif); font-style: italic; color: var(--ink-soft); font-size: 1.02rem; display: flex; gap: 10px; align-items: flex-start; }
.thread-seal.small { width: 14px; height: 14px; flex: none; margin-top: 5px; box-shadow: 0 0 0 2px var(--gold-light); }

/* ---------- planting a letter: it folds, sinks, and something grows ---------- */
.glass-reset { margin: 8px 4px 0; font-size: 0.85rem; }
.glass-reset a { color: var(--ink-soft); }
#hero-right { position: relative; }
.glass-demo.planting { animation: plant 1.2s cubic-bezier(.6,0,.8,.4) forwards; transform-origin: 50% 90%; }
@keyframes plant {
  0%   { opacity: 1; transform: none; }
  35%  { opacity: 1; transform: scale(0.85) rotate(-4deg); }
  100% { opacity: 0; transform: scale(0.08) translateY(60%) rotate(18deg); }
}
.sprout { position: absolute; left: 50%; bottom: 18%; width: 60px; height: 90px; transform: translateX(-50%); pointer-events: none; }
.sprout-stem { position: absolute; left: 50%; bottom: 0; width: 4px; height: 0; margin-left: -2px; background: #4f7a5a; border-radius: 2px; transition: height 0.8s ease-out; }
.sprout-leaf { position: absolute; bottom: 0; width: 26px; height: 16px; background: #6fa37e; border-radius: 0 100% 0 100%; opacity: 0; transform: scale(0); transform-origin: 0 100%; transition: opacity 0.4s, transform 0.5s ease-out, bottom 0.8s ease-out; }
.sprout-leaf.l { left: 50%; margin-left: -26px; transform-origin: 100% 100%; border-radius: 100% 0 100% 0; }
.sprout-leaf.r { left: 50%; }
.sprout.grow .sprout-stem { height: 70px; }
.sprout.grow .sprout-leaf { opacity: 1; transform: scale(1); bottom: 48px; }
@media (prefers-reduced-motion: reduce) { .glass-demo.planting { animation: none; } }
.glass-demo.planting ~ .glass-line, .glass-demo.planting ~ .glass-reset { opacity: 0; transition: opacity 0.5s; }
.join-lead { margin: 0 0 4px; font-family: var(--serif); font-style: italic; color: var(--ink-soft); text-align: center; font-size: 1.02rem; }
.sealed-to span b { font-weight: 400; }


/* ---------- the Acorn Latch: grown-ups-only switch ---------- */
.latch { position: fixed; right: 18px; bottom: 18px; z-index: 60; width: 56px; height: 56px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  background: var(--card); box-shadow: 0 6px 18px rgba(34,36,63,0.22), 0 0 0 1.5px var(--rule); display: grid; place-items: center; touch-action: none;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.latch:hover { box-shadow: 0 8px 22px rgba(34,36,63,0.28), 0 0 0 2px var(--gold); }
.latch svg .cap { fill: #8a5a2b; } .latch svg .stalk { stroke: #6b4420; } .latch svg .nut { fill: #c88a45; }
.latch svg .hole { fill: #3b2a1a; } .latch svg .cross { stroke: #6b4420; opacity: 0.6; }
.latch-ring { position: absolute; inset: -4px; border-radius: 50%; border: 3px solid transparent; pointer-events: none; }
.latch.holding .latch-ring { border-color: var(--gold); animation: latch-hold 3s linear forwards; clip-path: inset(0 0 100% 0); }
@keyframes latch-hold { to { clip-path: inset(0 0 0 0); } }
@media (prefers-reduced-motion: reduce) { .latch.holding .latch-ring { animation: none; clip-path: none; } }
.latch-intro { position: fixed; right: 18px; bottom: 86px; z-index: 61; width: min(340px, calc(100vw - 36px)); background: var(--card); border-radius: 16px;
  padding: 18px 20px 16px; box-shadow: 0 18px 40px rgba(34,36,63,0.25), 0 0 0 1px var(--rule); }
.latch-intro::after { content: ""; position: absolute; right: 26px; bottom: -8px; width: 16px; height: 16px; background: var(--card); transform: rotate(45deg); box-shadow: 2px 2px 0 0 var(--rule); }
.latch-intro h3 { font-size: 1.2rem; margin: 2px 0 8px; }
.latch-intro p { font-size: 0.93rem; margin: 0 0 8px; }
.latch-intro-kicker { font: 700 0.72rem var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.latch-intro-actions { display: flex; gap: 10px; margin-top: 10px; }
@media (prefers-reduced-motion: no-preference) { .latch-intro:not([hidden]) { animation: latch-pop 0.45s ease-out; } }
@keyframes latch-pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* the dullest page in the Land */
.hush { display: none; }
html.hushed body:has(#hush) > *:not(#hush):not(#latch):not(#latch-return):not(script) { display: none !important; }
html.hushed body:has(#hush) { background: #e4e1da; }
html.hushed .hush { display: block; position: relative; min-height: 100vh; background: #e4e1da; color: #6e6a62; font-family: Georgia, "Times New Roman", serif; }
html.hushed .latch { background: #cfcbc2; box-shadow: none; }
html.hushed .latch svg { filter: grayscale(1) opacity(0.55); }
.hush-inner { max-width: 760px; margin: 0 auto; padding: 56px 24px 90px; }
.hush-kicker { font: 0.8rem Georgia, serif; letter-spacing: 0.06em; text-transform: uppercase; color: #8c887f; margin: 0 0 6px; }
.hush-title { font: 400 1.7rem Georgia, serif; color: #5f5b53; margin: 0 0 22px; }
.hush-scene { width: 100%; height: auto; border-radius: 4px; display: block; margin-bottom: 22px; }
.hush-body { font-size: 1.02rem; line-height: 1.6; max-width: 60ch; }
.hush-ledger { border-collapse: collapse; width: 100%; font-size: 0.9rem; margin: 18px 0; }
.hush-ledger th, .hush-ledger td { text-align: left; padding: 8px 6px; border-bottom: 1px solid #ccc8bf; font-weight: 400; }
.hush-ledger th { color: #8c887f; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
.hush-foot { font-size: 0.9rem; color: #8c887f; font-style: italic; }
@media print { .latch, .latch-intro, .hush { display: none !important; } }


/* placeholder notes: a shot list until the real photos and artwork exist */
.art-placeholder { position: relative; display: flex; align-items: flex-end; }
.art-note { margin: 12px; max-width: none; background: rgba(255,255,255,0.88); color: var(--ink); border-radius: 10px; padding: 10px 12px;
  font: 0.78rem/1.45 var(--sans); border: 1.5px dashed var(--ink-soft); }
.art-note b { display: inline-block; font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; background: var(--ink); color: var(--paper); border-radius: 4px; padding: 1px 6px; margin-right: 6px; }
.art-file { display: block; margin-top: 6px; color: var(--ink-soft); font-size: 0.72rem; }

/* ---------- reviews from the Land ---------- */
.review-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 24px; }
.review { margin: 0; background: var(--card); border: 1px solid var(--rule); border-radius: 16px; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.review blockquote { margin: 0; font-family: var(--serif); font-size: 1.05rem; line-height: 1.45; }
.review figcaption { font-size: 0.88rem; color: var(--ink-soft); }
.teeth { display: flex; gap: 4px; }
.teeth svg { width: 20px; height: 24px; }
.teeth svg path:first-child { fill: #fff; stroke: var(--gold); stroke-width: 1.6; }
.teeth svg .shine { stroke: var(--gold-light); stroke-width: 1.4; }
.teeth svg.dim path:first-child { stroke: var(--rule); fill: var(--paper-deep); }

/* ---------- gifts, Christmas, the forgotten night, order-by ---------- */
.xmas-strip { background: var(--gold-light); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.xmas-strip p { margin: 0; padding: 12px 0; max-width: none; font-size: 0.98rem; }
.ticks { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 8px; }
.ticks li { padding-left: 26px; position: relative; }
.ticks li::before { content: "\2726"; position: absolute; left: 2px; top: 0; color: var(--gold); }
.gift-fieldset #gift-fields { margin-top: 10px; }
.excuses { display: grid; gap: 8px; margin-top: 8px; }
.excuse { display: flex; gap: 10px; align-items: flex-start; background: var(--card); border: 1.5px solid var(--rule); border-radius: 12px; padding: 10px 12px; cursor: pointer; font-family: var(--serif); }
.excuse input { margin-top: 5px; }
.excuse:has(input:checked) { border-color: var(--gold); background: var(--gold-light); }
.orderby-calc { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; background: var(--card); border: 1px solid var(--rule); border-radius: 14px; padding: 16px 18px; margin: 12px 0; }
.orderby-calc input { font: 1rem var(--sans); padding: 9px 12px; border: 1.5px solid var(--rule); border-radius: 10px; }
.calc-out { flex-basis: 100%; }
.calc-out p { margin: 4px 0; }
.calc-out .late { color: var(--warn); }
.art-note-inline { margin-top: 16px; background: var(--card); border: 1.5px dashed var(--ink-soft); border-radius: 10px; padding: 10px 12px; font-size: 0.88rem; }
.art-note-inline b { font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; background: var(--ink); color: var(--paper); border-radius: 4px; padding: 1px 6px; margin-right: 6px; }

.safety { font: 0.8rem var(--sans); border: 1.5px solid var(--ink); border-radius: 8px; padding: 6px 9px; margin: 12px 0 0; }


/* ---------- accounts ---------- */
.signin-card { position: relative; background: var(--card); border: 1px solid var(--rule); border-radius: 22px; padding: 34px 36px 26px; overflow: hidden; }
.signin-ribbon, .account-ribbon { height: 10px; border-radius: 999px; background: var(--blend, linear-gradient(120deg, var(--lavender), var(--gold-light))); margin: 0 0 22px; }
.signin-card::before { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: var(--blend, linear-gradient(120deg, var(--lavender), var(--gold-light))); opacity: 0.22; filter: blur(2px); pointer-events: none; }
.signin h1 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.signin-alt { margin-top: 14px; }
.account-head { display: grid; grid-template-columns: 1fr; gap: 6px; margin-bottom: 28px; }
.account-head .account-ribbon { height: 14px; margin-bottom: 14px; }
.kids { display: grid; gap: 12px; }
.kid { display: flex; gap: 14px; align-items: center; background: var(--card); border: 1px solid var(--rule); border-radius: 14px; padding: 12px 14px; }
.kid-swatch { width: 44px; height: 44px; border-radius: 50%; background: var(--blend); box-shadow: 0 0 0 3px var(--card), 0 0 0 4px var(--rule); flex: none; }
.inline-form { display: inline; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; text-decoration-color: var(--lavender); cursor: pointer; }
.codes { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 18px 0; }
.codes code { display: block; background: var(--card); border: 1px dashed var(--ink-soft); border-radius: 8px; padding: 10px; font-size: 1.05rem; text-align: center; }
.account-offer { border-left: 6px solid var(--gold); }


/* ---------- the F and N grumble (tooth chart, usual order only) ---------- */
table.chart td.letter { position: relative; }
table.chart td.letter .lt { display: inline-block; }
.grump-fly, .grump-note { display: none; }
table.chart.by-order.fly-home tr[data-letter="F"] .grump-fly, table.chart.by-order.fly-landing tr[data-letter="F"] .grump-fly { display: block; }
table.chart.fly-landing tr[data-letter="F"] .grump-fly { visibility: hidden; }
.grump-fly.gf-travel { display: block; position: fixed; bottom: auto; z-index: 60; pointer-events: none; animation: none; }
table.chart.by-order tr[data-letter="F"] .grump-note:not([hidden]) { display: block; }
table.chart.by-order tr[data-letter="F"] .lt { animation: shuffle-down 7s ease-in-out infinite; }
table.chart.by-order tr[data-letter="N"] .lt { animation: shuffle-up 7s ease-in-out infinite; }
@keyframes shuffle-down { 0%, 70%, 100% { transform: none; } 74% { transform: translateY(5px) rotate(-6deg); } 78% { transform: translateY(2px) rotate(5deg); } 82% { transform: translateY(6px) rotate(-3deg); } 88% { transform: none; } }
@keyframes shuffle-up { 0%, 70%, 100% { transform: none; } 74% { transform: translateY(-5px) rotate(6deg); } 78% { transform: translateY(-2px) rotate(-5deg); } 82% { transform: translateY(-6px) rotate(3deg); } 88% { transform: none; } }

.grump-fly { position: absolute; left: 26px; bottom: -19px; z-index: 3; padding: 2px; border: 0; background: none; cursor: pointer; border-radius: 50%; animation: grump-hover 3.4s ease-in-out infinite; }
.grump-fly:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@keyframes grump-hover { 0%, 100% { transform: translate(0, 0) rotate(-4deg); } 50% { transform: translate(3px, -3px) rotate(3deg); } }
.grump-fly .gf-wings ellipse { fill: #fff; fill-opacity: 0.7; stroke: var(--ink-soft); stroke-width: 0.6; transform-origin: 20px 9px; }
.grump-fly .gf-wings { animation: gf-flap 0.18s linear infinite alternate; transform-origin: 20px 10px; }
@keyframes gf-flap { from { transform: scaleY(1); } to { transform: scaleY(0.55); } }
.grump-fly .gf-body, .grump-fly .gf-head { fill: var(--ink); }
.grump-fly .gf-eye { fill: #fff; }
.grump-fly .gf-brow, .grump-fly .gf-ant { fill: none; stroke: var(--ink); stroke-width: 1; stroke-linecap: round; }
.grump-fly .gf-brow { stroke: #fff; stroke-width: 0.8; }
.grump-fly .gf-bulb { fill: #f6d77a; animation: gf-flicker 4.3s steps(1, end) infinite; }
.grump-fly .gf-glow { fill: var(--gold); opacity: 0.35; filter: blur(2px); animation: gf-flicker-glow 4.3s steps(1, end) infinite; }
/* a light on the blink: steady, stutter, out, a sulky dim, back on */
@keyframes gf-flicker { 0% { fill: #f6d77a; } 38% { fill: #6b5a2a; } 41% { fill: #f6d77a; } 44% { fill: #6b5a2a; } 46% { fill: #f6d77a; } 62% { fill: #4a4030; } 74% { fill: #b39a4e; } 80% { fill: #f6d77a; } }
@keyframes gf-flicker-glow { 0% { opacity: 0.4; } 38% { opacity: 0; } 41% { opacity: 0.4; } 44% { opacity: 0; } 46% { opacity: 0.4; } 62% { opacity: 0; } 74% { opacity: 0.12; } 80% { opacity: 0.4; } }

.grump-note { position: absolute; left: 84px; top: calc(100% + 6px); z-index: 4; width: min(300px, 70vw); background: var(--card); border: 1px solid var(--rule); border-radius: 14px; padding: 12px 14px; font: 0.92rem/1.45 var(--sans); color: var(--ink); box-shadow: 0 8px 24px rgba(34, 36, 63, 0.14); }
.grump-note::before { content: ""; position: absolute; left: -7px; top: 14px; width: 12px; height: 12px; background: var(--card); border-left: 1px solid var(--rule); border-bottom: 1px solid var(--rule); transform: rotate(45deg); }

@media (prefers-reduced-motion: reduce) {
  table.chart.by-order tr[data-letter="F"] .lt, table.chart.by-order tr[data-letter="N"] .lt, .grump-fly, .grump-fly .gf-wings { animation: none; }
  .grump-fly .gf-bulb { animation: none; fill: #b39a4e; }
  .grump-fly .gf-glow { animation: none; opacity: 0.12; }
}


/* ---------- the desk ---------- */
.desk-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.desk-head .lede { margin: 0; }
.desk-links { font-size: 0.92rem; }
.late { color: #b4512e; }
.runs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 12px; }
.run-tile { display: grid; gap: 2px; padding: 14px 16px; border-radius: 12px; background: var(--lavender-light); text-decoration: none; color: var(--ink); border: 1.5px solid transparent; }
.run-tile:hover { border-color: var(--ink); }
.run-tile.empty { background: var(--paper-deep); opacity: 0.7; }
.run-n { font: 700 1.8rem/1 var(--serif); }
.run-name { font-weight: 700; }
.stage { margin: 28px 0; }
.stage h2 { font-size: 1.35rem; display: flex; gap: 10px; align-items: center; margin-bottom: 4px; }
.stage h2 .count { font: 700 0.85rem var(--sans); background: var(--ink); color: var(--paper); border-radius: 999px; padding: 2px 10px; }
.stage-shipped h2 .count { background: var(--rule); color: var(--ink); }
.empty-stage { margin: 6px 0 0; }
.due { font-weight: 700; }
.due.soon { color: #a8741f; }
.due.late { color: #b4512e; }
td.act { white-space: nowrap; text-align: right; }
.ship-form { display: inline-flex; gap: 6px; align-items: center; }
.ship-form input { width: 190px; }
.next-step { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--gold-light); border-radius: 14px; padding: 16px 20px; margin: 0 0 24px; }
.next-step.stage-shipped { background: var(--paper-deep); }
.checklist li.done > div:first-child { color: var(--ink-soft); }
.row-acts { display: flex; gap: 6px; align-items: center; }
.tick { width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--rule); background: #fff; color: var(--rule); font-size: 1rem; cursor: pointer; }
.tick:hover { border-color: var(--ok); color: var(--ok); }
.tick.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.stock { display: inline-block; font: 700 0.7rem var(--sans); padding: 1px 7px; border-radius: 6px; margin-right: 4px; background: var(--paper-deep); color: var(--ink); }
.stock-cotton { background: #f3ead8; }
.stock-card { background: #e5e9f3; }
.stock-avery5160, .stock-avery22806 { background: #e6f1ea; }
.label-start { max-width: 420px; margin-top: 18px; }
.label-start input { width: 90px; }
.run-steps { margin-top: 18px; }

.kid-full { align-items: flex-start; }
.kid-body { flex: 1; }
.kid-form { margin-top: 10px; display: grid; gap: 8px; }
.kid-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.kid-row select { font: 0.95rem var(--sans); padding: 7px 10px; border: 1.5px solid var(--rule); border-radius: 8px; background: #fff; }
.kid-form .btn { justify-self: start; }

/* ---------- the story bible ---------- */
.lore-layout { display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: start; }
@media (max-width: 860px) { .lore-layout { grid-template-columns: 1fr; } .lore-nav { position: static; } }
.lore-nav { position: sticky; top: 16px; display: grid; gap: 4px; font-size: 0.92rem; }
.lore-nav input { font: 0.95rem var(--sans); padding: 8px 12px; border: 1.5px solid var(--rule); border-radius: 999px; margin-bottom: 8px; }
.lore-nav a { text-decoration: none; padding: 4px 8px; border-radius: 6px; }
.lore-nav a:hover { background: var(--lavender-light); }
.lore-main h2 { margin: 40px 0 10px; font-size: 1.6rem; scroll-margin-top: 16px; }
.lore-main h2:first-child { margin-top: 0; }
.coll { margin: 22px 0 10px; font-size: 1.15rem; }
.coll .count, .lore-card .count { font: 700 0.75rem var(--sans); background: var(--paper-deep); border-radius: 999px; padding: 2px 8px; }
.lore-card { background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 12px 16px; margin-bottom: 10px; scroll-margin-top: 16px; }
.lore-card:target { outline: 2px solid var(--gold); }
.lore-card h4 { margin: 0 0 4px; font-size: 1.05rem; }
.lore-card p { margin: 4px 0; }
.lore-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.lore-grid .lore-card { margin: 0; }
.piece summary { cursor: pointer; list-style: none; }
.piece summary::-webkit-details-marker { display: none; }
.piece summary::before { content: "\25B8"; display: inline-block; width: 1em; color: var(--ink-soft); transition: transform 0.15s; }
.piece details[open] summary::before { transform: rotate(90deg); }
.pid { font: 700 0.75rem var(--sans); background: var(--ink); color: var(--paper); border-radius: 6px; padding: 1px 6px; }
.piece-body { font-family: var(--serif); line-height: 1.6; margin: 10px 0 6px 1em; max-width: 68ch; }
.piece-body p { margin: 0 0 0.8em; }
.ph { background: var(--gold-light); border-radius: 4px; padding: 0 3px; font-family: var(--sans); font-size: 0.85em; }
.piece-extra { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; font-size: 0.85rem; margin: 6px 0 0 1em; color: var(--ink-soft); }
.piece-extra dt { font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.chip { font-size: 0.75rem; text-decoration: none; padding: 2px 8px; border-radius: 999px; }
.chip-place { background: #e5f0e8; }
.chip-char { background: var(--lavender-light); }
.chip-term { background: #f3ead8; }
.rel { font-size: 0.9rem; }
.appears a { font-weight: 600; }
.status-planned { background: var(--gold-light); }
.status-parked { background: var(--paper-deep); color: var(--ink-soft); }
.diagram { background: #fff; border: 1px solid var(--rule); border-radius: 12px; padding: 12px; overflow-x: auto; }
.diagram .mermaid { background: none; margin: 0; }
.lore-table td, .lore-table th { font-size: 0.88rem; }
.dictionary { margin: 0; }
.dictionary dt { font-weight: 700; font-family: var(--serif); font-size: 1.05rem; }
.dictionary dd { margin: 2px 0 0; }
.continuity { border-left: 5px solid var(--gold); }
.unlisted { columns: 2; font-size: 0.9rem; }

/* ---------- Wobbly Post ---------- */
.brand-words { display: inline-grid; line-height: 1.05; }
.brand-words small { font: 600 0.62rem var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.wobbly-hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; padding-top: 40px; padding-bottom: 20px; }
@media (max-width: 820px) { .wobbly-hero { grid-template-columns: 1fr; } }
.wobbly-hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.05; }
.wobble { display: inline-block; font-style: italic; color: var(--gold); transform-origin: 50% 90%; }
@media (prefers-reduced-motion: no-preference) { .wobble { animation: wobble 3.2s ease-in-out infinite; } }
@keyframes wobble { 0%, 70%, 100% { transform: rotate(0); } 75% { transform: rotate(-5deg); } 80% { transform: rotate(4deg); } 85% { transform: rotate(-2.5deg); } 90% { transform: rotate(1deg); } }
.wobbly-envelope { display: grid; place-items: center; }
.env-body { position: relative; width: min(340px, 80vw); aspect-ratio: 1.55; background: var(--card); border: 1.5px solid var(--rule); border-radius: 10px; box-shadow: 0 18px 40px rgba(34, 36, 63, 0.12); transform: rotate(-4deg); }
.env-body::before { content: ""; position: absolute; inset: 0; background: linear-gradient(155deg, transparent 49.6%, var(--rule) 50%, transparent 50.4%), linear-gradient(25deg, transparent 49.6%, var(--rule) 50%, transparent 50.4%); background-size: 100% 60%; background-repeat: no-repeat; opacity: 0.8; }
.env-stamp { position: absolute; right: 16px; top: 16px; width: 54px; height: 64px; background: linear-gradient(135deg, var(--lavender), var(--gold-light)); border: 3px dotted var(--card); outline: 1px solid var(--rule); }
.env-lines { position: absolute; left: 34%; top: 56%; width: 48%; height: 34px; background: repeating-linear-gradient(transparent 0 10px, var(--rule) 10px 11px); }
.env-postmark { position: absolute; right: 54px; top: 30px; font: 700 0.6rem var(--sans); letter-spacing: 0.14em; color: var(--ink-soft); border: 1.5px solid var(--ink-soft); border-radius: 50%; padding: 14px 6px; transform: rotate(-14deg); opacity: 0.75; }
.moment-now { display: grid; grid-template-columns: 1.2fr 1fr; gap: 36px; align-items: center; background: var(--lavender-light); border-radius: 22px; padding: 30px; }
@media (max-width: 820px) { .moment-now { grid-template-columns: 1fr; } }
.moment-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin: 20px 0 28px; }
.moment-card { background: var(--card); border: 1px solid var(--rule); border-radius: 16px; padding: 18px 20px; }
.moment-card h3 { font-size: 1.15rem; margin: 6px 0; }
.moment-card p { font-size: 0.95rem; margin: 0; }
.moment-when { font: 700 0.7rem var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
.status-later .moment-when { color: var(--ink-soft); }
.moment-ticks { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 16px; margin-bottom: 12px; }
.first-tooth { margin-top: 18px; }
.choices.stack { grid-template-columns: 1fr; }
.first-tooth-elsewhere { margin-top: 10px; }
.first-tooth-elsewhere .field-row { grid-template-columns: 1fr 1.6fr 1fr; }
@media (max-width: 640px) { .first-tooth-elsewhere .field-row { grid-template-columns: 1fr; } }
.pressing-note { display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem; background: var(--lavender-light); border-radius: 12px; padding: 10px 14px; }
.pressing-dot { flex: none; width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px var(--gold-light); }
.day-picks { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.stock-warn { margin-bottom: 16px; }
.postage-steps{list-style:none;padding:0;display:grid;gap:12px;margin:20px 0 28px}
.postage-steps li{display:flex;flex-wrap:wrap;align-items:center;gap:12px}
.postage-steps form{margin:0}
.postage-steps small{color:var(--muted,#6b5e50);max-width:46ch}
/* The Associated Board of Seals */
.abs-seal { position: relative; display: inline-block; vertical-align: middle; }
.abs-btn { background: none; border: 0; padding: 2px; cursor: pointer; border-radius: 50%; line-height: 0; }
.abs-btn:focus-visible { outline: 2px solid var(--gold, #c9962e); outline-offset: 2px; }
/* Blind embossed, like the real mark pressed into each letter card: paper on paper, lit from the top left. */
.abs-svg { overflow: visible; }
.abs-disc { fill: var(--paper, #fbf8f1); filter: drop-shadow(0 1px 1.5px rgba(34, 36, 63, 0.10)); }
.abs-svg .m-line { fill: none; stroke: currentColor; }
.abs-svg .m-fill { fill: currentColor; stroke: none; }
.abs-light { color: rgba(255, 255, 255, 0.95); }
.abs-shade { color: rgba(34, 36, 63, 0.30); }
.abs-face { color: color-mix(in srgb, var(--paper, #fbf8f1) 88%, var(--ink, #22243f)); }
.abs-eye { fill: rgba(34, 36, 63, 0.35); }
.abs-words { font: 700 8.7px/1 var(--sans, sans-serif); letter-spacing: 0.7px; }
.abs-btn:hover .abs-face, .abs-btn:focus-visible .abs-face { color: color-mix(in srgb, var(--gold, #c9962e) 30%, var(--paper, #fbf8f1)); transition: color .25s; }
.abs-bob { animation: absbob .6s ease-in-out; }
@keyframes absbob { 0%,100% { transform: none; } 30% { transform: translateY(-4px) rotate(-6deg); } 60% { transform: translateY(0) rotate(4deg); } }
@media (prefers-reduced-motion: reduce) { .abs-bob { animation: none; } }
.abs-note { position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 6; width: min(310px, 80vw); background: var(--card, #fff); border: 1px solid var(--rule, #e4dccb); border-radius: 14px; padding: 12px 14px; font: 0.92rem/1.45 var(--sans, sans-serif); color: var(--ink, #22243f); box-shadow: 0 8px 24px rgba(34, 36, 63, 0.14); text-align: left; }
.abs-note b { display: block; margin-bottom: 4px; }
.foot-seal { display: inline-block; margin-left: 8px; vertical-align: middle; }
.foot-seal .abs-note { left: 0; right: auto; }
.kit-seal { display: inline-flex; align-items: center; gap: 10px; margin: 10px 0; font-size: .92rem; color: var(--muted, #6b5e50); }
.kit-seal .abs-note { left: 0; right: auto; }
.board-story { max-width: 680px; }
.board-story .board-seal { margin: 6px 0 18px; }
.board-story .board-seal .abs-note { left: 0; right: auto; bottom: auto; top: calc(100% + 8px); }
.abs-note a { font-weight: 600; }

/* Tooth chart at phone width: teeth shrink so the mouth never scrolls sideways. */
@media (max-width: 560px) {
  .mouth { grid-template-columns: minmax(0, 1fr); }
  .arch { gap: 3px; min-width: 0; }
  .tooth, .tooth.molar { flex: 1 1 0; width: auto; min-width: 0; max-width: 46px; height: 44px; font-size: 0.75rem; border-width: 1.5px; }
  .tooth.molar { max-width: 52px; height: 40px; }
  table.chart { font-size: 0.9rem; }
}
/* Keyboard users always see where they are. */
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* The Acorn Latch's way back without a long press: a small grey box in the decoy page's own dull style. */
.latch-return { position: fixed; right: 18px; bottom: 86px; z-index: 62; width: min(300px, calc(100vw - 36px)); background: #efece6; color: #55524b; border: 1px solid #c9c5bc; border-radius: 10px; padding: 14px 16px; font: 0.95rem/1.4 Georgia, "Times New Roman", serif; box-shadow: 0 6px 18px rgba(0,0,0,0.12); }
.latch-return-title { margin: 0 0 8px; font-weight: 700; }
.latch-return label { display: block; margin-bottom: 4px; }
.latch-return input { width: 100%; padding: 8px 10px; border: 1px solid #a9a59c; border-radius: 6px; font: inherit; background: #fff; }
.latch-return-msg { min-height: 1.2em; margin: 6px 0; font-size: 0.85rem; }
.latch-return-actions { display: flex; gap: 8px; }
.latch-return button { min-height: 36px; padding: 6px 14px; border-radius: 6px; border: 1px solid #8f8b83; background: #dedad2; color: #3f3c36; font: inherit; cursor: pointer; }
.latch-return .latch-return-go { background: #6e6a62; color: #fff; border-color: #6e6a62; }
.glass-demo:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; border-radius: 12px; }

/* Paused sparkle: nothing on the site moves (same as the reduced-motion setting, chosen on the page). */
html.still *, html.still *::before, html.still *::after { animation: none !important; transition: none !important; }
.link-btn { background: none; border: 0; padding: 4px 0; min-height: 24px; font: inherit; color: inherit; text-decoration: underline; text-decoration-color: var(--lavender); text-underline-offset: 3px; cursor: pointer; }
.link-btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

@media (max-width: 560px) {
  .sealed { padding: 24px 18px; }
  /* On a phone the seal's note sits as a card across the bottom of the screen, so it never runs off the edge. */
  .abs-seal .abs-note, .foot-seal .abs-note, .kit-seal .abs-note, .board-story .board-seal .abs-note { position: fixed; left: 16px; right: 16px; top: auto; bottom: 96px; width: auto; }
}

/* Every required box says so in its label (forms are checked on the server, so the browser's own markers are off). */
.field:has(> input[required], > select[required], > textarea[required]) > label::after { content: " (required)"; font-weight: 400; color: var(--ink-soft); font-size: 0.88em; }

html { scroll-padding-bottom: 90px; }  /* the floating acorn never covers the box being typed in */
/* Studio: fairy gallery review */
.fairy-row { margin-bottom: 18px; }
.fairy-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 16px; }
.fairy-ages { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; margin-top: 10px; }
.fairy-age { margin: 0; padding: 6px; border: 2px solid var(--rule); border-radius: 10px; background: var(--card); font-size: .85rem; }
.fairy-age img { width: 100%; height: auto; border-radius: 6px; display: block; }
.fairy-age.st-approved { border-color: #5c9a6b; }
.fairy-age.st-rejected { border-color: #b4512e; }
.fairy-age.st-pending { border-color: var(--gold); }
.fairy-age form { display: grid; gap: 4px; margin-top: 4px; }
.fairy-age input { width: 100%; font-size: .8rem; }
.fairy-empty { aspect-ratio: 2/3; display: grid; place-items: center; background: var(--paper-deep); border-radius: 6px; color: var(--ink-soft); }
.ok-pill { font: 600 .75rem var(--sans); background: #e2f1e6; color: #2d6a3e; padding: 2px 8px; border-radius: 999px; }
/* Kit page: choose your fairy */
.fairy-pick { margin-top: 18px; }
.age-slide { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 8px 0 12px; }
.age-slide input[type=range] { flex: 1 1 220px; min-height: 32px; accent-color: var(--gold); }
.age-slide output { font-weight: 700; }
.fairy-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.fairy-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fairy-card label { display: block; border: 2px solid var(--rule); border-radius: 14px; padding: 6px; background: var(--card); cursor: pointer; text-align: center; }
.fairy-card img { width: 100%; height: auto; aspect-ratio: 2/3; object-fit: cover; border-radius: 10px; display: block; background: var(--paper-deep); }
.fairy-card .name { display: block; margin-top: 4px; font: 600 .9rem var(--sans); }
.fairy-card input:checked + label { border-color: var(--ink); box-shadow: 0 0 0 3px var(--gold-light); }
.fairy-card input:focus-visible + label { outline: 3px solid var(--gold); outline-offset: 2px; }

/* Frames for the fairy gallery, chosen by the colours the parent picks. Each is drawn in CSS: no images to load. */
.fairy-card label { position: relative; padding: 10px; }
.fairy-card img { border-radius: 8px; }
.fairy-card label::after { content: attr(data-companion); position: absolute; top: -10px; right: -8px; font-size: 1.35rem; line-height: 1;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.18)); transform: rotate(12deg); pointer-events: none; }
.fairy-pick[data-frame="lavender-gold"] .fairy-card label { border: 0; background:
  linear-gradient(var(--card), var(--card)) padding-box, linear-gradient(135deg, #e8c766, #b88a2a 35%, #f5e3a3 55%, #b88a2a 80%, #e8c766) border-box;
  border: 6px solid transparent; border-radius: 48% 48% 18px 18px / 30% 30% 18px 18px; }
.fairy-pick[data-frame="lavender-gold"] .fairy-card img { border-radius: 46% 46% 10px 10px / 28% 28% 10px 10px; box-shadow: inset 0 0 0 3px #d9c8ef; }
.fairy-pick[data-frame="seaglass-coral"] .fairy-card label { border: 8px solid #cdb79a; border-radius: 12px;
  box-shadow: inset 0 0 0 2px #a7d7cb, 0 2px 0 #b59a77; background: #f4efe6; }
.fairy-pick[data-frame="forest-honey"] .fairy-card label { border: 7px solid #8a6a43; border-radius: 16px; background: #fbf3dc;
  box-shadow: inset 0 0 0 3px #e2b54c, 0 0 0 2px #6d5233; }
.fairy-pick[data-frame="midnight-silver"] .fairy-card label { border: 0; border-radius: 14px; background:
  radial-gradient(circle at 12% 10%, #fff 0 1.5px, transparent 2px), radial-gradient(circle at 88% 16%, #fff 0 1.2px, transparent 2px),
  radial-gradient(circle at 80% 92%, #fff 0 1.4px, transparent 2px), #1f2a5a; padding: 12px; box-shadow: 0 0 0 3px #c9d0e6; color: #eef1fb; }
.fairy-pick[data-frame="peach-mint"] .fairy-card label { border: 6px double #ef9d74; border-radius: 22px; background: #eaf7ef; }
.fairy-pick .fairy-card input:checked + label { box-shadow: 0 0 0 4px var(--ink), 0 6px 18px rgba(34,36,63,.18); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .fairy-pick .fairy-card input:checked + label { transform: none; } }
.fairy-pick[data-frame="midnight-silver"] .fairy-card input:checked + label { box-shadow: 0 0 0 4px #f3d58a, 0 0 18px rgba(243,213,138,.55); }
.fairy-card-child label { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; height: 100%; min-height: 200px; text-align: center; }
.fairy-card-child .child-choose { font-size: 2.4rem; }
.fairy-card-child .desc { font-size: .8rem; color: var(--ink-soft); line-height: 1.35; }
.fairy-pick[data-frame="midnight-silver"] .fairy-card-child .desc { color: #c9d0e6; }
/* The Fairy Window: one quiet page for a child. Big pictures, big buttons, almost no words. */
body.window-page { background: radial-gradient(ellipse at top, #fdf6e3, #efe4f7 70%); min-height: 100vh; margin: 0; }
.window { max-width: 1000px; margin: 0 auto; padding: 24px 16px 48px; text-align: center; }
.window-title { font-family: var(--serif); font-size: clamp(2rem, 6vw, 3rem); margin: 8px 0 4px; }
.window-grown { font-size: .9rem; color: var(--ink-soft); max-width: 46ch; margin: 0 auto 18px; }
.window-fairies { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.window-fairy { background: #fff; border: 0; border-radius: 22px; padding: 8px; cursor: pointer; box-shadow: 0 6px 18px rgba(34,36,63,.12); transition: transform .2s; }
.window-fairy img { width: 100%; height: auto; border-radius: 16px; display: block; }
.window-fairy:hover, .window-fairy:focus-visible { transform: translateY(-4px) rotate(-1deg); }
.window-fairy:focus-visible, .window-yes:focus-visible, .window-back:focus-visible { outline: 4px solid var(--gold); outline-offset: 3px; }
.window-confirm { position: fixed; inset: 0; background: rgba(251,248,241,.96); display: grid; place-items: center; align-content: center; gap: 18px; padding: 16px; z-index: 10; }
.window-confirm[hidden] { display: none; }
.window-confirm img { max-height: 60vh; width: auto; border-radius: 22px; box-shadow: 0 10px 30px rgba(34,36,63,.18); }
.window-confirm form { display: flex; gap: 22px; justify-content: center; }
.window-yes, .window-back { width: 96px; height: 96px; border-radius: 50%; border: 0; font-size: 3rem; cursor: pointer; }
.window-yes { background: var(--gold); color: var(--night); box-shadow: 0 6px 18px rgba(201,150,46,.4); }
.window-back { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 3px var(--ink); }
.window-chosen { padding-top: 6vh; position: relative; }
.window-wave { max-width: min(320px, 80vw); height: auto; border-radius: 26px; box-shadow: 0 10px 30px rgba(34,36,63,.18); animation: wave 1.6s ease-in-out 3; transform-origin: 50% 90%; }
@keyframes wave { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-4deg); } 75% { transform: rotate(4deg); } }
.window-says { font-family: var(--serif); font-size: clamp(1.6rem, 5vw, 2.4rem); margin: 20px 0 8px; }
.window-sparkles span { position: absolute; color: var(--gold); font-size: 1.8rem; animation: twinkle 2.4s ease-in-out infinite; }
.window-sparkles span:nth-child(1) { left: 18%; top: 8%; } .window-sparkles span:nth-child(2) { right: 20%; top: 14%; animation-delay: .5s; }
.window-sparkles span:nth-child(3) { left: 12%; top: 46%; animation-delay: 1s; } .window-sparkles span:nth-child(4) { right: 14%; top: 50%; animation-delay: 1.5s; }
.window-sparkles span:nth-child(5) { left: 50%; top: 2%; animation-delay: .8s; }
@keyframes twinkle { 0%,100% { opacity: .2; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .window-wave, .window-sparkles span { animation: none; } .window-fairy { transition: none; } }
.child-window { margin-top: 18px; padding: 16px 18px; border: 2px dashed var(--rule); border-radius: 16px; background: var(--card); }
.child-window .check { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0; }
.child-window .check input { margin-top: 4px; width: 20px; height: 20px; flex: none; }
.child-window fieldset.when { border: 0; padding: 0; margin: 12px 0; }
.child-window legend { font-weight: 700; margin-bottom: 4px; }
.window-warning { background: #fff4e0; border-left: 4px solid var(--gold); padding: 10px 12px; border-radius: 8px; }
.child-window input[type=date] { font: inherit; padding: 10px 12px; border: 2px solid var(--rule); border-radius: 10px; min-width: 200px; }
.child-window legend { font-family: var(--sans); font-size: 1rem; }

/* Kit form alignment: a ticked box sits beside its words, any explanation goes underneath; a lone half-width box
   lines up with the two-column rows above it. */
.field.check { display: block; }
.field.check > label { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
.field.check > label input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.field.check > .hint { margin-left: 28px !important; }
.half-field { max-width: calc(50% - 8px); }
@media (max-width: 560px) { .half-field { max-width: none; } }
.field-hint { margin: 6px 0 0; }
.field-row > .field > label { white-space: normal; }

/* Limited batches (the Harvest Batch) */
.batch-strip { background: #f3e3c4; }
.batch-panel { border: 1px solid var(--rule); border-radius: 14px; padding: 18px 22px; margin: 0 0 26px; background: #fbf3e2; max-width: 760px; }
.batch-panel .batch-kicker { margin: 0 0 4px; font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; color: #7a4a1c; }
.batch-panel .batch-count { margin: 0 0 10px; font-size: 1.15rem; }
.batch-meter { height: 10px; border-radius: 6px; background: #ead7b3; overflow: hidden; margin: 0 0 14px; }
.batch-meter span { display: block; height: 100%; background: #b4512e; border-radius: 6px; }
.batch-facts { margin: 0; padding-left: 1.1em; }
.batch-facts li { margin: 0 0 6px; }
.batch-closed { background: #f5f1ea; }
