:root {
  --ink: #e8dfc8; --ink2: #a99f8a; --dim: #6f685c; --bg: #08090b;
  --paper: #d6c9ab; --type: #1f1c18; --type2: rgba(31, 28, 24, .62);
  --red: #8f1d16; --red2: #c0392b; --gold: #c9a35a;
  --order: #cfc4a8; --dir: #8f989e; --comp: #c0612b; --veyr: #9ff6ff;
  --serif: 'IM Fell English SC', 'Times New Roman', serif;
  --typef: 'Special Elite', 'Courier New', monospace;
  --mono: 'Courier Prime', 'Courier New', monospace;
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .24 0 0 0 0 .19 0 0 0 0 .11 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}
html, body { margin: 0; height: 100%; background: var(--bg); overflow: hidden; color: var(--ink); }
canvas#c { display: block; position: fixed; inset: 0; cursor: none; }
body.menu canvas#c { cursor: default; }
#ui { position: fixed; inset: 0; pointer-events: none; z-index: 2; }
.scr { position: absolute; inset: 0; pointer-events: auto; }
.scr.sub, .scr.toast { pointer-events: none; }
button { font: inherit; cursor: pointer; }
.nogl { display: none; position: fixed; inset: 0; align-items: center; justify-content: center; text-align: center; font-family: var(--typef); z-index: 5; }
.nogl h1 { font-family: var(--serif); font-weight: 400; font-size: 64px; margin: 0 0 12px; letter-spacing: .08em; }

/* ---------- paper ---------- */
.paper, .card, .doc {
  background-color: var(--paper);
  background-image: var(--noise), radial-gradient(ellipse at 25% 15%, rgba(255, 250, 235, .22), transparent 55%), radial-gradient(ellipse at 90% 100%, rgba(70, 45, 20, .22), transparent 60%);
  color: var(--type); font-family: var(--mono);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 18px 50px rgba(0, 0, 0, .65);
}

/* ---------- title ---------- */
.scr.title { display: flex; flex-direction: column; justify-content: center; padding: 0 7vw; background: linear-gradient(90deg, rgba(5, 6, 8, .9) 0%, rgba(5, 6, 8, .55) 36%, rgba(5, 6, 8, 0) 68%); }
.t-kicker { font-family: var(--mono); color: var(--ink2); letter-spacing: .32em; font-size: clamp(11px, .95vw, 13px); }
.t-logo { font-family: var(--serif); font-weight: 400; color: var(--ink); font-size: clamp(64px, 11.5vw, 176px); letter-spacing: .07em; margin: .04em 0 0 -.04em; line-height: .88; text-shadow: 0 0 2px rgba(232, 223, 200, .35), 3px 4px 0 rgba(0, 0, 0, .55); }
.t-sub { font-family: var(--typef); color: var(--red2); letter-spacing: .45em; font-size: clamp(12px, 1.15vw, 16px); margin: .7em 0 3em .25em; }
.t-menu { display: flex; flex-direction: column; align-items: flex-start; gap: .15em; }
.t-menu button { background: none; border: 0; color: var(--ink); font-family: var(--typef); font-size: clamp(16px, 1.55vw, 22px); letter-spacing: .05em; padding: .28em 0; position: relative; text-align: left; opacity: .78; transition: opacity .15s, transform .15s; }
.t-menu button span { display: inline-block; width: 3.4em; color: var(--dim); font-family: var(--mono); font-size: .8em; }
.t-menu button:hover, .t-menu button:focus-visible { opacity: 1; transform: translateX(6px); outline: none; }
.t-menu button:hover::after, .t-menu button:focus-visible::after { content: ''; position: absolute; left: 3.2em; right: -.5em; bottom: .2em; height: 2px; background: var(--red2); }
.t-warn { font-family: var(--mono); color: var(--gold); max-width: 32em; margin-top: 2em; }
.t-foot { position: absolute; left: 7vw; right: 7vw; bottom: 4vh; display: flex; justify-content: space-between; font-family: var(--mono); color: var(--dim); font-size: 11px; letter-spacing: .2em; }

