/* Mancala: the page around the board. The board itself is drawn on the canvas (game.js). */
:root{ --sea:#0a2a33; --ink:#f6ecd9; --muted:#b8cac6; --teal:#5cd0bc; --amber:#f0b45c; --panel:rgba(10,32,38,.72); }
*{box-sizing:border-box}
html,body{margin:0;height:100%;background:var(--sea);color:var(--ink);font:16px/1.4 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;-webkit-tap-highlight-color:transparent;overscroll-behavior:none}
body{display:grid;grid-template-rows:auto 1fr auto;height:100vh;height:100dvh;overflow:hidden;
  padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}
.vh{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

#top{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;padding:8px 10px 4px;min-height:56px}
#realmSlot{min-width:0;max-width:100%}
.tools{display:flex;gap:6px;flex:none;margin-left:auto} /* wraps under the Etheria bar when a guest's bar (Save, Home Screen) leaves no room */
.tools button{display:inline-flex;align-items:center;gap:6px;min-width:44px;height:44px;padding:0 12px;border-radius:14px;border:1.5px solid rgba(246,236,217,.2);
  background:rgba(27,67,76,.75);color:var(--ink);font:650 14px/1 system-ui,-apple-system,sans-serif;cursor:pointer}
.tools button:hover{background:rgba(47,158,143,.45)}
.tools button:focus-visible,#foot button:focus-visible{outline:3px solid var(--amber);outline-offset:2px}
.tools button:disabled{opacity:.45;cursor:default}
.tools svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#snd{padding:0;justify-content:center}
#snd .no{display:none} #snd.off .no{display:block} #snd.off .on{display:none}
@media (max-width:420px){ .tools button span{display:none} .tools button{padding:0;justify-content:center} }

#stage{position:relative;min-height:0}
#board{position:absolute;inset:0;width:100%;height:100%;touch-action:none;display:block}

#foot{padding:6px 14px 10px;min-height:76px;background:linear-gradient(0deg,rgba(0,0,0,.25),transparent)}
#foot .row{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}
#foot h1{margin:0;font:800 20px/1.1 ui-rounded,"SF Pro Rounded","Segoe UI",system-ui,sans-serif;letter-spacing:.01em}
#mode{color:var(--amber);font-size:13px;font-weight:650}
#line{margin:4px 0 0;font-size:15px;min-height:2.8em;max-width:60em}
#line.soft{color:var(--muted)}

/* the menu (inside the kit's modal) */
.mc-k{margin:14px 0 8px} .mc-k:first-child{margin-top:0}
.mc-opts{display:grid;gap:8px}
.mc-opt{display:grid;grid-template-columns:auto 1fr;gap:2px 10px;text-align:left;padding:10px 12px;min-height:56px;border-radius:14px;border:1.5px solid var(--er-line);background:var(--er-surface-2);color:var(--er-ink);font:inherit;cursor:pointer}
.mc-opt b{font-size:16px} .mc-opt span{grid-column:2;grid-row:1;color:var(--er-ink-muted);font-size:13px;align-self:center} .mc-opt em{grid-column:1/3;font-style:normal;font-size:12px;color:var(--er-ink-muted)}
.mc-opt.on{border-color:var(--er-accent-hi);box-shadow:inset 0 0 0 1px var(--er-accent-hi)}
.mc-opt.on b::after{content:" ✓";color:var(--er-accent-hi)}
.mc-row{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px} .mc-row .er-btn{flex:1 1 180px;min-height:44px}
.mc-lab{margin:12px 0 6px;font-size:13px;color:var(--er-ink-muted)}
.mc-seg{display:flex;gap:6px;flex-wrap:wrap}
.mc-seg button{flex:1;min-width:56px;min-height:44px;border-radius:12px;border:1.5px solid var(--er-line);background:var(--er-surface-2);color:var(--er-ink);font:650 15px/1 var(--er-body);cursor:pointer}
.mc-seg button.on{background:var(--er-accent);border-color:var(--er-accent-hi);color:#fff}
.mc-shop{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:8px}
.mc-item{display:flex;align-items:center;gap:8px;min-height:48px;padding:6px 10px;border-radius:12px;border:1.5px solid var(--er-line);background:var(--er-surface-2);color:var(--er-ink);font:600 13px/1.2 var(--er-body);text-align:left;cursor:pointer}
.mc-item span{flex:1} .mc-item em{font-style:normal;color:var(--er-accent-2);font-size:12px;white-space:nowrap}
.mc-item.on{border-color:var(--er-accent-hi)} .mc-item.on em{color:var(--er-accent-hi)}
.sw{width:26px;height:26px;border-radius:50%;flex:none;border:1px solid rgba(0,0,0,.3)}
.sw-theme-driftwood{background:linear-gradient(135deg,#c99a66,#9c6e44)}
.sw-theme-slate{background:linear-gradient(135deg,#7d8c91,#56656b)}
.sw-theme-coral{background:linear-gradient(135deg,#e8c9a0,#cfa577)}
.sw-theme-lantern{background:radial-gradient(circle at 40% 40%,#ffb35c,#5b3a2a 60%)}
.sw-pebbles-seaglass{background:conic-gradient(#5fc9b5,#e8a948,#cfe3e8,#a78bd0,#e77f6a,#5fc9b5)}
.sw-pebbles-river{background:conic-gradient(#8b8378,#6f7a7e,#b3a48f,#5d5650,#8b8378)}
.sw-pebbles-starlight{background:conic-gradient(#fff1b8,#bfe3ff,#ffd1f0,#d4ffd8,#fff1b8);box-shadow:0 0 8px #fff1b8}
.mc-rules{margin-top:14px;border-top:1px solid var(--er-line);padding-top:10px;font-size:14px}
.mc-rules summary{cursor:pointer;font-weight:700;min-height:32px}
.mc-rules ul{padding-left:20px;margin:6px 0 10px} .mc-rules li{margin:4px 0}
.mc-link{background:none;border:0;color:var(--er-accent-hi);text-decoration:underline;font:inherit;cursor:pointer;padding:6px 2px;min-height:32px}
.mc-small{font-size:13px;margin:8px 0 0}
.mc-big{font-size:18px;font-weight:700;margin:0 0 12px}
.mc-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.mc-stats div{background:var(--er-surface-2);border-radius:12px;padding:10px;text-align:center}
.mc-stats b{display:block;font-size:22px} .mc-stats span{font-size:12px;color:var(--er-ink-muted)}

/* the shelf art (tools/art.mjs): the board alone */
html.art #top,html.art #foot{display:none} html.art body{grid-template-rows:1fr}
html.art .er-bar{display:none} html.art body{background:#0f3a44}
.arttitle{position:fixed;left:0;right:0;top:26px;text-align:center;pointer-events:none}
.arttitle b{display:block;font:800 64px/1 ui-rounded,"SF Pro Rounded",system-ui,sans-serif;color:#f6ecd9;text-shadow:0 3px 0 rgba(0,0,0,.35)}
.arttitle span{display:block;margin-top:8px;font:650 24px/1.2 system-ui,sans-serif;color:#f0b45c}
html.art #stage{margin-top:var(--art-top,0)}
