/* The stage of the nexdiary film: everything inside #stage. Used by film.html and by the website. */
:root {
  --paper: #faf5ec; --sheet: #fffdf8; --sheet2: #f4ece0; --line: #e8dccb;
  --ink: #3b2f27; --ink2: #6b5a4c; --muted: #8a7867;
  --sage: #5a7a52; --sage-d: #4a6a43; --sage-soft: #e2ecdc; --sage-l: #98bb8e;
  --terra: #b8562f; --plum: #8e4a72; --rose: #b05a5e; --pal-tinte: #3d5a8f;
  --shadow: 0 2px 4px rgb(80 50 20 / .05), 0 24px 60px -24px rgb(80 50 20 / .30);
  --env-back: #eadcc6; --env-front: #f4e9d8; --env-flap: #efe1cc; --env-line: #e2d2bb;
  --letter: #fffdf8; --letter-line: #efe4d4; --plank: #e8d6bd; --plank-edge: #d9c3a3; --book-back: #f1e7d8;
  --ph-q: #eef4ea; --ph-q-line: #c9d8c2; --ph-mute: #b8a896; --dot: rgb(160 130 100 / .26);
  --glow1: rgb(152 187 142 / .38); --glow2: rgb(240 180 130 / .26); --glow3: rgb(255 253 248 / .8); --vign: rgb(120 90 60 / .10);
  --shine: rgb(255 255 255 / .7);
}
#stage {
  position: relative; width: 1920px; height: 1080px; overflow: hidden; flex: none;
  color: var(--ink); font-family: "Nunito", sans-serif;
  transform-origin: center center;
}

/* dark: same tokens, the app's dark palette */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --paper: #1b1613; --sheet: #241d19; --sheet2: #2d2520; --line: #3b312a;
  --ink: #f2e7da; --ink2: #cbbba9; --muted: #a5927f;
  --sage: #7fa775; --sage-d: #a9c89f; --sage-soft: #26331f; --sage-l: #6f9566;
  --shadow: 0 2px 4px rgb(0 0 0 / .3), 0 24px 60px -24px rgb(0 0 0 / .75);
  --env-back: #3a3029; --env-front: #2f2722; --env-flap: #352c26; --env-line: #4a3e35;
  --letter: #2a221d; --letter-line: #3a3029; --plank: #4a3c30; --plank-edge: #3a2f25; --book-back: #2f2722;
  --ph-q: #26331f; --ph-q-line: #3f5636; --ph-mute: #7e6c5c; --dot: rgb(220 200 170 / .10);
  --glow1: rgb(120 160 110 / .22); --glow2: rgb(200 120 70 / .14); --glow3: rgb(60 50 40 / .5); --vign: rgb(0 0 0 / .35);
  --shine: rgb(255 255 255 / .10);
} }
:root[data-theme="dark"] {
  --paper: #1b1613; --sheet: #241d19; --sheet2: #2d2520; --line: #3b312a;
  --ink: #f2e7da; --ink2: #cbbba9; --muted: #a5927f;
  --sage: #7fa775; --sage-d: #a9c89f; --sage-soft: #26331f; --sage-l: #6f9566;
  --shadow: 0 2px 4px rgb(0 0 0 / .3), 0 24px 60px -24px rgb(0 0 0 / .75);
  --env-back: #3a3029; --env-front: #2f2722; --env-flap: #352c26; --env-line: #4a3e35;
  --letter: #2a221d; --letter-line: #3a3029; --plank: #4a3c30; --plank-edge: #3a2f25; --book-back: #2f2722;
  --ph-q: #26331f; --ph-q-line: #3f5636; --ph-mute: #7e6c5c; --dot: rgb(220 200 170 / .10);
  --glow1: rgb(120 160 110 / .22); --glow2: rgb(200 120 70 / .14); --glow3: rgb(60 50 40 / .5); --vign: rgb(0 0 0 / .35);
  --shine: rgb(255 255 255 / .10);
}

/* background */
#stage .bg { position: absolute; inset: 0; }
#stage .dots { position: absolute; inset: -40px; background-image: radial-gradient(var(--dot) 1.3px, transparent 1.6px); background-size: 30px 30px; }
#stage .glow { position: absolute; border-radius: 50%; }
#stage .glow.g1 { background: radial-gradient(closest-side, var(--glow1), transparent); }
#stage .glow.g2 { background: radial-gradient(closest-side, var(--glow2), transparent); }
#stage .glow.g3 { background: radial-gradient(closest-side, var(--glow3), transparent); }
#stage .vign { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 45%, transparent 55%, var(--vign) 100%); }

#stage .scene { position: absolute; inset: 0; will-change: transform, opacity, filter; }
#stage .abs { position: absolute; }

