/* The duel table. Typography/material provenance: docs/ingame-rebuild.md.
   All selectors are scoped to the in-game screen; character bitmaps are original. */
@font-face { font-family:"Duel Sans"; src:url("../../graphic/fonts/NotoSansJP.woff2") format("woff2"); font-weight:100 900; font-display:swap; }
@font-face { font-family:"Duel Serif"; src:url("../../graphic/fonts/NotoSerifJP.woff2") format("woff2"); font-weight:200 900; font-display:swap; }
#game-screen.duel {
  --duel-ink:#101c29; --duel-paper:#f2eee3; --duel-muted:#b4c4cd; --duel-line:#a59063;
  --felt:#193543; --felt-edge:#121c27; --accent:#e5bf80;
  display:block; padding:0; overflow:clip; color:var(--duel-paper); font-family:"Duel Sans","Yu Gothic",sans-serif;
  font-size:16px; font-weight:400; line-height:1.5; background:#0b1420;
}
#game-screen.duel::before { background-position:center; filter:brightness(.43) saturate(.55); }
#game-screen.duel::after { background:linear-gradient(90deg,#07132055,transparent 40%,#0b172844),linear-gradient(0deg,#080e19 0%,transparent 24%,#0b152329 70%,#0a122066),radial-gradient(ellipse at 46% 45%,#668fa21a,transparent 70%); }
.duel-heading,.duel-command-rail { display:none; }
#game-screen.duel .duel-heading { position:absolute; display:flex; align-items:center; gap:12px; left:994px; top:18px; z-index:8; pointer-events:none; font:600 21px/1.2 "Duel Serif","Yu Mincho",serif; letter-spacing:.08em; }
#game-screen.duel .duel-heading small { display:none; }
#game-screen.duel .duel-seal { display:grid; place-items:center; width:28px; height:32px; font-size:17px; color:#e4c28b; border:1px solid #a5906380; border-radius:2px; }
#game-screen.duel .table-wrap { position:absolute; left:16px; top:0; width:960px; height:720px; display:block; }
#game-screen.duel #table { display:block; position:absolute; inset:0; width:960px; height:720px; max-width:none; max-height:none; border:0; border-radius:0; }
#game-screen.duel .tp-frame { inset:-14px -14px 81px; border-radius:16px; background:linear-gradient(115deg,#657580 0%,#263440 3%,#0c1621 9%,#253541 49%,#101a25 92%,#596b79 98%); border:1px solid #8b8e83; box-shadow:0 14px 0 #0a1018,0 16px 0 #72766b,0 25px 0 #0b121b,0 34px 28px #0009,inset 0 0 0 4px #263240,inset 0 0 0 5px #a59063a0,inset 0 0 0 8px #111f2b; }
#game-screen.duel .tp-frame::after { content:""; position:absolute; inset:10px; border:1px solid #a5906380; border-radius:5px; pointer-events:none; }
#game-screen.duel .tp-felt { inset:0 0 95px; border-radius:6px; background:radial-gradient(ellipse at 48% 39%,#6c92994d,transparent 70%),linear-gradient(#193543e6,#112535ed),url("../../graphic/materials/Fabric034_Color.jpg") center / 420px repeat; box-shadow:inset 0 0 0 2px #0b1b28,inset 0 8px 20px #0009; }
#game-screen.duel .tp-felt::after { left:24px; top:24px; width:calc(100% - 48px); height:calc(100% - 48px); transform:none; border:1px solid #c3ab762b; border-radius:0; box-shadow:inset 0 0 0 5px #19303a,inset 0 0 0 6px #c3ab7620; }
#game-screen.duel .seat-art { mask-image:linear-gradient(#000 82%,transparent); -webkit-mask-image:linear-gradient(#000 82%,transparent); filter:none; }
#game-screen.duel .seat-bust { filter:drop-shadow(0 9px 13px #0008); }
#game-screen.duel .seat-bust.is-turn { filter:drop-shadow(0 0 7px color-mix(in srgb,var(--char-c) 50%,transparent)) drop-shadow(0 9px 13px #0008); }
#game-screen.duel .side { position:absolute; inset:0; width:auto; display:block; pointer-events:none; }
#game-screen.duel .hp-board { display:block; position:absolute; inset:0; z-index:10; pointer-events:none; }
#game-screen.duel .hp-row { position:absolute; width:236px; min-height:63px; padding:8px 12px 18px; gap:8px; border:0; border-radius:0; background:linear-gradient(105deg,#0b1528f5,#142532ef); box-shadow:inset 2px 0 #a59063,inset 0 -1px #a5906370,0 5px 14px #0005; pointer-events:auto; }
#game-screen.duel .hp-row::after { content:attr(data-state); position:absolute; right:12px; bottom:2px; color:#c5cfd0; font:500 12px/1.2 "Duel Sans",sans-serif; }
#game-screen.duel .hp-row[data-seat="0"] { left:24px; bottom:9px; width:278px; min-height:57px; padding-bottom:12px; }
#game-screen.duel .hp-row[data-seat="1"] { left:774px; top:128px; }
#game-screen.duel .hp-row[data-seat="2"] { left:392px; top:128px; }
#game-screen.duel .hp-row[data-seat="3"] { left:28px; top:128px; }
#game-screen.duel .hp-icon { display:none; }
#game-screen.duel .hp-rank { width:20px; height:28px; color:#d4c8ac; font:500 14px/1 "Duel Serif",serif; background:none; box-shadow:none; border-radius:0; border-right:1px solid #a5906350; }
#game-screen.duel .hp-head { gap:8px; align-items:baseline; }
#game-screen.duel .hp-main { gap:7px; }
#game-screen.duel .hp-rel { display:none; }
#game-screen.duel .hp-name { font-size:16px; font-weight:500; color:var(--duel-paper) !important; line-height:1.4; }
#game-screen.duel .hp-val { font-size:23px; font-weight:600; line-height:1; color:#f5eedb; font-variant-numeric:tabular-nums lining-nums; letter-spacing:0; }
#game-screen.duel .hp-gauge { height:4px; border:0; border-radius:0; background:#71899a30; }
#game-screen.duel .hp-fill.high { background:#91bcae; }
#game-screen.duel .hp-fill.mid { background:#dab575; }
#game-screen.duel .hp-fill.low { background:#f47e78; }
#game-screen.duel .hp-row.is-turn { box-shadow:inset 3px 0 #ef765f,inset 0 -1px #ef765f80,0 0 18px #f57b4a19; }
#game-screen.duel .hp-row.is-turn::before { content:"手番"; position:absolute; bottom:2px; left:12px; padding:0; color:#f5ba9d; font-size:12px; }
#game-screen.duel .hp-flavor { left:0; right:auto; top:calc(100% + 8px); transform:translateY(4px); border-radius:2px; background:#102232f5; color:#eee; }
#game-screen.duel .hp-row:hover .hp-flavor { transform:translateY(0); }
#game-screen.duel .hp-row.is-you .hp-flavor { top:auto; bottom:calc(100% + 10px); }
#game-screen.duel .hp-row .hp-delta { display:none; }
#game-screen.duel .hp-row:has(.hp-delta:not([hidden])) { width:260px; }
#game-screen.duel .hp-row:has(.hp-delta:not([hidden])) .hp-delta { display:block; position:absolute; bottom:1px; left:40px; font-size:12px; }
#game-screen.duel .self-stage { position:absolute; right:12px; bottom:142px; width:292px; height:360px; margin:0; overflow:visible; border:0; background:none; pointer-events:auto; }
#game-screen.duel .self-bustup { inset:-80px -20px -30px -24px; rotate:0deg; height:auto; clip-path:inset(0); pointer-events:none; }
#game-screen.duel .self-bustup .self-portrait { filter:drop-shadow(-8px 12px 12px #0008); }
#game-screen.duel .self-stage.ability-ready .self-bustup .self-portrait { animation:none; filter:drop-shadow(-3px 0 5px #f28b6838) drop-shadow(-8px 12px 12px #0008); }
#game-screen.duel .duel-companion-name { position:absolute; bottom:4px; left:10px; padding:4px 12px; font:600 21px/1.3 "Duel Serif","Yu Mincho",serif; color:#f0d5b1; border-left:2px solid #d98a69; background:linear-gradient(90deg,#172130ed,#17213000); }
#game-screen.duel .self-talk { left:8px; right:8px; bottom:43px; border:0; border-left:2px solid #bd9870; border-radius:0; background:#0e1929ed; padding:12px 14px; font:400 16px/1.65 "Duel Sans",sans-serif; letter-spacing:0; line-break:strict; word-break:normal; box-shadow:0 7px 18px #0004; }
#game-screen.duel .self-abilities { top:auto; bottom:-29px; left:10px; right:8px; }
#game-screen.duel .self-ability { border-radius:2px; font-size:14px; background:#152633e8; border-color:#65778380; }
#game-screen.duel .side-abilities { position:absolute; right:24px; bottom:18px; width:282px; margin:0; z-index:22; pointer-events:auto; }
#game-screen.duel .ability-bar { gap:8px; }
#game-screen.duel .ability-remain { color:#c9d3d7; font:400 14px/1.5 "Duel Sans",sans-serif; padding:0 2px; border:0; border-radius:0; background:none; text-align:left; }
#game-screen.duel .ability-bar .btn-ability { min-height:58px; padding:12px 16px; font:600 23px/1.35 "Duel Serif","Yu Mincho",serif; letter-spacing:.035em; color:#fff1db; border:1px solid #db957a; border-radius:2px; background:linear-gradient(115deg,#793d35,#3c2833); box-shadow:inset 0 0 0 3px #232332,inset 0 0 0 4px #c79b7760,0 4px 14px #0005; text-shadow:none; }
#game-screen.duel .ability-bar .btn-ability:enabled:hover { background:linear-gradient(115deg,#995040,#4e3037); border-color:#f4c39e; }
#game-screen.duel .ability-bar .btn-ability:disabled { opacity:.65; filter:saturate(.4); }
#game-screen.duel .ability-chip { border-radius:2px; padding:10px; font:500 16px/1.5 "Duel Sans",sans-serif; color:#e1e8e7; background:#142633ed; border:1px solid #647b8580; }
#game-screen.duel .ability-chip.active { border-color:#dd9372; background:#492d35; color:#fff0db; }
#game-screen.duel .duel-command-rail { display:block; position:absolute; z-index:5; left:0; right:0; bottom:0; height:66px; background:linear-gradient(180deg,#0c1729f5,#08121efc); border-top:1px solid #a5906366; box-shadow:0 -5px 18px #0004; }
#game-screen.duel .action-bar { left:310px; right:0; bottom:11px; max-width:630px; min-height:44px; gap:8px; align-items:center; z-index:23; }
#game-screen.duel .action-bar button { min-height:44px; min-width:84px; padding:8px 18px; border:1px solid #7a8a96; border-radius:2px; background:linear-gradient(#243846,#152534); box-shadow:inset 0 0 0 3px #111d2a; color:#f1ede2; font:600 18px/1.4 "Duel Serif",serif; letter-spacing:.04em; text-shadow:none; }
#game-screen.duel .action-bar .btn-tsumo,#game-screen.duel .action-bar .btn-ron { color:#fff1d0; border-color:#ecc184; background:#754230; }
#game-screen.duel .action-bar .btn-riichi { border-color:#cbaa74; color:#f4d7a6; }
#game-screen.duel .action-bar .btn-skip { color:#bdcbd4; border-color:#526875; }
#game-screen.duel .action-bar button:enabled:hover { background:#344b58; border-color:#ead4a5; }
#game-screen.duel .discard-hint { width:auto; font:400 14px/1.5 "Duel Sans",sans-serif; color:#c1d1d8; padding:0 6px; text-align:right; white-space:normal; }
#game-screen.duel .nonaki-btn,#game-screen.duel .settings-btn { top:18px; left:auto; right:0; height:34px; min-width:0; padding:5px 12px; border:1px solid #81909b66; border-radius:2px; background:#0c1b2bd9; box-shadow:none; color:#dbe3e3; text-shadow:none; font:500 14px/1.4 "Duel Sans",sans-serif; }
#game-screen.duel .nonaki-btn { left:1108px; right:auto; top:66px; width:140px; }
#game-screen.duel .auto-btn { left:968px; width:132px; }
#game-screen.duel .settings-btn { left:1196px; right:auto; width:44px; }
#game-screen.duel .nonaki-btn .tg-label { font-size:14px; white-space:nowrap; flex-shrink:0; }
#game-screen.duel .nonaki-btn::before,#game-screen.duel .nonaki-btn::after { display:none; }
#game-screen.duel .nonaki-btn.on { border-color:#d8b578; color:#ffe0ac; background:#3f352d; }
#game-screen.duel button:focus-visible { outline:2px solid #e6d29f; outline-offset:4px; }
#game-screen.duel .settings-panel { right:-280px; top:58px; background:#111f30f7; color:#f0eee7; border-color:#87918b; border-radius:4px; z-index:50; font-family:"Duel Sans",sans-serif; }
#game-screen.duel .model-advice { top:65px; left:285px; }
#game-screen.duel .field-aura { top:66px; right:0; }
#game-screen.duel .ability-aura { bottom:164px; left:24px; }
#game-screen.duel .aura-panel { border-radius:3px; }
#game-screen.duel .banner { font-family:"Duel Serif",serif; }
#game-screen.duel-powered .tp-frame { box-shadow:0 14px 0 #0a1018,0 16px 0 #b38b6a,0 25px 0 #0b121b,0 34px 28px #0009,inset 0 0 0 4px #263240,inset 0 0 0 5px #d78567,inset 0 0 24px #ea80522b; }
/* Team/pair modes keep their roster controls and reserve the right column. */
#game-screen.duel.duel-group .hp-board { inset:112px 18px auto auto; width:282px; display:flex; flex-direction:column; gap:8px; max-height:480px; overflow-y:auto; scrollbar-width:thin; scrollbar-color:#667e89 #142634; pointer-events:auto; }
#game-screen.duel.duel-group .hp-board.pair-battle { max-height:334px; }
#game-screen.duel.duel-group .self-stage { display:none; }
#game-screen.duel.duel-group .side-abilities { bottom:20px; }
#game-screen.duel .tb-block { flex-shrink:0; border-radius:2px; border-color:#72838b60; background:#101f2ded; }
#game-screen.duel .tb-block.my-team { border-color:#b89867; box-shadow:none; }
#game-screen.duel .tb-header { padding:6px 10px; font-size:14px; font-weight:500; color:#c5d1d7; background:#24354370; }
#game-screen.duel .my-team .tb-header { color:#ebd0a1; }
#game-screen.duel .tb-total { font-size:18px; font-weight:600; }
#game-screen.duel .tb-active { background:none; padding:7px 10px; }
#game-screen.duel .tb-name { color:#f2eee3 !important; font-size:14px; font-weight:500; line-height:1.4; }
#game-screen.duel .tb-hp { font-size:16px; font-weight:600; }
#game-screen.duel .tb-talk { padding:8px 10px; font-size:14px; line-height:1.6; border-radius:2px; background:#1c3040; border-color:#a5906366; }
#game-screen.duel .tb-talk::before { display:none; }
#game-screen.duel .tb-bench-val { color:#bfcbd2; font-size:12px; font-weight:500; }
#game-screen.duel .tb-bench-bar { border-radius:0; }
#game-screen.duel .pair-cmd { border-radius:2px; border-color:#a5906366; background:#112333ed; padding:10px; }
#game-screen.duel .pair-cmd-toggle { min-height:38px; border-radius:2px; font:500 14px/1.5 "Duel Sans",sans-serif; }
#game-screen.duel .pair-cmd-toggle.on { background:#264d50; border-color:#8bb7b1; }
#game-screen.duel .pb-wp-head,#game-screen.duel .pb-wp-toggle { font-size:14px; border-radius:2px; }
#game-screen.duel .tb-passive { border-radius:2px; background:#1c3540; }
#game-screen.duel .hp-board.futari .opp-bustup { display:none; }
#game-screen.duel .side.side-result { left:980px; right:16px; top:12px; bottom:12px; display:flex; }
#game-screen.duel .side.side-result > #hp-board,#game-screen.duel .side.side-result > #self-stage,#game-screen.duel .side.side-result > .side-abilities { display:none; }
#game-screen.duel .side.side-result .speaker { pointer-events:auto; }
@media(prefers-reduced-motion:reduce) {
  #game-screen.duel *,#game-screen.duel *::before,#game-screen.duel *::after { animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
}
