@font-face{font-family:DM Sans;src:url(fonts/sans.ttf)}@font-face{font-family:DM Sans;src:url(fonts/sans-bold.ttf);font-weight:600 800}@font-face{font-family:DM Serif Text;src:url(fonts/serif.ttf)}
:root{color-scheme:light;--ink:#202e27;--muted:#5b675e;--forest:#244d3c;--line:#d4d9ce;--paper:#fdfdf8;--sans:'DM Sans',Arial,sans-serif;--serif:'DM Serif Text',Georgia,serif}
*{box-sizing:border-box}body{margin:0;background:#f5f5ef;color:var(--ink);font:1rem/1.45 var(--sans)}button,input{font:inherit}button{cursor:pointer}button,a,input,summary{touch-action:manipulation}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #c06d26;outline-offset:3px}[hidden]{display:none!important}.symbols{position:absolute;width:0;height:0;overflow:hidden}.icon{width:1.2rem;height:1.2rem;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;flex:none}
header{background:var(--paper);border-bottom:1px solid var(--line)}.bar,main{width:min(100% - 3rem,65rem);margin:auto}.bar{height:4.15rem;display:flex;align-items:center;justify-content:space-between}.brand{display:inline-flex;align-items:center;gap:.65rem;color:#1d392d;font:1.65rem/1 var(--serif);text-decoration:none;letter-spacing:-.04em}.brandmark{display:grid;place-items:center;width:2.05rem;height:2.05rem;border-radius:.42rem;background:var(--forest);color:#f6f3e8}.brandmark svg{width:1.45rem;height:1.45rem}.textbtn,.sqbtn{border:0;background:transparent;color:var(--ink);display:inline-flex;align-items:center;justify-content:center;gap:.45rem;padding:.5rem;font-size:.92rem}.textbtn:hover,.sqbtn:hover{background:#e9ede3;border-radius:5px}.pagehead{margin:1.85rem 0 1.3rem}.pagehead h1{margin:0;font:clamp(2.15rem,4vw,3.35rem)/1.08 var(--serif);letter-spacing:-.047em;color:#243c2f}.pagehead h1 span{color:#b96f47}.pagehead p{color:var(--muted);margin:.4rem 0 0}
.layout{display:grid;grid-template-columns:minmax(0,1.52fr) minmax(17rem,1fr);gap:clamp(1.6rem,3.4vw,2.9rem);align-items:start;padding-bottom:2rem}.arena{min-width:0}.player{display:flex;align-items:center;gap:.62rem;min-height:2.8rem}.player:first-child{margin-bottom:.35rem}.player:last-child{margin-top:.4rem}.avatar{display:grid;place-items:center;width:2rem;height:2rem;background:#e0e7dc;border:1px solid #c8d0c3;border-radius:.45rem;color:#284b38}.avatar.bot{background:#233c2e;color:#f3eedb;border:0}.avatar svg{width:1.24rem;height:1.24rem}.player strong{font-size:1.02rem}.tag{margin-left:auto;color:var(--muted);font-size:.86rem;display:inline-flex;align-items:center;gap:.4rem}.chip{width:.72rem;height:.72rem;background:#fffdf3;border:1px solid #8b9589;border-radius:50%}.chip.black{background:#25332c;border-color:#25332c}
.board{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));grid-template-rows:repeat(8,minmax(0,1fr));aspect-ratio:1;width:100%;overflow:hidden;border:3px solid #394f3b;border-radius:5px;box-shadow:0 3px 10px #1c291817;background:#ced7b8;user-select:none;isolation:isolate;position:relative}.cell{border:0;margin:0;padding:0;position:relative;display:grid;place-items:center;width:100%;height:100%;min-width:0;min-height:0;color:#435a46;background:#e2e6cf;border-radius:0;-webkit-tap-highlight-color:transparent}.cell.dark{background:#80967c;color:#eef2db}.piece{position:relative;width:84%;height:84%;pointer-events:none;z-index:2;filter:drop-shadow(0 1px 1px #17291c38)}.coord{position:absolute;font-size:clamp(.61rem,1vw,.8rem);font-weight:700;z-index:4;line-height:1}.rank{left:4%;top:4%}.file{right:4%;bottom:3%}.cell.last{box-shadow:inset 0 0 0 99px #e9cd6d55}.cell.selected{background:#d7c26a;box-shadow:inset 0 0 0 3px #8d793b}.cell.check{background:#c68570}.cell.target:after{content:"";position:absolute;z-index:3;background:#253e2c61;border-radius:50%;width:24%;aspect-ratio:1}.cell.capture:after{width:82%;background:none;border:5px solid #344c399c}.cell:focus-visible{z-index:5;outline:3px solid #b25528;outline-offset:-3px}
aside{display:grid;gap:1rem;margin-top:.25rem}.status-card,.paper{border-radius:.8rem;overflow:hidden}.status-card{position:relative;isolation:isolate;background:#234a38;color:#fffef1;padding:1.35rem 1.5rem 1.45rem;min-height:9.1rem}.hero-art{position:absolute;z-index:-1;inset:0 0 0 57%;background:repeating-conic-gradient(#ffffff08 0% 25%,transparent 0% 50%) right bottom / 2.8rem 2.8rem;mask-image:linear-gradient(90deg,transparent,#000 25%)}.hero-art:after{content:"";position:absolute;inset:3% -4% -22% 5%;background:url(pieces/wN.svg) right bottom/contain no-repeat;opacity:.19;filter:sepia(.6);transform:rotate(-9deg)}.status-kicker{display:flex;align-items:center;gap:.5rem;font-size:.76rem;letter-spacing:.14em;font-weight:700;color:#d5e4ca}.status-kicker i{width:.45rem;height:.45rem;border-radius:50%;background:#c8dc96}.status-card h2{font:clamp(1.7rem,3vw,2.25rem)/1.08 var(--serif);letter-spacing:-.04em;margin:.75rem 0 .4rem;max-width:90%}.status-card p{font-size:.95rem;margin:0;color:#e3eada;max-width:85%}
.paper{border:1px solid var(--line);background:var(--paper)}.sectiontitle,.time,.time>span,.sectiontitle h2,.btn,.dialoghead{display:flex;align-items:center}.sectiontitle,.time,.dialoghead{justify-content:space-between}.sectiontitle{padding:1.04rem 1.15rem .94rem}.sectiontitle h2{font-size:1.1rem;margin:0;gap:.52rem}.sectiontitle>span{color:var(--muted);font-size:.83rem}.log-head,.move-row{display:grid;grid-template-columns:2.7rem 1fr 1fr;padding:.38rem 1.15rem;gap:.45rem}.log-head{background:#eff1e9;border-block:1px solid #dbe0d5;color:#596958;font-size:.83rem}.move-row{font-variant-numeric:tabular-nums;border-bottom:1px solid #e9ece4;font-size:.95rem}.move-row span:first-child{color:#6c776d}.log-scroll{height:clamp(7rem,16vh,10rem);overflow:auto;overscroll-behavior:contain}.log-scroll:has(#emptyLog:not([hidden])){display:grid;place-items:center}.log-scroll:has(#emptyLog:not([hidden])) #moves{display:none}#emptyLog{text-align:center;color:var(--muted);padding:.75rem}#emptyLog p{font-size:.9rem;margin:.18rem 0}.empty-mark{font:2.1rem/1 Georgia,serif;color:#738576}.controls{padding:1rem 1.13rem}.time{font-size:.91rem;margin:0 0 .85rem}.time>span{gap:.45rem;color:var(--muted)}.btn{width:100%;justify-content:center;gap:.55rem;padding:.62rem .8rem;border-radius:.45rem;min-height:2.65rem;font-weight:600;font-size:.95rem}.primary{border:1px solid var(--forest);background:var(--forest);color:#fff}.primary:hover{background:#193b2c}.secondary{background:transparent;border:1px solid #c6cec2;color:#304435;margin-top:.55rem}.secondary:hover{background:#e9ede3}
dialog{width:min(90vw,27rem);max-height:85dvh;border:1px solid var(--line);border-radius:.85rem;padding:1.5rem;background:var(--paper);color:var(--ink);box-shadow:0 1.5rem 5rem #0a201a38}dialog::backdrop{background:#132b21a8}.dialoghead h2{font:1.85rem var(--serif);margin:0;letter-spacing:-.04em}.sqbtn{height:2.5rem;width:2.5rem}dialog p{font-size:.97rem;color:var(--muted)}fieldset{margin:1.4rem 0;border:0;padding:0}legend{font-weight:600;margin-bottom:.5rem}.choices{display:flex;gap:.4rem}.choices label{flex:1;position:relative}.choices input{position:absolute;opacity:0}.choices span{display:block;text-align:center;border:1px solid #cad2c6;border-radius:.4rem;padding:.55rem .2rem;font-size:.9rem;cursor:pointer}.choices input:checked+span{background:#e4ecdf;color:var(--forest);border-color:var(--forest);font-weight:600}.choices input:focus-visible+span{outline:2px solid #b96f47}.choices+button{margin-top:.8rem}a{color:var(--forest)}details{font-size:.9rem;border-top:1px solid var(--line);padding-top:.8rem}summary{cursor:pointer}#promotionOptions{display:flex;gap:.4rem}#promotionOptions button{background:#e9ede3;border:1px solid var(--line);border-radius:.45rem;flex:1;padding:.25rem}#promotionOptions img{width:100%}
@media(min-width:960px) and (max-height:850px){.bar,main{width:min(100% - 3rem,58rem)}.pagehead{margin:1.3rem 0 .7rem}.layout{grid-template-columns:minmax(0,1.42fr) minmax(17rem,1fr)}}
@media(max-width:740px){.bar,main{width:min(100% - 1.6rem,34rem)}.bar{height:3.5rem}.brand{font-size:1.45rem}.pagehead{margin:1.25rem 0 .65rem}.pagehead p{font-size:.95rem}.layout{grid-template-columns:1fr;gap:.85rem}.player{min-height:2.45rem}.status-card{min-height:0;padding:1rem 1.2rem}.status-card h2{margin:.4rem 0 .25rem}.hero-art{left:65%}aside{gap:.75rem}.board{border-width:2px}.piece{width:87%;height:87%}.rank,.file{font-size:.64rem}.log-scroll{height:7rem}}
.cell.grabbable{cursor:grab;touch-action:none;-webkit-touch-callout:none;-webkit-user-select:none}
.cell.dragging{z-index:7;cursor:grabbing;overflow:visible}
.cell.dragging .piece{will-change:transform}