/* ---------- champion dossiers ---------- */
.scr.select { display: flex; flex-direction: column; justify-content: flex-end; padding: 0 3vw 3vh; background: linear-gradient(0deg, rgba(5, 6, 8, .95) 0%, rgba(5, 6, 8, .7) 50%, rgba(5, 6, 8, 0) 74%); }
.sel-head { max-width: 1400px; width: 100%; margin: 0 auto 14px; display: flex; justify-content: space-between; align-items: baseline; gap: 20px; }
.sel-k { font-family: var(--mono); letter-spacing: .3em; font-size: 12px; color: var(--ink2); }
.sel-note { font-family: var(--typef); color: var(--ink2); font-size: 14px; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.6vw; max-width: 1400px; width: 100%; margin: 0 auto; }
.card { position: relative; padding: 14px 16px 12px; font-size: 11.5px; line-height: 1.35; cursor: pointer; transform: rotate(-.6deg); transition: transform .22s cubic-bezier(.2, .9, .3, 1.2), box-shadow .22s; max-height: 56vh; overflow: hidden; outline: none; }
.card:nth-child(2) { transform: rotate(.5deg); } .card:nth-child(3) { transform: rotate(-.25deg); }
.card:hover, .card:focus-visible { transform: translateY(-10px) rotate(0); box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 28px 60px rgba(0, 0, 0, .75); }
.card::before { content: ''; position: absolute; top: -6px; left: 22px; width: 14px; height: 38px; border: 2px solid #6d6f70; border-radius: 8px; border-bottom-color: transparent; transform: rotate(4deg); }
.card header { display: flex; gap: 10px; align-items: center; border-bottom: 1px solid rgba(31, 28, 24, .35); padding: 4px 0 8px 26px; }
.fac { font-size: 10px; letter-spacing: .22em; color: var(--type2); }
.desig { font-family: var(--typef); font-size: 12px; }
.card h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(22px, 2.1vw, 30px); margin: 10px 0 6px; line-height: 1; }
.card h2 small { display: block; font-family: var(--typef); font-size: 12px; color: var(--red); letter-spacing: .24em; text-transform: uppercase; margin-top: 4px; }
.card dl { display: grid; grid-template-columns: auto 1fr; gap: 1px 10px; margin: 6px 0; }
.card dt { color: var(--type2); text-transform: uppercase; font-size: 10px; letter-spacing: .14em; }
.card dd { margin: 0; }
.bio { margin: 8px 0; }
.stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 3px 12px; margin: 8px 0; }
.stat { display: grid; grid-template-columns: 54px 1fr; align-items: center; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.stat i { height: 7px; background: repeating-linear-gradient(90deg, var(--type) 0 5px, transparent 5px 7px); width: var(--v); opacity: .85; }
.kit { margin: 6px 0; padding-left: 16px; } .kit li { margin: 1px 0; }
.weak { margin: 6px 0 0; } .weak b { color: var(--red); font-weight: 400; font-family: var(--typef); }
.stamp { position: absolute; right: 18px; top: 40%; border: 3px solid var(--red); color: var(--red); font-family: var(--typef); font-size: 28px; letter-spacing: .2em; padding: 2px 14px; transform: rotate(-14deg) scale(1.5); opacity: 0; transition: .25s; mix-blend-mode: multiply; pointer-events: none; }
.card:hover .stamp { opacity: .3; transform: rotate(-14deg) scale(1); }
.card.chosen .stamp { opacity: .92; transform: rotate(-14deg) scale(1); transition: .12s; }
.emb { width: 34px; height: 34px; flex: none; background: center / contain no-repeat; }
.e-order { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 34'%3E%3Ccircle cx='17' cy='19' r='11' fill='none' stroke='%238f1d16' stroke-width='2.4'/%3E%3Cpath d='M17 10c-4.5 5-4 9.5 0 13.5 4-4 4.5-8.5 0-13.5z' fill='%238f1d16'/%3E%3Crect x='15.6' y='2' width='2.8' height='6' fill='%238f1d16'/%3E%3C/svg%3E"); }
.e-directorate { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 34'%3E%3Ccircle cx='17' cy='17' r='12' fill='none' stroke='%231f2a33' stroke-width='2.4'/%3E%3Ccircle cx='17' cy='17' r='5' fill='none' stroke='%231f2a33' stroke-width='2'/%3E%3Cpath d='M17 1v9M17 24v9M1 17h9M24 17h9' stroke='%231f2a33' stroke-width='2'/%3E%3C/svg%3E"); }
.e-compact { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 34'%3E%3Cpath d='M17 2l11 16-11 14L6 18z' fill='none' stroke='%239a3d12' stroke-width='2.4'/%3E%3Cpath d='M17 11c-3 4-3 7 0 10 3-3 3-6 0-10z' fill='%239a3d12'/%3E%3C/svg%3E"); }
.back { position: absolute; left: 3vw; top: 3vh; background: none; border: 0; color: var(--ink2); font-family: var(--typef); font-size: 16px; }
.back:hover { color: var(--ink); }

/* ---------- modals ---------- */
.scr.modal { display: flex; align-items: center; justify-content: center; background: rgba(4, 5, 6, .74); }
.paper { padding: 26px 32px; max-height: 88vh; overflow: auto; max-width: min(940px, 94vw); box-sizing: border-box; }
.paper h3 { font-family: var(--serif); font-weight: 400; font-size: 30px; margin: 0 0 14px; line-height: 1.05; }
.paper button, .dead button { background: var(--type); color: var(--paper); border: 0; padding: 9px 16px; font-family: var(--typef); letter-spacing: .08em; font-size: 14px; margin-top: 16px; }
.paper button:hover, .paper button:focus-visible { background: var(--red); outline: none; }
.narrow { width: min(580px, 94vw); }
.hint { color: var(--type2); font-family: var(--typef); }
table.ctl { border-collapse: collapse; width: 100%; font-size: 13px; }
table.ctl td { padding: 5px 8px; border-bottom: 1px dotted rgba(31, 28, 24, .3); vertical-align: top; }
table.ctl td:first-child { font-family: var(--typef); white-space: nowrap; width: 9em; }
.paper label { display: grid; grid-template-columns: 9em 1fr; align-items: center; gap: 12px; margin: 10px 0; font-family: var(--typef); }
.paper label.chk { grid-template-columns: auto 1fr; }
.paper input[type=range] { accent-color: var(--red); }
.paper input[type=checkbox] { accent-color: var(--red); width: 16px; height: 16px; }
.recs { list-style: none; padding: 0; } .recs li { font-family: var(--typef); padding: 7px 0; border-bottom: 1px dotted rgba(31, 28, 24, .35); cursor: pointer; } .recs li:hover { color: var(--red); }

/* ledger */
.ledger { width: min(1000px, 95vw); }
.lsum { display: flex; flex-wrap: wrap; gap: 30px; margin: 4px 0 16px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--type2); }
.lsum b { display: block; font-family: var(--serif); font-weight: 400; font-size: 44px; color: var(--type); letter-spacing: 0; line-height: 1; }
.lscroll { max-height: 52vh; overflow: auto; background: repeating-linear-gradient(180deg, transparent 0 23px, rgba(60, 80, 110, .18) 23px 24px); }
.ledger table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ledger th { text-align: left; font-weight: 400; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--type2); border-bottom: 2px solid var(--type); padding: 4px 6px; position: sticky; top: 0; background: var(--paper); }
.ledger td { padding: 4px 6px; height: 16px; }
.ledger tr.you td { color: var(--red); }
.ledger td:first-child { font-family: var(--typef); }

/* pause dossier */
.dossier { width: min(940px, 95vw); }
.d-top { display: flex; gap: 14px; align-items: center; border-bottom: 2px solid var(--type); padding-bottom: 12px; }
.d-top h3 { margin: 2px 0; }
.d-stamp { margin-left: auto; border: 3px solid var(--red); color: var(--red); padding: 3px 12px; transform: rotate(-6deg); font-family: var(--typef); letter-spacing: .15em; mix-blend-mode: multiply; white-space: nowrap; }
.d-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 26px; margin-top: 16px; font-size: 13px; }
.dl2 { display: grid; grid-template-columns: 100px 1fr; gap: 6px 12px; margin: 0; }
.dl2 dt { color: var(--type2); text-transform: uppercase; letter-spacing: .14em; font-size: 10px; padding-top: 2px; }
.dl2 dd { margin: 0; }
.p-menu { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.p-menu button { margin-top: 0; }

/* documents */
.doc { width: min(620px, 92vw); padding: 34px 40px 28px; position: relative; transform: rotate(-.7deg); box-sizing: border-box; max-height: 88vh; overflow: auto; }
.doc-h { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--type2); }
.doc h3 { font-family: var(--typef); font-weight: 400; font-size: 24px; margin: 10px 0 14px; }
.doc-b p { font-family: var(--typef); font-size: 15px; line-height: 1.6; margin: 0 0 .8em; }
.dstamp { position: absolute; right: 28px; top: 26px; border: 3px solid var(--red); color: var(--red); padding: 2px 10px; transform: rotate(11deg); font-family: var(--typef); letter-spacing: .2em; opacity: .82; mix-blend-mode: multiply; }
.doc button { background: var(--type); color: var(--paper); border: 0; padding: 8px 16px; font-family: var(--typef); letter-spacing: .08em; }
.doc button:hover { background: var(--red); }

/* ---------- subtitles ---------- */
.scr.sub { display: flex; justify-content: center; align-items: flex-end; padding-bottom: 14vh; }
.sub-box { position: relative; max-width: min(780px, 86vw); background: rgba(6, 7, 9, .8); border-left: 3px solid var(--ink2); padding: 10px 18px 12px; color: var(--ink); font-family: var(--typef); font-size: clamp(14px, 1.2vw, 18px); line-height: 1.45; box-shadow: 0 6px 30px rgba(0, 0, 0, .5); }
.who { font-family: var(--mono); font-size: 11px; letter-spacing: .26em; color: var(--ink2); margin-bottom: 4px; text-transform: uppercase; }
.txt { min-height: 1.45em; }
.sub.radio .sub-box { border-left-color: var(--gold); background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .03) 0 1px, transparent 1px 3px), rgba(6, 7, 9, .82); }
.sub.f-order .sub-box { border-left-color: var(--order); } .sub.f-directorate .sub-box { border-left-color: var(--dir); } .sub.f-compact .sub-box { border-left-color: var(--comp); }
.rad { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--red2); margin-right: 8px; vertical-align: 1px; animation: blink 1s steps(2) infinite; }
.sub.mimic .sub-box { border-left-color: var(--veyr); color: #d6f4f6; text-shadow: 1px 0 rgba(255, 0, 60, .45), -1px 0 rgba(0, 255, 255, .45); animation: jitter .14s steps(2) infinite; }
.sub.mimic .who { color: var(--veyr); }
.adv { position: absolute; right: 10px; bottom: 6px; color: var(--gold); animation: blink .8s steps(2) infinite; font-size: 12px; }
.sub.block .sub-box { padding-right: 30px; }

/* ---------- chapter card ---------- */
.scr.cardscr { background: #000; display: flex; align-items: center; justify-content: center; text-align: center; transition: opacity .9s; }
.cardscr.out { opacity: 0; }
.cl { font-family: var(--typef); color: var(--ink); opacity: 0; animation: typein .9s forwards; }
.cl0 { letter-spacing: .6em; color: var(--dim); font-size: 13px; font-family: var(--mono); }
.cl1 { font-family: var(--serif); font-size: clamp(38px, 5.4vw, 78px); letter-spacing: .06em; margin: 10px 0 26px; }
.cl2 { letter-spacing: .32em; font-size: 13px; color: var(--ink2); font-family: var(--mono); }
.cl3 { margin-top: 10px; color: var(--ink2); font-size: 16px; }

/* ---------- toast ---------- */
.scr.toast { display: flex; flex-direction: column; align-items: flex-end; padding: 60px 18px 0 0; gap: 6px; }
.tst { font-family: var(--mono); font-size: 11px; letter-spacing: .16em; color: var(--ink); background: rgba(6, 7, 9, .78); border-right: 2px solid var(--gold); padding: 6px 10px; transition: opacity .8s, transform .8s; }
.tst.out { opacity: 0; transform: translateX(12px); }

/* ---------- death ---------- */
.scr.dead { display: flex; align-items: center; justify-content: center; text-align: center; background: radial-gradient(ellipse at center, rgba(30, 0, 0, .15), rgba(0, 0, 0, .8)); }
.dead-in { font-family: var(--typef); color: var(--ink2); }
.kia { display: inline-block; font-size: clamp(34px, 6vw, 82px); color: var(--red2); border: 5px solid var(--red2); padding: 4px 26px; transform: rotate(-4deg); letter-spacing: .1em; animation: stamp .35s cubic-bezier(.2, 1.6, .4, 1) both; }
.dname { margin: 22px 0 6px; font-family: var(--mono); letter-spacing: .2em; font-size: 12px; text-transform: uppercase; }
.dead button { margin-top: 18px; background: var(--ink); color: #111; }
.dead button:hover { background: var(--red2); color: var(--ink); }
.dead small { opacity: .6; margin-left: 6px; }

/* ---------- ending ---------- */
.scr.ending { background: #000; display: flex; align-items: center; justify-content: center; }
.rec { max-width: min(780px, 90vw); }
.rec pre { font-family: var(--mono); color: #b8c3c3; font-size: clamp(12px, 1.1vw, 16px); line-height: 1.6; white-space: pre-wrap; margin: 0; }
.mstamp { display: inline-block; font-family: var(--typef); color: var(--red2); border: 5px solid var(--red2); padding: 2px 24px; font-size: clamp(42px, 6.5vw, 92px); letter-spacing: .22em; transform: rotate(-7deg); margin-top: 24px; animation: stamp .3s cubic-bezier(.2, 1.6, .4, 1) both; }
.final { width: min(720px, 94vw); }
.f-k { font-size: 10px; letter-spacing: .3em; color: var(--type2); }
.final h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 3vw, 38px); margin: 6px 0 16px; }
.quote { font-family: var(--typef); font-size: 16px; line-height: 1.5; margin: 18px 0 8px; }

@keyframes blink { 50% { opacity: 0; } }
@keyframes jitter { 0% { transform: translate(0, 0); } 50% { transform: translate(1px, -1px); } 100% { transform: translate(-1px, 0); } }
@keyframes typein { from { opacity: 0; transform: translateY(4px); filter: blur(2px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes stamp { from { opacity: 0; transform: rotate(-4deg) scale(2.2); } to { opacity: 1; } }

@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr; max-height: 62vh; overflow: auto; }
  .card { max-height: none; }
  .d-grid { grid-template-columns: 1fr; }
  .t-foot { flex-direction: column; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) { .sub.mimic .sub-box, .rad, .adv { animation: none; } }

/* ---------- opening cinematic ---------- */
body.cine canvas#c { cursor: none; }
.scr.cine { pointer-events: none; }
.scr.cine.black { background: #000; transition: background .4s; }
.cine .lb { position: absolute; left: 0; right: 0; height: 11vh; background: #000; }
.cine .lb.t { top: 0; } .cine .lb.b { bottom: 0; }
.cine .cap { position: absolute; left: 50%; bottom: 13.5vh; transform: translate(-50%, 8px); width: min(880px, 84vw); text-align: center; opacity: 0; transition: opacity .9s ease, transform .9s ease; }
.cine .cap.in { opacity: 1; transform: translate(-50%, 0); }
.cine .ck { font-family: var(--mono); color: var(--gold); letter-spacing: .42em; font-size: clamp(11px, .9vw, 13px); margin-bottom: .7em; }
.cine .cl { font-family: 'IM Fell English', var(--serif); font-style: italic; color: var(--ink); font-size: clamp(19px, 2.05vw, 30px); line-height: 1.32; text-shadow: 0 2px 10px #000, 0 0 2px #000; }
.cine.black .cap { bottom: 46vh; }
.cine .skip { position: absolute; right: 3vw; top: calc(11vh + 14px); font-family: var(--mono); font-size: 11px; letter-spacing: .3em; color: var(--dim); }

/* ---------- champion select: a black stage ---------- */
.scr.pick { background: #050506; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2.2vh; font-family: var(--mono); }
.pk-head { font-family: var(--mono); letter-spacing: .5em; font-size: 12px; color: var(--ink2); }
.pk-row { display: flex; gap: clamp(8px, 3vw, 54px); align-items: flex-end; }
.pk { position: relative; background: none; border: 0; padding: 0 0 10px; display: flex; flex-direction: column; align-items: center; color: var(--ink); outline: none; }
.pk canvas { width: clamp(170px, 19vw, 300px); height: auto; aspect-ratio: 300 / 330; image-rendering: pixelated; position: relative; z-index: 1; }
.pk::before { content: ''; position: absolute; left: 10%; right: 10%; bottom: 52px; height: 46%; background: radial-gradient(ellipse at 50% 100%, var(--glow, rgba(232, 223, 200, .16)), transparent 70%); opacity: 0; transition: opacity .3s; }
.pk.f-anja { --glow: rgba(255, 200, 120, .22); } .pk.f-elias { --glow: rgba(110, 210, 255, .2); } .pk.f-kade { --glow: rgba(255, 110, 40, .24); }
.pk:hover::before, .pk:focus-visible::before, .pk.sel::before { opacity: 1; }
.pk-n { font-family: var(--serif); font-size: clamp(18px, 1.7vw, 26px); letter-spacing: .04em; margin-top: 4px; }
.pk-e { font-family: var(--typef); font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--red2); margin-top: 3px; }
.pk::after { content: ''; position: absolute; left: 30%; right: 30%; bottom: 0; height: 2px; background: var(--gold); transform: scaleX(0); transition: transform .25s; }
.pk.sel::after { transform: scaleX(1); }
.pk-info { width: min(920px, 88vw); min-height: 150px; border-top: 1px solid rgba(232, 223, 200, .14); padding-top: 14px; color: var(--ink2); font-size: 13px; line-height: 1.5; }
.pk-info.on { color: var(--ink); }
.pk-info.f-anja { border-top-color: var(--order); } .pk-info.f-elias { border-top-color: var(--veyr); } .pk-info.f-kade { border-top-color: var(--comp); }
.pk-hint { text-align: center; color: var(--dim); letter-spacing: .1em; }
.pi-top { display: flex; justify-content: space-between; letter-spacing: .26em; font-size: 11px; color: var(--ink2); margin-bottom: 10px; }
.pi-hp b { color: var(--ink); font-size: 14px; letter-spacing: .05em; }
.pi-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: 28px; }
.pi-grid h4 { font-family: var(--typef); font-weight: 400; letter-spacing: .3em; text-transform: uppercase; font-size: 11px; color: var(--gold); margin: 0 0 6px; }
.pi-grid p { margin: 0 0 6px; }
.pi-grid p b { display: inline-block; min-width: 1.6em; color: var(--gold); font-weight: 700; }
.pk-go { background: none; border: 1px solid var(--gold); color: var(--ink); font-family: var(--typef); letter-spacing: .28em; font-size: 14px; padding: 12px 26px; transition: background .2s, color .2s; }
.pk-go:hover, .pk-go:focus-visible { background: var(--gold); color: #0b0a09; outline: none; }
.pk-go[hidden] { display: none; }
.pk-back { position: absolute; left: 3vw; bottom: 4vh; background: none; border: 0; color: var(--dim); font-family: var(--mono); letter-spacing: .2em; font-size: 12px; }
.pk-back:hover { color: var(--ink); }

/* ---------- field book (tutorial, top-right) and field map: one look per faction ---------- */
.scr.book { inset: auto; top: 14px; right: 14px; width: min(350px, 31vw); pointer-events: auto; font-size: 12.5px; line-height: 1.45; }
.bk-in { position: relative; padding: 18px 18px 14px 22px; }
.book h4 { margin: 4px 0 8px; font-weight: 400; font-size: 19px; line-height: 1.1; }
.book ul { list-style: none; margin: 0; padding: 0; }
.book li { position: relative; padding: 3px 0 3px 22px; }
.book li::before { content: ''; position: absolute; left: 2px; top: 7px; width: 10px; height: 10px; border: 1px solid currentColor; opacity: .6; }
.book li.ok { opacity: .55; }
.book li.ok::before { opacity: 1; }
.book k { display: inline-block; min-width: 1.4em; padding: 0 5px; margin: 0 1px; border: 1px solid currentColor; border-bottom-width: 2px; border-radius: 3px; font-family: var(--mono); font-size: 11px; line-height: 1.5; text-align: center; font-style: normal; }
.book b { font-weight: 700; }
.bk-k { font-size: 9.5px; letter-spacing: .24em; opacity: .7; }
.bk-pg { position: absolute; right: 16px; top: 16px; font-size: 10px; letter-spacing: .2em; opacity: .7; }
.bk-n { margin: 8px 0 0; font-size: 11.5px; opacity: .8; }
.bk-go { display: block; width: 100%; margin-top: 12px; padding: 9px 10px; background: none; border: 1px solid currentColor; color: inherit; font-family: var(--typef); letter-spacing: .2em; font-size: 13px; text-align: left; animation: bkpulse 1.6s ease-in-out infinite; }
.bk-go small { float: right; font-family: var(--mono); font-size: 10px; opacity: .7; letter-spacing: .1em; margin-top: 2px; }
.bk-go:hover { animation: none; }
@keyframes bkpulse { 50% { box-shadow: 0 0 0 3px rgba(201, 163, 90, .25); } }

/* Directorate — military notebook: squared paper, red margin, spiral binding, typewriter + pencil */
.th-dir .bk-in, .mapv.th-dir .map-in {
  background-color: #e6e1d2; color: #1f2226; font-family: var(--mono);
  background-image: linear-gradient(90deg, transparent 21px, rgba(176, 40, 30, .55) 21px, rgba(176, 40, 30, .55) 22px, transparent 22px), repeating-linear-gradient(0deg, rgba(60, 90, 140, .16) 0 1px, transparent 1px 14px), repeating-linear-gradient(90deg, rgba(60, 90, 140, .1) 0 1px, transparent 1px 14px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 14px 34px rgba(0, 0, 0, .6); transform: rotate(-.5deg);
}
.th-dir .bk-in { padding-top: 24px; }
.th-dir .bk-in::before { content: ''; position: absolute; left: 14px; right: 14px; top: -6px; height: 14px; background: radial-gradient(circle at 7px 7px, #1a1c1f 3px, transparent 3.5px) 0 0 / 18px 14px repeat-x; }
.th-dir h4 { font-family: var(--typef); color: #12161b; }
.th-dir li.ok::before { background: linear-gradient(135deg, transparent 45%, #4a4f55 45% 58%, transparent 58%); border-color: #4a4f55; }
.th-dir .bk-go { border-color: #12161b; color: #12161b; } .th-dir .bk-go:hover { background: #12161b; color: #e6e1d2; }
.th-dir b { color: #1d4f7a; }

/* Compact — tattered occult book: scorched parchment, torn edges, blood, sigils */
.th-comp .bk-in, .mapv.th-comp .map-in {
  background-color: #2c2018; color: #dccaa6; font-family: var(--mono);
  background-image: radial-gradient(ellipse 60px 38px at 86% 82%, rgba(110, 10, 8, .55), transparent 70%), radial-gradient(ellipse 22px 30px at 12% 18%, rgba(110, 10, 8, .5), transparent 70%), radial-gradient(ellipse at 50% 40%, rgba(120, 82, 48, .35), transparent 70%), var(--noise);
  clip-path: polygon(0 3%, 6% 0, 18% 2%, 31% 0, 47% 1.5%, 60% 0, 76% 2%, 90% 0, 100% 2.5%, 99% 18%, 100% 37%, 98.5% 58%, 100% 76%, 99% 100%, 82% 98%, 63% 100%, 44% 98.5%, 27% 100%, 12% 98%, 0 100%, 1.5% 80%, 0 61%, 1% 40%, 0 21%);
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, .7));
}
.th-comp .bk-in::after { content: ''; position: absolute; right: 12px; bottom: 10px; width: 54px; height: 54px; opacity: .35; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 60'%3E%3Cg fill='none' stroke='%23a3170f' stroke-width='1.6'%3E%3Ccircle cx='30' cy='30' r='27'/%3E%3Ccircle cx='30' cy='30' r='19'/%3E%3Cpath d='M30 3 L53 43 L7 43 Z'/%3E%3Cpath d='M30 20v20M22 30h16'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat; pointer-events: none; }
.th-comp h4 { font-family: var(--serif); color: #c0241a; font-size: 21px; letter-spacing: .03em; }
.th-comp .bk-k, .th-comp .bk-pg { color: #a07a50; }
.th-comp li.ok::before { background: #8c1a14; border-color: #8c1a14; }
.th-comp b { color: #ff8a52; } .th-comp k { border-color: #a07a50; color: #e8d6b0; }
.th-comp .bk-go { border-color: #a3170f; color: #f0d8b0; } .th-comp .bk-go:hover { background: #7a0f0a; }

/* Order — holy codex: vellum, gilt double border, illuminated initial, iron-gall ink */
.th-order .bk-in, .mapv.th-order .map-in {
  background-color: #efe3c2; color: #2b1d10; font-family: 'IM Fell English', var(--serif); font-size: 14px;
  background-image: radial-gradient(ellipse at 30% 20%, rgba(255, 252, 238, .5), transparent 60%), radial-gradient(ellipse at 90% 100%, rgba(150, 110, 50, .25), transparent 60%);
  border: 3px double #b08a32; outline: 1px solid #6e4f16; outline-offset: 3px; box-shadow: 0 14px 34px rgba(0, 0, 0, .6);
}
.th-order h4 { font-family: var(--serif); color: #7a1610; font-size: 21px; }
.th-order h4::first-letter { font-size: 1.9em; color: #b08a32; text-shadow: 1px 1px 0 #7a1610; float: left; line-height: .8; margin: 2px 6px 0 0; }
.th-order .bk-k, .th-order .bk-pg { color: #8a6a2a; font-family: var(--mono); }
.th-order li::before { border-radius: 50%; }
.th-order li.ok::before { background: #b08a32; border-color: #7a5a14; }
.th-order b { color: #7a1610; } .th-order k { border-color: #8a6a2a; }
.th-order .bk-go { border-color: #7a1610; color: #7a1610; font-family: var(--serif); letter-spacing: .12em; } .th-order .bk-go:hover { background: #7a1610; color: #efe3c2; }

/* the map overlay: never blocks the mouse, the fight goes on behind it */
.scr.mapv { pointer-events: none; display: flex; align-items: center; justify-content: center; }
.map-in { position: relative; width: min(940px, 82vw); padding: 18px 24px 16px 30px; }
.map-in h3 { margin: 2px 0 6px; font-weight: 400; font-size: 24px; }
.m-k { font-size: 10px; letter-spacing: .3em; opacity: .7; font-family: var(--mono); }
.m-f { display: flex; justify-content: space-between; gap: 20px; font-size: 12px; margin-top: 6px; }
.m-f span { font-family: var(--mono); letter-spacing: .2em; opacity: .6; white-space: nowrap; }
.msvg { width: 100%; height: auto; display: block; font-family: var(--mono); }
.msvg text { font-size: 9px; text-anchor: middle; }
.msvg .zl { font-size: 9px; letter-spacing: .06em; }
.msvg .lg { text-anchor: start; }
.msvg .terr { fill: none; stroke-width: 2; }
.msvg .s line { stroke-width: 1; stroke-dasharray: 2 2; }
.msvg g[transform] > rect { stroke-width: 1; }
.msvg .you line { stroke-width: 3; stroke-linecap: round; }
.msvg .you text { font-weight: 700; letter-spacing: .2em; }
.msvg .dep path { stroke-width: 2; }
.msvg .z rect { stroke-width: 1; }
.th-dir .msvg { --ink: #1f2226; } .th-dir .msvg .terr, .th-dir .msvg .s line, .th-dir .msvg .s circle { stroke: #1f2226; } .th-dir .msvg text { fill: #1f2226; }
.th-dir .z-order rect { fill: rgba(200, 160, 60, .28); stroke: #8a6a2a; } .th-dir .z-directorate rect { fill: rgba(40, 90, 150, .3); stroke: #1d4f7a; } .th-dir .z-compact rect { fill: rgba(170, 70, 30, .3); stroke: #8a3a16; }
.th-dir .z-veyr rect { fill: url(#hatch); stroke: #2a6a7a; } .th-dir .hl { stroke: #2a6a7a; stroke-width: 1.5; } .th-dir .z-none rect { fill: none; stroke: rgba(31, 34, 38, .35); stroke-dasharray: 4 3; }
.th-dir .s circle { fill: #e6e1d2; stroke-width: 1.5; } .th-dir .you line { stroke: #b0281e; } .th-dir .you text { fill: #b0281e; } .th-dir .dep path { stroke: #1d4f7a; } .th-dir .dep text { fill: #1d4f7a; }
.th-comp .msvg .terr, .th-comp .msvg .s line, .th-comp .msvg .s circle { stroke: #c9a878; } .th-comp .msvg text { fill: #dccaa6; }
.th-comp .z-order rect { fill: rgba(220, 200, 150, .14); stroke: #a08860; } .th-comp .z-directorate rect { fill: rgba(120, 140, 160, .16); stroke: #708090; } .th-comp .z-compact rect { fill: rgba(200, 60, 20, .32); stroke: #c0241a; }
.th-comp .z-veyr rect { fill: url(#hatch); stroke: #5a9aa0; } .th-comp .hl { stroke: #5a9aa0; stroke-width: 1.5; } .th-comp .z-none rect { fill: none; stroke: rgba(220, 200, 160, .3); stroke-dasharray: 4 3; }
.th-comp .s circle { fill: #2c2018; stroke-width: 1.5; } .th-comp .you line { stroke: #ff3a20; } .th-comp .you text { fill: #ff5a30; } .th-comp .dep path { stroke: #ff8a52; } .th-comp .dep text { fill: #ff8a52; }
.th-order .msvg .terr, .th-order .msvg .s line, .th-order .msvg .s circle { stroke: #2b1d10; } .th-order .msvg text { fill: #2b1d10; font-family: 'IM Fell English', serif; font-size: 10px; }
.th-order .z-order rect { fill: rgba(176, 138, 50, .35); stroke: #8a6a2a; } .th-order .z-directorate rect { fill: rgba(70, 80, 100, .22); stroke: #3a4250; } .th-order .z-compact rect { fill: rgba(122, 22, 16, .25); stroke: #7a1610; }
.th-order .z-veyr rect { fill: url(#hatch); stroke: #3a5a6a; } .th-order .hl { stroke: #3a5a6a; stroke-width: 1.5; } .th-order .z-none rect { fill: none; stroke: rgba(43, 29, 16, .35); stroke-dasharray: 4 3; }
.th-order .s circle { fill: #efe3c2; stroke-width: 1.5; } .th-order .you line { stroke: #7a1610; } .th-order .you text { fill: #7a1610; } .th-order .dep path { stroke: #b08a32; } .th-order .dep text { fill: #8a6a2a; }
.verdict { max-width: 34em; margin: 12px auto 22px; font-family: 'IM Fell English', var(--serif); font-size: 18px; line-height: 1.45; color: var(--ink); }

/* the pause dossier wears the faction's book */
.pause.th-dir .paper.dossier { background-color: #e6e1d2; background-image: linear-gradient(90deg, transparent 26px, rgba(176, 40, 30, .5) 26px, rgba(176, 40, 30, .5) 27px, transparent 27px), repeating-linear-gradient(0deg, rgba(60, 90, 140, .14) 0 1px, transparent 1px 16px); }
.pause.th-comp .paper.dossier { background-color: #2c2018; color: #dccaa6; background-image: radial-gradient(ellipse 120px 70px at 88% 86%, rgba(110, 10, 8, .5), transparent 70%), var(--noise); clip-path: polygon(0 2%, 8% 0, 30% 1.5%, 55% 0, 80% 1.5%, 100% 0, 99% 30%, 100% 62%, 99% 100%, 70% 98.5%, 40% 100%, 12% 98.5%, 0 100%, 1% 55%); }
.pause.th-comp .paper.dossier h3, .pause.th-comp .paper.dossier .fac, .pause.th-comp .paper.dossier .desig, .pause.th-comp .paper.dossier dt { color: #c9a878; }
.pause.th-comp .p-menu button { color: #dccaa6; border-color: rgba(220, 200, 160, .35); }
.pause.th-order .paper.dossier { background-color: #efe3c2; border: 3px double #b08a32; outline: 1px solid #6e4f16; outline-offset: 4px; font-family: 'IM Fell English', var(--serif); }
