/* Tap for 99 — Match Tracker */
:root {
  --bg: #17101f; --header: #281c35; --surface: #1e1529; --surface-2: #221830; --surface-3: #2c2040;
  --raised: #3a2b50; --line: #3d2e52; --line-2: #4a3864;
  --gold: #e0b45a; --gold-hi: #f3cf85; --text: #f1e9db; --text-2: #d6cbe3; --muted: #bcaecf; --dim: #9a8bb0;
  --good: #93d1a1; --warn: #f2a184; --danger: #ff8f8f;
  --pip-W: #f3ebcf; --pip-U: #9cc9ee; --pip-B: #c3b7bb; --pip-R: #f2a184; --pip-G: #93d1a1; --pip-C: #cfc8d8;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 Inter, system-ui, sans-serif; }
a { color: var(--gold); } a:hover { color: var(--gold-hi); }
button, input, select { font: inherit; color: inherit; }
button { touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.mt-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.t99-wrap { max-width: 1240px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
body.mt-playing { overflow: hidden; }
body.mt-playing .site-bar { visibility: hidden; }
.mt-game { z-index: 30; }
.mt-back { display: inline-flex; align-items: center; min-height: 44px; color: var(--gold); text-decoration: none; font-weight: 600; font-size: 14px; }

.mt-page { padding-top: 12px; padding-bottom: 64px; }
.mt-hero { text-align: center; margin-bottom: 32px; }
.mt-eyebrow { font-size: 12px; letter-spacing: .24em; font-weight: 600; color: var(--gold); }
.mt-hero h1 { font: 600 44px/1.1 Cinzel, serif; margin: 12px 0; }
.mt-hero p { margin: 0 auto; max-width: 520px; color: var(--muted); font-size: 17px; }
@media (max-width: 600px) { .mt-hero h1 { font-size: 34px; } }

.mt-card { max-width: 760px; margin: 0 auto 24px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.mt-card h2 { font: 600 20px/1.2 Cinzel, serif; margin: 0 0 16px; }
.mt-field { margin-bottom: 22px; }
.mt-label { display: block; font-size: 12px; letter-spacing: .14em; font-weight: 600; color: var(--gold); margin-bottom: 8px; }
.mt-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.mt-seg button { min-width: 48px; min-height: 40px; padding: 8px 14px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-weight: 600; cursor: pointer; }
.mt-seg button[aria-pressed="true"] { background: var(--gold); color: #1a1224; }
.mt-custom-life { width: 90px; min-height: 40px; margin-left: 8px; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); }

.mt-players { display: flex; flex-direction: column; gap: 10px; }
.mt-prow { display: grid; grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1.4fr); gap: 10px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
@media (max-width: 600px) { .mt-prow { grid-template-columns: 44px minmax(0, 1fr); } .mt-prow__cmd { grid-column: 1 / -1; } }
.mt-swatch { width: 44px; height: 44px; border-radius: 10px; border: 2px solid var(--line-2); cursor: pointer; padding: 0; }
.mt-input { width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); }
.mt-input::placeholder { color: var(--dim); }
.mt-input:focus { border-color: var(--gold); outline: none; }
.mt-prow__cmd { display: flex; flex-direction: column; gap: 6px; }
.mt-linkbtn { align-self: flex-start; background: none; border: 0; padding: 4px 0; color: var(--gold); font-size: 13px; font-weight: 600; cursor: pointer; }
.mt-slot { display: flex; flex-direction: column; gap: 6px; }
.mt-input[aria-invalid="true"] { border-color: var(--danger); }
.mt-pick { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); min-height: 0; }
.mt-pick:empty { display: none; }
.mt-pick img, .mt-pick__mono { width: 64px; height: 47px; flex-shrink: 0; border-radius: 8px; object-fit: cover; border: 1px solid var(--line-2); background: var(--surface-3); }
.mt-pick__mono { display: flex; align-items: center; justify-content: center; font: 700 16px Cinzel, serif; color: var(--gold); }
.mt-pick__txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.mt-pick__txt strong { color: var(--text); font-weight: 600; }
.mt-pick__txt span { font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-pick.is-err { color: var(--danger); }
.mt-pick__load { color: var(--dim); }
.mt-form-error { margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; border: 1px solid #6b3a4a; background: #2a1520; color: var(--danger); font-size: 14px; font-weight: 600; }
.mt-select { min-height: 44px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); }
.mt-toggle { display: flex; align-items: center; gap: 12px; cursor: pointer; font-size: 14px; color: var(--text-2); }
.mt-toggle input { width: 22px; height: 22px; accent-color: var(--gold); }
.mt-help { color: var(--dim); font-size: 13px; margin: 6px 0 0; }

.mt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; border: 1px solid transparent; }
.mt-btn--gold { background: var(--gold); color: #1a1224; }
.mt-btn--gold:hover { background: var(--gold-hi); color: #1a1224; }
.mt-btn--ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.mt-btn--ghost:hover { border-color: var(--gold); color: var(--text); }
.mt-btn--danger { background: transparent; color: var(--danger); border-color: #6b3a4a; }
.mt-btn--block { width: 100%; }
.mt-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.mt-actions > * { flex: 1 1 160px; }

.mt-resume { max-width: 760px; margin: 0 auto 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 20px; border-radius: 14px; border: 1px solid var(--gold); background: var(--surface-3); }

.mt-history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mt-history li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px 14px; background: var(--surface); border-radius: 10px; font-size: 14px; }
.mt-history__win { font-weight: 600; }
.mt-history__meta { color: var(--dim); font-size: 12px; }
.mt-empty { color: var(--dim); font-size: 14px; margin: 0; }

/* ---------- Game board ---------- */
.mt-game { position: fixed; inset: 0; display: flex; flex-direction: column; background: var(--bg); user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.mt-board { flex: 1; display: grid; gap: 6px; min-height: 0; position: relative;
  padding: max(6px, env(safe-area-inset-top)) max(6px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left)); }

.mt-panel { position: relative; border-radius: 16px; overflow: hidden; background: var(--surface-2); border: 2px solid var(--line); min-width: 0; min-height: 0; container-type: size; }
.mt-panel.is-active { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.mt-panel__bg { position: absolute; inset: -12px; background-size: cover; background-position: center 30%; opacity: .16; filter: blur(6px) saturate(1.1); }
.mt-panel__tint { position: absolute; inset: 0; background: var(--accent); opacity: .10; }

/* Inner face: turned to face the player who sits on that side */
.mt-panel__inner { position: absolute; left: 50%; top: 50%; width: 100cqw; height: 100cqh; transform: translate(-50%, -50%);
  display: grid; grid-template-rows: minmax(0, 1fr) auto; container: face / size; }
.mt-panel.rot-180 .mt-panel__inner { transform: translate(-50%, -50%) rotate(180deg); }
.mt-panel.rot-90 .mt-panel__inner { width: 100cqh; height: 100cqw; transform: translate(-50%, -50%) rotate(90deg); }
.mt-panel.rot-270 .mt-panel__inner { width: 100cqh; height: 100cqw; transform: translate(-50%, -50%) rotate(-90deg); }

.mt-hit { position: absolute; top: 0; bottom: 0; width: 50%; z-index: 1; border: 0; background: transparent; cursor: pointer; display: flex; align-items: center; color: var(--text); opacity: .55; font-size: clamp(22px, 9cqmin, 52px); font-weight: 300; padding: 0 5%; }
.mt-hit:active { background: rgba(255, 255, 255, .05); }
.mt-hit--minus { left: 0; justify-content: flex-start; }
.mt-hit--plus { right: 0; justify-content: flex-end; }

.mt-center { grid-row: 1; position: relative; z-index: 2; min-height: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; text-align: center; padding: 6px 13% 2px; container-type: size; }
.mt-stack { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 100%; min-width: 0; }
.mt-stack > .mt-name, .mt-stack > .mt-sub { max-width: 100%; }
.mt-name { font-weight: 600; font-size: clamp(12px, min(7cqw, 9cqh), 20px); line-height: 1.2; color: var(--accent); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-sub { font-size: clamp(10px, min(5cqw, 6.5cqh), 13px); line-height: 1.25; color: var(--muted); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-life { font: 600 clamp(28px, min(34cqw, 30cqh), 150px)/1 Cinzel, serif; font-variant-numeric: tabular-nums; letter-spacing: -.02em; margin: 1px 0; }
.mt-lifewrap { position: relative; display: flex; flex-direction: column; align-items: center; }
.mt-delta { height: 1.3em; font-weight: 700; font-size: clamp(12px, min(6cqw, 8cqh), 20px); opacity: 0; transition: opacity .2s; }
.mt-delta.is-on { opacity: 1; }
.mt-delta.is-neg { color: var(--warn); } .mt-delta.is-pos { color: var(--good); }
/* Commander picture: centered under the player's name */
.mt-art { display: flex; justify-content: center; gap: 6px; max-width: 100%; margin: 3px 0 1px; }
.mt-art:empty { display: none; }
.mt-art img, .mt-art__mono { display: block; height: clamp(24px, 30cqh, 190px); aspect-ratio: 626 / 457; max-width: 74cqw; object-fit: cover; border-radius: 10px;
  border: 2px solid var(--accent); box-shadow: 0 4px 14px rgba(0, 0, 0, .45); background: var(--surface-3); }
.mt-art.is-pair img, .mt-art.is-pair .mt-art__mono { max-width: 36cqw; height: clamp(24px, 26cqh, 150px); }
.mt-art__mono { display: flex; align-items: center; justify-content: center; font: 700 clamp(12px, 12cqh, 40px) Cinzel, serif; color: var(--accent); }
@container (max-height: 175px) { .mt-sub { display: none; } }
/* Short, wide panels: picture and life side by side under the name, centered as a pair */
@container (max-height: 150px) {
  .mt-stack { display: grid; grid-template-columns: auto auto; grid-template-areas: "name name" "art life"; justify-content: center; align-content: center; align-items: center; column-gap: 10px; row-gap: 2px; }
  .mt-name { grid-area: name; justify-self: center; font-size: clamp(12px, 11cqh, 16px); }
  .mt-art { grid-area: art; margin: 0; }
  .mt-art img, .mt-art__mono { height: clamp(28px, 56cqh, 110px); max-width: 30cqw; }
  .mt-art.is-pair img, .mt-art.is-pair .mt-art__mono { height: clamp(24px, 48cqh, 90px); max-width: 18cqw; }
  .mt-lifewrap { grid-area: life; }
  .mt-life { font-size: clamp(28px, min(24cqw, 60cqh), 90px); }
  .mt-lifewrap .mt-delta { position: absolute; left: 100%; top: 0; margin-left: 4px; height: auto; font-size: 13px; }
}
@container (max-height: 48px) { .mt-art { display: none; } }

.mt-chips { grid-row: 2; position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0 8px 8px; pointer-events: none; }
.mt-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; max-width: 100%; }
.mt-badges:empty { display: none; }
.mt-badge { display: inline-flex; align-items: center; gap: 3px; height: 24px; padding: 0 7px; border-radius: 999px; background: rgba(23, 16, 31, .88); border: 1px solid var(--line-2); font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.mt-badge svg { width: 13px; height: 13px; flex-shrink: 0; }
.mt-badge b { font-weight: 700; }
.mt-badge--poison { color: var(--good); } .mt-badge--cmd { color: var(--warn); } .mt-badge--gold { color: var(--gold); border-color: #6e5730; }
.mt-trk-btn { pointer-events: auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; min-width: 44px; padding: 6px 12px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line-2); color: var(--text); font-size: 12px; font-weight: 600; cursor: pointer; }
.mt-trk-btn:hover { border-color: var(--gold); }
.mt-trk-btn svg { width: 16px; height: 16px; }
@container face (max-height: 240px) {
  .mt-chips { flex-direction: row; flex-wrap: wrap; justify-content: center; padding-bottom: 6px; }
  .mt-trk-btn { min-height: 34px; padding: 4px 10px; }
  .mt-badge { height: 22px; padding: 0 6px; font-size: 11px; }
}
@container face (max-width: 150px) { .mt-trk-btn__txt { display: none; } .mt-trk-btn { padding: 6px 10px; } }

.mt-out { position: absolute; inset: 0; z-index: 3; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: rgba(15, 9, 22, .86); text-align: center; padding: 12px; }
.mt-panel.is-out .mt-out { display: flex; }
.mt-out__title { font: 700 clamp(14px, 7cqmin, 28px) Cinzel, serif; letter-spacing: .08em; color: var(--muted); }
.mt-out__why { font-size: 13px; color: var(--dim); }
.mt-out .mt-btn { min-height: 40px; padding: 8px 16px; font-size: 13px; }

/* Center bar: its own strip between the two halves, so it never covers a panel */
.mt-hub { justify-self: center; align-self: center; z-index: 5; display: flex; align-items: center; gap: 6px; padding: 5px; border-radius: 999px; background: #120c19; border: 1px solid var(--line-2); }
.mt-hub__info { display: flex; flex-direction: column; align-items: center; padding: 0 10px; line-height: 1.15; min-width: 64px; }
.mt-hub__turn { font: 600 13px Cinzel, serif; color: var(--gold); }
.mt-hub__time { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mt-hub button { width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface-3); color: var(--text); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.mt-hub button:hover { border-color: var(--gold); }
.mt-hub button:disabled { opacity: .4; cursor: default; }
.mt-hub .mt-hub__pass { width: auto; padding: 0 14px; gap: 6px; background: var(--gold); color: #1a1224; border-color: var(--gold); font-weight: 700; font-size: 13px; }
.mt-hub svg { width: 18px; height: 18px; }
.mt-hub--vert { flex-direction: column; padding: 5px; border-radius: 28px; }
.mt-hub--vert .mt-hub__info { padding: 4px 0; min-width: 0; }
.mt-hub--vert .mt-hub__turn { font-size: 12px; }
.mt-hub--vert .mt-hub__pass { width: 44px; height: 64px; padding: 0; flex-direction: column; gap: 2px; font-size: 11px; border-radius: 22px; }
@media (max-height: 420px) {
  .mt-board--rows .mt-hub button { width: 40px; height: 40px; }
  .mt-board--rows .mt-hub .mt-hub__pass { width: auto; }
  .mt-board--rows { gap: 4px; }
}

/* ---------- Dialogs ---------- */
.mt-dialog {
  --dialog-top: calc(12px + env(safe-area-inset-top, 0px));
  --dialog-right: calc(12px + env(safe-area-inset-right, 0px));
  --dialog-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  --dialog-left: calc(12px + env(safe-area-inset-left, 0px));
  position: fixed;
  inset: var(--dialog-top) var(--dialog-right) var(--dialog-bottom) var(--dialog-left);
  margin: auto;
  box-sizing: border-box;
  width: min(560px, calc(100vw - var(--dialog-left) - var(--dialog-right)));
  max-height: calc(100dvh - var(--dialog-top) - var(--dialog-bottom));
  overflow: auto;
  padding: 0; border: 1px solid var(--line-2); border-radius: 18px; background: var(--surface-2); color: var(--text); }
.mt-dialog::backdrop { background: rgba(10, 6, 16, .78); }
.mt-dlg-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; background: var(--surface-3); border-bottom: 1px solid var(--line); }
.mt-dlg-head h2 { font: 600 20px/1.2 Cinzel, serif; margin: 0; }
.mt-dlg-head .mt-sub { font-size: 13px; }
.mt-x { width: 44px; height: 44px; flex-shrink: 0; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.mt-x:hover { color: var(--text); border-color: var(--gold); }
.mt-x svg { width: 16px; height: 16px; }
.mt-dlg-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 22px; }
.mt-sec h3 { font-size: 12px; letter-spacing: .14em; font-weight: 600; color: var(--gold); margin: 0 0 10px; }
.mt-sec .mt-help { margin: -4px 0 10px; }

.mt-step { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; }
.mt-step.is-lethal { border-color: var(--danger); }
.mt-step__label { min-width: 0; display: flex; flex-direction: column; }
.mt-step__name { font-weight: 600; font-size: 14px; }
.mt-step__hint { font-size: 12px; color: var(--dim); }
.mt-step__ctrl { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.mt-step__ctrl button { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface-3); color: var(--text); font-size: 20px; font-weight: 600; cursor: pointer; padding: 0; }
.mt-step__ctrl button:hover { border-color: var(--gold); }
.mt-step__val { min-width: 48px; text-align: center; font: 600 22px Cinzel, serif; font-variant-numeric: tabular-nums; }
.mt-swatch-dot { display: inline-block; width: 10px; height: 10px; border-radius: 999px; margin-right: 6px; vertical-align: middle; }

.mt-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mt-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mt-tile-btn { min-height: 56px; padding: 10px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-weight: 600; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 13px; text-align: center; }
.mt-tile-btn:hover { border-color: var(--gold); }
.mt-tile-btn[aria-pressed="true"] { border-color: var(--gold); background: var(--surface-3); color: var(--gold); }
.mt-tile-btn svg { width: 20px; height: 20px; }
.mt-dice-out { text-align: center; padding: 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); font-size: 15px; color: var(--muted); min-height: 72px; display: flex; align-items: center; justify-content: center; }
.mt-dice-out b { font: 700 32px Cinzel, serif; color: var(--gold); margin-right: 10px; }
.mt-assign { display: flex; flex-wrap: wrap; gap: 6px; }
.mt-assign button { min-height: 40px; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); font-size: 13px; font-weight: 600; cursor: pointer; }
.mt-assign button[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: #1a1224; }
.mt-log { list-style: none; margin: 0; padding: 0; max-height: 200px; overflow: auto; font-size: 13px; color: var(--text-2); display: flex; flex-direction: column; gap: 4px; }
.mt-log li span { color: var(--dim); margin-right: 8px; font-variant-numeric: tabular-nums; }
.mt-winners { display: flex; flex-direction: column; gap: 8px; }
.mt-winner { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; text-align: left; color: var(--text); }
.mt-winner[aria-pressed="true"] { border-color: var(--gold); background: var(--surface-3); }
.mt-winner__name { font-weight: 600; }
.mt-winner__sub { font-size: 12px; color: var(--dim); }

/* Summary */
.mt-summary-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 18px; }
.mt-stat { background: var(--surface); border-radius: 12px; padding: 12px 14px; }
.mt-stat__k { font-size: 12px; color: var(--muted); }
.mt-stat__v { font: 600 22px Cinzel, serif; }
.mt-standings { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mt-standings li { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; background: var(--surface); border-radius: 12px; }
.mt-standings__place { font: 700 18px Cinzel, serif; color: var(--dim); text-align: center; }
.mt-standings li.is-win { border: 1px solid var(--gold); }
.mt-standings li.is-win .mt-standings__place { color: var(--gold); }

.mt-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 999px; background: #120c19; border: 1px solid var(--gold); color: var(--text); font-weight: 600; font-size: 14px; box-shadow: 0 6px 24px rgba(0, 0, 0, .5); }

/* Save to Match Log (results screen) */
.mt-save { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 18px; margin-bottom: 18px; display: flex; flex-direction: column; gap: 12px; }
.mt-save:empty { display: none; }
.mt-save h3 { font: 600 18px/1.2 Cinzel, serif; margin: 0; }
.mt-save__row { display: flex; flex-direction: column; gap: 2px; }
.mt-save__row .mt-label { margin-bottom: 4px; }
.mt-save .mt-select { width: 100%; }
.mt-btn:disabled { opacity: .55; cursor: default; }

/* Light theme (site default) for the setup and results screens; the game board stays dark */
:root:not([data-theme=dark]) .mt-page {
  --bg:#fbf6ed; --surface:#fffdf8; --surface-2:#f3ebe0; --surface-3:#efe2cd; --raised:#ffdea1;
  --line:#d8cbb9; --line-2:#ac9983; --gold:#79500c; --gold-hi:#624009; --text:#302638; --text-2:#493e50;
  --muted:#615466; --dim:#6e5f71; --good:#246340; --warn:#9b3e26; --danger:#a33a2c;
  color: var(--text);
}
:root:not([data-theme=dark]) body:not(.mt-playing) { background: #fbf6ed; color: #302638; }
:root:not([data-theme=dark]) .mt-page :is(.mt-btn--gold, .mt-seg button[aria-pressed="true"]) { background: #ffd28b; color: #39273f; border-color: #e0a95a; }
:root:not([data-theme=dark]) .mt-page .mt-btn--gold:hover { background: #ffc46c; color: #39273f; }
:root:not([data-theme=dark]) .mt-page .mt-input, :root:not([data-theme=dark]) .mt-page .mt-select, :root:not([data-theme=dark]) .mt-page .mt-custom-life { background: #fffdf8; }
:root:not([data-theme=dark]) .mt-page .mt-form-error { background: #fdeae4; border-color: #e3a595; }
:root:not([data-theme=dark]) .mt-page .mt-resume { background: #fff3dd; }
