/* SintGedicht. One stylesheet. Themes are sets of variables on <html data-theme>; adding a theme
   means adding one block below plus its name in render.js and the i18n files. */

@font-face { font-family: 'Playfair Display'; font-weight: 600; font-style: normal; font-display: optional; src: url('../fonts/playfair-display-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-weight: 600; font-style: italic; font-display: optional; src: url('../fonts/playfair-display-600-italic.woff2') format('woff2'); }
@font-face { font-family: 'EB Garamond'; font-weight: 400; font-style: normal; font-display: optional; src: url('../fonts/eb-garamond-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'EB Garamond'; font-weight: 400; font-style: italic; font-display: optional; src: url('../fonts/eb-garamond-400-italic.woff2') format('woff2'); }
@font-face { font-family: 'EB Garamond'; font-weight: 600; font-style: normal; font-display: optional; src: url('../fonts/eb-garamond-600-normal.woff2') format('woff2'); }
/* Stand-ins with the same width as the web fonts: if a web font arrives a moment late, nothing moves. */
@font-face { font-family: 'Garamond Fallback'; src: local('Georgia'); size-adjust: 88%; }
@font-face { font-family: 'Playfair Fallback'; src: local('Georgia'); size-adjust: 104%; }
@font-face { font-family: 'Pinyon Script'; font-weight: 400; font-display: block; src: url('../fonts/pinyon-script-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Caveat'; font-weight: 500; font-display: block; src: url('../fonts/caveat-500-normal.woff2') format('woff2'); }

/* ---- themes ------------------------------------------------------------------------------ */
:root, html[data-theme='fluweel'] {
  --bg: #4a0b14;
  --bg-art: radial-gradient(1200px 600px at 50% -10%, #8a1a2b 0%, transparent 70%), radial-gradient(circle at 1px 1px, rgba(230, 200, 120, .09) 1px, transparent 1.5px);
  --bg-size: auto, 26px 26px;
  --on-bg: #f7ecd6; --on-bg-muted: #d9bfa0;
  --accent: #dcb863; --accent-hi: #f1dc9c; --accent-ink: #3b0910;
  --card: rgba(255, 244, 220, .07); --card-ink: #f7ecd6; --card-muted: #d9bfa0; --card-line: rgba(220, 184, 99, .38);
  --field: rgba(255, 250, 240, .96); --field-ink: #2a1a14;
  --sheet: #fbf5e6; --sheet-ink: #2a1a14; --sheet-muted: #6b574a; --sheet-line: rgba(184, 146, 62, .55);
  --foot: #2d060c; --radius: 12px; --shadow: 0 18px 40px rgba(0, 0, 0, .35);
  --ok: #2f8f5b; --bad: #c73a3a;
  --art-red: #b3202a; --art-red-dark: #7d1420; --art-gold: #e6c878; --art-moon: #f6e7b8; --art-roof: #2d060c; --art-roof-far: #63101c;
  --art-piet: #1b8f96; --art-cap: #1b8f96; --art-feather: #e6c878; --art-sack: #8a5a34; --art-brick: #8c2f2a; --art-gift: #2f8f5b; --art-star: #f1dc9c;
  color-scheme: dark;
}
html[data-theme='haard'] {
  --bg: #24150e;
  --bg-art: radial-gradient(900px 520px at 50% 108%, rgba(232, 121, 43, .42) 0%, transparent 70%), radial-gradient(700px 400px at 12% 0%, rgba(120, 62, 30, .55) 0%, transparent 70%);
  --bg-size: auto, auto;
  --on-bg: #fbe9d0; --on-bg-muted: #d8b48f;
  --accent: #f0a23b; --accent-hi: #ffd08a; --accent-ink: #2b1608;
  --card: rgba(255, 214, 160, .08); --card-ink: #fbe9d0; --card-muted: #d8b48f; --card-line: rgba(240, 162, 59, .34);
  --field: #fff6e8; --field-ink: #2b1a10;
  --sheet: #fff3df; --sheet-ink: #2b1a10; --sheet-muted: #7a5b42; --sheet-line: rgba(196, 122, 40, .5);
  --foot: #170d08; --radius: 18px; --shadow: 0 20px 44px rgba(0, 0, 0, .45);
  --ok: #3b9a5f; --bad: #d1493b;
  --art-red: #c0392b; --art-red-dark: #86231a; --art-gold: #ffc35a; --art-moon: #ffd9a0; --art-roof: #170d08; --art-roof-far: #4a2a17;
  --art-piet: #d9822b; --art-cap: #d9822b; --art-feather: #fff0c9; --art-sack: #9a6a3e; --art-brick: #7b3b26; --art-gift: #3b9a5f; --art-star: #ffd08a;
  color-scheme: dark;
}
html[data-theme='nacht'] {
  --bg: #0e1a3c;
  --bg-art: radial-gradient(700px 420px at 86% -6%, rgba(255, 209, 102, .22) 0%, transparent 70%), radial-gradient(circle at 20% 30%, #fff 0 1px, transparent 1.6px), radial-gradient(circle at 70% 60%, rgba(255, 255, 255, .8) 0 1px, transparent 1.6px), radial-gradient(circle at 45% 85%, rgba(255, 255, 255, .6) 0 1px, transparent 1.4px);
  --bg-size: auto, 190px 170px, 240px 210px, 150px 190px;
  --on-bg: #eef2ff; --on-bg-muted: #aab6dc;
  --accent: #ffd166; --accent-hi: #ffe7a6; --accent-ink: #14204a;
  --card: rgba(190, 205, 255, .09); --card-ink: #eef2ff; --card-muted: #aab6dc; --card-line: rgba(255, 209, 102, .32);
  --field: #f6f8ff; --field-ink: #17203f;
  --sheet: #fbfaf2; --sheet-ink: #17203f; --sheet-muted: #56608a; --sheet-line: rgba(224, 75, 75, .45);
  --foot: #070d22; --radius: 16px; --shadow: 0 20px 44px rgba(0, 0, 0, .5);
  --ok: #3fae78; --bad: #ef5a5a;
  --art-red: #e04b4b; --art-red-dark: #a52f38; --art-gold: #ffd166; --art-moon: #fff3c4; --art-roof: #070d22; --art-roof-far: #1c2b5e;
  --art-piet: #8a5cf5; --art-cap: #8a5cf5; --art-feather: #ffd166; --art-sack: #b07a48; --art-brick: #7a3a4a; --art-gift: #3fae78; --art-star: #ffffff;
  color-scheme: dark;
}
html[data-theme='speculaas'] {
  --bg: #f1e0c2;
  --bg-art: radial-gradient(circle at 2px 2px, rgba(122, 68, 30, .10) 1.2px, transparent 1.8px), linear-gradient(180deg, #f7ead2 0%, #f1e0c2 60%);
  --bg-size: 22px 22px, auto;
  --on-bg: #4a2814; --on-bg-muted: #86603f;
  --accent: #b3202a; --accent-hi: #cf3a40; --accent-ink: #fff6e6;
  --card: rgba(255, 252, 244, .72); --card-ink: #4a2814; --card-muted: #86603f; --card-line: rgba(122, 68, 30, .28);
  --field: #fffdf7; --field-ink: #3a2012;
  --sheet: #fffaf0; --sheet-ink: #3a2012; --sheet-muted: #7c5a41; --sheet-line: rgba(179, 32, 42, .4);
  --foot: #5a2f17; --radius: 14px; --shadow: 0 14px 30px rgba(90, 47, 23, .18);
  --ok: #2f8f5b; --bad: #c73a3a;
  --art-red: #b3202a; --art-red-dark: #7d1420; --art-gold: #d9a441; --art-moon: #fff3cf; --art-roof: #5a2f17; --art-roof-far: #c9a273;
  --art-piet: #2f7d6d; --art-cap: #2f7d6d; --art-feather: #d9a441; --art-sack: #8a5a34; --art-brick: #a14a35; --art-gift: #2563ad; --art-star: #d9a441;
  color-scheme: light;
}

/* ---- base -------------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scrollbar-gutter: stable; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  font: 400 19px/1.55 'EB Garamond', 'Garamond Fallback', Georgia, 'Times New Roman', serif;
  color: var(--on-bg); background-color: var(--bg); background-image: var(--bg-art); background-size: var(--bg-size); background-attachment: fixed;
  overflow-wrap: anywhere;
}
h1, h2, h3 { font-family: 'Playfair Display', 'Playfair Fallback', Georgia, serif; font-weight: 600; line-height: 1.18; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); letter-spacing: -.01em; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { top: 10px; }
.center { text-align: center; }
.muted { color: var(--card-muted); }
.sheet .muted { color: var(--sheet-muted); }
.small { font-size: .85em; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---- header ------------------------------------------------------------------------------ */
.banner { background: var(--accent); color: var(--accent-ink); text-align: center; padding: 6px 16px; font-size: .95rem; }
.top { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--card-line); }
.top { height: 65px; }
.top-in { width: min(100% - 32px, 1240px); margin: 0 auto; height: 64px; display: flex; align-items: center; gap: 22px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--accent); flex: none; }
.logo .mark { width: 30px; height: 30px; }
.logo .word { white-space: nowrap; font: 600 1.45rem/1 'Playfair Display', 'Playfair Fallback', Georgia, serif; color: var(--on-bg); letter-spacing: .01em; }
.logo .word em { color: var(--accent); }
.nav { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
/* Links that do not fit wrap to a second line that is cut off: they disappear whole, never half a word. */
.nav-links { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 0 4px; flex: 1 1 auto; min-width: 0; height: 40px; overflow: hidden; }
.nav a { text-decoration: none; padding: 8px 12px; border-radius: 999px; font-size: 1.02rem; line-height: 24px; white-space: nowrap; flex: none; }
.nav a:hover { background: var(--card); }
.nav a[aria-current] { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
/* Sint Premium: the one gold button in the menu */
.nav a.prem-pill { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 6px 15px 6px 11px; border-radius: 999px; font-weight: 600; color: var(--accent-ink); background: linear-gradient(180deg, var(--accent-hi), var(--accent)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 0 0 1px rgba(0, 0, 0, .12); }
.nav a.prem-pill:hover { filter: brightness(1.07); }
.nav a.prem-pill[aria-current] { color: var(--accent-ink); border-radius: 999px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 0 0 2px var(--accent-ink); }
.pill-star { width: 15px; height: 15px; flex: none; }
.top-end { display: flex; align-items: center; gap: 12px; flex: none; }
.langs { display: flex; gap: 6px; }
.flag { display: block; width: 26px; height: 18px; border-radius: 3px; overflow: hidden; opacity: .5; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); }
.flag svg { display: block; width: 100%; height: 100%; }
.flag.on, .flag:hover { opacity: 1; }
.flag.on { box-shadow: 0 0 0 2px var(--accent); }
.me { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; padding: 4px 12px 4px 4px; border: 1px solid var(--card-line); border-radius: 999px; width: 148px; height: 38px; }
.me:hover { background: var(--card); }
.me-av { width: 28px; height: 28px; border-radius: 8px; flex: none; }
.me-nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .98rem; }
.themes { position: relative; }
.themes summary { list-style: none; cursor: pointer; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: var(--on-bg-muted); }
.themes summary::-webkit-details-marker { display: none; }
.themes summary:hover, .themes[open] summary { background: var(--card); color: var(--accent); }
.themes summary svg { width: 22px; height: 22px; }
.themes-pop { position: absolute; right: 0; top: 44px; width: 190px; padding: 8px; border-radius: 12px; background: var(--sheet); color: var(--sheet-ink); box-shadow: var(--shadow); display: grid; gap: 2px; z-index: 40; }
.themes-pop button { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; background: none; border-radius: 8px; cursor: pointer; text-align: left; }
.themes-pop button:hover { background: rgba(0, 0, 0, .07); }
.sw { width: 22px; height: 22px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .5), 0 0 0 1px rgba(0, 0, 0, .2); }
.sw-fluweel { background: linear-gradient(135deg, #7a1422 50%, #dcb863 50%); }
.sw-haard { background: linear-gradient(135deg, #2b1a12 50%, #f0a23b 50%); }
.sw-nacht { background: linear-gradient(135deg, #0e1a3c 50%, #ffd166 50%); }
.sw-speculaas { background: linear-gradient(135deg, #f1e0c2 50%, #b3202a 50%); }

/* ---- layout ------------------------------------------------------------------------------ */
main { flex: 1; width: min(100% - 32px, 820px); margin: 0 auto; padding: 32px 0 64px; }
main.wide { width: min(100% - 32px, 1240px); }
.foot { background: var(--foot); color: #f1e3cf; position: relative; margin-top: 46px; }
.roofline { position: absolute; left: 0; bottom: 100%; width: 100%; height: 46px; display: block; fill: var(--foot); }
.foot-in { width: min(100% - 32px, 1240px); margin: 0 auto; padding: 26px 0 30px; display: grid; gap: 14px; justify-items: center; text-align: center; }
.foot-brand { display: inline-flex; align-items: center; gap: 8px; margin: 0; font: 600 1.15rem 'Playfair Display', 'Playfair Fallback', Georgia, serif; color: #e6c878; }
.foot-brand .mark { width: 22px; height: 22px; }
.foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; font-size: .98rem; }
.foot-note { margin: 0; font-size: .9rem; opacity: .7; }

/* ---- buttons, chips, fields ---------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  font: 600 1.02rem/1 'EB Garamond', 'Garamond Fallback', Georgia, serif; letter-spacing: .01em; text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform .12s, filter .12s, background-color .12s; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: default; }
.btn.gold { background: linear-gradient(180deg, var(--accent-hi), var(--accent)); color: var(--accent-ink); box-shadow: 0 6px 16px rgba(0, 0, 0, .22); }
.btn.gold:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; border-color: color-mix(in srgb, currentColor 40%, transparent); }
.btn.ghost:hover { background: color-mix(in srgb, currentColor 9%, transparent); }
.btn.danger { background: var(--bad); color: #fff; }
.btn.small { min-height: 36px; padding: 0 14px; font-size: .95rem; }
.btn.big { min-height: 54px; padding: 0 30px; font-size: 1.15rem; }
.btn.block { display: flex; width: 100%; }
.fld { display: block; border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
.fld > span, .fld > legend { display: block; padding: 0; margin-bottom: 5px; font-size: .92rem; letter-spacing: .04em; text-transform: uppercase; color: var(--card-muted); font-family: system-ui, 'Segoe UI', sans-serif; font-weight: 600; font-size: .72rem; }
.sheet .fld > span, .sheet .fld > legend { color: var(--sheet-muted); }
input:not([type]), input[type='text'], input[type='password'], input[type='email'], input[type='date'], input[type='number'], textarea, select {
  width: 100%; min-height: 44px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--card-line); background: var(--field); color: var(--field-ink); }
textarea { resize: vertical; min-height: 96px; line-height: 1.4; display: block; }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--field-ink) 45%, transparent); }
input[type='range'] { width: 100%; accent-color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip, .pick { position: relative; cursor: pointer; }
.chip input, .pick input, .swatch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span, .pick span { display: inline-flex; align-items: center; min-height: 34px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--card-line); font-size: .98rem; transition: background-color .12s, color .12s; }
.chip input:checked + span, .pick input:checked + span { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip input:focus-visible + span, .pick input:focus-visible + span, .swatch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.sheet .chip span, .sheet .pick span { border-color: var(--sheet-line); }
.check { display: flex; gap: 9px; align-items: flex-start; margin: 0 0 14px; font-size: 1rem; cursor: pointer; }
.check input { width: 19px; height: 19px; margin: 4px 0 0; accent-color: var(--accent); flex: none; }
.state { display: block; min-height: 1.5em; margin-top: 4px; font-size: .9rem; color: var(--card-muted); }
.sheet .state { color: var(--sheet-muted); }
.state.ok, .form-msg.ok { color: var(--ok); }
.state.err, .form-msg.err { color: var(--bad); }
.form-msg { min-height: 1.6em; margin: 0 0 10px; font-size: .98rem; }
.hint { font-size: .93rem; color: var(--card-muted); }
.sheet .hint { color: var(--sheet-muted); }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; opacity: 0; }
.ts:empty { display: none; }
.ts { margin: 0 0 12px; }

/* ---- paper sheets -------------------------------------------------------------------------- */
.sheet { color-scheme: light; position: relative; background: var(--sheet); color: var(--sheet-ink); border-radius: 6px; box-shadow: var(--shadow); padding: clamp(22px, 4.5vw, 52px); }
.sheet::before { content: ''; position: absolute; inset: 9px; border: 1px solid var(--sheet-line); border-radius: 3px; pointer-events: none; }
.sheet a { color: inherit; }
.sheet .btn.ghost { color: var(--sheet-ink); }
.paper-perkament { background: radial-gradient(120% 90% at 50% 40%, #fbf1d7 0%, #f3e3ba 62%, #e6cf9a 100%); color: #33200f; }
.paper-ivoor { background: #fbf6ea; color: #2a1a14; }
.paper-wit { background: #fff; color: #1d1d1d; }
.reading { max-width: 780px; margin: 0 auto; }
.reading-head { text-align: center; margin: 6px 0 26px; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.3em; }
.prose ul, .prose ol { padding-left: 1.25em; margin: 0 0 1em; }
.prose li { margin-bottom: .35em; }
.prose blockquote { margin: 1.2em 0; padding: 2px 0 2px 18px; border-left: 3px solid var(--sheet-line); font-style: italic; }
.prose pre.vers, .vers { font: italic 400 1.08em/1.6 'EB Garamond', 'Garamond Fallback', Georgia, serif; white-space: pre-wrap; margin: 1.1em 0; padding: 12px 18px; border-left: 3px solid var(--accent); background: rgba(0, 0, 0, .035); border-radius: 0 8px 8px 0; }
.crumb { font-size: .9rem; margin-bottom: 8px; }
.empty { padding: 18px 0; }

/* ---- home ---------------------------------------------------------------------------------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 36px; align-items: center; padding: 18px 0 30px; }
.eyebrow { font: 600 .78rem system-ui, 'Segoe UI', sans-serif; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.lead { font-size: 1.3rem; color: var(--on-bg-muted); max-width: 30em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 0; }
.hero-art { position: relative; padding-bottom: 86px; }
.art-hero { display: block; width: 100%; height: auto; }
.hero-sheet { position: absolute; left: 0; bottom: 0; width: min(86%, 410px); margin: 0; padding: 20px 24px 16px; transform: rotate(-3deg); font-size: 1.02rem; }
.hero-sheet { cursor: pointer; }
.hero-sheet .demo { list-style: none; margin: 0; padding: 0; transition: opacity .35s; }
.hero-sheet .demo.out { opacity: 0; }
.hero-sheet .demo li { display: flex; gap: 10px; align-items: center; height: 1.75em; white-space: nowrap; overflow: hidden; }
.hero-sheet .vl { overflow: hidden; text-overflow: ellipsis; }
.hero-sheet figcaption { text-align: right; font-style: italic; margin-top: 6px; }
.cards3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; margin: 22px 0; }
.card { display: block; text-decoration: none; padding: 22px 24px; border-radius: var(--radius); background: var(--card); color: var(--card-ink); border: 1px solid var(--card-line); transition: transform .15s, border-color .15s; }
.card:hover { transform: translateY(-3px); border-color: var(--accent); }
.card h2, .card h3 { font-size: 1.25rem; color: var(--accent); margin-bottom: .35em; }
.card p { margin: 0; color: var(--card-muted); }
.why, .more { margin-top: 52px; }
.why h2, .more h2 { text-align: center; font-size: 1.8rem; margin-bottom: 22px; }
.why-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 30px; margin: 0; }
@media (max-width: 1040px) { .why-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .why-grid { grid-template-columns: minmax(0, 1fr); } }
.why-grid div { padding-left: 18px; border-left: 2px solid var(--accent); }
.why-grid dt { font: 600 1.15rem 'Playfair Display', 'Playfair Fallback', Georgia, serif; margin-bottom: 4px; }
.why-grid dd { margin: 0; color: var(--on-bg-muted); }

/* illustration colours */
.art .a-moon { fill: var(--art-moon); } .art .a-moon-glow { fill: var(--art-moon); opacity: .12; } .art .a-star { fill: var(--art-star); }
.art .a-roof { fill: var(--art-roof); } .art .a-roof-far { fill: var(--art-roof-far); } .art .a-roof-line { stroke: var(--art-gold); opacity: .5; }
.art .a-red { fill: var(--art-red); } .art .a-red-dark { fill: var(--art-red-dark); } .art .a-gold { fill: var(--art-gold); stroke: var(--art-gold); }
.art .a-cream { fill: #fbf1d7; } .art .a-white { fill: #fff; } .art .a-white-shade { stroke: #d8d2c8; } .art .a-ink { fill: #2a1a14; stroke: #2a1a14; }
.art .a-skin { fill: #f1c7a3; } .art .a-skin-2 { fill: #c98e63; }
.art .a-piet-suit { fill: var(--art-piet); } .art .a-piet-cap { fill: var(--art-cap); } .art .a-feather { fill: var(--art-feather); }
.art .a-sack { fill: var(--art-sack); } .art .a-sack-tie { stroke: var(--art-gold); } .art .a-brick { fill: var(--art-brick); } .art .a-brick-top { fill: color-mix(in srgb, var(--art-brick) 70%, #000); }
.art .a-gift { fill: var(--art-gift); }
.art path[fill='none'].a-gold { fill: none; }
.a-drop { animation: drop 5s ease-in-out infinite; }
@keyframes drop { 0%, 100% { transform: translateY(-8px); } 50% { transform: translateY(10px); } }

/* ---- studio -------------------------------------------------------------------------------- */
.atelier { --side: 322px; }
.at-tabs { display: none; }
.at-grid { display: grid; grid-template-columns: var(--side) minmax(0, 1fr) 330px; gap: 22px; align-items: start; }
.panel { background: var(--card); color: var(--card-ink); border: 1px solid var(--card-line); border-radius: var(--radius); padding: 20px; min-width: 0; }
.panel h2 { font-size: 1.3rem; color: var(--accent); }
.status { min-height: 3.2em; margin: 10px 0 0; font-size: .96rem; color: var(--card-muted); }
.status.err { color: color-mix(in srgb, var(--bad) 70%, var(--card-ink)); }
.stage { min-width: 0; }
.editor { padding: clamp(20px, 3.4vw, 44px) clamp(14px, 3vw, 40px); }
.poem-title { width: 100%; border: 0 !important; background: transparent !important; color: inherit !important; text-align: center; font: 600 1.5rem 'Playfair Display', 'Playfair Fallback', Georgia, serif; padding: 4px 8px; margin-bottom: 12px; border-radius: 6px; }
.poem-title::placeholder { color: color-mix(in srgb, currentColor 35%, transparent); font-weight: 400; font-style: italic; }
.lines { list-style: none; margin: 0; padding: 0; min-height: 320px; }
.ln { display: grid; grid-template-columns: 30px minmax(0, 1fr) 30px; align-items: center; height: 42px; border-radius: 6px; }
.ln.cur { background: rgba(0, 0, 0, .045); }
.lt { width: 100%; min-height: 0 !important; height: 38px; border: 0 !important; border-radius: 0 !important; background: transparent !important; color: inherit !important; padding: 0 6px !important; font-size: 1.22rem; border-bottom: 1px dashed transparent !important; }
.lt:focus { outline: none; border-bottom-color: color-mix(in srgb, currentColor 30%, transparent) !important; }
.lt::placeholder { font-style: italic; }
.sy { text-align: right; font: 600 .8rem system-ui, sans-serif; color: color-mix(in srgb, currentColor 45%, transparent); font-variant-numeric: tabular-nums; padding-right: 4px; }
.rl { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font: 700 .7rem system-ui, sans-serif; border: 1.5px solid var(--rc, #999); color: var(--rc, #999); background: transparent; transition: background-color .2s, color .2s, border-color .2s; flex: none; }
.rl.free { border-color: transparent; }
.rl.c0 { --rc: #b3202a; } .rl.c1 { --rc: #1f6fae; } .rl.c2 { --rc: #2f8f5b; } .rl.c3 { --rc: #8a4fb5; } .rl.c4 { --rc: #c9761a; } .rl.c5 { --rc: #1b8f96; }
.rl.ok { background: var(--rc); color: #fff; }
.rl.bad { border-style: dashed; border-color: var(--bad); color: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 22%, transparent); }
.sheet-stats { min-height: 1.6em; margin: 14px 0 0; text-align: center; font-size: .93rem; color: color-mix(in srgb, currentColor 60%, transparent); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; }
.toast { font-size: .96rem; color: var(--accent); opacity: 0; transition: opacity .25s; min-width: 0; }
.toast.on { opacity: 1; }
.search { display: flex; gap: 8px; margin-bottom: 12px; }
.search input { flex: 1; min-width: 0; }
.search.big { margin: 6px 0 26px; }
.rh-for { min-height: 3em; margin: 0 0 8px; font-size: .98rem; color: var(--card-muted); }
.rh-list { height: 440px; overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; margin-bottom: 14px; scrollbar-width: thin; }
.rh-list h3 { font: 600 .7rem system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--card-muted); margin: 10px 0 6px; }
.rh-list h3:first-child { margin-top: 0; }
.rw { display: flex; flex-wrap: wrap; gap: 6px; }
.rw button { border: 1px solid var(--card-line); background: transparent; border-radius: 999px; padding: 3px 12px; cursor: pointer; font-size: 1rem; }
.rw button:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.sug { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.sug button { width: 100%; text-align: left; border: 1px solid var(--card-line); background: transparent; border-radius: 10px; padding: 8px 12px; cursor: pointer; font-style: italic; }
.sug button:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.sug button.weak { opacity: .7; border-style: dashed; }

/* writing tools: the left panel is a toolbox, one tool open at a time */
.atelier { scroll-margin-top: 84px; }
.tools h2 { margin-bottom: 12px; }
.tool-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; margin: 6px 0 16px; padding-top: 14px; border-top: 1px solid var(--card-line); }
.tool-tabs button { position: relative; display: grid; justify-items: center; gap: 4px; padding: 8px 2px 7px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--card-muted); cursor: pointer; font: 600 .64rem system-ui, 'Segoe UI', sans-serif; min-width: 0; }
.tool-tabs button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool-tabs button:hover { color: var(--card-ink); border-color: var(--card-line); }
.tool-tabs button[aria-selected='true'] { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.tool-tabs .tool-n { position: absolute; top: -5px; right: -3px; }
.tool-pane { display: none; }
.tool-pane.on { display: block; }
.ti { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tool-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--bad); color: #fff; font: 700 .72rem system-ui, sans-serif; }
.tool-n[hidden] { display: none; }
.tool-in { padding: 0 0 4px; }
.tool-in h3 { font: 600 .7rem system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--card-muted); margin: 14px 0 6px; }
.tool-in h3:first-child { margin-top: 0; }
.tool-in .sug { margin-top: 0; }
.tool-in .sug:not(:empty) { margin-top: 10px; }
.tool-in h3 + .sug { margin-top: 0; }
.tool-in .status { min-height: 1.6em; }
.tool-hint { margin: 0 0 10px; font-size: .95rem; color: var(--card-muted); min-height: 1.5em; }
.tool-hint:empty { display: none; }
.tool-hint a { color: var(--accent); }
.checks, .mine { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .97rem; }
.checks li { padding-left: 22px; position: relative; color: var(--card-muted); }
.checks li::before { content: ''; position: absolute; left: 4px; top: .55em; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .5; }
.checks li.ok { color: var(--card-ink); }
.checks li.ok::before { background: var(--ok); opacity: 1; }
.checks li:has(button)::before { background: var(--bad); opacity: 1; }
.checks button { border: 0; background: none; padding: 0; color: var(--card-ink); cursor: pointer; text-align: left; font: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--bad) 70%, transparent); text-underline-offset: 3px; }
.mine li { display: flex; align-items: baseline; gap: 10px; }
.mine button { flex: 1; min-width: 0; border: 0; background: none; padding: 4px 0; color: var(--card-ink); cursor: pointer; text-align: left; font: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mine button:hover { color: var(--accent); }
.mine span { font-size: .85rem; color: var(--card-muted); flex: none; }

/* progress on the sheet while the poet works. It lies over the sheet, so nothing moves. */
.busy { position: absolute; inset: 0; z-index: 3; display: grid; place-items: start center; padding: clamp(56px, 12vw, 96px) 20px 20px; border-radius: inherit; background: rgba(249, 238, 209, .95); color: #33200f; visibility: hidden; opacity: 0; transition: opacity .25s, visibility 0s .25s; }
.busy.on { visibility: visible; opacity: 1; transition: opacity .2s; }
.busy-in { width: min(100%, 340px); text-align: center; }
.busy-pen { display: grid; gap: 9px; margin: 0 auto 22px; width: 150px; }
.busy-pen i { display: block; height: 3px; width: 100%; border-radius: 2px; background: currentColor; opacity: .5; transform-origin: left; animation: pen 2.4s ease-in-out infinite; }
.busy-pen i:nth-child(2) { width: 82%; animation-delay: .35s; }
.busy-pen i:nth-child(3) { width: 60%; animation-delay: .7s; }
@keyframes pen { 0% { transform: scaleX(0); opacity: .5; } 45%, 80% { transform: scaleX(1); opacity: .5; } 100% { transform: scaleX(1); opacity: 0; } }
.busy-t { margin: 0 0 14px; min-height: 1.4em; font: 600 1.25rem 'Playfair Display', 'Playfair Fallback', Georgia, serif; }
.busy-bar { height: 6px; border-radius: 3px; background: rgba(51, 32, 15, .14); overflow: hidden; }
.busy-bar i { display: block; height: 100%; width: 4%; border-radius: 3px; background: #b8862b; transition: width 1.6s ease-out; }
.busy.wait .busy-bar i { width: 34% !important; animation: slide 1.4s ease-in-out infinite alternate; }
@keyframes slide { from { transform: translateX(-20%); } to { transform: translateX(215%); } }
.busy-s { margin: 10px 0 0; min-height: 1.5em; font-size: .95rem; opacity: .7; }
.busy-act { margin: 14px 0 0; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.busy-act[hidden], .busy-act [hidden] { display: none; }
.busy.fail .busy-pen, .busy.fail .busy-bar { visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .busy-pen i, .busy.wait .busy-bar i { animation: none; } }

@media (min-width: 1081px) {
  .atelier .panel { position: sticky; top: 84px; max-height: calc(100dvh - 104px); overflow-y: auto; scrollbar-width: thin; }
}
@media (max-width: 1080px) {
  /* one pane at a time. All three stay in the same grid cell, so switching tabs never moves the page. */
  .at-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; margin-bottom: 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--card-line); position: sticky; top: 72px; z-index: 20; backdrop-filter: blur(10px); }
  .at-tabs button { border: 0; background: transparent; min-height: 40px; border-radius: 999px; cursor: pointer; font-size: 1rem; }
  .at-tabs button[aria-selected='true'] { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
  .at-grid { grid-template-columns: minmax(0, 1fr); }
  .at-grid > * { grid-area: 1 / 1; visibility: hidden; opacity: 0; transition: opacity .18s; }
  .atelier[data-tab='brief'] [data-pane='brief'], .atelier[data-tab='poem'] [data-pane='poem'], .atelier[data-tab='rhyme'] [data-pane='rhyme'] { visibility: visible; opacity: 1; }
  .rh-list { height: 460px; }
  .atelier { scroll-margin-top: 78px; }
}

/* ---- preview and print --------------------------------------------------------------------- */
dialog { color: inherit; }
dialog::backdrop { background: rgba(0, 0, 0, .6); }
.preview { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background-color: var(--bg); background-image: var(--bg-art); background-size: var(--bg-size); color: var(--on-bg); }
.pv { display: grid; grid-template-columns: 330px minmax(0, 1fr); height: 100%; }
.pv-side { padding: 22px; overflow-y: auto; border-right: 1px solid var(--card-line); background: var(--card); }
.pv-side h2 { color: var(--accent); }
.pv-actions { display: flex; flex-wrap: wrap; gap: 10px; position: sticky; bottom: -22px; padding: 12px 0 22px; margin-bottom: -22px; background: linear-gradient(transparent, var(--bg) 30%); }
.pv-stage { display: grid; place-items: center; overflow: hidden; padding: 12px; min-height: 0; min-width: 0; }
.pv-fit { position: relative; }
.print-sheet { --ps: 1; width: 210mm; height: 297mm; padding: 24mm 22mm; transform-origin: top left; border-radius: 0; font-size: calc(15pt * var(--ps)); line-height: 1.75; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.print-sheet.size-A5 { width: 148mm; height: 210mm; padding: 17mm 15mm; font-size: calc(12pt * var(--ps)); }
.print-sheet::before { display: none; }
.print-sheet.border-goud::before { display: block; inset: 9mm; border: .7mm solid #b8923e; border-radius: 1.5mm; }
.print-sheet.border-goud::after { content: ''; position: absolute; inset: 11mm; border: .25mm solid #b8923e; border-radius: 1mm; pointer-events: none; }
.print-sheet.border-sterren::before { display: block; inset: 8mm; border: 0; border-radius: 0;
  background: radial-gradient(circle, #b8923e 0 .55mm, transparent .7mm) 0 0 / 6mm 6mm; padding: 4mm;
  -webkit-mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.print-sheet.size-A5.border-goud::before { inset: 7mm; } .print-sheet.size-A5.border-goud::after { inset: 8.6mm; } .print-sheet.size-A5.border-sterren::before { inset: 6mm; }
.ps-in { height: 100%; overflow: hidden; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; position: relative; }
.ps-orn { width: 16mm; height: 16mm; margin-bottom: 5mm; flex: none; background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 2 7 19h18z' fill='%23b3202a'/%3E%3Cpath d='M6 20h20v4H6z' fill='%23b8923e'/%3E%3Cpath d='M16 7v8M12.5 11h7' stroke='%23e6c878' stroke-width='1.8' stroke-linecap='round'/%3E%3Cpath d='M9 26c2 3 4.5 4 7 4s5-1 7-4' fill='none' stroke='%23b8923e' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); }
.ps-title { font: 600 1.5em/1.2 'Playfair Display', 'Playfair Fallback', Georgia, serif; margin: 0 0 .8em; }
.ps-poem p { margin: 0 0 1.1em; }
.ps-sign { margin: .6em 0 0; font-style: italic; align-self: flex-end; padding-right: 8%; }
.font-klassiek { font-family: 'EB Garamond', 'Garamond Fallback', Georgia, serif; }
.font-sierlijk .ps-poem, .font-sierlijk .ps-sign { font-family: 'Pinyon Script', 'EB Garamond', cursive; font-size: 1.32em; line-height: 1.5; }
.font-handschrift .ps-poem, .font-handschrift .ps-sign { font-family: 'Caveat', 'EB Garamond', cursive; font-size: 1.28em; line-height: 1.45; }
.modal { border: 0; border-radius: var(--radius); padding: 30px; max-width: min(92vw, 460px); background: var(--sheet); color: var(--sheet-ink); box-shadow: var(--shadow); text-align: center; }
.modal .btn.ghost { color: var(--sheet-ink); }
.modal-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 18px 0 0; }
.voice { width: min(92vw, 460px); }
.center-chips { justify-content: center; margin: 4px 0 10px; }
.voice-state { min-height: 1.6em; margin: 0 0 8px; color: var(--sheet-muted); }
.voice-state.err { color: var(--bad); }
.voice-player { display: block; width: 100%; height: 44px; margin: 0 0 4px; }
.plus-btn::after { content: '★'; margin-left: 6px; font-size: .75em; color: var(--accent); }
#print-root { display: none; }
@media (max-width: 820px) {
  .pv { grid-template-columns: minmax(0, 1fr); grid-template-rows: 46dvh minmax(0, 1fr); }
  .pv-stage { order: -1; }
  .pv-side { border-right: 0; border-top: 1px solid var(--card-line); }
}
@page { size: A4; margin: 0; }
@page a5 { size: A5; margin: 0; }
@media print {
  html, body { background: #fff !important; }
  body > *:not(#print-root) { display: none !important; }
  #print-root { display: block; }
  #print-root .print-sheet { transform: none !important; box-shadow: none; margin: 0; break-inside: avoid; }
  #print-root .size-A5 { page: a5; }
  body:not(:has(#print-root)) > main { display: block !important; width: auto; padding: 0; }
  body:not(:has(#print-root)) .sheet { box-shadow: none; }
}

/* ---- Sint Premium -------------------------------------------------------------------------- */
.chip.plus span::after { content: '★'; margin-left: 5px; font-size: .72em; color: var(--accent); }
.chip.plus input:checked + span::after { color: var(--accent-ink); }
.plus-note { margin: 6px 0 0; font-size: .93rem; }
.plus-note a { color: var(--accent); }
.ps-mark { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; font: 400 7pt system-ui, sans-serif; letter-spacing: .12em; opacity: .45; }
.center-lead { margin: 0 auto; }
.prem { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 26px; align-items: start; }
.prem-list h2 { font-size: 1.3rem; }
.ticks { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.ticks li { padding-left: 30px; position: relative; }
.ticks li::before { content: ''; position: absolute; left: 2px; top: .35em; width: 16px; height: 9px; border-left: 2.5px solid var(--ok); border-bottom: 2.5px solid var(--ok); transform: rotate(-45deg); }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.plan { background: var(--card); color: var(--card-ink); border: 1px solid var(--card-line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 6px; }
.plan[data-plan='sub'] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.plan h2 { font-size: 1.35rem; margin: 0; }
.plan p { margin: 0; color: var(--card-muted); }
.plan .price { font: 600 1.9rem 'Playfair Display', 'Playfair Fallback', Georgia, serif; color: var(--accent); margin: 2px 0 6px; }
.plan .btn { margin-top: auto; }
.plan p:nth-last-of-type(1) { margin-bottom: 16px; flex: 1; }
.plan-tag { align-self: flex-start; font: 700 .66rem system-ui, sans-serif !important; letter-spacing: .14em; text-transform: uppercase; padding: 4px 10px; border-radius: 99px; background: var(--accent); color: var(--accent-ink) !important; flex: none !important; margin-bottom: 6px !important; }
.plan-tag.ghost { background: transparent; color: var(--card-muted) !important; border: 1px solid var(--card-line); }
.prem-foot { grid-column: 1 / -1; max-width: 640px; margin: 4px auto 0; }
/* one column: the prices and buttons come first, the list of what you get after them */
@media (max-width: 900px) { .prem { grid-template-columns: minmax(0, 1fr); } .prem .plans { order: -1; } }
@media (max-width: 520px) { .plans { grid-template-columns: minmax(0, 1fr); } }

/* ---- lootjes trekken ----------------------------------------------------------------------- */
.draw { display: grid; gap: 22px; max-width: 900px; margin: 0 auto; }
.draw-form h2, .draw-pool h2 { font-size: 1.4rem; }
.draw-form h3 { font-size: 1.1rem; margin: 18px 0 10px; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.dm { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; counter-reset: dm; }
.dm-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) minmax(0, 1.2fr) 36px; gap: 8px; align-items: center; counter-increment: dm; }
.dm-row::before { content: counter(dm); font: 600 .8rem system-ui, sans-serif; color: var(--sheet-muted); text-align: right; }
.dm-row select { display: none; padding: 8px 6px; }
.with-houses .dm-row { grid-template-columns: 26px minmax(0, 1fr) minmax(0, 1.2fr) 62px 36px; }
.with-houses .dm-row select { display: block; }
.dm-row .x { border: 0; background: none; cursor: pointer; width: 36px; height: 36px; border-radius: 8px; color: var(--bad); font-size: 1.2rem; }
.dm-row .x:hover { background: color-mix(in srgb, var(--bad) 12%, transparent); }
.check.plus > span::after { content: '★'; margin-left: 6px; font-size: .75em; color: var(--accent); }
.draw-stage { position: relative; height: 320px; display: grid; place-items: end center; overflow: hidden; }
.art-sack { width: 200px; height: auto; position: relative; z-index: 2; margin-bottom: 34px; }
.art .a-sack-fold { fill: color-mix(in srgb, var(--art-sack) 78%, #000); }
.draw-stage.shake .art-sack { animation: shake .7s ease-in-out; }
@keyframes shake { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-7deg) translateY(-4px); } 40% { transform: rotate(6deg); } 60% { transform: rotate(-5deg) translateY(-3px); } 80% { transform: rotate(4deg); } }
.slips { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.slip { position: absolute; left: 50%; top: -40px; padding: 4px 12px; background: #fff8e6; color: #33200f; border: 1px solid #d9c38a; border-radius: 3px; font-size: .95rem; white-space: nowrap; box-shadow: 0 3px 8px rgba(0, 0, 0, .25);
  transform: translate(calc(-50% + var(--x, 0%)), 0) rotate(var(--r, 0deg)); opacity: 0; animation: slip 1.5s cubic-bezier(.45, 0, .7, 1) forwards; }
@keyframes slip { 0% { opacity: 0; top: -40px; } 12% { opacity: 1; } 70% { opacity: 1; transform: translate(calc(-50% + var(--x, 0%) * .25), 0) rotate(calc(var(--r, 0deg) * .4)) scale(.9); } 100% { opacity: 0; top: 150px; transform: translate(-50%, 0) rotate(0) scale(.35); } }
.draw-stage-text { position: absolute; left: 0; right: 0; bottom: 4px; margin: 0; text-align: center; font: 600 1.2rem 'Playfair Display', 'Playfair Fallback', Georgia, serif; color: var(--accent); z-index: 4; }
.dl { list-style: none; margin: 0 0 14px; padding: 0; }
.dl li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--sheet-line); }
.dl-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-state { font: 600 .68rem system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--sheet-muted); justify-self: end; }
.dl-state.ok { color: var(--ok); }
.dl-acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.draw-mine h2 { font-size: 1.3rem; color: var(--accent); }
.poem-list.on-bg li { border-bottom-color: var(--card-line); }
.ticket { display: grid; gap: 22px; max-width: 640px; margin: 0 auto; }
.tk-card { text-align: center; padding: clamp(24px, 5vw, 48px) clamp(18px, 4vw, 40px); }
.tk-card .eyebrow { color: #a8322a; min-height: 1.4em; }
.tk-card h1 { font-size: clamp(1.7rem, 5vw, 2.4rem); min-height: 1.3em; }
.reel { margin: 18px auto 14px; max-width: 420px; padding: 8px; border-radius: 16px; background: linear-gradient(180deg, #e6c878, #b8923e); box-shadow: 0 10px 26px rgba(0, 0, 0, .28), inset 0 0 0 1px rgba(255, 255, 255, .4); }
.reel-win { height: 84px; overflow: hidden; border-radius: 10px; background: #fffaf0; position: relative; box-shadow: inset 0 10px 14px -10px rgba(0, 0, 0, .45), inset 0 -10px 14px -10px rgba(0, 0, 0, .45); }
.reel-list { list-style: none; margin: 0; padding: 0; will-change: transform; }
.reel-list li { height: 84px; display: grid; place-items: center; padding: 0 12px; font: 600 clamp(1.5rem, 6vw, 2.2rem)/1.1 'Playfair Display', 'Playfair Fallback', Georgia, serif; color: #33200f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reel.rolling .reel-list { filter: blur(1.6px); }
.reel.landed { animation: land .9s ease-out; }
.reel.landed .reel-list li:last-child { color: #a8322a; }
@keyframes land { 0% { transform: scale(1); } 35% { transform: scale(1.06); box-shadow: 0 0 0 10px rgba(230, 200, 120, .35), 0 10px 26px rgba(0, 0, 0, .28); } 100% { transform: scale(1); } }
.tk-result { min-height: 1.7em; font-size: 1.15rem; margin: 0 0 6px; }
.tk-actions { justify-content: center; min-height: 54px; margin: 14px 0 0; }
.tk-meta { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 16px; margin: 22px auto 0; max-width: 420px; text-align: left; }
.tk-meta dt { font: 600 .7rem system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; opacity: .65; padding-top: 5px; }
.tk-meta dd { margin: 0; }
.tk-wish { margin: 20px auto 0; max-width: 460px; text-align: left; padding: 14px 18px; border: 1px dashed rgba(120, 80, 20, .45); border-radius: 10px; white-space: pre-line; }
.tk-wish h2 { font-size: 1.05rem; margin-bottom: 4px; }
.tk-mine h2 { font-size: 1.2rem; }
@media (max-width: 620px) {
  .two { grid-template-columns: minmax(0, 1fr); }
  .dm-row, .with-houses .dm-row { grid-template-columns: 22px minmax(0, 1fr) 36px; }
  .dm-row [data-e] { grid-column: 2 / 3; }
  .with-houses .dm-row select { grid-column: 2 / 3; }
  .dm-row .x { grid-row: 1; grid-column: 3; }
}

/* ---- songs --------------------------------------------------------------------------------- */
.songs-group { margin: 34px 0 0; }
.songs-group > h2 { font-size: 1.5rem; color: var(--accent); margin-bottom: 14px; }
.songs { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; align-items: start; }
.song { background: var(--card); color: var(--card-ink); border: 1px solid var(--card-line); border-radius: var(--radius); padding: 18px 20px; min-width: 0; }
.song h3 { font-size: 1.15rem; margin-bottom: 4px; }
.song p { margin: 0 0 8px; color: var(--card-muted); }
.song-first { font-style: italic; color: var(--card-ink) !important; }
.song-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.song-meta span { font: 600 .68rem system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase; padding: 3px 9px; border: 1px solid var(--card-line); border-radius: 99px; }
.song summary { cursor: pointer; color: var(--accent); margin-bottom: 6px; }
.song .vers { font-size: 1rem; margin: 6px 0 10px; }
.song-listen { color: var(--accent); }
.tip { padding: 8px 12px; border-left: 3px solid var(--accent); background: rgba(0, 0, 0, .04); border-radius: 0 8px 8px 0; margin: 0 0 8px; font-size: .97rem; }
.adm h3 { font: 600 .74rem system-ui, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: var(--sheet-muted); margin: 16px 0 6px; }

/* ---- rhyme dictionary ---------------------------------------------------------------------- */
.rg h3 { font: 600 .72rem system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--sheet-muted); margin: 18px 0 8px; }
.words { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 7px; }
.words a { display: inline-block; padding: 3px 13px; border: 1px solid var(--sheet-line); border-radius: 999px; text-decoration: none; }
.words a:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.near-h { margin-top: 1.6em; font-size: 1.2rem; }
.rh-result { min-height: 240px; }

/* ---- ads: space is reserved so nothing jumps when one loads -------------------------------- */
.ad { margin: 34px 0 0; min-height: 300px; padding-top: 20px; position: relative; border-top: 1px solid var(--sheet-line); }
.ad-tag { position: absolute; top: 2px; left: 0; font: 600 .62rem system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase; opacity: .55; }
.ad ins { display: block; }

/* ---- account ------------------------------------------------------------------------------- */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin: 0 0 22px; border-radius: 999px; border: 1px solid var(--sheet-line); width: fit-content; max-width: 100%; }
.tabs button { border: 0; background: transparent; min-height: 38px; padding: 0 16px; border-radius: 999px; cursor: pointer; }
.tabs button[aria-selected='true'] { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.tab-stack { display: grid; }
.tab-pane { grid-area: 1 / 1; visibility: hidden; opacity: 0; transition: opacity .18s; }
.tab-pane.on { visibility: visible; opacity: 1; }
.acc h2 { font-size: 1.25rem; margin-top: 1.6em; }
.av-pick { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.av-big { width: 96px; height: 96px; border-radius: 22px; flex: none; box-shadow: 0 6px 16px rgba(0, 0, 0, .2); }
.av-opts { display: grid; gap: 10px; min-width: 0; flex: 1; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { position: relative; width: 30px; height: 30px; cursor: pointer; }
.swatch span:first-of-type { position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55); }
.swatch input:checked + span { box-shadow: 0 0 0 2px var(--sheet), 0 0 0 4px var(--sheet-ink); }
.code-box { margin: 0 0 22px; padding: 18px 20px; border: 2px dashed var(--accent); border-radius: 12px; background: color-mix(in srgb, var(--accent) 12%, transparent); }
.code-box h2 { margin-top: 0; }
.code { font: 700 1.25rem ui-monospace, Consolas, monospace; letter-spacing: .06em; user-select: all; }
.poem-list { list-style: none; margin: 0; padding: 0; }
.poem-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--sheet-line); }
.poem-list a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.poem-list .x { border: 0; background: none; cursor: pointer; min-width: 34px; min-height: 34px; border-radius: 8px; color: var(--bad); font-size: 1.1rem; }
.poem-list .x:hover { background: color-mix(in srgb, var(--bad) 12%, transparent); }
.acc-end { display: grid; gap: 16px; justify-items: start; }
.acc-end details { width: 100%; }
.acc-end summary { cursor: pointer; color: var(--sheet-muted); }

/* ---- admin and diagnostics ----------------------------------------------------------------- */
.adm { max-width: 1100px; }
.adm h2 { font-size: 1.2rem; margin: 1.8em 0 .7em; padding-bottom: 6px; border-bottom: 1px solid var(--sheet-line); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile { padding: 12px 14px; border: 1px solid var(--sheet-line); border-radius: 10px; min-width: 0; }
.tile b { display: block; font: 600 1.5rem 'Playfair Display', 'Playfair Fallback', Georgia, serif; font-variant-numeric: tabular-nums; }
.tile span { font: 600 .68rem system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--sheet-muted); }
.tile.warn b { color: var(--bad); } .tile.good b { color: var(--ok); }
.bar { height: 10px; border-radius: 99px; background: rgba(0, 0, 0, .1); overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .4s; }
.adm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 28px; }
.rows { list-style: none; margin: 0; padding: 0; font-size: .95rem; }
.rows li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 5px 0; border-bottom: 1px dotted var(--sheet-line); }
.rows li span:last-child { font-variant-numeric: tabular-nums; text-align: right; }
.adm-link { display: inline-block; margin-top: 4px; font-size: .9rem; color: var(--accent-ink); background: var(--accent); padding: 2px 10px; border-radius: 99px; text-decoration: none; }
.todo-item { border: 1px solid var(--sheet-line); border-radius: 10px; padding: 10px 14px; margin: 0 0 8px; }
.todo-item summary { cursor: pointer; font-weight: 600; }
.todo-item.done { opacity: .55; }
.todo-item ol { margin: 10px 0 12px; padding-left: 1.3em; }
.todo-item li { margin-bottom: 4px; }
.adm-save { position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(transparent, var(--sheet) 35%); display: flex; gap: 12px; align-items: center; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; }

/* ---- small screens ------------------------------------------------------------------------- */
/* The header never depends on how its text happens to wrap: every width range has fixed row heights. */
@media (max-width: 1180px) {
  .me { width: 38px; padding: 4px; justify-content: center; }
  .me-nm { display: none; }
}
@media (max-width: 940px) {
  .top { height: 101px; }
  .top-in { height: 100px; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 56px 44px; gap: 0 12px; align-items: center; }
  .logo { grid-area: 1 / 1; }
  .top-end { grid-area: 1 / 2; }
  .nav { grid-area: 2 / 1 / 3 / -1; gap: 4px; height: 44px; }
  .nav-links { height: 36px; gap: 0; justify-content: space-between; }
  .nav a { padding: 6px 6px; font-size: .97rem; }
  .nav a.prem-pill { padding: 5px 12px 5px 9px; }
  .at-tabs { top: 109px; }
}
@media (max-width: 340px) { .nav a { padding: 6px 2px !important; font-size: .86rem !important; } .nav a.prem-pill { padding: 5px 9px !important; } .pill-star { display: none; } }
@media (max-width: 380px) { .nav a { padding: 6px 4px; font-size: .9rem; } .nav a.prem-pill { padding: 5px 10px 5px 7px; } .pill-star { width: 13px; height: 13px; } .logo .word { font-size: 1.25rem; } }
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .hero-art { max-width: 520px; margin: 0 auto; width: 100%; }
  .hero-sheet { font-size: clamp(.8rem, 3.5vw, 1rem); width: min(96%, 410px); padding: 16px 16px 12px; }
}
@media (max-width: 760px) {
  body { font-size: 18px; }
  main { padding-top: 22px; }
  .ln { grid-template-columns: 26px minmax(0, 1fr) 24px; }
  .lt { font-size: 1.1rem; }
}

/* phones: a verse line of forty characters should fit on the sheet */
@media (max-width: 520px) {
  .editor { padding-left: 8px; padding-right: 8px; }
  .ln { grid-template-columns: 26px minmax(0, 1fr) 20px; }
  .lt { font-size: 1.02rem; padding: 0 4px !important; }
}
