:root {
  --bg: #12070a;
  --bg2: #1b0c10;
  --panel: #22111a;
  --panel2: #2b1620;
  --velvet: #7a1222;
  --velvet-d: #4a0a15;
  --gold: #d9b45a;
  --gold-l: #f3dc9a;
  --gold-d: #9a7a2e;
  --cream: #f4ead6;
  --muted: #b9a58d;
  --line: rgba(217,180,90,.22);
  --ok: #7fc08a;
  --bad: #e2615c;
  --serif: 'Playfair Display', Georgia, serif;
  --display: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --logo: 'Limelight', 'Cinzel', Georgia, serif;
  --script: 'Pinyon Script', 'Playfair Display', Georgia, cursive;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --nav-w: 270px;
  --top-h: 60px;
}
* { box-sizing: border-box; }
/* themed scrollbars */
html { scrollbar-color: var(--velvet) var(--bg); scrollbar-width: thin; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg); border-left: 1px solid var(--line); }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--velvet), var(--velvet-d)); border: 2px solid var(--bg); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, var(--gold), var(--gold-d)); }
::-webkit-scrollbar-corner { background: var(--bg); }
.sidenav { scrollbar-width: thin; }
.sidenav::-webkit-scrollbar { width: 8px; }
.sidenav::-webkit-scrollbar-track { background: transparent; border: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--top-h) + 16px); }
body {
  margin: 0; background: var(--bg); color: var(--cream);
  font: 400 17px/1.65 var(--sans);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(122,18,34,.45), transparent 70%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(122,18,34,.18), transparent 70%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold-l); }
