/* Gomoku (five in a row) – styles for gomoku-ui.js (view #v-gomoku). The screens reuse the Four Stressed / Wild Stressed
   classes of fourkings.css (fk-hero, fk-choices, fk-panel, fk-banner, fk-finish, wd-bar, wd-moves, wd-vs …), as Mill does;
   this file adds the board and a few details. Board palette is fixed (paper, ink, red) under every theme. */
.gm{--gm-l:#fbf7ec;--gm-ink:#141210;--gm-red:#a3221b;--gm-w:#fbf7ec;--gm-b:#2a2622}
.gm [hidden]{display:none!important}
.gm .fk-panel{--pc:var(--gm-red)}
.gm-emb{display:block;width:104px;height:104px;margin:0 auto 10px;background:var(--gm-l);border:1px solid var(--gm-ink);box-shadow:2px 2px 0 rgba(20,18,16,.18);padding:8px;transform:rotate(-3deg)}
.gm-emb svg{display:block;width:100%;height:100%}
.gm-chm{display:inline-block;width:22px;height:22px;flex:0 0 auto}
.gm-chm svg{display:block;width:100%;height:100%}
.fk-choice .gm-chm{position:absolute;width:20px;height:20px}
.fk-choice .gm-chm.ix{left:10px;top:10px}.fk-choice .gm-chm.ix2{right:10px;bottom:10px}
.gm .fk-rl li>.wd-chip{margin-top:3px}
#gmResume .fk-resume{border-left-color:var(--gm-red)}
/* a chip for "colour not settled yet" (Swap2 opening): half black, half white */
.wd-chip.gm-unk{background:linear-gradient(90deg,#fbf7ec 50%,#2a2622 50%)}

/* the board: one SVG, 14 x 14 user units between the outer lines (one unit = one grid step), stones on the crossings */
.gm-wrap{margin:0 auto;width:100%;max-width:max(250px,calc(100vh - 318px))}
.gm-board{position:relative;width:100%;aspect-ratio:1/1;background:var(--gm-l);border:2px solid var(--gm-ink);outline:1px solid var(--gm-ink);outline-offset:3px;margin:6px 0;user-select:none;-webkit-user-select:none;touch-action:manipulation}
.gm-board svg{display:block;width:100%;height:100%;overflow:visible}
.gm-ln{fill:none;stroke:var(--gm-ink);stroke-width:.035;stroke-linecap:square;opacity:.78}
.gm-edge{fill:none;stroke:var(--gm-ink);stroke-width:.07}
.gm-pt{fill:var(--gm-ink)}
.gm-co{font:700 .42px "Libre Baskerville",serif;fill:#5d574d;text-anchor:middle;dominant-baseline:central}
.gm-board.nocoord .gm-co{display:none}
.gm-pc .in{transform-box:fill-box;transform-origin:50% 50%}
.gm-pc .o{stroke:var(--gm-ink);stroke-width:.055}
.gm-pc.s0 .o{fill:var(--gm-b);stroke:#000}
.gm-pc.s1 .o{fill:var(--gm-w)}
.gm-pc .sh{fill:rgba(0,0,0,.17)}
.gm-pc.new .in{animation:gmIn .3s cubic-bezier(.3,1.4,.5,1) both}
@keyframes gmIn{0%{transform:scale(.2);opacity:0}}
.gm-pc.win .o{stroke:var(--gm-red);stroke-width:.11}
.gm-last{fill:var(--gm-red);pointer-events:none}
.gm-wline{stroke:var(--gm-red);stroke-width:.2;stroke-linecap:round;opacity:.5;pointer-events:none;animation:gmLine 1.2s ease-out both}
@keyframes gmLine{0%{opacity:0}25%{opacity:.85}100%{opacity:.5}}
.gm-dot{fill:var(--gm-ink);opacity:.3;pointer-events:none}
html.no-dots .gm-dot{display:none}
.gm-hit{fill:transparent;cursor:default}
.gm-board.input .gm-hit.go{cursor:pointer}
@media (hover:hover){.gm-board.input .gm-hit.go:hover{fill:rgba(20,18,16,.16)}.gm-board.input.next1 .gm-hit.go:hover{fill:rgba(163,34,27,.16)}}
.gm-hit:focus{outline:none}.gm-hit:focus-visible{stroke:var(--gm-red);stroke-width:.07;stroke-dasharray:.14 .08}
html.a11y-cb .gm{--gm-red:#0072b2}
html.a11y-con .gm-board{background:#fff}html.a11y-con .gm-ln{stroke:#000;stroke-width:.05;opacity:1}html.a11y-con .gm-pc .o{stroke-width:.08}

/* player bars: stones on the board */
.gm-hand{margin-left:auto;display:flex;align-items:center;justify-content:flex-end}
.gm-hand small{font-size:11px;font-style:italic;color:var(--mut);white-space:nowrap;margin-left:4px}
.gm .wd-bar,.gm .gm-wrap{max-width:max(250px,calc(100vh - 318px))}
.gm .fk-banner{--pc:var(--gm-red);margin:4px 0}
/* Swap2: the choice of colour, under the banner */
.gm-pick{flex-wrap:wrap;gap:6px;margin:6px 0}
.gm-pick .btn{flex:1 1 30%;min-width:0;display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:10px 4px;font-size:11px;letter-spacing:.3px}
.gm-pick .btn span{min-width:0;overflow:hidden;text-overflow:ellipsis}
.gm-fin .gm-chm{width:32px;height:32px}
.gm-opts{font-size:12.5px;color:var(--mut);font-style:italic;text-align:center;margin:4px 0 0}

/* full screen while a game is on (same as the Four Stressed game screen) */
html.gm-full .mast,html.gm-full .dateline,html.gm-full .xpbar,html.gm-full .bnav,html.gm-full .subbar{display:none!important}
html.gm-full .app{max-width:1180px;padding-bottom:calc(10px + env(safe-area-inset-bottom))!important;padding-top:calc(4px + env(safe-area-inset-top))!important}
@media (min-width:900px){
  .gm .gm-wrap,.gm .wd-bar{max-width:min(100%,calc(100vh - 200px))}
  .gm-emb{width:128px;height:128px}
}
html.a11y-calm .gm *{animation:none!important;transition:none!important}
@media (prefers-reduced-motion:reduce){.gm *{animation:none!important;transition:none!important}}
