/* Noos Merge Drop */
[hidden] { display: none !important; }
html, body.md-body { margin: 0; padding: 0; }
body.md-body { background: #0b1030; color: #e8ecff; font-family: 'Quicksand', system-ui, sans-serif; -webkit-tap-highlight-color: transparent; overflow-x: hidden; }
#beta-report-trigger { display: none !important; }
.md-wrap { box-sizing: border-box; width: 100%; max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; padding: 4px 10px 8px; gap: 6px; height: calc(100dvh - 64px); }
.md-hud { display: flex; align-items: stretch; gap: 8px; flex: 0 0 auto; }
.md-score { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.md-lbl { font-size: 10px; letter-spacing: .12em; font-weight: 700; color: #94a3d8; text-transform: uppercase; display: block; }
.md-big { font-size: clamp(28px, 8vw, 42px); font-weight: 700; line-height: 1; color: #fff; text-shadow: 0 0 18px rgba(56, 189, 248, .5); font-variant-numeric: tabular-nums; }
.md-chip { display: flex; flex-direction: column; justify-content: center; padding: 4px 10px; border-radius: 12px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); min-width: 56px; font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }
.md-chip.low { border-color: #f87171; color: #fca5a5; animation: mdpulse .6s infinite alternate; }
@keyframes mdpulse { from { background: rgba(248, 113, 113, .08); } to { background: rgba(248, 113, 113, .3); } }
.md-slot { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3px 6px 2px; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); color: inherit; font: inherit; cursor: pointer; min-width: 56px; }
.md-slot canvas { display: block; width: 44px; height: 44px; }
button.md-slot:disabled { opacity: .45; cursor: default; }
.md-next { cursor: default; }

.md-stagewrap { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; }
.md-stage { position: relative; border-radius: 18px; overflow: hidden; box-shadow: 0 10px 40px rgba(0, 0, 0, .45), 0 0 0 1px rgba(125, 211, 252, .18); background: #0b1030; }
.md-stage canvas#cv { display: block; touch-action: none; cursor: crosshair; }

.md-bar { flex: 0 0 auto; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.md-ladder { display: flex; align-items: center; justify-content: center; gap: 1px; max-width: 100%; }
.md-ladder canvas { opacity: .38; transition: opacity .3s, transform .3s; }
.md-ladder canvas.got { opacity: 1; filter: drop-shadow(0 0 4px rgba(125, 211, 252, .55)); }
.md-ladder .ar { width: 0; height: 0; border-left: 4px solid rgba(148, 163, 216, .55); border-top: 3px solid transparent; border-bottom: 3px solid transparent; margin: 0 1px; }
.md-btns { display: flex; gap: 6px; flex-wrap: nowrap; justify-content: center; }
.md-btn { white-space: nowrap; border: 1px solid rgba(125, 211, 252, .35); background: rgba(56, 189, 248, .12); color: #e0f2fe; font: 700 12px/1 'Quicksand', sans-serif; letter-spacing: .06em; padding: 10px 12px; border-radius: 999px; cursor: pointer; }
.md-btn:hover { background: rgba(56, 189, 248, .25); }
.md-btn:disabled { opacity: .4; cursor: default; }
.md-btn b { color: #fde047; margin-left: 3px; }
.md-btn.primary { background: linear-gradient(135deg, #38bdf8, #8b5cf6); border-color: transparent; color: #fff; font-size: 15px; padding: 14px 48px; box-shadow: 0 6px 20px rgba(99, 102, 241, .5); }
.md-btn.primary:hover { filter: brightness(1.1); }

.md-scr { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 10px; padding: 14px 14px; box-sizing: border-box; background: rgb(9, 13, 42); overflow-y: auto; text-align: center; }
.md-scr > :first-child { margin-top: auto; }
.md-scr > :last-child { margin-bottom: auto; }
#scrCount, #scrPause { background: rgba(9, 13, 42, .88); }
.md-title { font-size: clamp(26px, 8vw, 38px); font-weight: 700; letter-spacing: .04em; background: linear-gradient(90deg, #7dd3fc, #c4b5fd, #f9a8d4); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1.05; }
.md-sub { font-size: 13px; color: #a5b4e8; margin: 0; max-width: 270px; line-height: 1.35; min-height: 2.7em; }
.md-modes { display: flex; gap: 8px; }
.md-mode { cursor: pointer; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .05); color: #fff; font: 700 13px 'Quicksand', sans-serif; padding: 9px 10px; border-radius: 14px; min-width: 72px; }
.md-mode .mb { display: block; font-size: 10px; color: #94a3d8; margin-top: 3px; letter-spacing: .06em; }
.md-mode.sel { border-color: #38bdf8; background: rgba(56, 189, 248, .18); box-shadow: 0 0 16px rgba(56, 189, 248, .35); }
.md-links { display: flex; gap: 14px; }
.md-link { background: none; border: 0; color: #93c5fd; font: 700 12px 'Quicksand', sans-serif; letter-spacing: .08em; cursor: pointer; text-decoration: underline; }
.md-row { display: flex; align-items: center; justify-content: space-between; width: 100%; max-width: 300px; gap: 10px; font-weight: 700; font-size: 14px; }
.md-row .md-btn { min-width: 84px; padding: 8px 12px; }
.md-note { font-size: 11px; color: #94a3d8; margin: 0; max-width: 280px; }
#countNum { font-size: 90px; font-weight: 700; color: #fff; text-shadow: 0 0 30px #38bdf8; }
#trophy-list { width: 100%; max-height: 38vh; overflow-y: auto; text-align: left; font-size: 13px; }
#toast { position: absolute; left: 50%; top: 52px; transform: translate(-50%, -8px); background: rgba(15, 23, 60, .95); border: 1px solid rgba(125, 211, 252, .5); padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 8; white-space: nowrap; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }

/* narrow phones */
.md-body.tight .md-chip { min-width: 46px; padding: 3px 7px; font-size: 14px; }
.md-body.tight .md-slot { min-width: 48px; }
.md-body.tight .md-slot canvas { width: 38px; height: 38px; }
.md-body.tight .md-btn { padding: 9px 9px; font-size: 11px; }
.md-body.tight .md-sub { font-size: 12px; }
.md-body.compact .md-lbl { font-size: 9px; }
.md-body.compact .md-big { font-size: 26px; }
.md-body.compact .md-scr { gap: 6px; padding: 8px; }
.md-body.compact .md-title { font-size: 24px; }
.md-body.compact .md-btn.primary { padding: 10px 26px; }

/* short landscape: stage left, controls in a ~210px right column */
.md-body.land .md-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 210px; grid-template-rows: auto minmax(0, 1fr); column-gap: 10px; align-content: stretch; overflow: hidden; }
.md-body.land .md-stagewrap { grid-column: 1; grid-row: 1 / span 2; min-height: 0; height: 100%; }
.md-body.land .md-hud { grid-column: 2; grid-row: 1; flex-wrap: wrap; gap: 6px; }
.md-body.land .md-score { flex: 1 1 100%; flex-direction: row; align-items: baseline; gap: 8px; }
.md-body.land .md-bar { grid-column: 2; grid-row: 2; justify-content: flex-start; min-height: 0; gap: 8px; }
.md-body.land .md-ladder { flex-wrap: wrap; width: 210px; }
.md-body.land .md-ladder .ar { display: none; }
.md-body.land .md-btns { flex-wrap: wrap; }
.md-body.land .md-btn { padding: 8px 10px; }
.md-body.land .md-big { font-size: 24px; }
.md-body.land .md-chip { padding: 2px 8px; font-size: 14px; min-width: 50px; }
.md-body.land .md-slot canvas { width: 34px; height: 34px; }