/* Seedfall Mancala: a carved board with deep pits and glowing gem seeds. Two themes on .mc[data-theme]. */
.mc {
  --mc-text: #dfe9ff; --mc-muted: #8aa3c4; --mc-strong: #fff; --mc-panel: #0b1328; --mc-line: #1c2b4a; --mc-btn: #0b1328; --mc-btn-text: #dfe9ff;
  --mc-accent: #55d6ff; --mc-hot: #ffd166; --mc-me: #5ef2d6; --mc-op: #ff9ec8;
  --mc-wood-1: #4a2f22; --mc-wood-2: #2c1a12; --mc-wood-3: #170d08; --mc-rim: rgba(85, 214, 255, .35);
  --mc-hole-1: #0a0605; --mc-hole-2: #1d120c; --mc-hole-hi: rgba(255, 220, 180, .12); --mc-num-bg: rgba(5, 10, 24, .82); --mc-num: #e8f3ff;
  --mc-c: 90px;
  max-width: 980px; margin: 0 auto; padding: 10px 8px 16px; user-select: none; -webkit-user-select: none; color: var(--mc-text); border-radius: 12px;
  font-variant-numeric: tabular-nums; position: relative;
}
.mc[data-theme="light"] {
  --mc-text: #2b2a26; --mc-muted: #6b6457; --mc-strong: #17150f; --mc-panel: #fffdf8; --mc-line: #e0d6c3; --mc-btn: #fffdf8; --mc-btn-text: #2b2a26;
  --mc-accent: #0a86ad; --mc-hot: #a35f00; --mc-me: #0a9a83; --mc-op: #c2417e;
  --mc-wood-1: #e8bf86; --mc-wood-2: #cf9a5c; --mc-wood-3: #a96f36; --mc-rim: rgba(10, 134, 173, .22);
  --mc-hole-1: #6e4520; --mc-hole-2: #9a6732; --mc-hole-hi: rgba(255, 245, 225, .35); --mc-num-bg: rgba(255, 252, 244, .92); --mc-num: #2b2a26;
  background: linear-gradient(180deg, #f6f1e7, #ece3d2); box-shadow: inset 0 0 0 1px #e0d6c3;
}
.mc [hidden] { display: none !important; }
.mc-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; }
.mc-opts { display: flex; gap: 8px 10px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--mc-muted); flex: 1 1 340px; min-width: 0; }
.mc-opts label { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.mc-sel { display: inline-flex; gap: 8px 10px; flex-wrap: wrap; align-items: center; }
.mc-opts select { background: var(--mc-btn); color: var(--mc-btn-text); border: 1px solid var(--mc-line); border-radius: 8px; padding: 0 8px; min-height: 36px; font-size: 13.5px; }
.mc-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.mc-btn { background: var(--mc-btn); color: var(--mc-btn-text); border: 1px solid var(--mc-line); border-radius: 9px; padding: 0 13px; min-height: 38px; font-weight: 700; font-size: 13.5px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; -webkit-tap-highlight-color: transparent; font-family: inherit; }
@media (hover: hover) { .mc-btn:hover:not(:disabled) { border-color: var(--mc-accent); } }
.mc-btn:disabled { opacity: .42; cursor: default; }
.mc-btn:active:not(:disabled) { transform: translateY(1px); }
.mc-btn-primary { background: #ffd166; color: #1a1200; border-color: #ffd166; }
@media (hover: hover) { .mc-btn-primary:hover:not(:disabled) { background: #ffe08a; border-color: #ffe08a; } }
.mc-icon { width: 38px; padding: 0; }
.mc-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
#mc-sound[aria-pressed="false"] .on, #mc-sound[aria-pressed="true"] .off { display: none; }
.mc[data-theme="dark"] #mc-theme .moon, .mc[data-theme="light"] #mc-theme .sun { display: none; }
.mc-btn:focus-visible, .mc select:focus-visible { outline: 2px solid var(--mc-accent); outline-offset: 2px; }

.mc-main { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.mc-play { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; position: relative; }

/* the two players: names and stores, whose turn glows */
.mc-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; width: 100%; max-width: 640px; }
.mc-who { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 6px 10px; border-radius: 12px; background: var(--mc-panel); border: 1px solid var(--mc-line); transition: border-color .25s, box-shadow .25s; }
.mc-who-op { justify-content: flex-end; }
.mc-who.turn { border-color: var(--mc-accent); box-shadow: 0 0 0 1px var(--mc-accent), 0 0 18px var(--mc-rim); }
.mc-who.won { border-color: #ffd166; box-shadow: 0 0 0 1px #ffd166, 0 0 20px rgba(255, 209, 102, .45); }
.mc-name { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; color: var(--mc-strong); }
.mc-count { font-size: 22px; font-weight: 800; color: var(--mc-strong); min-width: 1.4em; text-align: center; }
.mc-vs { font-size: 12px; font-weight: 800; color: var(--mc-muted); letter-spacing: .08em; text-transform: uppercase; }
.mc-gem { width: 16px; height: 16px; border-radius: 50%; flex: none; }
.mc-who-me .mc-gem { background: radial-gradient(circle at 35% 30%, #fff, var(--mc-me) 45%, #0b6f60); box-shadow: 0 0 10px var(--mc-me); }
.mc-who-op .mc-gem { background: radial-gradient(circle at 35% 30%, #fff, var(--mc-op) 45%, #7a1f4a); box-shadow: 0 0 10px var(--mc-op); }
.mc-status { text-align: center; font-weight: 700; font-size: 15px; min-height: 1.45em; color: var(--mc-strong); max-width: 100%; }
.mc-status.hot { color: var(--mc-hot); }
.mc-dots { display: inline-flex; gap: 3px; margin-left: 6px; vertical-align: middle; }
.mc-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--mc-accent); animation: mc-blink 1s infinite ease-in-out; }
.mc-dots i:nth-child(2) { animation-delay: .15s; } .mc-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes mc-blink { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }

/* the board: a grid of slots sized from --mc-c (set by game.js), across or standing up */
.mc-frame { --c: var(--mc-c); padding: calc(var(--c) * .16); border-radius: calc(var(--c) * .5);
  background: radial-gradient(120% 90% at 30% 10%, rgba(255, 255, 255, .12), transparent 55%), repeating-linear-gradient(94deg, rgba(0, 0, 0, 0) 0 9px, rgba(0, 0, 0, .08) 9px 11px, rgba(255, 255, 255, .03) 11px 16px), linear-gradient(160deg, var(--mc-wood-1), var(--mc-wood-2) 55%, var(--mc-wood-3));
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45), 0 2px 0 rgba(255, 255, 255, .12) inset, 0 -3px 6px rgba(0, 0, 0, .35) inset, 0 0 0 1px var(--mc-rim), 0 0 30px var(--mc-rim); }
.mc-board { --c: var(--mc-c); position: relative; display: grid; gap: calc(var(--c) * .06); outline: none; touch-action: manipulation; }
.mc-board.mc-h { grid-template-columns: calc(var(--c) * 1.2) repeat(6, var(--c)) calc(var(--c) * 1.2); grid-template-rows: repeat(2, calc(var(--c) * 1.08)); }
.mc-board.mc-v { grid-template-columns: repeat(2, calc(var(--c) * 1.08)); grid-template-rows: calc(var(--c) * 1.15) repeat(6, var(--c)) calc(var(--c) * 1.15); }
.mc-slot { position: relative; min-width: 0; min-height: 0; padding: 0; margin: 0; border: 0; background: transparent; color: inherit; font: inherit; display: grid; place-items: center; -webkit-tap-highlight-color: transparent; outline: none; border-radius: 50%; }
.mc-pit { cursor: default; }
.mc-hole { position: relative; width: 86%; aspect-ratio: 1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 50% 62%, var(--mc-hole-2), var(--mc-hole-1) 72%);
  box-shadow: inset 0 calc(var(--c) * .07) calc(var(--c) * .14) rgba(0, 0, 0, .75), inset 0 calc(var(--c) * -.03) calc(var(--c) * .05) var(--mc-hole-hi), 0 1px 0 rgba(255, 255, 255, .1); transition: box-shadow .2s; }
.mc-store .mc-hole { width: 84%; height: 92%; aspect-ratio: auto; border-radius: calc(var(--c) * .5); }
.mc-board.mc-v .mc-store .mc-hole { width: 92%; height: 82%; }
.mc-board.mine .mc-pit.can { cursor: pointer; }
.mc-board.mine .mc-pit.can .mc-hole { box-shadow: inset 0 calc(var(--c) * .07) calc(var(--c) * .14) rgba(0, 0, 0, .75), inset 0 calc(var(--c) * -.03) calc(var(--c) * .05) var(--mc-hole-hi), 0 0 0 2px rgba(85, 214, 255, .28), 0 0 14px rgba(85, 214, 255, .22); }
@media (hover: hover) { .mc-board.mine .mc-pit.can:hover .mc-hole { box-shadow: inset 0 calc(var(--c) * .07) calc(var(--c) * .14) rgba(0, 0, 0, .75), 0 0 0 2.5px var(--mc-accent), 0 0 20px rgba(85, 214, 255, .45); } }
.mc .mc-board .mc-pit:focus-visible .mc-hole { box-shadow: inset 0 calc(var(--c) * .07) calc(var(--c) * .14) rgba(0, 0, 0, .75), 0 0 0 3px #ffd166, 0 0 18px rgba(255, 209, 102, .5); }
.mc-store.turn .mc-hole { box-shadow: inset 0 calc(var(--c) * .07) calc(var(--c) * .14) rgba(0, 0, 0, .75), 0 0 0 2px var(--mc-rim), 0 0 22px var(--mc-rim); }

/* counts on every slot */
.mc-num { position: absolute; z-index: 1000; min-width: calc(var(--c) * .34); padding: 0 calc(var(--c) * .07); height: calc(var(--c) * .3); border-radius: 999px; display: grid; place-items: center;
  font-size: max(11px, calc(var(--c) * .19)); font-weight: 800; line-height: 1; color: var(--mc-num); background: var(--mc-num-bg); box-shadow: 0 1px 4px rgba(0, 0, 0, .4), 0 0 0 1px rgba(255, 255, 255, .1); pointer-events: none; transition: transform .15s; }
.mc-h .mc-pit.mine-side .mc-num { bottom: -2%; left: 50%; transform: translateX(-50%); }
.mc-h .mc-pit.their-side .mc-num { top: -2%; left: 50%; transform: translateX(-50%); }
.mc-v .mc-pit.mine-side .mc-num { left: -3%; top: 50%; transform: translateY(-50%); }
.mc-v .mc-pit.their-side .mc-num { right: -3%; top: 50%; transform: translateY(-50%); }
.mc-store .mc-num { bottom: 4%; left: 50%; transform: translateX(-50%); font-size: max(13px, calc(var(--c) * .26)); height: calc(var(--c) * .38); min-width: calc(var(--c) * .5); }
.mc-v .mc-store .mc-num { bottom: auto; top: 50%; left: auto; right: 2%; transform: translateY(-50%); }
.mc-store.mine-store .mc-num { color: #062a24; background: var(--mc-me); }
.mc-store:not(.mine-store) .mc-num { color: #2c0718; background: var(--mc-op); }
.mc-slot.tick .mc-num, .mc-slot.land .mc-num { animation: mc-bump .3s ease-out; }
@keyframes mc-bump { 40% { scale: 1.3; } }

/* the preview, the hint and the last move */
.mc-tag { position: absolute; z-index: 1001; left: 50%; top: 50%; transform: translate(-50%, -50%); pointer-events: none; font-size: max(10px, calc(var(--c) * .16)); font-weight: 800; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .9); white-space: nowrap; opacity: 0; transition: opacity .15s; }
.mc-slot.rcv .mc-tag { opacity: .9; }
.mc .mc-board .mc-slot.rcv .mc-hole { box-shadow: inset 0 calc(var(--c) * .07) calc(var(--c) * .14) rgba(0, 0, 0, .75), 0 0 0 1.5px rgba(150, 236, 255, .55); }
.mc .mc-board .mc-slot.lands .mc-hole { box-shadow: inset 0 calc(var(--c) * .07) calc(var(--c) * .14) rgba(0, 0, 0, .75), 0 0 0 3px #ffd166, 0 0 24px rgba(255, 209, 102, .7); animation: mc-glow 1s ease-in-out infinite; }
.mc-slot.lands .mc-tag { opacity: 1; background: rgba(20, 14, 0, .78); color: #ffd166; padding: 3px 7px; border-radius: 99px; top: auto; bottom: 108%; transform: translateX(-50%); box-shadow: 0 0 0 1px rgba(255, 209, 102, .55); }
.mc-v .mc-slot.lands .mc-tag, .mc-h .mc-pit.their-side.lands .mc-tag { bottom: auto; top: 50%; transform: translate(-50%, -50%); }
.mc .mc-board .mc-slot.willcap .mc-hole { box-shadow: inset 0 calc(var(--c) * .07) calc(var(--c) * .14) rgba(0, 0, 0, .75), 0 0 0 3px #ff6b81, 0 0 20px rgba(255, 107, 129, .6); }
.mc .mc-board .mc-slot.src .mc-hole { box-shadow: inset 0 calc(var(--c) * .07) calc(var(--c) * .14) rgba(0, 0, 0, .75), 0 0 0 3px var(--mc-accent), 0 0 22px rgba(85, 214, 255, .6); }
@keyframes mc-glow { 50% { filter: brightness(1.25); } }
.mc .mc-board .mc-pit.hint .mc-hole { box-shadow: inset 0 calc(var(--c) * .07) calc(var(--c) * .14) rgba(0, 0, 0, .75), 0 0 0 3px #ffd166, 0 0 26px 4px rgba(255, 209, 102, .7); }
.mc-pit.last::after { content: ''; position: absolute; width: calc(var(--c) * .11); height: calc(var(--c) * .11); border-radius: 50%; background: #ff8a5c; box-shadow: 0 0 8px #ff8a5c; z-index: 1002; pointer-events: none; }
.mc-h .mc-pit.mine-side.last::after { top: 3%; left: 50%; transform: translateX(-50%); }
.mc-h .mc-pit.their-side.last::after { bottom: 3%; left: 50%; transform: translateX(-50%); }
.mc-v .mc-pit.mine-side.last::after { right: 3%; top: 50%; transform: translateY(-50%); }
.mc-v .mc-pit.their-side.last::after { left: 3%; top: 50%; transform: translateY(-50%); }
.mc .mc-board .mc-slot.captured .mc-hole { box-shadow: inset 0 0 calc(var(--c) * .3) rgba(255, 107, 129, .8), 0 0 0 3px #ff6b81, 0 0 28px rgba(255, 107, 129, .8); }
.mc .mc-board .mc-slot.land .mc-hole { animation: mc-land .5s ease-out; }
@keyframes mc-land { 30% { box-shadow: inset 0 calc(var(--c) * .07) calc(var(--c) * .14) rgba(0, 0, 0, .75), 0 0 0 3px rgba(255, 255, 255, .8), 0 0 26px rgba(150, 236, 255, .8); } }

/* seeds: gems in one layer over the board, placed by transform */
.mc-seeds, .mc-fx { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.mc-seed { position: absolute; left: 0; top: 0; width: var(--sz); height: var(--sz); margin: calc(var(--sz) / -2) 0 0 calc(var(--sz) / -2); border-radius: 50% 46% 52% 48%; will-change: transform;
  background: radial-gradient(circle at 34% 28%, rgba(255, 255, 255, .95) 0 12%, color-mix(in srgb, var(--sc) 70%, #fff) 26%, var(--sc) 52%, color-mix(in srgb, var(--sc) 45%, #000) 100%);
  box-shadow: 0 0 calc(var(--sz) * .55) color-mix(in srgb, var(--sc) 70%, transparent), 0 calc(var(--sz) * .12) calc(var(--sz) * .2) rgba(0, 0, 0, .55); }
.mc-seeds { --sz: 12px; }
.mc-seeds .mc-seed { width: var(--sz); height: var(--sz); margin: calc(var(--sz) / -2) 0 0 calc(var(--sz) / -2); }
.mc[data-theme="light"] .mc-seed { box-shadow: 0 0 calc(var(--sz) * .3) color-mix(in srgb, var(--sc) 60%, transparent), 0 calc(var(--sz) * .12) calc(var(--sz) * .22) rgba(40, 20, 0, .55); }

/* banners: extra turn, captures */
.mc-banner { position: absolute; left: 50%; top: 58%; transform: translate(-50%, -50%) scale(.9); z-index: 20; pointer-events: none; padding: 8px 18px; border-radius: 999px; font-weight: 800; font-size: 17px; letter-spacing: .01em;
  background: rgba(8, 16, 36, .88); color: #fff; box-shadow: 0 0 0 1px rgba(85, 214, 255, .5), 0 10px 30px rgba(0, 0, 0, .5); opacity: 0; transition: opacity .2s, transform .25s cubic-bezier(.2, .9, .3, 1.3); white-space: nowrap; }
.mc-banner.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.mc-banner.extra { color: #ffd166; box-shadow: 0 0 0 1px rgba(255, 209, 102, .6), 0 0 30px rgba(255, 209, 102, .35); }
.mc-banner.cap { color: #ffb3c1; box-shadow: 0 0 0 1px rgba(255, 107, 129, .6), 0 0 30px rgba(255, 107, 129, .35); }

/* moves and record under the board */
.mc-side { width: 100%; max-width: 760px; background: var(--mc-panel); border: 1px solid var(--mc-line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.mc-mh { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--mc-muted); margin: 0 0 6px; }
.mc-rulesname { letter-spacing: .04em; color: var(--mc-accent); }
.mc-moves { list-style: none; margin: 0; padding: 0 0 2px; display: flex; gap: 3px; overflow-x: auto; scrollbar-width: thin; overscroll-behavior: contain; }
.mc-moves li { flex: none; }
.mc-mv { display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; border-radius: 6px; color: var(--mc-text); font-size: 13px; font-weight: 700; }
.mc-mv .n { color: var(--mc-muted); font-size: 11px; font-weight: 600; }
.mc-mv.cur { background: var(--mc-line); color: var(--mc-strong); }
.mc-sd { width: 9px; height: 9px; border-radius: 50%; }
.mc-sd.me { background: var(--mc-me); box-shadow: 0 0 6px var(--mc-me); } .mc-sd.op { background: var(--mc-op); box-shadow: 0 0 6px var(--mc-op); }
.mc-mk { font-style: normal; font-size: 11px; font-weight: 800; padding: 0 4px; border-radius: 5px; }
.mc-mk.ex { color: #ffd166; } .mc-mk.cp { color: #ff8fa0; }
.mc-empty { color: var(--mc-muted); font-size: 13px; padding: 2px 4px; white-space: normal; }
.mc-record { margin-top: 6px; font-size: 12.5px; color: var(--mc-muted); line-height: 1.5; }
.mc-record b { color: var(--mc-text); }

/* dialog and toast */
.mc-overlay { position: fixed; inset: 0; background: rgba(2, 5, 14, .72); display: flex; align-items: center; justify-content: center; z-index: 2000; padding: 16px; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.mc-overlay:not([hidden]) .mc-dialog { animation: mc-pop .22s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes mc-pop { from { transform: scale(.92); opacity: 0; } }
.mc-dialog { background: #0b1328; color: #dfe9ff; border: 1px solid #244b6b; border-radius: 16px; padding: 22px; width: min(100%, 420px); max-height: calc(100% - 16px); overflow: auto; text-align: center; box-shadow: 0 24px 60px rgba(0, 0, 0, .55); }
.mc[data-theme="light"] .mc-dialog { background: #fffdf8; color: #2b2a26; border-color: #e0d6c3; }
.mc-dialog h3 { margin: 0 0 10px; color: inherit; font-size: 24px; letter-spacing: -.01em; }
.mc-dialog p { margin: 0 0 14px; color: inherit; opacity: .85; }
.mc-rules-text { text-align: left; font-size: 14.5px; line-height: 1.5; }
.mc-final { display: flex; justify-content: center; gap: 18px; margin: 4px 0 12px; }
.mc-fc { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; } .mc-fc b { font-size: 30px; font-weight: 800; }
.mc-fc i { width: 18px; height: 18px; border-radius: 50%; }
.mc-fc.me i { background: radial-gradient(circle at 35% 30%, #fff, var(--mc-me) 45%, #0b6f60); box-shadow: 0 0 10px var(--mc-me); }
.mc-fc.op i { background: radial-gradient(circle at 35% 30%, #fff, var(--mc-op) 45%, #7a1f4a); box-shadow: 0 0 10px var(--mc-op); }
.mc-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.mc-toast { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 2100; max-width: min(440px, calc(100% - 24px)); padding: 10px 16px; border-radius: 12px;
  background: #13224a; border: 1px solid #2c4478; color: #fff; font-weight: 600; font-size: 14px; line-height: 1.35; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); pointer-events: none; text-align: center; }

/* light theme: the shared online bar and mode switch follow the board */
.mc[data-theme="light"] .rg-modes-in { background: #e8dfcf; border-color: #d4c8b2; }
.mc[data-theme="light"] .rg-mode { color: #5d564a; }
.mc[data-theme="light"] .rg-mode[aria-pressed="true"] { background: #fffdf8; color: #17150f; box-shadow: inset 0 0 0 1.5px #0a86ad, 0 2px 10px rgba(10, 134, 173, .18); }
.mc[data-theme="light"] .rg-mode[aria-pressed="true"] svg { color: #0a86ad; }
.mc[data-theme="light"] .ol-bar { background: #fffdf8; border-color: #e0d6c3; color: #2b2a26; }
.mc[data-theme="light"] .ol-name, .mc[data-theme="light"] .ol-msg b { color: #17150f; }
.mc[data-theme="light"] .ol-msg { color: #3b372f; } .mc[data-theme="light"] .ol-msg.ol-hot { color: #a35f00; }
.mc[data-theme="light"] .ol-side, .mc[data-theme="light"] .ol-vs { color: #6b6457; }
.mc[data-theme="light"] .ol-p { background: rgba(0, 0, 0, .04); } .mc[data-theme="light"] .ol-p.ol-turn { border-color: #0a86ad; background: rgba(10, 134, 173, .08); }
.mc[data-theme="light"] .ol-btn { background: #fffdf8; color: #2b2a26; border-color: #d4c8b2; }
.mc[data-theme="light"] .ol-btn.ol-go { background: #ffd166; border-color: #e7b844; color: #1a1200; }
.mc .ol-bar { margin-bottom: 8px; }

@media (prefers-reduced-motion: reduce) { .mc-dots i, .mc-slot.lands .mc-hole { animation: none; } .mc-banner { transition: none; } }

@media (max-width: 700px) {
  .mc { padding: 6px 4px 12px; }
  .mc-top { margin-bottom: 8px; gap: 8px; }
  .mc-opts { flex-basis: 100%; justify-content: center; }
  .mc-sel { width: 100%; flex-wrap: nowrap; gap: 6px; }
  .mc-sel label { flex: 1 1 0; min-width: 0; }
  .mc-sel select { width: 100%; min-width: 0; padding: 0 4px; font-size: 13px; }
  .mc-lt { display: none; }
  .mc-tools { width: 100%; justify-content: center; flex-wrap: nowrap; gap: 5px; }
  .mc-tools .mc-btn { min-height: 36px; }
  .mc-tools .mc-btn:not(.mc-icon) { flex: 1 1 auto; padding: 0 6px; font-size: 13px; min-width: 0; }
  .mc-icon { width: 36px; flex: none; }
  .mc-who { padding: 5px 8px; } .mc-name { font-size: 13px; } .mc-count { font-size: 20px; }
  .mc-score { gap: 6px; }
  .mc-banner { font-size: 15px; }
}
/* standing up: the score chips sit side by side over a narrower board */
.mc.mc-tall .mc-banner { top: 50%; white-space: normal; text-align: center; max-width: 90%; }

/* full screen: no page scroll */
.mc.mc-fit { max-width: none; height: 100%; margin: 0; padding: 6px 6px 8px; display: flex; flex-direction: column; overflow: hidden; border-radius: 0; }
.mc-fit .mc-top { flex: none; justify-content: center; }
.mc-fit .mc-main { flex: 1 1 auto; min-height: 0; justify-content: safe center; }
.mc-fit .mc-side { flex: none; max-height: 96px; overflow: auto; }

/* phones on their side (full screen, short): one row of controls, the score and status in one line, no move list */
.mc.mc-short { padding: 4px 8px 4px; }
.mc-short .mc-top { margin: 0 0 4px; gap: 6px; flex-wrap: nowrap; }
.mc-short .mc-opts { flex-wrap: nowrap; gap: 6px; flex: 1 1 auto; }
.mc-short .rg-modes { max-width: 220px; flex: 0 1 220px; }
.mc-short .mc-sel { flex: 1 1 auto; flex-wrap: nowrap; gap: 5px; min-width: 0; }
.mc-short .mc-sel label { flex: 1 1 0; min-width: 0; }
.mc-short .mc-sel select { width: 100%; }
.mc-short .mc-lt { display: none; }
.mc-short .mc-opts select { min-height: 32px; font-size: 12.5px; padding: 0 4px; }
.mc-short .mc-tools { flex-wrap: nowrap; gap: 4px; flex: none; }
.mc-short .mc-btn { min-height: 34px; font-size: 12.5px; padding: 0 8px; }
.mc-short .mc-icon { width: 34px; padding: 0; }
.mc-short .mc-main { gap: 4px; }
.mc-short .mc-play { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 4px 8px; }
.mc-short .mc-score { display: contents; }
.mc-short .mc-vs { display: none; }
.mc-short .mc-who-me { grid-column: 1; grid-row: 1; justify-self: start; max-width: 230px; width: 100%; }
.mc-short .mc-who-op { grid-column: 3; grid-row: 1; justify-self: end; max-width: 230px; width: 100%; }
.mc-short .mc-status { grid-column: 2; grid-row: 1; font-size: 14px; }
.mc-short .mc-frame { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
.mc-short .mc-who { padding: 3px 8px; } .mc-short .mc-count { font-size: 18px; }
.mc-short .mc-side { padding: 0; border: 0; background: none; }
.mc-short .mc-mh, .mc-short .mc-moves, .mc-short .mc-record { display: none; }
