/* Adventsaga: a paper-cut winter night. The night is fir green, light is gold, paper is cream,
   and bordeaux marks what you press and what you chose. Display type: Almendra (door numbers,
   titles). Reading and everything else: Alegreya. Both self-hosted, see public/fonts. */

@font-face { font-family: "Almendra"; src: url(/fonts/almendra-400.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; 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: "Almendra"; src: url(/fonts/almendra-700.woff2) format("woff2"); font-weight: 700; font-style: normal; font-display: swap; 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: "Alegreya"; src: url(/fonts/alegreya-400.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; 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: "Alegreya"; src: url(/fonts/alegreya-400-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; 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: "Alegreya"; src: url(/fonts/alegreya-700.woff2) format("woff2"); font-weight: 700; font-style: normal; font-display: swap; 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; }
/* Latin Extended (names like Petrović, Çağla, Łukasz): fetched only by pages that use such letters */
@font-face { font-family: "Almendra"; src: url(/fonts/almendra-400-ext.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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: "Almendra"; src: url(/fonts/almendra-700-ext.woff2) format("woff2"); font-weight: 700; font-style: normal; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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: "Alegreya"; src: url(/fonts/alegreya-400-ext.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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: "Alegreya"; src: url(/fonts/alegreya-400-italic-ext.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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: "Alegreya"; src: url(/fonts/alegreya-700-ext.woff2) format("woff2"); font-weight: 700; font-style: normal; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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; }
/* Until Alegreya is there: Georgia, shrunk to Alegreya's smaller letters so lines don't jump. */
@font-face { font-family: "Alegreya vorab"; src: local("Georgia"); size-adjust: 91%; }

:root {
  --sky: #081613; --night: #10271f; --ground: #12291f; --fir: #1f4a3a; --fir-light: #2f5a4a;
  --cream: #f1e6cc; --paper: #f7efdc; --paper-edge: #d9c9a4; --line: #dccfae;
  --wine: #7b2231; --wine-deep: #5a1822; --gold: #f0c463; --gold-ink: #7d5a12;
  --ink: #2a2018; --ink-soft: #5c4a39;
  --display: "Almendra", "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --serif: "Alegreya", "Alegreya vorab", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  /* what text looks like here: on the night by default, on paper inside a card */
  --fg: var(--cream); --fg-soft: #b8bfa9; --head: var(--cream); --link: var(--gold); --err: #ffb9a6; --focus: #ffe9a8; --rule: rgba(241, 230, 204, .22);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .34 0 0 0 0 .18 0 0 0 .32 -.12'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  --stars: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='480' height='260' fill='%23f1e6cc'%3E%3Ccircle cx='23' cy='31' r='1.2' opacity='.8'/%3E%3Ccircle cx='71' cy='112' r='.8' opacity='.6'/%3E%3Ccircle cx='118' cy='22' r='.9' opacity='.7'/%3E%3Ccircle cx='152' cy='74' r='1.4' opacity='.9'/%3E%3Ccircle cx='197' cy='148' r='.8' opacity='.5'/%3E%3Ccircle cx='226' cy='41' r='1' opacity='.7'/%3E%3Ccircle cx='268' cy='96' r='.7' opacity='.6'/%3E%3Ccircle cx='301' cy='18' r='1.3' opacity='.85'/%3E%3Ccircle cx='339' cy='131' r='.9' opacity='.55'/%3E%3Ccircle cx='372' cy='58' r='1' opacity='.75'/%3E%3Ccircle cx='418' cy='101' r='1.3' opacity='.8'/%3E%3Ccircle cx='452' cy='27' r='.8' opacity='.6'/%3E%3Ccircle cx='47' cy='182' r='.8' opacity='.4'/%3E%3Ccircle cx='255' cy='203' r='.9' opacity='.35'/%3E%3Ccircle cx='401' cy='190' r='.7' opacity='.35'/%3E%3Cpath fill='%23f0c463' d='M94 52c.5 3.5 1.3 4.3 4.8 4.8-3.5.5-4.3 1.3-4.8 4.8-.5-3.5-1.3-4.3-4.8-4.8 3.5-.5 4.3-1.3 4.8-4.8zM330 70c.4 2.8 1 3.4 3.8 3.8-2.8.4-3.4 1-3.8 3.8-.4-2.8-1-3.4-3.8-3.8 2.8-.4 3.4-1 3.8-3.8z'/%3E%3C/svg%3E");
  --ridge: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='480' height='64' viewBox='0 0 480 64'%3E%3Cpath fill='%231c3d31' d='M0 34C60 18 120 18 180 30s120 18 180 6 80-10 120-2v30H0z'/%3E%3Cg fill='%230c1f19'%3E%3Cpath d='M78 4l7 17h-3.5l6 13h-19l6-13H71zM100 14l5 12h-2.5l4.5 10H93l4.5-10H95zM318 12l6 15h-3l5 12h-16l5-12h-3zM402 2l8 19h-4l7 15h-22l7-15h-4zM428 16l5 12h-2.5l4 9h-13l4-9H423z'/%3E%3C/g%3E%3Cg fill='%23ece3ca' opacity='.85'%3E%3Cpath d='M78 4l7 17h-3.5l-4-9zM402 2l8 19h-4l-4.5-10zM318 12l6 15h-3l-3.5-8z'/%3E%3C/g%3E%3Cpath fill='%2312291f' d='M0 48C80 34 160 38 240 48s160 8 240 0v16H0z'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; color-scheme: dark; background: var(--ground); }
body { margin: 0; min-height: 100vh; min-height: 100svh; background: var(--ground); color: var(--fg); font: 400 1.0625rem/1.55 var(--serif); font-variant-numeric: lining-nums; overflow-wrap: break-word; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.12; color: var(--head); text-wrap: balance; margin: 0 0 .5em; }
h2 { font-size: 1.6rem; }
p { margin: 0 0 .8em; }
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
[tabindex="-1"]:focus { outline: none; }

/* ---------- the pieces every page shares (also used by pages built elsewhere) ---------- */

/* A night sky with a ridge of firs along its lower edge. */
.hero { position: relative; text-align: center; overflow: hidden; color: var(--cream);
  padding: calc(env(safe-area-inset-top, 0px) + 2.6rem) max(1.25rem, env(safe-area-inset-right, 0px)) 5.2rem max(1.25rem, env(safe-area-inset-left, 0px));
  background: var(--stars) center top / 30rem auto repeat-x, linear-gradient(var(--sky), var(--night) 55%, #1d4034); }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 4rem; background: var(--ridge) center bottom / auto 100% repeat-x; pointer-events: none; }
.hero h1 { font-size: clamp(1.9rem, 7.2vw, 3rem); margin: 0 auto .35em; max-width: 18em; }
.hero p { margin: 0 auto; max-width: 30rem; color: var(--fg-soft); }
.brand, .hero .brand { font: 700 1.05rem/1 var(--display); letter-spacing: .01em; color: var(--gold); margin: 0 0 1.4rem; }
.brand a { color: inherit; text-decoration: none; }
/* The page's language, DE | FR (the pages before a calendar; the server fills in the links, src/app.js).
   On a hero page in its top right corner, on the start page beside «Anmelden». Each link a 44 px target. */
.lang-switch { display: inline-flex; font: 600 .9rem/1 var(--body, inherit); letter-spacing: .06em; }
.lang-switch a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 .35rem; color: var(--fg-soft); text-decoration: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.lang-switch a + a { background: linear-gradient(var(--rule), var(--rule)) left center / 1px 1em no-repeat; }
.lang-switch a[aria-current] { color: var(--gold); text-decoration: underline; text-underline-offset: .3em; }
.lang-switch a:active { opacity: .72; }
@media (hover: hover) and (pointer: fine) { .lang-switch a:not([aria-current]):hover { color: var(--cream); } }
.hero > .lang-switch { position: absolute; z-index: 2; top: calc(env(safe-area-inset-top, 0px) + .25rem); right: max(.4rem, env(safe-area-inset-right, 0px)); }
.hero:has(> .lang-switch) { padding-top: calc(env(safe-area-inset-top, 0px) + 3.2rem); }
.brand-end { display: flex; align-items: center; gap: .25rem; }

.wrap { max-width: 36rem; margin: 0 auto; padding: 0 max(1rem, env(safe-area-inset-right, 0px)) calc(4rem + env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-left, 0px)); }
.hero + .wrap { position: relative; margin-top: -2.4rem; }

/* A sheet of paper lying on the night. Inside it text is ink. */
.card { --fg: var(--ink); --fg-soft: var(--ink-soft); --head: var(--fir); --link: var(--wine); --err: #8f1d2c; --focus: var(--wine); --rule: var(--line);
  color: var(--fg); color-scheme: light; background: var(--paper) var(--grain); border-radius: 5px; padding: 1.6rem 1.25rem 1.5rem; margin: 0 0 1.25rem;
  box-shadow: 0 2px 0 #e9dcbb, 0 3px 0 #b9a77e, 0 5px 0 #e3d5b1, 0 6px 0 #a8966e, 0 22px 34px -14px rgba(0, 0, 0, .6); }
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card h2 { font-size: 1.7rem; }

label { display: block; font-weight: 700; color: var(--fg); margin: 1.1rem 0 .3rem; }
input, select, textarea { width: 100%; font: inherit; font-size: max(16px, 1.0625rem); line-height: 1.3; min-height: 48px; padding: .6rem .75rem; color: var(--ink); background: #fffaf0; border: 1px solid #917e58; border-radius: 6px; box-shadow: inset 0 1px 2px rgba(90, 70, 30, .12); color-scheme: light; }
select { appearance: none; -webkit-appearance: none; padding-right: 2.4rem; background: #fffaf0 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' fill='none' stroke='%237b2231' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1.5 1.5 7 7l5.5-5.5'/%3E%3C/svg%3E") right .85rem center no-repeat; }
input::placeholder, textarea::placeholder { color: #776650; opacity: 1; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--wine); }
.row { display: grid; grid-template-columns: 2fr 1fr; gap: .5rem; }
.row > * { min-width: 0; }
.row--even { grid-template-columns: 1fr 1fr; }
.row { align-items: end; }

/* Buttons: a bordeaux label with a fine gold line inside. */
:where(button, a.button) { font: 700 1.0625rem/1.2 var(--serif); display: inline-flex; align-items: center; justify-content: center; gap: .5rem; text-align: center; text-decoration: none; min-height: 48px; padding: .7rem 1.4rem; border: 0; border-radius: 7px; cursor: pointer;
  background: var(--wine); color: #fff6e2; box-shadow: inset 0 0 0 3px var(--wine), inset 0 0 0 4px rgba(240, 196, 99, .55), 0 2px 0 var(--wine-deep);
  touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: transform .14s var(--ease-out), background-color .14s; }
a.button { color: #fff6e2; }
a.button.ghost { color: var(--fg); }
:where(button, a.button):active { transform: scale(.97); }
:where(button, a.button):focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 7px; }
:where(button).ghost, :where(a.button).ghost { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg-soft); }
:where(button):disabled { opacity: .55; cursor: default; }
@media (hover: hover) and (pointer: fine) {
  :where(button, a.button):not(:disabled):hover { background: #8c2839; }
  :where(button).ghost:not(:disabled):hover, :where(a.button).ghost:hover { background: rgba(127, 127, 127, .14); }
}
.muted { color: var(--fg-soft); font-size: 1rem; }
.error { color: var(--err); font-weight: 700; }
.error:empty, .muted:empty { display: none; }
/* two buttons side by side in one paragraph, a lone link or button under the cards */
p:has(> button + button) { display: flex; flex-wrap: wrap; gap: .5rem; }
.wrap > p:last-child { text-align: center; margin-top: 1.6rem; }

/* Sign-in: the providers' own buttons (their marks, neutral colours, system type), all one size. */
.auth-providers { display: grid; gap: .7rem; margin: 1.2rem 0; }
.provider { display: flex; align-items: center; justify-content: center; gap: .65rem; width: 100%; min-height: 48px; padding: .55rem 1rem; border-radius: 7px; border: 1px solid #747775; background: #fff; color: #1f1f1f; box-shadow: none;
  font: 500 1rem/1.25 var(--sans); letter-spacing: .01em; text-decoration: none; cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; transition: transform .14s var(--ease-out), background-color .14s; }
.provider::before { content: ""; flex: none; width: 20px; height: 20px; background: center / contain no-repeat; }
.provider:active { transform: scale(.97); }
.provider-google::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='%23EA4335' d='M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z'/%3E%3Cpath fill='%234285F4' d='M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z'/%3E%3Cpath fill='%23FBBC05' d='M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z'/%3E%3Cpath fill='%2334A853' d='M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z'/%3E%3C/svg%3E"); }
.provider-apple { background: #000; color: #fff; border-color: #000; }
.provider-apple::before { width: 17px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 814 1000'%3E%3Cpath fill='%23fff' d='M788.1 340.9c-5.8 4.5-108.2 62.2-108.2 190.5 0 148.4 130.3 200.9 134.2 202.2-.6 3.2-20.7 71.9-68.7 141.9-42.8 61.6-87.5 123.1-155.5 123.1s-85.5-39.5-164-39.5c-76.5 0-103.7 40.8-165.9 40.8s-105.6-57-155.5-127C46.7 790.7 0 663 0 541.8c0-194.4 126.4-297.5 250.8-297.5 66.1 0 121.2 43.4 162.7 43.4 39.5 0 101.1-46 176.3-46 28.5 0 130.9 2.6 198.3 99.2zm-234-181.5c31.1-36.9 53.1-88.1 53.1-139.3 0-7.1-.6-14.3-1.9-20.1-50.6 1.9-110.8 33.7-147.1 75.8-28.5 32.4-55.1 83.6-55.1 135.5 0 7.8 1.3 15.6 1.9 18.1 3.2.6 8.4 1.3 13.6 1.3 45.4 0 102.5-30.4 135.5-71.3z'/%3E%3C/svg%3E"); }
.provider-email { background: #fffaf0; border-color: #917e58; color: var(--ink); }
.provider-email::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232a2018' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m4 7 8 6 8-6'/%3E%3C/svg%3E"); }
.provider:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  .provider:hover { background: #f2f2f2; }
  .provider-apple:hover { background: #1c1c1e; }
  .provider-email:hover { background: #f3ead6; }
}
.divider { display: flex; align-items: center; gap: .9rem; margin: 1.3rem 0; color: var(--fg-soft); font-style: italic; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--rule); }
/* A slip pinned on top: test mode and the like. */
.notice { --fg: var(--ink); --fg-soft: var(--ink-soft); --link: var(--wine); color: var(--ink); background: #f6dc9a; border: 1px dashed var(--gold-ink); border-radius: 5px; padding: .7rem 1rem; margin: 0 0 1.25rem; font-size: 1rem; }
.notice > :last-child { margin-bottom: 0; }
/* The server puts it first on the page in test mode: there it is a slim band across the top. */
body > .notice { position: relative; z-index: 6; margin: 0; border-radius: 0; border-width: 0 0 1px; text-align: center; font-size: .95rem; line-height: 1.35; padding: calc(env(safe-area-inset-top, 0px) + .4rem) 1rem .4rem; }
.list { list-style: none; margin: 1rem 0; padding: 0; border-top: 1px solid var(--rule); }
.list-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .3rem 1rem; padding: .85rem 0; border-bottom: 1px solid var(--rule); min-height: 48px; overflow-wrap: anywhere; }
.list-item a { font-weight: 700; }
.price { font: 700 2.1rem/1.1 var(--display); color: var(--link); margin: .6rem 0; }
.price small { display: block; font: 400 1rem/1.4 var(--serif); color: var(--fg-soft); margin-top: .2rem; }

/* ---------- the calendar sheet and its doors (calendar and start page) ---------- */

.sheet { --cell: min(18.5vw, 5.9rem); position: relative; width: 100%; max-width: 31rem; margin: 0 auto; aspect-ratio: 500 / 830; border-radius: 8px; container-type: inline-size;
  background: var(--fir) url(/img/szene-hoch.svg) 0 0 / 100% 100% no-repeat;
  box-shadow: 0 0 0 1px rgba(241, 230, 204, .35), 0 0 0 7px #0b1c17, 0 0 0 8px rgba(240, 196, 99, .4), 0 24px 44px -10px rgba(0, 0, 0, .7); }
@supports (width: 1cqw) { .sheet { --cell: 20cqw; } }
.sheet--quer { aspect-ratio: 770 / 550; max-width: min(58rem, calc((100svh - 16.5rem) * 1.4)); background-image: url(/img/szene-quer.svg); --cell: min(12vw, 8rem); }
@supports (width: 1cqw) { .sheet--quer { --cell: 14.2857cqw; } }
@media (min-width: 600px) { .sheet:not(.sheet--quer):not(.sheet--demo) { max-width: min(31rem, max(22rem, calc((100svh - 11rem) * .6))); } }

.door { position: absolute; display: block; min-height: 0; padding: 0; margin: 0; border: 0; border-radius: 3px; background: none; box-shadow: none; color: inherit; font: inherit; cursor: pointer; perspective: calc(var(--cell) * 6); transition: none;
  touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.door--tall { border-radius: 42% 42% 3px 3px / 20% 20% 3px 3px; }
/* seen from the hinge's side, so an open flap stands in the gap beside its door and not over the neighbour */
.hinge-l { perspective-origin: 0 50%; } .hinge-r { perspective-origin: 100% 50%; } .hinge-b { perspective-origin: 50% 100%; }
.door:active { transform: none; }
.door:focus-visible { outline: 3px solid #fff3c4; outline-offset: 3px; z-index: 5; }
.hole, .flap, .flap-front, .flap-back { position: absolute; inset: 0; border-radius: inherit; }
/* behind the flap: lamplight on paper, a small picture, the number */
.hole { visibility: hidden; display: grid; place-items: center; overflow: hidden; color: var(--wine);
  background: radial-gradient(120% 90% at 50% 38%, #ffeab0 0, #f6cf78 55%, #dba244 100%);
  box-shadow: inset 3px 4px 7px rgba(84, 40, 8, .5), inset -1px -1px 0 rgba(255, 244, 200, .5); transition: transform .14s var(--ease-out); }
.is-open .hole { visibility: visible; box-shadow: inset 3px 4px 7px rgba(84, 40, 8, .5), inset -1px -1px 0 rgba(255, 244, 200, .5), 0 0 .8rem .1rem rgba(255, 200, 96, .5); }
.is-open { z-index: 2; }
.motif { width: 58%; height: auto; max-height: 62%; margin-bottom: 14%; fill: currentColor; }
.door--tall .motif { width: 66%; margin-bottom: 30%; }
.door--wide .motif { width: 30%; margin: 0 34% 0 0; }
.door--big .motif { width: 46%; margin-bottom: 12%; }
.hole-n { position: absolute; left: 0; right: 0; bottom: 5%; text-align: center; font: 700 calc(var(--cell) * .25)/1 var(--display); color: var(--wine-deep); }
.door--wide .hole-n { left: auto; right: 14%; bottom: auto; top: 50%; transform: translateY(-50%); font-size: calc(var(--cell) * .34); }
.door--tall .hole-n { bottom: 7%; font-size: calc(var(--cell) * .3); }
.door--big .hole-n { font-size: calc(var(--cell) * .4); }

.flap { transform-style: preserve-3d; transform-origin: 0 50%; transition: transform .95s cubic-bezier(.3, 1.26, .45, 1); }
.hinge-r .flap { transform-origin: 100% 50%; }
.hinge-b .flap { transform-origin: 50% 100%; }
.flap--a { right: 50%; border-radius: 3px 0 0 3px; }
.flap--b { left: 50%; transform-origin: 100% 50%; border-radius: 0 3px 3px 0; }
.flap-front, .flap-back { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
/* the flap's face: its piece of the picture (laid in by tueren.js), a perforated edge, the number */
.flap-front { background-color: var(--fir); background-repeat: no-repeat; background-image: linear-gradient(rgba(255, 240, 200, .07), rgba(255, 240, 200, .07)), url(/img/szene-hoch.svg);
  box-shadow: 0 0 0 1px rgba(8, 22, 19, .55), 1px 2px 3px rgba(0, 0, 0, .45); transition: transform .14s var(--ease-out); }
.sheet--quer .flap-front { background-image: linear-gradient(rgba(255, 240, 200, .07), rgba(255, 240, 200, .07)), url(/img/szene-quer.svg); }
.flap-front::before { content: ""; position: absolute; inset: 2px; border-radius: inherit; border: 1px dashed rgba(241, 230, 204, .62); }
.flap-back { transform: rotateY(180deg); background: linear-gradient(90deg, #a99a78, #dccfae 45%, #cbbd99); box-shadow: 0 0 0 1px rgba(60, 45, 20, .4); }
.hinge-r .flap-back, .flap--b .flap-back { background: linear-gradient(270deg, #a99a78, #dccfae 45%, #cbbd99); }
.hinge-b .flap-back { transform: rotateX(180deg); background: linear-gradient(180deg, #a99a78, #dccfae 45%, #cbbd99); }
.num { position: absolute; inset: 0; display: grid; place-items: center; font: 700 calc(var(--cell) * .47)/1 var(--display); color: #ffd97f; text-shadow: 0 1px 0 rgba(0, 0, 0, .6), 0 0 .12em rgba(4, 14, 11, .95), 0 0 .3em rgba(4, 14, 11, .9), 0 0 .7em rgba(4, 14, 11, .8); }
.door--tall .num, .door--wide .num { font-size: calc(var(--cell) * .56); }
.door--big .num { font-size: calc(var(--cell) * 1.02); }
.flap--a .num { justify-items: end; padding-right: 3%; }
.flap--b .num { justify-items: start; padding-left: 3%; }

/* shut until its day: the picture lies in the dark, the number is pale */
.is-locked .flap-front { background-image: linear-gradient(rgba(6, 18, 15, .2), rgba(6, 18, 15, .2)), url(/img/szene-hoch.svg); }
.sheet--quer .is-locked .flap-front { background-image: linear-gradient(rgba(6, 18, 15, .2), rgba(6, 18, 15, .2)), url(/img/szene-quer.svg); }
.is-locked .num { color: #d9d2bb; }
.is-locked { cursor: default; }
/* its day has come, but a door before it comes first: the picture is lit, a small bolt holds the flap */
.is-waiting { cursor: default; }
.is-waiting .num { color: #f3cf7a; }
.is-waiting .flap-front::after { content: ""; position: absolute; z-index: 1; top: 50%; right: 0; width: calc(var(--cell) * .26); height: calc(var(--cell) * .085); min-height: 5px; transform: translate(45%, -50%); border-radius: 2px;
  background: radial-gradient(circle at 28% 50%, #7a5a14 0 22%, rgba(0, 0, 0, 0) 24%), linear-gradient(#ffe39a, #d9a940); box-shadow: 0 1px 2px rgba(0, 0, 0, .65), 0 0 0 1px rgba(60, 40, 5, .5); }
.is-waiting.hinge-r .flap-front::after { right: auto; left: 0; transform: translate(-45%, -50%) scaleX(-1); }
.is-waiting.hinge-b .flap-front::after { top: 0; right: 50%; transform: translate(50%, -50%) rotate(90deg); }
.is-waiting .flap--b .flap-front::after { display: none; } /* the double door: one bolt, across the middle */
/* the next one to open: light shows through the cracks, and it breathes */
.is-next::before { content: ""; position: absolute; inset: -2px; border-radius: inherit; pointer-events: none; box-shadow: 0 0 0 2px #ffe08f, 0 0 1.1rem .4rem rgba(255, 205, 105, .8), 0 0 2.8rem .8rem rgba(255, 190, 80, .4); animation: breathe 3.4s ease-in-out infinite; }
.is-next { z-index: 1; }
.is-next .num { color: #fff0bd; }
/* the seal behind an open door: which way that evening took */
.seal { display: inline-grid; place-items: center; flex: none; width: 1.75em; height: 1.75em; border-radius: 50%; font: 700 1em/1 var(--display); font-style: normal; background: var(--wine); color: #fff3d6; box-shadow: inset 0 0 0 .14em var(--wine), inset 0 0 0 .2em rgba(240, 196, 99, .7); }
.seal--default { background: none; color: var(--seal-ink, var(--gold)); box-shadow: none; border: .1em dashed currentColor; }       /* the story went on by itself */
.seal--undecided { background: #fff6e2; color: var(--wine); box-shadow: inset 0 0 0 .14em #fff6e2, inset 0 0 0 .22em var(--wine); }  /* read, not decided */
.hole { --seal-ink: var(--wine-deep); }
.hole .seal { position: absolute; top: 5%; right: 5%; font-size: calc(var(--cell) * .185); }
.door--tall .hole .seal { top: 16%; right: 50%; transform: translateX(50%); }
.door--tall .hole .seal ~ .hole-n, .door--tall .hole:has(.seal) .hole-n { bottom: 7%; }
.door--tall .hole:has(.seal) .motif { margin-bottom: 4%; }
.door--wide .hole .seal { top: 50%; right: 4%; transform: translateY(-50%); }
.door--wide .hole:has(.seal) .hole-n { right: 32%; }
.door--wide .hole:has(.seal) .motif { margin-right: 46%; }
.door:not(.door--tall):not(.door--wide) .hole:has(.seal) .motif { width: 50%; margin: 0 22% 16% 0; }
.wants-choice .seal { animation: ask 2.8s ease-in-out infinite; }
@keyframes ask { 50% { box-shadow: inset 0 0 0 .14em #fff6e2, inset 0 0 0 .22em var(--wine), 0 0 0 .22em rgba(123, 34, 49, .55); } }
@keyframes breathe { 50% { opacity: .5; } }

.is-open.hinge-l .flap { transform: rotateY(-103deg); }
.is-open.hinge-r .flap { transform: rotateY(103deg); }
.is-open .flap--a { transform: rotateY(-96deg); }
.is-open .flap--b { transform: rotateY(96deg); }
.is-open.hinge-b .flap { transform: rotateX(-103deg); }
.is-next:active .flap-front { transform: scale(.95); }
.is-open:active .hole { transform: scale(.95); }
.nope.hinge-l .flap, .nope .flap--a { animation: rattle-l .42s var(--ease-out); }
.nope.hinge-r .flap, .nope .flap--b { animation: rattle-r .42s var(--ease-out); }
.nope.hinge-b .flap { animation: rattle-b .42s var(--ease-out); }
@keyframes rattle-l { 25% { transform: rotateY(-13deg); } 55% { transform: rotateY(2deg); } 78% { transform: rotateY(-4deg); } }
@keyframes rattle-r { 25% { transform: rotateY(13deg); } 55% { transform: rotateY(-2deg); } 78% { transform: rotateY(4deg); } }
@keyframes rattle-b { 25% { transform: rotateX(-13deg); } 55% { transform: rotateX(2deg); } 78% { transform: rotateX(-4deg); } }
@media (hover: hover) and (pointer: fine) {
  .is-next:hover .flap-front { transform: scale(1.03); }
  .is-open:hover .hole { transform: scale(1.03); }
}

/* falling snow (fx.js draws it) */
.snowfield { position: fixed; inset: 0; z-index: 3; pointer-events: none; }
.snowfield canvas, canvas.snow { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* ---------- calendar page ---------- */

body.kalender { background: var(--stars) center top / 30rem auto repeat-x, linear-gradient(var(--sky), var(--night) 34rem, #163529); }
.kal-hero { background: none; overflow: visible; padding-bottom: 1.5rem; padding-top: calc(env(safe-area-inset-top, 0px) + 1.5rem); }
.kal-hero::after { display: none; }
.kal-hero .brand { margin-bottom: .9rem; }
.kal-hero h1 { font-size: clamp(1.6rem, 6.4vw, 2.5rem); max-width: 22em; overflow-wrap: break-word; }
.kal-hero h1.long { font-size: clamp(1.25rem, 5vw, 1.8rem); max-width: 30em; }
/* the heading in three lines: what it is (small), whose (large), which advent (small capitals) */
.kal-title > span { display: block; }
.kal-kicker { font: italic 400 clamp(1rem, 4.2vw, 1.3rem)/1.3 var(--serif); color: var(--fg-soft); margin-bottom: .35em; letter-spacing: 0; text-transform: none; }
.kal-year { font: 400 clamp(.85rem, 3.4vw, 1rem)/1.3 var(--serif); color: var(--fg-soft); letter-spacing: .16em; text-transform: uppercase; margin-top: .55em; }
.kal-hero .kal-story { font-size: 1.12rem; margin-top: .2rem; text-wrap: balance; }
.kal-hero p { font-style: italic; overflow-wrap: break-word; }
.kal-wrap { max-width: none; }
.hero + .kal-wrap { margin-top: 0; }
.hint { text-align: center; color: var(--fg-soft); font-style: italic; margin: 1.6rem auto 0; max-width: 30rem; min-height: 1.6em; }
.hint a.button { font-style: normal; }
.kal-msg { max-width: 30rem; margin: 2rem auto; text-align: center; }

body[data-view="reader"] { background: #0c1814; }
body[data-view="reader"] .kal-hero, body[data-view="reader"] .kal, body[data-view="reader"] .snowfield, body[data-view="message"] .kal { display: none; }
body[data-view="calendar"] #reader { display: none; }
#reader { animation: page-in .45s ease both; padding-top: env(safe-area-inset-top, 0px); }
@keyframes page-in { from { opacity: 0; } }

/* ---------- the page you read from ---------- */

.page-top { max-width: 36rem; margin: 0 auto; padding: .6rem 0 0; }
.back { background: none; box-shadow: none; color: var(--fg-soft); font-weight: 400; padding: .6rem .7rem .6rem .3rem; margin-left: -.3rem; }
.back::before { content: ""; width: .55em; height: .55em; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-right: .1em; }
@media (hover: hover) and (pointer: fine) { .back:not(:disabled):hover { background: none; color: var(--cream); } }
/* lamplight: warm type on the dark, nothing that glares at bedtime */
.page { max-width: 36rem; margin: 0 auto; padding: 1.2rem .25rem 2rem; color: #eadfc4; font: 400 1.22rem/1.72 var(--serif); font-variant-numeric: oldstyle-nums; overflow-wrap: break-word; }
@media (min-width: 700px) { .page { font-size: 1.34rem; padding-top: 2rem; } }
.page-head { text-align: center; margin: 0 0 2.2rem; }
.page-date { font-style: italic; color: var(--fg-soft); margin: 0 0 .5rem; }
.page-date::after { content: ""; display: block; width: 1.1rem; height: 1.1rem; margin: .7rem auto 0; background: var(--gold); clip-path: polygon(50% 0, 58% 42%, 100% 50%, 58% 58%, 50% 100%, 42% 58%, 0 50%, 42% 42%); }
.page h2, .page-title { font-size: clamp(1.9rem, 8vw, 2.7rem); line-height: 1.08; color: #fbeecb; margin: 0; hyphens: auto; -webkit-hyphens: auto; hyphenate-limit-chars: 16 5 5; }
.page h2.long { font-size: clamp(1.5rem, 6vw, 2rem); }
.page-text p { margin: 0 0 .95em; hyphens: auto; -webkit-hyphens: auto; hyphenate-limit-chars: 11 4 4; -webkit-hyphenate-limit-before: 4; -webkit-hyphenate-limit-after: 4; }
.page-text p:first-child::first-letter { font: 700 3.5em/.78 var(--display); float: left; color: var(--gold); padding: .06em .09em 0 0; }
.page-end { text-align: center; margin: 2.6rem 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
.page-end .ghost { color: var(--cream); }
.page-fin { font: 400 1.5rem/1.2 var(--display); color: var(--gold); margin: 2rem 0 1.4rem; text-align: center; }

/* the fork at the end: three signposts */
.fork { margin: 2.8rem 0 0; font-size: 1.0625rem; line-height: 1.45; }
.fork-sign { display: block; width: 5rem; height: 2.8rem; margin: 0 auto .9rem; color: var(--gold); }
.fork h3 { font-size: 1.5rem; text-align: center; color: #fbeecb; margin: 0 0 1.1rem; }
.ways { display: grid; gap: .7rem; }
.way { --tip: 1.15rem; position: relative; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0 .9rem; width: 100%; min-height: 4rem; text-align: left; font: 400 1.0625rem/1.42 var(--serif); color: #eadfc4;
  padding: .85rem calc(var(--tip) + .9rem) .85rem 1rem; border-radius: 0; background: #1d3b30; box-shadow: none; overflow-wrap: anywhere;
  clip-path: polygon(0 0, calc(100% - var(--tip)) 0, 100% 50%, calc(100% - var(--tip)) 100%, 0 100%); }
.way:nth-child(2) { padding: .85rem 1rem .85rem calc(var(--tip) + .9rem); clip-path: polygon(var(--tip) 0, 100% 0, 100% 100%, var(--tip) 100%, 0 50%); }
.way-letter { font: 700 1.9rem/1 var(--display); color: var(--gold); width: 1.4rem; text-align: center; }
.way-mark { display: none; grid-column: 2; font-weight: 700; color: #ffe2a0; margin-top: .3rem; }
.way-mark::before { content: ""; display: inline-block; width: .8em; height: .8em; margin-right: .4em; background: currentColor; clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
/* the signpost's shape cuts off an outline around it: the focus ring goes inside */
.way:focus-visible { outline: 3px solid var(--focus); outline-offset: -5px; }
.way.on { background: var(--wine); color: #fff3d6; }
.way.on .way-mark { display: block; }
.way.on .way-letter { color: #ffe2a0; }
.way.saving .way-mark { font-weight: 400; font-style: italic; }
.way.saving .way-mark::before { display: none; }
/* not taken: no longer a signpost, a plain board in the dark */
.way.off { color: #b9bca6; background: #152b23; }
.way.off .way-letter { color: #a08c52; }
.fork--fixed .way { cursor: default; }
.fork--fixed .way:active { transform: none; }
.fork--fixed .way.off, .fork--fixed .way.off:nth-child(2) { clip-path: none; background: #12231d; padding: .85rem 1rem; }
.fork[aria-busy="true"] .way { cursor: progress; }
@media (hover: hover) and (pointer: fine) { .fork:not(.fork--fixed) button.way:not(.on):hover { background: #25493b; color: #fff3d6; } }
.fork-note { text-align: center; color: var(--fg-soft); font-style: italic; margin: 1rem 0 0; min-height: 1.5em; }
.fork-note.nudge { animation: nudge .9s var(--ease-out); }
@keyframes nudge { 0%, 60% { color: #ffe2a0; } 18% { transform: translateX(-.3rem); } 36% { transform: translateX(.25rem); } 54% { transform: none; } }
/* the slip that says a choice is saved: the one piece of paper on the dark page */
.slip { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .9rem; align-items: start; margin: 1.3rem .2rem 0; padding: 1rem 1.1rem 1rem 1rem; text-align: left; background: #f1e6cc var(--grain); color: var(--ink); border-radius: 4px; transform: rotate(-.7deg);
  box-shadow: 0 2px 0 #b9a77e, 0 16px 26px -12px rgba(0, 0, 0, .75); animation: slip-in .5s var(--ease-out) both; font-size: 1.0625rem; line-height: 1.45; }
.slip:focus { outline: none; }
.slip .seal { font-size: 1.35rem; margin-top: .1rem; }
.slip p { margin: 0 0 .45rem; }
.slip-head { font: 700 1.3rem/1.15 var(--display); color: var(--fir); }
.slip-way { font-style: italic; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.slip .slip-change { color: var(--ink-soft); font-size: 1rem; margin: 0; }
.slip--error .slip-head { color: #8f1d2c; }
/* the slip lands with a little weight, and the seal is pressed onto it a moment later */
@keyframes slip-in { 0% { opacity: 0; transform: translateY(-.9rem) rotate(-2.4deg) scale(1.02); } 55% { opacity: 1; transform: translateY(.18rem) rotate(-.4deg); } }
.slip > .seal { animation: slip-stamp .42s .24s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes slip-stamp { from { opacity: 0; transform: scale(1.8) rotate(-16deg); } }
@keyframes slip-fade { from { opacity: 0; } }
/* at the top of a chapter: how its evening ended */
.page-seal { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .8rem; align-items: center; width: 100%; max-width: 30rem; min-height: 48px; margin: -1rem auto 2rem; padding: .7rem .9rem; text-align: left;
  font: 400 1rem/1.4 var(--serif); color: var(--fg-soft); background: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(241, 230, 204, .2); --seal-ink: var(--gold); }
.page-seal .seal { font-size: 1.15rem; }
.page-seal b { color: #eadfc4; font-weight: 700; }
.page-seal-way { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.page-seal small { display: block; font-size: 1rem; }
@media (hover: hover) and (pointer: fine) { .page-seal:not(:disabled):hover { background: rgba(241, 230, 204, .06); } }

/* the audio edition: one quiet control under the title; the text stays the main thing */
.listen { max-width: 30rem; margin: -1rem auto 2rem; text-align: center; font: 400 1rem/1.4 var(--serif); color: var(--fg-soft); }
.listen-play { background: none; color: #eadfc4; box-shadow: inset 0 0 0 1px rgba(240, 196, 99, .55); padding: .6rem 1.25rem .6rem 1rem; gap: .55rem; }
.listen-play svg { width: 1rem; height: 1rem; fill: var(--gold); flex: none; }
.listen-play small { font: 400 .95rem/1 var(--serif); color: var(--fg-soft); }
@media (hover: hover) and (pointer: fine) { .listen-play:not(:disabled):hover { background: rgba(241, 230, 204, .06); } }
.listen audio { display: block; width: 100%; height: 48px; margin: 0 auto; color-scheme: dark; }
.listen audio[hidden], .listen-play[hidden] { display: none; }
.listen-wait { margin: 0; font-style: italic; }
.listen-wait + p { margin: .6rem 0 0; }
.listen-note { margin: .45rem 0 0; font-size: .95rem; font-style: italic; }

/* while a chapter is still being written */
.writing { max-width: 26rem; min-height: calc(100svh - 9rem); margin: 0 auto; padding: 1rem .5rem 3rem; text-align: center; display: grid; align-content: center; }
/* a painted picture of a story being written, in the calendar's look (each theme names its own) */
.writing-art { position: relative; width: min(15rem, 70vw); aspect-ratio: 1; margin: 0 auto 1.6rem; border-radius: 50%;
  background: url(/img/schreiben.webp) center / cover no-repeat;
  -webkit-mask: radial-gradient(closest-side, #000 72%, transparent); mask: radial-gradient(closest-side, #000 72%, transparent); }
.writing-art::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(closest-side at 52% 56%, rgba(255, 226, 150, .38), transparent 70%); opacity: 0; animation: glimmer 3.2s ease-in-out infinite; }
@keyframes glimmer { 50% { opacity: 1; } }
.writing h2 { font-size: 1.9rem; color: #fbeecb; }
.writing p { color: #d9d2bb; font-size: 1.12rem; }
.writing .back { margin-top: 1.2rem; }
/* the estimate: a bar that fills by the typical duration and holds near its end when it takes longer */
.progress { margin: 1.4rem auto 0; max-width: 20rem; }
.progress-bar { height: .5rem; border-radius: 99px; background: rgba(241, 230, 204, .16); overflow: hidden; }
.progress-bar span { display: block; height: 100%; width: 0; background: var(--gold); border-radius: inherit; transition: width 1s linear; }
.progress-left { margin: .55rem 0 0; font-size: 1rem; color: #d9d2bb; }
.progress-left small { font-size: .9rem; opacity: .8; }
.writing-art.is-still::after { animation: none; } /* writing has stopped: the picture rests */
.writing-trouble { margin: 1.4rem auto 0; max-width: 22rem; }
.writing-trouble button { margin-top: .9rem; }
@media (prefers-reduced-motion: reduce) { .progress-bar span { transition: none; } }

/* the question before a day is skipped: a note on paper */
dialog.note { width: min(26rem, calc(100vw - 2rem)); border: 0; padding: 1.6rem 1.3rem 1.3rem; margin: auto; text-align: center; overscroll-behavior: contain; }
dialog.note[open] { animation: note-in .24s var(--ease-out); }
dialog.note::backdrop { background: rgba(4, 12, 10, .74); }
@keyframes note-in { from { opacity: 0; transform: scale(.96); } }
dialog.note h2 { font-size: 1.55rem; }
.note-actions { display: grid; gap: .6rem; margin-top: 1.2rem; }

/* ---------- start page ---------- */

.lead { position: relative; overflow: hidden; color: var(--cream); background: var(--stars) center top / 30rem auto repeat-x, linear-gradient(var(--sky), var(--night) 60%, #1d4034);
  padding: calc(env(safe-area-inset-top, 0px) + 1.2rem) max(1rem, env(safe-area-inset-right, 0px)) 5.4rem max(1rem, env(safe-area-inset-left, 0px)); }
.lead::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 4rem; background: var(--ridge) center bottom / auto 100% repeat-x; pointer-events: none; }
.lead > * { position: relative; z-index: 4; }
.lead > canvas.snow { position: absolute; z-index: 3; }
.lead .brand { margin-bottom: 1.5rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
/* Back to one's own calendar: the account page lists them (signed out it leads through the login). */
.brand-login { font: 600 .95rem/1 var(--body, inherit); color: var(--gold); text-decoration: underline; text-underline-offset: .2em; padding: .75rem 0 .75rem .5rem; min-height: 44px; display: inline-flex; align-items: center; }
.lead-in { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.4rem; max-width: 31rem; margin: 0 auto; }
.lead h1 { font-size: clamp(2.05rem, 9.2vw, 3.5rem); line-height: 1.04; margin: 0 0 .8rem; overflow-wrap: break-word; }
.lead h1 span { display: block; }
.lead-sub { font-size: 1.14rem; line-height: 1.5; color: #d5d6c1; margin: 0; max-width: 31rem; }
/* the example calendar: the whole sheet, 24 doors; on its side beside the text on a wide screen (start.js) */
.sheet--demo { max-width: min(24rem, 100%); }
.sheet--demo.sheet--quer { max-width: none; }
.lead-tip { text-align: center; font-style: italic; color: var(--gold); margin: 1rem 0 0; min-height: 1.6em; }
.tagline { font: 400 1.05rem/1.3 var(--serif); letter-spacing: .02em; color: var(--gold); margin: 0 0 .7rem; }
.lead-cta { text-align: center; }
a.button.big { font-size: 1.2rem; min-height: 56px; padding: .9rem 2rem; width: 100%; max-width: 22rem; }
.price-line { color: var(--fg-soft); margin: .8rem 0 0; font-size: 1rem; }
.price-line--small { margin-top: .2rem; font-size: .95rem; }
.cur-switch { display: inline-block; min-height: 44px; padding: .65rem .3rem; color: var(--fg-soft); text-decoration-color: var(--rule); }
@media (min-width: 900px) {
  .lead { padding-bottom: 7rem; }
  .lead-in { max-width: 66rem; grid-template-columns: 1fr 1.08fr; grid-template-areas: "text cal" "cta cal"; column-gap: 4rem; align-items: start; padding-top: 2rem; }
  .lead-text { grid-area: text; align-self: end; } .lead-cal { grid-area: cal; } .lead-cta { grid-area: cta; text-align: left; }
  .lead .brand { max-width: 66rem; margin-left: auto; margin-right: auto; }
}

.beat { max-width: 36rem; margin: 0 auto; padding: 3.2rem max(1.25rem, env(safe-area-inset-right, 0px)) 0 max(1.25rem, env(safe-area-inset-left, 0px)); }
.beat > h2 { font-size: clamp(1.7rem, 6.6vw, 2.2rem); margin-bottom: 1.2rem; }
.beat > p { color: #d5d6c1; }
.sample { background: #0c1814; border-radius: 6px; padding: .4rem 1.1rem 0; box-shadow: 0 0 0 1px rgba(241, 230, 204, .14), 0 22px 34px -14px rgba(0, 0, 0, .6); position: relative; overflow: hidden; }
.sample .page { font-size: 1.14rem; padding-bottom: 0; }
.sample::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5.5rem; background: linear-gradient(rgba(12, 24, 20, 0), #0c1814 90%); }
.yours { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: .2em; }
.beat-note { font-style: italic; margin-top: 1.1rem; }
.beat .fork { margin-top: 0; }
/* the whole sample chapter, folded away under the excerpt */
.whole { margin-top: 1.4rem; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.whole summary { display: flex; align-items: center; min-height: 48px; padding: .4rem 0; color: var(--gold); cursor: pointer; touch-action: manipulation; list-style: none; }
.whole summary::-webkit-details-marker { display: none; }
.whole summary::before { content: ""; width: .5rem; height: .5rem; margin: 0 .8rem 0 .2rem; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(-45deg); transition: transform .2s var(--ease-out); }
.whole[open] summary::before { transform: rotate(45deg); }
.whole .page { font-size: 1.14rem; padding: 0 0 1rem; }
@media (prefers-reduced-motion: reduce) { .whole summary::before { transition: none; } }
.beat--book { text-align: center; }
/* the book at the end: a hard cover with the paper-cut night on it and a cream title plate */
.cover { position: relative; width: min(13rem, 64vw); aspect-ratio: 148 / 210; margin: 0 auto 2.2rem; transform: rotate(-3deg); border-radius: 3px 8px 8px 3px; overflow: hidden;
  display: grid; grid-template-rows: 1fr auto; background: var(--sky); color: var(--ink);
  box-shadow: inset 0 0 0 .45rem var(--sky), inset 0 0 0 calc(.45rem + 1.5px) rgba(240, 196, 99, .8), 5px 0 0 -1px #efe3c8, 6px 0 0 -1px #b9a77e, 9px 1px 0 -2px #efe3c8, 10px 1px 0 -2px #b9a77e, 18px 24px 34px -8px rgba(0, 0, 0, .75); }
.cover::before { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(90deg, rgba(0, 0, 0, .35), rgba(0, 0, 0, 0) 6%, rgba(255, 255, 255, .1) 8%, rgba(0, 0, 0, 0) 11%); }
.cover-pic { margin: .45rem .45rem 0; background: url(/img/szene-hoch.svg) center 42% / cover no-repeat; }
.cover-plate { display: grid; gap: .3rem; justify-items: center; margin: 0 .45rem .45rem; padding: .8rem .7rem .85rem; text-align: center; background: #f1e6cc var(--grain); border-top: 2px solid var(--gold); }
.cover-plate b { font: 700 1.02rem/1.12 var(--display); color: var(--wine-deep); text-wrap: balance; overflow-wrap: anywhere; }
.cover-plate i { font-size: .78rem; color: var(--ink-soft); }
.addon { display: block; max-width: 30rem; margin: 1.4rem auto 0; padding: .9rem 1rem; border: 1px dashed var(--rule); border-radius: 6px; color: var(--fg-soft); }
.addon-tag { display: inline-block; margin-right: .35rem; padding: .05rem .55rem; border-radius: 999px; font-size: .85rem; color: var(--sky); background: var(--gold); vertical-align: .08em; }
/* the five looks, pictures only */
.look-show { list-style: none; margin: 1.4rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.look-shot { display: grid; align-content: start; gap: .35rem; margin: 0; color: var(--fg-soft); font-size: .95rem; text-align: center; }
.look-shot img { display: block; width: 100%; height: auto; aspect-ratio: 360 / 258; object-fit: cover; border-radius: 6px; background: #0c1814; box-shadow: 0 0 0 1px var(--rule); }
.look-shot:first-child { grid-column: 1 / -1; }
@media (min-width: 640px) { .look-show { grid-template-columns: repeat(3, minmax(0, 1fr)); } .look-shot:first-child { grid-column: auto; } .beat--looks { max-width: 50rem; } .beat--looks > h2, .beat--looks > p { max-width: 36rem; margin-left: auto; margin-right: auto; } }
.fork-head { color: var(--fg-soft); font-style: italic; margin: 0 0 .6rem; }
.facts { list-style: none; margin: 0 0 2rem; padding: 0; border-top: 1px solid var(--rule); }
.facts li { padding: .9rem 0; border-bottom: 1px solid var(--rule); color: #d5d6c1; }
.facts b { color: var(--cream); }
[data-price], [data-price-audio] { white-space: nowrap; }
.beat--end { text-align: center; padding-bottom: calc(4rem + env(safe-area-inset-bottom, 0px)); }
.beat--end .facts { text-align: left; }

/* ---------- the form: the first page of the story ---------- */

.first-page .once { font: 400 1.5rem/1.2 var(--display); color: var(--wine); margin: 0 0 .2rem; }
.first-page fieldset { border: 0; padding: 0; margin: 1.9rem 0 0; min-width: 0; }
.first-page legend { font: 400 1.45rem/1.15 var(--display); color: var(--fir); padding: 0; margin: 0 0 .1rem; max-width: 100%; overflow-wrap: anywhere; }
.first-page .lede { color: var(--ink-soft); margin: 0 0 .3rem; }
.person { position: relative; padding: .2rem 0 1rem 2.6rem; border-bottom: 1px dashed var(--paper-edge); }
.person:last-child { border-bottom: 0; }
/* a line under a field: how to fill it in, and what is wrong with it */
.field-hint, .field-err { margin: .3rem 0 0; font-size: .95rem; line-height: 1.35; }
.field-hint { color: var(--ink-soft); }
/* «Mag besonders» as chips (formular.js): the box looks like a field; the chips sit in it and wrap,
   each with a 44 px remove button; the examples below are quieter, dashed, and add on a tap. */
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; min-height: 48px; padding: .3rem; background: #fffaf0; border: 1px solid #917e58; border-radius: 6px; box-shadow: inset 0 1px 2px rgba(90, 70, 30, .12); cursor: text; }
.chips:focus-within { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--wine); }
.chips-list { display: contents; list-style: none; margin: 0; padding: 0; }
.chip { display: inline-flex; align-items: center; max-width: 100%; min-height: 40px; padding-left: .8rem; color: var(--ink); background: #efe2c3; border: 1px solid #c4b089; border-radius: 999px; cursor: default; }
.chip-t { min-width: 0; padding: .3rem 0; line-height: 1.25; overflow-wrap: anywhere; hyphens: auto; -webkit-hyphens: auto; }
.chip .chip-x { flex: none; min-height: 44px; min-width: 44px; margin: -3px -1px -3px 0; padding: 0; background: none; box-shadow: none; color: var(--ink-soft); border-radius: 999px; }
.chip .chip-x svg { width: 16px; height: 16px; }
.chip .chip-x:focus-visible { outline: 3px solid var(--focus); outline-offset: -6px; }
@media (hover: hover) and (pointer: fine) { .chip .chip-x:not(:disabled):hover { background: none; color: var(--wine); } }
.chips .chips-entry { flex: 1 1 6rem; min-width: 0; min-height: 40px; padding: .3rem .45rem; border: 0; background: transparent; box-shadow: none; outline: none; }
.chips .chips-entry:focus-visible { outline: none; }
.chips:has(.chips-entry[aria-invalid="true"]) { border-color: var(--err); }
.chips--full .chips-entry { cursor: default; }
.chips--full .chips-entry::placeholder { color: var(--ink-soft); font-style: italic; }
.chips-ideas { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: .5rem 0 .9rem; }
.chips-ideas-say { color: var(--ink-soft); font-size: .95rem; margin-right: .1rem; }
.chips-ideas .chips-idea { min-height: 44px; padding: .3rem .85rem .3rem .65rem; gap: .3rem; font: 400 1rem/1.2 var(--serif); color: var(--ink); background: transparent; box-shadow: none; border: 1px dashed #917e58; border-radius: 999px; }
.chips-ideas .chips-idea svg { color: var(--wine); }
@media (hover: hover) and (pointer: fine) { .chips-ideas .chips-idea:not(:disabled):hover { background: rgba(123, 34, 49, .07); } }
.person-n { position: absolute; left: 0; top: 1.25rem; font: 700 2rem/1 var(--display); color: var(--wine); width: 2rem; text-align: center; }
.person label, .small-label { font-weight: 400; font-size: 1rem; color: var(--ink-soft); margin: .8rem 0 .2rem; }
.worlds { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(8.4rem, 100%), 1fr)); gap: .6rem; margin-top: .6rem; }
.world { position: relative; margin: 0; min-width: 0; touch-action: manipulation; }
.world input { position: absolute; opacity: 0; width: 100%; height: 100%; inset: 0; margin: 0; min-height: 0; cursor: pointer; }
.world span { display: grid; justify-items: center; align-content: start; gap: .4rem; height: 100%; min-height: 7.6rem; padding: .8rem .5rem .7rem; text-align: center; font-weight: 400; font-size: 1rem; line-height: 1.25; color: var(--ink); border: 1px solid #917e58; border-radius: 6px; background: #fffaf0; transition: transform .14s var(--ease-out); hyphens: auto; overflow-wrap: anywhere; }
.world svg { width: 3.2rem; height: 3.2rem; color: var(--fir); fill: currentColor; }
.world input:checked + span { background: var(--fir); color: #fbeecb; border-color: var(--fir); box-shadow: inset 0 0 0 3px var(--fir), inset 0 0 0 4px rgba(240, 196, 99, .7); }
.world input:checked + span svg { color: var(--gold); }
.world input:focus-visible + span { outline: 3px solid var(--wine); outline-offset: 2px; }
.world input:active + span { transform: scale(.97); }
/* The five looks (aussehen.js): a card each with a small picture, in the form and in the calendar's dialog. */
.looks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(8.6rem, 100%), 1fr)); gap: .7rem; margin-top: .6rem; }
.look { position: relative; display: block; margin: 0; min-width: 0; font-weight: 400; touch-action: manipulation; }
.look input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; min-height: 0; cursor: pointer; }
.look-card { display: grid; align-content: start; height: 100%; overflow: hidden; border-radius: 8px; background: rgba(127, 127, 127, .07); color: var(--fg); box-shadow: 0 0 0 1px var(--rule); transition: transform .14s var(--ease-out); }
.look-pic { display: block; width: 100%; height: auto; aspect-ratio: 360 / 258; object-fit: cover; background: #d9cdb0; }
.look-name { padding: .55rem .65rem 0; font: 700 1rem/1.2 var(--serif); overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }
.look-line { padding: .2rem .65rem .7rem; font-size: .9rem; line-height: 1.3; color: var(--fg-soft); }
/* chosen: a strong ring and a tick on the picture */
.look input:checked + .look-card { box-shadow: 0 0 0 3px var(--link), 0 6px 14px -8px rgba(40, 20, 10, .6); }
.look input:checked + .look-card::after { content: ""; position: absolute; top: .45rem; right: .45rem; width: 1.6rem; height: 1.6rem; border-radius: 50%;
  background: var(--link) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 70% no-repeat; box-shadow: 0 0 0 2px #fff6e2; }
.look input:focus-visible + .look-card { outline: 3px solid var(--focus); outline-offset: 3px; }
.look input:active + .look-card { transform: scale(.97); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* the calendar: a quiet button under the sheet, and the dialog with the cards */
.look-change { text-align: center; margin: .4rem 0 0; }
.look-change .look-btn { min-height: 44px; padding: .4rem .9rem; background: none; box-shadow: none; color: var(--fg-soft); font: 400 1rem/1.2 var(--serif); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: .25em; }
@media (hover: hover) and (pointer: fine) { .look-change .look-btn:hover { background: none; color: var(--fg); } }
/* the voice of the audio edition: two cards, as the worlds in the set-up form */
dialog.voices-dialog { width: min(28rem, calc(100vw - 1.5rem)); padding: 1.4rem 1rem 1.1rem; }
.worlds.voices { grid-template-columns: 1fr 1fr; border: 0; padding: 0; margin: .4rem 0 .2rem; }
.worlds.voices .world span { min-height: 3.4rem; align-content: center; }
dialog.looks-dialog { width: min(40rem, calc(100vw - 1.5rem)); max-height: calc(100dvh - 1.5rem); overflow-y: auto; padding: 1.4rem 1rem 1.1rem; }
.looks-dialog .looks-note { color: var(--fg-soft); margin: 0 0 .4rem; }
.looks-dialog .looks { grid-template-columns: repeat(auto-fill, minmax(min(6.3rem, 100%), 1fr)); gap: .55rem; }
.looks-dialog .look-line { display: none; } /* in the dialog the pictures speak; the form says more */
.looks-dialog .look-name { padding: .5rem .5rem .55rem; font-size: .92rem; }
@media (min-width: 44rem) { dialog.looks-dialog { width: 46rem; } .looks-dialog .looks { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.looks-set { border: 0; padding: 0; margin: 0; min-width: 0; text-align: left; }
.looks-dialog .note-actions { position: sticky; bottom: -1.1rem; margin: 1rem -1rem -1.1rem; padding: .8rem 1rem 1.1rem; background: var(--looks-bg, var(--paper)); grid-template-columns: repeat(auto-fit, minmax(min(9rem, 100%), 1fr)); }
/* /konto: where the buyer lives, three rows like the worlds of the set-up, the price on the right. */
.places { border: 0; padding: 0; margin: 1.2rem 0 0; min-width: 0; display: grid; gap: .5rem; }
.places legend { font: 700 1.0625rem/1.3 var(--serif); color: var(--fg); padding: 0; margin: 0 0 .1rem; }
.places > .muted { margin: 0 0 .2rem; }
/* the place /konto preselected for where the visitor seems to be, and how to change it */
.places > .suggested { margin: 0 0 .2rem; font-size: 1rem; color: var(--fg); }
.place { position: relative; margin: 0; font-weight: 400; touch-action: manipulation; }
.place input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; min-height: 0; cursor: pointer; }
.place span { display: flex; align-items: center; justify-content: space-between; gap: .8rem; min-height: 48px; padding: .55rem .85rem; color: var(--ink); border: 1px solid #917e58; border-radius: 6px; background: #fffaf0; transition: transform .14s var(--ease-out); }
.place b { font-weight: 700; overflow-wrap: anywhere; }
.place i { font-style: normal; color: var(--ink-soft); white-space: nowrap; }
.place input:checked + span { background: var(--fir); color: #fbeecb; border-color: var(--fir); box-shadow: inset 0 0 0 3px var(--fir), inset 0 0 0 4px rgba(240, 196, 99, .7); }
.place input:checked + span i { color: var(--gold); }
.place input:focus-visible + span { outline: 3px solid var(--wine); outline-offset: 2px; }
.place input:active + span { transform: scale(.98); }
#otherBox .small-label { margin-top: .4rem; }
/* /konto: the two editions side by side (stacked where there is no room), name, price, one line each */
.editions { margin-top: 1.4rem; }
.edition-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(9.5rem, 100%), 1fr)); gap: .5rem; }
.edition { position: relative; margin: 0; font-weight: 400; min-width: 0; touch-action: manipulation; }
.edition input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; min-height: 0; cursor: pointer; }
.edition span { display: grid; align-content: start; gap: .25rem; height: 100%; padding: .7rem .85rem .8rem; color: var(--ink); border: 1px solid #917e58; border-radius: 6px; background: #fffaf0; transition: transform .14s var(--ease-out); }
.edition b { font: 700 1.1rem/1.2 var(--serif); overflow-wrap: anywhere; hyphens: auto; -webkit-hyphens: auto; }
.edition i { font-style: normal; font-weight: 700; color: var(--wine); }
.edition small { font-size: .95rem; line-height: 1.35; color: var(--ink-soft); }
.edition input:checked + span { background: var(--fir); color: #fbeecb; border-color: var(--fir); box-shadow: inset 0 0 0 3px var(--fir), inset 0 0 0 4px rgba(240, 196, 99, .7); }
.edition input:checked + span i { color: var(--gold); }
.edition input:checked + span small { color: #d9d2bb; }
.edition input:focus-visible + span { outline: 3px solid var(--wine); outline-offset: 2px; }
.edition input:active + span { transform: scale(.98); }
.editions > .muted { margin: .1rem 0 0; font-size: .95rem; }
.add { margin-top: .9rem; }
.first-page .send { margin-top: 2rem; text-align: center; }
.first-page .send button { width: 100%; min-height: 56px; font-size: 1.2rem; }

/* ---------- the foot of every page (the three legal links) and the legal pages themselves ---------- */

/* Small and still: it lies at the end of the page and never follows the reader. */
.foot { position: relative; z-index: 4; padding: 0 max(1rem, env(safe-area-inset-right, 0px)) calc(1rem + env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-left, 0px)); font-size: .95rem; }
.foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 .3rem; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .75rem; color: var(--fg-soft); text-decoration: none; touch-action: manipulation; }
.foot a[aria-current] { color: var(--cream); text-decoration: underline; }
@media (hover: hover) and (pointer: fine) { .foot a:hover { color: var(--cream); text-decoration: underline; } }

/* A long sheet to read: Impressum, AGB, Datenschutz. */
/* the brand above the title is centred like the title, on a wide screen too (it stood left of it) */
.hero .brand { margin-left: auto; margin-right: auto; }
.legal { padding-bottom: 2rem; hyphens: auto; -webkit-hyphens: auto; hyphenate-limit-chars: 10 4 4; }
.legal h2 { font-size: 1.5rem; margin: 2.4rem 0 .6rem; scroll-margin-top: 1rem; }
.legal h3 { font: 700 1.0625rem/1.3 var(--serif); color: var(--wine); margin: 1.5rem 0 .3rem; }
.legal ul, .legal ol { margin: 0 0 .8em; padding-left: 1.25rem; }
.legal li { margin: 0 0 .4em; }
.legal li::marker { color: var(--wine); }
.legal address { font-style: normal; margin: 0 0 .8em; }
.legal .stand { color: var(--fg-soft); font-style: italic; margin: 1rem 0 0; }
/* the French versions' first line: the German one prevails */
.legal .prevails { color: var(--fg-soft); font-style: italic; margin: 0 0 1rem; }
/* "Kurz gesagt": the page in a few plain lines, on a lighter slip */
.legal .short { background: #fffaf0; border-left: 4px solid var(--wine); border-radius: 0 4px 4px 0; padding: 1rem 1.1rem 1rem 1rem; box-shadow: 0 0 0 1px var(--line); }
.legal .short h2 { font-size: 1.35rem; color: var(--wine); margin: 0 0 .5rem; }
.legal .short > :last-child { margin-bottom: 0; }
.legal .toc { margin: 1.6rem 0 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); columns: 2 13rem; column-gap: 1.5rem; }
.legal .toc li { margin: 0; break-inside: avoid; border-bottom: 1px solid var(--rule); }
.legal .toc a { display: flex; align-items: center; min-height: 44px; padding: .3rem 0; text-decoration: none; }
/* who gets what, why and where: one block per service */
.legal dl { margin: 0 0 1rem; padding: .2rem 0 .2rem .9rem; border-left: 2px solid var(--line); }
.legal dt { font-weight: 700; font-size: .95rem; color: var(--ink-soft); margin-top: .6rem; }
.legal dd { margin: 0; }
.legal details { margin: 0 0 1rem; border: 1px solid var(--line); border-radius: 4px; padding: 0 .9rem; background: #fffaf0; }
.legal summary { padding: .75rem 0; font-weight: 700; color: var(--wine); cursor: pointer; }
.legal summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.legal details[open] { padding-bottom: .9rem; }
/* something the owner still has to fill in or confirm, written [[SO]] in the page (docs/recht-offen.md) */
mark.open { background: #f6dc9a; color: var(--ink); font: 600 .82em/1.3 var(--sans); padding: .1em .35em; border-radius: 3px; box-shadow: 0 0 0 1px var(--gold-ink); overflow-wrap: anywhere; hyphens: manual; -webkit-hyphens: manual; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* ---------- effects: a door that opens (fx.js), today's door ---------- */

/* what flies out of a door: each look its own (sparks, gold dust, leaves, stars, confetti) */
.fx-layer { position: fixed; inset: 0; z-index: 6; pointer-events: none; overflow: hidden; contain: strict; }
.fx-p { position: absolute; left: 0; top: 0; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; will-change: transform, opacity; }
.fx-p--spark { width: 5px; height: 5px; box-shadow: 0 0 6px 1px rgba(255, 206, 110, .75); }
.fx-p--glitter { width: 7px; height: 7px; border-radius: 1px; box-shadow: 0 0 5px rgba(255, 226, 140, .9); }
.fx-p--leaf { width: 12px; height: 7px; margin: -4px 0 0 -6px; border-radius: 0 85% 0 85%; }
.fx-p--star { width: 11px; height: 11px; margin: -5px 0 0 -5px; border-radius: 0; clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); }
.fx-p--confetti { width: 7px; height: 11px; margin: -5px 0 0 -3px; border-radius: 1.5px; }
/* light spills out of the door as it swings */
.door.fx-spill::after { content: ""; position: absolute; inset: -40%; z-index: -1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, var(--fx-light, rgba(255, 214, 120, .85)), rgba(255, 214, 120, 0)); animation: fx-spill 1.25s var(--ease-out) both; }
@keyframes fx-spill { 0% { opacity: 0; transform: scale(.55); } 22% { opacity: 1; } 100% { opacity: 0; transform: scale(1.1); } }
:root[data-design="gold"] { --fx-light: rgba(255, 226, 140, .95); }
:root[data-design="natur"] { --fx-light: rgba(241, 201, 120, .6); }
:root[data-design="magie"] { --fx-light: rgba(214, 180, 255, .8); }
:root[data-design="modern"] { --fx-light: rgba(255, 214, 80, .9); }
/* today's door, in the shining looks: now and then a gleam runs over it (the paper-cut and the
   watercolour stay matt: their today's door only breathes) */
:root:is([data-design="gold"], [data-design="magie"], [data-design="modern"]) .is-next .num { overflow: hidden; border-radius: inherit; }
:root:is([data-design="gold"], [data-design="magie"], [data-design="modern"]) .is-next .num::before { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 60%; pointer-events: none;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .55) 50%, rgba(255, 255, 255, 0)); animation: fx-gleam 7s cubic-bezier(.45, 0, .2, 1) 1.6s infinite both; }
@keyframes fx-gleam { 0% { transform: translateX(0); } 14%, 100% { transform: translateX(270%); } }

@media (prefers-reduced-motion: reduce) {
  .flap, .flap-front, .hole { transition: none; }
  .is-next::before, .wants-choice .seal, .nope .flap, .writing-art::after, .fork-note.nudge { animation: none !important; }
  .fork-note.nudge { color: #ffe2a0; }
  .slip { animation: slip-fade .3s ease both; }
  .slip > .seal, .door.fx-spill::after, .is-next .num::before { animation: none !important; }
  .is-next .num::before { display: none; }
  dialog.note[open] { animation: none; }
  :where(button, a.button), .provider, .world span, .place span, .edition span { transition: none; }
}
/* The test clock of a tester's calendar: marked like the try-it notice, small, below the calendar. */
.testclock { max-width: 30rem; margin: 1.2rem auto 0; text-align: center; }
.testclock p { margin: 0 0 .5rem; }
.testclock-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.testclock button { min-height: 44px; touch-action: manipulation; }

/* The family (familie.js): a card under the calendar with the invite link and the names. */
.family { max-width: 30rem; margin: 1.6rem auto 0; text-align: left; }
.family h2 { margin-bottom: .4rem; }
.family p { margin: .4rem 0; }
.family-actions, .family-more { display: flex; flex-wrap: wrap; gap: .5rem; margin: .8rem 0 0; }
.family-actions > *, .family-more > * { flex: 1 1 11rem; min-height: 48px; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.family #invite-link { font-size: max(16px, .95rem); color: var(--ink-soft); text-overflow: ellipsis; }
.family-list { list-style: none; margin: .9rem 0 0; padding: 0; border-top: 1px solid var(--rule); }
.family-list li { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .6rem; min-height: 48px; padding: .45rem 0; border-bottom: 1px solid var(--rule); }
.family-name { flex: 1 1 8rem; min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.family-tag { font-size: .85rem; color: var(--fg-soft); border: 1px solid var(--rule); border-radius: 999px; padding: .05rem .55rem; white-space: nowrap; }
.family-out { min-height: 44px; padding: .3rem .8rem; font-size: 1rem; touch-action: manipulation; }
.family-me { overflow-wrap: anywhere; }
.family button:active:not(:disabled), .family a.button:active { transform: scale(.97); }
.family button, .family a.button { transition: transform 120ms var(--ease-out, ease-out); }
/* the vote: how many votes a way had (after midnight), and the seal of a door that is new to you */
.way-count { grid-column: 2; font-size: .95rem; opacity: .85; margin-top: .15rem; }
.seal--new { width: auto; min-width: 1.75em; padding: 0 .35em; border-radius: 999px; font: 700 .7em/1.75 var(--serif); letter-spacing: .02em; }
/* «nouveau» is longer than «neu»: smaller, so it stays inside a narrow door in every look (the looks set .seal's font) */
html[lang="fr"] .hole .seal.seal--new { font-size: .58em; line-height: 1.75; letter-spacing: 0; padding: 0 .3em; }
html[lang="fr"] .door--wide .hole:has(.seal--new) .hole-n { right: 49%; }   /* a wide door: number and picture make room for it */
html[lang="fr"] .door--wide .hole:has(.seal--new) .motif { width: 28%; margin-right: 70%; }
