.match-options { grid-column:1/-1; padding:14px; border:1px solid var(--line); border-radius:10px; background:var(--surface-2); color:var(--text) }
.match-options summary { cursor:pointer; font-weight:700 }
.match-options summary,.match-options label { color:var(--text) }
.match-options .match-fields { display:flex; flex-wrap:wrap; gap:14px; padding-top:12px }
.match-options label { display:flex; gap:8px; align-items:center }
.match-options input[type=checkbox] { width:auto }
.match-options input[type=number] { width:80px }
.match-options input[type=text] { width:200px }
.match-options p,.muted { color:var(--text-soft); font-size:13px; line-height:1.6 }
.match-clock { border-radius:8px; padding:8px 14px; background:var(--surface-2); color:var(--text); white-space:pre-line }
.match-clock.extra { background:var(--primary); color:var(--surface) }
.pregame { position:fixed; inset:0; z-index:3500; background:var(--overlay); display:grid; place-items:center; padding:18px }
.pregame[hidden],.replay-controls[hidden] { display:none }
.pregame-card { background:var(--surface); color:var(--text); border-radius:16px; padding:24px; width:min(940px,95vw); max-height:90vh; overflow:auto }
.pregame-card h2,.pregame-card h3,.pregame-card p,.pregame-card label { color:var(--text) }
.initiative-cards { display:flex; gap:24px; justify-content:center; margin:16px 0 }
.initiative-card { text-align:center; min-width:140px; border:1px solid var(--line); border-radius:10px; padding:12px }
.initiative-art { height:170px }
.initiative-art img { height:100%; width:auto; max-width:125px; object-fit:contain }
.pregame-columns { display:grid; grid-template-columns:1fr 1fr; gap:16px }
.pregame-list { max-height:42vh; overflow:auto; border:1px solid var(--line); border-radius:8px; padding:10px }
.side-row { display:flex; align-items:center; gap:8px; padding:6px 0; border-bottom:1px solid var(--line) }
.side-row span { flex:1 }
.side-row button { padding:5px 10px }
.deck-reserve-section { display:contents }
.deck-legality { order:1; padding-top:14px; border-top:1px solid var(--line) }
.deck-list-panel .deck-legality h3 { margin:0 0 8px; font-size:14px }
.deck-validation { font-size:13px; white-space:pre-line; padding:10px; border-radius:8px; background:var(--surface-2); color:var(--text); line-height:1.6 }
.replay-controls { display:flex; flex-wrap:wrap; gap:8px; align-items:center; padding:12px; background:var(--surface-2); color:var(--text); border:1px solid var(--line); border-radius:10px; margin:8px 0 }
.replay-controls a { color:var(--primary) }
.replay-controls #rpNotice { flex-basis:100%; font-size:12px }
.replay-controls input[type=range] { flex:1; min-width:140px }
.replay-controls a { padding:6px 10px }
.replay-controls select { width:auto }
body.replaying .test-panel,body.replaying .action-settings,body.replaying #actionsPanel,
body.replaying #backToLobby { display:none!important }
body.replaying #copyGameLog { display:none!important }
.record-error { color:var(--danger); font-weight:600 }
@media(max-width:650px) { .pregame-columns { grid-template-columns:1fr } .pregame-list { max-height:26vh } .pregame-card { padding:14px } .match-options label { flex-wrap:wrap } }
.app-nav nav a.nav-link { display:inline-flex; align-items:center; text-decoration:none }

.sideboard-clock{font-weight:700;font-variant-numeric:tabular-nums;padding:8px 10px;background:var(--surface-2);border:1px solid var(--line);border-radius:8px}.sideboard-sync-status{font-size:.85rem;line-height:1.5;overflow-wrap:anywhere;color:var(--text-soft)}
