/* GOC chess (title: title.js QC_TITLE; path /quick-chess/; chess1 preview, Nov 10 2026). Original robot pieces, 2D renderer; 3D toggle hidden until 3D art is approved. */
:root{--cy:#5fd8ff;--cy2:#b8f1ff;--rd:#ff5a6a;--qsq:64px}
body.qc{font-size:18px}
.qc .gk-btn{min-height:48px;min-width:48px;font-size:18px}
.qc .gk-btn.icon{width:48px}
.qc .gk-seg button{min-height:48px;font-size:18px}
.qc .gk-card p,.qc .gk-card li{font-size:18px}
.qc .gk-set{font-size:18px}.qc .gk-set small{font-size:18px}
.qc .gk-notices{font-size:18px;padding-top:4px;padding-bottom:calc(var(--sab) + 4px)}
.qc .gk-bar h2{font-size:20px}
.qc-bg{background:radial-gradient(120% 90% at 50% 0%,#1b2a4a 0%,#0b1020 55%,#05060c 100%)}
.qc-bg::after{background:linear-gradient(transparent 0 calc(100% - 1px),rgba(95,216,255,.05) 0) 0 0/100% 32px,linear-gradient(90deg,transparent 0 calc(100% - 1px),rgba(95,216,255,.05) 0) 0 0/32px 100%}
/* title */
.qc-title-scroll{flex:1;min-height:0;overflow:auto;-webkit-overflow-scrolling:touch;padding:4px 2px 16px;display:flex;flex-direction:column;align-items:center}
.qc-banner{display:inline-flex;align-items:center;gap:10px;margin:2px 0 6px;padding:8px 16px;border-radius:999px;font-size:18px;font-weight:700;color:var(--cy2);background:linear-gradient(90deg,rgba(95,216,255,.14),rgba(255,90,106,.14));border:1.5px solid rgba(95,216,255,.45);box-shadow:0 0 18px rgba(95,216,255,.18) inset}
.qc-banner .dot{width:10px;height:10px;border-radius:50%;background:var(--cy);box-shadow:0 0 8px var(--cy)}
.qc-hero{position:relative;display:flex;justify-content:center;align-items:flex-end;height:min(22vh,190px);width:100%;margin-top:2px}
.qc-hero .hp{height:100%;width:auto;filter:drop-shadow(0 10px 14px rgba(0,0,0,.6))}
.qc-hero .hp.r{margin-left:-6%}
.qc-hero::after{content:"";position:absolute;left:50%;bottom:-4px;width:min(320px,70%);height:22px;transform:translateX(-50%);background:radial-gradient(closest-side,rgba(95,216,255,.35),transparent);z-index:-1}
.qc-logo{margin:6px 0 2px;font-size:40px;letter-spacing:.04em;background:linear-gradient(180deg,#fff,#b8f1ff 45%,#5fd8ff);-webkit-background-clip:text;background-clip:text;color:transparent;text-shadow:none;filter:drop-shadow(0 2px 0 rgba(0,0,0,.6))}
.qc-host{margin:0 0 10px;text-align:center;font-size:18px;color:var(--ink2)}
.qc-host .bl{color:#8fc8ff}.qc-host .pk{color:#ff9fd0}
.qc-panel{width:min(560px,100%);padding:14px;border-radius:22px;background:linear-gradient(180deg,rgba(24,36,64,.92),rgba(10,14,28,.94));border:1.5px solid rgba(95,216,255,.35);box-shadow:0 18px 50px rgba(0,0,0,.55),inset 0 1px 0 rgba(255,255,255,.08)}
.qc-panel .lbl{margin:10px 0 6px;font-size:18px;font-weight:700;color:var(--cy2);display:flex;justify-content:space-between;gap:8px}
.qc-panel .lbl:first-child{margin-top:0}
.qc-panel .gk-seg button{background:#111a30;border-color:rgba(95,216,255,.35);display:inline-flex;align-items:center;justify-content:center;gap:6px}
.qc-panel .gk-seg button[aria-pressed="true"]{background:linear-gradient(180deg,#b8f1ff,#5fd8ff);color:#06202c;border-color:#e6fbff}
.qc-modes button{flex:1 1 45%}
.mf{width:30px;height:30px;border-radius:50%;object-fit:cover;background:#0b1020}
.mf.blue{box-shadow:0 0 0 2px #6aa8ff}.mf.pink{box-shadow:0 0 0 2px #ff8fc6}
.mi{font-size:20px}
.lvrow{display:flex;align-items:center;gap:8px}
.lvr{flex:1;min-width:0;height:48px;accent-color:var(--cy)}
.lvn{width:76px;min-height:48px;border-radius:12px;border:1.5px solid rgba(95,216,255,.35);background:#0b1020;color:var(--ink);font:inherit;font-size:18px;font-weight:700;text-align:center}
.lvw{color:var(--gold2)}
.lvnote{margin:6px 0 0;font-size:18px;color:#cdbfa3;min-height:1em}
.sw{display:inline-block;width:18px;height:18px;border-radius:50%;border:2px solid #d9b45a}
.sw.lt{background:radial-gradient(circle at 35% 30%,#fffaf0,#d9cfb8);box-shadow:0 0 6px #5fd8ff}
.sw.dk{background:radial-gradient(circle at 35% 30%,#555,#111);box-shadow:0 0 6px #ff5a6a}
.two-note,.onl-note p{font-size:18px;color:var(--ink2);margin:10px 0 0}
.onl-note{margin-top:8px;padding:10px 12px;border-radius:14px;background:rgba(255,90,106,.08);border:1px solid rgba(255,90,106,.35)}
#btnPlay{width:100%;margin-top:14px}
.rec{margin:8px 0 0;text-align:center;font-size:18px;color:#cdbfa3}
/* game layout */
.qc-gbar h2{font-size:20px}
.qc-wrap{flex:1;min-height:0;display:flex;flex-direction:column;gap:6px;padding-bottom:6px}
.qc-main{flex:1;min-height:0;display:flex;flex-direction:column;gap:4px}
.pl{flex:none;display:flex;align-items:center;gap:8px;min-height:48px;padding:3px 10px;border-radius:14px;background:rgba(10,16,32,.7);border:1px solid rgba(95,216,255,.2);font-size:18px}
.pl img.av{width:40px;height:40px;border-radius:50%;object-fit:cover;background:#0b1020}
.pl .nm{font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pl .caps{flex:1;min-width:0;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:0;overflow:hidden;max-height:40px}
.pl .caps img{width:22px;height:22px;object-fit:contain;margin-left:-6px}
.pl .eyes{width:12px;height:12px;border-radius:50%;flex:none}
.pl.turn{border-color:var(--cy);box-shadow:0 0 0 1px var(--cy) inset,0 0 14px rgba(95,216,255,.25)}
.pl .think{color:var(--cy2);font-size:18px;white-space:nowrap}
.qc-vp{position:relative;flex:1;min-height:0;overflow:hidden;touch-action:none;border-radius:16px;outline:none;background:radial-gradient(70% 60% at 50% 48%,rgba(255,206,130,.10),transparent 70%)}
.qc-vp:focus-visible{box-shadow:0 0 0 3px #8fd3ff inset}
.qc-board{position:absolute;left:0;top:0;width:calc(var(--qsq)*8 + 12px);height:calc(var(--qsq)*8 + 12px);padding:6px;transform-origin:0 0;will-change:transform;border-radius:12px;
  /* warm brass frame with a bevel: top-left catches the key light, bottom-right falls off */
  background:linear-gradient(150deg,#f6dc94 0%,#c99a3e 18%,#8a5f1c 46%,#b9862f 72%,#6b4512 100%);
  box-shadow:inset 0 1px 0 rgba(255,246,214,.75),inset 0 -1px 0 rgba(40,24,4,.8),0 0 0 1px #2a1a05,0 2px 0 1px rgba(0,0,0,.35),0 22px 44px rgba(0,0,0,.62)}
.qc-board::before{content:"";position:absolute;inset:4px;border-radius:7px;pointer-events:none;z-index:0;box-shadow:0 0 0 1px rgba(30,18,4,.9),inset 0 0 0 1px rgba(255,236,180,.25)}
/* brass rivets in the four corners */
.qc-board::after{content:"";position:absolute;inset:0;border-radius:12px;pointer-events:none;
  background:radial-gradient(circle,#fff3c4 0 1px,#a77a2a 1.7px,rgba(40,24,4,.6) 2.3px,transparent 2.8px) 0 0/6px 6px no-repeat,radial-gradient(circle,#fff3c4 0 1px,#a77a2a 1.7px,rgba(40,24,4,.6) 2.3px,transparent 2.8px) 100% 0/6px 6px no-repeat,radial-gradient(circle,#fff3c4 0 1px,#a77a2a 1.7px,rgba(40,24,4,.6) 2.3px,transparent 2.8px) 0 100%/6px 6px no-repeat,radial-gradient(circle,#fff3c4 0 1px,#a77a2a 1.7px,rgba(40,24,4,.6) 2.3px,transparent 2.8px) 100% 100%/6px 6px no-repeat}
.qc-grid{position:relative;width:calc(var(--qsq)*8);height:calc(var(--qsq)*8);display:grid;grid-template-columns:repeat(8,1fr);grid-template-rows:repeat(8,1fr);border-radius:3px;overflow:visible;z-index:1}
/* soft key light from the top-left plus an edge vignette; sits above squares, below pieces */
.qc-grid::after{content:"";position:absolute;inset:0;pointer-events:none;z-index:2;border-radius:3px;
  background:radial-gradient(120% 90% at 30% 20%,rgba(255,244,214,.14),transparent 55%),radial-gradient(140% 120% at 50% 50%,transparent 58%,rgba(6,8,14,.34) 100%)}
.sq{position:relative}
/* light = brushed steel (cool, so warm ivory pieces stand off it), dark = blued gunmetal; fine brushed grain is CSS only (no image bytes) */
.sq.l{background:repeating-linear-gradient(90deg,rgba(255,255,255,.07) 0 1px,rgba(0,0,0,.025) 1px 2px,transparent 2px 4px),linear-gradient(135deg,#c9d0d8,#a2acb9)}
.sq.d{background:repeating-linear-gradient(90deg,rgba(255,255,255,.04) 0 1px,rgba(0,0,0,.04) 1px 2px,transparent 2px 4px),linear-gradient(135deg,#46536a,#28323f)}
.sq.l::before,.sq.d::before{content:"";position:absolute;inset:0;box-shadow:inset 0 1px 0 rgba(255,255,255,.16),inset 0 -1px 0 rgba(0,0,0,.2);pointer-events:none}
/* markers: last move = warm amber wash, selected = cyan, check = steady red glow (nothing blinks) */
.sq.last::after{content:"";position:absolute;inset:0;background:rgba(255,190,70,.42);box-shadow:inset 0 0 0 2px rgba(255,214,130,.45)}
.sq.sel::after{content:"";position:absolute;inset:0;background:rgba(95,216,255,.38);box-shadow:inset 0 0 0 3px #b8f1ff}
.sq.chk::after{content:"";position:absolute;inset:0;background:radial-gradient(circle,rgba(255,50,70,.9),rgba(255,50,70,.35) 50%,transparent 75%)}
.sq.cur{box-shadow:inset 0 0 0 4px #ffe58a;z-index:1}
.sq .dot{position:absolute;left:50%;top:50%;width:32%;height:32%;transform:translate(-50%,-50%);border-radius:50%;background:radial-gradient(circle at 40% 35%,#e6fbff,#5fd8ff 55%,#2a8fb8);box-shadow:0 0 0 2px rgba(6,24,36,.45),0 1px 3px rgba(0,0,0,.4);z-index:3;pointer-events:none}
.sq .ring{position:absolute;inset:3%;border-radius:50%;border:4px solid rgba(95,216,255,.9);box-shadow:0 0 0 2px rgba(6,24,36,.4);z-index:3;pointer-events:none}
.co{position:absolute;font-size:18px;line-height:1;font-weight:700;pointer-events:none;z-index:3;opacity:.9}
.sq.l .co{color:#28323f}.sq.d .co{color:#dfe5ec}
.co.f{right:3px;bottom:2px}.co.r{left:3px;top:2px}
.qc-board.nocoords .co{display:none}
.pc{position:absolute;left:0;top:0;width:var(--qsq);height:var(--qsq);pointer-events:none;z-index:4;transition:transform .26s cubic-bezier(.2,.9,.25,1.08)}
/* the piece image box is 150% of a square, feet at 97%; per-type height is baked into the art by tools/qc_pieces.py */
.pc img{position:absolute;left:-25%;bottom:3%;width:150%;height:150%;object-fit:contain;object-position:50% 100%}
/* edge treatment depends on the square under the piece (class .onl = light square), so no cutout looks haloed:
   on light steel -> a thin dark ink edge; on dark gunmetal -> a soft rim light (warm for Light pieces, cool steel for Dark) */
.pc img{filter:drop-shadow(1px 2px 1.5px rgba(0,0,0,.42))}
.pc.onl img{filter:drop-shadow(0 0 .6px rgba(14,10,4,.85)) drop-shadow(1px 2px 1.5px rgba(0,0,0,.38))}
.pc.lt:not(.onl) img{filter:drop-shadow(0 0 .6px rgba(255,238,205,.5)) drop-shadow(1px 2px 1.5px rgba(0,0,0,.45))}
.pc.dk:not(.onl) img{filter:drop-shadow(0 0 .6px rgba(205,228,255,.5)) drop-shadow(1px 2px 1.5px rgba(0,0,0,.45))}
/* soft contact shadow, offset away from the top-left key light */
.pc::before{content:"";position:absolute;left:16%;right:10%;bottom:2%;height:18%;border-radius:50%;background:radial-gradient(closest-side,rgba(0,0,0,.55),rgba(0,0,0,.18) 70%,transparent)}
.pc.lift img{transform:translateY(-10%) scale(1.06);transition:transform .14s cubic-bezier(.2,.9,.3,1)}
.pc.dip img{transform:translateY(3%) scale(.97);transition:transform .07s ease-in}
.pc.drag{opacity:.35}
.pc.gone{opacity:0;transition:opacity .18s}
.calm .pc,.calm .pc img{transition:none!important}
.qc-ghost{position:absolute;left:0;top:0;pointer-events:none;z-index:20;filter:drop-shadow(0 12px 10px rgba(0,0,0,.6));will-change:transform}
/* side */
.qc-side{flex:none;display:flex;flex-direction:column;gap:6px}
.qc-cam{display:flex;gap:6px}
.qc-cam #zFit{flex:1}
.qc-status{flex:none;display:flex;align-items:center;gap:8px;min-height:48px}
.qc-msg{flex:1;min-width:0;margin:0;min-height:26px;text-align:center;font-size:18px;line-height:1.2;font-weight:700;color:var(--cy2)}
.qc-flip{flex:none;white-space:nowrap;padding:0 12px}
.qc-flip[aria-pressed="true"]{border-color:var(--cy)}
.qc-ctl,.qc-cam,.qc-acts{flex:none}
.qc-acts{display:flex;gap:6px}.qc-acts .gk-btn{flex:1;padding:0 8px}
.qc-moves{display:none;margin:0;padding:6px 8px 6px 34px;max-height:100%;overflow:auto;font-size:18px;color:var(--ink2);background:rgba(10,16,32,.6);border-radius:12px;border:1px solid rgba(95,216,255,.2)}
.qc-promo{display:flex;gap:8px;justify-content:center}
.qc-promo button{width:72px;height:88px;border-radius:14px;border:1.5px solid rgba(95,216,255,.45);background:#111a30;cursor:pointer;padding:4px}
.qc-promo img{width:100%;height:100%;object-fit:contain}
.end-face{display:flex;justify-content:center;gap:8px}.end-face img{width:84px;height:84px;object-fit:contain}
.end-why{text-align:center}
/* landscape: side panel on the right, board gets full height */
@media (orientation:landscape) and (max-height:600px){
  .qc .gk-notices{display:none}
  .gk-app{padding-bottom:calc(var(--sab) + 4px)}
  #sGame .qc-gbar{position:absolute;right:calc(var(--sar) + 10px);top:calc(var(--sat) + 6px);width:min(300px,40vw);min-height:48px;flex-wrap:nowrap;justify-content:flex-end;z-index:5}
  #sGame .qc-gbar h2{display:none}
  #sGame .qc-wrap{display:grid;grid-template-columns:1fr min(300px,40vw);grid-template-rows:auto auto 1fr;gap:6px 10px;padding-bottom:0}
  #sGame .qc-main{display:contents}
  #sGame .qc-vp{grid-column:1;grid-row:1/4}
  #sGame #plTop{grid-column:2;grid-row:1;margin-top:56px}
  #sGame #plBot{grid-column:2;grid-row:2}
  #sGame .pl{min-height:44px;padding:2px 8px}
  #sGame .pl img.av{width:34px;height:34px}
  #sGame .qc-side{grid-column:2;grid-row:3;min-height:0;justify-content:flex-start;overflow:auto}
  #sGame .qc-moves{display:block;flex:1;min-height:48px}
  .qc-hero{height:min(32vh,140px)}
}
@media (orientation:landscape) and (min-height:601px){
  #sGame .qc-wrap{flex-direction:row}
  #sGame .qc-side{width:min(360px,34vw);justify-content:center}
  #sGame .qc-moves{display:block;max-height:40vh}
}
@media (display-mode:standalone){.gk-app{padding-top:calc(var(--sat) + 8px)}}

/* game screen: give the board every pixel on phones */
@media (max-width:480px){#sGame .pl{min-height:44px;padding:2px 8px}#sGame .pl img.av{width:34px;height:34px}}
body.ingame .gk-app{padding-left:calc(var(--sal) + 4px);padding-right:calc(var(--sar) + 4px)}
.qc-ctl{display:flex;flex-direction:column;gap:6px}
@media (orientation:portrait),(max-width:560px){
  body.ingame .gk-notices{display:none}
  body.ingame .gk-app{padding-bottom:calc(var(--sab) + 4px)}
  .qc-ctl{flex-direction:row;gap:5px}
  .qc-cam,.qc-acts{gap:5px}
  .qc-ctl .t{display:none}
  .qc-ctl .gk-btn{padding:0 6px;min-width:48px}
  .qc-cam #zFit .t{display:inline}.qc-cam #zFit .lg{display:none}
  .qc-acts{flex:none}.qc-acts .gk-btn{flex:none;width:48px}
  .qc-cam{flex:1}
  .qc-side{order:0}
}

/* dynamic viewport: iOS Safari toolbars must never cover the controls or move list (forensics, Nov 10) */
.qc .gk-app{bottom:auto;height:100vh;height:100dvh;height:var(--qc-vvh,100dvh)}
@media (orientation:landscape) and (max-height:600px){
  .qc .gk-app{padding-right:calc(var(--sar) + 8px);padding-left:calc(var(--sal) + 8px);padding-bottom:calc(var(--sab) + 6px)}
  #sGame .qc-side{padding-bottom:calc(var(--sab) + 4px)}
  #sGame .qc-status{min-height:0;flex-direction:column;align-items:stretch}
  #sGame .qc-msg{text-align:left;min-height:0}
  #sGame .qc-acts .gk-btn{flex:none;width:48px}#sGame .qc-acts .t{display:none}
  #sGame .qc-acts .qc-flip{flex:1;width:auto}
  #sGame .qc-cam #zFit .lg{display:none}
}
/* separate Music / SFX volume sliders (48px tall targets) */
.qc-vol{-webkit-appearance:none;appearance:none;flex:1 1 160px;min-width:140px;height:48px;background:transparent;cursor:pointer}
.qc-vol::-webkit-slider-runnable-track{height:8px;border-radius:999px;background:linear-gradient(90deg,#3a6ea8,#5fd8ff)}
.qc-vol::-moz-range-track{height:8px;border-radius:999px;background:linear-gradient(90deg,#3a6ea8,#5fd8ff)}
.qc-vol::-webkit-slider-thumb{-webkit-appearance:none;width:32px;height:32px;margin-top:-12px;border-radius:50%;background:#eafcff;border:3px solid #5fd8ff;box-shadow:0 2px 6px rgba(0,0,0,.5)}
.qc-vol::-moz-range-thumb{width:28px;height:28px;border-radius:50%;background:#eafcff;border:3px solid #5fd8ff}
.qc-vol:focus-visible{outline:3px solid #8fd3ff;outline-offset:2px;border-radius:10px}
/* ---------- Board size: Large (body.qc-large) ---------- */
.qc .qc-size{flex-wrap:wrap;gap:8px}.qc .qc-size .gk-seg{flex:1 1 220px}.qc .qc-size .gk-seg button{flex:1;min-height:48px;font-size:18px}
.qc #sizeSeg button[aria-pressed="true"]{background:linear-gradient(180deg,#b8f1ff,#5fd8ff);color:#06202c;border-color:#e6fbff}
body.qc-large .qc-board{padding:2px;border-radius:5px;box-shadow:inset 0 1px 0 rgba(255,246,214,.6),0 0 0 1px #2a1a05,0 10px 24px rgba(0,0,0,.55)}
body.qc-large .qc-board::before,body.qc-large .qc-board::after{display:none}
body.qc-large .qc-vp{border-radius:0}
/* phones in portrait: edge to edge, both players share one compact row above the board */
@media (orientation:portrait),(max-width:560px){
  body.ingame.qc-large .gk-app{padding-left:var(--sal);padding-right:var(--sar)}
  body.qc-large #sGame .qc-gbar,body.qc-large #sGame .qc-side{padding:0 4px}
  body.qc-large #sGame .qc-main{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto 1fr;gap:4px 4px}
  body.qc-large #sGame #plTop{grid-column:1;grid-row:1;margin-left:4px}
  body.qc-large #sGame #plBot{grid-column:2;grid-row:1;margin-right:4px}
  body.qc-large #sGame .qc-vp{grid-column:1/3;grid-row:2}
  body.qc-large #sGame .pl .caps{display:none}
  body.qc-large #sGame .pl{padding:2px 6px;gap:6px}
}
/* tablets / desktop and big landscape: players move into the side panel so the board uses the full height */
@media (orientation:landscape) and (min-height:601px){
  body.qc-large #sGame .qc-wrap{display:grid;grid-template-columns:1fr min(360px,34vw);grid-template-rows:auto auto 1fr;gap:6px 12px}
  body.qc-large #sGame .qc-main{display:contents}
  body.qc-large #sGame .qc-vp{grid-column:1;grid-row:1/4}
  body.qc-large #sGame #plTop{grid-column:2;grid-row:1}
  body.qc-large #sGame #plBot{grid-column:2;grid-row:2}
  body.qc-large #sGame .qc-side{grid-column:2;grid-row:3;width:auto;justify-content:flex-start}
}
/* small landscape phones already put the HUD on the right; Large just drops the frame and headroom */
/* "more board this way" hint when zoomed (Large on phones opens at 1.3x): soft static fades on the hidden sides */
.qc-edge{position:absolute;inset:0;pointer-events:none;z-index:15;--el:0;--er:0;--et:0;--eb:0;
  background:linear-gradient(90deg,rgba(4,6,12,var(--el)),transparent 36px),linear-gradient(270deg,rgba(4,6,12,var(--er)),transparent 36px),
  linear-gradient(180deg,rgba(4,6,12,var(--et)),transparent 36px),linear-gradient(0deg,rgba(4,6,12,var(--eb)),transparent 36px)}
.qc-vp.more-l .qc-edge{--el:.85}.qc-vp.more-r .qc-edge{--er:.85}.qc-vp.more-t .qc-edge{--et:.85}.qc-vp.more-b .qc-edge{--eb:.85}
/* chess1: invite a friend (qg-room) */
.onl-box{margin-top:8px;padding:12px;border-radius:14px;background:rgba(95,216,255,.06);border:1px solid rgba(95,216,255,.28)}
.onl-p{font-size:18px;color:var(--ink2);margin:0 0 10px}
.onl-join{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:12px}
.onl-join label{font-size:18px;font-weight:700}
.onl-in{flex:1;min-width:120px;max-width:200px;height:48px;padding:0 12px;border-radius:12px;border:1px solid rgba(255,226,140,.55);background:#0b1020;color:#fff;font:700 22px/1 inherit;letter-spacing:.18em;text-transform:uppercase}
.onl-room{margin-top:14px;text-align:center}
.onl-code{font-size:40px;font-weight:800;letter-spacing:.22em;color:#ffe28c;margin:2px 0 8px;text-shadow:0 2px 0 rgba(0,0,0,.5)}
.onl-share{display:flex;gap:8px;justify-content:center}
.onl-link{font-size:16px;color:var(--ink2);word-break:break-all;margin:8px 0;user-select:all;-webkit-user-select:all}
.onl-st{font-size:18px;color:#b8f1ff;margin:8px 0}
.onl-err{font-size:18px;color:#ffb3bb;margin:8px 0 0;min-height:0}
.onl-err:empty{display:none}
/* chess1: power pieces read clearly bigger than pawns (owner t8942u) */
.pc[data-t="p"] img{left:-8%;width:116%;height:116%}
/* chess1: full title fits the game bar at 360-430 px (two short lines if needed, never an ellipsis) */
.qc .qc-gbar h2{font-size:clamp(17px,4.9vw,20px);line-height:1.08;white-space:normal;text-overflow:clip;overflow:visible;overflow-wrap:normal;word-break:keep-all}

/* ---------- tfCH1 (Nov 11 2026): turn glow, clocks, draws, four-royal hero, desktop layout ---------- */
.qc-host .dk{color:#ffd28a}.qc-host .ld{color:#e8c6ff}
.qc-hero{height:min(26vh,210px)}
.qc-hero .hp{height:100%;width:auto;max-width:28%;object-fit:contain;filter:drop-shadow(0 10px 14px rgba(0,0,0,.6))}
.qc-hero .hp.l2{margin-left:-4%}.qc-hero .hp.r2{margin-left:-4%}.qc-hero .hp.r{margin-left:-4%}
.pl.turn{border-color:var(--cy);animation:qcBreath 2s ease-in-out infinite}
@keyframes qcBreath{
  0%,100%{box-shadow:0 0 0 2px var(--cy) inset,0 0 12px rgba(95,216,255,.35);border-color:var(--cy)}
  50%{box-shadow:0 0 0 3px #eafcff inset,0 0 26px rgba(95,216,255,.85);border-color:#eafcff}
}
body.calm .pl.turn{animation:none;box-shadow:0 0 0 2px var(--cy) inset,0 0 14px rgba(95,216,255,.4)}
@media (prefers-reduced-motion:reduce){
  .pl.turn{animation:none;box-shadow:0 0 0 2px var(--cy) inset,0 0 14px rgba(95,216,255,.4)}
}
.pl .clk{flex:none;margin-left:auto;font-variant-numeric:tabular-nums;font-weight:800;font-size:20px;color:#ffe58a;min-width:3.4em;text-align:right}
.pl .clk.run{color:#fff6c8;text-shadow:0 0 8px rgba(255,229,138,.55)}
.pl .clk.low{color:#ff8a96}
.pl.turn .clk{color:#fff}
.onl-in.name{letter-spacing:0;font-size:18px;text-transform:none;max-width:240px;font-weight:600}
.onl-rejoin{margin-top:12px;padding:10px;border-radius:12px;background:rgba(255,229,138,.08);border:1px solid rgba(255,229,138,.35);text-align:center}
.qc-clock{flex-wrap:wrap;gap:8px}.qc-clock .gk-seg{flex:1 1 220px}.qc-clock .gk-seg button{flex:1;min-height:48px;font-size:18px}
.qc #clockSeg button[aria-pressed="true"]{background:linear-gradient(180deg,#b8f1ff,#5fd8ff);color:#06202c;border-color:#e6fbff}

/* Laptops and desktops (>=1024): full desktop layout, never the phone look. */
@media (min-width:1024px){
  body.ingame .gk-notices{display:block}
  body.ingame .gk-app{padding-left:calc(var(--sal) + 16px);padding-right:calc(var(--sar) + 16px);padding-bottom:calc(var(--sab) + 8px)}
  #sGame .qc-gbar{position:static;width:auto;justify-content:flex-start;flex-wrap:nowrap}
  #sGame .qc-gbar h2{display:block;font-size:22px;line-height:1.15;white-space:nowrap;overflow:visible;text-overflow:clip;word-break:keep-all}
  #sGame .qc-wrap{display:grid!important;grid-template-columns:1fr min(400px,34vw);grid-template-rows:auto auto 1fr;flex-direction:unset;gap:10px 18px}
  #sGame .qc-main{display:contents!important}
  #sGame .qc-vp{grid-column:1;grid-row:1/4;min-height:0;border-radius:16px}
  #sGame #plTop{grid-column:2;grid-row:1;margin-top:0;margin-left:0;margin-right:0}
  #sGame #plBot{grid-column:2;grid-row:2;margin-right:0}
  #sGame .qc-side{grid-column:2;grid-row:3;width:auto!important;justify-content:flex-start;overflow:auto;order:0;min-height:0}
  #sGame .qc-moves{display:block;flex:1;min-height:140px;max-height:none}
  #sGame .qc-ctl{flex-direction:column}
  #sGame .qc-ctl .t{display:inline}
  #sGame .qc-acts{flex:none}
  #sGame .qc-acts .gk-btn{flex:1;width:auto;padding:0 8px}
  #sGame .qc-cam #zFit .t{display:inline}
  #sGame .qc-cam #zFit .lg{display:inline}
  #sGame .pl .caps{display:flex}
  #sGame .pl{min-height:52px}
  #sGame .pl img.av{width:44px;height:44px}
  body.qc-large #sGame .qc-main{display:contents!important}
  body.qc-large #sGame .qc-wrap{display:grid!important;grid-template-columns:1fr min(400px,34vw);grid-template-rows:auto auto 1fr}
  body.qc-large #sGame .qc-vp{grid-column:1;grid-row:1/4;border-radius:16px}
  body.qc-large #sGame #plTop,body.qc-large #sGame #plBot{grid-column:2}
  body.qc-large #sGame .qc-side{grid-column:2;grid-row:3;width:auto}
  body.qc-large #sGame .pl .caps{display:flex}
  .qc-hero{height:min(28vh,240px)}
  .qc-logo{font-size:48px}
  .qc-panel{width:min(640px,100%)}
}


/* tfCH1-title-fit: Play / Create invite must be visible on laptop 1366x768 and phone 390x844 without a hunt-to-scroll. */
.qc-title-scroll{padding-bottom:24px}
@media (max-height:900px){
  .qc-banner{padding:4px 12px;margin:2px 0 4px;font-size:16px}
  .qc-hero{height:min(16vh,120px)}
  .qc-logo{font-size:32px;margin:4px 0 2px}
  .qc-host{font-size:16px;margin:0 0 6px;max-width:640px}
  .qc-panel{padding:10px}
  .qc-panel .lbl{margin:6px 0 4px}
  .qc-panel .lvnote{font-size:15px;margin:4px 0 0}
}
@media (max-width:500px) and (max-height:900px){
  .qc-hero{height:min(14vh,100px)}
  .qc-logo{font-size:28px;line-height:1.08}
  .qc-host{font-size:15px;padding:0 6px}
  .qc-banner{font-size:15px}
  #lvNote{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
}
@media (min-width:1024px){
  .qc-title-scroll{
    display:grid;
    grid-template-columns:minmax(0,1fr) min(520px,46vw);
    grid-template-rows:auto auto auto 1fr;
    align-items:center;
    justify-items:center;
    gap:4px 28px;
    width:100%;
    max-width:1180px;
    margin:0 auto;
    padding:8px 20px 20px;
  }
  .qc-banner{grid-column:1/-1;justify-self:center}
  .qc-hero{grid-column:1;grid-row:2;height:min(38vh,280px);width:100%}
  .qc-logo{grid-column:1;grid-row:3;font-size:clamp(36px,4.4vw,52px);margin:8px 0 4px}
  .qc-host{grid-column:1;grid-row:4;align-self:start;max-width:520px}
  .qc-panel{grid-column:2;grid-row:2/5;width:100%;align-self:center;max-height:100%;overflow:auto}
}
@media (min-width:1024px) and (max-height:800px){
  .qc-hero{height:min(34vh,200px)}
  .qc-logo{font-size:40px;margin:4px 0 2px}
  .qc-host{font-size:16px}
}

/* tfCH1b: Host table rules (t9163u / t9164u) */
.rules-card{margin:12px 0 10px;padding:12px 12px 10px;border-radius:16px;background:rgba(8,14,30,.55);border:1.5px solid rgba(255,229,138,.35)}
.rules-h{margin:0 0 4px;font-size:20px;color:#ffe58a;letter-spacing:.03em;text-align:left}
.rules-lead,.rules-card .hint,p.hint{margin:0 0 8px;font-size:15px;color:var(--ink2);font-weight:500}
.rules-card .lbl{margin:8px 0 4px;font-size:16px;color:#ffe58a}
.rules-card .lbl .hint{display:block;font-size:13px;color:var(--ink2);font-weight:500;margin:0}
.rules-card .gk-seg{margin-bottom:2px}
.rules-card .gk-seg button{min-height:48px;font-size:16px}
.rules-sum{margin:10px 0;padding:10px 12px;border-radius:12px;background:rgba(255,229,138,.08);border:1px solid rgba(255,229,138,.32);color:var(--ink2);font-size:16px;text-align:left}
.rules-sum li,.rules-list li{margin:4px 0;line-height:1.35}
.rules-list{margin:8px 0 14px;padding-left:20px;text-align:left;color:var(--ink2);font-size:17px}
.set-note{font-size:16px;color:var(--ink2);margin:0 0 12px;line-height:1.35}
#btnStartGame{width:100%;margin:8px 0}
#btnUndo.claim{box-shadow:0 0 0 2px #ffe58a inset,0 0 14px rgba(255,229,138,.45)}
#undoLbl{white-space:nowrap}
/* Rules card stays a clean vertical stack on every size (labels above their buttons). */
#undoSeg{display:grid;grid-template-columns:repeat(5,minmax(0,1fr))}
#claimSeg,#incSeg,#whiteSeg{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
#clockSeg{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}
#drawsSeg,#askSeg{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
.rules-card .gk-seg{flex-wrap:nowrap;gap:6px}
.rules-card .gk-seg button{min-width:0;padding:0 4px;font-size:15px;width:auto}
#btnPlay{margin-top:12px}

@media (max-height:900px){
  .rules-card{padding:8px 10px}
  .rules-h{font-size:18px}
  .rules-card .lbl{margin:6px 0 2px;font-size:15px}
}
