.mx { color: #ff5a4f; font-weight: 900; }
.ms { color: var(--amber); font-weight: 900; }
.md { color: var(--muted); font-weight: 900; }
.small { font-size: 14px; }
.sos { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 22px; align-items: start; margin-bottom: 22px; }
.sos-setup h2 { margin: 0 0 12px; font-size: 18px; }
.opt { margin-bottom: 14px; }
.opt-l { display: block; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); }
.seg button { flex: 1; min-height: 42px; border: 0; border-radius: 9px; background: transparent; color: var(--text); font: inherit; font-weight: 700; cursor: pointer; padding: 6px 8px; }
.seg button small { font-weight: 500; color: var(--muted); }
.seg button.on { background: var(--amber); color: #1b1200; }
.seg button.on small, .seg button.on .ms, .seg button.on .mx { color: #1b1200; }
.seg button:focus-visible, .cell:focus-visible, .btn:focus-visible { outline: 3px solid var(--amber-2); outline-offset: 2px; }
.sos-play { display: grid; justify-items: center; gap: 14px; }
.status { margin: 0; font-size: 20px; font-weight: 800; min-height: 1.4em; text-align: center; }
.status.win { color: var(--good); }
.status.lose { color: var(--bad); }
.board { --size: min(92vw, 420px); width: var(--size); height: var(--size); display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 8px; border-radius: 18px;
  background: repeating-linear-gradient(90deg, #c9934f 0 10px, #d6a462 10px 20px); box-shadow: var(--shadow), inset 0 0 0 3px rgba(0,0,0,.15); position: relative; }
.cell { border: 0; border-radius: 12px; background: rgba(255,248,235,.88); cursor: pointer; padding: 0; display: grid; place-items: center; position: relative; transition: background .15s, transform .1s; }
.cell:hover:not([aria-disabled="true"]) { background: #fffaf0; }
.cell:active:not([aria-disabled="true"]) { transform: scale(.97); }
.cell[aria-disabled="true"] { cursor: default; }
.cell svg { width: 70%; height: 70%; overflow: visible; }
.cell .stroke { fill: none; stroke-width: 15; stroke-linecap: round; stroke-dasharray: 130; stroke-dashoffset: 130; animation: draw .28s ease-out forwards; }
.cell .stroke.b { animation-delay: .14s; }
.cell.x .stroke { stroke: #d62b20; }
.cell.s .stroke { stroke: #14213a; }
.cell.win { background: #fff3c4; box-shadow: 0 0 0 4px var(--amber) inset; }
.board.over .cell:not(.win) { opacity: .7; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .cell .stroke { animation: none; stroke-dashoffset: 0; } }
.sos-actions { justify-content: center; }
.scores { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: min(92vw, 420px); }
.scores > div { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: 10px; display: grid; justify-items: center; gap: 2px; }
.scores span { font-size: 20px; }
.scores b { font-size: 26px; }
.scores small { color: var(--muted); font-size: 12px; text-align: center; }
.how summary { cursor: pointer; font-weight: 800; }
.how ul { margin: 10px 0 0; padding-left: 1.2em; line-height: 1.6; }
@media (max-width: 760px) {
  .sos { grid-template-columns: 1fr; }
  .sos-play { order: -1; }
  .sos-setup { order: 1; }
}
