/* TerraPuzzle — playground. Dark topographic night. */
:root {
    --bg: #0a0e13;
    --panel: rgba(14, 20, 28, .86);
    --panel-solid: #0f161e;
    --line: rgba(255, 255, 255, .08);
    --line-2: rgba(255, 255, 255, .14);
    --text: #e8edf2;
    --muted: #93a1b0;
    --accent: #f5b544;
    --accent-ink: #1a1204;
    --teal: #3ec7b0;
    --danger: #ff6b6b;
    --r: 12px;
    --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-num: "Space Grotesk", "Inter", system-ui, sans-serif;
    --safe-t: env(safe-area-inset-top, 0px);
    --safe-b: env(safe-area-inset-bottom, 0px);
    --safe-l: env(safe-area-inset-left, 0px);
    --safe-r: env(safe-area-inset-right, 0px);
    --gap: 12px;
    --lb-w: 280px;
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
    margin: 0; height: 100%; overflow: hidden;
    background: var(--bg); color: var(--text);
    font: 14px/1.4 var(--font-ui);
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
    overscroll-behavior: none;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }
a { color: inherit; }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

#stage { position: fixed; inset: 0; touch-action: none; user-select: none; -webkit-user-select: none; }
#stage canvas { display: block; touch-action: none; }
#stage.can-grab { cursor: grab; }
#stage.grabbing, #stage.grabbing.can-grab { cursor: grabbing; }
.vignette {
    position: fixed; inset: 0; pointer-events: none;
    background:
        radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(4, 7, 10, .55) 100%),
        linear-gradient(to bottom, rgba(10, 14, 19, .55), transparent 18%, transparent 80%, rgba(10, 14, 19, .5));
}

.panel {
    background: var(--panel);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    backdrop-filter: blur(14px) saturate(1.2);
    border: 1px solid var(--line);
    border-radius: var(--r);
    box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .6);
}

