/* Quite Overcome - a Regency drawing room: cream laid paper, mahogany and brass by day; candle-lit plum panelling at night. */
:root { --bg: #f5efe2; --card: #fffaf0; --ink: #2b2320; --soft: #685c51; --line: #e0d3bb; --accent: #6b2f1f; --accent-ink: #fffaf0; --brass: #8a6a24; --brass-bg: #f1e5c6;
  --sense: #2f5a7a; --sense-bg: #e1ebf3; --feel: #8f2a40; --feel-bg: #f6e0e5; --even: #55662a; --even-bg: #e8edd8;
  --c-composed: #2f5a7a; --c-moved: #55662a; --c-transported: #8f5220; --c-overcome: #8f2a40;
  --warn-bg: #f4ead0; --red: #9b2335; --shadow: 0 1px 0 rgba(43, 35, 32, .05), 0 10px 26px rgba(107, 47, 31, .08); color-scheme: light; }
:root[data-theme="dark"] { --bg: #18151c; --card: #221e27; --ink: #efe7da; --soft: #bdb3a5; --line: #3a3340; --accent: #e7a565; --accent-ink: #18151c; --brass: #e2c27a; --brass-bg: #3a3020;
  --sense: #9cc4e4; --sense-bg: #1d2c3a; --feel: #f39ab0; --feel-bg: #3d1e28; --even: #c3d48a; --even-bg: #2a3119;
  --c-composed: #9cc4e4; --c-moved: #c3d48a; --c-transported: #eeb07a; --c-overcome: #f39ab0;
  --warn-bg: #3a3017; --red: #ff97a8; --shadow: 0 1px 0 rgba(0, 0, 0, .5); color-scheme: dark; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { color-scheme: dark; } }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif; }
h1, h2, h3, h4, .brand strong, .headline, .closing { font-family: Georgia, "Iowan Old Style", "Times New Roman", serif; }
a { color: var(--accent); }
.hidden { display: none !important; }
.small { font-size: .9rem; } .muted { color: var(--soft); } .mono { font-family: ui-monospace, Menlo, monospace; }
.bar { display: flex; align-items: center; gap: 10px; padding: 9px 16px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.back { text-decoration: none; color: var(--soft); white-space: nowrap; }
.brand { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; font-size: 1.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo { width: 26px; height: 26px; flex: none; }
.lg-neck, .lg-case { fill: #6b2f1f; stroke: #3f1a10; stroke-width: 1; } .lg-face { fill: #f6efdc; stroke: #c9a24a; stroke-width: 1.2; } .lg-hand { stroke: #2b2320; stroke-width: 1.6; stroke-linecap: round; }
.session { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.pill { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 6px; padding: 6px 14px; font: inherit; font-size: .86rem; cursor: pointer; text-decoration: none; display: inline-block; }
.pill:hover:not(:disabled) { border-color: var(--brass); }
.pill.solid { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.pill.solid:hover:not(:disabled) { border-color: var(--brass); box-shadow: 0 0 0 2px var(--brass-bg); }
.pill.ghost { cursor: default; } .pill.tiny { padding: 3px 11px; font-size: .8rem; } .pill.big { padding: 10px 22px; font-size: 1rem; }
.pill:disabled { opacity: .5; cursor: not-allowed; }
main { max-width: 1040px; margin: 0 auto; padding: 8px 16px 40px; }
.hero { padding: 26px 0 6px; text-align: center; }
.kicker { margin: 0 0 6px; color: var(--brass); font-weight: 600; font-size: .9rem; letter-spacing: .14em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(2.1rem, 7vw, 3.1rem); line-height: 1.08; font-weight: 700; font-style: italic; }
.h1b { display: block; font-size: 1.12rem; font-weight: 400; font-style: normal; color: var(--soft); margin-top: 8px; }
.lede { max-width: 620px; margin: 10px auto; }
.samples { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; }
.chip { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 6px; padding: 5px 12px; font: inherit; font-size: .85rem; cursor: pointer; }
.chip:hover { border-color: var(--brass); }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin: 14px 0; box-shadow: var(--shadow); }
.ph { margin: 0 0 10px; font-size: 1.22rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.step-no { width: 28px; height: 28px; border-radius: 50%; background: var(--brass-bg); color: var(--brass); border: 1px solid var(--brass); display: inline-flex; align-items: center; justify-content: center; font-size: .9rem; font-weight: 700; flex: none; font-family: Georgia, serif; }
.free { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--soft); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; font-family: system-ui, sans-serif; font-weight: 600; }
.inp, .sel { font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; min-width: 0; }
.inp:focus, .sel:focus { outline: 2px solid var(--brass); outline-offset: 1px; }
.cardrow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.note { background: var(--warn-bg); border-radius: 6px; padding: 8px 10px; }
.moments { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.drow { border: 1px solid var(--line); border-left: 5px solid var(--line); border-radius: 8px; padding: 10px; background: var(--bg); display: grid; gap: 8px; }
.drow.is-sense { border-left-color: var(--sense); } .drow.is-sensibility { border-left-color: var(--feel); } .drow.is-even { border-left-color: var(--even); }
.drow.is-empty .dgrid { opacity: .55; }
.dtop { display: flex; gap: 8px; align-items: center; } .dtop .d-text { flex: 1; }
.lnum { font-weight: 700; font-size: 1.05rem; text-align: center; color: var(--brass); width: 22px; flex: none; font-family: Georgia, serif; font-style: italic; }
.dgrid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); gap: 8px; }
.nf { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .nf-l { font-size: .78rem; line-height: 1.2; }
.ruleline { font-weight: 700; }
.sheetwrap { line-height: 0; margin: 12px 0 0; overflow: hidden; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); }
.sheetwrap svg { width: 100%; height: auto; display: block; }
.runrow { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.gate { background: var(--warn-bg); border-radius: 6px; padding: 8px 10px; }
.steps { list-style: none; padding: 0; margin: 0; }
.step { padding: 2px 0; color: var(--soft); } .step.done { color: var(--ink); } .step.active { color: var(--brass); font-weight: 700; }
.step-ic { display: inline-block; width: 16px; font-family: ui-monospace, Menlo, monospace; }
.raw { white-space: pre-wrap; word-break: break-word; background: var(--bg); padding: 10px; border-radius: 6px; max-height: 320px; overflow: auto; }
.result { border-top: 5px solid var(--accent); }
.result.empty { border-top-color: var(--line); }
.res-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.res-kick { margin: 0; color: var(--soft); }
.badge { border-radius: 4px; padding: 4px 12px; font-weight: 700; font-size: .78rem; letter-spacing: .1em; background: var(--bg); color: var(--soft); border: 1.5px solid var(--line); display: inline-block; max-width: 100%; font-family: Georgia, serif; }
.badge.v-composed { color: var(--c-composed); border-color: var(--c-composed); background: var(--sense-bg); } .badge.v-moved { color: var(--c-moved); border-color: var(--c-moved); background: var(--even-bg); }
.badge.v-transported { color: var(--c-transported); border-color: var(--c-transported); background: var(--brass-bg); } .badge.v-overcome { color: var(--c-overcome); border-color: var(--c-overcome); background: var(--feel-bg); }
.headline { font-size: 1.3rem; font-weight: 700; margin: 10px 0; font-style: italic; }
.readcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 10px; margin-top: 8px; }
.rcard { border: 1px solid var(--line); border-top: 4px double var(--soft); border-radius: 4px; padding: 10px 12px; background: var(--bg); }
.rcard.s-sense { border-top-color: var(--sense); } .rcard.s-sensibility { border-top-color: var(--feel); } .rcard.s-even { border-top-color: var(--even); }
.rc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.rc-name { margin: 0; font-size: 1.05rem; overflow-wrap: anywhere; }
.rc-facts { margin: 2px 0 6px; }
.tag { font-size: .76rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap; background: var(--line); color: var(--ink); }
.tag.s-sense { background: var(--sense-bg); color: var(--sense); } .tag.s-sensibility { background: var(--feel-bg); color: var(--feel); } .tag.s-even { background: var(--even-bg); color: var(--even); }
.rc-voice { margin: 6px 0 0; } .rc-voice b { font-family: Georgia, serif; } .v-sense b { color: var(--sense); } .v-feel b { color: var(--feel); } .v-feel { font-style: italic; }
.mendbox { border-radius: 6px; padding: 10px 12px; margin-top: 10px; background: var(--brass-bg); border-left: 4px solid var(--brass); } .mendbox p { margin: 4px 0 0; }
.closing { font-style: italic; font-size: 1.05rem; }
.recon { margin: 0; padding-left: 20px; } .recon li.warn { color: var(--soft); } .recon li.bad { color: var(--red); font-weight: 700; }
.result h4 { margin: 14px 0 6px; }
.none { color: var(--soft); list-style: none; }
.exports { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.saved { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 6px; }
.hrow { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 6px; background: var(--bg); }
.hdot { width: 12px; height: 12px; border-radius: 50%; background: var(--line); flex: none; }
.hdot.v-composed { background: var(--c-composed); } .hdot.v-moved { background: var(--c-moved); } .hdot.v-transported { background: var(--c-transported); } .hdot.v-overcome { background: var(--c-overcome); }
.hinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; } .hinfo b { overflow-wrap: anywhere; }
.hbtns { display: flex; gap: 6px; flex: none; }
.foot { max-width: 1040px; margin: 0 auto; padding: 10px 16px 40px; color: var(--soft); font-size: .88rem; }
.toasts { position: fixed; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; z-index: 20; width: min(92vw, 460px); }
.toast { background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--accent); border-radius: 6px; padding: 8px 12px; box-shadow: var(--shadow); transition: opacity .5s; }
.toast.err { border-left-color: var(--red); } .toast.gone { opacity: 0; }
@media (max-width: 640px) {
  .back-t { display: none; }
  .brand { font-size: 1rem; }
  .dgrid { grid-template-columns: 1fr; gap: 6px; }
  .hrow { flex-wrap: wrap; }
  .readcards { grid-template-columns: 1fr; }
}
@media print {
  .bar, .samples, .deckpanel, .askbox, .histbox, .exports, .toasts, .cardrow { display: none !important; }
  body { background: #fff; color: #000; } .panel { box-shadow: none; }
}
