:root {
  --paper: #f7eedb; --ink: #1e1c19; --ink2: #5a554c; --night: #12110f; --nink: #efe6d2;
  --gold: #d9a02a; --gold-deep: #b5800f; --gold-pale: #f3cf7a;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); }
body { font-family: 'EB Garamond', Garamond, Georgia, serif; font-size: 20px; line-height: 1.68; }
.grain { position: fixed; inset: 0; pointer-events: none; z-index: 50; mix-blend-mode: multiply; opacity: 0.11;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 1.2 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
section.panel { position: relative; background: var(--paper); }
section.panel.dark { background: var(--night); color: var(--nink); }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; z-index: 1; }
.stage svg, .stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage canvas { pointer-events: none; }
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.flash.go { animation: flick 1.5s ease-out 1; }
@keyframes flick { 0% { opacity: 0 } 6% { opacity: .85 } 12% { opacity: .1 } 20% { opacity: .7 } 30% { opacity: 0 } 44% { opacity: .35 } 60%, 100% { opacity: 0 } }
.card { position: relative; z-index: 2; width: 31em; max-width: calc(100% - 32px); margin: -34vh 0 0;
  background: rgba(247, 238, 219, .93); padding: 1.5em 1.75em 1.4em; box-shadow: 0 10px 34px rgba(30, 28, 25, .18), 0 1px 3px rgba(30, 28, 25, .12); }
.side-left .card { margin-left: 6vw; }
.side-right .card { margin-left: auto; margin-right: 6vw; }
.dark .card { background: rgba(18, 17, 15, .93); color: var(--nink); box-shadow: 0 10px 34px rgba(0, 0, 0, .5); }
.spacer { height: 62vh; }
.card p { margin: 0; hyphens: manual; }
.card p.text::first-letter { font-family: 'IM Fell English', serif; float: left; font-size: 3.35em; line-height: .86; padding: .06em .1em 0 0; color: inherit; }
.label { font-family: 'IM Fell English SC', serif; letter-spacing: .14em; font-size: .78em; line-height: 1.35; color: var(--ink2); margin: 0 0 .5em !important; }
.dark .label { color: #b3a993; }
.label::after { content: ''; display: block; width: 2.6em; height: 2px; background: var(--gold); margin: .55em 0 .9em; }
.title-card { text-align: left; }
.title-card h1 { font-family: 'IM Fell English', serif; font-weight: 400; font-size: 2.6em; line-height: 1.05; margin: 0 0 .35em; }
.title-card .sub { font-style: italic; color: #c9bfa9; }
.title-card .hint { font-family: 'IM Fell English SC', serif; letter-spacing: .14em; font-size: .7em; margin-top: 1.4em; color: #8f8674; }
.end { min-height: 40vh; background: var(--night); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.2em; }
.end-rule { width: 2.6em; height: 2px; background: var(--gold); }
.end a { font-family: 'IM Fell English SC', serif; letter-spacing: .14em; font-size: .85em; color: var(--nink); text-decoration: none; border-bottom: 1px solid rgba(239, 230, 210, .35); padding-bottom: .2em; }
.end a:hover, .end a:focus-visible { border-bottom-color: var(--gold); }
.home { position: fixed; top: 14px; left: 14px; z-index: 60; font-family: 'IM Fell English SC', serif; letter-spacing: .12em; font-size: 14px; line-height: 1;
  color: var(--ink); background: rgba(247, 238, 219, .88); padding: 9px 12px 8px; text-decoration: none; box-shadow: 0 2px 10px rgba(30, 28, 25, .18); }
.home:hover, .home:focus-visible { background: var(--paper); }
html.still .home { display: none; }
@media (max-width: 760px) {
  body { font-size: 18px; }
  .card, .side-left .card, .side-right .card { margin-left: auto; margin-right: auto; width: auto; max-width: calc(100% - 28px); padding: 1.15em 1.2em 1.1em; }
  .title-card h1 { font-size: 2.1em; }
}
/* checking aid */
html.still, html.still body { overflow: hidden; }
html.still .grain { position: absolute; }
html.still section.panel { height: 100vh; }
html.still .card, html.still .spacer, html.still .end { display: none; }
html.still .withcard .card { display: block; position: absolute; top: 50%; transform: translateY(-50%); margin-top: 0; }
html.still .withcard.side-right .card { right: 0; }
@media (max-width: 760px) { html.still .withcard .card { left: 0; right: 0; } }
@media (prefers-reduced-motion: reduce) { .flash.go { animation: none; } }
.dr { stroke-dasharray: 1; }