/* type */
#stage .head { position: absolute; font-family: "Fraunces", serif; font-weight: 600; letter-spacing: -0.025em; line-height: 1.02; color: var(--ink); font-variation-settings: "opsz" 144, "SOFT" 30; }
#stage .head .hl { white-space: nowrap; }
#stage .head .hl.it { font-style: italic; font-weight: 500; color: var(--sage); letter-spacing: -0.015em; font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1; }
#stage .wm { display: inline-block; vertical-align: top; }
#stage .wi { display: inline-block; will-change: transform, opacity, filter; }
#stage .sub { position: absolute; font-size: 31px; line-height: 1.5; color: var(--ink2); font-weight: 500; }
#stage .kick { position: absolute; display: flex; align-items: center; gap: 14px; font-size: 20px; font-weight: 800; letter-spacing: .22em; color: var(--sage); text-transform: uppercase; }
#stage .kick .bar { width: 34px; height: 6px; border-radius: 3px; background: var(--sage); transform-origin: left center; }
#stage .kick .num { color: var(--ink2); }
#stage .pill { position: absolute; display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px; border-radius: 999px; background: var(--sheet); border: 1.5px solid var(--line); font-size: 22px; font-weight: 700; color: var(--ink2); box-shadow: var(--shadow); white-space: nowrap; }
#stage .pill.soft { background: var(--sage-soft); border-color: transparent; color: var(--sage-d); box-shadow: none; }
#stage .pill svg { width: 22px; height: 22px; }

/* cards */
#stage .card { position: absolute; background: var(--sheet); border: 1.5px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
#stage .note { padding: 18px 22px; font-size: 22px; line-height: 1.35; color: var(--ink); width: 360px; }
#stage .note .tm { font-size: 16px; font-weight: 800; color: var(--muted); letter-spacing: .04em; display: block; margin-bottom: 6px; }
#stage .photo { overflow: hidden; border: 6px solid var(--sheet); border-radius: 18px; }
#stage .cover { position: absolute; inset: 0; overflow: hidden; }
#stage .cover svg { display: block; width: 100%; height: 100%; }
#stage .avatar { position: absolute; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; box-shadow: 0 0 0 6px var(--paper), var(--shadow); }
#stage .btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 24px; border-radius: 999px; font-weight: 800; font-size: 21px; white-space: nowrap; }
#stage .btn.fill { background: var(--sage); color: #fffaf4; }
#stage .btn.line { border: 1.5px solid var(--line); color: var(--ink2); background: var(--sheet); }
#stage .btn.ghost { color: var(--sage-d); }
#stage .btn svg { width: 22px; height: 22px; }

/* logo */
#stage .wordmark { position: absolute; font-family: "Nunito", sans-serif; font-weight: 800; letter-spacing: -0.025em; white-space: nowrap; }
#stage .wordmark .d { color: var(--sage); }
#stage .wordmark .ch { display: inline-block; }

/* phone */
#stage .phone { position: absolute; width: 440px; height: 900px; border-radius: 64px; background: #2a221d; padding: 14px; box-shadow: 0 40px 90px -30px rgb(60 35 15 / .55), inset 0 0 0 2px #4a3e35; }
#stage .phone .screen { position: relative; width: 100%; height: 100%; border-radius: 52px; background: var(--paper); overflow: hidden; padding: 64px 26px 26px; }
#stage .phone .notch { position: absolute; top: 16px; left: 50%; width: 120px; height: 34px; margin-left: -60px; border-radius: 20px; background: #1a1411; }
#stage .ph-top { display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: 18px; color: var(--sage); margin-bottom: 18px; }
#stage .ph-top .wm2 { font-weight: 800; color: var(--ink); letter-spacing: -0.025em; }
#stage .ph-top .wm2 b { color: var(--sage); font-weight: 800; }
#stage .ph-q { border: 1.5px dashed var(--ph-q-line); background: var(--ph-q); border-radius: 18px; padding: 14px 16px; margin-bottom: 16px; }
#stage .ph-q small { display: block; font-size: 12px; font-weight: 800; letter-spacing: .12em; color: var(--sage); margin-bottom: 4px; }
#stage .ph-q div { font-family: "Fraunces", serif; font-size: 20px; }
#stage .ph-input { position: relative; background: var(--sheet); border: 1.5px solid var(--sage-l); border-radius: 20px; min-height: 120px; padding: 16px 18px 50px; font-size: 21px; box-shadow: 0 0 0 5px rgb(152 187 142 / .25); }
#stage .ph-input .ph-ph { color: var(--muted); }
#stage .caret { display: inline-block; width: 2px; height: 24px; background: var(--sage); vertical-align: -4px; margin-left: 1px; }
#stage .ph-cam { position: absolute; left: 14px; bottom: 12px; width: 30px; height: 30px; color: var(--ink2); }
#stage .ph-send { position: absolute; right: 12px; bottom: 10px; width: 42px; height: 42px; border-radius: 50%; background: var(--sage); color: #fff; display: grid; place-items: center; }
#stage .ph-send svg { width: 22px; height: 22px; }
#stage .ph-count { margin: 20px 4px 10px; font-size: 15px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
#stage .ph-list { position: relative; }
#stage .ph-note { display: grid; grid-template-columns: 58px 1fr; gap: 8px; padding: 12px 4px; border-top: 1.5px solid var(--line); font-size: 19px; line-height: 1.35; overflow: hidden; }
#stage .ph-note .t { font-size: 15px; font-weight: 800; color: var(--muted); padding-top: 3px; }
#stage .ph-note .ph-img { width: 150px; height: 104px; border-radius: 12px; overflow: hidden; margin-top: 10px; position: relative; }
#stage .ph-write { position: absolute; left: 26px; right: 26px; bottom: 28px; text-align: center; padding: 16px; border-radius: 999px; background: var(--sage); color: #fffaf4; font-weight: 800; font-size: 19px; }

