/* Fonts are bundled (SIL Open Font License), so the game needs no outside services. */
@font-face { font-family: 'Cinzel'; font-weight: 400; font-display: swap; src: url(/fonts/cinzel-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Cinzel'; font-weight: 600; font-display: swap; src: url(/fonts/cinzel-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Cinzel'; font-weight: 700; font-display: swap; src: url(/fonts/cinzel-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'EB Garamond'; font-weight: 400; font-display: swap; src: url(/fonts/eb-garamond-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'EB Garamond'; font-weight: 400; font-style: italic; font-display: swap; src: url(/fonts/eb-garamond-latin-400-italic.woff2) format('woff2'); }
@font-face { font-family: 'EB Garamond'; font-weight: 500; font-display: swap; src: url(/fonts/eb-garamond-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'EB Garamond'; font-weight: 600; font-display: swap; src: url(/fonts/eb-garamond-latin-600-normal.woff2) format('woff2'); }

:root {
  --vellum: #e6d7b0;
  --vellum-deep: #d6c294;
  --night: #1b2029;
  --night-2: #262d3a;
  --ink: #33261a;
  --ink-soft: #5b4630;
  --gold: #b08a36;
  --gold-bright: #d8b45a;
  --green: #2f4a35;
  --ember: #8e2b1f;
  --silver: #c9cfd8;
  --display: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --body: 'EB Garamond', Garamond, Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--body); font-size: 18px; line-height: 1.5; color: var(--ink); }
button, input, select { font: inherit; }
:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- shared controls ---------- */
.btn {
  font-family: var(--display); font-size: 15px; letter-spacing: .04em;
  padding: .45em 1em; border-radius: 3px; cursor: pointer;
  background: var(--green); color: #f1e6c8; border: 1px solid #1d3123;
}
.btn:hover:not(:disabled) { background: #3a5b41; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.quiet { background: transparent; color: var(--ink); border-color: var(--ink-soft); }
.btn.quiet:hover:not(:disabled) { background: rgba(51, 38, 26, .08); }
.btn.danger { background: var(--ember); border-color: #5e1a12; }
.btn.small { font-size: 13px; padding: .25em .6em; }
.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-size: 15px; color: var(--ink-soft); margin-bottom: 4px; }
.field input, .field select {
  width: 100%; padding: 8px 10px; border-radius: 3px;
  border: 1px solid #a8916a; background: #f3ead2; color: var(--ink);
}
.error { color: var(--ember); min-height: 1.5em; }

/* ---------- login: the door ---------- */
body.door-page {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(ellipse at 50% 120%, #2c3444 0%, transparent 60%),
    radial-gradient(1px 1px at 12% 18%, #fff8 50%, transparent 51%),
    radial-gradient(1px 1px at 82% 12%, #fff6 50%, transparent 51%),
    radial-gradient(1px 1px at 64% 30%, #fff5 50%, transparent 51%),
    radial-gradient(1px 1px at 30% 8%, #fff7 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 90% 40%, #fff6 50%, transparent 51%),
    var(--night);
  color: var(--silver);
}
/* Arch, title and form share one grid cell, so a form taller than the arch pushes the footer
   down instead of covering it. Vertical margins in % are fractions of the door's width. */
.door { width: min(440px, 100%); display: grid; }
.door svg.arch, .door h1, .door form { grid-area: 1 / 1; align-self: start; }
.door-foot { grid-area: 2 / 1; }
.door svg.arch { display: block; width: 100%; height: auto; }
.door .arch path, .door .arch line, .door .arch circle { stroke: var(--silver); fill: none; }
.door .arch .glow { stroke: #e9eef7; filter: drop-shadow(0 0 4px #b9d4ff); animation: kindle 2.4s ease-out 1 both; }
@keyframes kindle { from { opacity: 0; } to { opacity: 1; } }
.door form {
  margin: 64% 18% 0;
  display: flex; flex-direction: column; gap: 10px;
}
.door h1 {
  margin: 36.4% 0 0; text-align: center;
  font-family: var(--display); font-weight: 400; font-size: clamp(17px, 4.4vw, 21px); letter-spacing: .12em; color: #e9eef7;
}
.door .prompt { font-style: italic; text-align: center; margin: 0 0 4px; color: #aeb7c4; font-size: 17px; }
.door input {
  background: rgba(10, 13, 19, .6); border: 1px solid #59627a; color: #eef1f6;
  padding: 9px 12px; border-radius: 2px; width: 100%;
}
.door input::placeholder { color: #7c869a; }
.door .btn { background: transparent; border-color: var(--silver); color: #eef1f6; }
.door .btn:hover { background: rgba(201, 207, 216, .12); }
.door .error { color: #f0a08f; font-size: 16px; text-align: center; }
.door .error.ok { color: #b5d3bf; }
.door form[hidden] { display: none; }
/* the change-password form is taller: start it higher, just under the title */
.door.changing form { margin-top: 50%; gap: 8px; }
.door.changing .prompt { margin: 0; }
@media (max-width: 480px) {
  .door.changing form { gap: 6px; }
  .door.changing input { padding: 6px 12px; }
}
.door-foot { margin-top: 18px; text-align: center; color: #7c869a; font-size: 15px; }
.door-foot .linkish {
  background: none; border: 0; padding: 0; margin-top: 4px; cursor: pointer;
  color: #aeb7c4; text-decoration: underline; text-underline-offset: 3px;
}
.door-foot .linkish:hover { color: #eef1f6; }

/* ---------- lobby ---------- */
body.ledger {
  min-height: 100vh;
  background: var(--vellum) radial-gradient(ellipse at 50% 0%, #efe3c3 0%, var(--vellum) 50%, var(--vellum-deep) 100%);
}
.ledger header {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 22px clamp(16px, 4vw, 48px); border-bottom: 2px solid var(--ink);
}
.ledger header h1 { font-family: var(--display); font-weight: 600; font-size: 28px; margin: 0; letter-spacing: .03em; }
.ledger header .who { color: var(--ink-soft); }
.ledger main { max-width: 1040px; margin: 0 auto; padding: 28px clamp(16px, 4vw, 48px) 60px; display: grid; gap: 40px; grid-template-columns: 1fr 320px; }
@media (max-width: 860px) { .ledger main { grid-template-columns: 1fr; } }
.ledger h2 { font-family: var(--display); font-weight: 600; font-size: 20px; margin: 0 0 12px; }
.quest { padding: 14px 0; border-bottom: 1px solid #b8a27a; display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; align-items: center; }
.quest h3 { font-family: var(--display); font-weight: 400; font-size: 19px; margin: 0; }
.quest .meta { color: var(--ink-soft); font-size: 16px; }
.quest .seats { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.seat { border: 1px dashed #9c8762; padding: 1px 10px; border-radius: 12px; font-size: 15px; }
.seat.filled { border-style: solid; background: #efe3c3; }
.quest .actions { display: flex; gap: 8px; }
.empty { color: var(--ink-soft); font-style: italic; }
aside.panel { border-left: 1px solid #b8a27a; padding-left: 24px; }
@media (max-width: 860px) { aside.panel { border-left: 0; padding-left: 0; } }
aside.panel section + section { margin-top: 32px; }
.userlist { list-style: none; padding: 0; margin: 0 0 12px; }
.userlist li { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; border-bottom: 1px dotted #b8a27a; }
.note { font-size: 15px; color: var(--ink-soft); }
.check { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; }

/* ---------- game ---------- */
body.table { background: var(--vellum-deep); height: 100vh; overflow: hidden; }
.game { display: grid; grid-template-columns: 1fr 380px; grid-template-rows: auto 1fr; height: 100vh; }
@media (max-width: 1000px) { body.table { overflow: auto; height: auto; } .game { grid-template-columns: 1fr; height: auto; } }
.topbar {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  padding: 8px 16px; background: var(--ink); color: #eadfc2; font-size: 16px;
}
.topbar h1 { font-family: var(--display); font-size: 18px; font-weight: 600; margin: 0; letter-spacing: .04em; }
.topbar a { color: var(--gold-bright); }
.track { display: flex; align-items: center; gap: 4px; }
.track b { font-family: var(--display); font-weight: 400; margin-right: 6px; }
.pip { width: 14px; height: 14px; border-radius: 50%; border: 1px solid #a99876; }
.pip.on { background: var(--gold-bright); border-color: var(--gold-bright); }
.pip.zero { border-color: var(--ember); }
.hope-low .pip.on { background: #e07b54; border-color: #e07b54; }
.topbar .turn { margin-left: auto; }
.topbar #decks { color: #c9bb98; font-size: 15px; }
.topbar .turn strong { color: var(--gold-bright); font-weight: 500; }

.boardwrap { position: relative; overflow: auto; background: #cdb98a; }
#board { display: block; width: 100%; min-width: 900px; height: auto; }
#board .region-label { font-family: var(--display); font-size: 88px; font-weight: 700; fill: #2a1c10; fill-opacity: .88; letter-spacing: 14px; text-anchor: middle; pointer-events: none;
  paint-order: stroke; stroke: #f3e7c4; stroke-opacity: .8; stroke-width: 16px; stroke-linejoin: round; }
/* region borders: white dots on a faint white glow, unlike the solid and dashed travel paths */
#board .region-border-case { fill: none; stroke: #fffaf0; stroke-width: 26; stroke-opacity: .28; stroke-linecap: round; stroke-linejoin: round; }
#board .region-border { fill: none; stroke: #ffffff; stroke-width: 13; stroke-dasharray: 0 24; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 0 3px rgba(20, 12, 4, .7)); }
#board .region-label.on-relief { font-size: 72px; stroke-opacity: .92; stroke-width: 18px; }
#board .loc-plaque { fill: #f1e6c6; stroke: #5b4329; stroke-width: 3.5; }
#board .loc-label { font-family: var(--display); font-size: 38px; font-weight: 700; fill: #2a1c10; text-anchor: middle; pointer-events: none; }
#board .loc { cursor: pointer; }
#board .loc.reach circle.base, #board .loc.reach polygon.base { stroke: #2b7a3b; stroke-width: 12; }
#board .loc.sel circle.base { stroke: var(--gold-bright); stroke-width: 12; }
#board .route-case { fill: none; stroke: #2b1d10; stroke-width: 16; stroke-linecap: round; stroke-linejoin: round; opacity: .5; }
#board .line-case { fill: none; stroke-width: 16; stroke-linecap: butt; stroke-linejoin: round; }
#board .line { fill: none; stroke-width: 10; stroke-dasharray: 30 12; stroke-linejoin: round; }
#board .path { stroke: #fbf6e8; stroke-width: 9; fill: none; stroke-linecap: round; stroke-linejoin: round; }
#board .special { stroke-dasharray: 26 14; }
#board .cost-tile { fill: #f7f0dc; stroke: #3b2a1a; stroke-width: 4; }
#board .cost { font-family: var(--body); font-size: 32px; fill: #2a1c10; text-anchor: middle; font-weight: 600; }
#board .count { font-family: var(--body); font-size: 34px; font-weight: 600; text-anchor: middle; fill: #fff; pointer-events: none; }
#board .char-tok text { font-family: var(--display); font-size: 38px; font-weight: 700; text-anchor: middle; fill: #1d140b; pointer-events: none; }

.side { display: flex; flex-direction: column; overflow: hidden; background: var(--vellum); border-left: 2px solid var(--ink); }
.side .scroll { overflow-y: auto; padding: 12px 16px; flex: 1; }
.side h2 { font-family: var(--display); font-size: 16px; font-weight: 600; margin: 16px 0 6px; letter-spacing: .04em; }
.side h2:first-child { margin-top: 0; }
.charpick { display: flex; gap: 8px; flex-wrap: wrap; }
.charbtn { display: flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 3px; border: 1px solid #9c8762; background: #f3ead2; cursor: pointer; }
.charbtn[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: #fff8e4; }
.dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; border: 1px solid #0006; }
.actions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.actions-grid .full { grid-column: 1 / -1; }
.row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.row select, .row input[type=number] { padding: 4px 6px; border: 1px solid #a8916a; background: #f3ead2; border-radius: 3px; }
.hint { font-size: 15px; color: var(--ink-soft); margin: 4px 0; }
.hand { display: flex; flex-wrap: wrap; gap: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* A card in a hand: a button around a rendered face. */
.card { width: 100px; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 6px; color: var(--ink); }
.card:not([disabled]):hover .cardface { transform: translateY(-2px); }
.card.sel .cardface { outline: 3px solid var(--gold-bright); outline-offset: 1px; }
.card[disabled] { cursor: default; }
.card-big { width: min(250px, 72%); margin: 0 auto 14px; }

/* ---------- rendered card faces (our own design) ----------
   Inside a face, sizes use cqw (1% of the card's width), so the same markup works
   from a 100 px hand card to a 250 px dialog card. */
.cardface {
  --cf-frame: #48413b; --cf-accent: #7c2a20; --cf-band: #2c2724;
  container-type: inline-size; position: relative; display: flex; flex-direction: column;
  width: 100%; aspect-ratio: 63 / 88; padding: 3.5% 4.5% 4%; border-radius: 6% / 4.3%;
  background: linear-gradient(160deg, #5a524a, var(--cf-frame) 45%, #362f2a);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 240, 210, .18);
  color: var(--ink); text-align: center; line-height: 1.18; transition: transform .12s;
}
.cf-band {
  height: 6cqw; border-radius: 1.5cqw 1.5cqw 0 0;
  background: radial-gradient(circle, var(--gold-bright) 0 .8cqw, transparent .95cqw) 50% 50% / 5cqw 5cqw repeat-x, var(--cf-band);
}
.cf-title {
  margin: 0 -2.5%; padding: 2.4cqw 3cqw 2cqw; font-family: var(--display); font-weight: 700; font-size: 7.6cqw;
  letter-spacing: .02em; line-height: 1.1; background: linear-gradient(#f6eed6, #e4d5aa);
  border-top: .9cqw solid var(--cf-accent); border-bottom: .9cqw solid var(--cf-accent);
  box-shadow: 0 .8cqw 1.2cqw rgba(0, 0, 0, .35);
}
.cf-body {
  position: relative; flex: 1; display: flex; flex-direction: column; margin-top: 2.5cqw; padding: 4.5cqw 7cqw 4cqw;
  background: radial-gradient(ellipse at 50% 38%, #fbf5e4, #ecdfbe 70%, #dcc89b);
  box-shadow: inset 0 0 0 .7cqw var(--cf-accent), inset 0 0 0 1.6cqw #f3e9cc, inset 0 0 0 2cqw rgba(124, 42, 32, .55);
}
.cf-body::before, .cf-body::after { content: '❖'; position: absolute; top: 3cqw; font-size: 4.6cqw; color: var(--cf-accent); opacity: .8; }
.cf-body::before { left: 3.6cqw; }
.cf-body::after { right: 3.6cqw; }
.cf-kind { font-family: var(--display); font-weight: 600; font-size: 5cqw; letter-spacing: .14em; color: var(--ink-soft); text-transform: uppercase; }
.cf-when { margin-top: .6cqw; font-style: italic; font-size: 5.4cqw; color: var(--ink-soft); }
.cf-rule { height: .6cqw; margin: 2.8cqw 6cqw 0; background: linear-gradient(90deg, transparent, var(--cf-accent), transparent); }
.cf-text { flex: 1; display: flex; align-items: center; justify-content: center; margin: 0; padding-top: 2cqw; font-size: 7.4cqw; line-height: 1.26; }
.cf-mark { display: none; }
.cf-foot {
  height: 6.5cqw; margin-top: 2.5cqw; border-radius: 0 0 1.5cqw 1.5cqw;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cpath d='M6 1.2 10.8 6 6 10.8 1.2 6z' fill='none' stroke='%23d8b45a' stroke-width='1.1'/%3E%3Ccircle cx='6' cy='6' r='1.3' fill='%23d8b45a'/%3E%3C/svg%3E") 50% 50% / 6.5cqw 6.5cqw repeat-x, var(--cf-band);
}
/* Skies Darken: the printed card's colours and layout (charcoal frame, white title on a dark band, light
   grey body, 4 numbered steps, the map in a box beside step 3). Ornaments, map and wording are our own. */
.cardface.skies {
  --cf-accent: #a12a24; --sk-ink: #2b2a28; --sk-rule: #8e8a84;
  overflow: hidden; padding: 0; border-radius: 5.5% / 4%;
  background: linear-gradient(180deg, #4b494b, #3a383a 45%, #2f2d2f);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 255, 255, .14);
}
.cardface.skies .cf-title {
  position: relative; margin: 0; padding: 5.6cqw 3cqw 5.4cqw; border: 0; box-shadow: none;
  background: linear-gradient(#18171a, #2f2d30 55%, #3a383b); color: #f7f4ee;
  font-size: 9.6cqw; font-weight: 700; letter-spacing: .015em; text-transform: uppercase; text-shadow: 0 .3cqw .6cqw #000;
}
.cardface.skies .cf-title::after {
  content: ''; position: absolute; left: 3cqw; right: 3cqw; bottom: 1.6cqw; height: 1.3cqw;
  border-top: .4cqw solid var(--sk-rule); border-bottom: .4cqw solid var(--sk-rule);
}
.cardface.skies .cf-body {
  margin: 0 2.6cqw; padding: 4.6cqw 4.6cqw 3.6cqw; text-align: left; color: var(--sk-ink);
  background:
    radial-gradient(ellipse 75% 22% at 78% 0, rgba(60, 60, 64, .5), transparent 100%),
    radial-gradient(ellipse 60% 16% at 20% 0, rgba(80, 80, 84, .35), transparent 100%),
    linear-gradient(180deg, #d6d4d0, #ebe9e4 24%, #efede9 62%, #dcd9d3);
  box-shadow: inset 0 0 0 .45cqw var(--sk-rule), inset 0 0 1.6cqw rgba(0, 0, 0, .18);
}
.cardface.skies .cf-body::before, .cardface.skies .cf-body::after { display: none; }
.cf-steps {
  flex: 1; display: flex; flex-direction: column; justify-content: space-between; margin: 0; padding: 0;
  list-style: none; counter-reset: step; font-size: 5.1cqw; line-height: 1.17;
}
.cf-steps li { position: relative; padding-left: 6.4cqw; counter-increment: step; }
.cf-steps li::before { content: counter(step) '.'; position: absolute; left: 0; font-weight: 600; }
.cf-steps .cf-step { display: block; font-weight: 600; font-size: 1.08em; }
.cf-steps b { font-weight: 600; }
.cf-steps .cf-with-map { display: flex; align-items: flex-start; gap: 3cqw; }
.cf-with-map > div { flex: 1; min-width: 0; }
.cf-map { display: block; }
.cardface.skies .cf-map {
  flex: none; width: 50%; aspect-ratio: 4 / 3; margin-right: -1cqw; background: #e4d6b6;
  border: .9cqw solid #3a393b; box-shadow: 0 .5cqw 1.2cqw rgba(0, 0, 0, .35);
}
.cf-net line { stroke: #9a8668; stroke-width: 18; }
.cf-net circle { fill: #9a8668; }
.cf-halo { fill: rgba(161, 42, 36, .18); stroke: var(--cf-accent); stroke-width: 18; }
.cf-spot { fill: var(--cf-accent); stroke: #f6efe0; stroke-width: 24; }
.cardface.skies .cf-foot {
  position: relative; height: 8cqw; margin: 0; border-radius: 0;
  background: linear-gradient(#333133, #1f1e20); box-shadow: inset 0 -1.7cqw 0 #7c2f2c;
}
.cardface.skies .cf-foot::before {
  content: ''; position: absolute; left: 3cqw; right: 3cqw; top: 1.4cqw; height: 1.3cqw;
  border-top: .4cqw solid var(--sk-rule); border-bottom: .4cqw solid var(--sk-rule);
}
.cf-place { margin-top: 2.2cqw; font-family: var(--display); font-weight: 700; text-align: center; color: var(--sk-ink); }
/* Hand size: name and kind only; the full text is in the tooltip and the play dialog. */
.cardface.mini .cf-title { font-size: 10.5cqw; padding: 3cqw 2cqw 2.4cqw; }
.cardface.mini .cf-when, .cardface.mini .cf-rule, .cardface.mini .cf-text { display: none; }
.cardface.mini .cf-body { padding: 5cqw 4cqw; }
.cardface.mini .cf-body::before, .cardface.mini .cf-body::after { display: none; }
.cardface.mini .cf-kind { font-size: 8.8cqw; }
.cardface.mini .cf-mark { flex: 1; display: flex; align-items: center; justify-content: center; font-size: 22cqw; color: var(--cf-accent); opacity: .75; }
.cardface.skies.mini .cf-title { padding: 4.6cqw 2cqw 5cqw; font-size: 10.6cqw; }
.cardface.skies.mini .cf-title::after { bottom: 1.4cqw; }
.cardface.skies.mini .cf-body { padding: 4.4cqw 4cqw 3.4cqw; }
.cardface.skies.mini .cf-map { flex: 1; width: 100%; min-height: 0; aspect-ratio: auto; margin: 0; }
.cardface.skies.mini .cf-place { font-size: 8.6cqw; }
/* Region cards: the printed card's colours and layout (olive frame with a striped top, a symbol
   medallion beside a cream name plaque, the map in a red-edged box, the number in a cream box, a dark
   strip at the bottom). The icons, ornaments and map are our own. */
.cardface.region {
  --cf-accent: #8a2c22; --cf-band: #2e3122; --rg-ink: #2b2519; --sym: #9ea2aa;
  /* The card is its own container, so its own sizes use % (cqw would measure the page). */
  overflow: hidden; padding: 0 3.6%; border-radius: 5.5% / 4%;
  background:
    repeating-linear-gradient(135deg, rgba(255, 250, 220, .09) 0 2.4%, transparent 2.4% 6%) 0 0 / 100% 12.5% no-repeat,
    linear-gradient(180deg, #737a52, #5d6443 40%, #4b5036);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 245, 210, .2);
}
.cardface.region.sym-friendship { --sym: #a4589a; }
.cardface.region.sym-valor { --sym: #9ea3ad; }
.cardface.region.sym-stealth { --sym: #4d8a61; }
.cardface.region.sym-resistance { --sym: #e3854a; }
.cardface.region .cf-head { display: flex; align-items: center; margin: 4.4cqw -1.2cqw 0 -.6cqw; }
.cardface.region .cf-medal {
  position: relative; z-index: 1; flex: none; display: grid; place-items: center;
  width: 17cqw; height: 17cqw; margin-right: -4cqw; border-radius: 50%;
  background: radial-gradient(circle at 36% 30%, color-mix(in srgb, var(--sym) 45%, #fff), var(--sym) 58%, color-mix(in srgb, var(--sym) 72%, #000));
  border: .9cqw solid #f2ead4; box-shadow: 0 0 0 .5cqw #33361f, 0 .6cqw 1.2cqw rgba(0, 0, 0, .45);
  color: #fff; font-size: 10cqw; line-height: 1; text-shadow: 0 .3cqw .7cqw rgba(0, 0, 0, .55);
}
.cardface.region .cf-title {
  flex: 1; min-width: 0; margin: 0; padding: 2.5cqw 2cqw 2.1cqw 5.4cqw; color: var(--rg-ink);
  font-size: 7.4cqw; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap;
  background: linear-gradient(#f9f2dd, #e8dbb3); border-top: .7cqw solid #3b2c20; border-bottom: .7cqw solid #3b2c20;
}
.cardface.region .cf-title.long { font-size: 5.6cqw; letter-spacing: 0; }
.cardface.region .cf-art {
  flex: 1; min-height: 0; display: flex; margin-top: 2.6cqw; padding: .9cqw;
  background: #3b2c20; border: .9cqw solid var(--cf-accent); box-shadow: 0 .5cqw 1.1cqw rgba(0, 0, 0, .4);
}
.cardface.region .cf-map { flex: 1; width: 100%; min-height: 0; background: radial-gradient(ellipse at 50% 42%, #f7f0de, #e6d8b6 75%, #d9c79d); }
.cf-zone-edge { fill: #3b2c20; stroke: #3b2c20; stroke-width: 300; stroke-linejoin: round; }
.cf-zone-fill { fill: var(--rg); stroke: var(--rg); stroke-width: 250; stroke-linejoin: round; }
.cardface.region .cf-spot { stroke-width: 22; }
.cardface.region .cf-net line { stroke: #8c7555; }
.cardface.region .cf-net circle { fill: #8c7555; }
.rg-eriador { --rg: #a5bd72; } .rg-rhudaur { --rg: #b4c07c; } .rg-enedwaith { --rg: #aab86e; }
.rg-misty { --rg: #8f9198; } .rg-mirkwood { --rg: #3f4b37; } .rg-dale { --rg: #cfae62; }
.rg-rhovanion { --rg: #d8bd76; } .rg-rohan { --rg: #b9c66e; } .rg-gondor { --rg: #92b066; }
.rg-ithilien { --rg: #7fa45c; } .rg-haradwaith { --rg: #dc9e5f; } .rg-mordor { --rg: #514a45; }
.cardface.region .cf-cap {
  /* Tall enough for the longest list (3 lines), so every map is the same size. */
  display: flex; align-items: center; gap: 2.6cqw; min-height: 20cqw; margin-top: 2.6cqw; padding: 1.6cqw 3cqw;
  text-align: left; color: var(--rg-ink); border-radius: 1.2cqw;
  background: linear-gradient(#f8f0d9, #e9dbb4); box-shadow: inset 0 0 0 .45cqw #8c6d4a, 0 .4cqw .9cqw rgba(0, 0, 0, .3);
}
.cardface.region .cf-num { flex: none; padding-right: 2.6cqw; border-right: .35cqw solid #b49a6e; font-style: italic; font-size: 10cqw; line-height: 1; }
.cardface.region .cf-places { flex: 1; font-style: italic; font-size: 4.6cqw; line-height: 1.22; }
.cardface.region .cf-foot { height: 7cqw; margin: 2.6cqw -3.6cqw 0; border-radius: 0; box-shadow: inset 0 .45cqw 0 #8c6d4a; }
/* Hand size: name, map and number; the places are in the tooltip. */
.cardface.region.mini .cf-medal { width: 21cqw; height: 21cqw; font-size: 13cqw; }
.cardface.region.mini .cf-title { padding: 2.6cqw 1.4cqw 2.2cqw 5.4cqw; font-size: 9cqw; letter-spacing: 0; }
.cardface.region.mini .cf-title.long { font-size: 6.2cqw; }
.cardface.region.mini .cf-places { display: none; }
.cardface.region.mini .cf-cap { justify-content: center; min-height: 0; padding: 1.8cqw 2cqw; }
.cardface.region.mini .cf-num { padding: 0; border: 0; font-size: 14cqw; }
/* Shadow cards: the printed card's colours and layout (dark frame, red band naming the line with an
   arrow in its colour, a map box, a white plaque for the place, a light order box). The arrow nodes,
   ornaments, map and wording are our own. Sizes of the card itself in %, its children in cqw. */
.cardface.shadow {
  --sh-red: #a4232b; --sh-ink: #26221f;
  overflow: hidden; padding: 0 0 2.6%; border-radius: 5.5% / 4%;
  background: linear-gradient(180deg, #3e3a37, #2e2b29 50%, #24211f);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 240, 225, .16);
}
.sh-band {
  position: relative; padding: 3.4cqw 4cqw 2.6cqw; color: #fbf3ea;
  background: linear-gradient(180deg, #c0343a, var(--sh-red) 55%, #861b22);
  box-shadow: inset 0 -.6cqw 0 rgba(0, 0, 0, .3);
}
.sh-names { display: flex; justify-content: space-between; gap: 2cqw; font-family: var(--display); font-weight: 700; font-size: 5.6cqw; letter-spacing: .03em; text-transform: uppercase; line-height: 1.05; text-shadow: 0 .3cqw .6cqw rgba(0, 0, 0, .55); }
.sh-names span:last-child { text-align: right; }
.sh-arrow { display: flex; align-items: center; margin: 2cqw 1cqw 0; }
.sh-arrow i { flex: none; width: 9cqw; height: 9cqw; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #8e2d2d, #4a1316); border: .7cqw solid #f1e6d6; box-shadow: 0 .3cqw .7cqw rgba(0, 0, 0, .5); }
.sh-arrow i.sh-end { background: radial-gradient(circle at 40% 35%, #fbf4e4, #d6c6a2); border-color: var(--line); }
.sh-arrow b {
  flex: 1; height: 4.4cqw; margin: 0 -.4cqw; background: #f4ece0; box-shadow: inset 0 0 0 .5cqw rgba(0, 0, 0, .25);
  position: relative;
}
.sh-arrow b::before { content: ''; position: absolute; left: 1.5cqw; right: 6cqw; top: 1.3cqw; height: 1.8cqw; background: var(--line); }
.sh-arrow b::after { content: ''; position: absolute; right: 1.4cqw; top: -.6cqw; border-left: 5cqw solid var(--line); border-top: 2.8cqw solid transparent; border-bottom: 2.8cqw solid transparent; }
.sh-art { flex: 1; min-height: 0; display: flex; margin: 2.6cqw 3.4cqw 0; padding: .7cqw; background: #1b1918; box-shadow: inset 0 0 0 .5cqw #6e665e, 0 .4cqw 1cqw rgba(0, 0, 0, .5); }
.cardface.shadow .cf-map { flex: 1; width: 100%; min-height: 0; background: radial-gradient(ellipse at 50% 42%, #f4efe4, #ded5c2 75%, #cbc0a8); }
.cardface.shadow .cf-net line { stroke: #b0a58f; }
.cardface.shadow .cf-net circle { fill: #b0a58f; }
.sh-route-case { fill: none; stroke: #2b2522; stroke-width: 120; stroke-linejoin: round; stroke-linecap: round; }
.sh-route { fill: none; stroke-width: 70; stroke-linejoin: round; stroke-linecap: round; }
.sh-from { fill: #8e1f26; stroke: #f6efe0; stroke-width: 30; }
.sh-to { fill: #f6efe0; stroke-width: 34; }
.sh-plaque {
  position: relative; z-index: 1; align-self: center; margin: -3.4cqw 0 0; padding: 1.4cqw 4cqw 1.2cqw;
  font-family: var(--display); font-weight: 700; font-size: 6.6cqw; letter-spacing: .04em; text-transform: uppercase; color: var(--sh-ink);
  background: linear-gradient(#ffffff, #e9e5de); border: .6cqw solid #3a3532; box-shadow: 0 0 0 .5cqw #f2ede6, 0 .5cqw 1cqw rgba(0, 0, 0, .5);
}
.sh-plus { margin-right: 1.6cqw; color: var(--sh-red); }
.sh-order {
  display: flex; flex-direction: column; gap: 1cqw; margin: 2.2cqw 3.4cqw 0; padding: 2.6cqw 3.4cqw; text-align: left;
  font-size: 4.7cqw; line-height: 1.2; color: var(--sh-ink); background: linear-gradient(#efece7, #dcd7cf);
  box-shadow: inset 0 0 0 .45cqw #8f877d;
}
.sh-order b { font-weight: 700; font-size: 1.08em; }
.sh-foot { height: 3cqw; margin: 2.2cqw 3.4cqw 0; border-top: .4cqw solid #7c736a; border-bottom: .4cqw solid #7c736a; }
.cardface.shadow.special .sh-band { padding: 4.6cqw 3cqw 4.2cqw; }
.sh-title { font-family: var(--display); font-weight: 700; font-size: 8.2cqw; letter-spacing: .02em; text-transform: uppercase; line-height: 1.08; text-shadow: 0 .3cqw .7cqw rgba(0, 0, 0, .6); }
.sh-emblem { flex: 1; min-height: 0; display: grid; place-items: center; margin: 2.6cqw 3.4cqw 0; background: radial-gradient(ellipse at 50% 45%, #6e1e22, #2b1416 70%); box-shadow: inset 0 0 0 .5cqw #6e665e; }
.sh-emblem svg { width: 70%; height: 90%; }
.sp-body { fill: #2a2523; stroke: #e7dccb; stroke-width: 2.4; stroke-linejoin: round; }
.sp-cord { fill: none; stroke: #c8a35a; stroke-width: 2.2; }
.sp-head { fill: #d9c9a8; stroke: #e7dccb; stroke-width: 2; }
.sp-hub { fill: #a4232b; }
.sp-stick { stroke: #c8b48a; stroke-width: 3.4; stroke-linecap: round; }
.sh-opts { margin: 1cqw 0 0; padding-left: 4.6cqw; }
.sh-opts li { margin-top: .6cqw; }
/* Hand size: the band's arrow, the map and the place; names and order are in the tooltip. */
.cardface.shadow.mini .sh-band { padding: 2.4cqw 3cqw 2.2cqw; }
.cardface.shadow.mini .sh-names, .cardface.shadow.mini .sh-order { display: none; }
.cardface.shadow.mini .sh-arrow { margin-top: 0; }
.cardface.shadow.mini .sh-plaque { margin-bottom: 1cqw; font-size: 8.4cqw; padding: 1.4cqw 2.6cqw 1.2cqw; }
.cardface.shadow.special.mini .sh-band { padding: 3cqw 2cqw 2.6cqw; }
.cardface.shadow.special.mini .sh-title { font-size: 8.8cqw; }
/* Shadow card backs: our own red pennant (advance) and black banner (reinforce). */
.cardface.shback {
  overflow: hidden; padding: 6%; border-radius: 5.5% / 4%;
  background: radial-gradient(ellipse at 50% 40%, #4a4542, #2a2725 70%, #1d1b1a);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 240, 225, .16);
}
.sb-field { flex: 1; min-height: 0; display: grid; place-items: center; border: .7cqw solid #6e665e; outline: .5cqw solid #3a3532; outline-offset: -2.6cqw; }
.sb-field svg { width: 76%; height: 86%; }
.sb-pole { stroke: #cfc4b2; stroke-width: 3.2; stroke-linecap: round; fill: none; }
.sb-knob { fill: #cfc4b2; }
.sb-flag { fill: #b8262f; stroke: #e8a7a0; stroke-width: 1.2; stroke-linejoin: round; }
.sb-banner { fill: #121112; stroke: #6e665e; stroke-width: 1.4; stroke-linejoin: round; }
.sb-mark { fill: #b8262f; }
.sb-label { margin-top: 3cqw; font-family: var(--display); font-weight: 700; font-size: 9cqw; letter-spacing: .06em; text-transform: uppercase; color: #e9dfcf; }
.back-flag .sb-label { color: #f08f86; }
/* Objective cards: the printed card's colours and layout (a stone-grey frame, the name on a cream
   plaque, a picture box, parchment text). The frame, map, chips and wording are our own. */
.cardface.objective {
  --ob-ink: #2c2a24;
  overflow: hidden; padding: 0 4% 3.5%; border-radius: 5% / 3.6%;
  background: linear-gradient(160deg, #8a9086, #6c7468 40%, #555d52);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 255, 240, .2), inset 0 0 0 .6cqw rgba(40, 45, 38, .35);
}
.ob-title {
  display: flex; align-items: center; justify-content: center; gap: 1.6cqw; margin: 3.6cqw -1cqw 0; padding: 2.4cqw 2.6cqw 2cqw;
  font-family: var(--display); font-weight: 700; font-size: 5.4cqw; line-height: 1.08; letter-spacing: .02em; color: var(--ob-ink);
  background: linear-gradient(#f8f2df, #e7dcbc); border-top: .6cqw solid #4a4f45; border-bottom: .6cqw solid #4a4f45;
  box-shadow: 0 .6cqw 1cqw rgba(0, 0, 0, .3);
}
.ob-star { flex: none; font-size: 1.4em; color: #2f332d; line-height: 1; }
.ob-star.ring { color: #a3262a; }
.ob-art { position: relative; display: flex; margin-top: 2.6cqw; height: 46cqw; padding: .7cqw; background: #4a4f45; box-shadow: inset 0 0 0 .4cqw #9aa093; }
.cardface.objective .cf-map { flex: 1; width: 100%; min-height: 0; background: radial-gradient(ellipse at 50% 42%, #f6efdc, #e3d6b4 75%, #d4c49b); }
.ob-chips { position: absolute; left: 1.4cqw; right: 1.4cqw; bottom: 1.4cqw; display: flex; flex-wrap: wrap; gap: 1cqw; justify-content: center; }
.ob-chip {
  padding: .5cqw 1.6cqw; border-radius: 1cqw; font-size: 4cqw; font-weight: 600; color: #fff;
  background: var(--chip, #555); box-shadow: 0 .3cqw .6cqw rgba(0, 0, 0, .4); text-shadow: 0 .2cqw .4cqw rgba(0, 0, 0, .5);
}
.ob-chip.sh { --chip: #a3262a; }
.ob-spaces { display: flex; gap: .8cqw; }
.ob-spaces i {
  display: grid; place-items: center; width: 7.4cqw; height: 7.4cqw; border-radius: 1cqw; font-style: normal; font-size: 3cqw; font-weight: 700;
  color: #6b5a52; background: rgba(250, 245, 230, .92); border: .4cqw dashed #a3262a;
}
.ob-spaces i.on { color: #fff; background: #a3262a; border-style: solid; }
.ob-spaces i.pl { border-color: #8a4c86; color: #6a4a68; }
.ob-spaces i.pl.on { background: #8a4c86; font-size: 4.6cqw; }
.ob-body {
  flex: 1; min-height: 0; margin-top: 2.6cqw; padding: 2.6cqw 3.2cqw; overflow: hidden; text-align: left;
  font-size: 4.7cqw; line-height: 1.24; color: var(--ob-ink);
  background: radial-gradient(ellipse at 50% 30%, #fbf6e6, #eee3c4 70%, #e0d1a9); box-shadow: inset 0 0 0 .45cqw #9aa093;
}
.ob-body p { margin: 1.4cqw 0 0; }
.ob-body b { font-weight: 700; }
.ob-setup { padding-bottom: 1.2cqw; border-bottom: .35cqw solid #b4a47c; text-align: center; font-size: .95em; }
.ob-rule { font-style: italic; }
.ob-done {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%) rotate(-14deg); padding: 1cqw 5cqw;
  font-family: var(--display); font-weight: 700; font-size: 10cqw; letter-spacing: .1em; text-transform: uppercase;
  color: #2f6a39; border: .8cqw solid #2f6a39; border-radius: 2cqw; background: rgba(245, 240, 220, .85);
}
.cardface.objective.mini { padding-bottom: 4%; }
.cardface.objective.mini .ob-title { font-size: 7.4cqw; padding: 2.6cqw 1.6cqw 2.2cqw; margin-top: 4.4cqw; }
.cardface.objective.mini .ob-art { flex: 1; height: auto; margin-top: 3cqw; }
.cardface.objective.mini .ob-chip { font-size: 7cqw; }
.cardface.objective.mini .ob-spaces i { width: 11cqw; height: 11cqw; font-size: 5cqw; }
/* Character cards: the printed card's layout (a coloured side panel with the name and starting place,
   abilities on parchment). Our own: the medallion with the initials instead of a portrait, the
   frame, and the wording. Wider than tall, like the printed card. */
.cardface.character {
  aspect-ratio: 88 / 63; flex-direction: row; gap: 2.4%; padding: 2.6% 3%; border-radius: 4% / 5.5%;
  background: linear-gradient(160deg, #6a6156, #4b443d 55%, #3a342f);
}
.ch-side {
  flex: none; width: 34%; display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 2cqw 1.4cqw; border-radius: 1.2cqw;
  background: linear-gradient(180deg, color-mix(in srgb, var(--ch) 55%, #f6efdc), color-mix(in srgb, var(--ch) 75%, #3a342f));
  box-shadow: inset 0 0 0 .5cqw rgba(40, 30, 20, .45);
}
.ch-name, .ch-home {
  width: 100%; padding: .9cqw .6cqw; text-align: center; font-family: var(--display); font-weight: 700; line-height: 1.05;
  color: #2c2620; background: linear-gradient(#fbf5e3, #e8dcb9); border: .35cqw solid #5a4c3c; box-shadow: 0 .3cqw .7cqw rgba(0, 0, 0, .35);
}
.ch-name { font-size: 3.4cqw; letter-spacing: .03em; text-transform: uppercase; }
.ch-home { font-size: 2.6cqw; }
.ch-medal {
  display: grid; place-items: center; width: 18cqw; height: 18cqw; border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, color-mix(in srgb, var(--ch) 40%, #fff), var(--ch) 60%, color-mix(in srgb, var(--ch) 70%, #000));
  border: .8cqw solid #f3ead4; box-shadow: 0 0 0 .5cqw #3a3028, 0 .6cqw 1.2cqw rgba(0, 0, 0, .45);
}
.ch-medal span { font-family: var(--display); font-weight: 700; font-size: 7.6cqw; color: #fff; text-shadow: 0 .3cqw .7cqw rgba(0, 0, 0, .6); }
.ch-body {
  flex: 1; min-width: 0; overflow: hidden; padding: 2cqw 2.6cqw; text-align: left; font-size: 3.15cqw; line-height: 1.24; color: #2c2620;
  border-radius: 1.2cqw; background: radial-gradient(ellipse at 40% 30%, #fbf6e6, #ece0bf 70%, #ddcda3); box-shadow: inset 0 0 0 .4cqw #8c7a5e;
}
.ch-body p { margin: 0 0 1.2cqw; }
.ch-body b { font-family: var(--display); font-weight: 700; letter-spacing: .02em; }
.ch-body i { color: #6a5a46; }
.ch-rule { padding: .8cqw 1.4cqw; border-radius: 1cqw; background: rgba(120, 100, 70, .14); box-shadow: inset 0 0 0 .3cqw rgba(120, 100, 70, .35); }
.cardface.character.mini .ch-side { width: 100%; }
.cardface.character.mini .ch-name { font-size: 7cqw; }
.cardface.character.mini .ch-home { font-size: 5.6cqw; }
.cardface.character.mini .ch-medal { width: 30cqw; height: 30cqw; }
.cardface.character.mini .ch-medal span { font-size: 12cqw; }
.modal .card-big.wide { width: min(470px, 100%); }
/* Painted emblems (frontend/img/emblems): round images that bring their own bronze rim. */
.emblem { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 .4cqw .8cqw rgba(0, 0, 0, .45)); }
.ch-medal:has(.emblem) { width: 24cqw; height: 24cqw; background: none; border: 0; box-shadow: none; }
.cardface.character.mini .ch-medal:has(.emblem) { width: 64cqw; height: 64cqw; }
.sh-emblem { display: flex; align-items: center; justify-content: center; overflow: hidden; }
.sh-emblem .emblem { width: auto; height: auto; max-width: 80%; max-height: 92%; }
.sb-field .emblem { width: 82%; height: auto; }
img.sh-icon { display: inline-block; width: 1.5em; height: 1.5em; margin: 0 .3em 0 0; vertical-align: -.4em; filter: none; }
img.sh-oicon { display: inline-block; width: 2em; height: 2em; margin-right: .35em; vertical-align: middle; filter: none; }
img.wh-icon { display: inline-block; width: 28px; height: 28px; margin-right: 6px; vertical-align: middle; filter: none; }
.ab-list { margin: 4px 0 8px; }
.ab-list .btn { float: right; margin: 2px 0 4px 8px; }
.ab-list p { margin: 3px 0; font-size: 14.5px; }
.ab-list .ab-rule { font-style: italic; }
/* the objectives panel */
.ob-list { display: grid; gap: 8px; }
.ob-row { display: flex; gap: 10px; align-items: flex-start; }
.ob-row .card { flex: none; width: 74px; }
.ob-row > div { flex: 1; font-size: 15px; }
.ob-row .btn { margin-top: 4px; }
.ob-row.done b { text-decoration: line-through; opacity: .7; }
.pv-pair { display: flex; gap: 10px; justify-content: center; margin: 8px 0; }
.pv-pair > div { width: min(160px, 45%); text-align: center; }
.die.aside { opacity: .5; }
/* the shadow deck panel */
.shadow-row { display: flex; gap: 10px; align-items: flex-start; }
.sh-deck { flex: none; width: 74px; text-align: center; }
.sh-deck .hint { display: block; font-size: 13px; }
.sh-last { flex: 1; display: flex; flex-wrap: wrap; gap: 6px; }
.sh-last .card { width: 74px; }
.sh-half { display: block; margin-top: 2px; font-size: 12.5px; color: var(--ink-soft); text-align: center; }
.choice-list { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.choice-list .btn { text-align: left; font-family: inherit; font-size: 16px; letter-spacing: 0; line-height: 1.3; }
.choice-list .btn b { font-family: var(--display); font-size: 15px; letter-spacing: .03em; }
.choice-list .btn[aria-pressed="true"] { outline: 2px solid var(--gold-bright); }
.pick-list { display: grid; gap: 4px; margin: 6px 0; }
.pick-list label { display: flex; gap: 6px; align-items: center; }
.modal .card-big.small { width: min(190px, 60%); }
/* event forms and Elrond's Foresight */
.evsect { margin-top: 8px; }
.evsect > b { font-family: var(--display); font-size: 14px; font-weight: 600; }
.modal .check { margin-bottom: 0; gap: 6px; }
.num { display: inline-flex; gap: 6px; align-items: center; margin-right: 8px; }
.num input { width: 3.4em; padding: 2px 4px; border: 1px solid #a8916a; background: #f3ead2; border-radius: 3px; }
.fs-list { padding-left: 1.4em; }
.fs-list li { display: flex; gap: 6px; align-items: center; margin: 4px 0; }
.fs-list li span { flex: 1; }
.fs-list li .fs-card { flex: none; width: 52px; }
.tokens { font-size: 15px; color: var(--ink-soft); }
.player { padding: 8px 0; border-bottom: 1px dotted #b8a27a; }
.player .pname { font-family: var(--display); font-size: 15px; }
.player.current .pname::before { content: '◆ '; color: var(--gold); }
.obj { padding: 6px 0; border-bottom: 1px dotted #b8a27a; font-size: 15px; }
.obj.done { opacity: .55; text-decoration: line-through; }
.obj .ph { color: var(--ember); font-style: italic; }
.log { font-size: 14.5px; line-height: 1.35; max-height: 220px; overflow-y: auto; padding-right: 6px; }
.log p { margin: 0 0 3px; }
.chat { display: flex; gap: 6px; margin-top: 6px; }
.chat input { flex: 1; padding: 4px 8px; border: 1px solid #a8916a; background: #f3ead2; border-radius: 3px; }

.modal-back { position: fixed; inset: 0; background: rgba(20, 16, 10, .55); display: grid; place-items: center; z-index: 10; }
.modal { background: var(--vellum); border: 2px solid var(--ink); padding: 18px 22px; max-width: 520px; width: calc(100% - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; }
.modal h3 { font-family: var(--display); margin: 0 0 8px; font-weight: 600; }
#reveal .modal-back { z-index: 15; }
.modal.reveal { max-width: 340px; text-align: center; }
.modal.reveal .card-big { width: min(270px, 100%); margin-top: 10px; }
.modal.reveal .row { justify-content: center; }
.dice { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.die { width: 86px; padding: 8px 4px; text-align: center; border-radius: 6px; background: #fbf6e8; border: 1px solid var(--ink); font-size: 15px; }
.die.bad { background: #f2d4c8; border-color: var(--ember); }
.die.good { background: #dbe7cf; }
.die .btn { margin-top: 6px; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--ember); color: #fff; padding: 8px 16px; border-radius: 3px; z-index: 20; }
.banner-end { font-family: var(--display); font-size: 22px; text-align: center; padding: 12px; background: var(--ink); color: var(--gold-bright); }