a:hover { color: #fff; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.2; margin: 0 0 .5em; letter-spacing: .02em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); color: var(--gold-l); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); color: var(--gold); margin-top: 2.4em; }
h3 { font-size: 1.15rem; color: var(--cream); margin-top: 1.8em; }
p { margin: 0 0 1em; }
kbd { font: 600 .75rem var(--sans); padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; color: var(--muted); background: rgba(255,255,255,.04); }
.skip { position: absolute; left: -999px; top: 0; background: var(--gold); color: #000; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
:focus-visible { outline: 2px solid var(--gold-l); outline-offset: 2px; border-radius: 4px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50; height: var(--top-h);
  display: flex; align-items: center; gap: 14px; padding: 0 18px;
  background: linear-gradient(180deg, rgba(18,7,10,.96), rgba(18,7,10,.88));
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.topbar::after { /* marquee bulbs */
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 4px;
  background: radial-gradient(circle, var(--gold-l) 0 1.6px, transparent 2.2px) 0 0/16px 4px repeat-x;
  opacity: .75; animation: bulbs 2.4s steps(2) infinite;
}
@keyframes bulbs { 50% { opacity: .35; } }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--gold-l); }
.brand-mask { font-size: 1.6rem; filter: drop-shadow(0 0 8px rgba(217,180,90,.5)); }
.brand-text { font: 900 1.15rem var(--display); letter-spacing: .12em; text-transform: uppercase; }
.brand-text i { font: italic 500 .9rem var(--serif); text-transform: none; color: var(--muted); letter-spacing: 0; margin: 0 2px; }
.icon-btn { background: none; border: 0; color: var(--gold-l); cursor: pointer; padding: 8px; border-radius: 8px; display: none; }
.search-btn {
  margin-left: auto; display: flex; align-items: center; gap: 10px; min-height: 40px;
  background: rgba(255,255,255,.05); border: 1px solid var(--line); color: var(--muted);
  padding: 0 12px; border-radius: 999px; cursor: pointer; font: 500 .9rem var(--sans); min-width: 240px;
}
.search-btn + .pdf-btn { margin-left: 0; }
.search-btn:hover { border-color: var(--gold); color: var(--cream); }
.search-btn kbd { margin-left: auto; }

/* ---------- shell / nav ---------- */
.shell { display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr) var(--nav-w); max-width: none; margin: 0; }
.sidenav {
  position: sticky; top: var(--top-h); align-self: start; height: calc(100vh - var(--top-h));
  overflow-y: auto; padding: 22px 14px 40px 18px; border-right: 1px solid var(--line);
}
.nav-sec { margin-bottom: 4px; }
.nav-group {
  display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 40px; margin: 0; padding: 8px 12px;
  background: none; border: 0; border-radius: 10px; cursor: pointer;
  font: 700 .7rem var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); text-align: left;
}
.nav-group:hover { background: rgba(255,255,255,.05); color: var(--gold-l); }
.nav-group .chev { width: 8px; height: 8px; margin-right: 4px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .25s; }
.nav-sec.open > .nav-group .chev { transform: rotate(-135deg) translate(-2px, -2px); }
.nav-items { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .25s ease; }
.nav-items > div { overflow: hidden; min-height: 0; }
.nav-sec.open > .nav-items { grid-template-rows: 1fr; }
@media (prefers-reduced-motion: reduce) { .nav-items, .nav-group .chev { transition: none; } }
.sidenav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px;
  color: var(--cream); text-decoration: none; font-size: .96rem; min-height: 40px; border: 1px solid transparent;
}
.sidenav a .ico { width: 1.4em; text-align: center; opacity: .9; }
.sidenav a:hover { background: rgba(255,255,255,.05); }
.sidenav a.active {
  background: linear-gradient(90deg, rgba(122,18,34,.7), rgba(122,18,34,.15));
  border-color: var(--line); color: var(--gold-l); font-weight: 600;
}
/* right column */
.sidenav-r {
  position: sticky; top: var(--top-h); align-self: start; height: calc(100vh - var(--top-h));
  display: flex; flex-direction: column; justify-content: flex-end; padding: 22px 18px 24px 14px; border-left: 1px solid var(--line);
}
.side-foot { font: 600 .8rem var(--sans); letter-spacing: .08em; color: var(--muted); text-align: center; padding-top: 14px; border-top: 1px solid var(--line); }
.side-foot a { color: inherit; text-decoration: none; border-bottom: 1px dotted currentColor; }
.side-foot a:hover, .side-foot a:focus-visible { color: var(--gold-l); border-bottom-color: var(--gold-l); }
.foot .cp { display: none; }
.scrim { display: none; }
main { padding: 36px clamp(18px, 4vw, 56px) 90px; min-width: 0; width: 100%; max-width: 1180px; margin: 0 auto; outline: 0; animation: fade .35s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: 22px; margin: -8px 0 34px;
  aspect-ratio: 2 / 1; min-height: 440px;
  padding: clamp(30px, 4.5%, 64px) clamp(22px, 5%, 60px) clamp(120px, 17%, 200px);
  border: 1px solid var(--line); text-align: center; isolation: isolate;
  background: #14070a url(../img/hero.webp) center bottom / cover no-repeat;
}
.hero::before { /* keeps the title readable over the backdrop, darkens the edges */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 60% 55% at 50% 38%, rgba(10,4,6,.62), transparent 75%),
    linear-gradient(180deg, rgba(10,4,6,.35), transparent 30%, transparent 70%, rgba(10,4,6,.45));
}
@media (max-width: 700px) { .hero { background-image: url(../img/hero-sm.webp); background-position: 50% 100%; aspect-ratio: auto; padding-bottom: 120px; } }
.hero .eyebrow { font: 600 .8rem var(--sans); letter-spacing: .35em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.hero h1 { font-size: clamp(2.4rem, 6.2vw, 5rem); font-weight: 900; letter-spacing: .06em; text-transform: uppercase; margin: 0;
  background: linear-gradient(180deg, #fff3c9, var(--gold) 55%, var(--gold-d)); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 18px rgba(0,0,0,.7)); }
.hero h1 small { display: block; font: italic 500 clamp(1rem, 3vw, 1.6rem) var(--serif); letter-spacing: .1em; text-transform: none; color: var(--cream); -webkit-text-fill-color: var(--cream); margin: .15em 0; }
.hero .tag { font: italic 500 clamp(1.05rem, 2.4vw, 1.4rem) var(--serif); color: var(--cream); max-width: 24em; margin: 14px auto 20px; }
.cta { display: inline-flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 22px; border-radius: 999px;
  font: 700 .9rem var(--sans); letter-spacing: .06em; text-transform: uppercase; text-decoration: none; cursor: pointer;
  border: 1px solid var(--gold); color: var(--gold-l); background: rgba(0,0,0,.35); transition: .2s;
}
.btn:hover { background: var(--gold); color: #1a0a0d; transform: translateY(-1px); }
.btn.primary { background: linear-gradient(180deg, var(--gold-l), var(--gold)); color: #1a0a0d; border-color: var(--gold-l); }
.btn.primary:hover { filter: brightness(1.1); }

/* ---------- generic blocks ---------- */
.page-head { margin-bottom: 28px; }
.page-head .kicker { font: 600 .75rem var(--sans); letter-spacing: .3em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.page-head .lede { font: italic 500 1.25rem/1.5 var(--serif); color: var(--muted); max-width: 44em; }
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); margin: 18px 0; }
.card {
  background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: 16px; padding: 20px;
  position: relative; transition: .2s;
}
a.card { text-decoration: none; color: inherit; display: block; }
a.card:hover { border-color: var(--gold); transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.card h3 { margin: 0 0 .4em; color: var(--gold-l); font-size: 1.05rem; }
.card p { color: var(--muted); font-size: .95rem; margin: 0; }
.card .big { font-size: 2rem; display: block; margin-bottom: 6px; }
.stat-row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); margin: 20px 0; }
.stat { text-align: center; padding: 18px 8px; border: 1px solid var(--line); border-radius: 14px; background: rgba(0,0,0,.25); }
.stat b { display: block; font: 900 2.2rem var(--display); color: var(--gold-l); line-height: 1; }
.stat span { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.callout { border-left: 4px solid var(--gold); background: rgba(217,180,90,.08); padding: 14px 18px; border-radius: 0 12px 12px 0; margin: 20px 0; }
.callout.warn { border-color: var(--bad); background: rgba(226,97,92,.08); }
.callout.joke { border-color: var(--velvet); background: rgba(122,18,34,.18); font-style: italic; font-family: var(--serif); }
.callout strong:first-child { color: var(--gold-l); }
.tag-pill { display: inline-block; font: 700 .68rem var(--sans); letter-spacing: .1em; text-transform: uppercase; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--gold); vertical-align: middle; }
.tag-pill.prov { color: #f0a868; border-color: rgba(240,168,104,.4); }
.tag-pill.star { background: var(--gold); color: #1a0a0d; border-color: var(--gold); }
ul.rules, ol.rules { padding-left: 1.2em; }
ul.rules li, ol.rules li { margin-bottom: .55em; padding-left: .2em; }
ul.rules li::marker { color: var(--gold); }
ol.rules li::marker { color: var(--gold); font-family: var(--display); font-weight: 700; }
code, .mono { font: 600 .92em ui-monospace, 'Cascadia Code', Consolas, monospace; background: rgba(255,255,255,.07); padding: 1px 6px; border-radius: 5px; color: var(--gold-l); }
.formula { display: block; padding: 14px 18px; margin: 14px 0; overflow-x: auto; background: #0c0508; border: 1px dashed var(--gold-d); border-radius: 12px; font: 500 .98rem/1.6 ui-monospace, Consolas, monospace; color: var(--gold-l); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: rgba(0,0,0,.2); margin: 16px 0; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid rgba(217,180,90,.1); vertical-align: top; }
th { font: 700 .72rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); background: rgba(0,0,0,.3); white-space: nowrap; }
th.sortable { cursor: pointer; user-select: none; } th.sortable:hover { color: #fff; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: center; }
td.rollcol { font: 700 1rem var(--display); color: var(--gold-l); width: 4.5em; white-space: nowrap; }
tbody tr:hover { background: rgba(255,255,255,.03); }
.die { display: inline-grid; place-items: center; width: 1.9em; height: 1.9em; border-radius: 7px; background: var(--cream); color: #1a0a0d; font: 900 .95rem var(--display); box-shadow: 0 2px 0 #b8a587, 0 4px 8px rgba(0,0,0,.5); }

/* ---------- timeline ---------- */
.timeline { position: relative; margin: 26px 0 26px 14px; padding-left: 34px; border-left: 2px solid var(--gold-d); }
.step { position: relative; margin-bottom: 26px; }
.step::before { content: attr(data-n); position: absolute; left: -57px; top: 0; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--velvet); border: 2px solid var(--gold); font: 900 1rem var(--display); color: var(--gold-l); box-shadow: 0 0 0 5px var(--bg); }
.step h3 { margin: 0 0 .3em; color: var(--gold-l); }
.step p { color: var(--cream); margin: 0 0 .4em; }
.step .sub { color: var(--muted); font-size: .95rem; }
.step ol.sub, .step ul.sub { color: var(--cream); font-size: .96rem; margin: .3em 0 .8em; }

/* ---------- table map ---------- */
.stage-wrap { max-width: 560px; margin: 24px auto; }
.stage { position: relative; padding: 12px 34px 12px 34px; }
.stage-mid { position: relative; }
.stage-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); gap: 4px; aspect-ratio: 1; padding: 4px;
  background: #0a0406; border: 3px solid var(--gold-d); border-radius: 6px; box-shadow: 0 0 40px rgba(122,18,34,.5) inset, 0 12px 40px rgba(0,0,0,.6); }
.cell { position: relative; border-radius: 4px; display: grid; place-items: center; text-align: center; padding: 4px;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.025) 0 8px, transparent 8px 16px), #1d0e13; border: 1px solid rgba(217,180,90,.15); font: 700 .8rem var(--display); color: var(--muted); }
.cell small { display: block; font: 500 .68rem var(--sans); color: var(--muted); letter-spacing: .04em; margin-top: 2px; }
.cell.lit { background: radial-gradient(circle at 50% 50%, rgba(255,235,170,.55), rgba(217,180,90,.18) 70%), #2b1a10; border-color: var(--gold-l); color: #fff; box-shadow: 0 0 22px rgba(243,220,154,.45) inset; }
.cell.z1 { box-shadow: inset 0 3px 0 rgba(243,220,154,.35); }
.cell.z3 { box-shadow: inset 0 -3px 0 rgba(0,0,0,.4); }
.stage .lbl { position: absolute; font: 700 .68rem var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); white-space: nowrap; }
.stage .cams { display: flex; justify-content: space-around; padding: 0 8%; margin: 0 0 8px; font-size: 1.7rem; line-height: 1; filter: drop-shadow(0 2px 6px rgba(0,0,0,.6)); }
.stage .lbl.front { position: static; text-align: center; margin-bottom: 6px; }
.stage .lbl.back { position: static; text-align: center; margin-top: 10px; color: var(--muted); }
.stage .lbl.left { left: -34px; top: 50%; transform: translate(-38%, -50%) rotate(-90deg); color: var(--muted); }
.stage .lbl.right { right: -34px; top: 50%; transform: translate(38%, -50%) rotate(90deg); color: var(--muted); }
.zonekey { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.mini { display: inline-grid; grid-template-columns: repeat(3, 14px); gap: 2px; vertical-align: middle; }
.mini i { width: 14px; height: 14px; border-radius: 2px; background: #2b1620; border: 1px solid rgba(217,180,90,.15); }
.mini i.on { background: var(--gold-l); border-color: var(--gold-l); box-shadow: 0 0 6px rgba(243,220,154,.7); }
.mini.big { grid-template-columns: repeat(3, 26px); gap: 3px; }
.mini.big i { width: 26px; height: 26px; }

/* ---------- classes ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 14px 0 20px; }
.chip { min-height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--cream); font: 600 .85rem var(--sans); cursor: pointer; }
.chip:hover { border-color: var(--gold); }
.chip.on { background: var(--gold); color: #1a0a0d; border-color: var(--gold); }
.filter-input { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(0,0,0,.35); color: var(--cream); font: 500 .95rem var(--sans); min-width: 200px; }
.filter-input:focus { outline: 2px solid var(--gold); }
.class-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.actor {
  position: relative; border-radius: 18px; padding: 0; overflow: hidden; border: 1px solid var(--line);
  background: linear-gradient(180deg, #2b1620, #1a0c11); transition: .2s;
}
.actor:hover { border-color: var(--gold); transform: translateY(-3px); box-shadow: 0 14px 34px rgba(0,0,0,.5); }
.actor-head { padding: 16px 18px 12px; background: linear-gradient(135deg, var(--velvet-d), transparent); display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.actor-head h3 { margin: 0; font-size: 1.1rem; color: var(--gold-l); }
.cost { font: 900 1.25rem var(--display); color: var(--gold-l); white-space: nowrap; }
.cost small { font-size: .65em; color: var(--muted); }
.actor-body { padding: 4px 18px 18px; }
.bars { display: grid; gap: 6px; margin: 10px 0 14px; }
.bar { display: grid; grid-template-columns: 38px 1fr 34px; align-items: center; gap: 8px; font-size: .78rem; }
.bar b { font: 700 .72rem var(--sans); letter-spacing: .1em; color: var(--muted); }
.bar .track { height: 8px; border-radius: 4px; background: rgba(255,255,255,.07); overflow: hidden; }
.bar .fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--velvet), var(--gold)); }
.bar em { font: 700 .85rem var(--display); font-style: normal; color: var(--cream); text-align: right; }
.trait { font-size: .92rem; padding: 10px 12px; border-radius: 10px; background: rgba(0,0,0,.28); border: 1px solid rgba(217,180,90,.12); }
.trait b { color: var(--gold-l); font-family: var(--serif); font-size: 1.02rem; display: block; }
.trait span { color: var(--muted); }
.legend-note { color: var(--muted); font-size: .9rem; }

/* ---------- clauses ---------- */
.clause-list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.clause { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); }
.clause h4 { margin: 0; font: 600 1.05rem var(--serif); color: var(--gold-l); }
.clause p { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: .94rem; line-height: 1.5; }
.clause .price { font: 900 1.05rem var(--display); color: var(--gold-l); align-self: start; }
.clause .price.neg { color: var(--ok); }
.cat-performing { border-top: 3px solid #d0583f; } .cat-improv { border-top: 3px solid #4f9bd1; } .cat-presence { border-top: 3px solid #b080d6; } .cat-star { border-top: 3px solid var(--gold); } .cat-demand { border-top: 3px solid var(--ok); }

/* ---------- d66 ---------- */
.d66 { display: grid; grid-template-columns: 50px repeat(6, 1fr); gap: 5px; margin: 18px 0; }
.d66 > * { min-height: 46px; display: grid; place-items: center; border-radius: 8px; font: 700 .85rem var(--display); }
.d66 .h { background: rgba(0,0,0,.3); color: var(--gold); font-size: .72rem; }
.d66 button { border: 1px solid var(--line); background: var(--panel); color: var(--cream); cursor: pointer; transition: .15s; }
.d66 button:hover { border-color: var(--gold); background: var(--velvet-d); }
.d66 button.sel { background: var(--gold); color: #1a0a0d; border-color: var(--gold-l); box-shadow: 0 0 18px rgba(243,220,154,.5); }
.call-detail { min-height: 120px; padding: 22px; border-radius: 16px; border: 1px solid var(--gold-d); background: radial-gradient(ellipse at top, rgba(122,18,34,.5), var(--panel)); text-align: center; }
.call-detail .n { font: 900 .9rem var(--display); letter-spacing: .3em; color: var(--gold); }
.call-detail h3 { font: italic 500 1.6rem var(--serif); color: var(--gold-l); margin: .2em 0; text-transform: none; }
.call-detail p { max-width: 36em; margin: 0 auto; color: var(--cream); }
.dice-row { display: flex; gap: 10px; justify-content: center; margin: 10px 0 4px; }
.rolling .die { animation: tumble .12s linear infinite; }
@keyframes tumble { 50% { transform: rotate(14deg) scale(1.08); } }
.dept-list { display: grid; gap: 22px; }
.dept h3 { margin: 0 0 8px; display: flex; gap: 10px; align-items: center; }
.dept h3 .die { width: 1.6em; height: 1.6em; font-size: .85rem; }
mark { background: rgba(243,220,154,.3); color: #fff; border-radius: 3px; padding: 0 2px; }

/* ---------- reference ---------- */
.ref-grid { columns: 2 340px; column-gap: 20px; }
.ref-grid .card { break-inside: avoid; margin-bottom: 16px; }
.ref-grid ul { margin: 0; padding-left: 1.1em; color: var(--cream); font-size: .95rem; }
.ref-grid li { margin-bottom: .3em; }

/* ---------- search ---------- */
.search-modal { position: fixed; inset: 0; z-index: 200; background: rgba(8,3,5,.78); backdrop-filter: blur(6px); display: flex; justify-content: center; align-items: flex-start; padding: 9vh 16px 16px; }
.search-modal[hidden] { display: none; }
.search-box { width: min(660px, 100%); background: var(--panel); border: 1px solid var(--gold-d); border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.7); overflow: hidden; }
.search-box input { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--cream); font: 500 1.15rem var(--sans); padding: 18px 22px; outline: 0; }
#searchResults { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow-y: auto; }
#searchResults li a { display: flex; gap: 12px; align-items: baseline; padding: 10px 14px; border-radius: 10px; color: var(--cream); text-decoration: none; }
#searchResults li a.hi, #searchResults li a:hover { background: var(--velvet-d); }
#searchResults .t { font-weight: 600; } #searchResults .k { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); min-width: 70px; }
#searchResults .s { color: var(--muted); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-hint { padding: 10px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; }
.empty { padding: 26px; text-align: center; color: var(--muted); font-family: var(--serif); font-style: italic; }

.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 60px; padding-top: 24px; border-top: 1px solid var(--line); }
.pager a { flex: 1; max-width: 48%; padding: 14px 18px; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--cream); background: var(--panel); }
.pager a:hover { border-color: var(--gold); }
.pager a small { display: block; color: var(--gold); font: 700 .68rem var(--sans); letter-spacing: .2em; text-transform: uppercase; }
.pager a.next { text-align: right; margin-left: auto; }
footer.foot { margin-top: 50px; text-align: center; color: var(--muted); font-size: .85rem; }

/* ---------- responsive ---------- */
@media (max-width: 1240px) {
  .shell { grid-template-columns: var(--nav-w) minmax(0, 1fr); }
  .sidenav-r { display: none; }
  .foot .cp { display: inline; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr !important; }
  .icon-btn { display: block; }
  .topbar .pdf-btn span { display: none; } .topbar .pdf-btn { width: 42px; padding: 0; justify-content: center; }
  .sidenav { position: fixed; z-index: 70; top: 0; left: 0; bottom: 0; width: min(310px, 85vw); height: auto; background: var(--bg2); transform: translateX(-102%); transition: transform .25s; padding-top: 20px; border-right: 1px solid var(--gold-d); }
  body.nav-open .sidenav { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.6); }
  body { font-size: 16.5px; }
  .brand-text { font-size: 1rem; }
  .d66 { grid-template-columns: 34px repeat(6, 1fr); gap: 3px; } .d66 > * { min-height: 42px; font-size: .75rem; }
  .stage { padding: 12px 26px; } .stage .lbl.left { left: -26px; } .stage .lbl.right { right: -26px; }
}
/* ---------- collapsible sections ---------- */
details.sec { margin: 2em 0 0; border-top: 1px solid var(--line); }
details.sec > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px; padding: 16px 4px; border-radius: 10px; }
details.sec > summary::-webkit-details-marker { display: none; }
details.sec > summary:hover h2 { color: var(--gold-l); }
details.sec > summary h2 { margin: 0; flex: 1; transition: color .2s; }
details.sec > summary::after {
  content: ""; flex: none; width: 11px; height: 11px; margin-right: 8px; border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold);
  transform: rotate(-135deg) translate(-3px, -3px); transition: transform .25s;
}
details.sec:not([open]) > summary::after { transform: rotate(45deg); }
.sec-body { padding-bottom: 10px; animation: fade .3s ease; }
.sec-body > :first-child { margin-top: 0; }
.sec-tools { display: flex; gap: 8px; justify-content: flex-end; margin: 0 0 6px; }
.sec-tools .chip { min-height: 32px; font-size: .78rem; padding: 0 14px; }

/* ---------- PDF download ---------- */
.pdf-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 999px; text-decoration: none;
  border: 1px solid var(--gold); color: #1a0a0d; background: linear-gradient(180deg, var(--gold-l), var(--gold)); font: 700 .82rem var(--sans); letter-spacing: .06em; text-transform: uppercase; cursor: pointer;
}
.pdf-btn:hover { filter: brightness(1.12); color: #1a0a0d; }

/* ---------- paper theme (PDF export and browser print) ---------- */
body.paper {
  --bg: #fff; --bg2: #fff; --panel: #fbf6ea; --panel2: #fbf6ea; --velvet: #7a1222; --velvet-d: #f3e3e3;
  --gold: #8a6a1c; --gold-l: #6a0f1c; --gold-d: #b8975a; --cream: #1c1214; --muted: #5b4a46; --line: rgba(60,30,20,.25);
  background: #fff; color: #1c1214; font-size: 10.5pt; line-height: 1.5;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
body.paper h1, body.paper h2 { color: #6a0f1c; }
body.paper h3 { color: #1c1214; }
body.paper a { color: #6a0f1c; }
body.paper .topbar, body.paper .sidenav, body.paper .sidenav-r, body.paper .search-modal, body.paper .pager, body.paper .foot,
body.paper .toolbar, body.paper .cta, body.paper .sec-tools, body.paper .noprint, body.paper .scrim { display: none !important; }
body.paper .shell { display: block; }
body.paper main { max-width: none; padding: 0; animation: none; }
body.paper .card, body.paper .clause, body.paper .actor, body.paper .stat, body.paper .tablewrap { background: #fbf6ea; box-shadow: none; border-color: rgba(60,30,20,.25); }
body.paper .actor-head { background: #f3e3e3; }
body.paper .formula { background: #fbf6ea; color: #6a0f1c; border-color: #b8975a; }
body.paper code, body.paper .mono { background: #f1e8d4; color: #6a0f1c; }
body.paper th { background: #f1e8d4; color: #6a0f1c; }
body.paper td.rollcol, body.paper .cost, body.paper .clause h4, body.paper .card h3, body.paper .actor-head h3, body.paper .stat b, body.paper .trait b, body.paper .clause .price { color: #6a0f1c; }
body.paper .die { background: #fff; border: 1.5px solid #6a0f1c; color: #6a0f1c; box-shadow: none; }
body.paper .bar .track { background: #e8dfcd; } body.paper .bar .fill { background: linear-gradient(90deg, #7a1222, #b8975a); }
body.paper .trait { background: #fff; }
body.paper .stage-grid { background: #6a0f1c; border-color: #6a0f1c; box-shadow: none; }
body.paper .cell { background: #f7efe0; color: #5b4a46; border-color: #d9c9a3; }
body.paper .cell.lit { background: #f1d98f; color: #1c1214; border-color: #8a6a1c; box-shadow: none; }
body.paper .stage .lbl { color: #5b4a46; }
body.paper .mini i { background: #e8dfcd; border-color: #b8975a; } body.paper .mini i.on { background: #6a0f1c; border-color: #6a0f1c; box-shadow: none; }
body.paper .callout { background: #f7efe0; } body.paper .callout.warn { background: #f8e3e1; } body.paper .callout.joke { background: #f3e3e3; }
body.paper .tag-pill { color: #6a0f1c; border-color: #b8975a; } body.paper .tag-pill.star { background: #8a6a1c; color: #fff; }
body.paper .step::before { background: #6a0f1c; color: #fff; border-color: #8a6a1c; box-shadow: 0 0 0 5px #fff; }
body.paper .timeline { border-color: #b8975a; margin-left: 32px; }
/* no logo on paper */
body.paper details.sec { break-inside: auto; }
body.paper .card, body.paper .clause, body.paper .actor, body.paper tr { break-inside: avoid; }
body.paper .dl-panel { display: none !important; }
body.paper h1, body.paper h2, body.paper h3 { break-after: avoid; }
body.paper .d66 button { background: #fbf6ea; color: #1c1214; border-color: #d9c9a3; }
body.paper .d66 .h { background: #f1e8d4; color: #6a0f1c; }
body.paper .call-detail { background: #fbf6ea; }
/* collapsible sections never hide content on paper */
body.paper details.sec > summary::after { display: none; }
body.paper details.sec { border-top: 0; margin-top: 1.2em; }
body.paper details.sec > summary { padding: 0; }
body.paper .page-head .lede { color: #5b4a46; }

/* print-all route */
.print-page { break-before: page; }
.print-page:first-of-type { break-before: auto; }
.print-cover { min-height: 250mm; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20mm 10mm; break-after: page; border: 3px double #8a6a1c; }
.print-cover .eyebrow { font: 600 10pt var(--sans); letter-spacing: .35em; text-transform: uppercase; color: #8a6a1c; }
.print-cover h1 { font-size: 46pt; letter-spacing: .06em; text-transform: uppercase; margin: .3em 0; color: #6a0f1c; }
.print-cover .ver { font: italic 500 16pt var(--serif); color: #1c1214; }
.print-cover .tag { font: italic 500 13pt var(--serif); max-width: 28em; margin: 2.2em auto 0; color: #5b4a46; }
.print-cover .cp { margin-top: 5em; font: 600 10pt var(--sans); letter-spacing: .1em; color: #5b4a46; }
.print-toc { break-after: page; }
.print-toc ol { columns: 1; font: 500 13pt var(--serif); line-height: 2; }
@page { size: A4; margin: 16mm 14mm 18mm; @bottom-center { content: counter(page); font: 9pt Georgia, serif; color: #5b4a46; } }
@page :first { @bottom-center { content: none; } }
@media print {
  .topbar, .sidenav, .sidenav-r, .pager, .search-modal, .toolbar, .cta, .sec-tools { display: none !important; }
  .shell { display: block; } main { padding: 0; max-width: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
body.paper details.sec > summary { break-after: avoid; }

/* ---------- shot gallery ---------- */
.shot-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); margin: 18px 0; }
.shot { background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-top: 4px solid var(--c); border-radius: 14px; padding: 14px 16px 16px; }
.shot header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.shot h3 { margin: 0; font-size: 1rem; color: var(--cream); }
.shot-map { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; background: #0a0406; border: 2px solid var(--gold-d); border-radius: 6px; }
.shot-map i { aspect-ratio: 1; display: grid; place-items: center; border-radius: 3px; font: 700 .72rem var(--display); font-style: normal; color: rgba(185,165,141,.55); background: #1d0e13; border: 1px solid rgba(217,180,90,.12); }
.shot-map i.on { background: var(--c); color: #1a0a0d; border-color: rgba(255,255,255,.45); box-shadow: 0 0 14px color-mix(in srgb, var(--c) 60%, transparent); }
.shot p { margin: 10px 0 0; text-align: center; font: 600 .78rem var(--sans); letter-spacing: .08em; color: var(--muted); }
body.paper .shot-map { background: #6a0f1c; border-color: #6a0f1c; } body.paper .shot-map i { background: #f7efe0; color: #8a7a68; border-color: #d9c9a3; } body.paper .shot-map i.on { color: #1a0a0d; box-shadow: none; }
body.paper .shot { break-inside: avoid; }

.shot small { display: block; text-align: center; margin-top: 4px; font: 500 .72rem var(--sans); color: var(--muted); opacity: .8; }

/* title + subtitle */
.hero h1 em { display: block; margin-top: .1em; font: italic 500 clamp(1.1rem, 3.2vw, 2rem) var(--serif); letter-spacing: .14em; text-transform: none; -webkit-text-fill-color: var(--gold-l); color: var(--gold-l); filter: none; }
.brand-text i { white-space: nowrap; }
@media (max-width: 480px) { .brand-text i { display: none; } }

/* ---------- 1940s logo type + special-edition badge ---------- */
.hero h1 { font-family: var(--logo); font-weight: 400; letter-spacing: .05em; line-height: 1.02; }
.hero h1 small { font-family: var(--serif); }
.hero h1 em { font: 400 clamp(1.7rem, 5.2vw, 3.2rem) var(--script); letter-spacing: .02em; margin-top: .05em; }
.brand-text { font-family: var(--logo); font-weight: 400; letter-spacing: .08em; font-size: 1.05rem; }
.brand-text i { font: italic 500 .9rem var(--serif); letter-spacing: 0; }
.print-cover h1 { font-family: var(--logo); font-weight: 400; }

p.lead { font: italic 500 1.35rem/1.5 var(--serif); color: var(--gold-l); }

/* grid markers drawn on the set map */
.stage-grid { position: relative; }
.markers { position: absolute; inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px); pointer-events: none; overflow: visible; }
.markers .tri path { fill: var(--gold-l); }
.markers .crs path { fill: none; stroke: var(--gold-l); stroke-width: 1.1; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-width: 2px; }
body.paper .markers .tri path { fill: #f1d98f; } body.paper .markers .crs path { stroke: #f1d98f; }
.nav-sec:not(.open) .nav-items a { visibility: hidden; }   /* closed groups are not reachable by keyboard */

/* clause filter chips take the colour of their category (same as the card top borders) */
.chip[data-cat] { --c: var(--gold); border-color: color-mix(in srgb, var(--c) 75%, transparent); }
.chip[data-cat="performing"] { --c: #d0583f; }
.chip[data-cat="improv"] { --c: #4f9bd1; }
.chip[data-cat="presence"] { --c: #b080d6; }
.chip[data-cat="star"] { --c: var(--gold); }
.chip[data-cat]:not([data-cat="all"])::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--c); vertical-align: 1px; }
@media (hover: hover) { .chip[data-cat]:hover:not(.on) { border-color: var(--c); background: color-mix(in srgb, var(--c) 18%, transparent); } }
.chip[data-cat].on { background: var(--c); border-color: var(--c); color: #1a0a0d; }
.chip[data-cat].on::before { background: #1a0a0d; }

.cat-crew { border-top: 3px solid #3fc0b8; }
.clause .tag-pill { font-size: .6rem; margin-left: 6px; }

#searchResults .k { flex: none; width: 104px; }
#searchResults li a { align-items: baseline; }

/* wider search window, no horizontal scroll, snippets wrap on two lines */
.search-box { width: min(1000px, 100%); }
.search-modal { padding-top: 7vh; }
#searchResults { max-height: 66vh; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: rgba(217,180,90,.35) transparent; }
#searchResults::-webkit-scrollbar { width: 6px; height: 0; }
#searchResults::-webkit-scrollbar-track { background: transparent; border: 0; }
#searchResults::-webkit-scrollbar-thumb { background: rgba(217,180,90,.35); border-radius: 6px; border: 0; }
#searchResults li a > span:last-child { flex: 1; min-width: 0; }
#searchResults .s { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; overflow: hidden; text-overflow: clip; }

/* sections are always open: a thin rule above each section title keeps the structure */
main > h2, .home-body > h2 { margin-top: 2.2em; padding-top: 1.1em; border-top: 1px solid var(--line); }
body.paper main h2, body.paper .print-page > h2 { border-top: 0; padding-top: 0; }

/* =============== Call Sheet builder =============== */
.cs-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 18px 0 14px; }
.cs-pick { display: flex; align-items: center; gap: 8px; font: 600 .8rem var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.cs-pick select, .cs-fields input, .cs-fields select, .cs-actor input[type="text"], .cs-actor input:not([type]), .cs-actor select {
  min-height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0,0,0,.35); color: var(--cream); font: 500 .95rem var(--sans); max-width: 100%;
}
.cs-saved { margin-left: auto; font-size: .82rem; color: var(--muted); }
.cs-fields { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-bottom: 22px; }
.cs-fields label, .cs-row label, .cs-actor > label { display: grid; gap: 4px; font: 600 .7rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.cs-fields input, .cs-fields select { width: 100%; text-transform: none; letter-spacing: 0; }
.cs-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 22px; align-items: start; }
.cs-main #csActors { display: grid; gap: 16px; }
.cs-actor { padding: 16px 18px 14px; border-radius: 16px; border: 1px solid var(--line); background: linear-gradient(180deg, var(--panel2), var(--panel)); display: grid; gap: 10px; }
.cs-actor.is-star { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(217,180,90,.35), 0 0 30px rgba(217,180,90,.12); }
.cs-actor header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cs-num { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--velvet); border: 1px solid var(--gold); font: 900 .95rem var(--display); color: var(--gold-l); }
.cs-name { flex: 1 1 160px; min-width: 0; font-weight: 600; }
.cs-star { display: flex !important; align-items: center; gap: 6px; font: 700 .72rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-l) !important; cursor: pointer; }
.cs-star input { width: 20px; height: 20px; accent-color: var(--gold); }
.cs-cost { font: 900 1.2rem var(--display); color: var(--gold-l); min-width: 56px; text-align: right; }
.cs-row { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.cs-row select, .cs-actor > label input { width: 100%; text-transform: none; letter-spacing: 0; }
.cs-stats { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.cs-stats div { text-align: center; padding: 6px 2px; border-radius: 8px; background: rgba(0,0,0,.3); border: 1px solid rgba(217,180,90,.14); }
.cs-stats b { display: block; font: 700 .62rem var(--sans); letter-spacing: .1em; color: var(--muted); }
.cs-stats span { font: 900 1.05rem var(--display); color: var(--cream); }
.cs-stats .cs-empty { grid-column: 1 / -1; padding: 10px; font-style: italic; color: var(--muted); font-family: var(--serif); background: none; border-style: dashed; }
.cs-trait, .cs-demandtext { margin: 0; font-size: .88rem; color: var(--muted); }
.cs-trait strong, .cs-demandtext strong { color: var(--gold-l); font-family: var(--serif); }
.cs-clhead { font: 700 .7rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); display: flex; gap: 10px; }
.cs-clcount { color: var(--muted); }
.cs-clauses, .cs-crew { display: flex; flex-wrap: wrap; gap: 6px; }
.cs-chip { --c: var(--gold); min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--c) 60%, transparent); background: rgba(255,255,255,.03); color: var(--cream); font: 600 .8rem var(--sans); cursor: pointer; }
.cs-chip b { color: var(--c); font-family: var(--display); margin-left: 4px; }
.cs-chip[data-cat="performing"] { --c: #d0583f; } .cs-chip[data-cat="improv"] { --c: #4f9bd1; } .cs-chip[data-cat="presence"] { --c: #b080d6; } .cs-chip[data-cat="star"] { --c: var(--gold); } .cs-chip[data-cat="crew"] { --c: #3fc0b8; }
@media (hover: hover) { .cs-chip:hover:not(:disabled):not(.on) { background: color-mix(in srgb, var(--c) 20%, transparent); } }
.cs-chip.on, .cs-chip.on:hover { background: var(--c); border-color: var(--c); color: #1a0a0d; } .cs-chip.on b, .cs-chip.on:hover b { color: #1a0a0d; }
.cs-chip.off { opacity: .35; cursor: not-allowed; }
.cs-side { position: sticky; top: calc(var(--top-h) + 16px); }
.cs-sum { padding: 16px 18px; border-radius: 16px; border: 1px solid var(--gold-d); background: linear-gradient(180deg, var(--panel2), var(--panel)); }
.cs-sum h3 { margin: 0 0 10px; }
.cs-meter { height: 10px; border-radius: 6px; background: rgba(255,255,255,.08); overflow: hidden; }
.cs-meter div { height: 100%; background: linear-gradient(90deg, var(--velvet), var(--gold)); transition: width .25s; }
.cs-meter.over div { background: var(--bad); }
.cs-total { margin: 8px 0 12px; } .cs-total b { font: 900 1.5rem var(--display); color: var(--gold-l); } .cs-total span { float: right; color: var(--ok); font-weight: 600; } .cs-total span.bad { color: var(--bad); }
.cs-lines { list-style: none; margin: 0 0 12px; padding: 0; font-size: .88rem; }
.cs-lines li { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px solid rgba(217,180,90,.1); }
.cs-lines li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-lines b { font-family: var(--display); color: var(--gold-l); }
.cs-pr { margin: 0 0 12px; font-size: .92rem; }
.cs-status { text-align: center; padding: 8px; border-radius: 10px; font: 700 .8rem var(--sans); letter-spacing: .1em; text-transform: uppercase; }
.cs-status.ok { background: rgba(127,192,138,.16); color: var(--ok); border: 1px solid rgba(127,192,138,.5); }
.cs-status.bad { background: rgba(226,97,92,.12); color: var(--bad); border: 1px solid rgba(226,97,92,.45); }
.cs-msgs { margin: 12px 0 0; padding-left: 1.1em; font-size: .86rem; } .cs-msgs li { margin-bottom: 4px; } .cs-msgs li.error { color: #f0948f; } .cs-msgs li.warn { color: var(--muted); }
.cs-print { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 30px; }
.sheet-preview { width: 100%; max-width: 420px; height: auto; display: block; margin-top: 12px; border-radius: 6px; border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0,0,0,.5); }
@media (max-width: 980px) { .cs-layout { grid-template-columns: 1fr; } .cs-side { position: static; order: -1; } .cs-stats { grid-template-columns: repeat(4, 1fr); } }

/* =============== Call Sheet: the printed page (A4, one page) =============== */
.cs-sheet { color: #1c1214; font: 400 8.6pt/1.3 var(--sans); }
.cs-sheet h1 { font: 400 22pt var(--logo); letter-spacing: .06em; text-transform: uppercase; margin: 0; color: #6a0f1c; line-height: 1; }
.cs-sheet small { font: 700 6pt var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #8a6a1c; display: block; }
.sh-head { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 2px solid #6a0f1c; padding-bottom: 2mm; margin-bottom: 2.5mm; }
.sh-brand { font: 700 7pt var(--sans); letter-spacing: .25em; text-transform: uppercase; color: #8a6a1c; } .sh-brand i { font: italic 500 8pt var(--serif); letter-spacing: 0; text-transform: none; }
.sh-sub { font: italic 500 9pt var(--serif); color: #5b4a46; }
.sh-fields { display: grid; grid-template-columns: 2fr 1.4fr 1.4fr 1fr; gap: 2mm 4mm; margin-bottom: 2mm; }
.sh-field { border-bottom: 1px solid #1c1214; min-height: 7mm; padding-bottom: .5mm; } .sh-field.wide { grid-column: 1 / 2; }
.sh-field span { display: block; font: 600 10pt var(--sans); }
.sh-genre { display: flex; flex-wrap: wrap; gap: 1mm 5mm; align-items: center; margin: 0 0 2.5mm; font-size: 8pt; } .sh-genre small { margin-right: 2mm; }
.sh-box { display: inline-block; width: 3mm; height: 3mm; border: 1.1px solid #1c1214; border-radius: 1px; vertical-align: -.6mm; margin-right: .6mm; position: relative; } .sh-box.on::after { content: ""; position: absolute; inset: .45mm; background: #6a0f1c; }
.sh-circle { display: inline-block; width: 3.2mm; height: 3.2mm; border: 1.1px solid #1c1214; border-radius: 50%; margin-right: .8mm; vertical-align: -.7mm; } .sh-circle.faint { border-color: #bbb; }
.sh-actor { border: 1px solid #1c1214; border-radius: 2mm; padding: 1.3mm 2.4mm 1.2mm; margin-bottom: 1.8mm; background: #fffdf7; break-inside: avoid; }
.sh-actor.star { border-width: 1.6px; border-color: #8a6a1c; background: #fcf6e4; }
.sh-top { display: grid; grid-template-columns: 6mm 1.7fr 1.2fr auto 14mm; gap: 3mm; align-items: end; }
.sh-n { width: 5.5mm; height: 5.5mm; border-radius: 50%; background: #6a0f1c; color: #fff; display: grid; place-items: center; font: 700 8pt var(--sans); }
.sh-top .sh-field { min-height: 6mm; } .sh-starmark { font: 700 8pt var(--sans); text-transform: uppercase; letter-spacing: .1em; color: #6a0f1c; padding-bottom: .5mm; }
.sh-cost { font: 700 11pt var(--sans); color: #6a0f1c; text-align: right; }
.sh-body { display: grid; grid-template-columns: 1.3fr 1fr; gap: 4mm; align-items: end; margin: 1.2mm 0; }
.sh-stats { display: grid; grid-template-columns: repeat(8, 1fr); gap: 1mm; }
.sh-stats div { border: 1px solid #1c1214; border-radius: 1mm; text-align: center; padding-bottom: .4mm; }
.sh-stats b { display: block; background: #f1e8d4; font: 700 6pt var(--sans); letter-spacing: .08em; padding: .2mm 0; border-bottom: 1px solid #1c1214; }
.sh-stats span { font: 700 10pt var(--sans); display: block; line-height: 1.2; }
.sh-side .sh-field { min-height: 6mm; }
.sh-paintrow { display: flex; flex-wrap: wrap; gap: .6mm 2.4mm; font-size: 7pt; margin-top: 1.2mm; }
.sh-lines .two { display: grid; grid-template-columns: 1.5fr 1fr; gap: 4mm; border-bottom: 0; }
.sh-lines .two span { border-bottom: 1px dotted #888; min-height: 3.6mm; display: block; }
.sh-paint { display: flex; gap: 3mm; font-size: 7.6pt; } .sh-role { font-size: 7.6pt; font-weight: 600; white-space: nowrap; }
.sh-lines p { margin: .5mm 0 0; border-bottom: 1px dotted #888; min-height: 3.6mm; } .sh-lines p b { color: #6a0f1c; font-size: 7.4pt; } .sh-lines .sh-trait { font-size: 6.9pt; color: #5b4a46; border-bottom: 0; font-style: italic; }
.sh-track { display: flex; gap: 6mm; align-items: center; margin-top: .8mm; font-size: 7.4pt; } .sh-track b { font-size: 6.6pt; letter-spacing: .08em; text-transform: uppercase; color: #6a0f1c; margin-right: 1mm; }
.sh-write { display: inline-block; width: 16mm; border-bottom: 1px solid #1c1214; height: 3.6mm; }
.sh-bottom { display: grid; grid-template-columns: 1.55fr 1fr; gap: 4mm; margin-top: 1mm; }
.sh-bottom section { border: 1px solid #1c1214; border-radius: 2mm; padding: 1.6mm 2.4mm; }
.sh-bottom h3 { font: 700 8pt var(--sans); letter-spacing: .12em; text-transform: uppercase; color: #6a0f1c; margin: 0 0 1mm; } .sh-bottom h3 small { display: inline; font-size: 6.4pt; }
.sh-crew p { margin: .4mm 0 0; border-bottom: 1px dotted #888; min-height: 3.8mm; font-size: 7.2pt; } .sh-crew p span { color: #6a0f1c; font-weight: 700; }
.sh-budget p { margin: .6mm 0; font-size: 8pt; } .sh-markers { display: flex; align-items: center; gap: 1mm; } .sh-markers b { min-width: 14mm; font-size: 7pt; text-transform: uppercase; letter-spacing: .08em; color: #6a0f1c; }
.sh-notes { margin-top: 1.6mm; } .sh-notes div { border-bottom: 1px solid #aaa; height: 5mm; }
body.print-all .cs-sheet { margin: 0; }
body.paper main:has(.cs-sheet) { padding: 0; }

.sh-budget .sh-write { width: 11mm; }

/* print sheet: one-line fields never overlap their captions */
.sh-field span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* =============== Call Sheet button and overlay =============== */
.tool-fab {
  position: fixed; left: 18px; bottom: 18px; z-index: 80; min-height: 46px; padding: 0 18px 0 14px; border-radius: 999px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--gold-l); color: #1a0a0d;
  background: linear-gradient(180deg, var(--gold-l), var(--gold)); font: 700 .82rem var(--sans); letter-spacing: .08em; text-transform: uppercase;
  box-shadow: 0 8px 26px rgba(0,0,0,.55), 0 0 0 4px rgba(18,7,10,.6);
}
.tool-fab:hover { filter: brightness(1.1); transform: translateY(-1px); }
body.tool-open .tool-fab { display: none; }
body.tool-open { overflow: hidden; }
.sidenav { padding-bottom: 84px; }
.tool-modal { position: fixed; inset: 0; z-index: 120; background: rgba(8,3,5,.84); backdrop-filter: blur(6px); display: flex; justify-content: center; align-items: stretch; padding: 3vh 2vw; overflow: hidden; }
.tool-modal[hidden] { display: none; }
.tool-panel { width: min(1240px, 100%); display: flex; flex-direction: column; background: var(--bg2); border: 1px solid var(--gold-d); border-radius: 18px; box-shadow: 0 30px 90px rgba(0,0,0,.7); overflow: hidden; }
.tool-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(122,18,34,.35), transparent); flex: none; }
.tool-head small { font: 700 .66rem var(--sans); letter-spacing: .28em; text-transform: uppercase; color: var(--gold); }
.tool-head h2 { margin: 0; font-family: var(--logo); font-weight: 400; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-l); font-size: 1.5rem; }
.tool-close { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--gold-l); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.tool-close:hover { border-color: var(--gold); background: rgba(255,255,255,.1); }
.tool-body { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 24px 30px; }
.tool-body .cs-side { top: 12px; }
.tool-body > p:first-child { margin-top: 14px; }
@media (max-width: 700px) { .tool-modal { padding: 0; } .tool-panel { border-radius: 0; border-width: 0; } .tool-body { padding: 4px 14px 24px; } .tool-fab > span { display: none; } .tool-fab { padding: 0; width: 50px; justify-content: center; } }
@media print { .tool-fab, .tool-modal, .confirm-modal { display: none !important; } }

/* themed confirmation dialog */
.confirm-modal { position: fixed; inset: 0; z-index: 300; background: rgba(8,3,5,.78); backdrop-filter: blur(5px); display: flex; align-items: center; justify-content: center; padding: 16px; }
.confirm-modal[hidden] { display: none; }
.confirm-box { width: min(440px, 100%); padding: 24px 26px 20px; border-radius: 18px; border: 1px solid var(--gold-d); background: linear-gradient(180deg, var(--panel2), var(--panel)); box-shadow: 0 30px 80px rgba(0,0,0,.7); }
.confirm-box p { margin: 0 0 20px; font: 500 1.05rem/1.5 var(--serif); color: var(--cream); }
.confirm-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* print sheet: guaranteed to stay on one page, whatever the cast */
.sh-crew p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-actor { margin-bottom: 1.5mm; }
.sh-notes div { height: 4.4mm; }
.sh-lines p:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-lines .two span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* two tool buttons, stacked at the bottom left: Call Sheet above, Production Report below */
.tool-fab:not(.report) { bottom: 74px; }
.tool-fab.report { bottom: 18px; background: linear-gradient(180deg, var(--panel2), var(--panel)); color: var(--gold-l); border-color: var(--gold-d); }
.tool-fab.report:hover { filter: none; border-color: var(--gold-l); background: linear-gradient(180deg, #3a1c28, var(--panel2)); }
.sidenav { padding-bottom: 150px; }
.tool-panel.narrow { width: min(560px, 100%); align-self: center; max-height: 94vh; }
.report-body { text-align: left; }
.report-body > p:first-child { margin-top: 18px; }
@media (max-width: 700px) {
  .tool-fab:not(.report) { bottom: 76px; } .tool-fab.report { bottom: 18px; padding: 0; width: 50px; justify-content: center; } .tool-fab.report span { display: none; }
  .tool-panel.narrow { align-self: stretch; max-height: none; }
}
@media print { .tool-fab { display: none !important; } }

/* =============== one button style everywhere: dark, thin gold border (the Production Report button) =============== */
.btn, .btn.primary, .pdf-btn, .tool-fab, .tool-fab.report {
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  border: 1px solid var(--gold-d);
  color: var(--gold-l);
  box-shadow: none;
  text-shadow: none;
}
.btn:hover, .btn.primary:hover, .pdf-btn:hover, .tool-fab:hover, .tool-fab.report:hover {
  background: linear-gradient(180deg, #3a1c28, var(--panel2));
  border-color: var(--gold-l);
  color: #fff;
  filter: none;
}
.btn:focus-visible, .pdf-btn:focus-visible, .tool-fab:focus-visible { outline: 2px solid var(--gold-l); outline-offset: 3px; }
.tool-fab, .tool-fab.report { box-shadow: 0 8px 26px rgba(0,0,0,.55); }
.tool-fab:hover, .tool-fab.report:hover { transform: translateY(-1px); }
body.paper .btn, body.paper .pdf-btn { display: none; }

/* =============== home: the image runs edge to edge between the two columns and fades into the page =============== */
main.is-home { max-width: none; padding: 0 0 90px; }
main.is-home .hero {
  margin: 0; border: 0; border-radius: 0; aspect-ratio: auto; overflow: hidden;
  min-height: clamp(520px, 46vw, 680px);
  padding: clamp(46px, 7vw, 84px) clamp(18px, 4vw, 56px) clamp(150px, 15vw, 210px);
  background-position: center 18%;
}
main.is-home .hero::before {
  background:
    radial-gradient(ellipse 52% 50% at 50% 40%, rgba(10,4,6,.58), transparent 78%),
    linear-gradient(90deg, rgba(18,7,10,.75), transparent 16%, transparent 84%, rgba(18,7,10,.75)),
    linear-gradient(180deg, rgba(10,4,6,.35), transparent 24%);
}
main.is-home .hero::after {            /* the fade into the page */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 46%; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(18,7,10,.72) 55%, var(--bg) 100%);
}
.home-body { max-width: 1180px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 56px); }
.home-body .stat-row { margin-top: -64px; position: relative; z-index: 2; }
.home-body .stat { background: rgba(18,7,10,.82); backdrop-filter: blur(4px); }
@media (max-width: 700px) {
  main.is-home .hero { min-height: 0; padding-bottom: 120px; }
  .home-body .stat-row { margin-top: -40px; }
}

/* the two tool buttons are as wide as the side column (desktop); compact icons when the menu becomes a drawer */
@media (min-width: 901px) { .tool-fab { width: calc(var(--nav-w) - 36px); padding: 0 16px; justify-content: center; } }
@media (min-width: 701px) and (max-width: 900px) {
  .tool-fab { padding: 0; width: 50px; justify-content: center; } .tool-fab > span { display: none; }
  .tool-fab:not(.report) { bottom: 76px; }
}

/* three buttons at the bottom left: Download rules on top, Call Sheet, Production Report */
.tool-fab.download { bottom: 130px; }
.sidenav { padding-bottom: 206px; }
@media (min-width: 701px) and (max-width: 900px) { .tool-fab.download { bottom: 134px; } }
@media (max-width: 700px) { .tool-fab.download { bottom: 134px; } }

.die.range { width: auto; min-width: 1.9em; padding: 0 .55em; white-space: nowrap; }
.die { flex: none; }   /* a die is never squeezed by a flex container (shot tiles) */

/* brand centred in the header; the search box sits at the top of the side column */
.topbar { justify-content: center; position: sticky; }
.topbar .burger { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); }
.topbar .search-mini { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); }
.search-mini { display: none; }
#sidenav .search-btn { width: 100%; min-width: 0; margin: 0 0 16px; }
@media (max-width: 900px) { .search-mini { display: block; } .brand-text i { display: none; } }

/* campaign assets */
.cat-office { border-top: 3px solid #4fa35a; }
.cat-set { border-top: 3px solid #d0583f; }

.tm-cat small { font: 500 .85rem var(--serif); font-style: italic; color: var(--muted); margin-left: 8px; text-transform: none; letter-spacing: 0; }

.sidenav-r .tool-fab { position: static; width: 100%; margin: 0 0 14px; bottom: auto; left: auto; box-shadow: none; }
.tool-panel.mid { width: min(840px, 100%); }
/* the tools and downloads, grouped, at the top right */
.dl-panel { position: fixed; z-index: 80; right: 18px; top: calc(var(--top-h) + 18px); width: calc(var(--nav-w) - 36px); display: flex; flex-direction: column; gap: 14px; }
.dl-group h2 { margin: 0 0 7px 8px; font: 700 .66rem var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.dl-group .tool-fab { position: static; width: 100%; margin: 0 0 8px; justify-content: center; }
.dl-group .tool-fab:last-child { margin-bottom: 0; }
body.tool-open .dl-panel { display: none; }
.sidenav { padding-bottom: 24px; }
@media (min-width: 1241px) { #toolBtn { font-size: .74rem; letter-spacing: .04em; gap: 8px; padding: 0 10px; white-space: nowrap; } }
@media (max-width: 1240px) {
  .dl-panel { right: 12px; top: calc(var(--top-h) + 12px); width: 50px; gap: 10px; }
  .dl-group h2 { display: none; }
  .dl-group { padding-top: 10px; border-top: 1px solid var(--line); }
  .dl-group:first-child { padding-top: 0; border-top: 0; }
  .dl-group .tool-fab { width: 50px; padding: 0; justify-content: center; }
  .dl-group .tool-fab > span { display: none; }
  /* keep the text clear of the floating icon column */
  main:not(.is-home) { padding-right: 78px; }
  .home-body { padding-right: 78px; }
}
/* a button that is not ready yet */
.tool-fab.soon { opacity: .72; filter: saturate(.7); cursor: default; }
.tool-fab.soon:hover { transform: none; filter: saturate(.7); }
.soon-tag { position: absolute; top: -8px; right: 14px; font: 700 .56rem var(--sans); letter-spacing: .12em; font-style: normal; padding: 1px 7px; border-radius: 999px; background: var(--velvet); color: var(--gold-l); border: 1px solid var(--gold); box-shadow: 0 2px 8px rgba(0,0,0,.5); }
#soonToast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); z-index: 300; padding: 12px 20px; border-radius: 999px; background: var(--velvet); color: var(--gold-l); border: 1px solid var(--gold); font: 600 .9rem var(--sans); box-shadow: 0 10px 30px rgba(0,0,0,.6); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
#soonToast.show { opacity: 1; transform: translate(-50%, 0); }

/* the studio logo: always visible at the bottom left, where the tool buttons used to be */
.sidenav { padding-bottom: 24px; }
.studio-card { display: flex; gap: 22px; align-items: center; }
@media (max-width: 560px) { .studio-card { flex-direction: column; text-align: center; } }
@media print { .dl-panel { display: none !important; } }

/* the studio's lore: a gilded plaque */
.lore { max-width: 780px; margin: 0 auto 26px; padding: 26px clamp(18px, 4vw, 40px); text-align: center; color: #2a1408;
  background: linear-gradient(135deg, #f4dc82 0%, #d9b440 38%, #f0d676 62%, #b78d27 100%); border: 7px double #6b4a12; border-radius: 10px;
  box-shadow: inset 0 0 28px rgba(90,55,5,.45), 0 12px 36px rgba(0,0,0,.55); }
.lore p { margin: 0 0 1em; font: 500 1.02rem/1.55 var(--serif, Georgia, serif); }
.lore p:last-child { margin-bottom: 0; }
.lore strong { color: #1a0a0d; }
body.paper .lore { background: #fbf6ea; color: #1c1214; border-color: #8a6a1c; box-shadow: none; }

.sh-head { align-items: flex-end; }

.sheet-preview.wide { display: block; width: 100%; height: auto; margin: 12px 0 18px; border: 1px solid var(--gold-d); border-radius: 10px; background: #fff; }

#tokensBtn { text-decoration: none; }

/* perks in the Call Sheet Generator and on the printed sheet */
.cs-perks { display: grid; gap: 12px; margin-bottom: 22px; counter-reset: perk; }
.cs-perk { counter-increment: perk; position: relative; padding: 14px 18px 12px 62px; border-radius: 16px; border: 1px solid var(--line); background: linear-gradient(180deg, var(--panel2), var(--panel)); display: grid; gap: 8px; }
.cs-perk::before { content: counter(perk); position: absolute; left: 18px; top: 14px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--velvet); border: 1px solid var(--gold); font: 900 .95rem var(--display); color: var(--gold-l); }
.cs-perk select { width: 100%; min-height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0,0,0,.35); color: var(--cream); font: 600 .95rem var(--sans); }
.cs-perk select:focus-visible { outline: 2px solid var(--gold-l); outline-offset: 2px; }
.cs-perk option, .cs-perk optgroup { background: var(--bg2); color: var(--cream); }
.cs-perk optgroup { color: var(--gold-l); font-style: normal; font-weight: 700; }
.cs-perktext { margin: 0; font-size: .88rem; line-height: 1.5; color: var(--cream); min-height: 1.5em; }
.cs-perktext strong { color: var(--gold-l); }
.cs-perktext:empty::before { content: 'Pick a perk to read its two acts.'; color: var(--muted); font-style: italic; }
@media (max-width: 560px) { .cs-perk { padding-left: 18px; padding-top: 56px; } }
.sh-perks { border: 1px solid #1c1214; border-radius: 2mm; padding: 1.4mm 2.4mm; margin-top: 2mm; }
.sh-perks h3 { font: 700 8pt var(--sans); letter-spacing: .12em; text-transform: uppercase; color: #6a0f1c; margin: 0 0 1mm; } .sh-perks h3 small { display: inline; font-size: 6.4pt; text-transform: none; letter-spacing: 0; }
.sh-perkgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3mm; }
.sh-perkgrid p { margin: .3mm 0; font-size: 6.2pt; line-height: 1.25; } .sh-perkgrid p b { font-size: 7.4pt; color: #1c1214; }
.sh-perkgrid span { display: inline-flex; align-items: center; gap: .6mm; font-weight: 700; color: #6a0f1c; }
.sh-perkgrid .sh-write { display: inline-block; width: 28mm; }
/* keep the whole call sheet on one A4 page, perks included */
.sh-actor { margin-bottom: 1mm; padding-top: 1mm; padding-bottom: .9mm; }
.sh-perks { margin-top: 1.2mm; padding-top: 1mm; padding-bottom: 1mm; }
.sh-notes { margin-top: .8mm; } .sh-notes div { height: 4mm; }

/* dropdown lists of every select in the tool windows: dark, not the browser's grey */
.tool-modal select { color-scheme: dark; cursor: pointer; }
.tool-modal select option, .tool-modal select optgroup { background: #1b0c10; color: var(--cream); }
.tool-modal select optgroup { color: var(--gold-l); font-style: normal; font-weight: 700; }
.tool-modal select option:checked { background: var(--velvet); color: var(--gold-l); }

/* the Focus of each shot, marked on its map */
.shot-map { position: relative; }
.shot-map .fdot { position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: radial-gradient(circle, #fff 0 22%, var(--gold-l) 24% 52%, transparent 54%); box-shadow: 0 0 0 2px #1a0a0d, 0 0 14px 4px rgba(255,236,160,.85); pointer-events: none; }
body.paper .shot-map .fdot { box-shadow: 0 0 0 2px #6a0f1c; background: radial-gradient(circle, #fff 0 24%, #6a0f1c 26% 54%, transparent 56%); }

/* ---------- the end credits ---------- */
.cr-stage { position: relative; height: min(68vh, 640px); overflow: hidden; margin: 8px 0 6px; outline: 0;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 12%, #000 86%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 12%, #000 86%, transparent 100%); }
.cr-track { text-align: center; padding: 0 12px; will-change: transform; }
.cr-title { margin: 0 0 70px; }
.cr-game { font: 900 clamp(2rem, 6vw, 3.4rem)/1.05 var(--display, 'Cinzel', serif); letter-spacing: .08em; text-transform: uppercase; color: var(--gold-l, #f0d676); text-shadow: 0 2px 18px rgba(0,0,0,.6); }
.cr-sub { font: 400 clamp(1.6rem, 5vw, 2.6rem) var(--script, 'Pinyon Script', cursive); color: var(--gold, #d9b440); margin-top: .1em; }
.cr-by { margin-top: 1.2em; font: 600 .8rem var(--sans); letter-spacing: .3em; text-transform: uppercase; color: var(--cream, #f1e6d4); }
.cr-block { margin: 0 0 54px; }
.cr-role { font: 600 .74rem var(--sans); letter-spacing: .28em; text-transform: uppercase; color: var(--gold, #d9b440); margin-bottom: .5em; }
.cr-name { font: 500 clamp(1.15rem, 3vw, 1.6rem)/1.35 var(--display, 'Cinzel', serif); letter-spacing: .06em; color: var(--cream, #f1e6d4); text-shadow: 0 2px 14px rgba(0,0,0,.6); }
.cr-name a { color: inherit; text-decoration: underline; text-decoration-color: var(--gold-d, #8a6a1c); text-underline-offset: 5px; }
.cr-name a:hover { color: var(--gold-l, #f0d676); }
.cr-note { margin-top: .3em; font: italic 400 .98rem var(--serif, Georgia, serif); color: var(--muted, #b9a58d); }
.cr-legal { margin: 80px auto 70px; max-width: 34em; font: 400 .88rem/1.6 var(--sans); color: var(--muted, #b9a58d); }
.cr-legal p { margin: 0 0 .8em; }
.cr-copy { color: var(--cream, #f1e6d4); letter-spacing: .06em; }
.cr-end { margin-bottom: 0; }
.cr-final { margin-top: min(78vh, 700px); padding-bottom: 12px; }
.cr-motto { font: italic 500 1.2rem var(--serif, Georgia, serif); color: var(--gold-l, #f0d676); }
.cr-theend { font: 900 clamp(1.6rem, 5vw, 2.4rem) var(--display, 'Cinzel', serif); letter-spacing: .3em; text-transform: uppercase; color: var(--cream, #f1e6d4); }
.cr-stage.static { height: auto; overflow: visible; -webkit-mask-image: none; mask-image: none; }
@media (prefers-reduced-motion: reduce) { .cr-stage { height: auto; overflow: visible; -webkit-mask-image: none; mask-image: none; } }
/* on paper the credits are one still page */
body.paper .cr-stage { height: auto; overflow: visible; -webkit-mask-image: none; mask-image: none; padding-top: 6mm; }
body.paper .cr-track { transform: none !important; }
body.paper .cr-game, body.paper .cr-name, body.paper .cr-theend { color: #6a0f1c; text-shadow: none; }
body.paper .cr-sub, body.paper .cr-role, body.paper .cr-motto { color: #8a6a1c; }
body.paper .cr-by, body.paper .cr-copy { color: #1c1214; }
body.paper .cr-note, body.paper .cr-legal { color: #5b4a46; }
body.paper .cr-title { margin-bottom: 9mm; } body.paper .cr-block { margin-bottom: 6mm; } body.paper .cr-legal { margin: 9mm auto 7mm; } body.paper .cr-end { margin-bottom: 0; }
body.paper .cr-block, body.paper .cr-end { break-inside: avoid; }

body.paper .cr-game { font-size: 28pt; } body.paper .cr-sub { font-size: 22pt; } body.paper .cr-name { font-size: 12pt; line-height: 1.3; } body.paper .cr-role { font-size: 6.5pt; margin-bottom: .3em; } body.paper .cr-note { font-size: 9pt; margin-top: .1em; } body.paper .cr-block { margin-bottom: 4.5mm; } body.paper .cr-title { margin-bottom: 7mm; } body.paper .cr-legal { font-size: 8.5pt; margin: 6mm auto 5mm; } body.paper .cr-legal p { margin-bottom: .4em; } body.paper .cr-theend { font-size: 18pt; }
body.paper .cr-final { margin-top: 12mm; padding-bottom: 0; }
.cr-stage.static .cr-final { margin-top: 70px; }
@media (prefers-reduced-motion: reduce) { .cr-final { margin-top: 70px; } }

/* ---------- FAQ ---------- */
.faq-item { margin: 0 0 18px; padding: 14px 18px; border-left: 3px solid var(--gold-d, #8a6a1c); background: rgba(255,255,255,.025); border-radius: 0 10px 10px 0; break-inside: avoid; }
.faq-item h3 { margin: 0 0 .35em; font-size: 1.02rem; color: var(--gold-l, #f0d676); }
.faq-item p { margin: 0; }
body.paper .faq-item { background: #fbf6ea; border-left-color: #b8975a; }
body.paper .faq-item h3 { color: #6a0f1c; }
body.paper .cr-name a { text-decoration: none; } body.paper .cr-name a::after { content: attr(href); display: block; font: 400 8pt var(--sans); letter-spacing: .02em; color: #5b4a46; }

/* the download panel: no underline on the links, and no icons next to the labels (they stay only when the buttons shrink to icons) */
.dl-panel .tool-fab, .dl-panel .tool-fab:hover { text-decoration: none; }
@media (min-width: 1241px) { .dl-panel .tool-fab svg { display: none; } }

/* ---------- showcase ---------- */
.ks-hidden { display: none !important; }
.ks-tag { margin-left: 8px; padding: 1px 7px; border: 1px solid var(--gold-d); border-radius: 999px; font: 700 .56rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); vertical-align: 1px; }
.ks-lock { margin: 34px 0 10px; padding: 22px 24px; border: 1px solid var(--gold-d); border-left: 4px solid var(--gold); border-radius: 12px; background: linear-gradient(180deg, rgba(217,180,90,.07), rgba(217,180,90,.02)); text-align: center; }
.ks-lock-title { font: 700 1.1rem var(--display); letter-spacing: .04em; color: var(--gold-l); margin-bottom: .5em; }
.ks-lock p { margin: 0 0 .9em; color: var(--cream); }
.ks-lock p:last-child { margin-bottom: 0; }
[hidden] { display: none !important; }

/* ---------- how to read an actor card ---------- */
.readcard { display: grid; grid-template-columns: minmax(250px, 320px) 1fr; gap: 28px; align-items: start; margin: 14px 0 10px; }
.readcard ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.readcard li { position: relative; padding-left: 38px; }
.readcard li::before { content: attr(value); position: absolute; left: 0; top: 1px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--gold); color: #1a0a0d; font: 800 .8rem var(--sans); }
.nb { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-left: 6px; border-radius: 50%; background: var(--gold); color: #1a0a0d; font: 800 .68rem var(--sans); font-style: normal; vertical-align: 1px; }
.readcard .bar { grid-template-columns: 38px 1fr 34px 26px; }
@media (max-width: 760px) { .readcard { grid-template-columns: 1fr; } }
body.paper .readcard li::before, body.paper .nb { background: #6a0f1c; color: #fff; }

/* the state of each download button: FREE, BUY; a primary button for the campaign and the bundle */
.dl-group .tool-fab { position: relative; left: auto; bottom: auto; top: auto; right: auto; }
.tool-fab.primary { border-color: var(--gold-l); color: var(--gold-l); box-shadow: inset 0 0 0 1px rgba(217,180,90,.35); }
.dl-panel { max-height: calc(100vh - var(--top-h) - 28px); overflow-y: auto; scrollbar-width: thin; padding-top: 8px; margin-top: -8px; }

/* the backers in the credits: two columns, like in a real film (the title on the left, the names on the right) */
.cr-backers { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 28px; max-width: 700px; margin: 0 auto 54px; text-align: left; align-items: start; }
.cr-brole { text-align: right; font: 600 .74rem var(--sans); letter-spacing: .28em; text-transform: uppercase; color: var(--gold, #d9b440); padding-top: .35em; }
.cr-bnames { font: 500 clamp(1rem, 2.4vw, 1.3rem)/1.4 var(--display, 'Cinzel', serif); letter-spacing: .05em; color: var(--cream, #f1e6d4); text-shadow: 0 2px 14px rgba(0,0,0,.6); }
body.paper .cr-backers { margin-bottom: 4mm; gap: 3mm 8mm; } body.paper .cr-bnames { font-size: 10.5pt; color: #6a0f1c; text-shadow: none; } body.paper .cr-brole { font-size: 6.5pt; color: #8a6a1c; }

/* the tag of a campaign reward: the full words on wide screens, short tag when the buttons shrink to icons */
.soon-tag .ts { display: none; }
@media (max-width: 1240px) { .soon-tag .tl { display: none; } .soon-tag .ts { display: inline; } }

/* the announcement that opens with the showcase */
.ks-popup { position: fixed; inset: 0; z-index: 400; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(8,3,5,.88); backdrop-filter: blur(6px); }
.ks-box { width: min(540px, 100%); padding: 30px clamp(20px, 5vw, 38px) 28px; text-align: center; background: var(--bg2); border: 1px solid var(--gold-d); border-radius: 20px; box-shadow: 0 30px 90px rgba(0,0,0,.7); }
.ks-box small { display: block; font: 700 .68rem var(--sans); letter-spacing: .28em; text-transform: uppercase; color: var(--gold); }
.ks-box h2 { margin: 10px 0 14px; font-family: var(--logo); font-weight: 400; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-l); font-size: clamp(1.4rem, 5vw, 1.9rem); line-height: 1.15; }
.ks-box p { margin: 0 0 12px; color: var(--cream); line-height: 1.55; }
.ks-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 20px; }
@media print { .ks-popup { display: none !important; } }
.ks-actions .btn.primary { border-color: var(--gold-l); color: var(--gold-l); box-shadow: inset 0 0 0 1px rgba(217,180,90,.4); }

/* press kit */
.press-dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin: 10px 0 8px; }
.press-file { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.03); text-decoration: none; color: inherit; transition: border-color .15s, background .15s; }
.press-file:hover { border-color: var(--gold); background: rgba(212,175,90,.08); }
.press-file strong { color: var(--gold-l); font-size: 1.02rem; }
.press-file span { font-size: .84rem; opacity: .8; }
.press-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin: 10px 0 14px; }
.press-gallery figure { margin: 0; }
.press-gallery img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: #1a0a0e; display: block; }
.press-gallery figcaption { font-size: .8rem; opacity: .8; margin-top: 6px; }
body.paper .press-file { border-color: #c9b98a; background: none; }
