/* Mill (Nine Men's Morris) – styles for mill-ui.js (view #v-mill). 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 …); this file
   adds the board and a few details. Board palette is fixed (paper, ink, red) under every theme, like the other add-ons. */
.ml{--ml-l:#fbf7ec;--ml-ink:#141210;--ml-red:#a3221b;--ml-w:#fbf7ec;--ml-b:#2a2622}
.ml [hidden]{display:none!important}
.ml .fk-panel{--pc:var(--ml-red)}
.ml-emb{display:block;width:104px;height:104px;margin:0 auto 10px;background:var(--ml-l);border:1px solid var(--ml-ink);box-shadow:2px 2px 0 rgba(20,18,16,.18);padding:8px;transform:rotate(-3deg)}
.ml-emb svg{display:block;width:100%;height:100%}
.ml-chm{display:inline-block;width:22px;height:22px;flex:0 0 auto}
.fk-choice .ml-chm{position:absolute;width:20px;height:20px}
.fk-choice .ml-chm.ix{left:10px;top:10px}.fk-choice .ml-chm.ix2{right:10px;bottom:10px}
.ml .fk-rl li>.wd-chip{margin-top:3px}
#mlResume .fk-resume{border-left-color:var(--ml-red)}

/* the board: one SVG, 7 x 7 user units (one unit = one grid step), pieces slide with a CSS transform */
.ml-wrap{margin:0 auto;width:100%;max-width:max(250px,calc(100vh - 318px))}
.ml-board{position:relative;width:100%;aspect-ratio:1/1;background:var(--ml-l);border:2px solid var(--ml-ink);outline:1px solid var(--ml-ink);outline-offset:3px;margin:6px 0;user-select:none;-webkit-user-select:none;touch-action:manipulation}
.ml-board svg{display:block;width:100%;height:100%;overflow:visible}
.ml-ln{fill:none;stroke:var(--ml-ink);stroke-width:.05;stroke-linecap:square}
.ml-pt{fill:var(--ml-ink)}
.ml-co{font:700 .26px "Libre Baskerville",serif;fill:#5d574d;text-anchor:middle;dominant-baseline:central}
.ml-board.nocoord .ml-co{display:none}
.ml-pc{transition:transform .32s cubic-bezier(.2,.8,.2,1)}
.ml-pc .in{transform-box:fill-box;transform-origin:50% 50%}
.ml-pc .o{stroke:var(--ml-ink);stroke-width:.045}
.ml-pc .r{fill:none;stroke-width:.03;opacity:.55}
.ml-pc.s0 .o{fill:var(--ml-w)}.ml-pc.s0 .r{stroke:var(--ml-ink)}
.ml-pc.s1 .o{fill:var(--ml-b);stroke:#000}.ml-pc.s1 .r{stroke:var(--ml-w)}
.ml-pc .sh{fill:rgba(0,0,0,.17)}
.ml-pc.new .in{animation:mlIn .32s cubic-bezier(.3,1.4,.5,1) both}
@keyframes mlIn{0%{transform:scale(.2);opacity:0}}
.ml-pc.gone .in{transform:scale(.15);opacity:0;transition:transform .3s ease-in,opacity .3s ease-in}
.ml-pc.sel .o{stroke:var(--ml-red);stroke-width:.09}
.ml-pc.pend{opacity:.8}
.ml-pc.goner .o{stroke:var(--ml-red);stroke-width:.1}
.ml-pc.can .in{animation:mlBreath 2.6s ease-in-out infinite}
@keyframes mlBreath{50%{transform:scale(1.07)}}
.ml-last{fill:var(--ml-red);opacity:.16}
.ml-from{fill:none;stroke:var(--ml-red);stroke-width:.04;stroke-dasharray:.08 .08;opacity:.7}
.ml-was{stroke:var(--ml-red);stroke-width:.05;opacity:.55;stroke-linecap:round}
.ml-mline{stroke:var(--ml-red);stroke-width:.16;stroke-linecap:round;opacity:.38}
.ml-mline.fresh{animation:mlLine 1.2s ease-out both}
@keyframes mlLine{0%{opacity:0}25%{opacity:.75}100%{opacity:.38}}
.ml-dot{fill:var(--ml-ink);opacity:.42;pointer-events:none}
html.no-dots .ml-dot{display:none}
.ml-take{fill:none;stroke:var(--ml-red);stroke-width:.07;pointer-events:none;animation:mlTake 1.1s ease-in-out infinite}
@keyframes mlTake{50%{opacity:.35}}
.ml-hit{fill:transparent;cursor:default}
.ml-board.input .ml-hit.go{cursor:pointer}
.ml-hit:focus{outline:none}.ml-hit:focus-visible{stroke:var(--ml-ink);stroke-width:.05;stroke-dasharray:.1 .06}
html.a11y-cb .ml{--ml-red:#0072b2}
html.a11y-con .ml-board{background:#fff}html.a11y-con .ml-ln{stroke:#000;stroke-width:.07}html.a11y-con .ml-pc .o{stroke-width:.07}

/* player bars: pieces in hand as small stones */
.ml-hand{margin-left:auto;display:flex;align-items:center;gap:2px;flex-wrap:wrap;justify-content:flex-end;max-width:52%}
.ml-hand i{width:10px;height:10px;border-radius:50%;border:1px solid var(--ml-ink);background:var(--ml-w)}
.ml-hand.s1 i{background:var(--ml-b)}
.ml-hand small{font-size:11px;font-style:italic;color:var(--mut);white-space:nowrap;margin-left:4px}
.ml .wd-bar,.ml .ml-wrap{max-width:max(250px,calc(100vh - 318px))}
.ml .fk-banner{--pc:var(--ml-red);margin:4px 0}
.ml .fk-banner.take{border-color:var(--ml-red);background:var(--ml-red);color:#fff}
.ml-fin .ml-chm{width:32px;height:32px}
.ml-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.ml-full .mast,html.ml-full .dateline,html.ml-full .xpbar,html.ml-full .bnav,html.ml-full .subbar{display:none!important}
html.ml-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){
  .ml .ml-wrap,.ml .wd-bar{max-width:min(100%,calc(100vh - 200px))}
  .ml-emb{width:128px;height:128px}
}
.ml-board.paused *{animation-play-state:paused!important}
html.a11y-calm .ml *{animation:none!important;transition:none!important}
@media (prefers-reduced-motion:reduce){.ml *{animation:none!important;transition:none!important}}
