:root {
  --bg: #2b3a33; --felt: #2f4038; --felt2: #26342d; --surface: #fffdf9; --fg: #22201c; --muted: #6c675f; --line: #d9d4ca;
  --accent: #8a3b2e; --accent-soft: #f3e4df; --frame: #3b352d; --ok: #2f6b4f; --bar: #fffdf9; --barfg: #22201c;
  --pulp: #8a2d22; --pulp2: #5e1d16; --ero: #5a2a52; --ero2: #3c1a37; --blind: #23344a; --blind2: #16243a; --gold: #d7b46a;
  --serif: "Source Serif 4", Georgia, serif; --sans: Inter, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #151c18; --felt: #1c2621; --felt2: #161e1a; --surface: #22201d; --fg: #ece7df; --muted: #a49d92; --line: #3b3732;
  --accent: #e08a74; --accent-soft: #3a2621; --frame: #c9bfae; --ok: #7fc4a0; --bar: #1d1b18; --barfg: #ece7df; color-scheme: dark } }
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(ellipse at 50% 30%, var(--felt), var(--felt2) 70%) fixed, var(--bg); color: var(--fg); font: 15px/1.55 var(--sans); min-height: 100vh; }
button, input, textarea { font: inherit; color: var(--fg); }
button { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 6px 12px; cursor: pointer; }
button.primary { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }
button:focus-visible, input:focus-visible, textarea:focus-visible, .cardback:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
[hidden] { display: none !important; }

