/* Light-theme Janggi room: traditional wooden table, hanji and carved pieces.
   The existing board geometry, rules, 3D scene and dark mode remain untouched. */
html[data-theme="light"] body.standalone-hub-page-janggi {
  --deep:#294536;--green:#2d5a43;--ink:#352e24;--muted:#675d4b;
  --line:#bea67f;--gold:#ac8243;--paper:#f5e8cd;--red:#9e4136;
  color:var(--ink);min-height:100vh;
  background:
    radial-gradient(ellipse 74% 29% at 50% 0%,#fff6e5b8,transparent 87%),
    repeating-linear-gradient(90deg,transparent 0 75px,#60422708 76px 77px,transparent 78px 152px),
    linear-gradient(180deg,#cfb48c,#ebddc1 320px,#d9c2a0);
}
html[data-theme="light"] body.standalone-hub-page-janggi .layout {max-width:1260px;padding:25px 22px 48px}
html[data-theme="light"] body.standalone-hub-page-janggi .intro {
  position:relative;isolation:isolate;overflow:hidden;min-height:166px;
  margin-bottom:23px;padding:24px 37px;
  border:1px solid #a78b60;border-left:8px solid #704a2e;border-right:8px solid #704a2e;
  border-radius:3px;
  background:radial-gradient(ellipse at 24% 0%,#fffbef,transparent 69%),
    repeating-linear-gradient(0deg,transparent 0 7px,#936e4807 8px 9px),
    linear-gradient(115deg,#f8edda,#e7d4ae);
  box-shadow:inset 0 0 0 4px #fcf2de,0 5px 0 #72503640,0 13px 22px #51352129;
}
html[data-theme="light"] body.standalone-hub-page-janggi .intro::before {
  content:"";position:absolute;inset:0 0 0 auto;width:38%;z-index:-1;pointer-events:none;opacity:.23;
  background:linear-gradient(45deg,transparent 47%,#8a6c48 48% 51%,transparent 52%) 0 0/56px 56px,
    linear-gradient(-45deg,transparent 47%,#8a6c48 48% 51%,transparent 52%) 0 0/56px 56px;
  mask-image:linear-gradient(90deg,transparent,#000 64%);
}
html[data-theme="light"] body.standalone-hub-page-janggi .kicker {color:#7e562f}
html[data-theme="light"] body.standalone-hub-page-janggi .intro h1 {
  color:#304535;font-family:"Iowan Old Style","AppleMyungjo","Batang",serif;font-size:clamp(30px,4vw,49px);
  text-shadow:0 1px #fff8e8;
}
html[data-theme="light"] body.standalone-hub-page-janggi .intro h1 em {color:#994a32}
html[data-theme="light"] body.standalone-hub-page-janggi .intro-main>p:last-child {color:#5d574c;line-height:1.8}
html[data-theme="light"] body.standalone-hub-page-janggi .intro-mark {
  display:flex;align-items:center;justify-content:center;position:relative;
  min-width:192px;min-height:110px;color:#304936;font-family:"AppleMyungjo","Batang",serif;
  filter:none;text-shadow:1px 2px #fff9e8;
}
html[data-theme="light"] body.standalone-hub-page-janggi .intro-mark::before {
  content:"";position:absolute;inset:6px 0;border-block:1px solid #926c4170;pointer-events:none;
}
html[data-theme="light"] body.standalone-hub-page-janggi .intro-mark span {color:#963e32}
/* One tactile desk surface: wooden board in the center, paper score-sheets beside it. */
html[data-theme="light"] body.standalone-hub-page-janggi .game-layout {
  grid-template-columns:minmax(0,725px) minmax(290px,1fr);
  gap:23px;padding:20px;border:1px solid #664329;border-radius:4px;
  background:repeating-linear-gradient(92deg,transparent 0 38px,#633e1a0d 40px,#fce3ad13 42px,transparent 45px 95px),
    linear-gradient(108deg,#997045,#bb9565 40%,#9e764a);
  box-shadow:inset 0 2px 0 #edc58c70,inset 0 0 0 5px #77523383,
    0 5px 0 #704929,0 18px 30px #4d362936;
}
html[data-theme="light"] body.standalone-hub-page-janggi .game-column {filter:none}
html[data-theme="light"] body.standalone-hub-page-janggi .player-bar {
  min-height:66px;padding:9px 15px;border-color:#997b51;border-radius:3px 3px 0 0;
  background:linear-gradient(110deg,#f9edd1,#e9d5a9);
  box-shadow:inset 0 0 0 3px #fff9e64d;
}
html[data-theme="light"] body.standalone-hub-page-janggi .player-bar.han {border-left:5px solid #9b3c34}
html[data-theme="light"] body.standalone-hub-page-janggi .player-bar.cho {
  border-left:5px solid #28634b;border-radius:0 0 3px 3px;
}
html[data-theme="light"] body.standalone-hub-page-janggi .player-bar.active {
  background:linear-gradient(110deg,#fff5d9,#f0deaf);
  border-top-color:#a98a58;border-right-color:#a98a58;border-bottom-color:#a98a58;
  box-shadow:inset 0 0 0 2px #faf0d0,0 0 0 2px #edd4a370;
}
html[data-theme="light"] body.standalone-hub-page-janggi .player-bar strong {color:#352d22}
html[data-theme="light"] body.standalone-hub-page-janggi .player-bar :is(small,.material) {color:#68563d}
html[data-theme="light"] body.standalone-hub-page-janggi .board-shell {border-color:#653f22}
html[data-theme="light"] body.standalone-hub-page-janggi .under-board {
  margin-top:28px;margin-bottom:8px;color:#fff1d7;text-shadow:0 1px 2px #442b1e;
}
html[data-theme="light"] body.standalone-hub-page-janggi .legend-target {border-color:#d5ebc3}
html[data-theme="light"] body.standalone-hub-page-janggi .janggi-board-modes {background:#e7d2aa;border-color:#8d663c}
html[data-theme="light"] body.standalone-hub-page-janggi .janggi-board-modes button:not([aria-pressed="true"]) {color:#493927}
html[data-theme="light"] body.standalone-hub-page-janggi .janggi-board-modes button[aria-pressed="true"] {background:#304c3a;color:#fff4d5}
html[data-theme="light"] body.standalone-hub-page-janggi .janggi-facing-settings {background:#f2e0bc;border-color:#967648}
html[data-theme="light"] body.standalone-hub-page-janggi .janggi-3d-stage {
  background:radial-gradient(ellipse at 50% 36%,#75836c,#405a49 80%);border-color:#bd9a64;
}
/* Hanji panels resemble a paper game record, not generic floating UI cards. */
html[data-theme="light"] body.standalone-hub-page-janggi .sidebar {gap:14px}
html[data-theme="light"] body.standalone-hub-page-janggi .panel {
  padding:21px;position:relative;color:#392f23;border-radius:3px;border:1px solid #b79b70;
  background:repeating-linear-gradient(0deg,transparent 0 29px,#a4896209 30px 31px),
    linear-gradient(160deg,#fff9ea,#eee0c3);
  box-shadow:inset 0 0 0 4px #fff6df8c,0 4px 0 #81613b4d,0 10px 16px #48341e31;
}
html[data-theme="light"] body.standalone-hub-page-janggi .panel h2 {
  color:#304536;font:700 21px/1.35 "AppleMyungjo","Batang",serif;
}
html[data-theme="light"] body.standalone-hub-page-janggi :is(
  .panel-note,.formation-help,.notice,.sound-footnote,.sound-credit,.status-heading>span
) {color:#665c4c}
html[data-theme="light"] body.standalone-hub-page-janggi .mode-switch {background:#e7d6b6;border-color:#c5a981}
html[data-theme="light"] body.standalone-hub-page-janggi .mode:not(.active) {color:#504330}
html[data-theme="light"] body.standalone-hub-page-janggi :is(.mode.active,.primary) {
  color:#fff7e5;background:linear-gradient(125deg,#315944,#213f31);border-color:#254636;
}
html[data-theme="light"] body.standalone-hub-page-janggi :is(.settings label,.formation) {color:#584f3c}
html[data-theme="light"] body.standalone-hub-page-janggi :is(.settings select,.formation select) {
  background-color:#fff9ea;color:#352d23;border-color:#bca17c;color-scheme:light;
}
html[data-theme="light"] body.standalone-hub-page-janggi :is(
  .actions button,.sound-button:not([aria-pressed="true"])
) {background:#f4e9d3;color:#4b3b2c;border-color:#bda17c}
html[data-theme="light"] body.standalone-hub-page-janggi .sound-button[aria-pressed="true"] {
  background:#deead6;color:#27523f;border-color:#8ca887;
}
html[data-theme="light"] body.standalone-hub-page-janggi .turn-label {
  border-radius:3px;color:#24543e;background:#e6ecd9;border-color:#9bae88;
}
html[data-theme="light"] body.standalone-hub-page-janggi .turn-label.check {color:#8f342e;background:#fae7d2;border-color:#d7a189}
html[data-theme="light"] body.standalone-hub-page-janggi .turn-label.end {color:#67491e;background:#f2e1bd;border-color:#caaf80}
html[data-theme="light"] body.standalone-hub-page-janggi .history {color:#5b5546;border-color:#cbb38b}
html[data-theme="light"] body.standalone-hub-page-janggi .rules summary {min-height:54px;color:#314232}
html[data-theme="light"] body.standalone-hub-page-janggi .rules-kicker {color:#855d30}
html[data-theme="light"] body.standalone-hub-page-janggi .rules-summary-sub {color:#6a5d4a}
html[data-theme="light"] body.standalone-hub-page-janggi .rules-toggle-mark {color:#855d30}
html[data-theme="light"] body.standalone-hub-page-janggi .rules-body {color:#574a39;border-top-color:#c8b185}
html[data-theme="light"] body.standalone-hub-page-janggi .rules-callout {background:#f6ebd4;border-color:#c6ad82;color:#463a2b}
html[data-theme="light"] body.standalone-hub-page-janggi .rules-callout strong {color:#28503c}
html[data-theme="light"] body.standalone-hub-page-janggi .rules-section {border-top-color:#cbb58c}
html[data-theme="light"] body.standalone-hub-page-janggi .rules-section-title {color:#28503c}
html[data-theme="light"] body.standalone-hub-page-janggi .rules-section-note {color:#6b5d49}
html[data-theme="light"] body.standalone-hub-page-janggi .rules-body dt {color:#315240}
html[data-theme="light"] body.standalone-hub-page-janggi .rules-piece-val {background:#eadbc0;border-color:#bfa478;color:#604420}
html[data-theme="light"] body.standalone-hub-page-janggi .rules-detail-list li {background:#fbf3e2;border-color:#ccb68e;color:#4b3e2f}
html[data-theme="light"] body.standalone-hub-page-janggi .rules-detail-list li strong {color:#28503c}
html[data-theme="light"] body.standalone-hub-page-janggi .rules-guide-chips li {background:#f9f0dc;border-color:#ccb68e;color:#4b3e2f}
html[data-theme="light"] body.standalone-hub-page-janggi .rules-guide-chips li b {color:#7a4b21}
html[data-theme="light"] body.standalone-hub-page-janggi .sound-emblem {background:#e4d2ab;border-color:#bea079;color:#795322}
html[data-theme="light"] body.standalone-hub-page-janggi footer {color:#584a39}
html[data-theme="light"] body.standalone-hub-page-janggi footer a {color:#255742}
/* Keep tappable board intersections large on mobile. */
@media(max-width:1060px) {
  html[data-theme="light"] body.standalone-hub-page-janggi .layout {padding-inline:14px}
  html[data-theme="light"] body.standalone-hub-page-janggi .game-layout {
    grid-template-columns:minmax(0,1fr) minmax(265px,.72fr);gap:16px;padding:15px;
  }
  html[data-theme="light"] body.standalone-hub-page-janggi .intro {padding:22px 24px}
}
@media(max-width:720px) {
  html[data-theme="light"] body.standalone-hub-page-janggi .layout {padding:14px 8px 32px}
  html[data-theme="light"] body.standalone-hub-page-janggi .intro {
    min-height:0;margin:0 4px 14px;padding:19px;border-left-width:5px;border-right-width:5px;
  }
  html[data-theme="light"] body.standalone-hub-page-janggi .intro h1 {font-size:29px}
  html[data-theme="light"] body.standalone-hub-page-janggi .intro-mark {display:none}
  html[data-theme="light"] body.standalone-hub-page-janggi .game-layout {
    display:block;padding:7px 5px 13px;
    box-shadow:inset 0 1px 0 #edc891,0 4px 0 #734a28,0 10px 15px #47332328;
  }
  html[data-theme="light"] body.standalone-hub-page-janggi .player-bar {min-height:60px;padding:8px 10px}
  html[data-theme="light"] body.standalone-hub-page-janggi .board-shell {padding:7px}
  html[data-theme="light"] body.standalone-hub-page-janggi .sidebar {margin:22px 3px 0}
  html[data-theme="light"] body.standalone-hub-page-janggi .panel {padding:18px}
  html[data-theme="light"] body.standalone-hub-page-janggi .rules {padding:0}
  html[data-theme="light"] body.standalone-hub-page-janggi .rules summary {padding:18px}
  html[data-theme="light"] body.standalone-hub-page-janggi .rules-body {padding:0 18px 18px}
}
@media(max-width:390px) {
  html[data-theme="light"] body.standalone-hub-page-janggi .layout {padding-inline:5px}
  html[data-theme="light"] body.standalone-hub-page-janggi .intro {margin-inline:3px;padding:16px}
  html[data-theme="light"] body.standalone-hub-page-janggi .game-layout {padding-inline:3px}
  html[data-theme="light"] body.standalone-hub-page-janggi .board-shell {padding:4px}
  html[data-theme="light"] body.standalone-hub-page-janggi .panel {padding:15px}
  html[data-theme="light"] body.standalone-hub-page-janggi .rules {padding:0}
}
