body{
  overflow:hidden;
  color:#f7e8c1;
  background:#02070d;
}
body:before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-3;
  background:
    radial-gradient(circle at 50% 34%,#0d2940 0,#061624 35%,#02070d 72%);
}
body:after{
  content:"";
  position:fixed;
  inset:0;
  z-index:-2;
  pointer-events:none;
  opacity:.55;
  background:
    radial-gradient(ellipse at 5% 80%,transparent 0 25%,#9a671c22 25.2% 25.5%,transparent 25.7%),
    radial-gradient(ellipse at 95% 80%,transparent 0 25%,#9a671c22 25.2% 25.5%,transparent 25.7%);
}
.app{
  height:100dvh;
  width:min(1160px,100%);
  margin:auto;
  padding:
    max(8px,env(safe-area-inset-top))
    clamp(10px,1.8vw,20px)
    max(10px,env(safe-area-inset-bottom));
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto auto;
  gap:clamp(5px,1vh,10px);
}
.topbar{
  min-height:34px;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
}
.profile-link{
  min-height:31px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:6px 10px;
  border:1px solid #a87322;
  border-radius:8px;
  background:#07131e;
  color:#f4cd73;
  text-decoration:none;
  font-size:12px;
  font-weight:700;
  box-shadow:0 4px 15px #0008;
  white-space:nowrap;
}
.profile-link:hover{filter:brightness(1.08)}
.profile-link:active{transform:translateY(1px)}
.profile-icon{font-size:14px;line-height:1}
.profile-label{
  max-width:180px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.language{
  background:#07131e;
  color:#f4cd73;
  border:1px solid #a87322;
  border-radius:8px;
  padding:7px 10px;
  font-size:12px;
  cursor:pointer;
  outline:none;
  box-shadow:0 4px 15px #0008;
}
.hero{
  min-height:0;
  position:relative;
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;
  justify-items:center;
  align-items:center;
}
.brand{
  z-index:4;
  text-align:center;
  white-space:nowrap;
}
.brand .crown{
  display:block;
  height:26px;
  font-size:31px;
  color:#f4cd73;
  line-height:22px;
}
.brand h1{
  margin:0;
  font-family:Georgia,serif;
  font-size:clamp(34px,5.4vh,58px);
  letter-spacing:4px;
  color:#f4cd73;
  text-shadow:0 3px 10px #000;
}
.brand p{
  margin:4px 0 0;
  font-size:clamp(10px,1.5vh,13px);
  letter-spacing:5px;
  color:#dcae4f;
  font-weight:700;
}
.brand p:before,.brand p:after{
  content:"◆";
  font-size:7px;
  margin:0 12px;
  color:#dcae4f;
}
.board-shell{
  align-self:center;
  width:min(43vh,470px,70vw);
  aspect-ratio:1;
  padding:5px;
  border:1px solid #c18a36;
  border-radius:16px;
  background:#0b1722;
  box-shadow:0 20px 60px #000a;
  opacity:.68;
  filter:saturate(1.02);
  transform:perspective(900px) rotateX(3deg);
  mask-image:linear-gradient(to bottom,transparent 0,#000 2%,#000 98%,transparent 100%);
  -webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 2%,#000 98%,transparent 100%);
}
.board-watermark{
  width:100%;
  height:100%;
  display:grid;
  grid-template-columns:repeat(8,1fr);
  grid-template-rows:repeat(8,1fr);
  border:1px solid #d19a42;
  border-radius:6px;
  overflow:hidden;
  box-shadow:inset 0 0 0 1px #ffffff12;
}
.sq{display:flex;align-items:center;justify-content:center;position:relative}
.sq.light{background:#f0d8a4}
.sq.dark{background:#9b7248}
.sq img{
  width:96%;
  height:96%;
  object-fit:contain;
  display:block;
  z-index:2;
  filter:drop-shadow(0 5px 4px #000a);
  pointer-events:none;
}
.stats{
  z-index:4;
  display:flex;
  justify-content:center;
  align-items:center;
  gap:clamp(18px,4vw,44px);
  color:#d8c69f;
  font-size:clamp(12px,1.8vh,16px);
  white-space:nowrap;
}
.stat{display:flex;align-items:center;gap:8px}
.stat strong{color:#f4cd73;font-size:1.18em}
.stat-icon{color:#dcae4f}
.menu{
  width:min(760px,100%);
  margin:auto;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:clamp(7px,1.1vh,11px) clamp(8px,1.2vw,14px);
}
.legal-footer{
  min-height:14px;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  gap:2px 7px;
  text-align:center;
}
.legal-footer a{
  color:#bda97d;
  font-size:10px;
  line-height:1.2;
  text-decoration:none;
}
.legal-footer a:hover{
  color:#f4cd73;
  text-decoration:underline;
}
.legal-footer a:focus-visible{
  outline:2px solid #2b86ff;
  outline-offset:2px;
  border-radius:3px;
}
.menu-btn{
  text-decoration:none;
  min-height:clamp(48px,6.7vh,66px);
  border:1px solid #a87322;
  border-radius:12px;
  background:linear-gradient(90deg,#07131e,#0b1925);
  color:#f7e8c1;
  display:flex;
  align-items:center;
  gap:clamp(9px,1.2vw,13px);
  padding:clamp(7px,1vh,11px) clamp(11px,1.5vw,16px);
  box-shadow:0 7px 18px #0007,inset 0 1px #ffffff0a;
  font-size:clamp(14px,2vh,19px);
  font-weight:700;
  text-align:left;
  cursor:default;
  user-select:none;
}
a.menu-btn{cursor:pointer}
a.menu-btn:hover{filter:brightness(1.08)}
a.menu-btn:active{transform:translateY(1px)}
.menu-btn.primary{
  border-color:#2b86ff;
  background:linear-gradient(#1467d8,#0750b4);
  box-shadow:0 5px 15px #003c9970;
}
.menu-btn.alt{
  background:linear-gradient(90deg,#091722,#0d2433);
  border-color:#8d641e;
}
.menu-icon{
  width:clamp(34px,4.7vh,42px);
  height:clamp(34px,4.7vh,42px);
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid #bd8129;
  border-radius:10px;
  background:#07111a;
  color:#f4cd73;
  font-size:clamp(18px,2.8vh,25px);
}
.menu-btn.primary .menu-icon{
  border-color:#ffffff55;
  color:#fff;
  background:#06131e88;
}
.menu-text{min-width:0;line-height:1.08}
.badge{
  margin-left:auto;
  color:#7f96a6;
  font-size:10px;
  font-weight:700;
  white-space:nowrap;
}
#settingsButton{cursor:pointer}
#settingsButton:hover{filter:brightness(1.08)}
#settingsButton:active{transform:translateY(1px)}
.theme-modal[hidden]{display:none}
.theme-modal{
  position:fixed;
  inset:0;
  z-index:50;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:#000a;
  backdrop-filter:blur(5px);
}
.theme-panel{
  position:relative;
  width:min(430px,94vw);
  border:1px solid #a87322;
  border-radius:18px;
  padding:24px;
  background:linear-gradient(180deg,#0b1b29,#07131e);
  color:#f7e8c1;
  box-shadow:0 24px 70px #000c;
}
.theme-panel h2{
  margin:0 42px 20px;
  color:#f4cd73;
  font-family:Georgia,serif;
  font-size:26px;
  text-align:center;
}
.settings-label{
  margin:0 0 9px;
  color:#9eb0bd;
  font-size:12px;
  font-weight:800;
  letter-spacing:.7px;
  text-transform:uppercase;
}
.theme-close{
  position:absolute;
  top:12px;
  right:14px;
  width:36px;
  height:36px;
  border:0;
  background:transparent;
  color:#d8c69f;
  font-size:30px;
  line-height:1;
  cursor:pointer;
}
.theme-options{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.theme-choice{
  min-height:112px;
  border:1px solid #5e7382;
  border-radius:14px;
  background:#091824;
  color:#d8c69f;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  font-size:17px;
  font-weight:800;
  cursor:pointer;
}
.theme-choice-icon{font-size:34px;line-height:1}
.theme-choice.active{
  border-color:#2b86ff;
  background:linear-gradient(#1467d8,#0750b4);
  color:#fff;
  box-shadow:0 5px 15px #003c9970;
}
.sound-choice{
  width:100%;
  min-height:62px;
  margin-top:14px;
  padding:10px 14px;
  border:1px solid #5e7382;
  border-radius:14px;
  background:#091824;
  color:#d8c69f;
  display:flex;
  align-items:center;
  gap:11px;
  font-size:16px;
  font-weight:800;
  cursor:pointer;
}
.sound-choice-icon{
  width:36px;
  height:36px;
  flex:0 0 36px;
  border:1px solid #6d8290;
  border-radius:10px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:22px;
}
.sound-state{
  margin-left:auto;
  color:#91a3af;
  font-size:13px;
}
.sound-switch{
  position:relative;
  width:54px;
  height:30px;
  flex:0 0 54px;
  border:1px solid #6d8290;
  border-radius:999px;
  background:#465763;
  box-shadow:inset 0 2px 5px #0005;
  transition:background .2s,border-color .2s;
}
.sound-switch-knob{
  position:absolute;
  top:3px;
  left:3px;
  width:22px;
  height:22px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 2px 6px #0008;
  transition:transform .2s;
}
.sound-choice.active .sound-switch{
  border-color:#56cb79;
  background:#25a84f;
}
.sound-choice.active .sound-switch-knob{
  transform:translateX(24px);
}
.sound-choice.active{
  border-color:#2b86ff;
  background:#0d2940;
  color:#fff;
}
.sound-choice.active .sound-choice-icon{
  border-color:#4f9cff;
  background:#1467d8;
}
.sound-choice.active .sound-state{
  color:#74d995;
}
html[data-theme="light"] body{
  color:#25384a;
  background:#eadfcd;
}
html[data-theme="light"] body:before{
  background:radial-gradient(circle at 50% 34%,#fffdf8 0,#f3eadc 42%,#dfcfb7 100%);
}
html[data-theme="light"] body:after{
  opacity:.32;
  background:
    radial-gradient(ellipse at 5% 80%,transparent 0 25%,#9a671c33 25.2% 25.5%,transparent 25.7%),
    radial-gradient(ellipse at 95% 80%,transparent 0 25%,#9a671c33 25.2% 25.5%,transparent 25.7%);
}
html[data-theme="light"] .profile-link,
html[data-theme="light"] .language{
  border-color:#b7812d;
  background:#fffaf1;
  color:#8a5b12;
  box-shadow:0 4px 14px #72522a24;
}
html[data-theme="light"] .brand .crown,
html[data-theme="light"] .brand h1{
  color:#9b670f;
  text-shadow:0 2px 8px #ffffffa8;
}
html[data-theme="light"] .brand p,
html[data-theme="light"] .brand p:before,
html[data-theme="light"] .brand p:after,
html[data-theme="light"] .stat-icon{
  color:#a36c12;
}
html[data-theme="light"] .board-shell{
  border-color:#b7812d;
  background:#fff7e9;
  box-shadow:0 18px 46px #6d4c2638;
  opacity:.54;
}
html[data-theme="light"] .stats{color:#5f5549}
html[data-theme="light"] .stat strong{color:#8d5e12}
html[data-theme="light"] .menu-btn.alt{
  border-color:#b7812d;
  background:linear-gradient(90deg,#fffaf2,#f3e7d5);
  color:#26394b;
  box-shadow:0 7px 18px #72522a24,inset 0 1px #fff;
}
html[data-theme="light"] .menu-btn.alt .menu-icon{
  border-color:#c18a36;
  background:#fffdf8;
  color:#96620e;
}
html[data-theme="light"] .badge{color:#6d7c87}
html[data-theme="light"] .legal-footer a{color:#76551f}
html[data-theme="light"] .legal-footer a:hover{color:#8f5e0d}
html[data-theme="light"] .theme-modal{background:#3e332a70}
html[data-theme="light"] .theme-panel{
  border-color:#b7812d;
  background:linear-gradient(180deg,#fffdf8,#f1e5d3);
  color:#25384a;
  box-shadow:0 24px 70px #5a402c55;
}
html[data-theme="light"] .theme-panel h2{color:#8f5e0d}
html[data-theme="light"] .theme-close{color:#5e5145}
html[data-theme="light"] .theme-choice{
  border-color:#bcae9b;
  background:#fffaf2;
  color:#34495a;
}
html[data-theme="light"] .theme-choice.active{
  border-color:#2b86ff;
  background:linear-gradient(#1467d8,#0750b4);
  color:#fff;
}
html[data-theme="light"] .settings-label{color:#6d7c87}
html[data-theme="light"] .sound-choice{
  border-color:#bcae9b;
  background:#fffaf2;
  color:#34495a;
}
html[data-theme="light"] .sound-choice-icon{
  border-color:#c6b79f;
  background:#fffdf8;
  color:#96620e;
}
html[data-theme="light"] .sound-state{color:#6d7c87}
html[data-theme="light"] .sound-switch{
  border-color:#aa9f90;
  background:#c8c0b4;
  box-shadow:inset 0 2px 5px #6f625533;
}
html[data-theme="light"] .sound-choice.active .sound-switch{
  border-color:#34a85a;
  background:#2dbd5c;
}
html[data-theme="light"] .sound-choice.active{
  border-color:#2b86ff;
  background:#eaf4ff;
  color:#26394b;
}
html[data-theme="light"] .sound-choice.active .sound-choice-icon{
  border-color:#2b86ff;
  background:#1467d8;
  color:#fff;
}
html[data-theme="light"] .sound-choice.active .sound-state{color:#168543}
@media(max-width:430px){
  .theme-panel{padding:20px 14px}
  .theme-panel h2{font-size:23px}
  .theme-choice{min-height:98px;font-size:15px}
}
@media(min-width:900px){
  .hero{
    grid-template-columns:minmax(300px,.9fr) minmax(360px,1.15fr);
    grid-template-rows:auto 1fr auto;
    column-gap:34px;
  }
  .brand{
    grid-column:1;
    grid-row:1 / span 2;
    align-self:center;
    transform:translateY(-4vh);
  }
  .board-shell{
    grid-column:2;
    grid-row:1 / span 3;
  }
  .stats{
    grid-column:1;
    grid-row:3;
    align-self:end;
    flex-direction:column;
    gap:5px;
    padding-bottom:4px;
  }
}
@media(max-height:720px){
  .app{gap:4px}
  .topbar{min-height:28px}
  .brand .crown{height:19px;font-size:25px;line-height:18px}
  .brand h1{font-size:32px}
  .brand p{font-size:9px;margin-top:1px}
  .board-shell{width:min(37vh,320px,58vw)}
  .menu-btn{min-height:45px;padding-top:6px;padding-bottom:6px}
  .menu-icon{width:30px;height:30px;font-size:18px}
  .stats{font-size:11px}
}
@media(max-height:590px){
  .brand .crown{display:none}
  .board-shell{width:min(29vh,205px,44vw)}
  .stats{display:none}
  .menu{gap:5px 7px}
  .menu-btn{min-height:39px;font-size:12px;border-radius:9px;padding:4px 9px}
  .menu-icon{width:27px;height:27px;font-size:16px;border-radius:8px}
}
@media(max-width:430px){
  .app{padding-left:8px;padding-right:8px}
  .brand h1{letter-spacing:3px}
  .brand p{letter-spacing:3px}
  .menu-btn{font-size:clamp(12px,3.8vw,16px);padding-left:8px;padding-right:8px}
  .menu-icon{width:31px;height:31px;font-size:18px}
  .badge{display:none}
}


/* Phones in landscape: reserve separate space for branding and navigation.
   Dynamic viewport units follow browser chrome and orientation changes. */
@media (orientation:landscape) and (max-height:600px) and (max-width:1200px){
  .app{
    grid-template-columns:minmax(0,.85fr) minmax(0,1.35fr);
    grid-template-rows:auto minmax(0,1fr) auto;
    column-gap:clamp(12px,3vw,32px);
    row-gap:6px;
    padding-left:max(12px,env(safe-area-inset-left));
    padding-right:max(12px,env(safe-area-inset-right));
  }
  .topbar{grid-column:1 / -1;grid-row:1}
  .hero{
    grid-column:1;grid-row:2;
    grid-template-columns:minmax(0,1fr);
    grid-template-rows:auto minmax(0,1fr);
    gap:6px;
    overflow:hidden;
  }
  .brand{
    grid-column:1;grid-row:1;
    align-self:center;
    transform:none;
    max-width:100%;
  }
  .brand .crown{display:none}
  .brand h1,.brand .brand-name{
    font-size:clamp(20px,3.6vw,36px);
    letter-spacing:2px;
    line-height:1.1;
  }
  .brand p{font-size:9px;letter-spacing:2px}
  .brand p:before,.brand p:after{margin:0 5px}
  .board-shell{
    grid-column:1;grid-row:2;
    width:auto;
    height:min(100%,46dvh,220px);
    max-width:100%;
    min-height:0;
    transform:none;
  }
  .stats{display:none}
  .menu{
    grid-column:2;grid-row:2;
    width:100%;
    align-self:center;
    gap:6px;
  }
  .menu-btn{
    min-height:44px;
    padding:5px 8px;
    font-size:clamp(12px,1.6vw,16px);
    gap:7px;
  }
  .menu-icon{width:28px;height:28px;font-size:17px}
  .legal-footer{grid-column:1 / -1;grid-row:3}
  .theme-modal{padding:8px}
  .theme-panel{
    max-height:calc(100dvh - 16px);
    overflow-y:auto;
    overscroll-behavior:contain;
    padding:16px;
  }
  .theme-panel h2{margin-bottom:10px;font-size:22px}
  .theme-choice{min-height:64px;gap:4px}
  .theme-choice-icon{font-size:24px}
  .sound-choice{min-height:48px;margin-top:10px}
}
@media (orientation:landscape) and (max-height:280px) and (max-width:1200px){
  .app{min-height:240px}
}

/* 2026-09-19: Light homepage visual refresh.
   CSS-only: keeps homepage HTML, SEO metadata/content, links and JS behavior unchanged. */
html[data-theme="light"] body{
  background:#efe4d2;
  color:#273846;
}
html[data-theme="light"] body:before{
  background:
    radial-gradient(circle at 52% 29%,#fffaf0 0,#f6eddf 46%,#eadcc7 100%);
}
html[data-theme="light"] body:after{
  opacity:.16;
  background:
    radial-gradient(ellipse at 8% 85%,transparent 0 27%,#b1781e24 27.2% 27.5%,transparent 27.7%),
    radial-gradient(ellipse at 92% 85%,transparent 0 27%,#b1781e24 27.2% 27.5%,transparent 27.7%);
}
html[data-theme="light"] .app{
  width:min(1180px,calc(100% - 18px));
  margin:9px auto 0;
  height:calc(100dvh - 18px);
  padding:
    max(12px,env(safe-area-inset-top))
    clamp(14px,2vw,26px)
    max(12px,env(safe-area-inset-bottom));
  border:1px solid #dfc99f;
  border-radius:34px;
  background:linear-gradient(145deg,#f8efdf 0%,#f3e7d5 54%,#f8efe1 100%);
  box-shadow:0 16px 45px #7a5b2f24,inset 0 1px #ffffffd9;
}
html[data-theme="light"] .topbar{
  min-height:36px;
}
html[data-theme="light"] .profile-link,
html[data-theme="light"] .language{
  border-color:#dcc59e;
  border-radius:999px;
  background:#fffaf1;
  color:#765014;
  box-shadow:0 5px 16px #6f543021;
}
html[data-theme="light"] .profile-link{
  padding:7px 12px;
}
html[data-theme="light"] .language{
  padding:7px 11px;
}
html[data-theme="light"] .brand .crown{
  color:#b27616;
  filter:drop-shadow(0 2px 5px #7e56232b);
}
html[data-theme="light"] body .app .brand .brand-name,
html[data-theme="light"] .brand h1{
  color:#a86c10;
  text-shadow:0 2px 0 #fff9ed,0 7px 18px #8b62222a;
  letter-spacing:5px;
}
html[data-theme="light"] .brand p,
html[data-theme="light"] .brand p:before,
html[data-theme="light"] .brand p:after{
  color:#a16d20;
}
html[data-theme="light"] .board-shell{
  border-color:#d6a85f;
  border-radius:12px;
  background:#f6ead5;
  box-shadow:0 18px 46px #6d4c2647;
  opacity:.80;
  filter:sepia(.05) saturate(.96) contrast(1.02);
}
html[data-theme="light"] .board-watermark{
  border-color:#c8923f;
  box-shadow:inset 0 0 0 1px #fff8ec;
}
html[data-theme="light"] .sq.light{background:#f3dfb5}
html[data-theme="light"] .sq.dark{background:#ae8961}
html[data-theme="light"] .sq img{
  filter:sepia(.08) saturate(.88) contrast(1.08) drop-shadow(0 5px 4px #5e432f70);
}
html[data-theme="light"] .stats{
  color:#75695c;
}
html[data-theme="light"] .stat strong,
html[data-theme="light"] .stat-icon{
  color:#a76f19;
}
html[data-theme="light"] .menu{
  width:min(800px,100%);
  gap:9px 12px;
}
html[data-theme="light"] .menu-btn{
  position:relative;
  overflow:hidden;
  min-height:56px;
  border-radius:11px;
  font-size:clamp(14px,1.85vh,18px);
  box-shadow:0 8px 19px #60471f21,inset 0 1px #ffffffb8;
  transition:transform .14s ease,filter .14s ease,box-shadow .14s ease;
}
html[data-theme="light"] .menu-btn:before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:4px;
  background:#c28a2e;
}
html[data-theme="light"] .menu-btn.primary{
  border-color:#0f5658;
  background:linear-gradient(180deg,#124f51 0%,#0b4245 100%);
  color:#fffaf0;
  box-shadow:0 9px 22px #17494a2d,inset 0 1px #ffffff12;
}
html[data-theme="light"] .menu-btn.primary:before{
  background:#d2a039;
}
html[data-theme="light"] .menu-btn.alt{
  border-color:#dec49a;
  background:linear-gradient(180deg,#fffaf0 0%,#f8eedf 100%);
  color:#253442;
  box-shadow:0 8px 19px #60471f1c,inset 0 1px #fff;
}
html[data-theme="light"] a.menu-btn:hover,
html[data-theme="light"] #settingsButton:hover{
  filter:brightness(1.025);
  box-shadow:0 10px 24px #60471f2a,inset 0 1px #fff;
}
html[data-theme="light"] .menu-btn.primary:hover{
  box-shadow:0 11px 25px #17494a3d,inset 0 1px #ffffff1a;
}
html[data-theme="light"] .menu-btn .menu-icon{
  border-color:#d5b372;
  border-radius:9px;
  background:#fffaf0;
  color:#a56d17;
  box-shadow:0 2px 7px #79592617;
}
html[data-theme="light"] .menu-btn.primary .menu-icon{
  border-color:#b89449;
  background:#143f40;
  color:#f2cc76;
  box-shadow:inset 0 1px #ffffff18;
}
html[data-theme="light"] .legal-footer a{
  color:#795b2c;
}
html[data-theme="light"] .legal-footer a:hover{
  color:#9c6614;
}
html[data-theme="light"] .theme-panel{
  border-color:#dec49a;
  background:linear-gradient(180deg,#fffaf2,#f5e9d6);
  box-shadow:0 24px 70px #4e3c2852;
}
html[data-theme="light"] .theme-choice.active{
  border-color:#0f5658;
  background:linear-gradient(180deg,#124f51,#0b4245);
  color:#fff;
  box-shadow:0 6px 16px #17494a35;
}
html[data-theme="light"] .sound-choice.active{
  border-color:#0f5658;
  background:#edf7f3;
  color:#243a39;
}
html[data-theme="light"] .sound-choice.active .sound-choice-icon{
  border-color:#0f5658;
  background:#124f51;
  color:#fff;
}
html[data-theme="light"] .sound-choice.active .sound-state{
  color:#147047;
}
@media(max-width:700px){
  html[data-theme="light"] .app{
    width:calc(100% - 10px);
    margin:5px auto 0;
    height:calc(100dvh - 10px);
    border-radius:24px;
  }
  html[data-theme="light"] .menu{
    gap:7px;
  }
}
@media(max-width:430px){
  html[data-theme="light"] .app{
    padding-left:10px;
    padding-right:10px;
  }
  html[data-theme="light"] body .app .brand .brand-name{
    letter-spacing:3px;
  }
  html[data-theme="light"] .menu-btn{
    min-height:49px;
  }
}
@media (orientation:landscape) and (max-height:600px) and (max-width:1200px){
  html[data-theme="light"] .app{
    width:calc(100% - 10px);
    height:calc(100dvh - 10px);
    margin:5px auto 0;
    border-radius:22px;
  }
}

/* Homepage board playback animation */
.board-watermark .sq{
  overflow:visible;
}
.board-watermark .sq.board-last-move::after{
  content:"";
  position:absolute;
  inset:7%;
  border-radius:12%;
  background:#f2c35a36;
  box-shadow:inset 0 0 0 1px #f2c35a42;
  pointer-events:none;
  z-index:1;
}
.board-watermark img.piece{
  position:relative;
  z-index:2;
}
.board-watermark img.piece.is-board-moving{
  z-index:8;
  will-change:transform;
  filter:drop-shadow(0 10px 8px #000a);
}
html[data-theme="light"] .board-watermark .sq.board-last-move::after{
  background:#c88b2c2e;
  box-shadow:inset 0 0 0 1px #b8791f42;
}
html[data-theme="light"] .board-watermark img.piece.is-board-moving{
  filter:sepia(.05) saturate(.95) contrast(1.08) drop-shadow(0 9px 7px #5e432f85);
}
@media (prefers-reduced-motion:reduce){
  .board-watermark .sq.board-last-move::after{display:none}
}

/* SITE-PLAYGAMA-V94-HOME:START */
:root{
  --cv-display:"Palatino Linotype","Book Antiqua",Palatino,Georgia,serif;
  --cv-paper:#f3ead9;--cv-paper-3:#fffaf0;--cv-ink:#17232a;--cv-petrol:#173b40;--cv-petrol-2:#0e2d32;
  --cv-brass:#a86f1d;--cv-brass-hi:#d3a34f;--cv-line:#cbb58e;--cv-shadow:0 16px 36px rgba(53,38,20,.16);--cv-shadow-dark:0 18px 42px rgba(0,0,0,.34);
}

/* Visual language matched to the Playgama v94 art-direction layer.
   Layout, links, SEO markup, board size and homepage JS remain untouched. */
.brand-name,.brand h1{
  font-family:var(--cv-display)!important;
  font-weight:700!important;
  letter-spacing:.085em!important;
}
html[data-theme="light"] body{
  color:var(--cv-ink)!important;
  background:var(--cv-paper)!important;
}
html[data-theme="light"] body:before{
  background:
    radial-gradient(circle at 15% 6%,rgba(255,255,255,.84),transparent 27%),
    radial-gradient(circle at 88% 90%,rgba(151,101,31,.08),transparent 34%),
    repeating-linear-gradient(0deg,rgba(96,72,39,.018) 0 1px,transparent 1px 5px),
    var(--cv-paper)!important;
}
html[data-theme="light"] .app{
  width:min(1160px,100%)!important;
  height:100dvh!important;
  margin:auto!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.brand-name{
  color:var(--cv-brass)!important;
  font-size:clamp(31px,5.1vh,54px)!important;
  letter-spacing:.15em!important;
  text-shadow:none!important;
}
.brand .crown{color:var(--cv-brass)!important;font-size:25px!important}
.brand p{color:#8c6d3a!important;letter-spacing:.34em!important;font-size:10px!important}
.profile-link{
  border:1px solid var(--cv-line)!important;
  border-radius:999px!important;
  background:color-mix(in srgb,var(--cv-paper-3) 92%,transparent)!important;
  color:var(--cv-ink)!important;
  box-shadow:0 8px 20px rgba(53,38,20,.11)!important;
  padding:7px 13px!important;
}
.profile-icon{color:var(--cv-brass)!important}
.language{
  border-color:var(--cv-line)!important;
  border-radius:999px!important;
  background:var(--cv-paper-3)!important;
  color:#6f4c18!important;
  box-shadow:0 8px 20px rgba(53,38,20,.09)!important;
}
.board-shell{
  border:1px solid color-mix(in srgb,var(--cv-brass) 72%,var(--cv-line))!important;
  border-radius:10px!important;
  background:linear-gradient(180deg,rgba(255,250,238,.18),rgba(143,110,49,.05))!important;
  box-shadow:0 22px 42px rgba(62,45,23,.16),0 0 0 1px rgba(184,140,60,.10) inset!important;
  opacity:.48!important;
  filter:saturate(.88) sepia(.12) contrast(1.07)!important;
  transform:rotate(-1.2deg)!important;
}
.stats{color:#746957!important;font-size:12px!important}
.stat strong{color:var(--cv-brass)!important}
.menu{gap:10px 12px!important}
.menu-btn{
  position:relative!important;
  border:1px solid var(--cv-line)!important;
  border-radius:10px!important;
  background:rgba(255,250,240,.76)!important;
  color:var(--cv-ink)!important;
  box-shadow:0 9px 22px rgba(69,49,20,.10)!important;
  overflow:hidden!important;
}
.menu-btn::before{content:none!important;display:none!important}
.menu-btn::after{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:4px;
  background:var(--cv-brass);
  opacity:.85;
}
.menu-btn.primary{
  background:linear-gradient(135deg,var(--cv-petrol),var(--cv-petrol-2))!important;
  color:#f8f0df!important;
  border-color:#244e50!important;
  box-shadow:0 10px 22px rgba(10,43,47,.20)!important;
}
.menu-btn.primary::after{background:var(--cv-brass-hi)}
a.menu-btn:hover,#settingsButton:hover{
  transform:translateY(-2px)!important;
  filter:none!important;
  box-shadow:0 14px 28px rgba(52,37,18,.16)!important;
}
a.menu-btn:active,#settingsButton:active{transform:translateY(0)!important}
.menu-icon{
  border:1px solid color-mix(in srgb,var(--cv-brass) 65%,var(--cv-line))!important;
  border-radius:8px!important;
  background:transparent!important;
  color:var(--cv-brass)!important;
}
.menu-btn.primary .menu-icon{
  color:#f5d89d!important;
  border-color:#d9b66b66!important;
  background:#ffffff08!important;
}
.menu-text{font-weight:800!important;letter-spacing:.01em}
.theme-panel{
  border:1px solid var(--cv-line)!important;
  border-radius:16px!important;
  background:var(--cv-paper-3)!important;
  color:var(--cv-ink)!important;
  box-shadow:var(--cv-shadow)!important;
}
.theme-choice,.sound-choice{border-radius:8px!important}
.board-watermark .sq.board-last-move::after{
  border:1px solid rgba(168,111,29,.32)!important;
  background:rgba(211,163,79,.13)!important;
  box-shadow:none!important;
}
html[data-theme="dark"] body{
  background:#101a1e!important;
}
html[data-theme="dark"] body:before{
  background:
    radial-gradient(circle at 18% 14%,rgba(38,80,86,.42),transparent 26%),
    radial-gradient(circle at 84% 78%,rgba(168,111,29,.12),transparent 30%),
    linear-gradient(180deg,#132126 0%,#101a1e 52%,#0f171b 100%)!important;
}
html[data-theme="dark"] body:after{opacity:.34!important}
html[data-theme="dark"] .profile-link,
html[data-theme="dark"] .language,
html[data-theme="dark"] .menu-btn.alt,
html[data-theme="dark"] .theme-panel{
  background:#141f22!important;
  color:#eee2cd!important;
  border-color:#5f5544!important;
  box-shadow:var(--cv-shadow-dark)!important;
}
html[data-theme="dark"] .stats{color:#c5b79b!important}
html[data-theme="dark"] .brand p{color:#b9914c!important}
html[data-theme="dark"] .menu-btn.primary{
  background:linear-gradient(135deg,#1c5156,#153c41)!important;
  border-color:#34646a!important;
  color:#fff3dd!important;
}
@media(max-width:700px){
  .board-shell{transform:none!important}
}
/* SITE-PLAYGAMA-V94-HOME:END */
