/* Shared by every page: fonts, colors, base styles and the header. */
@font-face{font-family:"EB Garamond";src:url(../fonts/eb-garamond-latin-400-normal.woff2) format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"EB Garamond";src:url(../fonts/eb-garamond-latin-400-italic.woff2) format("woff2");font-weight:400;font-style:italic;font-display:swap}
@font-face{font-family:"EB Garamond";src:url(../fonts/eb-garamond-latin-600-normal.woff2) format("woff2");font-weight:600;font-style:normal;font-display:swap}
@font-face{font-family:"UnifrakturMaguntia";src:url(../fonts/unifrakturmaguntia-latin-400-normal.woff2) format("woff2");font-weight:400;font-display:swap}
:root{color-scheme:light dark;
 --bg:light-dark(#ece3cc,#15110e);--pink:#d9a5a8;--nav:light-dark(var(--pink),#5a2a35);--fg:light-dark(#1d1813,#f7f3ea);--red:light-dark(#8e1c12,#c0392b);
 --wood:light-dark(#c4ad80,#dccca6);
 --light:#ece3cc;--dark:#a08561;--ink:#1d1813;--blood:#8e1c12;
 --serif:"EB Garamond",Garamond,"Times New Roman",serif;--black:"UnifrakturMaguntia","EB Garamond",serif}
:root[data-theme=light]{color-scheme:light}:root[data-theme=dark]{color-scheme:dark}
*{box-sizing:border-box;min-width:0}
html,body{overscroll-behavior-y:none}
body{margin:0;background:var(--bg);color:var(--fg);font-family:var(--serif);font-variant-numeric:lining-nums;overflow-x:clip}
:focus-visible{outline:2px solid var(--red);outline-offset:2px}

.top{display:flex;align-items:center;gap:18px;flex-wrap:wrap;background:var(--nav);padding:10px max(2vw,14px);border-bottom:2px solid var(--wood)}
.brand{font:400 40px/1 var(--black);letter-spacing:.01em;color:var(--fg);text-decoration:none;margin-right:auto}
/* the logo leads to the story: on hover the word says so (nav.js: .sub, with four <i> for the drips). Normally hanic in manner
   (a short fade, nothing else moves) but in the logo's blackletter ("bring that font for geschichte back"), red and dripping blood: the archonic design leaking into the hanic one (owner, 2026-12-05:
   "geschichte can still be red and drip blood like archonic design leaking into the hanic one"). Inside the story archonic
   (blackletter, a flicker, no drips), gliding in from the right: neither ever crosses the logo ("the animation for hover
   shouldn't go in front of the faust logo"). */
.brand .sub{position:relative;display:inline-block;font:400 21px/1 var(--black);letter-spacing:.01em;color:var(--red);margin-left:14px;opacity:0;transition:opacity .2s;pointer-events:none}
.brand:hover .sub,.brand:focus-visible .sub{opacity:1}
/* a drip: a thin run down from a letter's foot (i), and at its tip a drop that swells, lets go and falls (i::after) */
.brand .sub i{position:absolute;left:var(--x);top:78%;width:2.5px;height:var(--h);border-radius:0 0 2px 2px;background:var(--red);transform:scaleY(0);transform-origin:top}
.brand .sub i::after{content:"";position:absolute;left:-1.25px;top:calc(100% - 3px);width:5px;height:6px;border-radius:50% 50% 50% 50%/40% 40% 60% 60%;background:var(--red);opacity:0}
.brand .sub i:nth-child(1){--x:6%;--h:7px;--d:.15s}.brand .sub i:nth-child(2){--x:35%;--h:12px;--d:.5s}.brand .sub i:nth-child(3){--x:63%;--h:8px;--d:1.1s}.brand .sub i:nth-child(4){--x:93%;--h:14px;--d:.8s}
.brand:hover .sub i,.brand:focus-visible .sub i{animation:dripRun .9s var(--d) ease-out forwards}
.brand:hover .sub i::after,.brand:focus-visible .sub i::after{animation:dripFall 2.6s calc(var(--d) + .7s) infinite}
@keyframes dripRun{to{transform:scaleY(1)}}
@keyframes dripFall{0%{transform:scale(.3);opacity:0}25%{transform:scale(1);opacity:1}45%{transform:translateY(1px) scale(1,1.2);opacity:1;animation-timing-function:cubic-bezier(.55,0,1,.45)}85%,100%{transform:translateY(30px) scale(.85,1.25);opacity:0}}
body.story .brand .sub{margin-left:12px;vertical-align:middle;letter-spacing:.5em;filter:blur(4px);transform:translate(18px,4px) skewX(-12deg);transform-origin:left bottom;transition:opacity .35s,letter-spacing .5s cubic-bezier(.2,.8,.2,1),filter .45s,transform .5s cubic-bezier(.2,1,.4,1)}
body.story .brand:hover .sub,body.story .brand:focus-visible .sub{letter-spacing:.01em;filter:blur(0);transform:none;animation:brandFlicker 2.6s .5s infinite}
body.story .brand .sub i{display:none}
@keyframes brandFlicker{0%,100%{opacity:1;text-shadow:0 0 0 transparent}8%{opacity:.75}10%{opacity:1;text-shadow:0 0 8px var(--red)}46%{opacity:.9}48%{opacity:1}70%{text-shadow:0 0 4px var(--red)}72%{opacity:.82}74%{opacity:1}}
@media(prefers-reduced-motion:reduce){.brand:hover .sub i{animation:none;transform:none}.brand:hover .sub i::after{animation:none}body.story .brand .sub{transition:opacity .2s;filter:none;transform:none;letter-spacing:.01em}body.story .brand:hover .sub{animation:none}}
.menu{display:flex;align-items:center;gap:28px;flex:none;white-space:nowrap}
/* the menu: all six links when the bar has room for them (nav.js measures); else (.tight) the last three in the dropdown behind the three lines (opens on hover, or on tap/focus) */
.top:not(.tight) .more,.top.tight .menu>a.x{display:none}
.more{position:relative}
.more-b{display:flex;flex-direction:column;justify-content:center;gap:5px;width:42px;height:40px;padding:0 9px;background:none;border:0;cursor:pointer}
.more-b i{display:block;height:2.5px;border-radius:2px;background:var(--fg);transition:background .15s}
.more:hover .more-b i,.more:focus-within .more-b i,.more:has(.on) .more-b i{background:var(--red)}
.drop{position:absolute;right:0;top:calc(100% + 6px);z-index:50;display:flex;flex-direction:column;min-width:150px;padding:6px;background:var(--bg);border:1px solid color-mix(in srgb,var(--wood) 55%,transparent);border-radius:10px;box-shadow:0 10px 30px rgb(0 0 0/.3);opacity:0;visibility:hidden;translate:0 -4px;transition:opacity .15s,translate .15s,visibility .15s}
.drop::before{content:"";position:absolute;left:0;right:0;top:-8px;height:8px}   /* bridges the gap, so the hover holds */
.more:hover .drop,.more:focus-within .drop{opacity:1;visibility:visible;translate:0}
.menu .drop a{padding:7px 14px;border:0;border-radius:6px;line-height:1.3}
.menu .drop a:hover{background:color-mix(in srgb,var(--red) 12%,transparent);color:var(--fg)}
.menu .drop a.on{color:var(--red);border:0}
.more-b:focus{outline:none}.more-b:focus-visible{outline:2px solid var(--red);outline-offset:2px;border-radius:6px}
.menu a{font:600 17px/1.4 var(--serif);color:var(--fg);text-decoration:none;padding:8px 6px;border-bottom:2px solid transparent}
.menu a:hover{color:var(--red)}
.menu a.on{color:var(--red);border-bottom-color:var(--red)}
/* narrow: a smaller logo, and its hover word takes no room there (no hover on a phone; the story keeps its own) */
@media(max-width:900px){.top{gap:10px}.menu{gap:14px}.brand{font-size:34px}body:not(.story) .brand .sub{display:none}}
@media(max-width:400px){.top{gap:8px}.menu{gap:6px}.brand{font-size:30px}.more-b{width:36px;padding:0 6px}}
/* two hans, a small one tilted back and a big one tilted forward: the rules page headings and the han-limit badge */
.hpair{position:relative;display:inline-block;width:1.25em;height:1.25em;flex:none;align-self:center}.hpair .hicon{position:absolute}.hpair .hicon:first-child{width:.8em;height:.8em;left:-.16em;top:.02em;transform:rotate(-16deg)}.hpair .hicon:last-child{width:1.05em;height:1.05em;right:-.05em;bottom:-.05em;transform:rotate(12deg)}

/* aiming: a piece leans at the target (--dx --dy: a unit step toward it), each in its own way */
.lean{z-index:3;transition:translate .2s ease-out,rotate .2s ease-out,scale .2s ease-out,filter .2s}
.lean-r{translate:calc(var(--dx) * 12%) calc(var(--dy) * 12% - 4%);rotate:calc(var(--dx) * 10deg)}   /* Roland: charges at it */
.lean-n{translate:calc(var(--dx) * -7%) calc(var(--dy) * -7%);scale:1.06 .92;rotate:calc(var(--dx) * -12deg)}   /* Conrad: coils back to strike */
.lean-b{translate:calc(var(--dx) * 5%) calc(var(--dy) * 5% - 8%);filter:drop-shadow(0 0 5px #1d1813);animation:lean-glow 1s ease-in-out infinite alternate}   /* Wolfram: rises and glows */
.lean-q{translate:calc(var(--dx) * 7%) calc(var(--dy) * 7% - 10%);rotate:calc(var(--dx) * 8deg);filter:drop-shadow(0 0 5px #1d1813);animation:lean-float 1.4s ease-in-out infinite alternate}   /* Mephisto: floats, leaning in */
/* a Tango in motion (app.js gotoFx): the leader lunges forward and settles, the partner swings in behind */
.pc.tango-lead{animation:tango-lead .56s cubic-bezier(.2,.8,.2,1)}.pc.tango-follow{animation:tango-follow .56s cubic-bezier(.2,.8,.2,1)}
@keyframes tango-lead{0%{rotate:0deg;scale:1}35%{rotate:-4deg;scale:1.05 1.02}70%{rotate:1.5deg;scale:1.01}100%{rotate:0deg;scale:1}}
@keyframes tango-follow{0%{rotate:0deg;scale:1}40%{rotate:5deg;scale:1.03 .985}75%{rotate:-1.5deg}100%{rotate:0deg;scale:1}}
.lean-p{translate:calc(var(--dx) * 6%) calc(var(--dy) * 6%);animation:lean-hop .5s ease-in-out infinite alternate}   /* a han: hops on the spot */
@keyframes lean-glow{to{filter:drop-shadow(0 0 10px #1d1813)}}
@keyframes lean-float{to{scale:1.05}}
@keyframes lean-hop{to{scale:1.04 .94}}
.lean.still{transition:none;animation:none}
/* they're all just chess pieces, so every one aims like Roland, a little more gently (the lean-* above were the Walpurgis set's) */
html .lean{translate:calc(var(--dx) * 8%) calc(var(--dy) * 8% - 2%);rotate:calc(var(--dx) * 6deg);scale:none;filter:none;animation:none}

/* Walpurgis capture: the piece tears in half along a jagged line, the halves fall apart and fade (game and effects) */
.rip-l,.rip-r{transform-origin:50% 92%;animation:.5s cubic-bezier(.5,0,.8,.6) forwards}
.rip-l{clip-path:polygon(0 0,53% 0,46% 18%,56% 36%,45% 55%,55% 74%,48% 100%,0 100%);animation-name:rip-l}
.rip-r{clip-path:polygon(53% 0,100% 0,100% 100%,48% 100%,55% 74%,45% 55%,56% 36%,46% 18%);animation-name:rip-r}
@keyframes rip-l{0%{translate:0;rotate:0deg;opacity:1}15%{translate:-3% 0;rotate:-2deg;opacity:1}100%{translate:-16% 10%;rotate:-18deg;opacity:0}}
@keyframes rip-r{0%{translate:0;rotate:0deg;opacity:1}15%{translate:3% 0;rotate:2deg;opacity:1}100%{translate:16% 10%;rotate:18deg;opacity:0}}