/* ---------- top bar ---------- */
.topbar {
    position: fixed; z-index: 10;
    top: calc(var(--gap) + var(--safe-t)); left: calc(var(--gap) + var(--safe-l)); right: calc(var(--gap) + var(--safe-r));
    display: flex; gap: 10px; align-items: stretch; justify-content: space-between;
    pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.tb-left { display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 6px; min-width: 0; flex: 0 1 auto; }
.brand { display: inline-flex; flex: none; border-radius: 9px; }
.brand svg { display: block; }
.titles { min-width: 0; padding-right: 4px; }
.pz-title {
    font-family: var(--font-num); font-weight: 600; font-size: 15px; letter-spacing: .005em;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 34vw;
}
.pz-sub { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 34vw; }
.chip {
    display: inline-flex; align-items: center; gap: 6px; flex: none;
    padding: 6px 10px; border-radius: 9px; border: 1px solid var(--line-2);
    color: var(--text); text-decoration: none; font-size: 12.5px; font-weight: 500;
    transition: background .15s, border-color .15s;
}
.chip:hover { background: rgba(245, 181, 68, .1); border-color: rgba(245, 181, 68, .45); }
.chip i { font-size: 16px; color: var(--accent); }

.hud { display: flex; align-items: center; gap: 14px; padding: 6px 6px 6px 14px; flex: none; }
.hud-progress { width: 150px; }
.hud-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 5px; }
.hud-label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
#progText { font-size: 13px; font-weight: 600; }
.bar { height: 5px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.bar span {
    display: block; height: 100%; width: 0; border-radius: inherit;
    background: linear-gradient(90deg, #e9a136, var(--accent));
    box-shadow: 0 0 12px rgba(245, 181, 68, .5);
    transition: width .45s cubic-bezier(.2, .8, .2, 1), background .3s;
}
.bar span.done { background: linear-gradient(90deg, #2fae9a, var(--teal)); box-shadow: 0 0 12px rgba(62, 199, 176, .55); }
.hud-timer { display: flex; align-items: center; gap: 6px; font-size: 20px; font-weight: 600; min-width: 74px; }
.hud-timer i { font-size: 17px; color: var(--muted); }
body.finished .hud-timer { color: var(--teal); }

.icon-btn {
    display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none;
    border-radius: 10px; border: 1px solid transparent; background: rgba(255, 255, 255, .04);
    font-size: 20px; color: var(--text); transition: background .15s, border-color .15s, transform .1s;
}
.icon-btn:hover { background: rgba(255, 255, 255, .09); }
.icon-btn:active { transform: scale(.95); }
.icon-btn.sm { width: 32px; height: 32px; font-size: 20px; }
#lbBtn { color: var(--accent); }

/* ---------- leaderboard ---------- */
.lb {
    position: fixed; z-index: 9;
    top: calc(var(--gap) + var(--safe-t) + 66px); right: calc(var(--gap) + var(--safe-r));
    width: var(--lb-w); max-height: calc(100% - 66px - 100px - var(--safe-t) - var(--safe-b));
    display: flex; flex-direction: column; padding: 12px;
    transition: transform .3s cubic-bezier(.2, .8, .2, 1), opacity .25s;
}
body.lb-hidden .lb { transform: translateX(calc(100% + 24px)); opacity: 0; pointer-events: none; }
.lb-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.lb-head h2 { margin: 0; font: 600 13px/1 var(--font-num); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.lb-head h2 i { color: var(--accent); font-size: 16px; }
.lb-list { overflow: auto; min-height: 60px; margin: 10px -4px 0; padding: 0 4px; scrollbar-width: thin; }
.lb-row {
    display: grid; grid-template-columns: 24px 1fr 18px auto 44px; align-items: center; gap: 6px;
    padding: 7px 6px; border-radius: 8px; font-size: 13px;
}
.lb-row + .lb-row { border-top: 1px solid rgba(255, 255, 255, .04); }
.lb-row .rank { color: var(--muted); font: 600 12px var(--font-num); text-align: center; }
.lb-row .rank.m1 { color: var(--accent); }
.lb-row .rank.m2 { color: #cfd8e3; }
.lb-row .rank.m3 { color: #d39a6a; }
.lb-row .ini { font: 700 13px var(--font-num); letter-spacing: .12em; }
.lb-row .md { color: var(--muted); font-size: 14px; display: grid; place-items: center; }
.lb-row .score { font: 600 13px var(--font-num); font-variant-numeric: tabular-nums; text-align: right; }
.lb-row .time { color: var(--muted); font: 500 12px var(--font-num); font-variant-numeric: tabular-nums; text-align: right; }
.lb-row.me { background: rgba(245, 181, 68, .12); border-top-color: transparent; }
.lb-row.me + .lb-row { border-top-color: transparent; }
.lb-empty { color: var(--muted); font-size: 13px; padding: 14px 6px; text-align: center; }
.pb-line { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.pb-line i { color: var(--accent); }
.pb-line b { color: var(--text); font-family: var(--font-num); }
.backdrop { position: fixed; inset: 0; z-index: 11; background: rgba(3, 6, 9, .5); opacity: 0; pointer-events: none; transition: opacity .25s; }
.backdrop.visible { opacity: 1; pointer-events: auto; }
#lbClose { display: none; }

/* ---------- segmented control ---------- */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); }
.seg button {
    border: 0; background: transparent; padding: 7px 12px; border-radius: 8px;
    font-weight: 600; font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
    transition: background .15s, color .15s;
}
.seg button i { font-size: 16px; }
.seg button em { font-style: normal; font: 600 11px var(--font-num); color: var(--accent); opacity: .85; }
.seg button:hover:not(:disabled) { color: var(--text); }
.seg button.active { background: rgba(255, 255, 255, .1); color: var(--text); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.seg button:disabled { opacity: .4; }
.seg.sm { display: flex; }
.seg.sm button { flex: 1; justify-content: center; padding: 6px 8px; font-size: 12px; }

/* ---------- start card ---------- */
.start-card {
    position: fixed; z-index: 8; left: 50%; transform: translateX(-50%);
    bottom: calc(var(--gap) + var(--safe-b) + 84px);
    width: min(460px, calc(100% - 2 * var(--gap)));
    padding: 16px; animation: rise .5s cubic-bezier(.2, .8, .2, 1) both;
}
.sc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.kicker { color: var(--accent); font: 600 11px var(--font-ui); text-transform: uppercase; letter-spacing: .12em; }
.sc-title { font: 600 22px/1.2 var(--font-num); margin-top: 2px; }
.sc-help { color: var(--muted); font-size: 13px; margin: 10px 0 14px; }
body.finished .sc-help { display: none; }
body.finished .start-card .sc-head { margin-bottom: 14px; }
body.finished .kicker { color: var(--teal); }

/* ---------- buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 16px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04);
    font-weight: 600; font-size: 14px; color: var(--text); text-decoration: none; white-space: nowrap;
    transition: background .15s, border-color .15s, transform .1s, box-shadow .15s;
}
.btn i { font-size: 18px; }
.btn:hover { background: rgba(255, 255, 255, .08); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 20px -8px rgba(245, 181, 68, .7); }
.btn.primary:hover { background: #ffc35a; }
.btn.primary:disabled { opacity: .55; box-shadow: none; }
.btn.lg { width: 100%; padding: 13px 18px; font-size: 15px; }
.link { border: 0; background: none; color: var(--muted); font-size: 13px; display: inline-flex; gap: 6px; align-items: center; padding: 6px 4px; }
.link:hover { color: var(--text); }

/* ---------- dock ---------- */
.dock {
    position: fixed; z-index: 10; left: 50%; transform: translateX(-50%);
    bottom: calc(var(--gap) + var(--safe-b));
    display: flex; align-items: stretch; gap: 2px; padding: 5px;
    max-width: calc(100% - 2 * var(--gap));
}
.dock-more { display: contents; }
.dock-sep { width: 1px; margin: 8px 4px; background: var(--line); flex: none; }
.dbtn {
    position: relative; flex: none;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    min-width: 58px; height: 54px; padding: 4px 6px; border-radius: 9px; border: 0; background: transparent;
    color: var(--text); font-size: 11px; font-weight: 500; letter-spacing: .01em;
    transition: background .15s, color .15s, opacity .15s;
}
.dbtn i { font-size: 21px; line-height: 1; }
.dbtn span { color: var(--muted); white-space: nowrap; transition: color .15s; }
.dbtn:hover:not(:disabled) { background: rgba(255, 255, 255, .07); }
.dbtn:hover:not(:disabled) span { color: var(--text); }
.dbtn:active:not(:disabled) { background: rgba(255, 255, 255, .11); }
.dbtn:disabled { opacity: .35; }
.dbtn.active { color: var(--accent); }
.dbtn.active span { color: var(--accent); }
#sfxBtn.active, #sfxBtn.active span { color: var(--text); }
#musicBtn.active i { animation: bob 2.4s ease-in-out infinite; }
#scrambleBtn i { color: var(--accent); }
body.playing #scrambleBtn i { color: var(--text); }
.more-toggle { display: none; }
.badge {
    position: absolute; top: 4px; right: 9px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px;
    background: var(--accent); color: var(--accent-ink); font: 700 10px/16px var(--font-num); text-align: center;
}

/* ---------- rotate FAB ---------- */
.fab {
    position: fixed; z-index: 10;
    right: calc(var(--gap) + var(--safe-r)); bottom: calc(var(--gap) + var(--safe-b) + 80px);
    width: 58px; height: 58px; border-radius: 50%;
    border: 1px solid rgba(245, 181, 68, .5); background: var(--panel);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    color: var(--accent); font-size: 28px; display: grid; place-items: center;
    box-shadow: 0 10px 28px -10px rgba(0, 0, 0, .7);
    transition: transform .12s, opacity .2s;
    animation: pop .3s cubic-bezier(.2, .8, .2, 1.3) both;
}
.fab:active:not(:disabled) { transform: scale(.92) rotate(30deg); }
.fab:disabled { opacity: .45; border-color: var(--line-2); color: var(--muted); }

/* ---------- toast ---------- */
.toast {
    position: fixed; z-index: 30; left: 50%; top: calc(var(--gap) + var(--safe-t) + 72px);
    transform: translate(-50%, -8px); opacity: 0; pointer-events: none;
    padding: 9px 16px; border-radius: 99px; max-width: calc(100% - 32px);
    background: rgba(14, 20, 28, .94); border: 1px solid var(--line-2);
    font-weight: 500; font-size: 13.5px; text-align: center;
    box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .8);
    transition: opacity .2s, transform .25s cubic-bezier(.2, .8, .2, 1);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- overlays ---------- */
.overlay { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 24px; }
#loading { background: radial-gradient(60% 50% at 50% 50%, rgba(20, 28, 38, .6), var(--bg)); transition: opacity .4s; }
.loader { display: grid; justify-items: center; gap: 14px; color: var(--muted); font-size: 13px; }
.spinner {
    width: 44px; height: 44px; border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .08); border-top-color: var(--accent);
    animation: spin .9s linear infinite;
}
body.is-loading .topbar, body.is-loading .dock, body.is-loading .lb,
body.is-empty .dock, body.is-empty .lb, body.is-empty .topbar { visibility: hidden; }
#empty { background: radial-gradient(70% 60% at 50% 40%, rgba(22, 31, 42, .9), var(--bg)); }
.card {
    background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
    padding: 28px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8);
}
.empty-card { max-width: 440px; text-align: center; animation: rise .5s cubic-bezier(.2, .8, .2, 1) both; }
.empty-art { margin: 0 auto 6px; display: block; }
.empty-card h1 { font: 600 24px/1.2 var(--font-num); margin: 8px 0 8px; }
.empty-card p { color: var(--muted); margin: 0 0 20px; }
.row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.row > .btn { flex: 1 1 140px; }
.daily-link { display: inline-flex; gap: 6px; align-items: center; margin-top: 16px; color: var(--muted); font-size: 13px; text-decoration: none; }
.daily-link:hover { color: var(--accent); }

/* ---------- dialogs ---------- */
.dlg {
    border: 1px solid var(--line-2); border-radius: 18px; padding: 0;
    background: var(--panel-solid); color: var(--text);
    width: min(400px, calc(100% - 32px)); max-height: calc(100% - 32px);
    box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .9);
}
.dlg[open] { animation: dlgIn .35s cubic-bezier(.2, .8, .2, 1.1) both; }
.dlg::backdrop { background: rgba(3, 6, 9, .62); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.dlg-body { padding: 24px; margin: 0; }
.dlg-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.dlg h2 { font: 600 24px/1.2 var(--font-num); margin: 0; }
.score-body { text-align: center; }
.solved-badge {
    width: 56px; height: 56px; margin: -4px auto 10px; border-radius: 50%;
    display: grid; place-items: center; font-size: 34px; color: var(--bg);
    background: var(--teal); box-shadow: 0 0 0 6px rgba(62, 199, 176, .15), 0 0 40px rgba(62, 199, 176, .45);
}
.sd-place { color: var(--muted); font-size: 13px; margin-top: 4px; }
.pb-flag {
    display: inline-flex; align-items: center; gap: 6px; margin-top: 12px;
    padding: 5px 12px; border-radius: 99px; background: rgba(245, 181, 68, .14); color: var(--accent);
    font-weight: 600; font-size: 13px; animation: pop .5s .2s cubic-bezier(.2, .8, .2, 1.4) both;
}
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0 8px; }
.stats > div { background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 12px; padding: 10px 6px; display: grid; gap: 2px; }
.stats .k { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.stats .v { font-size: 20px; font-weight: 600; }
.stats .v.accent { color: var(--accent); }
.sd-note { color: var(--muted); font-size: 12.5px; min-height: 18px; margin-bottom: 14px; }
.ini-label { display: block; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.ini-input {
    width: 150px; margin: 0 auto 14px; display: block; text-align: center;
    font: 700 28px/1 var(--font-num); letter-spacing: .4em; text-indent: .4em; text-transform: uppercase;
    padding: 10px 8px; border-radius: 12px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line-2);
}
.ini-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(245, 181, 68, .2); }
.ini-input::placeholder { color: rgba(255, 255, 255, .15); }
.sd-error { color: var(--danger); font-size: 13px; margin: -6px 0 12px; }
.small-links { margin-top: 12px; gap: 16px; }
.help-body .muted { color: var(--muted); margin: 8px 0 14px; }
.help-body .small { font-size: 12.5px; margin-bottom: 0; }
.keys { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.keys > div { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.keys span { color: var(--muted); }
kbd {
    min-width: 24px; padding: 2px 7px; border-radius: 6px; text-align: center;
    background: rgba(255, 255, 255, .07); border: 1px solid var(--line-2); border-bottom-width: 2px;
    font: 600 12px var(--font-num); color: var(--text);
}

/* ---------- animations ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 14px); } to { opacity: 1; transform: translate(-50%, 0); } }
.empty-card { animation-name: riseCard; }
@keyframes riseCard { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes dlgIn { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------- desktop: leaderboard docked on the right ---------- */
@media (min-width: 1100px) {
    body:not(.lb-hidden):not(.is-empty) .start-card { margin-left: calc(var(--lb-w) / -2 - var(--gap) / 2); }
}

/* ---------- tablet / phone ---------- */
@media (max-width: 1099px) {
    .lb {
        top: 0; right: 0; bottom: 0; z-index: 12; max-height: none; height: 100%;
        width: min(330px, 88vw); border-radius: 16px 0 0 16px; border-right: 0;
        padding: calc(16px + var(--safe-t)) calc(14px + var(--safe-r)) calc(16px + var(--safe-b)) 14px;
        transform: translateX(105%); opacity: 1; pointer-events: none;
        background: rgba(12, 17, 24, .97);
    }
    body.lb-hidden .lb { transform: translateX(105%); }
    .lb.open, body.lb-hidden .lb.open { transform: none; pointer-events: auto; opacity: 1; }
    #lbClose { display: inline-grid; }
}

@media (max-width: 860px) {
    .more-toggle { display: flex; }
    .dock-more {
        display: none; position: absolute; right: 0; bottom: calc(100% + 8px);
        padding: 5px; gap: 2px; border-radius: var(--r);
        background: rgba(14, 20, 28, .97); border: 1px solid var(--line);
        box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .8);
        flex-wrap: wrap; width: max-content; max-width: calc(100vw - 24px);
    }
    .dock-more.open { display: flex; animation: pop .18s ease-out both; transform-origin: bottom right; }
    .dock-sep { display: none; }
}

@media (max-width: 640px) {
    :root { --gap: 8px; }
    .topbar { flex-wrap: nowrap; gap: 6px; }
    .tb-left { padding: 5px 6px 5px 5px; gap: 8px; flex: 1 1 auto; }
    .brand svg { width: 26px; height: 26px; }
    .pz-title { font-size: 14px; max-width: none; }
    .pz-sub { font-size: 11.5px; max-width: none; }
    .chip span { display: none; }
    .chip { padding: 6px 7px; }
    .hud { gap: 8px; padding: 5px 5px 5px 10px; }
    .hud-progress { width: 64px; }
    .hud-label { display: none; }
    .hud-row { margin-bottom: 4px; justify-content: flex-start; }
    #progText { font-size: 12px; }
    .hud-timer { font-size: 16px; min-width: 50px; gap: 0; }
    .hud-timer i { display: none; }
    .icon-btn { width: 36px; height: 36px; font-size: 19px; }
    .lb { top: 0; }
    .dock { gap: 0; padding: 4px; width: calc(100% - 2 * var(--gap)); justify-content: space-between; }
    .dbtn { min-width: 0; flex: 1 1 0; height: 52px; padding: 4px 2px; font-size: 10.5px; }
    .dbtn i { font-size: 22px; }
    .dock-more .dbtn { flex: none; min-width: 64px; }
    .start-card { bottom: calc(var(--gap) + var(--safe-b) + 70px); padding: 14px; }
    .sc-title { font-size: 20px; }
    .fab { bottom: calc(var(--gap) + var(--safe-b) + 72px); }
    .toast { top: calc(var(--gap) + var(--safe-t) + 60px); }
    .stats .v { font-size: 18px; }
    .keys { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
    .seg button em { display: none; }
    .sc-head .seg { width: 100%; }
    .sc-head .seg button { flex: 1; justify-content: center; }
}
