/* Hwatu Seotda only. Materials change with the common theme; game pieces and logic do not. */
html[data-theme] body.dice-standalone[data-local-game="hwatu"] {
  --hw-bg:#171b17;--hw-ink:#f4e9cf;--hw-muted:#d2bea0;--hw-subtle:#bba588;
  --hw-panel:#382a20;--hw-paper:#302820;--hw-raised:#413328;
  --hw-edge:#806044;--hw-edge-soft:#624d38;--hw-gold:#e4b56e;
  --hw-red:#ee7867;--hw-action:#b9302a;--hw-action-hover:#d13d32;
  --hw-second:#49372b;--hw-felt:#213f32;--hw-felt-edge:#775435;
  --hw-shadow:rgba(8,7,5,.45);color:var(--hw-ink);color-scheme:dark;
  background:radial-gradient(ellipse at 55% -18%,rgba(126,81,43,.30),transparent 56%),
    repeating-linear-gradient(94deg,rgba(255,246,215,.013) 0 1px,transparent 1px 11px),var(--hw-bg);
}
html[data-theme="light"] body.dice-standalone[data-local-game="hwatu"] {
  --hw-bg:#eee1ca;--hw-ink:#382a20;--hw-muted:#604734;--hw-subtle:#765b43;
  --hw-panel:#dfc5a0;--hw-paper:#fff9ed;--hw-raised:#f5ebd6;
  --hw-edge:#af865a;--hw-edge-soft:#dbc5a4;--hw-gold:#785020;
  --hw-red:#aa2b25;--hw-action:#a92b24;--hw-action-hover:#87211b;
  --hw-second:#eddfc5;--hw-felt:#325143;--hw-felt-edge:#946d46;
  --hw-shadow:rgba(72,43,18,.16);color:var(--hw-ink);color-scheme:light;
  background:radial-gradient(ellipse at 55% -17%,rgba(255,251,231,.96),transparent 58%),
    repeating-linear-gradient(98deg,rgba(91,56,29,.018) 0 1px,transparent 1px 9px),var(--hw-bg);
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] .local-page {max-width:1060px;}
/* Hero: a wood table with the actual locally hosted Hwatu card artwork. */
html[data-theme] body.dice-standalone[data-local-game="hwatu"] .local-hero {
  position:relative;isolation:isolate;min-height:248px;padding:24px 33px 35px;
  margin:10px 0 8px;gap:28px;border:1px solid var(--hw-edge);border-radius:20px;
  background:linear-gradient(125deg,rgba(255,242,202,.09),transparent 60%),
    repeating-linear-gradient(91deg,rgba(255,235,194,.026) 0 2px,transparent 2px 19px),
    linear-gradient(135deg,#483429,#231d19);
  box-shadow:inset 0 1px rgba(255,238,200,.20),0 16px 34px var(--hw-shadow);
}
html[data-theme="light"] body.dice-standalone[data-local-game="hwatu"] .local-hero {
  background:linear-gradient(115deg,rgba(255,252,235,.64),transparent 62%),
    repeating-linear-gradient(91deg,rgba(89,51,23,.042) 0 2px,transparent 2px 23px),
    linear-gradient(125deg,#e8cca7,#c99e69);
  box-shadow:inset 0 1px #fff5dc,0 14px 34px var(--hw-shadow);
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] .local-hero > div:first-child {position:relative;z-index:1;}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] .local-overline {color:var(--hw-gold);letter-spacing:.035em;}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] .local-hero h1 {
  color:var(--hw-ink);font-size:clamp(33px,4.7vw,52px);font-weight:850;letter-spacing:-.065em;
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] .local-hero p {color:var(--hw-muted);max-width:625px;}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] .local-tags span {
  color:#f4e4ca;background:rgba(40,29,20,.25);border-color:rgba(241,209,155,.46);
}
html[data-theme="light"] body.dice-standalone[data-local-game="hwatu"] .local-tags span {
  background:rgba(255,249,229,.66);border-color:#ac8554;color:#503824;
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] .local-hero-art {
  position:relative;display:block;flex:0 0 227px;width:227px;height:187px;
  border:0;border-radius:0;background:none;box-shadow:none;transform:none;
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] .local-hero-art::before {
  content:"";position:absolute;inset:35px 0 0;border-radius:50%;
  background:radial-gradient(ellipse at 50% 50%,rgba(13,27,18,.5),transparent 68%);
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] .hwatu-hero-card {
  position:absolute;display:block;width:81px;height:128px;border:4px solid #b41d22;border-radius:7px;
  background:#bc1e24 no-repeat;box-shadow:0 5px 0 #651514,0 12px 18px rgba(15,8,4,.35);
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] .hwatu-hero-card--back {
  left:20px;top:32px;transform:rotate(-22deg);
  background-image:url("../assets/cards/hwatu-back.jpg");background-size:cover;background-position:center;
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] .hwatu-hero-card--first {
  left:76px;top:16px;transform:rotate(-3deg);
  background-image:url("../assets/cards/hwatu-sheet.webp");
  background-size:961.54% 654.65%;background-position:.67% .42%;
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] .hwatu-hero-card--second {
  left:134px;top:37px;transform:rotate(18deg);
  background-image:url("../assets/cards/hwatu-sheet.webp");
  background-size:943.4% 654.65%;background-position:14.77% .42%;
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] .local-hero-art small {
  position:absolute;right:6px;bottom:0;color:#ead2a6;font:850 9px/1.5 system-ui,sans-serif;
  letter-spacing:.12em;text-shadow:0 1px 3px #1f160e;
}
html[data-theme="light"] body.dice-standalone[data-local-game="hwatu"] .local-hero-art small {color:#51351f;text-shadow:none;}
/* Wood rim, paper interior and vermilion selection/action cues. */
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal.local-play {
  border:5px solid var(--hw-edge);border-radius:20px;background:var(--hw-panel);
  box-shadow:0 18px 42px var(--hw-shadow),inset 0 1px rgba(255,255,255,.24);color:var(--hw-ink);
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-panel {background:var(--hw-paper);}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] .local-play-heading {
  background:repeating-linear-gradient(93deg,rgba(255,235,189,.032) 0 1px,transparent 1px 13px),var(--hw-panel);
  border-color:var(--hw-edge-soft);color:var(--hw-ink);
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] .local-play-heading h2 {color:var(--hw-ink);}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-content {
  background:repeating-linear-gradient(0deg,transparent 0 28px,rgba(87,57,23,.012) 28px 29px),var(--hw-paper);
  color:var(--hw-ink);
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal :is(.dice-intro,.dice-hint,#dice-rule-description) {color:var(--hw-muted);}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-play-modes {
  max-width:none;border:1px solid var(--hw-edge-soft);background:var(--hw-raised);color:var(--hw-ink);
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-play-modes .is-current {
  background:var(--hw-action);color:#fff9ec;border-radius:6px;
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-play-modes a {
  background:var(--hw-paper);border:1px solid var(--hw-edge-soft);border-radius:6px;
  color:var(--hw-ink);
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-play-modes a:hover {
  background:var(--hw-second);border-color:var(--hw-gold);
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-field {background:transparent;color:var(--hw-ink);}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal :is(.dice-field label,.dice-names-title,#dice-results-title) {color:var(--hw-ink);}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal :is(select,input) {
  border-color:var(--hw-edge-soft);background:var(--hw-raised);color:var(--hw-ink);color-scheme:inherit;
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-card-guide {
  border:1px solid var(--hw-edge-soft);border-left:4px solid var(--hw-red);
  border-radius:9px;background:var(--hw-raised);color:var(--hw-ink);
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-card-guide p {color:var(--hw-muted);}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-name-field {
  min-height:50px;border:1px solid var(--hw-edge-soft);border-radius:9px;background:var(--hw-raised);
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-name-field :is(.dice-name-number,.dice-player-number,.ug-participant-number) {
  color:var(--hw-red);font-weight:800;
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-name-field input {
  background:transparent!important;color:var(--hw-ink)!important;
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-name-field input::placeholder {color:var(--hw-subtle)!important;}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal :is(.dice-name-field:focus-within,select:focus-visible,input:focus-visible) {
  border-color:var(--hw-red);outline-color:var(--hw-red);
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-actions {
  border-color:var(--hw-edge-soft);background:var(--hw-raised);color:var(--hw-ink);
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-actions :is(.btn-primary,.ug-result-replay) {
  background:var(--hw-action);border:1px solid var(--hw-action);color:#fff9ec;box-shadow:0 3px 0 rgba(65,23,15,.22);
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-actions :is(.btn-primary,.ug-result-replay):hover:not(:disabled) {
  background:var(--hw-action-hover);border-color:var(--hw-action-hover);
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-actions :is(.btn-secondary,.ug-result-edit,.ug-result-home,.ug-copy-result-button) {
  background:var(--hw-second)!important;border:1px solid var(--hw-edge)!important;color:var(--hw-ink)!important;
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-actions :is(.dice-hint,.ug-copy-result-status) {color:var(--hw-muted)!important;}
/* Keep the existing Hwatu faces and flip animations. Felt stays dark in both modes. */
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-roll-stage {
  border:7px solid var(--hw-felt-edge);border-radius:17px;
  background:radial-gradient(ellipse at 50% 28%,rgba(128,178,136,.18),transparent 68%),
    repeating-linear-gradient(40deg,rgba(255,255,255,.014) 0 1px,transparent 1px 5px),var(--hw-felt);
  box-shadow:inset 0 0 0 2px rgba(239,206,133,.23),inset 0 12px 32px rgba(0,0,0,.19);
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal #dice-outcome {background:transparent;color:var(--hw-ink);}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal :is(#dice-round,#dice-status,#dice-result-rule,#dice-result-hint) {color:var(--hw-muted);}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-local-badge {
  border:1px solid var(--hw-edge-soft);background:var(--hw-raised);color:var(--hw-ink);
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-result {
  border:1px solid var(--hw-edge-soft);border-radius:11px;background:var(--hw-raised);color:var(--hw-ink);
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-result.is-winner {
  border:2px solid var(--hw-red);background:var(--hw-raised);
  box-shadow:inset 4px 0 var(--hw-red),0 4px 14px rgba(132,45,23,.13);
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal :is(.dice-result-rank,.dice-result-name) {color:var(--hw-ink);}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-result-score {color:var(--hw-red);font-weight:850;}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-winner-badge {
  border-color:var(--hw-red);background:var(--hw-action);color:#fff9ec;
}
/* Rules and related games read like adjacent sheets rather than a SaaS tile kit. */
html[data-theme] body.dice-standalone[data-local-game="hwatu"] :is(.local-guide,.seo-related-games) {
  border:1px solid var(--hw-edge-soft);border-radius:14px;background:var(--hw-paper);
  color:var(--hw-ink);box-shadow:0 5px 18px var(--hw-shadow);
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] :is(.local-guide h2,.seo-related-copy h2,.seo-related-links strong) {color:var(--hw-ink);}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] :is(.local-guide p,.seo-related-copy p,.seo-related-links small,.local-footer,.hwatu-audio-credits) {color:var(--hw-muted);}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] .seo-related-links a {
  border:1px solid var(--hw-edge-soft);background:var(--hw-raised);color:var(--hw-ink)!important;
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] .seo-related-links a:hover {border-color:var(--hw-red);}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] .seo-related-icon {background:var(--hw-second);}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] .hwatu-audio-credits a {color:var(--hw-red);}
/* Same style continues inside the existing online room modal. */
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #partyModal .party-panel {
  background:var(--hw-paper);border:4px solid var(--hw-edge);color:var(--hw-ink);
  box-shadow:0 25px 70px rgba(0,0,0,.4);
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #partyModal .modal-header {
  background:var(--hw-panel);border-color:var(--hw-edge-soft);color:var(--hw-ink);
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #partyModal :is(
  .modal-header h2,.party-intro,.party-section-heading,.party-hint,.party-room-label,.party-field label
) {color:var(--hw-ink);}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #partyModal :is(input,select) {
  color:var(--hw-ink);border-color:var(--hw-edge);background:var(--hw-raised);color-scheme:inherit;
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #partyModal :is(
  .party-rules,.party-room-status,.party-room-top,.party-dice-area,#party-entry,.party-footer
) {border-color:var(--hw-edge-soft);color:var(--hw-ink);}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #partyModal .btn-primary {
  background:var(--hw-action);border-color:var(--hw-action);color:#fff9ec;
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #partyModal .btn-secondary {
  background:var(--hw-second);border-color:var(--hw-edge);color:var(--hw-ink);
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #partyModal .btn-secondary:hover {background:var(--hw-raised);}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #partyModal #party-close {
  border-color:var(--hw-edge);background:var(--hw-second);color:var(--hw-ink);
}
html[data-theme="light"] body.dice-standalone[data-local-game="hwatu"] #partyModal :is(
  .party-room-top,.party-room-status,.party-rules,.party-dice-area
) {background:var(--hw-raised);color:var(--hw-ink);}
@media (max-width:750px) {
  html[data-theme] body.dice-standalone[data-local-game="hwatu"] .local-hero {padding:22px 21px;min-height:210px;gap:10px;}
  html[data-theme] body.dice-standalone[data-local-game="hwatu"] .local-hero-art {flex-basis:155px;width:155px;height:151px;}
  html[data-theme] body.dice-standalone[data-local-game="hwatu"] .hwatu-hero-card {width:57px;height:90px;border-width:3px;}
  html[data-theme] body.dice-standalone[data-local-game="hwatu"] .hwatu-hero-card--back {left:8px;top:31px;}
  html[data-theme] body.dice-standalone[data-local-game="hwatu"] .hwatu-hero-card--first {left:44px;top:20px;}
  html[data-theme] body.dice-standalone[data-local-game="hwatu"] .hwatu-hero-card--second {left:80px;top:34px;}
  html[data-theme] body.dice-standalone[data-local-game="hwatu"] .local-hero-art small {font-size:7px;}
}
@media (max-width:480px) {
  html[data-theme] body.dice-standalone[data-local-game="hwatu"] .local-hero {padding:21px 18px;margin-top:5px;min-height:0;}
  html[data-theme] body.dice-standalone[data-local-game="hwatu"] .local-hero-art {display:block;flex-basis:96px;width:96px;height:115px;}
  html[data-theme] body.dice-standalone[data-local-game="hwatu"] .hwatu-hero-card {width:42px;height:67px;border-width:2px;}
  html[data-theme] body.dice-standalone[data-local-game="hwatu"] .hwatu-hero-card--back {left:1px;top:22px;}
  html[data-theme] body.dice-standalone[data-local-game="hwatu"] .hwatu-hero-card--first {left:26px;top:12px;}
  html[data-theme] body.dice-standalone[data-local-game="hwatu"] .hwatu-hero-card--second {left:48px;top:24px;}
  html[data-theme] body.dice-standalone[data-local-game="hwatu"] .local-hero-art small {display:none;}
  html[data-theme] body.dice-standalone[data-local-game="hwatu"] .local-hero h1 {font-size:clamp(27px,8vw,36px);}
  html[data-theme] body.dice-standalone[data-local-game="hwatu"] .local-hero p {font-size:12px;}
  html[data-theme] body.dice-standalone[data-local-game="hwatu"] .local-tags {gap:5px;margin-top:12px;}
  html[data-theme] body.dice-standalone[data-local-game="hwatu"] .local-tags span {padding:4px 7px;font-size:10px;}
  html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal.local-play {border-width:3px;}
}

/* Shared header & menu retain their common structure, but match the Hwatu materials. */
html[data-theme] body.dice-standalone[data-local-game="hwatu"] {
  --header-bg:var(--hw-paper);--header-line:var(--hw-edge-soft);
  --header-text:var(--hw-ink);--header-muted:var(--hw-muted);--header-accent:var(--hw-red);
  --header-focus:var(--hw-red);--header-control:var(--hw-raised);
  --header-control-hover:var(--hw-second);--header-mark:var(--hw-raised);
  --header-mark-line:var(--hw-edge);--header-panel:var(--hw-paper);
  --header-shadow:0 3px 12px var(--hw-shadow);
  --menu-bg:var(--hw-paper);--menu-panel:var(--hw-paper-raised,var(--hw-raised));
  --menu-sidebar:var(--hw-panel);--menu-surface:var(--hw-raised);
  --menu-surface-hover:var(--hw-second);--menu-line:var(--hw-edge-soft);
  --menu-text:var(--hw-ink);--menu-muted:var(--hw-muted);
  --menu-accent:var(--hw-red);--menu-selected:var(--hw-second);--menu-focus:var(--hw-red);
}
/* Older light-only styles mark roster and action surfaces important.
   Replace only those surfaces, without changing shared participant behavior. */
html[data-theme="light"] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-name-field.ug-participant-row {
  background:var(--hw-raised)!important;border-color:var(--hw-edge-soft)!important;
}
html[data-theme="light"] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-name-field .ug-participant-number,
html[data-theme="light"] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-name-field .dice-name-number {
  color:var(--hw-red)!important;
}
html[data-theme="light"] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-actions,
html[data-theme="light"] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-actions.ug-results-actions {
  background:var(--hw-raised)!important;border-top-color:var(--hw-edge-soft)!important;
}
html[data-theme="light"] body.dice-standalone[data-local-game="hwatu"] :is(.local-guide,.seo-related-games) {
  background:var(--hw-paper)!important;border-color:var(--hw-edge-soft)!important;
}
html[data-theme="light"] body.dice-standalone[data-local-game="hwatu"] .seo-related-links a {
  background:var(--hw-raised)!important;border-color:var(--hw-edge-soft)!important;
}
html[data-theme="light"] body.dice-standalone[data-local-game="hwatu"] .seo-related-icon {background:var(--hw-second)!important;}
html[data-theme="light"] body.dice-standalone[data-local-game="hwatu"] :is(
  .seo-related-copy h2,.seo-related-links strong
) {color:var(--hw-ink)!important;}
html[data-theme="light"] body.dice-standalone[data-local-game="hwatu"] :is(
  .seo-related-copy p,.seo-related-links small
) {color:var(--hw-muted)!important;}

/* Match online room subpanels to the same Hwatu table, on both themes. */
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #partyModal :is(
  .party-rules,.party-room-status,.party-player,.party-result,.dice-card-guide
) {
  background:var(--hw-raised);border-color:var(--hw-edge-soft);color:var(--hw-ink);
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #partyModal :is(
  #party-room-code,#party-rules-summary,#party-status,.party-player-name
) {color:var(--hw-ink);}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #partyModal :is(
  .party-room-label,#party-round-label,.party-player-meta,.party-player-state,
  #party-connection,.party-result-rank,.party-hint,.party-intro
) {color:var(--hw-muted);}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #partyModal :is(
  .party-player.is-self,.party-result.is-winner
) {border-color:var(--hw-red);box-shadow:inset 3px 0 var(--hw-red);background:var(--hw-raised);}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #partyModal .party-result-score {color:var(--hw-red);}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #partyModal :is(
  #party-rule-controls,.party-footer,.party-join-row
) {border-color:var(--hw-edge-soft);}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #partyModal :is(
  .party-field label,.party-section-heading,#party-rule-controls legend
) {color:var(--hw-ink);}
html[data-theme="light"] body.dice-standalone[data-local-game="hwatu"] #partyModal :is(
  .party-panel,.modal-header,.party-rules,.party-room-status,.party-player,.party-result,.dice-card-guide
) {border-color:var(--hw-edge-soft);color:var(--hw-ink);}
html[data-theme="light"] body.dice-standalone[data-local-game="hwatu"] #partyModal .party-panel {background:var(--hw-paper);}
html[data-theme="light"] body.dice-standalone[data-local-game="hwatu"] #partyModal .modal-header {background:var(--hw-panel);}
html[data-theme="light"] body.dice-standalone[data-local-game="hwatu"] #partyModal :is(
  .party-rules,.party-room-status,.party-player,.party-result,.dice-card-guide
) {background:var(--hw-raised);}
html[data-theme="light"] body.dice-standalone[data-local-game="hwatu"] #partyModal :is(
  .party-player.is-self,.party-result.is-winner
) {border-color:var(--hw-red);background:var(--hw-raised);}
html[data-theme="light"] body.dice-standalone[data-local-game="hwatu"] #partyModal :is(
  #party-rules-summary,#party-room-code,#party-status,.party-player-name
) {color:var(--hw-ink);}
html[data-theme="light"] body.dice-standalone[data-local-game="hwatu"] #partyModal :is(
  .party-room-label,#party-round-label,.party-player-meta,.party-player-state,.party-result-rank
) {color:var(--hw-muted);}
html[data-theme="light"] body.dice-standalone[data-local-game="hwatu"] #partyModal .party-result-score {color:var(--hw-red);}

/* Enhanced Seotda setup bar, 2-column mobile roster, and green felt card-mat result trays */
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-settings {
  grid-template-columns: minmax(220px, 340px);
  padding: 14px 16px;
  border: 1px solid var(--hw-edge-soft);
  border-radius: 12px;
  background: var(--hw-raised);
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-settings select {
  background: var(--hw-paper);
  font-weight: 750;
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal #dice-rule-description {
  margin-top: 10px;
  padding: 9px 13px;
  border-left: 3px solid var(--hw-gold);
  border-radius: 0 9px 9px 0;
  background: var(--hw-raised);
  font-size: 12px;
  font-weight: 600;
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-card-guide summary {
  font-weight: 800;
  color: var(--hw-ink);
  gap: 8px;
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-card-guide summary::before {
  content: '🎴';
  font-size: 15px;
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-name-field {
  padding: 0 10px;
  gap: 8px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-name-field :is(.dice-name-number, .dice-player-number, .ug-participant-number) {
  display: inline-grid;
  place-items: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(185, 48, 42, 0.14);
  border: 1px solid rgba(185, 48, 42, 0.36);
  font-size: 11px;
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-result.is-hwatu {
  align-items: center;
  padding: 14px;
  border-radius: 14px;
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-result.is-hwatu .dice-result-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 44px;
  height: 30px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--hw-paper);
  border: 1px solid var(--hw-edge-soft);
  font-size: 12px;
  font-weight: 850;
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-result.is-hwatu.is-winner .dice-result-rank {
  background: var(--hw-action);
  border-color: var(--hw-gold);
  color: #fff9ec;
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-result.is-hwatu .dice-result-score {
  display: inline-flex;
  align-items: center;
  padding: 3px 11px;
  border-radius: 999px;
  background: var(--hw-paper);
  border: 1px solid var(--hw-edge-soft);
  font-size: 14px;
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-result.is-hwatu.is-winner .dice-result-score {
  background: rgba(185, 48, 42, 0.14);
  border-color: var(--hw-red);
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-result.is-hwatu .dice-faces {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 3px solid var(--hw-felt-edge);
  background:
    radial-gradient(ellipse at 50% 32%, rgba(128, 178, 136, 0.22), transparent 70%),
    repeating-linear-gradient(40deg, rgba(255, 255, 255, 0.014) 0 1px, transparent 1px 5px),
    var(--hw-felt);
  box-shadow: inset 0 0 0 1px rgba(239, 206, 133, 0.24), inset 0 6px 16px rgba(0, 0, 0, 0.28);
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-result.is-hwatu.is-winner .dice-faces {
  border-color: var(--hw-gold);
  box-shadow: inset 0 0 0 1px rgba(255, 224, 148, 0.45), inset 0 6px 18px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.18);
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-result.is-hwatu .dice-faces .game-card:first-child:not(.is-dealing):not(.is-revealed) {
  transform: rotate(-4deg) translateY(1px);
}
html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-result.is-hwatu .dice-faces .game-card:last-child:not(:first-child):not(.is-dealing):not(.is-revealed) {
  transform: rotate(5deg) translateY(1px);
}
@media (max-width: 480px) {
  html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-settings {
    grid-template-columns: minmax(0, 1fr);
    padding: 12px;
  }
  html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-names {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px;
  }
  html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-name-field {
    min-height: 44px;
    padding: 0 8px;
    gap: 6px;
  }
  html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-name-field input {
    min-height: 40px;
    font-size: 14px;
  }
}
@media (max-width: 340px) {
  html[data-theme] body.dice-standalone[data-local-game="hwatu"] #diceModal .dice-names {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}