/* page */
#stage .pagecard { overflow: hidden; }
#stage .pagecard .pc-cover { position: relative; height: 280px; background: var(--sheet2); overflow: hidden; }
#stage .pagecard .pc-body { padding: 30px 46px 0; }
#stage .pc-date { font-size: 17px; font-weight: 800; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
#stage .pc-title { font-family: "Fraunces", serif; font-weight: 600; font-size: 48px; letter-spacing: -0.02em; margin: 8px 0 14px; min-height: 58px; }
#stage .pc-title.ph, #stage .pc-text.ph { color: var(--ph-mute); }
#stage .pc-text { font-family: "Lora", serif; font-size: 24.5px; line-height: 1.62; color: var(--ink); }
#stage .pc-text .w { display: inline-block; white-space: pre; }
#stage .pc-bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 12px; align-items: center; padding: 22px 36px; border-top: 1.5px solid var(--line); background: var(--sheet); }
#stage .shimmer { position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, var(--shine) 50%, transparent 70%); }

/* envelope */
#stage .env { position: absolute; width: 640px; height: 400px; }
#stage .env > * { position: absolute; }
#stage .env .clip { left: -500px; right: -500px; top: -1400px; bottom: 0; overflow: hidden; z-index: 2; }
#stage .letter { position: absolute; width: 620px; padding: 46px 52px; background: var(--letter); border: 1.5px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
  background-image: repeating-linear-gradient(transparent 0 47px, var(--letter-line) 47px 48.5px); background-position: 0 170px; }
#stage .letter .lt-head { display: flex; gap: 12px; align-items: center; margin-bottom: 26px; }
#stage .letter .lt-text { font-family: "Lora", serif; font-style: italic; font-size: 27px; line-height: 48px; color: var(--ink); min-height: 336px; }
#stage .letter .lt-sign { font-family: "Fraunces", serif; font-style: italic; font-size: 40px; color: var(--sage); text-align: right; margin-top: 6px; font-variation-settings: "SOFT" 100, "WONK" 1; }
#stage .chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; font-size: 17px; font-weight: 800; background: var(--sage-soft); color: var(--sage-d); white-space: nowrap; }
#stage .chip.paper { background: var(--sheet2); color: var(--ink2); }
#stage .seal { position: absolute; width: 132px; height: 132px; border-radius: 50%; z-index: 6; }
#stage .seal .half { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 38% 32%, #6f9566, #4a6a43 60%, #3a5434); box-shadow: inset 0 0 0 7px rgb(255 255 255 / .12), 0 8px 18px -6px rgb(40 60 30 / .6); display: grid; place-items: center; }
#stage .seal svg { width: 74px; height: 74px; }
#stage .tl { position: absolute; inset: 0; overflow: hidden; }
#stage .tl .layer { position: absolute; inset: -2%; }
#stage .year { position: absolute; left: 0; right: 0; top: 120px; text-align: center; font-family: "Fraunces", serif; font-weight: 600; font-size: 260px; line-height: 1; color: #fffdf8; letter-spacing: -0.03em; text-shadow: 0 10px 60px rgb(40 25 10 / .35); }
#stage .year .roll { display: inline-block; position: relative; height: 1em; vertical-align: top; }
#stage .year .roll .y1 { position: absolute; left: 0; right: 0; top: 1em; }
#stage .year .roll span { display: block; height: 1em; }

