/* Online setup */
html.setup-online,html.setup-online *{box-sizing:border-box}
html.setup-online,html.setup-online body{width:100%;height:100%;margin:0}
html.setup-online body{
 overflow:hidden;
 font-family:Arial,Helvetica,sans-serif;
 color:#f7e8c1;
 background:#02070d;
}
html.setup-online body:before{
 content:"";
 position:fixed;
 inset:0;
 z-index:-2;
 background:radial-gradient(circle at 50% 32%,#0d2940 0,#061624 35%,#02070d 72%);
}
html.setup-online .page{
 width:100%;
 height:100dvh;
 padding:max(10px,env(safe-area-inset-top)) 14px max(10px,env(safe-area-inset-bottom));
 display:flex;
 flex-direction:column;
 align-items:center;
}
html.setup-online .topbar{
 width:min(900px,100%);
 display:grid;
 grid-template-columns:1fr auto 1fr;
 align-items:center;
 gap:12px;
}
html.setup-online .back,html.setup-online .language{
 min-height:38px;
 border:1px solid #a87322;
 border-radius:9px;
 background:#07131e;
 color:#f4cd73;
 font-size:12px;
 font-weight:800;
 box-shadow:0 4px 15px #0008;
}
html.setup-online .back{justify-self:start;padding:0 12px;cursor:pointer}
html.setup-online .language{justify-self:end;padding:0 9px;cursor:pointer;outline:none}
html.setup-online .brand{text-align:center;white-space:nowrap}
html.setup-online .brand .crown{display:block;height:20px;color:#f4cd73;font-size:26px;line-height:18px}
html.setup-online .brand h1{margin:0;font-family:Georgia,serif;color:#f4cd73;font-size:32px;letter-spacing:3px;text-shadow:0 3px 10px #000}
html.setup-online .brand p{margin:2px 0 0;color:#dcae4f;font-size:9px;letter-spacing:3px;font-weight:700}
html.setup-online .stage{
 flex:1 1 auto;
 min-height:0;
 width:100%;
 display:flex;
 align-items:center;
 justify-content:center;
}
html.setup-online .card{
 width:min(620px,100%);
 padding:24px;
 border:1px solid #a87322;
 border-radius:20px;
 background:linear-gradient(180deg,#0b1c2a,#06111b);
 box-shadow:0 24px 70px #000b,0 0 30px #b77a2426;
}
html.setup-online .card[hidden]{display:none}
html.setup-online .title{margin:0;text-align:center;color:#f4cd73;font-family:Georgia,serif;font-size:27px;letter-spacing:1px}
html.setup-online .subtitle{margin:7px 0 20px;text-align:center;color:#9fb0bc;font-size:13px}
html.setup-online .time-title{margin:0 0 10px;text-align:center;color:#d8c69f;font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:.8px}
html.setup-online .times{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
html.setup-online .time-option{position:relative}
html.setup-online .time-option input{position:absolute;opacity:0;pointer-events:none}
html.setup-online .time-option label{
 min-height:58px;
 display:flex;
 align-items:center;
 justify-content:center;
 border:1px solid #35546a;
 border-radius:11px;
 background:#07131e;
 color:#e8eef2;
 font-size:17px;
 font-weight:900;
 cursor:pointer;
 box-shadow:inset 0 1px #ffffff08;
}
html.setup-online .time-option input:checked+label{
 border-color:#2b86ff;
 background:linear-gradient(#1467d8,#0750b4);
 color:#fff;
 box-shadow:0 5px 15px #003c9970;
}
html.setup-online .rating-note{
 margin:18px 0 0;
 padding:13px 14px;
 display:flex;
 align-items:flex-start;
 gap:10px;
 border:1px solid #8d641e;
 border-radius:11px;
 background:#091722;
 color:#d8c69f;
 font-size:13px;
 line-height:1.4;
}
html.setup-online .rating-icon{flex:0 0 auto;color:#f4cd73;font-size:18px;line-height:1.1}
html.setup-online .continue{
 width:100%;
 min-height:50px;
 margin-top:16px;
 border:1px solid #2b86ff;
 border-radius:10px;
 background:linear-gradient(#1467d8,#0750b4);
 color:#fff;
 font-size:15px;
 font-weight:900;
 cursor:pointer;
 box-shadow:0 5px 15px #003c9970;
}
html.setup-online .continue:hover{filter:brightness(1.07)}
html.setup-online .continue:active{transform:translateY(1px)}
html.setup-online .loading{margin:auto;color:#9fb0bc;font-size:13px;font-weight:700}
html.setup-online[data-theme="light"]{color-scheme:light}
html.setup-online[data-theme="light"] body{
 color:#25384a;
 background:#eadfcd;
}
html.setup-online[data-theme="light"] body:before{
 background:radial-gradient(circle at 50% 32%,#fffdf8 0,#f3eadc 42%,#dfcfb7 100%);
}
html.setup-online[data-theme="light"] .back,html.setup-online[data-theme="light"] .language{
 border-color:#b7812d;
 background:#fffaf2;
 color:#8a5b12;
 box-shadow:0 4px 14px #72522a24;
}
html.setup-online[data-theme="light"] .language option{
 background:#fffaf2;
 color:#26394b;
}
html.setup-online[data-theme="light"] .brand .crown,html.setup-online[data-theme="light"] .brand h1{
 color:#9b670f;
 text-shadow:0 2px 8px #ffffffa8;
}
html.setup-online[data-theme="light"] .brand p{color:#a36c12}
html.setup-online[data-theme="light"] .card{
 border-color:#b7812d;
 background:linear-gradient(180deg,#fffdf8,#f1e5d3);
 box-shadow:0 24px 70px #5a402c55;
}
html.setup-online[data-theme="light"] .title{color:#8f5e0d}
html.setup-online[data-theme="light"] .subtitle{color:#667886}
html.setup-online[data-theme="light"] .time-title{color:#625548}
html.setup-online[data-theme="light"] .time-option label{
 border-color:#bcae9b;
 background:#fffaf2;
 color:#2f4354;
 box-shadow:inset 0 1px #fff;
}
html.setup-online[data-theme="light"] .time-option input:checked+label{
 border-color:#2b86ff;
 background:linear-gradient(#1467d8,#0750b4);
 color:#fff;
 box-shadow:0 5px 15px #003c9970;
}
html.setup-online[data-theme="light"] .rating-note{
 border-color:#b7812d;
 background:#fff7e9;
 color:#554a3f;
}
html.setup-online[data-theme="light"] .rating-icon{color:#96620e}
html.setup-online[data-theme="light"] .loading{color:#667886}
@media(max-width:520px){
 html.setup-online .page{padding-left:8px;padding-right:8px}
 html.setup-online .topbar{grid-template-columns:auto 1fr auto}
 html.setup-online .brand h1{font-size:22px;letter-spacing:2px}
 html.setup-online .brand .crown,html.setup-online .brand p{display:none}
 html.setup-online .back,html.setup-online .language{min-height:34px;font-size:10px}
 html.setup-online .card{padding:16px 12px;border-radius:15px}
 html.setup-online .title{font-size:22px}
 html.setup-online .subtitle{font-size:11px;margin-bottom:14px}
 html.setup-online .times{gap:7px}
 html.setup-online .time-option label{min-height:50px;font-size:15px}
 html.setup-online .rating-note{font-size:11px;margin-top:14px}
 html.setup-online .continue{min-height:46px;font-size:13px}
}

/* Computer setup */
html.setup-computer,html.setup-computer *{box-sizing:border-box}
html.setup-computer,html.setup-computer body{width:100%;height:100%;margin:0}
html.setup-computer body{
  overflow:hidden;
  font-family:Arial,Helvetica,sans-serif;
  color:#f7e8c1;
  background:#02070d;
}
html.setup-computer body:before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-3;
  background:radial-gradient(circle at 50% 35%,#0d2940 0,#061624 36%,#02070d 74%);
}
html.setup-computer .page{
  height:100dvh;
  width:min(1100px,100%);
  margin:auto;
  padding:max(10px,env(safe-area-inset-top)) 12px max(10px,env(safe-area-inset-bottom));
  display:flex;
  align-items:center;
  justify-content:center;
}
html.setup-computer .back-board{
  position:fixed;
  inset:0;
  z-index:-2;
  opacity:.16;
  display:flex;
  align-items:center;
  justify-content:center;
  pointer-events:none;
}
html.setup-computer .board-shell{
  width:min(72vh,680px,86vw);
  aspect-ratio:1;
  padding:6px;
  border:1px solid #b37a25;
  border-radius:18px;
  background:#06131e;
  box-shadow:0 22px 70px #0009;
}
html.setup-computer .board{
  width:100%;
  height:100%;
  display:grid;
  grid-template-columns:repeat(8,1fr);
  grid-template-rows:repeat(8,1fr);
  overflow:hidden;
  border:1px solid #c18a36;
  border-radius:5px;
}
html.setup-computer .sq{display:flex;align-items:center;justify-content:center}
html.setup-computer .light{background:#efd18f}
html.setup-computer .dark{background:#936036}
html.setup-computer .sq img{width:94%;height:94%;object-fit:contain;filter:drop-shadow(0 4px 3px #0008)}

html.setup-computer .dialog{
  width:min(650px,94vw);
  max-height:94dvh;
  overflow:hidden;
  border:1px solid #b37a25;
  border-radius:22px;
  background:linear-gradient(180deg,#0b1b29,#07131e);
  box-shadow:0 24px 70px #000c;
}
html.setup-computer .dialog-head{
  height:74px;
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
  border-bottom:1px solid #20384a;
  padding:0 70px;
}
html.setup-computer .dialog-head h1{
  margin:0;
  color:#f4cd73;
  font-family:Georgia,serif;
  font-size:clamp(24px,4vw,36px);
  letter-spacing:.5px;
  text-align:center;
}
html.setup-computer .close{
  position:absolute;
  right:20px;
  top:50%;
  transform:translateY(-50%);
  border:0;
  background:transparent;
  color:#d8c69f;
  font-size:32px;
  line-height:1;
  cursor:pointer;
}
html.setup-computer .content{
  padding:clamp(14px,2.5vh,24px);
  display:flex;
  flex-direction:column;
  gap:clamp(12px,2vh,20px);
}
html.setup-computer .label{
  color:#d8c69f;
  font-size:13px;
  font-weight:800;
  letter-spacing:1.2px;
  text-transform:uppercase;
  margin-bottom:7px;
}
html.setup-computer .segmented{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  border:1px solid #a87322;
  border-radius:16px;
  overflow:hidden;
  background:#06131e;
}
html.setup-computer .segment{
  min-height:72px;
  border:0;
  border-right:1px solid #5c4a25;
  background:transparent;
  color:#f7e8c1;
  font-size:clamp(14px,2.6vw,19px);
  font-weight:800;
  cursor:pointer;
}
html.setup-computer .segment:last-child{border-right:0}
html.setup-computer .segment.active{
  background:linear-gradient(#1467d8,#0750b4);
  color:#fff;
}
html.setup-computer .difficulties{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
}
html.setup-computer .diff{
  min-height:86px;
  border:1px solid #8c6823;
  border-radius:14px;
  background:linear-gradient(180deg,#0b1d2a,#07131e);
  color:#f7e8c1;
  cursor:pointer;
  padding:10px 8px;
}
html.setup-computer .diff strong{
  display:block;
  color:#f4cd73;
  font-size:clamp(15px,2.5vw,20px);
  margin-bottom:4px;
}
html.setup-computer .diff span{
  display:block;
  color:#9fb4c3;
  font-size:11px;
}
html.setup-computer .diff.active{
  border-color:#2b86ff;
  background:linear-gradient(#1467d8,#0750b4);
}
html.setup-computer .diff.active strong,html.setup-computer .diff.active span{color:#fff}
html.setup-computer .option{
  min-height:58px;
  border:1px solid #243e52;
  border-radius:13px;
  background:#091824;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:10px 14px;
}
html.setup-computer .option-title{
  display:flex;
  align-items:center;
  gap:10px;
  font-size:clamp(14px,2.4vw,18px);
  font-weight:800;
}
html.setup-computer .option-icon{color:#f4cd73;font-size:22px}
html.setup-computer .time-select{
  min-width:118px;
  padding:8px 11px;
  border:1px solid #a87322;
  border-radius:9px;
  background:#07131e;
  color:#f4cd73;
  font-size:15px;
  font-weight:800;
  cursor:pointer;
  outline:none;
}
html.setup-computer .time-select option{background:#07131e;color:#f7e8c1}
html.setup-computer .switch{
  width:54px;
  height:30px;
  border-radius:999px;
  border:1px solid #37637f;
  background:#203545;
  position:relative;
  cursor:pointer;
  flex:0 0 auto;
}
html.setup-computer .switch:after{
  content:"";
  position:absolute;
  width:24px;
  height:24px;
  top:2px;
  left:3px;
  border-radius:50%;
  background:#fff;
  transition:.15s;
}
html.setup-computer .switch.on{
  background:#1467d8;
  border-color:#2b86ff;
}
html.setup-computer .switch.on:after{left:26px}
html.setup-computer .play{
  height:58px;
  border-radius:13px;
  border:1px solid #2b86ff;
  background:linear-gradient(#1467d8,#0750b4);
  color:#fff;
  font-size:20px;
  font-weight:900;
  letter-spacing:.5px;
  cursor:pointer;
  box-shadow:0 6px 18px #003c9970;
}
html.setup-computer .note{
  color:#7890a0;
  font-size:11px;
  text-align:center;
  margin-top:-4px;
}
html.setup-computer[data-theme="light"] body{
  color:#25384a;
  background:#eadfcd;
}
html.setup-computer[data-theme="light"] body:before{
  background:radial-gradient(circle at 50% 35%,#fffdf8 0,#f3eadc 42%,#dfcfb7 100%);
}
html.setup-computer[data-theme="light"] .board-shell{
  border-color:#b7812d;
  background:#fff7e9;
  box-shadow:0 22px 60px #6d4c2638;
}
html.setup-computer[data-theme="light"] .dialog{
  border-color:#b7812d;
  background:linear-gradient(180deg,#fffdf8,#f1e5d3);
  box-shadow:0 24px 70px #5a402c55;
}
html.setup-computer[data-theme="light"] .dialog-head{border-bottom-color:#d8c6ac}
html.setup-computer[data-theme="light"] .dialog-head h1{color:#8f5e0d}
html.setup-computer[data-theme="light"] .close{color:#5e5145}
html.setup-computer[data-theme="light"] .label{color:#625548}
html.setup-computer[data-theme="light"] .segmented{
  border-color:#b7812d;
  background:#fffaf2;
}
html.setup-computer[data-theme="light"] .segment{
  border-right-color:#d2b98f;
  color:#2f4354;
}
html.setup-computer[data-theme="light"] .segment.active{
  background:linear-gradient(#1467d8,#0750b4);
  color:#fff;
}
html.setup-computer[data-theme="light"] .diff{
  border-color:#bca57d;
  background:linear-gradient(180deg,#fffdf8,#f4eadb);
  color:#2f4354;
}
html.setup-computer[data-theme="light"] .diff strong{color:#8f5e0d}
html.setup-computer[data-theme="light"] .diff span{color:#677987}
html.setup-computer[data-theme="light"] .diff.active{
  border-color:#2b86ff;
  background:linear-gradient(#1467d8,#0750b4);
}
html.setup-computer[data-theme="light"] .diff.active strong,html.setup-computer[data-theme="light"] .diff.active span{color:#fff}
html.setup-computer[data-theme="light"] .option{
  border-color:#c8b89f;
  background:#fffaf2;
}
html.setup-computer[data-theme="light"] .option-title{color:#2f4354}
html.setup-computer[data-theme="light"] .option-icon{color:#96620e}
html.setup-computer[data-theme="light"] .time-select{
  border-color:#b7812d;
  background:#fffaf2;
  color:#8f5e0d;
}
html.setup-computer[data-theme="light"] .time-select option{
  background:#fffaf2;
  color:#25384a;
}
html.setup-computer[data-theme="light"] .switch{
  border-color:#9aa8b2;
  background:#c4ced5;
}
html.setup-computer[data-theme="light"] .switch.on{
  border-color:#2b86ff;
  background:#1467d8;
}
@media(max-height:700px){
  html.setup-computer .dialog-head{height:58px}
  html.setup-computer .content{padding:12px;gap:10px}
  html.setup-computer .segmented .segment{min-height:56px}
  html.setup-computer .diff{min-height:68px;padding:7px}
  html.setup-computer .option{min-height:48px}
  html.setup-computer .play{height:48px}
}
@media(max-width:480px){
  html.setup-computer .dialog{width:96vw;border-radius:18px}
  html.setup-computer .dialog-head{padding:0 48px}
  html.setup-computer .close{right:14px;font-size:28px}
  html.setup-computer .content{padding:12px}
  html.setup-computer .segment{min-height:62px;font-size:13px}
  html.setup-computer .diff{min-height:76px}
  html.setup-computer .diff strong{font-size:15px}
  html.setup-computer .diff span{font-size:10px}
}