/* Bar */
.bar { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; padding: 10px 18px; background: var(--bar); color: var(--barfg); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.brand { font: 600 1.05rem var(--serif); }
.proto { font: 600 .68rem var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-left: 6px; }
.set { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lbl { font-size: .75rem; color: var(--muted); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.seg button { border: 0; border-radius: 0; padding: 4px 11px; font-size: .82rem; background: transparent; }
.seg button.on { background: var(--accent); color: #fff; }
.views { margin-left: auto; display: flex; gap: 4px; }
.views button { border-radius: 999px; font-size: .85rem; }
.views button.on { background: var(--fg); color: var(--surface); border-color: var(--fg); }
.tiny { font-size: .78rem; color: var(--muted); display: inline-flex; gap: 4px; align-items: center; }
main { padding: 18px 16px 60px; max-width: 1280px; margin: 0 auto; }
.hint { color: #e9e3d6; opacity: .85; font-size: .9rem; margin: 0 0 14px; }
#words .hint, #session .hint { color: #e9e3d6; }

/* The spread */
.spread { display: flex; flex-wrap: wrap; gap: 18px 14px; justify-content: center; align-items: flex-end; padding: 10px 0 30px; }
.cardback { --w: 104px; width: var(--w); height: calc(var(--w) * 1.42); border-radius: 9px; border: 0; padding: 0; position: relative; cursor: pointer;
  transform: rotate(var(--rot, 0deg)); transition: transform .18s ease, box-shadow .18s ease; box-shadow: 0 6px 14px -6px rgba(0,0,0,.6), 0 0 0 1px rgba(0,0,0,.25); }
.cardback:hover, .cardback:focus-visible { transform: translateY(-10px) rotate(var(--rot, 0deg)) scale(1.04); box-shadow: 0 16px 24px -10px rgba(0,0,0,.7), 0 0 0 1px rgba(0,0,0,.25); }
.cardback .art { position: absolute; inset: 6px; border-radius: 6px; border: 1.5px solid var(--gold); display: grid; place-items: center; overflow: hidden; }
.cardback.pulp { background: var(--pulp2); }
.cardback.pulp .art { background: repeating-linear-gradient(45deg, var(--pulp) 0 6px, var(--pulp2) 6px 12px); }
.cardback.erotica { background: var(--ero2); }
.cardback.erotica .art { background: radial-gradient(circle at 50% 50%, var(--ero) 0 30%, transparent 31%) 0 0 / 18px 18px, var(--ero2); }
.cardback.blind { background: var(--blind2); }
.cardback.blind .art { background: repeating-linear-gradient(90deg, var(--blind) 0 3px, var(--blind2) 3px 9px); }
.cardback .suit { font: 700 calc(var(--w) * .34)/1 var(--serif); color: var(--gold); text-shadow: 0 1px 0 rgba(0,0,0,.5); background: rgba(0,0,0,.35); border-radius: 50%; width: 1.5em; height: 1.5em; display: grid; place-items: center; }
.cardback .genre { position: absolute; top: 9px; left: 0; right: 0; padding: 0 8px; text-align: center; white-space: nowrap; overflow: hidden; font: 600 .6rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.cardback .pips { position: absolute; bottom: 9px; left: 0; right: 0; display: flex; gap: 3px; justify-content: center; }
.cardback .pips i { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); display: block; }
.cardback .cb { position: absolute; top: -8px; right: -8px; width: 26px; height: 26px; border-radius: 50%; background: var(--gold); color: #2a1f0a; font: 700 .9rem/26px var(--sans); text-align: center; box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.cardback.lv0 { --w: 92px; } .cardback.lv1 { --w: 102px; } .cardback.lv2 { --w: 116px; } .cardback.lv3 { --w: 132px; } .cardback.lv4 { --w: 146px; }
.cardback.blind { --w: 108px; }
.legend { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; color: #e9e3d6; font-size: .82rem; margin-top: -4px; }

/* The flip */
.flipper { perspective: 1400px; }
.flipInner { position: relative; transition: transform .7s cubic-bezier(.2,.7,.2,1); transform-style: preserve-3d; }
.flipper.turned .flipInner { transform: rotateY(180deg); }
.face { backface-visibility: hidden; }
.face.back { position: absolute; inset: 0; display: grid; place-items: center; }
.face.back .cardback { --w: 260px; transform: none; cursor: default; }
.face.front { transform: rotateY(180deg); }
.face.back .waiting { position: absolute; bottom: -34px; left: 0; right: 0; text-align: center; color: #e9e3d6; font-size: .9rem; }

/* Card frame (from Prototype) */
.layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 24px; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } .views { margin-left: 0; } }
.frame { background: var(--surface); border: 2px solid var(--frame); border-radius: 6px; outline: 1px solid var(--frame); outline-offset: 4px; min-height: 420px; }
.cardHead { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; padding: 14px 18px 12px; border-bottom: 2px solid var(--frame); }
.cardHead h1 { font: 600 1.35rem/1.2 var(--serif); margin: 0; }
.tag { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.tag.genre { color: var(--accent); border-color: var(--accent); }
.tag.cbtag { background: var(--gold); color: #2a1f0a; border-color: var(--gold); }
.sec { padding: 12px 18px; border-bottom: 1px solid var(--line); }
.sec:last-child { border-bottom: 0; }
.sec h2 { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 0 0 8px; font-weight: 600; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0; }
.kv dt { font-weight: 600; } .kv dd { margin: 0; }
.kv dd.changed, .changed { background: color-mix(in srgb, var(--gold) 30%, transparent); border-radius: 3px; padding: 0 3px; }
.opening { font: italic 1.08rem/1.5 var(--serif); background: var(--accent-soft); border-left: 3px solid var(--accent); padding: 8px 12px; margin: 0 0 10px; }
.tasks { margin: 0; padding-left: 22px; } .tasks li { margin: 3px 0; }
.roll { display: grid; gap: 6px; }
.roll .opt { padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; }
.roll .opt.hit { border-color: var(--accent); background: var(--accent-soft); font-weight: 500; }
.rules { font-size: .9rem; color: var(--muted); } .rules summary { cursor: pointer; color: var(--fg); }

/* Desk */
.desk { display: grid; gap: 12px; align-content: start; background: var(--surface); border-radius: 8px; padding: 14px; box-shadow: 0 10px 30px -14px rgba(0,0,0,.6); }
.callback { background: color-mix(in srgb, var(--gold) 22%, var(--surface)); border-left: 4px solid var(--gold); border-radius: 6px; padding: 8px 12px; font: 1rem/1.45 var(--serif); }
.callback b { font-family: var(--sans); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; display: block; color: var(--muted); }
.callback.miss { border-left-color: var(--line); background: var(--surface); font: .85rem var(--sans); color: var(--muted); }
.timerRow, .submitRow { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.timer { font: 600 1.5rem/1 var(--sans); font-variant-numeric: tabular-nums; }
textarea { width: 100%; min-height: 240px; resize: vertical; font: 1.08rem/1.65 var(--serif); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; }
.wordAsk { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .wordAsk label { font-size: .85rem; color: var(--muted); } .wordAsk input { flex: 1 1 200px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; }
.chips { display: flex; gap: 6px; width: 100%; } .chips span { background: var(--accent-soft); border-radius: 999px; padding: 2px 10px; font-family: var(--serif); }
.feedback { border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 6px; padding: 10px 14px; white-space: pre-wrap; }
.feedback .status { color: var(--muted); font-size: .85rem; }
.rate { display: grid; gap: 8px; } .rate > div { display: flex; gap: 12px; align-items: center; } .rate > div > span:first-child { width: 9em; font-size: .9rem; }
.stars button { border-radius: 50%; width: 32px; height: 32px; padding: 0; margin-right: 4px; }
.stars button.on { background: var(--gold); border-color: var(--gold); color: #2a1f0a; font-weight: 700; }

/* Your words */
.char { background: var(--surface); border-radius: 8px; padding: 12px 16px; margin: 0 0 14px; }
.char h2 { font: 600 1.15rem var(--serif); margin: 0 0 8px; display: flex; gap: 10px; align-items: baseline; }
.char h2 small { font: .8rem var(--sans); color: var(--muted); }
.piece { border-top: 1px solid var(--line); padding: 8px 0; }
.piece .meta { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.piece p { margin: 2px 0 0; font: .98rem/1.55 var(--serif); }
.piece.new { border-left: 3px solid var(--gold); padding-left: 10px; }
.piece.dummy p { color: var(--muted); font-style: italic; }

/* Session */
.stats { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: 8px; overflow: hidden; font-size: .9rem; }
.stats th, .stats td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.stats th { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

.rollOut { margin-left: 10px; font: 1rem/1.4 var(--serif); }
.srcPiece { margin-top: 8px; font: .95rem/1.5 var(--serif); }
.srcPiece summary { cursor: pointer; font: .8rem var(--sans); color: var(--muted); }
.srcPiece p { margin: .4em 0; }

.cardback .cb:not(.ready) { background: var(--surface); color: var(--gold); box-shadow: inset 0 0 0 1.5px var(--gold), 0 2px 6px rgba(0,0,0,.5); }
.cardback .cb.making { animation: cbpulse 1.2s ease-in-out infinite; }
@keyframes cbpulse { 50% { opacity: .35; } }
.sheet .about { margin: 0 0 8px; color: var(--muted); font-size: .9rem; }
.quotes { list-style: none; margin: 0; padding: 0; }
.quotes li { border-top: 1px solid var(--line); padding: 6px 0; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.quotes .q { font: .98rem/1.5 var(--serif); flex: 1 1 320px; }
.quotes li.dummy .q { color: var(--muted); font-style: italic; }
.quotes details { font-size: .8rem; color: var(--muted); }
.quotes details[open] { flex-basis: 100%; }
.quotes details p { font: .95rem/1.5 var(--serif); color: var(--text, inherit); margin: .4em 0; }
.quotes summary { cursor: pointer; }
.others { font: 600 .8rem var(--sans); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 22px 0 10px; }

/* Cast board */
:root { --cork: #b4895a; --cork2: #9c7347; --card: #fbf7ec; --string: #b3261e; }
.cork { position: relative; border-radius: 10px; padding: 18px; border: 10px solid #6b4a2b;
  background: radial-gradient(circle, rgba(0,0,0,.10) 0 1px, transparent 1.5px) 0 0 / 9px 9px, radial-gradient(circle, rgba(255,255,255,.08) 0 1px, transparent 1.5px) 4px 5px / 11px 11px, linear-gradient(135deg, var(--cork), var(--cork2));
  box-shadow: inset 0 0 30px rgba(0,0,0,.35), 0 10px 24px -12px rgba(0,0,0,.7); }
.cork .strings { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.cork .ring { position: relative; height: 520px; }
.pin { position: absolute; transform: translate(-50%, -50%) rotate(var(--r, -1deg)); width: 190px; z-index: 2; text-align: left; cursor: pointer;
  background: var(--card); color: #2a241b; border: 0; border-radius: 3px; padding: 14px 12px 10px; display: grid; gap: 3px;
  box-shadow: 0 6px 12px -6px rgba(0,0,0,.55); background-image: linear-gradient(transparent 33px, #e9b9b2 33px 34px, transparent 34px); }
.pin:nth-child(3n) { --r: 1.5deg; } .pin:nth-child(3n+1) { --r: -1.5deg; }
.pin:hover, .pin:focus-visible { box-shadow: 0 0 0 3px var(--gold), 0 10px 18px -8px rgba(0,0,0,.6); }
.pin b { font: 600 1.02rem/1.2 var(--serif); }
.pin .line { font-size: .8rem; line-height: 1.35; color: #4b4337; }
.pin .count { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: #7a6f5f; }
.pin.main { left: 50%; top: 50%; width: 220px; --r: 0deg; background-color: #fff6d8; }
.pin.main b { font-size: 1.2rem; }
.tack { position: absolute; top: -6px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ff7a6b, #a3160d 70%); box-shadow: 0 2px 3px rgba(0,0,0,.5); }
.ring.stack { height: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 18px; padding-top: 8px; }
.ring.stack .pin { position: relative; left: auto !important; top: auto !important; transform: rotate(var(--r, 0deg)); width: auto; }
.walkons { position: relative; z-index: 2; margin-top: 14px; border-top: 2px dashed rgba(0,0,0,.2); padding-top: 10px; }
.walkons h3 { margin: 0 0 8px; font: 600 .72rem var(--sans); text-transform: uppercase; letter-spacing: .12em; color: #3b2a18; }
.slips { display: flex; flex-wrap: wrap; gap: 14px 12px; }
.pin.walkon { position: relative; transform: rotate(var(--r, 0deg)); width: 150px; padding: 12px 10px 8px; background-image: none; }
.pin.walkon b { font-size: .9rem; }
.hint.small { font-size: .8rem; margin-top: 8px; }
.person { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.backBtn { justify-self: start; }
.pcard { position: relative; background: var(--card); color: #2a241b; border-radius: 4px; padding: 18px 18px 14px; box-shadow: 0 8px 16px -8px rgba(0,0,0,.6); }
.pcard h2 { margin: 0; font: 600 1.6rem var(--serif); } .pcard .line { margin: 4px 0; } .pcard .count { margin: 0; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: #7a6f5f; }
.person h3 { color: #e9e3d6; font: 600 .75rem var(--sans); text-transform: uppercase; letter-spacing: .12em; margin: 8px 0 0; }
.appear { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.appear li { background: var(--surface); border-radius: 6px; padding: 10px 14px; }
.appear summary { cursor: pointer; display: grid; grid-template-columns: auto auto 1fr; gap: 4px 10px; align-items: baseline; }
.appear .cid { font-weight: 600; } .appear .fl { font: italic .95rem/1.45 var(--serif); grid-column: 1 / -1; }
.appear .with { grid-column: 1 / -1; font-size: .8rem; color: var(--muted); } .appear .with a { color: var(--accent); }
.appear details p { font: .98rem/1.55 var(--serif); margin: .5em 0; }

/* Case file (dossier) mock */
:root { --manila: #d9b77a; --manila2: #c9a263; --paper: #fbf8f0; --ink: #26221b; --typed: 'Special Elite', 'Courier New', monospace; --hand: 'Caveat', 'Bradley Hand', cursive; --stampred: #b3261e; }
.pinStamp { position: absolute; right: 8px; bottom: 8px; font: 700 .6rem var(--typed); color: var(--stampred); border: 1.5px solid var(--stampred); padding: 0 4px; transform: rotate(-8deg); text-transform: uppercase; opacity: .85; }
.clip { position: absolute; top: -10px; right: 6px; font-size: .75rem; background: var(--paper); border-radius: 999px; padding: 0 6px; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.dossierWrap { max-width: 1120px; margin: 0 auto; position: relative; }
.dTop { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 10px; }
.dTop .tiny { color: #e9e3d6; } .mocknote { margin-left: auto; opacity: .75; }
.folder { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 170px; gap: 0; background: linear-gradient(160deg, var(--manila), var(--manila2));
  border-radius: 6px 12px 12px 6px; padding: 18px 0 18px 18px; box-shadow: 0 14px 30px -14px rgba(0,0,0,.8); }
.sheet { background: var(--paper); color: var(--ink); border-radius: 2px; padding: 20px 24px; min-height: 480px; box-shadow: 2px 3px 0 rgba(0,0,0,.08), 0 1px 6px rgba(0,0,0,.25); min-width: 0; }
.ftabs { display: grid; align-content: start; gap: 4px; padding-top: 10px; }
.ftabs button { text-align: left; border: 0; border-radius: 0 8px 8px 0; background: color-mix(in srgb, var(--manila2) 70%, #fff); color: var(--ink); font: .8rem var(--typed); padding: 8px 10px; margin-left: -2px; }
.ftabs button.on { background: var(--paper); font-weight: 700; box-shadow: 2px 2px 4px rgba(0,0,0,.2); }
.ftabs .red, .red { color: var(--stampred); font-weight: 700; }
@media (max-width: 760px) { .folder { grid-template-columns: 1fr; padding: 12px; } .ftabs { order: -1; grid-auto-flow: column; overflow-x: auto; padding: 0 0 6px; } .ftabs button { border-radius: 8px 8px 0 0; white-space: nowrap; } }
.stampline { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; border-bottom: 2px solid var(--ink); padding-bottom: 8px; margin-bottom: 10px; }
.stampline h2 { font: 400 1.7rem var(--typed); margin: 2px 0 0; letter-spacing: .04em; }
.fileNo { font: .72rem var(--typed); color: #6b6253; }
.stamp { font: 700 1rem var(--typed); color: var(--stampred); border: 3px double var(--stampred); padding: 2px 10px; transform: rotate(-6deg); text-transform: uppercase; letter-spacing: .1em; opacity: .85; white-space: nowrap; }
.sheet section { margin: 14px 0 6px; }
.sheet h3 { font: 400 .78rem var(--typed); text-transform: uppercase; letter-spacing: .12em; color: #5d5446; margin: 0 0 6px; border-bottom: 1px dotted #b9ad97; padding-bottom: 3px; }
.sheet h3 .count { background: var(--ink); color: var(--paper); border-radius: 999px; padding: 0 7px; font-size: .7rem; }
.fact { display: grid; grid-template-columns: 150px 1fr; gap: 2px 12px; padding: 4px 0; font: .95rem/1.45 var(--serif); }
.fact .fk { font: .78rem/1.6 var(--typed); color: #6b6253; }
.fact:not(:has(.fk)) { grid-template-columns: 1fr; }
.fact.blank .fv { color: #aaa08e; }
.fact .why { color: #6b6253; font-size: .85rem; }
@media (max-width: 560px) { .fact { grid-template-columns: 1fr; } }
.chip { font: .68rem var(--sans); border: 1px solid #b9ad97; background: #f1ead9; color: #4b4337; border-radius: 4px; padding: 0 5px; margin-left: 2px; cursor: pointer; vertical-align: 1px; }
.chip.note { font: .85rem var(--hand); background: #fff7c7; border-color: #e2d27a; }
.chip.names { font-style: italic; }
.chip:hover { border-color: var(--ink); }
.histBtn { font: 600 .72rem var(--sans); border: 1px solid #c9a263; background: #fbefd6; color: #6b4a1b; border-radius: 999px; padding: 0 7px; margin-left: 4px; }
.hist { grid-column: 1 / -1; margin: 4px 0 6px; background: #f5efe1; border-left: 3px solid #c9a263; padding: 6px 10px; }
.hist .arc { font: 1.05rem var(--hand); color: #6b4a1b; margin-bottom: 4px; }
.hist ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.hist li { font-size: .88rem; display: grid; grid-template-columns: 70px 1fr; gap: 8px; }
.hist li .span { font: .7rem/1.7 var(--typed); color: #8a7f6c; }
.hist li.chg { font-weight: 600; } .hist li.planned { font-family: var(--hand); font-size: 1.05rem; color: #6b4a1b; }
.leads { margin: 0; padding-left: 18px; font: .95rem/1.5 var(--serif); } .leads li { margin: 3px 0; }
.onTable { display: inline-flex; align-items: center; gap: 6px; font: .72rem var(--sans); color: #6b4a1b; background: #fbefd6; border-radius: 4px; padding: 1px 6px; margin-left: 4px; }
.miniback { width: 14px; height: 20px; border-radius: 2px; background: linear-gradient(225deg, var(--manila) 0 30%, transparent 30%), repeating-linear-gradient(45deg, var(--pulp) 0 2px, var(--pulp2) 2px 4px); position: relative; }
.dt { width: 100%; border-collapse: collapse; font: .9rem/1.4 var(--serif); }
.dt th { font: .7rem var(--typed); text-transform: uppercase; letter-spacing: .08em; color: #6b6253; text-align: left; border-bottom: 1px solid #b9ad97; padding: 4px 6px; }
.dt td { border-bottom: 1px dotted #d3c9b4; padding: 5px 6px; vertical-align: top; }
.dt tr.chg td { background: #fbefd6; } .chgTag { font: .65rem var(--typed); color: #6b4a1b; border: 1px solid #c9a263; border-radius: 3px; padding: 0 3px; }
.dt a { color: var(--stampred); }
.rul { font: 700 .72rem var(--typed); text-transform: uppercase; padding: 0 4px; border-radius: 3px; }
.rul.r-revised { color: #1d5a8a; border: 1px solid #1d5a8a; } .rul.r-updated { color: #6b4a1b; border: 1px solid #c9a263; } .rul.r-error { color: #7a1f1f; border: 1px solid #7a1f1f; }
/* review slips clipped to the front of the folder */
.slips { grid-column: 1 / -1; margin: -4px 18px 14px 0; display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.slipsHead { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; color: var(--ink); }
.slipsHead .tiny { color: #4b4337; }
.slip { position: relative; flex: 1 1 240px; max-width: 340px; background: #fffef6; color: var(--ink); padding: 14px 12px 10px; transform: rotate(var(--r)); box-shadow: 0 4px 10px -4px rgba(0,0,0,.45);
  background-image: repeating-linear-gradient(transparent 0 21px, #d7e3f0 21px 22px); }
.slip::before { content: ""; position: absolute; top: -10px; left: 18px; width: 12px; height: 30px; border: 2px solid #8d8d8d; border-radius: 6px; }
.slip .sv { font: .95rem/1.4 var(--serif); } .slip .sto { font: .72rem var(--typed); color: #6b6253; margin-top: 4px; }
.slip .sconf { font-size: .82rem; color: var(--stampred); margin-top: 4px; }
.slip .sbtn { display: flex; gap: 8px; margin-top: 8px; }
.slip.conflict { outline: 2px solid var(--stampred); }
.cstamp { position: absolute; top: 6px; right: 8px; font: 700 .7rem var(--typed); color: var(--stampred); border: 2px solid var(--stampred); padding: 0 4px; transform: rotate(6deg); text-transform: uppercase; }
.ruling { margin-top: 8px; display: grid; gap: 6px; } .ruling p { margin: 0; font-weight: 600; }
.ruling button { text-align: left; display: grid; gap: 1px; } .ruling button span { font-size: .78rem; color: var(--muted); }
/* source side panel */
.srcPanel { position: fixed; top: 70px; right: max(16px, env(safe-area-inset-right, 0px)); width: min(420px, calc(100vw - 32px)); max-height: calc(100vh - 100px); overflow: auto; z-index: 20;
  background: var(--paper); color: var(--ink); border-radius: 6px; padding: 12px 16px; box-shadow: 0 16px 40px -10px rgba(0,0,0,.7); font: .98rem/1.55 var(--serif); }
.srcHead { display: flex; justify-content: space-between; align-items: center; position: sticky; top: -12px; background: var(--paper); padding: 4px 0; }
.srcHead button { border: 0; background: none; font-size: 1.3rem; color: var(--ink); }
.srcPanel .hand { font: 1.25rem/1.4 var(--hand); }
.slip.conflict .sv { padding-right: 70px; }

.noteFact .fv { font: 1.12rem/1.35 var(--hand); color: #6b4a1b; }
/* walk-on scraps and bundles */
.wtip { margin: -2px 0 10px; font-size: .8rem; color: #3b2a18; }
.scraps { display: flex; flex-wrap: wrap; gap: 14px 12px; align-items: flex-start; }
.scrap { width: 170px; background: #f6eed9; color: #2a241b; padding: 9px 10px; display: grid; gap: 3px; cursor: grab; transform: rotate(-.8deg);
  clip-path: polygon(0 3%, 6% 0, 40% 2%, 70% 0, 100% 3%, 98% 50%, 100% 97%, 60% 100%, 30% 98%, 0 100%, 2% 50%); box-shadow: 0 4px 8px -4px rgba(0,0,0,.5); }
.scrap:nth-child(2n) { transform: rotate(1deg); }
.scrap b { font: 600 .88rem var(--serif); } .scrap .sc, .bundle .sc { font: .66rem var(--sans); text-transform: uppercase; letter-spacing: .06em; color: #7a6f5f; }
.scrap .sq { font: italic .8rem/1.35 var(--serif); color: #4b4337; }
.scrap.lifted { opacity: .4; } .scrap.over, .bundle.over { outline: 3px dashed var(--stampred); outline-offset: 3px; }
.bundle { position: relative; width: 190px; text-align: left; border: 0; background: #f6eed9; color: #2a241b; padding: 14px 12px 10px; display: grid; gap: 3px; cursor: pointer;
  box-shadow: 3px 3px 0 #e8dcc0, 6px 6px 0 #ddd0b0, 0 8px 14px -6px rgba(0,0,0,.5); }
.bundle b { font: 600 1rem var(--serif); }
.bclip { position: absolute; top: -12px; left: 16px; width: 14px; height: 34px; border: 2.5px solid #8d8d8d; border-radius: 7px; }
.slip.suggest { max-width: 460px; margin-bottom: 12px; }
.bsheet .fileNo { margin-bottom: 2px; }
.nameRow { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.scrap, .bundle, .slip.suggest { position: relative; z-index: 2; }

/* Account (2026-11-26) */
.who { font-size: .85rem; color: var(--muted); display: flex; gap: 10px; align-items: center; }
.who #whoName { color: var(--barfg); font-weight: 600; }
.who a { color: var(--accent); }

/* Tester worlds (2026-11-26): adventure and romance use the same backs as pulp and erotica. */
.cardback.adventure { background: var(--pulp2); }
.cardback.adventure .art { background: repeating-linear-gradient(45deg, var(--pulp) 0 6px, var(--pulp2) 6px 12px); }
.cardback.romance { background: var(--ero2); }
.cardback.romance .art { background: radial-gradient(circle at 50% 50%, var(--ero) 0 30%, transparent 31%) 0 0 / 18px 18px, var(--ero2); }

/* Test app (2026-11-26): the gallery's switches are hidden; a hand of five and a face-down pile. */
.app .devOnly { display: none !important; }
.handArea { max-width: 1400px; margin: 0 auto; padding: 8px 20px 40px; }
.handRow { display: flex; gap: 32px; align-items: flex-end; justify-content: center; flex-wrap: wrap; }
.handRow .hand { flex-wrap: nowrap; }
@media (max-width: 1100px) { .handRow .hand { flex-wrap: wrap; } }
.hand { display: flex; gap: 18px; align-items: flex-end; justify-content: center; flex-wrap: wrap; }
.hand .cardback { --w: 132px; }
.hand .cardback.lv1 { --w: 150px; } .hand .cardback.lv2 { --w: 168px; }
.cardback.dealt { animation: deal .3s cubic-bezier(.2,.8,.3,1) both; }
/* A short slide in, so the last card of the hand never starts beyond the edge of a phone screen (tester Maya, 2026-11-27). */
@keyframes deal { from { opacity: 0; transform: translate(36px, -24px) rotate(8deg) scale(.9); } to { opacity: 1; transform: rotate(var(--rot, 0deg)); } }
.cardback.newsize { box-shadow: 0 0 0 3px var(--gold), 0 0 28px 6px rgba(215,180,106,.55); }
.pile { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.pileStack { position: relative; width: 96px; height: 136px; }
.pileStack span { position: absolute; inset: 0; border-radius: 9px; border: 6px solid #16243f; outline: 1.5px solid var(--gold); outline-offset: -7px; background: radial-gradient(circle at 50% 50%, rgba(201,165,78,.18) 0 22%, transparent 23%) 0 0 / 22px 22px, linear-gradient(160deg, #1f2f5a, #142040); box-shadow: 0 6px 14px -6px rgba(0,0,0,.6); }
.pileStack span:nth-child(3) { display: grid; place-items: center; color: var(--gold); font-size: 2rem; }
.pileStack span:nth-child(2) { transform: translate(4px, -4px); } .pileStack span:nth-child(3) { transform: translate(8px, -8px); }
.pileCount { color: #ece6da; font-size: .85rem; }
.unlock { max-width: 640px; margin: 0 auto 18px; padding: 10px 16px; border-radius: 8px; background: var(--surface); border: 2px solid var(--gold); text-align: center; }
@media (prefers-reduced-motion: reduce) { .cardback.dealt { animation: none; } }
@media (max-width: 640px) { .hand .cardback { --w: 104px; } .hand .cardback.lv1 { --w: 116px; } .handRow { gap: 20px; } }

/* One fantasy back for the test app (2026-11-26): night blue, gold star. */
.cardback.fantasy { background: #16243f; }
.cardback.fantasy .art { background: radial-gradient(circle at 50% 50%, rgba(201,165,78,.18) 0 22%, transparent 23%) 0 0 / 22px 22px, linear-gradient(160deg, #1f2f5a, #142040); }

/* Written cards (2026-11-26): a face-up pile on the table, and a list of finished cards. */
.doneStack { position: relative; width: 96px; height: 136px; padding: 0; border: 0; background: none; cursor: pointer; }
.doneStack span { position: absolute; inset: 0; border-radius: 9px; border: 2px solid var(--frame); background: var(--surface); box-shadow: 0 6px 14px -6px rgba(0,0,0,.6); }
.doneStack span:nth-child(1) { transform: rotate(-4deg); } .doneStack span:nth-child(2) { transform: rotate(3deg); }
.doneStack .top { display: grid; place-items: center; font-size: 1.6rem; color: var(--accent); }
.doneStack:hover .top, .doneStack:focus-visible .top { border-color: var(--gold); }
.writtenList { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; padding: 0 16px 40px; align-items: start; }
.writtenCard { background: var(--surface); border: 2px solid var(--frame); outline: 1px solid var(--frame); outline-offset: 3px; border-radius: 4px; box-shadow: 0 10px 18px -10px rgba(0,0,0,.6); }
.writtenCard.open { grid-column: 1 / -1; }
.wcHead { width: 100%; min-height: 200px; display: flex; flex-direction: column; gap: 8px; text-align: left; background: none; border: 0; padding: 14px; cursor: pointer; }
.writtenCard.open .wcHead { min-height: 0; }
.wcTop { display: flex; gap: 8px; align-items: baseline; justify-content: space-between; }
.wcId { font: 600 1.05rem var(--serif); white-space: nowrap; }
.wcWho { font-size: .82rem; color: var(--muted); }
.wcFirst { font: italic .95rem/1.5 var(--serif); color: var(--fg); }
.wcBody { padding: 0 16px 16px; border-top: 1px solid var(--line); }
.wcBody h3 { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 14px 0 4px; }
.wcCard { font-size: .9rem; color: var(--muted); padding-top: 10px; }
.wcCard p { margin: 2px 0; }
.wcText { font: 1.05rem/1.6 var(--serif); margin: 0; white-space: pre-wrap; }
.wcFb { font-size: .92rem; }

/* The written rack (2026-11-26): finished cards with a light back, racking up below the hand. */
.rack { margin-top: 36px; text-align: center; }
.rackLabel { color: #ece6da; font-size: .85rem; margin-bottom: 10px; }
.rackRow { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.rackRow .cardback.light { --w: 46px; }
.rackRow .cardback.light.lv1 { --w: 52px; } .rackRow .cardback.light.lv2 { --w: 58px; }
.cardback.light { background: #efe6d2; box-shadow: 0 4px 10px -6px rgba(0,0,0,.6); }
.cardback.light .art { inset: 3px; border-width: 1px; background: radial-gradient(circle at 50% 50%, rgba(201,165,78,.25) 0 22%, transparent 23%) 0 0 / 12px 12px, #f7f1e3; }
.cardback.light .suit { font-size: calc(var(--w) * .36); color: #b48a35; background: none; width: auto; height: auto; text-shadow: none; }
.cardback.light .pips { bottom: 4px; gap: 2px; } .cardback.light .pips i { width: 3px; height: 3px; background: #b48a35; }
.cardback.light:hover, .cardback.light:focus-visible { transform: translateY(-4px); }

/* Phones (2026-11-26, checked at 390 px): compact header, smaller hand, jobs beside the writing box. */
.deskJobs { display: none; }
@media (max-width: 640px) {
  .bar { position: static; padding: 8px 12px; gap: 6px 12px; }
  .brand { font-size: 1rem; }
  .who { flex-wrap: wrap; gap: 4px 12px; font-size: .8rem; width: 100%; }
  .views { margin-left: 0; width: 100%; }
  .views button { padding: 4px 10px; }
  .handArea { padding: 4px 8px 32px; }
  .handRow { gap: 14px; }
  .hand { gap: 10px; }
  .hand .cardback, .handRow .hand .cardback { --w: 96px; }
  .hand .cardback.lv1 { --w: 104px; } .hand .cardback.lv2 { --w: 112px; }
  .pileStack { width: 72px; height: 102px; }
  .rack { margin-top: 20px; }
  .frame .sec { padding: 10px 14px; }
  .cardHead { padding: 12px 14px 10px; }
  .frame .youWrite { display: none; }   /* shown once, above the box (robo-tester Sam saw the jobs twice) */
  .deskJobs { display: block; font-size: .85rem; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; margin-bottom: 8px; }
  .deskJobs ol { margin: 4px 0 0; padding-left: 1.4em; }
  textarea { min-height: 160px; font-size: 1rem; }
}

/* Header tidy (2026-11-26): the account name opens a small menu instead of three links in a row. */
.acctMenu { position: relative; font-size: .85rem; }
.acctBtn { cursor: pointer; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; font-weight: 600; color: var(--barfg); background: transparent; font-size: .85rem; }
.acctBtn::after { content: " ▾"; color: var(--muted); font-weight: 400; }
.acctLinks[hidden] { display: none; }
.acctLinks { position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; display: grid; min-width: 170px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 24px -8px rgba(0,0,0,.4); padding: 4px; }
.acctLinks a { padding: 8px 10px; border-radius: 6px; color: var(--fg); text-decoration: none; }
.acctLinks a:hover, .acctLinks a:focus-visible { background: var(--accent-soft); }
@media (max-width: 640px) {
  .bar { display: grid; grid-template-columns: 1fr auto; align-items: center; }
  .bar .brand { grid-column: 1; }
  .bar .acctMenu { grid-column: 2; grid-row: 1; justify-self: end; }
  .acctLinks { left: auto; right: 0; }
  .bar .views { grid-column: 1 / -1; }
  .proto { display: none; }
  /* The clock stays in view while typing. */
  .timerRow { position: sticky; top: 0; z-index: 4; background: var(--surface); padding: 6px 0; }
}

/* Hover notes on character names (2026-11-26), as in the Prototype's glossary */
.gloss { text-decoration: underline dotted currentColor; text-decoration-thickness: 1px; text-underline-offset: 3px; cursor: help; }
.gloss:hover, .gloss:focus { text-decoration-style: solid; outline: none; }
.glossTip { position: absolute; z-index: 50; background: #fffdf7; color: #2a2620; border: 1px solid #d8cfbd; border-radius: 8px; padding: 10px 12px; box-shadow: 0 6px 24px rgba(0,0,0,.18); font-size: .88rem; line-height: 1.4; pointer-events: none; }
.glossTip p { margin: 4px 0 0; }
.glossTip .pr { color: #7a7060; font-size: .8rem; margin-left: 4px; }
/* On touch screens there is no hover, so names with a note are coloured to show they can be tapped (Alex, 2026-11-26) */
@media (hover: none) { .gloss { color: var(--accent); text-decoration-color: var(--accent); cursor: pointer; -webkit-tap-highlight-color: transparent; } }
/* Naming a stranger after the card (2026-11-26) */
.nameBox, .nameDone { margin: 12px 0 0; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 8px; font-size: .92rem; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.nameDone { border-style: solid; }
.nameBox label { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.nameInput { padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: inherit; min-width: 12em; }
.nameErr { color: var(--accent); font-size: .85rem; width: 100%; }
.nameBox .rollIcon { font-size: 1.05rem; line-height: 1; padding: 3px 8px; }
.nameBox .linkBtn { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; font-size: .85rem; }

/* Deck backs for the other decks (2026-11-26), shared by setup and the hand. */
.cardback.horror { background: #2a0d10; }
.cardback.horror .art { background: radial-gradient(circle at 50% 50%, rgba(201,165,78,.14) 0 20%, transparent 21%) 0 0 / 20px 20px, linear-gradient(160deg, #4a1218, #1c0809); }
.cardback.romance { background: #5a1f33; }
.cardback.romance .art { background: radial-gradient(circle at 50% 50%, rgba(255,214,224,.18) 0 22%, transparent 23%) 0 0 / 18px 18px, linear-gradient(160deg, #8a3150, #4a1529); }
.cardback.scifi { background: #0f2d33; }
.cardback.scifi .art { background: repeating-linear-gradient(0deg, rgba(120,220,230,.10) 0 1px, transparent 1px 10px), repeating-linear-gradient(90deg, rgba(120,220,230,.10) 0 1px, transparent 1px 10px), linear-gradient(160deg, #19505a, #0b2228); }
/* The pile takes the world's deck back too (2026-11-26). */
.pileStack.scifi span { border-color: #0f2d33; background: repeating-linear-gradient(0deg, rgba(120,220,230,.10) 0 1px, transparent 1px 10px), repeating-linear-gradient(90deg, rgba(120,220,230,.10) 0 1px, transparent 1px 10px), linear-gradient(160deg, #19505a, #0b2228); }
.pileStack.horror span { border-color: #2a0d10; background: linear-gradient(160deg, #4a1218, #1c0809); }
.pileStack.romance span { border-color: #5a1f33; background: linear-gradient(160deg, #8a3150, #4a1529); }
.pileStack.pulp span { border-color: var(--pulp2); background: repeating-linear-gradient(45deg, var(--pulp) 0 6px, var(--pulp2) 6px 12px); }

/* The once-per-account note on where writing goes (2026-11-26). */
/* In the page above the table, not floating (testers, 2026-11-27). */
.dataNote { position: relative; margin: 12px auto; width: min(560px, calc(100vw - 32px)); z-index: 5; touch-action: manipulation;
  background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px;
  box-shadow: 0 6px 24px rgba(0,0,0,.25); display: flex; gap: 14px; align-items: flex-end; font-size: .9rem; line-height: 1.45; }
.dataNote p { margin: 0; }
@media (max-width: 520px) { .dataNote { flex-direction: column; align-items: stretch; } }

/* Design gaps (2026-11-26): rewrite offer, practice hint, why to name someone. */
.rewriteOffer, .practiceHint { margin: 12px 0 0; }
.nameWhy { display: block; margin-top: 4px; }

/* ---- Looks (Alex, 2026-11-27: "both the table and cards as looks … an in-app switch if the back-end is unaffected").
   Front end only: <html data-look="felt|night">, chosen in the account menu and remembered in this browser.
   Felt is the default. Gallery: The Deck UI options, A2 and C2. */

/* Felt (A2): no white header block; the bar is dark felt that fades into the table. */
:root[data-look="felt"] .bar, :root:not([data-look]) .bar {
  background: linear-gradient(180deg, #1c2722, rgba(28,39,34,.92)); color: #f1ece2; border-bottom: 0; }
:root[data-look="felt"] .bar::after, :root:not([data-look]) .bar::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 22px; pointer-events: none;
  background: linear-gradient(rgba(28,39,34,.92), rgba(28,39,34,0)); }
:root[data-look="felt"] .bar .acctBtn, :root:not([data-look]) .bar .acctBtn { color: #f1ece2; border-color: rgba(241,236,226,.35); background: rgba(241,236,226,.08); }
:root[data-look="felt"] .bar .acctBtn::after, :root:not([data-look]) .bar .acctBtn::after { color: #c3ccc5; }
:root[data-look="felt"] .bar .tiny, :root:not([data-look]) .bar .tiny { color: #c3ccc5; }

/* Night deck (C2): a deep night sky with stars, brighter card backs, cream card faces. */
:root[data-look="night"] {
  --bg: #05070f; --felt: #18204a; --felt2: #0b0f24; --surface: #fbf3df; --fg: #14110b; --muted: #5a4f3a; --line: #d8cdb2;
  --accent: #8a5a12; --accent-soft: #f3e7c6; --gold: #f0cf72; --bar: #0b0f24; --barfg: #f2ecdc; color-scheme: light; }
:root[data-look="night"] body {
  background:
    radial-gradient(1.5px 1.5px at 24px 40px, rgba(255,255,255,.75), transparent) 0 0 / 260px 230px,
    radial-gradient(1px 1px at 130px 90px, rgba(255,255,255,.55), transparent) 0 0 / 260px 230px,
    radial-gradient(2px 2px at 210px 170px, rgba(255,255,255,.7), transparent) 0 0 / 260px 230px,
    radial-gradient(1px 1px at 70px 200px, rgba(255,255,255,.45), transparent) 0 0 / 260px 230px,
    radial-gradient(ellipse at 50% 35%, #18204a 0%, #0b0f24 55%, #05070f 100%) fixed;
  background-attachment: fixed; }
:root[data-look="night"] .bar { background: linear-gradient(180deg, #070a17, rgba(7,10,23,.9)); color: #f2ecdc; border-bottom: 0; }
:root[data-look="night"] .bar::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 22px; pointer-events: none; background: linear-gradient(rgba(7,10,23,.9), rgba(7,10,23,0)); }
:root[data-look="night"] .brand { color: #f0cf72; }
:root[data-look="night"] .bar .acctBtn { color: #f2ecdc; border-color: #6b74b0; background: #1a2250; }
:root[data-look="night"] .bar .acctBtn::after, :root[data-look="night"] .bar .tiny { color: #cfd3ea; }
:root[data-look="night"] .hint, :root[data-look="night"] .pileCount, :root[data-look="night"] .rackLabel { color: #e3e6f5; opacity: 1; }
:root[data-look="night"] .cardback { box-shadow: 0 0 0 1px rgba(240,207,114,.5), 0 10px 24px -6px rgba(0,0,0,.8); }
:root[data-look="night"] .cardback.fantasy { background: #22357a; }
:root[data-look="night"] .cardback.fantasy .art { border-color: #f0cf72; background: radial-gradient(circle at 50% 50%, rgba(240,207,114,.22) 0 22%, transparent 23%) 0 0 / 22px 22px, linear-gradient(160deg, #3550a8, #22357a); }
:root[data-look="night"] .cardback.scifi { background: #15515c; }
:root[data-look="night"] .cardback.scifi .art { border-color: #f0cf72; background: repeating-linear-gradient(0deg, rgba(160,235,245,.16) 0 1px, transparent 1px 10px), repeating-linear-gradient(90deg, rgba(160,235,245,.16) 0 1px, transparent 1px 10px), linear-gradient(160deg, #237a88, #15515c); }
:root[data-look="night"] .pileStack span { border-color: #22357a; outline-color: #f0cf72; background: radial-gradient(circle at 50% 50%, rgba(240,207,114,.22) 0 22%, transparent 23%) 0 0 / 22px 22px, linear-gradient(160deg, #3550a8, #22357a); }
:root[data-look="night"] .pileStack.scifi span { border-color: #15515c; background: linear-gradient(160deg, #237a88, #15515c); }
:root[data-look="night"] .frame { box-shadow: 0 0 40px rgba(240,207,114,.18), 0 20px 40px rgba(0,0,0,.6); }
.lookPick { display: flex; gap: 6px; padding: 8px 10px 6px; border-top: 1px solid var(--line); margin-top: 4px; font-size: .8rem; color: var(--muted); align-items: center; flex-wrap: wrap; }
.lookPick button { padding: 3px 10px; border-radius: 999px; font-size: .8rem; }
.lookPick button.on { background: var(--accent); color: #fff; border-color: var(--accent); }
/* Tabs and the table's level line, readable on both looks (2026-11-27). */
:root .bar .views button { background: transparent; color: #f1ece2; border-color: rgba(241,236,226,.35); }
:root .bar .views button.on { background: #f1ece2; color: #22201c; border-color: #f1ece2; }
:root[data-look="night"] .bar .views button { color: #f2ecdc; border-color: #6b74b0; }
:root[data-look="night"] .bar .views button.on { background: #f0cf72; color: #0b0f24; border-color: #f0cf72; }
#tableHint .tiny { color: #c3ccc5; }
:root[data-look="night"] #tableHint .tiny { color: #cfd3ea; }

/* The callback note sits above the card, so nothing above the writing box changes once the desk is up (tester Ines,
   2026-11-27: Finished moved when the note appeared). */
#play #callbackNote { margin: 0 0 10px; }
/* The opening sentence as a plain item 1 (Alex 2026-11-28: "visually messy"): same weight as the other items, italic only. */
.tasks li.given .givenText, .deskJobs li.given .givenText { font-style: italic; }

/* Report a problem (A6) */
.reportDlg { max-width: min(480px, calc(100vw - 32px)); width: 100%; background: var(--surface); color: var(--fg, inherit); border: 2px solid var(--frame); border-radius: 6px; padding: 18px; }
.reportDlg::backdrop { background: rgba(0,0,0,.5); }
.reportDlg h2 { margin: 0 0 6px; font-size: 1.1rem; }
.reportDlg textarea { width: 100%; box-sizing: border-box; font: inherit; padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: inherit; }
.reportDlg .row { display: flex; gap: 8px; justify-content: flex-end; }

/* UX review 2026-11-28 (three fresh reviewers; Alex: bugs only, fix as described). */
/* 5: no blank card frame pushing the writing box below the fold on phones. */
@media (max-width: 640px) { .frame { min-height: 0; } }
/* 6: card ids such as F0.8 in lining figures (the serif's old-style 0 read as "o"); deck-back labels fit at 390 px. */
.cardHead h1 .cid { font-family: var(--sans); font-variant-numeric: lining-nums; letter-spacing: .01em; }   /* the serif has only old-style figures: F0.8 read as Fo.8 */
@media (max-width: 640px) { .cardback .genre { letter-spacing: .03em; font-size: .56rem; padding: 0 4px; } }
/* 8: the account button's arrow as a drawn caret (the "▾" glyph showed as a stray dot in some fonts). */
.acctBtn::after { content: ""; display: inline-block; margin-left: 7px; vertical-align: middle; border: 4px solid transparent; border-top-color: currentColor; border-bottom: 0; opacity: .7; }
/* 10: readable TEST VERSION tag, shown on phones too; touch targets at least 44 px on phones. */
.bar .proto { color: #f3c9bd; white-space: nowrap; }
:root[data-look="night"] .bar .proto { color: #f0cf72; }
@media (max-width: 640px) {
  .proto { display: inline; }
  .views button, .acctBtn, .lookPick button { min-height: 44px; }
  .acctLinks a { min-height: 44px; display: flex; align-items: center; }
}
/* 1: the plain line under Finished when there is nothing of the writer's own yet. */
.submitNote { margin: 6px 0 0; color: var(--accent); font-size: .85rem; }
.submitNote:empty { display: none; }
