.duel-shell { --table-line: #66536d; max-width: 1040px; }
.duel-intro { margin-bottom: 1.4rem; padding: 1.65rem 0 .95rem; border-bottom: 1px solid var(--line); }
.duel-intro h1 { margin: .22rem 0 .6rem; font-size: clamp(2.2rem, 6vw, 3.45rem); }
.duel-intro p { margin: 0; color: var(--muted); }
.table-switch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .58rem; margin-bottom: 1rem; }
.table-switch a { display: flex; align-items: center; justify-content: center; gap: .55rem; padding: .7rem .4rem; text-align: center; background: #231d2b; border: 1px solid var(--line); border-radius: .45rem; font-weight: 750; }
.table-switch a[aria-current="page"] { border-color: var(--table-color); background: #352638; }
.table-switch em { color: var(--table-color); font-style: normal; }
.table-switch a:hover { border-color: var(--table-color); }
.table-layout { display: grid; grid-template-columns: minmax(0, 2.15fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.table-main, .table-rules { min-width: 0; border: 1px solid var(--table-line); border-radius: .76rem; background: linear-gradient(165deg,#2a2333,#1c1724); padding: clamp(.86rem,3vw,1.3rem); }
.table-header h2 { margin: 0; font-size: clamp(1.3rem,3.7vw,1.8rem); }
.table-header p, .table-rules li { margin: .42rem 0 0; font-size: .92rem; line-height: 1.65; color: var(--muted); }
.rematch-row { display: flex; align-items: center; flex-wrap: wrap; gap: .7rem; }
.mode-panel { margin-top: 1.05rem; }
.table-notice { color: var(--accent); min-height: 1.4rem; font-size: .9rem; margin: .85rem 0 .45rem; }
.table-notice:empty { display: none; }
.seat-scores { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .55rem; margin: .7rem 0; }
.seat-scores div { display: flex; align-items: center; justify-content: space-between; gap: .35rem; padding: .48rem .6rem; border-radius: .4rem; background: #161822; border: 1px solid #504257; color: #9cf0e2; font-size: .89rem; }
.seat-scores div + div { color: #ffc781; }
.seat-scores div[data-turn="true"] { border-color: currentColor; }
.seat-scores strong { font: 800 1.24rem ui-monospace, monospace; }
.table-board { min-width: 0; }
.table-board:empty { display: none; }
.rematch-row:not(:has(> :not([hidden]))) { display: none; }
.rematch-row { margin-top: .95rem; }
.table-rules summary { cursor: pointer; font-weight: 750; }
.table-rules ol { padding-left: 1.25rem; margin-bottom: 0; }
.table-rules li + li { margin-top: .55rem; }
.duel-grid { display: grid; grid-template-columns: repeat(var(--columns,4),minmax(0,1fr)); gap: clamp(3px,1vw,6px); }
.duel-cell { display: grid; place-items: center; min-width: 0; padding: 0; border: 1px solid var(--table-line); border-radius: .25rem; background: #211a2a; aspect-ratio: 1; font-size: clamp(.8rem,3vw,1.25rem); }
.duel-cell:disabled { opacity: 1; }
@media (max-width: 690px) {
  .table-layout { grid-template-columns: minmax(0,1fr); }
  .table-switch a { font-size: .83rem; padding: .68rem .18rem; gap: .34rem; }
  .duel-intro { padding: .9rem 0 .82rem; margin-bottom: .98rem; }
  .duel-intro p { font-size: .88rem; }
}
