/* AI Advent Calendar 2026: paper-cut winter night. Only transform and opacity animate. */

@font-face { font-family: 'Fraunces'; src: url(fonts/fraunces-latin-wght-normal.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Atkinson Hyperlegible'; src: url(fonts/atkinson-hyperlegible-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Atkinson Hyperlegible'; src: url(fonts/atkinson-hyperlegible-latin-700-normal.woff2) format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --night: #0f1a2e; --night-2: #17284a; --dusk: #24406b;
  --snow: #f4efe4; --frost: #c9d6e8; --paper: #f4efe4; --ink: #1b2233;
  --lantern: #f6b54a; --lantern-soft: #f6b54a33;
  --cranberry: #c8384a; --cranberry-deep: #9e2536; --pine: #2f6b4f;
  --wood: #7a4a2a; --wood-light: #a8693d; --wood-dark: #4f2e19;
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --body: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 14px;
  --shadow-paper: 0 1px 0 #0003, 0 8px 24px #0006;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
body {
  margin: 0; background: var(--night); color: var(--snow);
  font: 400 1.0625rem/1.6 var(--body); overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--lantern); text-underline-offset: 3px; }
a:hover { color: #ffd38a; }
h1, h2, h3 { font-family: var(--display); font-weight: 650; line-height: 1.12; margin: 0 0 .5em; font-variation-settings: 'SOFT' 100, 'WONK' 0; }
h2 { font-size: clamp(1.9rem, 5vw, 3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
code { font-family: ui-monospace, 'Cascadia Code', Menlo, Consolas, monospace; font-size: .92em; background: #ffffff14; padding: .08em .35em; border-radius: 5px; }
:focus-visible { outline: 3px solid var(--lantern); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(100% - 32px, 1120px); margin-inline: auto; }
.kicker { font: 700 .8rem/1.2 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--lantern); margin-bottom: .75rem; }
.lede { font-size: 1.15rem; color: var(--frost); max-width: 38rem; }
.small { font-size: .9rem; color: var(--frost); }
.i { width: 1.1em; height: 1.1em; fill: currentColor; flex: none; }

.skip { position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--lantern); color: var(--night); padding: .6rem 1rem; border-radius: 8px; font-weight: 700; }
.skip:focus { top: 12px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 48px; padding: .7rem 1.25rem;
  background: var(--lantern); color: var(--night); font: 700 1rem/1.2 var(--body); text-decoration: none;
  border: 2px solid var(--lantern); border-radius: 999px; cursor: pointer; margin: 0 .5rem .5rem 0;
  transition: transform .2s var(--ease-out), background-color .2s;
}
.btn:hover { background: #ffc96b; color: var(--night); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--snow); border-color: #f4efe466; }
.btn-ghost:hover { background: #f4efe414; color: var(--snow); }

/* "XDEV Software presents": a paper tag pinned to the top left corner. */
.presenter {
  position: fixed; top: 14px; left: 14px; z-index: 40; display: flex; flex-direction: column; align-items: flex-start; gap: .45rem;
  padding: .85rem 1.1rem .65rem; background: var(--paper); color: var(--ink); text-decoration: none;
  border-radius: 4px 12px 4px 12px; box-shadow: var(--shadow-paper); transform: rotate(-2deg);
  transition: transform .25s var(--ease-out);
}
.presenter::before { content: ''; position: absolute; top: -4px; left: -12px; width: 44px; height: 14px; background: #f6b54acc; transform: rotate(-38deg); border-radius: 2px; }
.presenter img { width: 180px; height: auto; }
.presenter span { font: italic 500 1.2rem/1 var(--display); letter-spacing: .02em; color: var(--ink); align-self: flex-end; }
.presenter:hover { color: var(--ink); transform: rotate(0deg) translateY(2px); }
@media (max-width: 640px) { .presenter { top: 10px; left: 10px; padding: .5rem .7rem .45rem; gap: .25rem; } .presenter img { width: 96px; } .presenter span { font-size: .8rem; } .presenter::before { width: 30px; height: 10px; left: -9px; } }
.toolbar { position: fixed; top: 12px; right: 12px; z-index: 40; display: flex; gap: 8px; }
.tool {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: .5rem .85rem;
  background: #0f1a2ecc; color: var(--snow); border: 1px solid #f4efe433; border-radius: 999px;
  font: 400 .9rem/1 var(--body); cursor: pointer; backdrop-filter: blur(6px);
}
.tool[aria-pressed="true"] b { color: var(--lantern); }
.tool:hover { border-color: var(--lantern); }
@media (max-width: 420px) { .tool span { font-size: .8rem; } .tool { padding: .5rem .65rem; } }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100svh; display: grid; align-items: center; overflow: hidden; isolation: isolate; }
.layers { position: absolute; inset: 0; z-index: -1; }
.layer { position: absolute; inset: 0; will-change: transform; }
.layer .art { position: absolute; bottom: 0; height: auto; }
.layer-sky .art { inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 100%; }
/* The village and the workshop keep their own proportions and stand on the bottom edge. */
.layer-village .art { left: 50%; width: max(100%, 820px); margin-left: calc(max(100%, 820px) / -2); bottom: 2%; }
.layer-workshop .art { right: -8%; width: clamp(440px, 64vw, 1050px); bottom: -3%; }
@media (min-width: 900px) {
  .layer-village .art { bottom: -9vw; }
  .layer-workshop .art { width: clamp(440px, 46vw, 820px); right: -4%; bottom: -5%; }
}
/* A soft night wash behind the title keeps the text readable over any art. */
.layers::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 60% 55% at 22% 40%, #0f1a2ed9, #0f1a2e00 70%); }
.layer .ph { inset: 0; width: 100%; height: 100%; margin: 0; }
.snow { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero::after { content: ''; position: absolute; inset: auto 0 0 0; height: 18%; background: linear-gradient(transparent, var(--night)); z-index: -1; }
.hero { align-items: start; }
.hero-copy { padding: max(12vh, 72px) 0 min(52vw, 38svh); }
@media (min-width: 900px) { .hero-copy { padding: 16vh 0 30vh; } }
.hero-copy > * { max-width: 34rem; }
.hero h1 { font-size: clamp(2.6rem, 9vw, 5.4rem); text-shadow: 0 2px 20px #0f1a2e; }
.hero h1 span { display: block; color: var(--lantern); font-style: italic; font-weight: 500; }
.hero .lede { color: var(--snow); text-shadow: 0 1px 12px #0f1a2e; }
.hero .btn-ghost { background: #0f1a2ecc; backdrop-filter: blur(4px); }
.countdown { display: inline-flex; flex-wrap: wrap; gap: .25rem .6rem; align-items: baseline; padding: .55rem 1rem; border-radius: 12px; background: #0f1a2ecc; border: 1px solid #f6b54a55; }
.countdown .cd-time { font: 650 1.25rem/1 var(--display); color: var(--lantern); font-variant-numeric: tabular-nums; }
.countdown.done { color: var(--lantern); }
.scroll-cue { position: absolute; left: 50%; bottom: 22px; width: 26px; height: 42px; margin-left: -13px; border: 2px solid #f4efe499; border-radius: 14px; }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--snow); animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }

/* easter egg: the lost Weihnachtsmann */
.egg-santa { position: absolute; left: 3%; bottom: 7%; width: clamp(56px, 9vw, 96px); padding: 0; background: none; border: 0; cursor: pointer; opacity: .9; transform-origin: 50% 100%; }
.egg-santa:hover { transform: rotate(-4deg); }
.egg-santa .art { width: 100%; height: auto; }
.egg-bubble { position: absolute; left: 3%; bottom: calc(7% + clamp(60px, 10vw, 104px)); max-width: 15rem; background: var(--paper); color: var(--ink); padding: .7rem .9rem; border-radius: 12px; font-size: .95rem; box-shadow: var(--shadow-paper); }

/* ---------- the chime ---------- */
.chime { position: relative; padding: 12vh 0; }
.chime-pin { display: grid; gap: 2rem; align-items: center; }
.chime-art { position: relative; width: min(70vw, 420px); margin-inline: auto; }
.chime-art .art { width: 100%; height: auto; filter: drop-shadow(0 20px 40px #0008); }
.beat { font-size: clamp(1.15rem, 2.4vw, 1.45rem); line-height: 1.5; max-width: 32rem; }
@media (min-width: 800px) { .chime-pin { grid-template-columns: 1fr 1.1fr; min-height: 80vh; } }

/* ---------- cast ---------- */
.cast { padding: 10vh 0; }
.cast-list { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .cast-list { grid-template-columns: repeat(4, 1fr); } }
.cast-card { position: relative; background: var(--night-2); border-radius: var(--radius); padding: 1rem 1rem 1.25rem; box-shadow: var(--shadow-paper); }
.cast-card .art { width: 100%; height: auto; margin-bottom: .75rem; }
.cast-card p { color: var(--frost); font-size: .98rem; margin: 0; }
.wichtel-says { position: absolute; top: 10px; right: 10px; background: var(--paper); color: var(--ink) !important; font: 700 .9rem/1 var(--display) !important; padding: .4rem .6rem; border-radius: 10px 10px 2px 10px; }

/* ---------- the wall ---------- */
.wall-section { padding: 10vh 0 12vh; background: linear-gradient(var(--night), #1a1410 30%, #1a1410 70%, var(--night)); }
.wall-section .countdown { margin-bottom: 2rem; }
.wall {
  --wall: var(--wood); padding: clamp(12px, 3vw, 28px); border-radius: 18px; max-width: 560px; margin-inline: auto;
  background:
    repeating-linear-gradient(90deg, #ffffff07 0 2px, transparent 2px 74px),
    linear-gradient(160deg, var(--wood-light), var(--wood) 40%, var(--wood-dark));
  box-shadow: inset 0 0 0 6px #0002, inset 0 0 40px #0006, 0 24px 60px #0009;
}
/* 24 doors always fill the grid exactly: 3 columns x 8 rows, 6 x 4, 8 x 3. No holes, no oversized cell. */
@media (min-width: 640px) { .wall { max-width: 760px; } }
@media (min-width: 1000px) { .wall { max-width: none; } }
.doors { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(8px, 1.6vw, 16px); grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 640px) { .doors { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .doors { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
.door { position: relative; width: 100%; aspect-ratio: 3 / 4.2; perspective: 900px; min-width: 0; }
.door-24 .door-leaf::before { border-color: var(--lantern); border-style: solid; }
.door-24.is-locked .door-face { box-shadow: inset 0 0 0 2px var(--lantern), 0 3px 8px #0006; }

.door-face {
  height: 100%; display: flex; flex-direction: column; padding: 8px 8px 7px; border-radius: 10px;
  background: linear-gradient(170deg, #e9e1d0, #cfd8e6); color: var(--ink);
  box-shadow: inset 0 0 0 2px #ffffff80, 0 3px 8px #0006;
}
.door-num { font: 700 1.6rem/1 var(--display); }
.is-locked .door-num { color: #4a5568; }
.door-teaser { font-size: .78rem; line-height: 1.3; margin: .3rem 0 auto; color: #2a3346; }
.door-date { display: inline-flex; gap: .25rem; align-items: center; font-size: .75rem; font-weight: 700; color: #3b475c; }

.door-btn { position: relative; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 10px; color: inherit; font: inherit; }
/* Behind each open door: its own picture, dim and warm at rest, brighter when the door opens wider. */
.door-light { position: absolute; inset: 0; overflow: hidden; border-radius: 10px; background: radial-gradient(circle at 50% 45%, #fff3c4, var(--lantern) 45%, #b4722a); box-shadow: inset 0 0 18px #7a3f0c, 0 0 14px 1px #f6b54a59; transition: box-shadow .5s var(--ease-out); }
.door-btn:hover .door-light, .door-btn:focus-visible .door-light { box-shadow: inset 0 0 18px #7a3f0c, 0 0 24px 4px #f6b54a99; }
.door-peek { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 62% 50%; filter: brightness(.6) saturate(.9); transition: filter .5s var(--ease-out), transform .6s var(--ease-out); transform: scale(1.04); }
.door-light::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 85% 50%, #f6b54a55, transparent 65%), linear-gradient(90deg, #0f1a2e66, transparent 60%); pointer-events: none; }
.door-btn:hover .door-peek, .door-btn:focus-visible .door-peek { filter: brightness(1) saturate(1.05); transform: scale(1); }
.door-leaf {
  position: absolute; inset: 0; border-radius: 10px; transform-origin: 0 50%; display: flex; flex-direction: column; justify-content: space-between; padding: 8px;
  background: linear-gradient(170deg, var(--cranberry), var(--cranberry-deep)); color: var(--snow);
  box-shadow: inset 0 0 0 2px #ffffff40, inset 0 0 0 6px #0000, 0 3px 10px #0007;
  transition: transform .65s var(--ease-out);
  backface-visibility: hidden;
}
.week-2 .door-leaf { background: linear-gradient(170deg, #3b7d5d, var(--pine)); }
.week-3 .door-leaf { background: linear-gradient(170deg, #34558a, var(--dusk)); }
.week-4 .door-leaf { background: linear-gradient(170deg, #b98a3a, #8a5e1f); }
.door-24 .door-leaf { background: linear-gradient(170deg, var(--cranberry), #6e1624); }
.door-leaf::before { content: ''; position: absolute; inset: 7px; border: 1.5px dashed #f4efe455; border-radius: 6px; }
.door-knob { align-self: flex-end; width: 10px; height: 10px; border-radius: 50%; background: var(--lantern); box-shadow: 0 0 8px var(--lantern); margin-top: auto; }
/* An available door always looks the same: ajar, with the lantern light inside. Nothing is remembered. */
.door.is-open .door-leaf { transform: rotateY(-32deg); }
.door-btn:hover .door-leaf, .door-btn:focus-visible .door-leaf { transform: rotateY(-66deg); }
.door.is-swinging .door-leaf { transform: rotateY(-104deg); }

/* Ornaments: a paper-cut motif on every open door, and a sheen that
   sweeps across the leaf when the door opens wider. */
.door-orn { align-self: center; width: 60%; height: auto; color: var(--snow); fill: currentColor; opacity: .88; filter: drop-shadow(0 1.5px 0 #0004); }
.door-leaf .door-num { position: relative; z-index: 1; }
.door-sheen {
  position: absolute; inset: 0; border-radius: 10px; overflow: hidden; pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, #ffffff3a 48%, #ffffff12 54%, transparent 62%) 130% 0 / 260% 100% no-repeat;
  transition: background-position .9s var(--ease-out);
}
.door-btn:hover .door-sheen, .door-btn:focus-visible .door-sheen { background-position: -30% 0; }

/* ---------- week chapters ---------- */
.chapter { position: relative; padding: 12vh 0; overflow: hidden; }
.chapter-sky { position: absolute; inset: 0; z-index: -1; opacity: .9; }
.week-1 .chapter-sky { background: linear-gradient(var(--night), #142445 50%, var(--night)); }
.week-2 .chapter-sky { background: linear-gradient(var(--night), #12302a 50%, var(--night)); }
.week-3 .chapter-sky { background: linear-gradient(var(--night), #1d1d3f 50%, var(--night)); }
.week-4 .chapter-sky { background: linear-gradient(var(--night), #2c1e18 50%, var(--night)); }
.chapter-art { margin: 1rem auto 2rem; max-width: 900px; }
.chapter-art .art { width: 100%; height: auto; }
.notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .notes { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .notes { grid-template-columns: repeat(3, 1fr); } }
.note { position: relative; }
.note-btn, .note.is-locked {
  display: flex; flex-direction: column; gap: .35rem; width: 100%; height: 100%; text-align: left;
  padding: 1rem 1.1rem 1.1rem; border-radius: 6px 14px 10px 4px; font: inherit;
}
.note-btn { background: var(--paper); color: var(--ink); border: 0; cursor: pointer; box-shadow: var(--shadow-paper); transition: transform .25s var(--ease-out); }
.note:nth-child(odd) .note-btn { transform: rotate(-.6deg); }
.note:nth-child(even) .note-btn { transform: rotate(.5deg); }
.note-btn:hover { transform: translateY(-3px) rotate(0); }
.note.is-locked { background: #ffffff0a; border: 1.5px dashed #c9d6e855; color: var(--frost); }
.note-num { font: 700 1.4rem/1 var(--display); color: var(--cranberry); }
.is-locked .note-num { color: var(--frost); }
.note-title { font: 650 1.15rem/1.2 var(--display); }
.note-text { font-size: .98rem; }
.note-btn code { background: #1b223314; }
.note-more { margin-top: auto; padding-top: .4rem; font-weight: 700; font-size: .9rem; color: var(--cranberry-deep); }
.is-locked .note-more { color: var(--lantern); }

/* ---------- finale + footer ---------- */
.finale { padding: 14vh 0; text-align: center; }
.finale .lede { margin-inline: auto; }
.finale-art { width: min(60vw, 320px); margin: 0 auto 1.5rem; transform-origin: 50% 5%; }
.finale-art .art { width: 100%; height: auto; }
.footer { background: #0b1322; padding: 4rem 0 3rem; border-top: 1px solid #ffffff14; }
.footer h2 { font-size: 1.35rem; }
.footer p { color: var(--frost); max-width: 36rem; }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
/* The same legal links as the rest of rabauer.dev */
.legal { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem 1.5rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid #ffffff14; font-size: .9rem; }
.legal a { color: var(--frost); text-decoration: none; padding: .6rem 0; }
.legal a:hover { color: var(--lantern); text-decoration: underline; }

/* ---------- door dialog ---------- */
/* The dialog never scrolls itself: only the paper does, so the close button stays put and the
   scroll position is reset for each door. The page behind is locked while it is open. */
.door-dialog { padding: 0; border: 0; background: transparent; color: var(--ink); width: min(100% - 24px, 760px); max-height: none; overflow: visible; margin: auto; }
.door-dialog::backdrop { background: #070d18cc; backdrop-filter: blur(3px); }
html:has(.door-dialog[open]) { overflow: hidden; }
.dlg-paper {
  position: relative; background: var(--paper); border-radius: 18px; padding: 1.6rem 1.25rem 1.4rem; box-shadow: 0 30px 80px #000a;
  max-height: calc(100svh - 24px); overflow-y: auto; overscroll-behavior: contain; scroll-behavior: auto; outline: none;
}
/* A soft fade at the bottom edge tells you there is more to scroll; it disappears with the content's end. */
/* The shadows are part of the paper's own background (nothing is drawn over the content), so
   buttons and text can never look washed out. They show only while there is more to scroll. */
.dlg-paper {
  background:
    linear-gradient(var(--paper) 30%, #f4efe400) 0 0 / 100% 40px local no-repeat,
    linear-gradient(#f4efe400, var(--paper) 70%) 0 100% / 100% 40px local no-repeat,
    radial-gradient(farthest-side at 50% 0, #0000002e, #00000000) 0 0 / 100% 10px scroll no-repeat,
    radial-gradient(farthest-side at 50% 100%, #0000002e, #00000000) 0 100% / 100% 10px scroll no-repeat,
    var(--paper);
}
@media (min-width: 600px) { .dlg-paper { padding: 2.2rem 2.2rem 1.8rem; } }
.door-dialog[open] .dlg-paper { animation: dlg-in .4s var(--ease-out); }
@keyframes dlg-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.dlg-art { display: block; width: calc(100% + 2.5rem); max-width: none; height: auto; margin: -1.6rem -1.25rem 1.2rem; border-radius: 18px 18px 0 0; aspect-ratio: 16 / 9; object-fit: cover; background: var(--night-2); }
@media (min-width: 600px) { .dlg-art { width: calc(100% + 4.4rem); margin: -2.2rem -2.2rem 1.4rem; } }
.dlg-close { position: absolute; top: 10px; right: 10px; z-index: 2; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #f4efe4e6; color: var(--ink); font-size: 1.6rem; line-height: 1; cursor: pointer; box-shadow: 0 1px 6px #0004; }
.dlg-close:hover { background: #fff; }
.dlg-kicker { font-size: .85rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--cranberry-deep); margin-right: 3rem; }
.dlg-title { font-size: clamp(1.7rem, 5vw, 2.3rem); color: var(--ink); }
.door-dialog h3 { font-size: 1.05rem; margin-top: 1.4rem; color: var(--ink); }
.door-dialog a:not(.btn) { color: var(--cranberry-deep); }
.badges { display: flex; flex-wrap: wrap; gap: .4rem; }
.badge { font-size: .8rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; background: #1b22330f; }
.badge-nikolaus { background: #c8384a1f; color: var(--cranberry-deep); }
.badge-ruprecht { background: #7a4a2a22; color: #5a3318; }
.badge-gremlin { background: #24406b1f; color: var(--dusk); }
.ticket { position: relative; background: #fffaf0; border-left: 4px solid var(--lantern); padding: 1rem 1.1rem .8rem; border-radius: 4px 12px 12px 4px; box-shadow: 0 2px 8px #0000001a; font-size: 1.05rem; }
.ticket p { margin-bottom: .4rem; }
.ticket-sign { display: block; text-align: right; font: italic 500 .9rem/1.2 var(--display); color: #6b5a40; }
.habit { font: 600 1.15rem/1.35 var(--display); }
.cmd { display: flex; align-items: stretch; gap: .5rem; margin-bottom: .5rem; }
.cmd code { flex: 1; display: block; overflow-x: auto; white-space: nowrap; background: var(--night); color: var(--snow); padding: .7rem .8rem; border-radius: 10px; font-size: .88rem; }
.copy { flex: none; min-width: 72px; min-height: 44px; border: 2px solid var(--ink); background: transparent; color: var(--ink); border-radius: 10px; font: 700 .9rem/1 var(--body); cursor: pointer; }
.copy:hover { background: var(--ink); color: var(--paper); }
.copy.copied { background: var(--pine); border-color: var(--pine); color: #fff; }
/* The door's README inside the dialog */
.readme { margin-top: 1.2rem; }
.readme > p:first-child strong { font-size: .9rem; color: #5b6478; letter-spacing: .02em; }
.readme h3 { font-size: 1.25rem; margin-top: 1.8rem; }
.readme h4 { font-size: 1.05rem; margin-top: 1.3rem; }
.readme code { background: #1b22330f; overflow-wrap: anywhere; }
.readme ul, .readme ol { padding-left: 1.3rem; }
.readme li { margin-bottom: .35rem; }
.readme blockquote { margin: 0 0 1em; padding: .7rem 1rem; background: #fffaf0; border-left: 4px solid var(--lantern); border-radius: 4px 10px 10px 4px; }
.readme blockquote p:last-child { margin: 0; }
.code-block { position: relative; margin: 0 0 1em; }
.code-block pre { margin: 0; background: var(--night); color: var(--snow); padding: .8rem 5.6rem .8rem .9rem; border-radius: 10px; overflow-x: auto; font-size: .86rem; line-height: 1.5; }
.code-block pre code { background: none; padding: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.code-block .copy { position: absolute; top: 6px; right: 6px; min-height: 36px; min-width: 64px; border-color: #f4efe466; color: var(--snow); }
.code-block .copy:hover { background: var(--snow); color: var(--ink); }
.readme details { margin: 0 0 .6rem; border: 1px solid #1b223326; border-radius: 10px; background: #fffaf0; }
.readme summary { cursor: pointer; padding: .7rem .9rem; min-height: 44px; }
.readme details[open] summary { border-bottom: 1px solid #1b22331a; }
.readme details > :not(summary) { margin-inline: .9rem; }
.readme details > :nth-child(2) { margin-top: .8rem; }
.table-wrap { overflow-x: auto; margin: 0 0 1em; }
.readme table { border-collapse: collapse; font-size: .92rem; min-width: 100%; }
.readme th, .readme td { text-align: left; vertical-align: top; padding: .45rem .6rem; border-bottom: 1px solid #1b223322; }
.dlg-links { margin: 1.4rem 0 0; }
.door-dialog .btn-ghost { color: var(--ink); border-color: #1b223355; }
.door-dialog .btn-ghost:hover { background: #1b22330f; }
.door-dialog .btn { background: var(--cranberry-deep); border-color: var(--cranberry-deep); color: #fff; }
.door-dialog .btn.btn-ghost { background: transparent; color: var(--ink); border-color: #1b223355; }

/* easter egg: the Wichtel says done */
.wichtel-pop { position: fixed; right: 16px; bottom: -220px; z-index: 45; width: 170px; text-align: center; transition: transform .5s var(--ease-out); pointer-events: none; }
.wichtel-pop.show { transform: translateY(-236px); }
.wichtel-pop .art { width: 140px; height: auto; margin: 0 auto; }
.wichtel-pop p { background: var(--paper); color: var(--ink); border-radius: 12px; padding: .5rem .6rem; font: 700 1rem/1.25 var(--display); margin: 0; box-shadow: var(--shadow-paper); }
.wichtel-pop p span { display: block; font: 400 .8rem/1.3 var(--body); }

/* ---------- placeholders until the ChatGPT art is in ---------- */
.ph { width: 100%; border-radius: 12px; background: #ffffff0d; border: 1.5px dashed #c9d6e840; }
.layer .ph { border: 0; border-radius: 0; height: 100%; aspect-ratio: auto !important; }
.ph-sky { background: radial-gradient(circle at 80% 18%, #f4efe4 0 2.2%, transparent 2.4%), radial-gradient(ellipse at 50% 120%, var(--dusk), transparent 60%), linear-gradient(#0b1424, var(--night-2)); }
.ph-village { background: radial-gradient(ellipse 70% 30% at 20% 100%, #c9d6e8 0 98%, transparent 100%), radial-gradient(ellipse 80% 26% at 85% 100%, #b7c6db 0 98%, transparent 100%); }
.ph-workshop { background: radial-gradient(ellipse 120% 14% at 50% 100%, var(--snow) 0 98%, transparent 100%), linear-gradient(var(--lantern), var(--lantern)) 74% 76% / 7% 10% no-repeat, linear-gradient(var(--wood), var(--wood)) 76% 88% / 22% 24% no-repeat; }
.ph-door-note { background: linear-gradient(var(--wood-light), var(--wood)); }
.ph-lost-santa { background: radial-gradient(circle at 50% 30%, var(--snow) 0 18%, transparent 19%), radial-gradient(ellipse 30% 40% at 50% 70%, var(--cranberry) 0 98%, transparent 100%); border: 0; }

/* ---------- motion off: reduced motion or the toggle ---------- */
@media (prefers-reduced-motion: reduce) {
  html:not([data-motion="on"]) { scroll-behavior: auto; }
  html:not([data-motion="on"]) *, html:not([data-motion="on"]) *::before, html:not([data-motion="on"]) *::after { animation: none !important; transition: none !important; }
  html:not([data-motion="on"]) .snow, html:not([data-motion="on"]) .scroll-cue { display: none; }
}
html[data-motion="off"] { scroll-behavior: auto; }
html[data-motion="off"] *, html[data-motion="off"] *::before, html[data-motion="off"] *::after { animation: none !important; transition: none !important; }
html[data-motion="off"] .snow, html[data-motion="off"] .scroll-cue { display: none; }
