/* Math Meridian: the room, the match, solo practice, the Daily Five and the panels. Every class starts with mm-. */

/* ---------- the frame of a play screen ---------- */
.mm-play { position: absolute; left: 50%; top: 56px; transform: translateX(-50%); width: min(920px, calc(100% - 32px)); max-height: calc(100% - 72px); display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 14px; min-height: 0; }
.mm-play-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex: none; min-height: 40px; }
.mm-play-what { min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.mm-play-title { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-play-sub { font-size: 12.5px; color: var(--mm-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-play-sub:empty { display: none; }
.mm-play-right { display: flex; align-items: center; gap: 8px; flex: none; }
.mm-pts { font-weight: 750; color: var(--mm-warm); font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 14.5px; }
.mm-play-main { display: flex; flex-direction: column; gap: 10px; min-height: 0; flex: 1 1 auto; }
.mm-play-body { min-height: 0; flex: 1 1 auto; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; outline: none; display: flex; flex-direction: column; gap: 10px; padding: 2px; scrollbar-width: thin; scrollbar-color: #2f4a7c transparent; }
.mm-play-foot { flex: none; min-width: 0; }
.mm-play-foot:empty { display: none; }
.mm-play[data-phase="problem"] .mm-play-main { display: grid; grid-template-columns: minmax(0, 1fr) 304px; align-items: start; gap: 16px; }
.mm-play[data-phase="problem"] .mm-play-body { max-height: 100%; align-self: stretch; }
.mm-emotes:empty { display: none; }

/* the clock: a bar that drains, and the time in figures */
.mm-clock { display: flex; align-items: center; gap: 10px; flex: none; height: 18px; }
.mm-clock-bar { flex: 1 1 auto; height: 6px; border-radius: 99px; background: rgba(85, 214, 255, .13); overflow: hidden; }
.mm-clock-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #2fb1e6, #7fe3ff); transform-origin: left center; will-change: transform; }
.mm-clock-t { flex: none; min-width: 40px; text-align: right; font-weight: 750; font-size: 14px; font-variant-numeric: tabular-nums; }
.mm-clock.mm-low .mm-clock-bar i { background: linear-gradient(90deg, #ff6b81, #ffb199); }
.mm-clock.mm-low .mm-clock-t { color: var(--mm-pink); }
.mm-clock.mm-still .mm-clock-bar i { background: #44608f; }
.mm-clock.mm-still .mm-clock-t { color: var(--mm-muted); }

/* the rail: every seat, its points and what it is doing */
.mm-rail { display: flex; gap: 6px; flex: none; overflow-x: auto; overflow-y: hidden; padding: 1px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.mm-rail::-webkit-scrollbar { display: none; }
.mm-chipseat { position: relative; display: flex; align-items: center; gap: 6px; flex: 0 0 auto; height: 34px; padding: 0 9px 0 3px; border-radius: 99px; border: 1px solid var(--mm-line); background: rgba(6, 12, 28, .8); font-size: 13px; min-width: 0; }
.mm-chipseat .mm-av { width: 26px; height: 26px; font-size: 10.5px; }
.mm-chipseat.mm-you { border-color: rgba(255, 209, 102, .6); }
.mm-chipname { max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mm-chipseat b { font-variant-numeric: tabular-nums; color: var(--mm-warm); }
.mm-mark { font-style: normal; width: 12px; text-align: center; font-weight: 800; color: var(--mm-muted); }
.mm-chipseat[data-st="solving"] .mm-mark::before { content: '…'; }
.mm-chipseat[data-st="answered"] { border-color: rgba(85, 214, 255, .55); }
.mm-chipseat[data-st="answered"] .mm-mark { color: var(--mm-accent); font-size: 9px; }
.mm-chipseat[data-st="right"] { border-color: rgba(95, 227, 161, .7); }
.mm-chipseat[data-st="right"] .mm-mark { color: var(--mm-green); }
.mm-chipseat[data-st="wrong"] .mm-mark { color: var(--mm-pink); }
.mm-chipseat[data-st="left"], .mm-chipseat[data-st="away"] { opacity: .5; }
.mm-chipseat.mm-loved { animation: mm-loved .7s ease-out; }
@keyframes mm-loved { 30% { box-shadow: 0 0 0 4px rgba(255, 107, 129, .45); border-color: var(--mm-pink); } }
.mm-chipseat .mm-bubble { position: absolute; inset: -1px; z-index: 2; display: grid; place-items: center; border-radius: 99px; background: #ffd166; color: #251a02; font-weight: 750; font-size: 12.5px; white-space: nowrap; padding: 0 6px; min-width: max-content; animation: mm-rise .16s ease-out; }

/* ---------- a problem ---------- */
.mm-prob { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 14px; border-radius: 12px; background: rgba(4, 9, 22, .78); border: 1px solid var(--mm-line); }
.mm-prob-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-size: 12.5px; color: var(--mm-muted); }
.mm-prob-r { margin-left: auto; font-variant-numeric: tabular-nums; }
.mm-chip { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 99px; border: 1px solid rgba(85, 214, 255, .4); background: rgba(85, 214, 255, .1); color: var(--mm-accent); font-size: 12px; font-weight: 650; white-space: nowrap; }
.mm-prob-text { font-size: 19px; line-height: 1.45; overflow-wrap: anywhere; -webkit-user-select: text; user-select: text; }
.mm-prob-text .mm-disp { font-size: 1.3em; margin: .5em 0 .3em; }
.mm-prob-unit { font-size: 12.5px; color: var(--mm-muted); }
.mm-hints { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.mm-hints-list { display: flex; flex-direction: column; gap: 6px; align-self: stretch; overflow-y: auto; overscroll-behavior: contain; }
.mm-stage.mm-narrow .mm-hints-list { max-height: 168px; }
.mm-stage.mm-narrow.mm-short .mm-hints-list { max-height: 112px; }
.mm-stage.mm-land .mm-hints-list { max-height: 120px; }
.mm-hints-list:empty { display: none; }
.mm-hint { padding: 8px 12px; border-radius: 10px; border: 1px dashed rgba(255, 209, 102, .5); background: rgba(255, 209, 102, .07); font-size: 14.5px; }
.mm-hint b { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--mm-warm); margin-bottom: 2px; }
.mm-hints:not(:has(.mm-hint)) { display: none; }
.mm-btn.mm-hintbtn { flex: none; flex-direction: column; gap: 1px; min-height: 48px; padding: 0 11px; line-height: 1.15; border-color: rgba(255, 209, 102, .45); color: #ffe3a1; white-space: nowrap; }
.mm-hintbtn small { font-size: 10.5px; font-weight: 600; opacity: .85; }
.mm-hintbtn[hidden] { display: none; }
.mm-watching { margin: 0; padding: 10px 12px; border-radius: 10px; border: 1px dashed var(--mm-line); color: var(--mm-muted); font-size: 13.5px; text-align: center; }

/* ---------- the answer box and the number pad ---------- */
.mm-pad { display: flex; flex-direction: column; gap: 6px; }
.mm-ans-row { display: flex; align-items: center; gap: 8px; }
.mm-ans-row .mm-ans { flex: 1 1 0; width: 0; min-width: 0; }   /* never wider than the room beside the hint button */
.mm-play-foot, .mm-pad { min-width: 0; }
.mm-input.mm-ans { letter-spacing: .03em; text-transform: none; font-size: 22px; height: 48px; font-variant-numeric: tabular-nums; }
.mm-ans::placeholder { color: #4d6592; font-weight: 500; font-size: 16px; letter-spacing: 0; }
.mm-unit { flex: none; font-weight: 700; color: var(--mm-muted); font-size: 16px; max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mm-ans-state { font-size: 12.5px; font-weight: 650; color: var(--mm-warm); min-height: 0; }
.mm-ans-state:empty { display: none; }
.mm-ans-state.mm-good { color: var(--mm-green); }
.mm-ans-state.mm-bad { color: var(--mm-pink); }
.mm-forms { margin: 0; font-size: 11.5px; line-height: 1.3; color: var(--mm-muted); }
.mm-ans-state:not(:empty) + .mm-forms { display: none; }
.mm-keys { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.mm-key { appearance: none; height: 48px; border-radius: 11px; border: 1px solid var(--mm-line); background: rgba(14, 24, 50, .92); color: var(--mm-text); font: inherit; font-size: 20px; font-weight: 650; cursor: pointer; padding: 0; touch-action: manipulation; -webkit-tap-highlight-color: transparent; font-variant-numeric: tabular-nums; }
.mm-key:hover { border-color: #2f4a7c; }
.mm-key:active { transform: scale(.95); background: rgba(30, 48, 92, .95); }
.mm-key-op { background: rgba(8, 14, 32, .92); color: var(--mm-accent); }
.mm-key-go { grid-column: span 2; background: linear-gradient(180deg, #6fdfff, #2fb1e6); border-color: #7fe3ff; color: #031320; font-size: 16px; font-weight: 750; }
.mm-key-go:hover { background: linear-gradient(180deg, #8ae6ff, #45bdee); }
.mm-key:disabled { opacity: .4; cursor: default; transform: none; }
.mm-pad.mm-locked .mm-ans { border-color: var(--mm-line); color: var(--mm-warm); opacity: 1; -webkit-text-fill-color: currentColor; }
.mm-shake { animation: mm-shake .32s ease; }
@keyframes mm-shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }

/* ---------- countdown ---------- */
.mm-countwrap { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 18px 8px 22px; }
.mm-count-l { margin: 0; color: var(--mm-muted); font-size: 14px; text-transform: uppercase; letter-spacing: .1em; }
.mm-count { font-size: 96px; font-weight: 800; line-height: 1; color: var(--mm-warm); text-shadow: 0 0 34px rgba(255, 209, 102, .45); font-variant-numeric: tabular-nums; min-height: 100px; }
.mm-count.mm-pop { animation: mm-pop .5s ease-out; }
@keyframes mm-pop { from { transform: scale(1.5); opacity: .2; } }
.mm-sum { margin: 0; font-size: 14px; color: #c7d6f3; }

/* ---------- the reveal ---------- */
.mm-verdict { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--mm-line); background: rgba(4, 9, 22, .78); }
.mm-verdict b { font-size: 20px; }
.mm-verdict span { color: var(--mm-muted); font-size: 14px; }
.mm-verdict.mm-good { border-color: rgba(95, 227, 161, .6); background: rgba(95, 227, 161, .09); }
.mm-verdict.mm-good b { color: var(--mm-green); }
.mm-verdict.mm-bad { border-color: rgba(255, 107, 129, .5); background: rgba(255, 107, 129, .07); }
.mm-verdict.mm-bad b { color: #ff9aa9; }
.mm-answer { display: flex; align-items: center; gap: 12px; padding: 4px 4px 0; }
.mm-answer > span { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--mm-muted); }
.mm-answer b { font-size: 24px; color: var(--mm-warm); }
.mm-solution { border: 1px solid var(--mm-line); border-radius: 12px; background: rgba(4, 9, 22, .6); }
.mm-solution summary, .mm-rev summary { cursor: pointer; padding: 9px 12px; font-size: 13px; font-weight: 650; color: var(--mm-muted); min-height: 40px; display: flex; align-items: center; gap: 8px; list-style: none; }
.mm-solution summary::-webkit-details-marker, .mm-rev summary::-webkit-details-marker { display: none; }
.mm-solution summary::after, .mm-rev summary::after { content: '▾'; margin-left: auto; transition: transform .15s; }
.mm-solution[open] summary::after, .mm-rev[open] summary::after { transform: rotate(180deg); }
.mm-sol { padding: 0 12px 12px; font-size: 15px; line-height: 1.5; color: #d3e0fa; overflow-wrap: anywhere; -webkit-user-select: text; user-select: text; }
.mm-rv-rows { display: flex; flex-direction: column; gap: 5px; }
.mm-rv-row { display: grid; grid-template-columns: 30px minmax(0, 1.3fr) minmax(0, 1fr) 56px 44px 46px; align-items: center; gap: 8px; padding: 3px 4px 3px 6px; border-radius: 10px; border: 1px solid var(--mm-line); background: rgba(6, 12, 28, .7); font-size: 13.5px; min-height: 44px; }
.mm-rv-row .mm-av { width: 28px; height: 28px; font-size: 11px; }
.mm-rv-row.mm-you { border-color: rgba(255, 209, 102, .55); }
.mm-rv-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.mm-rv-hint { display: block; font-size: 11px; font-weight: 650; color: var(--mm-warm); line-height: 1.2; }
.mm-rv-ans { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mm-rv-row.mm-good .mm-rv-ans { color: var(--mm-green); }
.mm-rv-row.mm-bad .mm-rv-ans { color: #ff9aa9; text-decoration: line-through; text-decoration-color: rgba(255, 107, 129, .6); }
.mm-rv-row.mm-none .mm-rv-ans { color: var(--mm-muted); font-style: italic; }
.mm-rv-time { color: var(--mm-muted); font-variant-numeric: tabular-nums; text-align: right; font-size: 12.5px; }
.mm-rv-pts { text-align: right; font-variant-numeric: tabular-nums; color: var(--mm-warm); }
.mm-heart { width: 46px; gap: 2px; display: inline-flex; align-items: center; justify-content: center; color: #6f85ad; font-size: 16px; }
.mm-heart[aria-pressed="true"], .mm-heart.mm-has { color: var(--mm-pink); }
.mm-heart[aria-pressed="true"] { border-color: rgba(255, 107, 129, .6); background: rgba(255, 107, 129, .12); }
.mm-heart:disabled { opacity: .55; cursor: default; border-color: transparent; background: transparent; }
.mm-heart-n { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mm-heart-n:empty { display: none; }
.mm-next { display: flex; align-items: center; gap: 12px; }
.mm-next .mm-btn { flex: 0 0 46%; min-height: 48px; }
.mm-next-note { flex: 1 1 auto; min-width: 0; font-size: 12.5px; color: var(--mm-muted); line-height: 1.3; }

/* ---------- results ---------- */
.mm-res-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--mm-line); background: rgba(4, 9, 22, .78); }
.mm-res-head b { font-size: 22px; }
.mm-res-head.mm-good { border-color: rgba(255, 209, 102, .6); background: rgba(255, 209, 102, .08); }
.mm-res-head.mm-good b { color: var(--mm-warm); }
.mm-res-head > span { color: var(--mm-muted); font-variant-numeric: tabular-nums; }
.mm-res-left { flex: 1 1 100%; margin: 2px 0 0; font-size: 13.5px; color: var(--mm-pink); }
.mm-res-awards { flex: 1 1 100%; margin: 4px 0 0; font-size: 13.5px; font-weight: 650; color: var(--mm-green); animation: mm-rise .25s ease-out; }
.mm-res-rating { flex: 1 1 100%; margin: 2px 0 0; font-size: 14px; color: #c7d6f3; font-variant-numeric: tabular-nums; }
.mm-res-wrap { overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; border: 1px solid var(--mm-line); border-radius: 12px; background: rgba(4, 9, 22, .6); flex: none; max-width: 100%; outline-offset: 2px; scrollbar-width: thin; scrollbar-color: #2f4a7c transparent; }
.mm-res { border-collapse: collapse; width: 100%; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.mm-res th, .mm-res td { padding: 8px 8px; text-align: center; white-space: nowrap; border-bottom: 1px solid rgba(28, 43, 74, .7); }
.mm-res tbody tr:last-child th, .mm-res tbody tr:last-child td { border-bottom: 0; }
.mm-res thead th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--mm-muted); font-weight: 650; }
.mm-res .mm-l { text-align: left; position: sticky; left: 0; background: #070d1f; max-width: 132px; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.mm-res-name { display: block; overflow: hidden; text-overflow: ellipsis; }
.mm-res .mm-l small { display: block; font-weight: 500; font-size: 11px; color: var(--mm-muted); }
.mm-res tr.mm-you .mm-l, .mm-res tr.mm-you td { background: rgba(255, 209, 102, .07); }
.mm-res tr.mm-you .mm-l { background: #17160f; }
.mm-res tr.mm-left { opacity: .6; }
.mm-cell.mm-good { color: var(--mm-green); }
.mm-cell.mm-bad { color: var(--mm-pink); }
.mm-cell.mm-none { color: #52688f; }
.mm-tot { font-weight: 750; color: var(--mm-warm); }
.mm-delta.mm-good { color: var(--mm-green); font-weight: 700; }
.mm-delta.mm-bad { color: #ff9aa9; font-weight: 700; }
.mm-review { display: flex; flex-direction: column; gap: 6px; }
.mm-review .mm-h4 { margin: 4px 0 0; }
.mm-rev { border: 1px solid var(--mm-line); border-radius: 12px; background: rgba(4, 9, 22, .6); }
.mm-rev summary b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgba(85, 214, 255, .14); color: var(--mm-accent); font-size: 12px; flex: none; }
.mm-rev summary span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mm-rev-body { padding: 0 12px 4px; }
.mm-rev-body .mm-prob-text { font-size: 16px; }
.mm-rev-body .mm-sol { padding: 0 0 8px; }
.mm-rev-ans { margin: 8px 0 6px; color: var(--mm-warm); font-weight: 650; }
.mm-res-btns { display: flex; align-items: center; gap: 10px; }
.mm-res-btns .mm-btn { flex: 1 1 0; min-height: 48px; }
.mm-res-btns .mm-note { flex: 1 1 0; }
.mm-says { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.mm-chipbtn { appearance: none; min-height: 40px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--mm-line); background: rgba(11, 19, 40, .86); color: var(--mm-text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.mm-chipbtn:hover { border-color: #2f4a7c; }
.mm-chipbtn:active { transform: scale(.96); }
.mm-chipbtn.mm-on { border-color: var(--mm-accent); background: rgba(85, 214, 255, .14); color: var(--mm-accent); }

/* ---------- the room before a match ---------- */
.mm-room { position: absolute; left: 16px; top: 56px; bottom: 16px; width: min(580px, 57%); display: flex; flex-direction: column; min-height: 0; }
.mm-room-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px 8px 14px; flex: none; border-bottom: 1px solid var(--mm-line); }
.mm-room-id { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; color: var(--mm-muted); }
.mm-code { font-size: 20px; letter-spacing: .14em; color: var(--mm-text); font-variant-numeric: tabular-nums; -webkit-user-select: text; user-select: text; }
.mm-room-btns { display: flex; gap: 6px; flex: none; }
.mm-room-body { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 10px 14px 12px; display: flex; flex-direction: column; gap: 12px; scrollbar-width: thin; scrollbar-color: #2f4a7c transparent; }
.mm-seats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.mm-seat { position: relative; display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 4px 6px 4px 6px; border-radius: 11px; border: 1px solid var(--mm-line); background: rgba(6, 12, 28, .7); min-width: 0; }
.mm-seat.mm-you { border-color: rgba(255, 209, 102, .55); }
.mm-seat.mm-off { opacity: .55; }
.mm-seat.mm-ghost { border-style: dashed; opacity: .8; }
.mm-seat.mm-free { border-style: dashed; justify-content: center; background: transparent; }
.mm-seat-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; font-size: 14px; }
.mm-seat-name small { display: block; font-weight: 500; font-size: 11.5px; color: var(--mm-muted); overflow: hidden; text-overflow: ellipsis; }
.mm-tag { flex: none; padding: 2px 7px; border-radius: 99px; font-size: 11px; font-weight: 700; border: 1px solid var(--mm-line); color: var(--mm-muted); white-space: nowrap; }
.mm-tag.mm-ready { border-color: rgba(95, 227, 161, .6); color: var(--mm-green); }
.mm-tag.mm-host { border-color: rgba(255, 209, 102, .6); color: var(--mm-warm); }
.mm-seat .mm-ibtn.mm-x { width: 40px; height: 40px; margin: -2px -4px -2px -6px; flex: none; }
.mm-seat .mm-bubble { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); z-index: 2; padding: 5px 10px; border-radius: 99px; background: #ffd166; color: #251a02; font-weight: 750; font-size: 12.5px; white-space: nowrap; box-shadow: 0 4px 14px rgba(0, 0, 0, .4); animation: mm-rise .16s ease-out; }
.mm-room-people .mm-note { margin-top: 8px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.mm-room-set .mm-h4 { margin-top: 0; }
.mm-hist { margin: 8px 0 4px; }
.mm-hist-bars { display: flex; align-items: flex-end; gap: 3px; height: 56px; padding: 0 1px; }
.mm-hist-bars i { flex: 1 1 0; height: var(--h); min-height: 4px; border-radius: 3px 3px 0 0; background: #22335a; transition: background .2s; }
.mm-hist-bars i.mm-in { background: linear-gradient(180deg, #7fe3ff, #2fb1e6); box-shadow: 0 0 10px rgba(85, 214, 255, .35); }
.mm-hist-axis { position: relative; height: 17px; font-size: 11px; color: var(--mm-muted); border-top: 1px solid var(--mm-line); font-variant-numeric: tabular-nums; }
.mm-hist-axis span { position: absolute; top: 2px; }
.mm-hist-axis span:nth-child(1) { left: 0; }
.mm-hist-axis span:nth-child(2) { left: 28.57%; transform: translateX(-50%); }
.mm-hist-axis span:nth-child(3) { left: 64.29%; transform: translateX(-50%); }
.mm-hist-axis span:nth-child(4) { right: 0; }
.mm-settings { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.mm-set { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mm-set-l { font-size: 13.5px; color: #c7d6f3; flex: 0 1 auto; min-width: 0; }
.mm-seg { display: flex; gap: 0; flex: none; border: 1px solid var(--mm-line); border-radius: 11px; overflow: hidden; background: rgba(6, 12, 28, .8); }
.mm-segbtn { appearance: none; min-width: 44px; min-height: 40px; padding: 0 11px; border: 0; border-right: 1px solid var(--mm-line); background: transparent; color: var(--mm-muted); font: inherit; font-size: 13.5px; font-weight: 650; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; font-variant-numeric: tabular-nums; }
.mm-segbtn:last-child { border-right: 0; }
.mm-segbtn.mm-on { background: rgba(85, 214, 255, .16); color: var(--mm-accent); }
.mm-segbtn:focus-visible { outline: 2px solid var(--mm-accent); outline-offset: -2px; }
.mm-range { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px 14px; font-size: 13.5px; color: #c7d6f3; }
.mm-range span { display: inline-flex; align-items: center; gap: 6px; }
.mm-range b { min-width: 42px; text-align: center; font-variant-numeric: tabular-nums; color: var(--mm-accent); }
.mm-range .mm-ibtn { font-size: 20px; font-weight: 700; }
.mm-room-foot { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px 12px; border-top: 1px solid var(--mm-line); }
.mm-room-status { margin: 0; font-size: 13.5px; color: #c7d6f3; flex: 1 1 auto; min-width: 0; }
.mm-room-go { display: flex; gap: 8px; flex: none; }
.mm-room-go .mm-btn { min-width: 130px; min-height: 48px; }
.mm-room-go:not(:has(.mm-btn:not([hidden]))) { display: none; }

/* ---------- phones and narrow frames ---------- */
.mm-stage[data-dim="2"] .mm-brand { visibility: hidden; }
.mm-stage.mm-narrow .mm-play { left: 0; top: 0; right: 0; bottom: 0; transform: none; width: auto; max-height: none; border: 0; border-radius: 0; background: rgba(5, 9, 22, .97); -webkit-backdrop-filter: none; backdrop-filter: none; padding: 0 10px 10px; gap: 6px; }
.mm-stage.mm-narrow .mm-play-head { min-height: 48px; padding-right: 96px; }
.mm-stage.mm-narrow .mm-play-title { font-size: 15.5px; }
.mm-play-title .mm-short, .mm-stage.mm-narrow .mm-play-title .mm-long { display: none; }
.mm-stage.mm-narrow .mm-play-title .mm-short { display: inline; }
.mm-stage.mm-narrow .mm-play-right { gap: 6px; }
.mm-stage.mm-narrow .mm-pts { font-size: 13.5px; }
.mm-stage.mm-narrow .mm-pts-u { display: none; }
.mm-stage.mm-narrow .mm-play[data-phase="problem"] .mm-play-main { display: flex; flex-direction: column; gap: 6px; }
.mm-stage.mm-narrow .mm-play-main { gap: 8px; }
.mm-stage.mm-narrow .mm-prob { padding: 9px 11px 11px; gap: 6px; }
.mm-stage.mm-narrow .mm-prob-text { font-size: 17.5px; line-height: 1.4; }
.mm-stage.mm-narrow .mm-input.mm-ans { height: 46px; }
.mm-stage.mm-narrow .mm-btn.mm-hintbtn { min-height: 46px; padding: 0 9px; font-size: 13px; }
.mm-stage.mm-narrow.mm-short .mm-key { height: 42px; }
.mm-stage.mm-narrow.mm-short .mm-keys { gap: 5px; }
.mm-stage.mm-narrow.mm-short .mm-input.mm-ans { height: 42px; font-size: 20px; }
.mm-stage.mm-narrow.mm-short .mm-btn.mm-hintbtn { min-height: 42px; }
.mm-stage.mm-narrow.mm-short .mm-chipseat { height: 30px; }
.mm-stage.mm-narrow.mm-short .mm-chipseat .mm-av { width: 22px; height: 22px; font-size: 9.5px; }
.mm-stage.mm-narrow .mm-count { font-size: 84px; }
.mm-stage.mm-narrow .mm-rv-row { grid-template-columns: 28px minmax(0, 1.2fr) minmax(0, 1fr) 46px 38px 44px; gap: 6px; font-size: 13px; }
.mm-stage.mm-narrow .mm-room { left: 0; top: 0; right: 0; bottom: 0; width: auto; border: 0; border-radius: 0; background: rgba(5, 9, 22, .97); -webkit-backdrop-filter: none; backdrop-filter: none; }
.mm-stage.mm-narrow .mm-room-head { min-height: 48px; padding: 4px 100px 4px 12px; }
.mm-stage.mm-narrow .mm-room-head { flex-wrap: nowrap; }
.mm-stage.mm-narrow .mm-room-id > span:first-child { display: none; }
.mm-stage.mm-narrow .mm-room-id .mm-chip { display: none; }
.mm-stage.mm-narrow .mm-code { font-size: 17px; letter-spacing: .1em; }
.mm-stage.mm-narrow .mm-code { flex: none; }   /* the code never slides under the buttons */
.mm-stage.mm-narrow .mm-room-btns .mm-btn { padding: 0 8px; font-size: 12.5px; }
.mm-stage.mm-narrow .mm-room-body { padding: 8px 10px 10px; }
.mm-stage.mm-narrow .mm-room-foot { padding: 8px 10px 10px; flex-direction: column; align-items: stretch; gap: 6px; }
.mm-stage.mm-narrow .mm-room-go .mm-btn { flex: 1 1 0; }
.mm-stage.mm-narrow .mm-set { flex-wrap: wrap; gap: 4px 10px; }
@media (max-width: 420px) { .mm-seats { grid-template-columns: minmax(0, 1fr); } }
.mm-stage.mm-narrow .mm-res th, .mm-stage.mm-narrow .mm-res td { padding: 7px 3px; font-size: 13px; }
.mm-stage.mm-narrow .mm-res th:first-child, .mm-stage.mm-narrow .mm-res td:first-child { padding-left: 7px; }
.mm-stage.mm-narrow .mm-res thead th { font-size: 10.5px; letter-spacing: 0; }
.mm-stage.mm-narrow .mm-res .mm-l { max-width: 104px; }
.mm-tot-t, .mm-res .mm-short, .mm-stage.mm-narrow .mm-res .mm-long { display: none; }
.mm-stage.mm-narrow .mm-res .mm-short { display: inline; }
.mm-stage.mm-narrow .mm-res .mm-l { max-width: 76px; }
.mm-stage.mm-narrow .mm-res td.mm-cell, .mm-stage.mm-narrow .mm-res thead th:not(.mm-l) { padding-left: 2px; padding-right: 2px; }
.mm-stage.mm-narrow .mm-res td.mm-cell { font-size: 12px; }
.mm-stage.mm-narrow .mm-res-time { display: none; }
.mm-stage.mm-narrow .mm-tot-t { display: block; font-size: 10.5px; font-weight: 500; color: var(--mm-muted); }
.mm-res-swipe { margin: -4px 2px 0; font-size: 12px; color: var(--mm-muted); }
.mm-res-swipe[hidden] { display: none; }

/* ----- solo practice and the Daily Five ----- */
.mm-solo-rail { align-items: center; gap: 8px; }
.mm-topicbtn { flex: 0 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-stat { flex: none; display: inline-flex; align-items: center; min-height: 30px; padding: 0 10px; border-radius: 99px; border: 1px solid var(--mm-line); background: rgba(4, 9, 22, .6); color: var(--mm-muted); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mm-stat.mm-hot { border-color: rgba(255, 209, 102, .6); color: var(--mm-warm); background: rgba(255, 209, 102, .08); }
.mm-next .mm-btn.mm-big { display: inline-flex; flex-direction: row; align-items: center; justify-content: center; text-align: center; font-size: 15.5px; font-weight: 700; padding: 0 12px; }
.mm-prob-again { opacity: .92; }
.mm-prob-again .mm-prob-text { font-size: 16px; }
.mm-rev.mm-good summary b { background: rgba(95, 227, 161, .16); color: var(--mm-green); }
.mm-rev.mm-bad summary b { background: rgba(255, 107, 129, .14); color: #ff9aa9; }
.mm-topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mm-topic { appearance: none; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; min-height: 52px; padding: 7px 12px; border-radius: 12px; border: 1px solid var(--mm-line); background: rgba(4, 9, 22, .7); color: var(--mm-text); font: inherit; text-align: left; cursor: pointer; min-width: 0; }
.mm-topic b { font-size: 14px; font-weight: 650; line-height: 1.15; max-width: 100%; }
.mm-topic small { font-size: 11.5px; color: var(--mm-muted); font-variant-numeric: tabular-nums; }
.mm-topic:hover { border-color: #2f4a7c; }
.mm-topic:active { transform: scale(.98); }
.mm-topic.mm-on { border-color: var(--mm-accent); background: rgba(85, 214, 255, .12); }
.mm-topic.mm-on b { color: var(--mm-accent); }
.mm-topic:first-child { grid-column: 1 / -1; }
.mm-daily-intro { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--mm-line); background: rgba(4, 9, 22, .78); }
.mm-h3 { margin: 0; font-size: 19px; line-height: 1.3; }
.mm-rules { margin: 0; padding: 0 0 0 20px; display: flex; flex-direction: column; gap: 7px; font-size: 14.5px; line-height: 1.45; color: var(--mm-text); }
.mm-rules li::marker { color: var(--mm-accent); }
.mm-daily-best { margin: 0; font-size: 13.5px; color: var(--mm-warm); min-height: 0; }
.mm-daily-best:empty, .mm-daily-best span:empty { display: none; }
.mm-daily-best .rgd-line { display: inline; }
.mm-daily-best .rgd-ic { margin-right: 5px; }
.mm-daily-best .rgd-you { margin-left: 6px; }
.mm-daily-saved[data-saved="1"] { color: var(--mm-green); }
.mm-daily-nextin { white-space: nowrap; }
.mm-play[data-play="daily"] .mm-res-head b { font-size: 26px; color: var(--mm-warm); }
.mm-stage.mm-narrow .mm-daily-intro { padding: 12px 12px; gap: 8px; }
.mm-stage.mm-narrow .mm-h3 { font-size: 17px; }
.mm-stage.mm-narrow .mm-rules { font-size: 13.5px; gap: 5px; line-height: 1.4; }
.mm-stage.mm-narrow .mm-solo-rail { gap: 5px; }
.mm-stage.mm-narrow .mm-stat { min-height: 28px; padding: 0 7px; font-size: 11.5px; }
.mm-stage.mm-narrow .mm-topicbtn { min-height: 40px; padding: 0 10px; font-size: 12.5px; }
@media (prefers-reduced-motion: reduce) { .mm-topic:active { transform: none; } }

/* ----- panels: rooms, players, history, awards, how to play ----- */
.mm-roomrow, .mm-prow, .mm-mrow { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--mm-line); background: rgba(4, 9, 22, .6); min-width: 0; }
.mm-roomrow-what, .mm-prow-who, .mm-mrow-what { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.mm-roomrow-what b, .mm-prow-who b, .mm-mrow-what b { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mm-roomrow-what span, .mm-prow-who span, .mm-mrow-what span { font-size: 12.5px; color: var(--mm-muted); line-height: 1.35; }
.mm-roomrow .mm-btn { flex: none; min-width: 76px; min-height: 42px; }
.mm-prow.mm-you { border-color: rgba(255, 209, 102, .55); background: rgba(255, 209, 102, .06); }
.mm-prow-r, .mm-mrow-r { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 1px; font-variant-numeric: tabular-nums; }
.mm-prow-r b, .mm-mrow-r b { font-size: 15px; color: var(--mm-warm); }
.mm-prow-r span, .mm-mrow-r span { font-size: 11.5px; color: var(--mm-muted); }
.mm-mrow-r.mm-up b { color: var(--mm-green); }
.mm-mrow-r.mm-down b { color: #ff9aa9; }
.mm-mrow-place { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(85, 214, 255, .12); color: var(--mm-accent); font-size: 13px; }
.mm-mrow.mm-won .mm-mrow-place { background: rgba(255, 209, 102, .16); color: var(--mm-warm); }
.mm-tabs { display: flex; gap: 8px; margin: 2px 0 10px; }
.mm-tabs .mm-chipbtn { flex: 1 1 0; }
.mm-ranktable { width: 100%; }
.mm-ranktable .mm-l { position: static; background: transparent; max-width: none; }
.mm-ranktable td.mm-l b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 170px; }
.mm-ranktable td.mm-l small { color: var(--mm-muted); font-size: 11.5px; }
.mm-ranktable tr.mm-you td { background: rgba(255, 209, 102, .08); }
.mm-ranktable .mm-strong { color: var(--mm-warm); font-weight: 700; }
.mm-rank .mm-note { margin-top: 8px; }
.mm-kvs { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px; margin: 4px 0 8px; }
.mm-kv { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--mm-line); background: rgba(4, 9, 22, .6); min-width: 0; }
.mm-kv b { font-size: 20px; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mm-kv span { font-size: 11.5px; color: var(--mm-muted); line-height: 1.25; }
.mm-kv.mm-warm b { color: var(--mm-warm); }
.mm-graph { margin: 8px 0 2px; border: 1px solid var(--mm-line); border-radius: 12px; background: rgba(4, 9, 22, .6); padding: 6px; }
.mm-graph svg { display: block; width: 100%; height: auto; }
.mm-g-axis { stroke: #1c2b4a; stroke-width: 1; stroke-dasharray: 3 4; }
.mm-g-t { fill: #8aa3c4; font-size: 9.5px; font-family: inherit; }
.mm-g-line { fill: none; stroke: #55d6ff; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.mm-g-fill { fill: rgba(85, 214, 255, .1); stroke: none; }
.mm-g-dot { fill: #ffd166; stroke: #04060f; stroke-width: 1.5; }
.mm-awards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.mm-award { display: flex; align-items: flex-start; gap: 10px; padding: 9px 11px; border-radius: 12px; border: 1px solid var(--mm-line); background: rgba(4, 9, 22, .6); color: var(--mm-muted); min-width: 0; }
.mm-award i { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 16px; background: rgba(138, 163, 196, .1); }
.mm-award div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mm-award b { font-size: 14px; color: #a9bbd8; }
.mm-award span { font-size: 12.5px; line-height: 1.35; }
.mm-award small { font-size: 11.5px; color: var(--mm-green); }
.mm-award.mm-got { border-color: rgba(255, 209, 102, .5); background: rgba(255, 209, 102, .06); }
.mm-award.mm-got i { background: rgba(255, 209, 102, .2); color: var(--mm-warm); }
.mm-award.mm-got b { color: var(--mm-warm); }
.mm-sheet .mm-rules { font-size: 14px; }

/* ---------- a phone held sideways (short and wide): everything compact, the pad beside the problem ---------- */
.mm-stage.mm-land .mm-play, .mm-stage.mm-land .mm-room { left: 0; top: 0; right: 0; bottom: 0; transform: none; width: auto; max-height: none; border: 0; border-radius: 0; background: rgba(5, 9, 22, .97); -webkit-backdrop-filter: none; backdrop-filter: none; }
.mm-stage.mm-land .mm-play { padding: 2px 10px 8px; gap: 5px; }
.mm-stage.mm-land .mm-play-head { min-height: 44px; padding-right: 96px; }
.mm-stage.mm-land .mm-room-head { min-height: 44px; padding: 2px 100px 2px 12px; }
.mm-stage.mm-land .mm-play-title { font-size: 15.5px; }
.mm-stage.mm-land .mm-play[data-phase="problem"] .mm-play-main { grid-template-columns: minmax(0, 1fr) minmax(250px, 290px); gap: 12px; align-items: stretch; }
.mm-stage.mm-land .mm-prob { padding: 8px 11px 10px; gap: 5px; }
.mm-stage.mm-land .mm-prob-text { font-size: 17px; line-height: 1.38; }
.mm-stage.mm-land .mm-pad, .mm-stage.mm-land .mm-keys { gap: 5px; }
.mm-stage.mm-land .mm-forms { display: none; }
.mm-stage.mm-land .mm-key { height: 40px; font-size: 18px; }
.mm-stage.mm-land .mm-input.mm-ans { height: 42px; font-size: 20px; }
.mm-stage.mm-land .mm-btn.mm-hintbtn { min-height: 42px; padding: 0 9px; font-size: 13px; }
.mm-stage.mm-land .mm-chipseat { height: 30px; }
.mm-stage.mm-land .mm-chipseat .mm-av { width: 22px; height: 22px; font-size: 9.5px; }
.mm-stage.mm-land .mm-next .mm-btn, .mm-stage.mm-land .mm-res-btns .mm-btn { min-height: 44px; }
.mm-stage.mm-land .mm-res-head b { font-size: 19px; }
.mm-stage.mm-land .mm-play[data-phase="results"] .mm-play-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.mm-stage.mm-land .mm-play[data-phase="results"] .mm-play-foot > * { flex: 1 1 320px; }