/* shelf */
#stage .vol { position: absolute; bottom: 0; border-radius: 8px 8px 4px 4px; box-shadow: inset -6px 0 0 rgb(0 0 0 / .10), inset 6px 0 0 rgb(255 255 255 / .10), 0 14px 26px -14px rgb(50 30 10 / .5); overflow: hidden; }
#stage .vol .lab { position: absolute; left: 0; right: 0; top: 60px; text-align: center; writing-mode: vertical-rl; transform: rotate(180deg); margin: 0 auto; font-family: "Fraunces", serif; font-size: 34px; font-weight: 600; color: rgb(255 255 255 / .92); height: 200px; width: 100%; display: flex; align-items: center; justify-content: center; }
#stage .vol .vband { position: absolute; left: 0; right: 0; height: 5px; background: rgb(255 255 255 / .28); }
#stage .plank { position: absolute; height: 28px; border-radius: 6px; background: var(--plank); box-shadow: 0 18px 30px -18px rgb(80 50 20 / .6), inset 0 -6px 0 var(--plank-edge); }
#stage .book { position: absolute; width: 440px; height: 600px; perspective: 2200px; }
#stage .book .bpage { position: absolute; inset: 0; background: var(--letter); border-radius: 6px 16px 16px 6px; border: 1.5px solid var(--line); box-shadow: var(--shadow); padding: 46px 44px; overflow: hidden; }
#stage .book .bcover { position: absolute; inset: 0; transform-origin: left center; transform-style: preserve-3d; }
#stage .book .bcover .face { position: absolute; inset: 0; border-radius: 6px 16px 16px 6px; backface-visibility: hidden; overflow: hidden; }
#stage .book .bcover .front { background: var(--sage); box-shadow: inset 14px 0 0 rgb(0 0 0 / .12), 0 30px 60px -24px rgb(50 30 10 / .6); color: #fffaf4; }
#stage .book .bcover .back { background: var(--book-back); transform: rotateY(180deg); }

/* tiles */
#stage .tile { position: absolute; width: 372px; height: 280px; padding: 34px 32px; }
#stage .tile .ic { width: 64px; height: 64px; border-radius: 18px; background: var(--sage-soft); display: grid; place-items: center; color: var(--sage-d); margin-bottom: 26px; }
#stage .tile .ic svg { width: 36px; height: 36px; }
#stage .tile h3 { margin: 0 0 10px; font-family: "Fraunces", serif; font-weight: 600; font-size: 33px; letter-spacing: -0.01em; line-height: 1.1; }
#stage .tile p { margin: 0; font-size: 21px; color: var(--ink2); line-height: 1.4; font-weight: 600; }
#stage .term { position: absolute; background: #241d19; color: #f2e7da; border-radius: 20px; padding: 28px 36px; font-family: Consolas, "Cascadia Mono", monospace; font-size: 27px; line-height: 1.6; box-shadow: 0 30px 70px -30px rgb(30 20 10 / .7); }
#stage .term .dots3 { display: flex; gap: 9px; margin-bottom: 14px; }
#stage .term .dots3 i { width: 13px; height: 13px; border-radius: 50%; background: #4a3e35; display: block; }
#stage .term .pr { color: var(--sage-l); }

/* cursor */
#stage #cursor { position: absolute; left: 0; top: 0; width: 46px; height: 46px; z-index: 50; pointer-events: none; }
#stage #cursor svg { width: 46px; height: 46px; filter: drop-shadow(0 6px 10px rgb(40 25 10 / .3)); }
#stage #ripple { position: absolute; z-index: 49; border-radius: 50%; border: 3px solid var(--sage); pointer-events: none; }
#stage .spark { position: absolute; z-index: 48; border-radius: 3px; }

/* portrait (film.js with FILM_FORMAT = 'hoch'): a 1080 x 1920 stage shown at about a third of its size on a phone,
   so the free text and the cursor are larger; the app surfaces themselves are scaled in film.js */
#stage.hoch { width: 1080px; height: 1920px; }
#stage.hoch .sub { font-size: 38px; line-height: 1.45; }
#stage.hoch .kick { font-size: 27px; gap: 18px; }
#stage.hoch .kick .bar { width: 46px; height: 8px; border-radius: 4px; }
#stage.hoch .pill { font-size: 30px; padding: 16px 28px; gap: 12px; }
#stage.hoch .pill svg { width: 30px; height: 30px; }
#stage.hoch .year { top: 200px; font-size: 300px; }
#stage.hoch .term { font-size: 36px; padding: 30px 40px; }
#stage.hoch .term .dots3 i { width: 16px; height: 16px; }
#stage.hoch #cursor, #stage.hoch #cursor svg { width: 69px; height: 69px; }
#stage.hoch #ripple { border-width: 4px; }

/* The three buttons under the page must fit in German too, whatever the browser makes of the font width. */
#stage .pc-bar { gap: 10px; padding: 20px 30px; flex-wrap: nowrap; overflow: hidden; }
#stage .pc-bar .btn { font-size: 19px; padding: 12px 18px; gap: 8px; flex: none; }
#stage .pc-bar .btn.ghost { padding-left: 8px; padding-right: 8px; }
#stage .pc-bar .btn svg { width: 19px; height: 19px; }
