:root {
  --ink: #080506;
  --smoke: #150e0e;
  --smoke-2: #1f1414;
  --velvet: #5c0d15;
  --velvet-2: #8f1a24;
  --gold: #c9a253;
  --gold-2: #7d6233;
  --gold-3: #3f3220;
  --paper: #e6d9c1;
  --paper-2: #bfb29a;
  --paper-3: #6e6353;
  --display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --text: "Libre Caslon Text", "Iowan Old Style", Georgia, serif;
  --ctrl: 46px;
  --fast: 150ms; --normal: 300ms; --scene: 1600ms; --ease: cubic-bezier(.22, .61, .36, 1);
  --s1: 6px; --s2: 12px; --s3: 20px; --s4: 32px; --s5: 52px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: #0d0809; color: var(--paper); width: 100%; min-width: 0; min-height: 100vh; min-height: 100dvh; }
body { font-family: var(--text); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 50; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: screen;
}
a { color: var(--gold); }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 400; margin: 0; color: var(--paper); }
p { margin: 0 0 var(--s2); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

/* gate */
.gate { min-height: 100dvh; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes houselights { from { opacity: 0; } to { opacity: 1; } }
.gate-wrap {
  animation: rise 1.4s .5s ease-out both;
  position: relative; z-index: 2; min-height: 100dvh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: var(--s4) var(--s3); gap: var(--s4);
  transition: opacity .6s ease, transform 1.2s ease;
}
.opening .gate-wrap { opacity: 0; transform: translateY(-14px); }
.gate-head { text-align: center; }
.gate-kicker { color: var(--gold); font-size: 14px; letter-spacing: .04em; margin-bottom: var(--s2); }
.gate-title { font-size: clamp(52px, 12vw, 96px); line-height: .95; letter-spacing: -.01em; color: var(--paper); text-shadow: 0 2px 30px rgba(0,0,0,.6); }
.gate-form { width: min(340px, 100%); display: flex; flex-direction: column; gap: var(--s2); background: rgba(8,5,6,.62); padding: var(--s3); border: 1px solid rgba(201,162,83,.35); backdrop-filter: blur(6px); }
.field { display: flex; flex-direction: column; gap: 4px; }
.field > span { font-size: 13px; color: var(--gold); }
.field input, .field select, .field textarea {
  height: var(--ctrl); background: rgba(0,0,0,.45); border: 1px solid var(--gold-3); padding: 0 var(--s2); color: var(--paper); outline: none; border-radius: 2px;
}
.field textarea { height: auto; min-height: 96px; padding: var(--s2); resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold); }
.btn { height: var(--ctrl); padding: 0 var(--s3); border: 1px solid var(--gold-2); background: transparent; color: var(--gold); border-radius: 2px; font-family: var(--display); font-size: 17px; letter-spacing: .02em; white-space: nowrap; }
.btn:disabled { opacity: .5; cursor: default; }
.btn-gold { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.btn-red { border-color: var(--velvet-2); color: #e0a0a6; }
.btn-sm { height: 34px; font-size: 14px; padding: 0 var(--s2); }
.gate-error { color: #e0a0a6; min-height: 1.4em; font-size: 14px; }
.gate-foot { color: var(--paper-2); font-style: italic; font-size: 14px; text-align: center; }
body.fadein { animation: fadein .4s ease both; }
body.fadeout { animation: fadeout .5s ease-in both; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeout { to { opacity: 0; } }

/* app shell */
.app { position: fixed; top: 0; left: 0; right: 0; bottom: -50px; display: flex; flex-direction: column; overflow: hidden; background: #0d0809 url('velvet.png') repeat; padding-bottom: 50px; }
#house { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; image-rendering: auto; }
.top, .stage-line, .main, .tabs { position: relative; z-index: 1; }
.top {
  display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s3);
  border-bottom: 1px solid var(--gold-3); background: linear-gradient(180deg, #1a0a0d, var(--ink));
  z-index: 10; flex: none;
}
.avatar { width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--gold-2); object-fit: cover; background: var(--smoke-2); flex: none; display: block; }
.avatar-btn { border: 0; padding: 0; background: none; position: relative; flex: none; }
.avatar-btn::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 14px; height: 14px; border-radius: 50%; background: var(--gold); border: 2px solid var(--ink); }
.who { flex: 1; min-width: 0; }
.who h1 { font-size: 26px; letter-spacing: -.01em; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who .job { color: var(--gold); font-size: 14px; }
.credits { text-align: right; flex: none; }
.credits b { display: block; font-family: var(--display); font-size: 26px; font-weight: 400; line-height: 1; color: var(--paper); }
.credits span { font-size: 12px; color: var(--paper-2); }
.stage-line { font-size: 13px; color: var(--paper-2); padding: 6px var(--s3); border-bottom: 1px solid var(--smoke-2); font-style: italic; }
.main { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: var(--s3) var(--s3) var(--s4); width: 100%; }
.main > .pane { max-width: 640px; margin: 0 auto; }
.tabs {
  flex: none; display: flex; background: #0d0809 url('velvet.png') repeat; width: 100%; border-top: 1px solid var(--gold-3);
  padding-bottom: max(12px, env(safe-area-inset-bottom)); z-index: 10; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: 1; height: 58px; background: none; border: 0; color: var(--paper-2); font-family: var(--display); font-size: 15px; position: relative; }
.tabs button.on { color: var(--gold); }
.tabs button.on::after { content: ""; position: absolute; left: 25%; right: 25%; bottom: 8px; height: 1px; background: var(--gold); }
.tabs button .dot { position: absolute; top: 12px; right: calc(50% - 22px); width: 7px; height: 7px; border-radius: 50%; background: var(--velvet-2); }
.pane { display: none; }
.pane.on { display: block; }

.sec { border-top: 1px solid var(--gold-3); }
.sec:last-child { border-bottom: 1px solid var(--gold-3); }
.sec > summary { list-style: none; cursor: pointer; padding: var(--s2) 0; display: flex; justify-content: space-between; align-items: baseline; font-family: var(--display); font-size: 22px; }
.sec > summary::-webkit-details-marker { display: none; }
.sec > .sec-h { margin: 0; padding: var(--s2) 0; font-family: var(--display); font-size: 22px; font-weight: 400; color: inherit; }
.sec > summary::after { content: "+"; color: var(--gold-2); font-size: 22px; }
.sec[open] > summary::after { content: "\2212"; }
.sec .body { padding: 0 0 var(--s3); }
.sec .body p:last-child { margin-bottom: 0; }
.lead { font-size: 17px; }
.list { margin: 0; padding: 0; list-style: none; }
.list li { padding: var(--s2) 0; border-top: 1px solid var(--smoke-2); }
.list li:first-child { border-top: 0; padding-top: 0; }
.list li b { font-weight: 700; color: var(--paper); }
.person { display: flex; gap: var(--s2); align-items: flex-start; }
.person .avatar { width: 40px; height: 40px; }
.quote { border-left: 2px solid var(--velvet-2); padding: var(--s1) var(--s2); color: var(--paper); font-style: italic; margin: var(--s2) 0; }
.hush { background: var(--smoke); border: 1px solid var(--gold-3); padding: var(--s2) var(--s3); margin: var(--s2) 0; }
.hush .k { color: var(--gold); font-size: 13px; display: block; margin-bottom: 4px; }

.ability { padding: var(--s2) 0; border-top: 1px solid var(--smoke-2); }
.ability:first-child { border-top: 0; }
.ability .row { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); }
.ability h3 { font-size: 20px; }
.ability p { color: var(--paper-2); font-size: 15px; margin: 4px 0 0; }
.pips { display: flex; gap: 8px; flex: none; }
.pip { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--gold-2); background: none; padding: 0; }
.pip { transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease), transform var(--fast) var(--ease); }
.pip:active { transform: scale(.9); }
.pip.used { background: var(--gold); border-color: var(--gold); }
.pip.used::after { content: ""; display: block; width: 12px; height: 12px; margin: 7px auto; background: var(--ink); transform: rotate(45deg); }
.unlimited { color: var(--gold); font-size: 13px; font-style: italic; }

.items { margin: 0; padding: 0; list-style: none; }
.item { display: grid; grid-template-columns: 1fr auto; gap: 2px var(--s2); padding: var(--s2) 0; border-top: 1px solid var(--smoke-2); align-items: start; }
.item:first-child { border-top: 0; }
.item .name { font-family: var(--display); font-size: 19px; }
.item .text { color: var(--paper-2); font-size: 14px; grid-column: 1 / -1; }
.item .meta { color: var(--gold); font-size: 13px; text-align: right; white-space: nowrap; }
.item .fake { color: #e0a0a6; }
.item.selectable { cursor: pointer; }
.item.selectable.sel { background: rgba(201,162,83,.08); margin: 0 calc(-1 * var(--s2)); padding-left: var(--s2); padding-right: var(--s2); }
.item.selectable.sel .name::before { content: "\2713 "; color: var(--gold); }
.cat { color: var(--paper-3); font-size: 12px; letter-spacing: .04em; margin: var(--s3) 0 var(--s1); }
.cat:first-child { margin-top: 0; }
.empty { color: var(--paper-2); font-style: italic; padding: var(--s3) 0; text-align: center; }

.note { animation: slidein var(--normal) var(--ease) both; border: 1px solid var(--velvet-2); background: rgba(92,13,21,.25); padding: var(--s2) var(--s3); margin-bottom: var(--s2); display: flex; justify-content: space-between; gap: var(--s2); align-items: center; }
.note button { flex: none; }

@keyframes slidein { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.trade { border: 1px solid var(--gold-3); padding: var(--s2) var(--s3); margin-bottom: var(--s2); }
.trade .hd { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: var(--s1); }
.trade .hd b { font-family: var(--display); font-size: 19px; font-weight: 400; }
.trade .st { font-size: 13px; color: var(--paper-2); }
.trade .side { font-size: 15px; margin: 2px 0; }
.trade .side span { color: var(--gold); }
.trade .acts { display: flex; gap: var(--s2); margin-top: var(--s2); }
.trade .acts .btn { flex: 1; }
.side-form { margin-top: var(--s2); padding-top: var(--s2); border-top: 1px dashed var(--gold-3); }
.stack { display: flex; flex-direction: column; gap: var(--s2); }
.rowf { display: flex; gap: var(--s2); align-items: flex-end; }
.rowf .field { flex: 1; }
.sheet { position: fixed; inset: 0; background: rgba(0,0,0,.72); display: none; align-items: flex-end; z-index: 30; }
.sheet.on { display: flex; }
.sheet .panel { position: relative; background: var(--smoke); border-top: 1px solid var(--gold-2); width: 100%; max-height: 88dvh; overflow: auto; padding: var(--s3) var(--s3) calc(var(--s3) + env(safe-area-inset-bottom)); }
.sheet h2 { font-size: 24px; margin-bottom: var(--s2); }
.sheet .close { position: absolute; top: 10px; right: 12px; background: none; border: 0; color: var(--paper-2); font-size: 26px; }


.cast-group { color: var(--gold); font-family: var(--display); font-size: 18px; margin: var(--s3) 0 var(--s1); }
.cast-group:first-child { margin-top: 0; }
.playbill { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s3) var(--s2); margin-bottom: var(--s2); }
.bill { text-align: center; }
.bill img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 1px solid var(--gold-2); background: var(--smoke-2); display: block; margin-bottom: 8px; filter: saturate(.85) contrast(1.05); }
.bill.me img { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(201,162,83,.18); }
.bill .n { font-family: var(--display); font-size: 20px; line-height: 1.15; }
.bill .j { color: var(--paper-2); font-size: 13px; }
@media (min-width: 520px) { .playbill { grid-template-columns: repeat(3, 1fr); } }
.absent { color: var(--paper-2); font-size: 15px; }



/* desk */
.desk { display: grid; grid-template-columns: 240px 1fr; min-height: 100dvh; }
.desk-nav { border-right: 1px solid var(--gold-3); background: #0d0809; padding: var(--s3) var(--s2); display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100dvh; overflow: auto; }
.desk-nav h1 { font-size: 22px; padding: 0 var(--s2) var(--s2); }
.desk-nav .sess { color: var(--paper-2); font-size: 13px; padding: 0 var(--s2) var(--s2); border-bottom: 1px solid var(--gold-3); margin-bottom: var(--s2); }
.desk-nav button { text-align: left; background: none; border: 0; color: var(--paper-2); font-family: var(--display); font-size: 18px; padding: 10px var(--s2); border-radius: 2px; display: flex; justify-content: space-between; }
.desk-nav button.on { color: var(--gold); background: var(--smoke-2); }
.desk-nav .cnt { background: var(--velvet-2); color: #fff; font-family: var(--text); font-size: 12px; padding: 1px 7px; border-radius: 10px; align-self: center; }
.desk-nav .foot { margin-top: auto; }
.desk-main { padding: var(--s3) var(--s4); max-width: 1100px; }
.desk-main h2 { font-size: 28px; margin-bottom: var(--s3); }
.desk-main h3 { font-size: 20px; margin: var(--s3) 0 var(--s2); color: var(--gold); }
.grid { display: grid; gap: var(--s2); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { border: 1px solid var(--gold-3); padding: var(--s2) var(--s3); background: var(--smoke); }
.card.hi { border-color: var(--gold-2); }
.card .t { font-family: var(--display); font-size: 20px; display: flex; justify-content: space-between; align-items: baseline; gap: var(--s2); }
.card .t small { font-family: var(--text); color: var(--paper-2); font-size: 13px; }
.card .m { color: var(--paper-2); font-size: 14px; }
.pl { display: flex; gap: var(--s2); align-items: center; cursor: pointer; }
.pl .avatar { width: 44px; height: 44px; }
.pl .n { font-family: var(--display); font-size: 19px; }
.pl .n small { color: var(--paper-2); font-family: var(--text); font-size: 13px; display: block; }
.pl .c { margin-left: auto; text-align: right; font-family: var(--display); font-size: 20px; }
.pl .c small { display: block; font-family: var(--text); font-size: 12px; color: var(--paper-2); }
.tag { display: inline-block; font-size: 12px; padding: 1px 8px; border: 1px solid var(--gold-3); color: var(--paper-2); border-radius: 10px; margin-left: 6px; vertical-align: middle; }
.tag.red { border-color: var(--velvet-2); color: #e0a0a6; }
.tag.gold { border-color: var(--gold-2); color: var(--gold); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th { text-align: left; color: var(--gold); font-weight: 400; font-size: 13px; padding: 6px 8px; border-bottom: 1px solid var(--gold-3); }
.tbl td { padding: 8px; border-bottom: 1px solid var(--smoke-2); vertical-align: middle; }
.tbl input, .tbl select { height: 36px; background: rgba(0,0,0,.4); border: 1px solid var(--gold-3); padding: 0 8px; color: var(--paper); width: 100%; border-radius: 2px; }
.tbl input:focus, .tbl select:focus { outline: none; border-color: var(--gold); }
.inline { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; }
.inline .field { min-width: 160px; }
.stages { display: flex; flex-direction: column; gap: 6px; }
.stages button { text-align: left; height: auto; padding: 10px var(--s3); display: flex; justify-content: space-between; }
.stages button.now { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.stages button.past { color: var(--paper-3); border-color: var(--smoke-2); }
.readout { background: var(--smoke); border-left: 2px solid var(--gold-2); padding: var(--s2) var(--s3); margin: var(--s2) 0; white-space: pre-wrap; font-size: 15px; }
.logline { display: grid; grid-template-columns: 70px 150px 1fr auto; gap: var(--s2); padding: 6px 0; border-bottom: 1px solid var(--smoke-2); font-size: 14px; align-items: center; }
.logline .ts { color: var(--paper-3); }
.logline .ac { color: var(--gold); }
.muted { color: var(--paper-2); }
.toast { position: fixed; bottom: calc(80px + env(safe-area-inset-bottom)); left: 12px; right: 12px; text-align: center; background: var(--smoke-2); border: 1px solid var(--gold-2); padding: var(--s2) var(--s3); z-index: 40; display: none; }
.toast.on { display: block; }
.search { display: block; width: 100%; height: var(--ctrl); margin: 0 0 var(--s3); background: rgba(0,0,0,.4); border: 1px solid var(--gold-3); padding: 0 var(--s2); color: var(--paper); border-radius: 2px; }
.search:focus { outline: none; border-color: var(--gold); }
.detail { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
@media (max-width: 900px) {
  .desk { display: block; width: 100%; }
  .desk-nav { width: 100%; box-sizing: border-box; }
  .desk-main { width: 100%; box-sizing: border-box; }
  .desk-nav { position: sticky; top: 0; height: auto; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; gap: 2px; padding: var(--s1) var(--s2); border-right: 0; border-bottom: 1px solid var(--gold-3); z-index: 20; align-items: center; }
  .desk-nav h1 { font-size: 16px; padding: 0 var(--s2) 0 0; white-space: nowrap; }
  .desk-nav .sess { display: none; }
  .desk-nav button { font-size: 15px; padding: 8px 10px; white-space: nowrap; flex: none; }
  .desk-nav .foot { margin: 0 0 0 var(--s2); flex: none; }
  .detail, .g3, .g4 { grid-template-columns: 1fr 1fr; }
  .desk-main { padding: var(--s3); max-width: none; }
}
@media (max-width: 600px) {
  .detail, .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .logline { display: flex; flex-wrap: wrap; gap: 4px 10px; }
  .logline > span:nth-child(3) { flex: 1 0 100%; }
  .desk-main { padding: var(--s2); }
  .desk-main h2 { font-size: 24px; }
  .inline { flex-direction: column; align-items: stretch; }
  .inline .field, .inline .btn, .inline select, .inline input { width: 100%; min-width: 0; }
  .inline .field input, .inline .field select { width: 100%; }
  table.tbl:not(.stack) { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }

  table.tbl.stack, table.tbl.stack tbody { display: block; }
  table.tbl.stack tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px var(--s2); padding: var(--s2) 0; border-bottom: 1px solid var(--gold-3); }
  table.tbl.stack tr:first-child { display: none; }
  table.tbl.stack td { display: block; border: 0; padding: 0; white-space: normal; }
  table.tbl.stack td::before { content: attr(data-l); display: block; font-size: 12px; color: var(--gold); margin-bottom: 2px; }
  table.tbl.stack td[data-l="Slot"], table.tbl.stack td[data-l="Item"], table.tbl.stack td[data-l="Move to"], table.tbl.stack td[data-l="Piece"], table.tbl.stack td[data-l="Candidate"] { grid-column: 1 / -1; }
  table.tbl.stack td select, table.tbl.stack td input { width: 100%; }
  .sheet .panel { padding: var(--s3) var(--s2) calc(var(--s3) + env(safe-area-inset-bottom)); }
  .sheet h2 { font-size: 21px; padding-right: 36px; }
  .card .t { flex-wrap: wrap; }
  .pl .n small { white-space: normal; }
  .stages button { white-space: normal; text-align: left; }
  .readout { font-size: 14px; }
  .main { padding-left: var(--s2); padding-right: var(--s2); }
  .top { padding: var(--s2); }
  .who h1 { font-size: 22px; }
  .credits b { font-size: 22px; }
  .item .meta { white-space: normal; text-align: right; max-width: 42%; }
  .trade .acts { flex-wrap: wrap; }
  .rowf { flex-direction: column; align-items: stretch; }
}

/* marquee stage line */
.stage-line { display: block; width: 100%; background: none; border: 0; cursor: default; flex: none; }
.stage-line.tappable { cursor: pointer; text-decoration: underline dotted var(--gold-2); text-underline-offset: 4px; }
.stage-line { font-family: var(--display); font-style: normal; font-size: 15px; color: var(--paper); text-align: center; padding: 14px var(--s3); position: relative; border-bottom: 0; }
.stage-line::before, .stage-line::after { content: ""; position: absolute; left: 0; right: 0; height: 6px; background-image: radial-gradient(circle, var(--gold) 1.6px, transparent 2.2px); background-size: 16px 6px; background-repeat: repeat-x; animation: chase 1.6s steps(2) infinite; opacity: .85; }
.stage-line::before { top: 3px; }
.stage-line::after { bottom: 3px; animation-delay: .8s; }
@keyframes chase { from { background-position: 0 0; } to { background-position: 16px 0; } }

/* tab icons */
.tabs button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 13px; height: 66px; flex: 1 0 70px; padding: 0 4px; white-space: nowrap; }
.tabs button svg { width: 24px; height: 24px; }
.tabs button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.tabs button.on::after { bottom: 5px; }
.pane.on { animation: rise .35s ease-out both; }

/* ability tickets */
.ticket { position: relative; background: var(--smoke-2) url('paper.png') repeat; border: 1px solid var(--gold-2); padding: var(--s2) var(--s3) var(--s2) calc(var(--s3) + 26px); margin: 0 0 var(--s2); }
.ticket::before { content: ""; position: absolute; left: 24px; top: 8px; bottom: 8px; border-left: 1px dashed var(--gold-2); }
.ticket .notch { position: absolute; left: 17px; width: 14px; height: 14px; border-radius: 50%; background: var(--ink); border: 1px solid var(--gold-2); }
.ticket .notch.t { top: -8px; } .ticket .notch.b { bottom: -8px; }
.ticket .row { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); }
.ticket h3 { font-size: 20px; }
.ticket p { color: var(--paper-2); font-size: 15px; margin: 4px 0 0; }
.ticket.sealed-t { cursor: pointer; }
.ticket .tap { color: var(--gold-2); font-size: 13px; font-style: italic; margin-top: 4px; }
.ticket.open { border-color: var(--gold); }
.ticket .reseal { margin: 8px 0 0; text-align: left; }
.ticket .stub { font-size: 11px; letter-spacing: .08em; color: var(--gold-2); position: absolute; left: 12px; top: 50%; transform: translate(-50%, -50%) rotate(-90deg); white-space: nowrap; }
.pip { background: var(--ink); border-color: var(--gold-2); }
.pip.used { background: var(--ink); border-color: var(--gold-3); box-shadow: inset 0 0 0 2px var(--ink), inset 0 2px 5px rgba(0,0,0,.9); animation: punch .3s ease-out; }
.pip.used::after { display: none; }
@keyframes punch { 0% { transform: scale(1.15); } 100% { transform: scale(1); } }
.pip.used { animation-duration: var(--normal); }

/* sealed secret */
.sealed { position: relative; text-align: center; padding: var(--s3) var(--s2); border: 1px solid var(--gold-3); background: var(--smoke); cursor: pointer; }
.sealed .wax { width: 64px; height: 64px; margin: 0 auto 8px; display: block; }
.sealed .k { color: var(--gold); font-size: 13px; }
.sealed .cta { font-family: var(--display); font-size: 17px; color: var(--paper); }
.unsealed .hush { animation: rise var(--normal) var(--ease) both; }
.reseal { display: block; margin: 4px auto 0; background: none; border: 0; color: var(--paper-2); font-size: 13px; text-decoration: underline; }
.private-grid { display: grid; gap: 10px; }
.private-card { width: 100%; color: var(--paper); font-family: var(--text); }
.private-card.unsealed { border: 1px solid var(--gold-3); background: var(--smoke); padding: var(--s3); }
.private-card .hush { text-align: left; }
@media (min-width: 620px) { .private-grid { grid-template-columns: 1fr 1fr; } }

/* paper slips */
.note { background: #e9dcc2; color: #221417; border: 0; box-shadow: 0 6px 18px rgba(0,0,0,.55); clip-path: polygon(0 4px, 3% 0, 7% 4px, 12% 1px, 18% 4px, 25% 0, 31% 3px, 38% 0, 45% 4px, 52% 1px, 58% 4px, 65% 0, 72% 3px, 79% 0, 86% 4px, 93% 1px, 100% 3px, 100% 100%, 0 100%); padding-top: calc(var(--s2) + 4px); font-style: italic; transform: rotate(-.4deg); }
.note:nth-child(even) { transform: rotate(.5deg); }
.note .btn { color: #5c0d15; border-color: #5c0d15; font-style: normal; }

/* item icons */
.item { grid-template-columns: 24px 1fr auto; }
.item .ico { width: 20px; height: 20px; fill: none; stroke: var(--gold-2); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; margin-top: 4px; }
.item .text { grid-column: 2 / -1; }
.item.selectable.sel .name::before { content: ""; }
.item.selectable.sel .ico { stroke: var(--gold); }

/* scene changes */
body.enter .app { animation: houseup var(--scene) var(--ease) both; }
body.enter .top { animation: dropin var(--scene) var(--normal) var(--ease) both; }
body.enter .tabs { animation: riseup var(--scene) var(--normal) var(--ease) both; }
@keyframes houseup { from { opacity: 0; } 60% { opacity: .55; } to { opacity: 1; } }
@keyframes dropin { from { transform: translateY(-100%); } to { transform: none; } }
@keyframes riseup { from { transform: translateY(100%); } to { transform: none; } }
#dim { position: fixed; inset: 0; background: #000; opacity: 0; pointer-events: none; z-index: 5; transition: opacity var(--fast) var(--ease); }
#dim.on { opacity: .55; }
.pane.on { animation: scenein var(--normal) var(--fast) var(--ease) both; }
@keyframes scenein { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* gazette */
.gaz-mast { font-family: var(--display); font-size: 28px; background: url('paper.png') repeat; padding: var(--s3); margin: 0 calc(-1 * var(--s3)); text-align: center; padding: var(--s3) 0; border-bottom: 2px solid var(--gold-2); margin-bottom: var(--s3); line-height: 1.15; }
.gaz-mast span { font-family: var(--text); font-size: 13px; color: var(--paper-2); }
.gaz-a { margin-bottom: 0; padding: var(--s3); border-bottom: 1px solid var(--gold-3); background: url('paper.png') repeat; margin-left: calc(-1 * var(--s3)); margin-right: calc(-1 * var(--s3)); }
.gaz-a:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.gaz-a h3, .gaz-a h4 { font-size: 26px; text-align: center; margin: 0 0 var(--s2); line-height: 1.15; }
.byline { text-align: center; font-style: italic; color: var(--paper-2); font-size: 14px; margin: -6px 0 var(--s2); }
.gaz-a p { font-size: 15px; margin: 0 0 8px; }
.gaz-a p:last-child { margin-bottom: 0; }

.gaz-notice { background: rgba(201,162,83,.06); border: 1px solid var(--gold-3); padding: var(--s3); margin-bottom: var(--s3); }
.gaz-notice h3, .gaz-notice h4 { font-size: 15px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.gaz-notice p { font-size: 14px; color: var(--paper-2); }

.gaz-feature h3, .gaz-feature h4 { font-size: 30px; font-style: italic; }
.gaz-feature p:first-of-type { font-size: 17px; color: var(--paper); }

.gaz-sports { background: rgba(0,0,0,.25); padding: var(--s2) var(--s3); }
.gaz-sports h3, .gaz-sports h4 { font-size: 16px; letter-spacing: .1em; text-transform: uppercase; }
.gaz-sports p { font-size: 15px; }
.gaz-sports p:first-of-type { font-family: var(--display); font-size: 20px; letter-spacing: .02em; }

.gaz-review { padding-left: var(--s3); border-left: 2px solid var(--gold-2); }
.gaz-review h3, .gaz-review h4 { font-size: 24px; font-style: italic; }


.gaz-ad { background: linear-gradient(135deg, rgba(143,26,36,.12), rgba(201,162,83,.08)); border: 1px solid var(--velvet-2); padding: var(--s2) var(--s3); text-align: center; }
.gaz-ad h3, .gaz-ad h4 { font-size: 22px; color: var(--gold); letter-spacing: .06em; text-transform: uppercase; }
.gaz-ad p { font-size: 15px; }

.gaz-profile h3, .gaz-profile h4 { font-size: 30px; }
.gaz-profile p:first-of-type { font-size: 17px; }

.gaz-listing { text-align: center; padding: var(--s2) 0; }
.gaz-listing h3, .gaz-listing h4 { font-size: 28px; }
.gaz-listing p { font-size: 15px; color: var(--paper-2); }

.gaz-news h3, .gaz-news h4 { font-size: 24px; }

/* watch cards */
.watch { border: 1px solid var(--gold-3); padding: var(--s2) var(--s3) var(--s3); margin-bottom: var(--s3); background: var(--smoke); }
.watch.lead { border-color: var(--gold-2); }
.watch .wh { display: flex; gap: var(--s2); align-items: center; margin-bottom: var(--s2); }
.watch .wh .avatar { width: 44px; height: 44px; }
.watch .n { font-family: var(--display); font-size: 21px; }
.watch .j { color: var(--paper-2); font-size: 13px; }
.watch .role { color: var(--gold); font-size: 14px; margin: 0 0 var(--s1); }
.watch .k { color: var(--gold); font-size: 13px; margin: var(--s2) 0 4px; }
.watch p { margin: 0 0 6px; font-size: 15px; }
.watch .ov { margin-top: var(--s2); color: var(--paper-2); font-size: 13px; font-style: italic; border-top: 1px solid var(--smoke-2); padding-top: 6px; }

.signout { display: flex; align-items: center; justify-content: center; margin: var(--s4) 0 0; width: 100%; border-color: var(--gold-2); color: var(--gold); text-decoration: none; }
.btn.btn-gold.export-pdf { color: var(--ink); border-color: var(--gold); }

/* concierge on a phone */
.phone-tabs { display: none; }
body.phone .desk { position: fixed; inset: 0; display: flex; flex-direction: column; width: 100%; overflow: hidden; }
body.phone .desk-main { width: 100%; flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
body.phone .desk-nav { display: none; }
body.phone .desk-main { padding: var(--s2) var(--s2) var(--s4); max-width: none; }
body.phone .phone-tabs { flex: none; display: flex; background: #0d0809; border-top: 1px solid var(--gold-3); padding-bottom: env(safe-area-inset-bottom); z-index: 25; overflow-x: auto; scrollbar-width: none; }
body.phone .phone-tabs button { flex: 1 0 70px; height: 66px; white-space: nowrap; background: none; border: 0; color: var(--paper-2); font-family: var(--display); font-size: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; position: relative; }
body.phone .phone-tabs button.on { color: var(--gold); }
body.phone .phone-tabs button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
body.phone .phone-tabs .cnt { position: absolute; top: 8px; right: calc(50% - 24px); background: var(--velvet-2); color: #fff; font-family: var(--text); font-size: 11px; padding: 0 6px; border-radius: 10px; }
body.phone .desk-main h2 { font-size: 24px; }
body.phone .detail, body.phone .g2, body.phone .g3, body.phone .g4 { grid-template-columns: 1fr; }
body.phone .inline { flex-direction: column; align-items: stretch; }
body.phone .inline .field, body.phone .inline .btn { width: 100%; min-width: 0; }
body.phone table.tbl:not(.stack) { display: block; overflow-x: auto; white-space: nowrap; }
body.phone { overflow-x: hidden; }
body.phone .desk-main { overflow-x: hidden; }
body.phone .desk-main h3 { font-size: 18px; }

body.phone table.tbl.stack, body.phone table.tbl.stack tbody { display: block; }
body.phone table.tbl.stack tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px var(--s2); padding: var(--s2) 0; border-bottom: 1px solid var(--gold-3); }
body.phone table.tbl.stack tr:first-child { display: none; }
body.phone table.tbl.stack td { display: block; border: 0; padding: 0; white-space: normal; }
body.phone table.tbl.stack td::before { content: attr(data-l); display: block; font-size: 12px; color: var(--gold); margin-bottom: 2px; }
body.phone table.tbl.stack td[data-l="Slot"], table.tbl.stack td[data-l="Item"], table.tbl.stack td[data-l="Move to"], table.tbl.stack td[data-l="Piece"], table.tbl.stack td[data-l="Candidate"] { grid-column: 1 / -1; }
body.phone table.tbl.stack td select, table.tbl.stack td input { width: 100%; }

body.phone .logline { display: flex; flex-wrap: wrap; gap: 4px 10px; }
body.phone .logline > span:nth-child(3) { flex: 1 0 100%; }
body.phone .pl .n small { white-space: normal; }
body.phone .stages button { white-space: normal; }
body:not(.phone) .desk-nav { display: flex; }

/* scope */
.scope .scnav { display: flex; gap: 4px; overflow-x: auto; margin-bottom: var(--s3); border-bottom: 1px solid var(--gold-3); }
.scope .scnav button { background: none; border: 0; color: var(--paper-2); font-family: var(--display); font-size: 17px; padding: 8px 12px; white-space: nowrap; border-bottom: 2px solid transparent; }
.scope .scnav button.on { color: var(--gold); border-bottom-color: var(--gold); }
.scope .scsec { display: none; }
.scope .scsec.on { display: block; }
.scope.finding .scsec { display: block; }
.scope.finding .scsec h2 { font-size: 16px; color: var(--gold); }
.scope h2 { font-size: 26px; margin-bottom: var(--s2); }
.scope h3 { font-size: 20px; color: var(--gold); margin: var(--s3) 0 var(--s1); }
.scope h4 { font-size: 17px; margin: var(--s2) 0 4px; color: var(--paper); }
.scope p { font-size: 15px; }
.scope ul, .scope ol { padding-left: 20px; margin: 0 0 var(--s2); font-size: 15px; }
.scope li { margin-bottom: 4px; }
.scope .k { color: var(--gold); font-size: 13px; margin: var(--s2) 0 4px; }
details.sc { border-top: 1px solid var(--gold-3); }
details.sc:last-child { border-bottom: 1px solid var(--gold-3); }
details.sc > summary { list-style: none; cursor: pointer; padding: 10px 0; display: flex; flex-direction: column; gap: 2px; }
details.sc > summary::-webkit-details-marker { display: none; }
details.sc > summary > span { font-family: var(--display); font-size: 19px; }
details.sc > summary > small { color: var(--paper-2); font-size: 13px; }
details.sc > .body { padding: 0 0 var(--s3); }
details.sc details.sc { margin-left: 8px; }
details.sc details.sc > summary > span { font-size: 17px; }

/* marquee header */
.top { background: linear-gradient(180deg, rgba(26,10,13,.92), rgba(8,5,6,.85)); backdrop-filter: blur(4px); }
.who h1 { font-family: var(--display); }
.who .job { letter-spacing: .06em; font-size: 12px; text-transform: lowercase; }
.credits b { color: var(--gold); }

/* reading measure: 17px, 1.6 line height, paragraph gaps, 60 to 70 characters a line */
.sec .body p, .sec .body li, .lead, .hush, .gaz-a p, .watch p, .scope p, .scope li, .absent, .quote, .readout, .trade .side, .note {
  font-size: 17px; line-height: 1.6;
}
.sec .body p, .gaz-a p, .scope p, .watch p { margin: 0 0 14px; max-width: 66ch; }
.sec .body p:last-child, .gaz-a p:last-child, .scope p:last-child, .watch p:last-child { margin-bottom: 0; }
.list li, .scope li { padding: 10px 0; line-height: 1.6; }
.gt { display: block; font-weight: 700; color: var(--paper); margin-bottom: 2px; }
.sec .body b, .watch b, .hush b, .list li b { display: inline; font-weight: 700; color: var(--paper); }
.hush { line-height: 1.6; }
.ability p, .item .text, .watch .j, .bill .j, .cast .j, .trade .st, .item .meta { color: var(--paper-2); }
.ability p { font-size: 16px; line-height: 1.55; }
.item .text { font-size: 15px; line-height: 1.5; }
.gaz-notice p { font-size: 15px; line-height: 1.55; }
.gaz-feature p:first-of-type, .gaz-profile p:first-of-type { font-size: 18px; }
.sec > summary { padding: 14px 0; }
.sec > .sec-h { padding: 14px 0; }
.sec .body { padding-top: 4px; }
.watch .k, .hush .k, .scope .k { font-size: 13px; letter-spacing: .03em; margin-top: 14px; }
.who .job { text-transform: none; letter-spacing: .02em; font-size: 13px; }

/* scope on a phone */
.scope { max-width: 100%; overflow-wrap: break-word; }
.scope table.tbl { display: block; overflow-x: auto; }
.scope .scnav { margin-left: calc(-1 * var(--s2)); margin-right: calc(-1 * var(--s2)); padding: 0 var(--s2); }
.scope details.sc > .body { max-width: 100%; }
.scope .readout, .scope pre { white-space: pre-wrap; }

/* glossary */
.gl { cursor: pointer; text-decoration: underline dotted var(--gold-2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
#glosscard { position: fixed; left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); background: #1c1213; border: 1px solid var(--gold-2); padding: 14px 16px; z-index: 28; display: none; box-shadow: 0 10px 30px rgba(0,0,0,.6); animation: rise var(--normal) var(--ease) both; }
#glosscard.on { display: block; }
#glosscard .gterm { font-family: var(--display); font-size: 19px; color: var(--gold); margin-bottom: 4px; }
#glosscard .gtext { font-size: 15px; line-height: 1.5; color: var(--paper); }
#glosscard.with-tour { max-height: 34dvh; overflow-y: auto; }

/* splash */
.splash { position: fixed; inset: 0; z-index: 60; display: none; overflow-y: auto; -webkit-overflow-scrolling: touch; background: #0d0809 url('velvet.png') repeat; }
.splash.on, body.splash-pending .splash { display: flex; align-items: center; justify-content: center; }
.splash-skip { background: none; border: 0; color: var(--paper-2); font-family: var(--display); font-size: 15px; padding: 12px 16px; margin-top: 8px; display: block; width: 100%; text-align: center; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--gold-3); }
.splash-inner { max-width: 520px; padding: 48px 28px 40px; margin: auto; text-align: center; animation: splashin 1.2s ease-out both; }
.splash h1 { font-size: 34px; margin-bottom: 24px; color: var(--gold); }
.splash .wordmark { width: 100%; max-width: 400px; height: auto; margin: 0 auto 28px; display: block; }
.splash p { font-size: 16px; line-height: 1.65; color: var(--paper); margin: 0 0 16px; text-align: left; }
.splash .btn-gold { margin-top: 20px; width: 100%; height: 52px; font-size: 17px; }
body.splash-pending .splash .splash-inner { animation: none; opacity: 1; }
.splash.ready .splash-inner { animation: splashin 1.2s ease-out both; }
@keyframes splashin { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
.splash.out .splash-inner { animation: splashout .7s ease-in both; }
@keyframes splashout { to { opacity: 0; transform: translateY(-20px); } }

.confirm-actions { display: flex; gap: 10px; margin-top: 16px; }
.confirm-actions .btn { flex: 1; min-width: 0; }
.ability-overlay { position: fixed; inset: 0; z-index: 70; background: #0d0809; display: flex; align-items: center; justify-content: center; padding: 28px; opacity: 0; transition: opacity .3s ease; }
.ability-overlay.on { opacity: 1; }
.ability-show { text-align: center; max-width: 480px; width: 100%; }
.ability-show h2 { font-size: 28px; margin-bottom: 16px; color: var(--gold); }
.ability-show .lead { font-size: 17px; line-height: 1.6; text-align: left; margin-bottom: 20px; }
.ability-show-hint { font-family: var(--display); font-size: 15px; color: var(--gold); background: rgba(201,162,83,.08); border: 1px solid var(--gold-3); padding: 14px 16px; margin-bottom: 20px; line-height: 1.5; }

/* tour */
#tour { position: fixed; left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); background: #1c1213; border: 1px solid var(--gold); padding: 14px 16px; z-index: 29; display: none; box-shadow: 0 10px 30px rgba(0,0,0,.6); animation: rise var(--normal) var(--ease) both; }
#tour.on { display: block; }
#tour .ttext { font-size: 16px; line-height: 1.5; margin-bottom: 10px; }
#tour .tpdf { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
#tour .tpdf .muted { flex: 1; }
#tour .tacts { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
#tour .tstep { color: var(--paper-2); font-size: 13px; }

/* touch */
button, .btn, .tabs button, .pip, .sec > summary, .pl, .item.selectable, .avatar-btn, .sealed { -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.btn:active, .tabs button:active, .pip:active, .pl:active { opacity: .7; }
.pip { width: 36px; height: 36px; }
.pips { gap: 10px; }
.btn-sm { height: 40px; }
.sheet .close { width: 44px; height: 44px; line-height: 44px; text-align: center; top: 4px; right: 4px; font-size: 30px; }
body.noscroll { overflow: hidden; }
.tabs button .dot { top: 10px; right: calc(50% - 20px); width: 8px; height: 8px; }
.note .btn { height: 40px; padding: 0 14px; }
.ability .row, .ticket .row { min-height: 44px; }
.field input, .field select { height: 48px; font-size: 16px; }
.search { height: 48px; font-size: 16px; }
.tbl input, .tbl select { height: 44px; font-size: 16px; }

/* Keep controls inside the new scrolling shell. */
.stage-line { flex: none; }
body.phone .phone-tabs { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
body.phone .phone-tabs button { min-width: 0; }
body.noscroll .main, body.noscroll .desk-main { overflow-y: hidden; }
.main { padding-bottom: calc(var(--s4) + var(--tour-space, 0px)); }
#tour, #glosscard { max-height: 50dvh; overflow-y: auto; overscroll-behavior: contain; }
.field, .field input, .field select, .detail > div, .item > span { min-width: 0; }
.field input, .field select { max-width: 100%; }
.ticket .row { flex-wrap: wrap; }
@media (max-width: 600px) {
  .ticket .row { flex-direction: column; align-items: flex-start; }
  .item { grid-template-columns: 24px minmax(0, 1fr); }
  .item .name, .item .meta, .item .text { grid-column: 2; }
  .item .ico { grid-row: 1; }
  .item .meta { max-width: none; text-align: left; }
  .trade .hd { flex-wrap: wrap; gap: 4px 12px; }
}

/* layout picker */
#layoutpick { position: fixed; inset: 0; z-index: 70; background: #0d0809; padding: max(32px, env(safe-area-inset-top)) 20px 32px; overflow-y: auto; }
#layoutpick h1 { font-size: 30px; margin-bottom: 8px; }
#layoutpick .lp { display: grid; gap: 12px; margin-top: 20px; max-width: 900px; }
@media (min-width: 700px) { #layoutpick .lp { grid-template-columns: repeat(3, 1fr); } }
.lpb { background: var(--smoke); border: 1px solid var(--gold-3); color: var(--paper); text-align: left; padding: 20px; display: grid; grid-template-columns: 44px 1fr; gap: 6px 14px; align-items: center; min-height: 96px; }
.lpb[data-guess] { border-color: var(--gold); }
.lpb svg { width: 36px; height: 36px; fill: none; stroke: var(--gold); stroke-width: 1.5; grid-row: 1 / 3; }
.lpb b { font-family: var(--display); font-size: 22px; font-weight: 400; }
.lpb span { color: var(--paper-2); font-size: 14px; grid-column: 2; }

/* forced layouts */
body.desktop .desk { display: grid; grid-template-columns: 240px 1fr; position: static; }
body.desktop .desk-nav { display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh; overflow: auto; border-right: 1px solid var(--gold-3); border-bottom: 0; width: auto; padding: var(--s3) var(--s2); }
body.desktop .desk-nav h1 { font-size: 22px; padding: 0 var(--s2) var(--s2); }
body.desktop .desk-nav .sess { display: block; }
body.desktop .desk-nav button { font-size: 18px; padding: 10px var(--s2); }
body.desktop .desk-nav .foot { margin-top: auto; }
body.desktop .desk-main { padding: var(--s3) var(--s4); max-width: 1100px; }
body.desktop .detail { grid-template-columns: 1fr 1fr; }
body.desktop .g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.desktop .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
body.desktop .inline { flex-direction: row; align-items: flex-end; }
body.desktop .inline .field, body.desktop .inline .btn { width: auto; }
body.desktop table.tbl.stack, body.desktop table.tbl.stack tbody { display: table; width: 100%; }
body.desktop table.tbl.stack tr { display: table-row; padding: 0; border: 0; }
body.desktop table.tbl.stack tr:first-child { display: table-row; }
body.desktop table.tbl.stack td { display: table-cell; padding: 8px; border-bottom: 1px solid var(--smoke-2); }
body.desktop table.tbl.stack td::before { display: none; }
body.desktop .phone-tabs { display: none; }

body.tablet .desk { display: block; width: 100%; position: static; }
body.tablet .desk-nav { display: flex; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; position: sticky; top: 0; height: auto; width: 100%; padding: var(--s1) var(--s2); border-right: 0; border-bottom: 1px solid var(--gold-3); align-items: center; gap: 2px; z-index: 20; }
body.tablet .desk-nav h1 { font-size: 16px; padding: 0 var(--s2) 0 0; white-space: nowrap; }
body.tablet .desk-nav .sess { display: none; }
body.tablet .desk-nav button { font-size: 15px; padding: 8px 10px; white-space: nowrap; flex: none; }
body.tablet .desk-nav .foot { margin: 0 0 0 var(--s2); flex: none; display: flex; gap: 8px; }
body.tablet .desk-nav .foot .btn { width: auto; margin: 0; }
body.tablet .desk-main { padding: var(--s3); max-width: none; }
body.tablet .detail { grid-template-columns: 1fr 1fr; }
body.tablet .g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.tablet .phone-tabs { display: none; }

/* desk status bar */
.status { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: var(--s3); }
.status button { background: var(--smoke); border: 1px solid var(--gold-3); color: var(--paper-2); font-size: 13px; padding: 6px 12px; border-radius: 14px; }
.status button b { color: var(--gold); font-weight: 400; font-family: var(--display); font-size: 15px; }
.status button.hot { border-color: var(--velvet-2); color: #fff; background: rgba(143,26,36,.35); }

/* glossary on the desk */
body.desktop #glosscard, body.tablet #glosscard { bottom: 20px; left: auto; right: 20px; width: min(420px, 90vw); }
.readout .gl, .list .gl { color: var(--paper); }

/* desk: same house style */
.desk-main { position: relative; }
.desk-main::before { content: ""; position: absolute; left: 50%; top: -20vh; width: 120vw; height: 60vh; transform: translateX(-50%); pointer-events: none; z-index: -1;
  background: radial-gradient(ellipse at 50% 0%, rgba(201,162,83,.10), rgba(143,26,36,.05) 45%, transparent 70%); }
.desk-main h2 { position: relative; padding-bottom: 10px; }
.desk-main h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 64px; height: 1px; background: var(--gold); }
.desk-nav h1 { color: var(--gold); }
.status { position: relative; padding: 10px 0; }
.status::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background-image: radial-gradient(circle, var(--gold-2) 1.4px, transparent 2px); background-size: 16px 6px; background-repeat: repeat-x; opacity: .7; }
.pl { border-color: var(--gold-3); }
.pl .avatar { width: 56px; height: 56px; border-color: var(--gold-2); }
.pl:hover, .pl:active { border-color: var(--gold-2); background: var(--smoke-2); }
.card.hi { box-shadow: 0 0 0 1px rgba(201,162,83,.25); }
.desk .ticket { margin-bottom: 10px; }
.desk .pip { width: 32px; height: 32px; }
.readout { font-family: var(--text); font-size: 16px; line-height: 1.6; background: rgba(0,0,0,.25); border-left: 2px solid var(--gold); }


/* skeleton and image loading */
.sk { display: inline-block; height: .8em; border-radius: 3px; background: linear-gradient(90deg, var(--smoke-2), #2a1c1e, var(--smoke-2)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; vertical-align: middle; }
.sk-block { height: 14px; margin: 18px 0; border-radius: 3px; background: linear-gradient(90deg, var(--smoke-2), #2a1c1e, var(--smoke-2)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.sk-block.short { width: 60%; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.app.loading .stage-line::before, .app.loading .stage-line::after { opacity: .3; }
img.avatar, .bill img { opacity: 0; transition: opacity var(--normal) var(--ease); }
img.avatar.loaded, .bill img.loaded, img.avatar[src$="blank.svg"], .bill img[src$="blank.svg"] { opacity: 1; }
.gate-title { display: none; }
.gate-wordmark { text-align: center; margin: 0 auto 24px; }
.wm-top { font-family: var(--display); font-size: clamp(36px, 10vw, 64px); font-weight: 700; letter-spacing: .12em; color: var(--gold); line-height: 1; text-shadow: 0 0 20px rgba(0,0,0,.8), 0 2px 4px rgba(0,0,0,.9); }
.wm-at { font-family: var(--display); font-size: clamp(14px, 3.5vw, 20px); font-style: italic; font-weight: 700; color: #a8843f; letter-spacing: .2em; margin: 6px 0; text-shadow: 0 0 16px rgba(0,0,0,.8); }
.wm-bot { font-family: var(--display); font-size: clamp(44px, 13vw, 80px); font-weight: 700; letter-spacing: .18em; color: var(--paper); line-height: 1; text-shadow: 0 0 24px rgba(0,0,0,.8), 0 2px 6px rgba(0,0,0,.9); }
.gate-title span { display: block; font-size: .42em; letter-spacing: .02em; color: var(--gold); margin-top: 6px; }

/* player-first navigation and home */
.livebar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; border-bottom: 1px solid var(--smoke-2); background: rgba(13,8,9,.88); }
.livebar .stage-line { border: 0; text-align: left; min-width: 0; }
.connection { border: 0; border-left: 1px solid var(--smoke-2); background: transparent; color: var(--paper-2); padding: 0 14px; font: 12px var(--text); display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.connection-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold-2); box-shadow: 0 0 0 3px rgba(201,162,83,.08); }
.connection.live .connection-dot { background: #72ad82; }
.connection.offline .connection-dot { background: #d25d68; }
.connection.stale .connection-dot, .connection.loading .connection-dot { animation: pulse-dot 1.2s ease-in-out infinite; }
@keyframes pulse-dot { 50% { opacity: .35; } }

.primary-tabs { overflow: hidden; }
.primary-tabs button { flex-basis: 25%; min-width: 0; }
.now-card { background: linear-gradient(145deg, rgba(122,20,29,.48), rgba(28,18,19,.92)); border: 1px solid var(--gold-3); padding: 20px; margin-bottom: 18px; box-shadow: 0 14px 36px rgba(0,0,0,.16); }
.eyebrow { display: block; color: var(--gold); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 4px; }
.now-card h2 { font-size: 28px; line-height: 1.15; margin-bottom: 8px; }
.now-card p { color: var(--paper-2); margin: 0; font-size: 16px; }
.quick-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.home-block { border-top: 1px solid var(--gold-3); padding: 18px 0; }
.home-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.home-heading h2 { font-size: 24px; }
.text-btn { border: 0; background: none; color: var(--gold); padding: 8px 0; font: 14px var(--text); text-decoration: underline; }
.activity-list { display: grid; gap: 7px; }
.activity-row { width: 100%; min-height: 50px; display: grid; grid-template-columns: 8px 1fr auto; gap: 10px; align-items: center; text-align: left; border: 1px solid var(--smoke-2); background: rgba(28,18,19,.72); color: var(--paper-2); padding: 10px 12px; font: 15px/1.4 var(--text); }
.activity-row.new { border-color: var(--gold-3); color: var(--paper); }
.activity-mark { width: 7px; height: 7px; border-radius: 50%; background: var(--paper-3); }
.activity-row.new .activity-mark { background: var(--gold); box-shadow: 0 0 0 3px rgba(201,162,83,.09); }
.activity-arrow { color: var(--gold); font-size: 24px; }
.empty.calm { border: 1px dashed var(--smoke-2); padding: 14px; text-align: left; }
.context-tip { display: flex; justify-content: space-between; gap: 14px; align-items: center; border-left: 2px solid var(--gold); background: rgba(201,162,83,.07); padding: 12px 14px; margin-bottom: 14px; }
.context-tip div { display: grid; gap: 2px; }
.context-tip b { color: var(--gold); font: 16px var(--display); }
.context-tip span { color: var(--paper-2); font-size: 14px; }
.context-tip button { flex: none; background: none; border: 0; color: var(--gold); text-decoration: underline; min-height: 44px; padding: 0 4px; }
.ability-use { margin-top: 12px; width: 100%; }
.ability-note, .confirm-copy { color: var(--paper-2); background: rgba(0,0,0,.2); padding: 12px; margin-top: 12px; line-height: 1.5; }
.action-list li { padding-bottom: 8px; }

.more-list { display: grid; gap: 8px; }
.more-row { width: 100%; min-height: 68px; display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: center; text-align: left; border: 1px solid var(--smoke-2); background: rgba(0,0,0,.16); color: var(--paper); padding: 12px 14px; }
.more-row svg { width: 26px; height: 26px; fill: none; stroke: var(--gold); stroke-width: 1.5; }
.more-row span { display: grid; gap: 2px; }
.more-row b { font: 19px var(--display); font-weight: 400; }
.more-row small { color: var(--paper-2); font: 13px/1.35 var(--text); }
.more-row i { color: var(--gold); font-style: normal; font-size: 26px; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; flex-wrap: wrap; }

.onboard .lead { color: var(--gold); font-family: var(--display); font-size: 21px; }
.onboard-focus { font-size: 19px; line-height: 1.55; border-left: 2px solid var(--gold); padding: 12px 16px; margin: 16px 0; background: rgba(201,162,83,.07); }
.onboard-progress { color: var(--paper-2); margin-top: 24px; display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.onboard-progress div { display: flex; gap: 6px; }
.onboard-progress i { width: 24px; height: 3px; background: var(--smoke-2); }
.onboard-progress i.on { background: var(--gold); }

button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

@media (max-width: 420px) {
  .connection { padding: 0 10px; }
  #connectionText { max-width: 92px; overflow: hidden; text-overflow: ellipsis; }
  .now-card { padding: 17px; }
  .now-card h2 { font-size: 25px; }
  .confirm-actions .btn { flex: 1; }
}

/* guided walkthrough */
#walk { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #1c1213; border-top: 1px solid var(--gold); padding: 16px 20px calc(16px + env(safe-area-inset-bottom)); display: none; box-shadow: 0 -10px 40px rgba(0,0,0,.7); }
#walk.on { display: block; animation: rise var(--normal) var(--ease) both; }
body.noscroll #walk.on { display: none; }
.walk-dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 12px; }
.walk-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--gold-3); display: block; }
.walk-dots i.done { background: var(--gold-2); }
.walk-dots i.on { background: var(--gold); width: 20px; border-radius: 4px; }
.walk-title { font-family: var(--display); font-size: 20px; color: var(--gold); margin-bottom: 6px; }
.walk-text { font-size: 15px; line-height: 1.5; color: var(--paper); margin-bottom: 14px; }
.walk-acts { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.walk-skip { background: none; border: 0; color: var(--paper-2); font-family: var(--display); font-size: 14px; padding: 8px 0; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--gold-3); }
.walk-nav { display: flex; gap: 8px; }
.walk-arrow { width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; background: transparent; border: 1px solid var(--gold-2); color: var(--gold); }
.walk-arrow-next { background: var(--gold); color: #0d0809; border-color: var(--gold); }
.walk-arrow:disabled { opacity: .35; }

body.walking .tabs { pointer-events: none; opacity: .3; }
body.walking .sec.walk-dim, body.walking .walk-dim { opacity: .18; pointer-events: none; transition: opacity var(--normal) var(--ease); }
body.walking .sec.walk-focus { opacity: 1; pointer-events: auto; }
body.walking .sec.walk-focus > summary { pointer-events: none; }
.item.fixed { cursor: pointer; border-color: var(--gold-2); }
.item.fixed:active { background: var(--smoke-2); }
.arrival-note { font-family: var(--display); font-size: 15px; color: var(--gold); text-align: center; padding: 12px; border: 1px solid var(--gold-3); margin-bottom: var(--s3); }
.ticket.spent { opacity: .4; }
.ticket.spent .stub { color: var(--paper-3); }
.ticket.spent h3 { color: var(--paper-3); }
.ability-practice { font-family: var(--display); font-size: 15px; color: var(--paper-2); font-style: italic; margin-top: 12px; }

/* The Crossing: login sea */
#sea { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; animation: houselights 1.8s ease-out both; }

/* The Crossing: statuses */
.status-card { border: 1px solid var(--velvet-2); background: rgba(92,13,21,.28); padding: 16px 18px; margin-bottom: 14px; animation: rise var(--normal) var(--ease) both; }
.status-card h2 { font-size: 24px; line-height: 1.2; margin-bottom: 6px; }
.status-card p { color: var(--paper-2); margin: 0; font-size: 16px; line-height: 1.55; }
.status-card p b { color: var(--paper); }
.status-card.captive { border-color: var(--gold-2); background: rgba(201,162,83,.08); }
.status-card.holding { border-color: var(--gold-3); background: rgba(0,0,0,.22); }
[data-until] { font-variant-numeric: tabular-nums; }
.bill .st { color: #e0a0a6; font-size: 13px; font-style: italic; line-height: 1.3; margin-top: 2px; }
.bill.hurt img { border-color: var(--velvet-2); box-shadow: 0 0 0 3px rgba(143,26,36,.25); }
.item .item-use { display: block; margin-top: 8px; }
.cure-row { grid-template-columns: 44px 1fr auto; }
.cure-row .avatar { width: 40px; height: 40px; }
.cure-row:disabled { opacity: .45; cursor: default; }
.card.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.card.check input { width: 22px; height: 22px; margin-top: 3px; accent-color: var(--gold); flex: none; }
.card.check > span { display: grid; gap: 2px; }
.card.check.done { opacity: .6; }
.check-inline { display: flex; align-items: center; gap: 8px; color: var(--paper-2); font-size: 15px; min-height: var(--ctrl); }
.check-inline input { width: 20px; height: 20px; accent-color: var(--gold); }
.film { margin-top: 10px; }
.film > b { font-size: 24px; color: var(--gold); min-width: 24px; }
.status button.hot b { color: #fff; }
.tag b { font-weight: 400; }

.gate-night { margin-top: 10px; font-size: 15px; color: var(--gold, #c9a45c); letter-spacing: .02em; }
.gate-night a { color: inherit; }
