:root{color-scheme:dark;font-family:"Segoe UI",sans-serif;color:#f4ecd9;background:#122721}*{box-sizing:border-box}body{margin:0;min-height:100vh;background:radial-gradient(ellipse at 27% 38%,#284438 0,transparent 57%)}header{height:66px;border-bottom:1px solid #ffffff27;display:flex;align-items:center;justify-content:space-between;padding:0 max(5vw,20px)}.brand{font: bold 23px Georgia,serif;display:flex;align-items:center;gap:12px}.brand b{color:#e0b66c;font:36px Georgia}button,select,textarea{font:inherit}button,select{cursor:pointer}button,select,textarea{background:#1d352d;border:1px solid #617065;color:inherit;border-radius:5px;padding:9px 13px}button:hover,select:hover{border-color:#e6c889}main{max-width:1160px;margin:auto;display:grid;grid-template-columns:minmax(0,1.65fr) minmax(260px,1fr);gap:clamp(32px,6vw,86px);padding:32px 5vw 40px;align-items:center}small{font-size:.77rem;font-weight:650;letter-spacing:.17em;color:#dbbc83}.intro h1{font:normal clamp(42px,5vw,72px)/1 Georgia,serif;letter-spacing:-.05em;margin:6px 0 20px}.frame{padding:clamp(8px,1.4vw,16px);background:repeating-linear-gradient(4deg,#936337 0,#916135 3px,#a17245 7px,#96683f 11px);border:2px solid #bf925a;border-radius:7px;box-shadow:0 16px 36px #07110b66,inset 0 0 0 3px #654126}#board{display:grid;grid-template-columns:repeat(11,1fr);border:2px solid #63492f;aspect-ratio:1}.cell{min-width:0;padding:0;border:0;border-radius:0;display:grid;place-items:center;position:relative;background:#d8b981;color:#775530;touch-action:manipulation}.cell.alt{background:#bf975e}.cell.special{background:#ab7847}.special:before{content:'◇';position:absolute;font:clamp(16px,2.6vw,34px) Georgia}.cell:focus-visible{z-index:2;outline:3px solid white}.cell.chosen{background:#e2bb58;box-shadow:inset 0 0 0 3px #4f3920}.cell.target:after{content:'';background:#37553f;border-radius:50%;width:22%;aspect-ratio:1}.cell.last{box-shadow:inset 0 0 0 2px #6d613a}.disc{position:relative;border-radius:50%;width:73%;aspect-ratio:1;display:inline-grid;place-items:center;border:1px solid #30291d;box-shadow:0 2px 3px #3a281bcc,inset 0 -3px 2px #0004,inset 0 2px 1px #fff5}.disc:before{content:'';position:absolute;inset:15%;border:1px solid #ffffff38;border-radius:50%}.A{background:radial-gradient(at 35% 20%,#566158,#26342d 70%)}.D{background:radial-gradient(at 35% 20%,#fff7da,#dccc9f 75%)}.D:before,.K:before{border-color:#84633255}.K{background:#e9b554}.K:after{content:'♚';color:#473319;font:normal clamp(13px,2vw,28px) Georgia}.legend,.row{display:flex;gap:18px}.legend{justify-content:center;margin:18px 0;font-size:.9rem}.legend span{display:flex;align-items:center;gap:7px}.legend i{width:17px}.legend .K:after{font-size:12px}aside{padding:24px 0}h2,h3{font-family:Georgia,serif;font-weight:normal}h2{font-size:clamp(28px,3vw,40px);margin:10px 0}p{color:#c1cec1;line-height:1.55;margin:8px 0 16px}.settings,.log,details{border-top:1px solid #ffffff30;padding-top:20px;margin-top:22px}label,select,textarea{display:block;width:100%}label{font-size:.9rem;margin-bottom:6px}select{margin-bottom:14px}.primary{background:#ddbd83;color:#242d22;border-color:#ddbd83;font-weight:650}.settings .primary{width:100%}ol{padding-left:2.2em;line-height:1.7;max-height:140px;overflow:auto}summary{cursor:pointer}textarea{margin:8px 0}output{display:block;margin:8px 0}dialog{max-width:min(520px,92vw);border:1px solid #778270;background:#1a3028;color:inherit;padding:26px;border-radius:8px}dialog::backdrop{background:#08140ed9}a{color:#efd098}[hidden]{display:none!important}@media(max-width:760px){main{grid-template-columns:1fr;gap:2px;padding:22px 4vw}aside{padding:8px 0}.intro h1{margin-bottom:14px}.legend{gap:12px}}
#exchange{margin-top:20px}#inviteLink{width:100%;padding:9px;margin:4px 0 8px;font:inherit}#connection{color:#e6c889}

/* The command bar spans the board and the move journal. */
body {
  background: radial-gradient(ellipse at 18% 12%, #24463d, transparent 49%),
              linear-gradient(125deg, #12271f, #101f1a 80%);
}
header { height: 54px; background: #0c1e18b8; border-color: #ab946247; }
.brand { font-size: 20px; }
.brand b { font-size: 28px; }
#rules, #reset { background: transparent; border-color: #778b7566; }
main {
  max-width: 1150px; padding: 18px clamp(15px, 4vw, 54px) 30px;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px; align-items: start;
}
.intro, .command { grid-column: 1 / -1; }
.intro { display: flex; align-items: baseline; gap: 20px; }
.intro h1 { margin: 0; font-size: clamp(42px, 5vw, 64px); }
.intro small { white-space: nowrap; }
.command {
  padding: 14px 18px; border: 1px solid #a68d596b; border-radius: 9px;
  background: linear-gradient(115deg, #243d32, #182c24);
  box-shadow: inset 0 1px #ecddb01a, 0 5px 22px #07130d2b;
}
#setup, #summary, .facts { display: flex; align-items: center; gap: 18px; }
#setup { align-items: end; flex-wrap: wrap; }
#summary { justify-content: space-between; }
fieldset { padding: 0; margin: 0; border: 0; min-width: 0; }
legend { font-size: .86rem; color: #d6cfb8; padding: 0; margin-bottom: 6px; }
.choices { display: flex; gap: 3px; padding: 3px; background: #0e211b; border-radius: 6px; }
.choice { position: relative; width: auto; margin: 0; cursor: pointer; }
.choice input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.choice > span, .facts span span {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
}
.choice > span { padding: 9px 11px; border-radius: 4px; color: #d2d8ca; font-size: .93rem; }
.choice:hover > span { background: #294036; }
.choice input:checked + span { background: #e4ca96; color: #1d2a22; box-shadow: inset 0 0 0 1px #f4ddab; }
.choice input:focus-visible + span, button:focus-visible { outline: 2px solid #f4cf7d; outline-offset: 2px; }
.symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.choice svg, .facts svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
#start { margin-left: auto; min-height: 43px; }
.facts { flex-wrap: wrap; gap: 10px 18px; }
.facts svg { color: #eaca8d; }
#seatInfo { padding-left: 16px; border-left: 1px solid #788674; }
.arena { width: 100%; }
.frame {
  position: relative; border-color: #a88450; border-radius: 5px; padding: clamp(10px, 1.3vw, 17px);
  background: repeating-linear-gradient(44deg, transparent 0 5px, #cfad7626 5px 7px, transparent 7px 12px),
              repeating-linear-gradient(-44deg, #523d2e 0 5px, #876642 5px 7px, #523d2e 7px 12px);
  box-shadow: inset 0 0 0 3px #3e332a, inset 0 0 0 4px #c7a671, 0 12px 27px #06110d80;
}
#board { box-shadow: 0 0 0 2px #e1bf7e; }
.cell { background: linear-gradient(115deg, #e3c99c, #d4b37d); }
.cell.alt { background: linear-gradient(115deg, #cba977, #bb925d); }
.disc { width: 75%; }
aside { border-top: 2px solid #b89b66; border-bottom: 1px solid #8b9b8144; padding: 22px 18px; background: linear-gradient(145deg, #294338aa, #162c2355); }
aside h2 { font-size: clamp(27px, 2.7vw, 38px); }
@media(max-width:760px) {
  main { padding-inline: 6px; gap: 10px; }
  .frame { padding: 6px; }
  .intro { gap: 14px; }
  .command { padding: 12px; }
  #setup { gap: 12px; }
  .choice > span { padding: 9px 8px; }
  .legend { margin: 12px 0 0; }
  aside { padding: 16px; }
}
@media(max-width:420px) {
  #setup { display: grid; grid-template-columns: 1fr; }
  .choices { width: fit-content; }
  #start { margin-left: 0; }
  #summary { gap: 8px; }
  .facts { gap: 5px; flex-direction: column; align-items: start; }
  #seatInfo { padding: 0; border: 0; }
}
#board { grid-template-columns: repeat(var(--size,11), minmax(0,1fr)); grid-template-rows: repeat(var(--size,11), minmax(0,1fr)); }
.disc { border: 0; box-shadow: none; border-radius: 0; background: center / contain no-repeat; filter: drop-shadow(0 2px 1px #38291588); }
.disc::before, .disc::after { display: none; }
.disc.A { background-image: url(attacker.svg); }
.disc.D { background-image: url(defender.svg); }
.disc.K { background-image: url(king.svg); }
.cell .disc { width: 83%; }
.cell .disc.K { width: 98%; }
.legend i { width: 22px; }
.legend .K { width: 25px; }
.intro { flex-wrap: wrap; row-gap: 4px; }
.brand { margin: 0; gap: 8px; }
.brand small { font: 500 .8rem "Segoe UI", sans-serif; letter-spacing: .025em; white-space: nowrap; }
.tools, footer { display: flex; align-items: center; gap: 8px; }
footer { justify-content: center; gap: 20px; padding: 14px 12px 26px; font-size: .9rem; }
@media(min-width:761px) {
  .arena, aside { width: min(100%, max(140px, calc(100dvh - var(--command-height, 110px) - 185px))); justify-self: center; }
  aside { padding: 10px 16px; }
  aside > small { display: none; }
  aside h2 { margin: 0; font-size: 1.5rem; }
}
@media(max-width:420px) {
  header { padding-inline: 8px; }
  .brand { gap: 5px; font-size: 18px; }
  .tools button { padding: 8px; }
}
body {
  background: #0e1929 url("viking-night.webp") center center / cover no-repeat fixed;
}
header { background: #0a1424ed; }
.command { background: linear-gradient(115deg, #233247f5, #121f30f5); }
aside { background: linear-gradient(145deg, #1c2a3bec, #111e2ded); }
footer { background: #101d2ee8; }
.cell.special::before {
  content: ""; inset: 10%; background: url("wood-inlay.svg") center / contain no-repeat;
}
.cell:not(.special):not(.target):not(.chosen) {
  background-image: repeating-linear-gradient(5deg, transparent 0 5px, #71512d0a 6px, transparent 7px);
}
@media(max-width:760px) {
  body { background-position: 30% top; }
  aside {
    background: linear-gradient(90deg, #122131f5 30%, #122131ae 63%, #12213128),
                #122131 url("viking-night.webp") right top / auto 165px no-repeat;
  }
}
.cell:not(.special):not(.target):not(.chosen) { background-color: #ddc194; }
.cell.alt:not(.special):not(.target):not(.chosen) { background-color: #c59f6c; }
#resumePanel { padding-top: 8px; margin-top: 10px; }
#resumeForm, #personalCode { margin-top: 8px; }
#personalCode, #resumeCode {
  max-width: 100%; width: 27ch; padding: 8px; border-radius: 4px; border: 1px solid #788674;
  background: #0e211b; color: inherit; font: 1rem monospace;
}
