:root {
    --bg: #030809;
    --ink: #dce6df;
    --ink-dim: #93a39c;
    --ink-faint: #5d6d68;
    --accent: #ff5236;
    --accent-soft: #ff7a4f;
    --amber: #e8b35a;
    --teal: #7fc0b2;
    --steel: #263331;
    --line: rgba(180, 205, 194, 0.18);
    --panel: rgba(5, 13, 14, 0.82);
    --sans: "Bahnschrift", "Arial Narrow", "Segoe UI", sans-serif;
    --display: "Arial Black", "Bahnschrift", "Segoe UI", sans-serif;
    --mono: "Consolas", "Lucida Console", monospace;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    color: var(--ink);
    overflow: hidden;
    font-family: var(--sans);
    -webkit-font-smoothing: antialiased;
    user-select: none;
}

#app {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: #030809;
}

#game {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    background: #041012;
    filter: brightness(1.13) contrast(1.04) saturate(1.08);
    z-index: 0;
}

.fx-scanlines,
.fx-vignette,
.fx-grain,
#damage-flash {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.fx-scanlines {
    z-index: 6;
    background: repeating-linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.16) 0,
        rgba(0, 0, 0, 0.16) 1px,
        transparent 1px,
        transparent 3px
    );
    opacity: 0.32;
    mix-blend-mode: multiply;
}

.fx-vignette {
    z-index: 7;
    background:
        radial-gradient(ellipse at 50% 47%, transparent 42%, rgba(0, 0, 0, 0.32) 78%, rgba(0, 0, 0, 0.72) 100%),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.26), transparent 16%, transparent 82%, rgba(0, 0, 0, 0.38));
}

.fx-grain {
    z-index: 8;
    opacity: 0.055;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='140' height='140' filter='url(%23n)' opacity='0.75'/></svg>");
    animation: grainShift 0.55s steps(2) infinite;
    mix-blend-mode: overlay;
}

@keyframes grainShift {
    0% { transform: translate(0, 0); }
    25% { transform: translate(-9px, 6px); }
    50% { transform: translate(7px, -8px); }
    75% { transform: translate(-5px, -4px); }
    100% { transform: translate(8px, 7px); }
}

#damage-flash {
    z-index: 9;
    opacity: 0;
    background:
        radial-gradient(ellipse at 50% 50%, transparent 42%, rgba(189, 20, 13, 0.34) 100%),
        linear-gradient(to bottom, rgba(255, 30, 10, 0.09), transparent 30%);
}

#damage-flash.hit { animation: damageHit 0.42s ease-out; }
#damage-flash.low { animation: lowHealth 1.9s ease-in-out infinite; }

@keyframes damageHit {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes lowHealth {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.38; }
}

.is-hidden { display: none !important; }

.screen {
    position: absolute;
    inset: 0;
    z-index: 20;
}

/* ------------------------------------------------------------------ */
/* Loading                                                             */
/* ------------------------------------------------------------------ */

.loading-screen {
    z-index: 60;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 50% 45%, rgba(33, 65, 61, 0.36), transparent 48%),
        #030809;
}

.load-frame {
    width: min(620px, 86vw);
    padding: 32px 34px 26px;
    border: 1px solid var(--line);
    background: linear-gradient(145deg, rgba(12, 24, 24, 0.92), rgba(4, 10, 11, 0.96));
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    position: relative;
}

.load-frame::before,
.load-frame::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid var(--accent);
}

.load-frame::before { left: -2px; top: -2px; border-right: 0; border-bottom: 0; }
.load-frame::after { right: -2px; bottom: -2px; border-left: 0; border-top: 0; }

.load-kicker,
.modal-kicker {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.22em;
    color: var(--amber);
}

.load-title {
    margin: 12px 0 24px;
    font-family: var(--display);
    font-size: clamp(26px, 4vw, 38px);
    letter-spacing: 0.02em;
    color: var(--ink);
}

.load-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.09);
    overflow: hidden;
}

.load-bar span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--accent), var(--amber));
    box-shadow: 0 0 14px rgba(255, 82, 54, 0.6);
    transition: width 0.28s ease;
}

.load-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    color: var(--ink-dim);
}

.load-tip {
    margin-top: 30px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.08em;
    line-height: 1.6;
    color: var(--ink-faint);
}

/* ------------------------------------------------------------------ */
/* Title                                                               */
/* ------------------------------------------------------------------ */

.title-screen {
    display: flex;
    overflow: hidden;
    background: transparent;
}

.title-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 7, 0.96) 0%, rgba(2, 6, 7, 0.82) 30%, rgba(2, 6, 7, 0.2) 62%, transparent 82%),
        linear-gradient(to top, rgba(2, 6, 7, 0.72), transparent 32%);
}

.title-topline {
    position: absolute;
    left: 4.5vw;
    right: 4.5vw;
    top: 26px;
    display: flex;
    gap: 26px;
    align-items: center;
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.2em;
    color: var(--ink-dim);
    z-index: 2;
}

.stamp {
    padding: 4px 7px;
    border: 1px solid rgba(232, 179, 90, 0.42);
    color: var(--amber);
}

.stamp.dim {
    border-color: var(--line);
    color: var(--ink-faint);
}

.title-panel {
    position: relative;
    z-index: 3;
    width: min(660px, 49vw);
    padding: clamp(74px, 10vh, 120px) 0 90px 4.5vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.24em;
    color: var(--amber);
    margin-bottom: 12px;
}

.eyebrow .dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    animation: blink 1.8s steps(2) infinite;
}

@keyframes blink { 50% { opacity: 0.25; } }

.logo {
    margin: 0;
    line-height: 0.78;
    font-family: var(--display);
    text-transform: uppercase;
    position: relative;
}

.logo-main {
    display: block;
    font-size: clamp(58px, 8.4vw, 122px);
    letter-spacing: -0.045em;
    color: #e9eee3;
    text-shadow:
        0 2px 0 rgba(0, 0, 0, 0.4),
        0 0 34px rgba(173, 213, 195, 0.14);
}

.logo-sub {
    display: block;
    margin-top: 0.1em;
    font-family: var(--sans);
    font-size: clamp(15px, 1.7vw, 24px);
    font-weight: 700;
    letter-spacing: 0.48em;
    color: var(--amber);
    text-shadow: 0 0 18px rgba(232, 179, 90, 0.25);
}

.logo-rule {
    width: 108px;
    height: 5px;
    margin: 22px 0 14px;
    background: linear-gradient(90deg, var(--accent) 0 68%, rgba(255, 82, 54, 0.15) 68% 100%);
    transform: skewX(-26deg);
    box-shadow: 0 0 22px rgba(255, 82, 54, 0.3);
}

.title-sub {
    margin: 0 0 10px;
    font-family: var(--sans);
    font-size: clamp(12px, 1.35vw, 16px);
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--accent-soft);
}

.title-lead {
    margin: 0 0 22px;
    max-width: 480px;
    font-size: 13px;
    line-height: 1.55;
    letter-spacing: 0.02em;
    color: var(--ink-dim);
}

.main-menu {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--line);
    max-width: 500px;
}

.menu-item {
    appearance: none;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: transparent;
    color: var(--ink);
    font-family: var(--sans);
    text-align: left;
    padding: 12px 10px 12px 0;
    display: grid;
    grid-template-columns: 34px 1fr 28px;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    position: relative;
    transition: background 0.18s ease, padding 0.18s ease, color 0.18s ease;
}

.menu-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--accent);
    transform: scaleY(0);
    transform-origin: center;
    transition: transform 0.18s ease;
}

.menu-item:hover,
.menu-item:focus-visible,
.menu-item.is-selected {
    background: linear-gradient(90deg, rgba(255, 82, 54, 0.12), transparent 76%);
    padding-left: 12px;
    outline: none;
}

.menu-item:hover::before,
.menu-item:focus-visible::before,
.menu-item.is-selected::before { transform: scaleY(1); }

.menu-item.is-primary .menu-label {
    color: #fff3e7;
}

.menu-num {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--ink-faint);
    letter-spacing: 0.1em;
}

.menu-label {
    display: flex;
    flex-direction: column;
    font-size: clamp(15px, 1.6vw, 19px);
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.15;
}

.menu-label small {
    margin-top: 4px;
    font-family: var(--mono);
    font-size: 8px;
    font-weight: 400;
    letter-spacing: 0.18em;
    color: var(--ink-faint);
}

.menu-arrow {
    font-family: var(--mono);
    color: var(--ink-faint);
    font-size: 15px;
    transition: transform 0.18s ease, color 0.18s ease;
}

.menu-item:hover .menu-arrow,
.menu-item.is-selected .menu-arrow {
    color: var(--accent);
    transform: translateX(4px);
}

.title-record {
    display: flex;
    gap: 34px;
    margin-top: 26px;
    padding-top: 15px;
    border-top: 1px solid var(--line);
    max-width: 500px;
    font-family: var(--mono);
}

.title-record > div {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.record-label {
    font-size: 8px;
    letter-spacing: 0.16em;
    color: var(--ink-faint);
}

.title-record strong {
    font-size: 18px;
    letter-spacing: 0.06em;
    color: var(--ink);
    font-weight: 400;
}

.title-bottom {
    position: absolute;
    z-index: 3;
    left: 4.5vw;
    right: 4.5vw;
    bottom: 22px;
    display: flex;
    gap: 26px;
    align-items: center;
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.12em;
    color: var(--ink-faint);
}

.title-warning {
    margin-left: auto;
    color: rgba(255, 82, 54, 0.6);
}

kbd {
    display: inline-flex;
    min-width: 20px;
    min-height: 19px;
    padding: 2px 5px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(190, 210, 200, 0.28);
    border-bottom-color: rgba(190, 210, 200, 0.5);
    background: rgba(255, 255, 255, 0.04);
    color: var(--ink);
    font-family: var(--mono);
    font-size: 9px;
    line-height: 1;
    letter-spacing: 0.04em;
}

/* ------------------------------------------------------------------ */
/* Location card                                                       */
/* ------------------------------------------------------------------ */

.location-screen {
    z-index: 30;
    display: flex;
    background: #020607;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    animation: fadeIn 0.4s ease both;
}

.location-screen::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 50%, rgba(50, 92, 82, 0.22), transparent 52%),
        repeating-linear-gradient(to bottom, transparent 0 38px, rgba(150, 190, 175, 0.035) 38px 39px);
}

.location-screen::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(207, 241, 225, 0.05) 50%, transparent);
    animation: locSweep 2.4s linear infinite;
}

@keyframes locSweep {
    from { transform: translateX(-100%); }
    to { transform: translateX(100%); }
}

.loc-bars {
    position: absolute;
    inset: 28px 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
}

.loc-bars span {
    display: block;
    width: 22vw;
    height: 3px;
    background: var(--accent);
    box-shadow: 0 0 24px rgba(255, 82, 54, 0.5);
}

.loc-bars span:last-child {
    margin-left: auto;
    background: rgba(255, 82, 54, 0.55);
}

.loc-card {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 20px 40px;
    width: min(780px, 88vw);
}

.loc-kicker {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.28em;
    color: var(--amber);
    margin-bottom: 20px;
}

.loc-planet {
    font-family: var(--display);
    font-size: clamp(48px, 8.4vw, 102px);
    line-height: 0.92;
    letter-spacing: -0.03em;
    color: #e8eee2;
    text-shadow: 0 0 46px rgba(150, 219, 195, 0.16);
}

.loc-sector {
    margin-top: 26px;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.28em;
    color: var(--ink-dim);
}

.loc-line {
    width: 160px;
    height: 1px;
    background: var(--accent);
    margin: 26px auto;
    position: relative;
}

.loc-line::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 7px;
    height: 7px;
    border: 1px solid var(--accent);
    transform: translate(-50%, -50%) rotate(45deg);
}

.loc-objective {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.16em;
    color: var(--ink);
    line-height: 1.7;
}

.loc-objective b { color: var(--accent-soft); }

.loc-scan {
    margin-top: 32px;
    font-family: var(--mono);
    font-size: 8px;
    letter-spacing: 0.18em;
    color: var(--ink-faint);
}

.loc-scan span { color: var(--teal); }

/* ------------------------------------------------------------------ */
/* Modals                                                              */
/* ------------------------------------------------------------------ */

.modal {
    position: absolute;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(1, 5, 6, 0.68);
    backdrop-filter: blur(7px) saturate(0.7);
    animation: fadeIn 0.22s ease both;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-panel {
    width: min(720px, 94vw);
    max-height: 92vh;
    overflow: auto;
    position: relative;
    padding: clamp(28px, 5vw, 52px);
    background:
        linear-gradient(150deg, rgba(17, 31, 30, 0.97), rgba(4, 10, 11, 0.985));
    border: 1px solid rgba(166, 195, 181, 0.2);
    box-shadow: 0 40px 110px rgba(0, 0, 0, 0.65);
    clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}

.modal-panel::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 88px;
    background: var(--accent);
}

.modal-kicker {
    margin-bottom: 12px;
}

.modal-kicker.danger { color: var(--accent); }
.modal-kicker.success { color: var(--teal); }

.modal-panel h2 {
    margin: 0 0 20px;
    font-family: var(--display);
    font-size: clamp(28px, 4.2vw, 46px);
    letter-spacing: 0.01em;
    line-height: 1;
    color: #edf1e7;
}

.modal-lead {
    color: var(--ink-dim);
    font-size: 13px;
    line-height: 1.6;
    max-width: 540px;
    margin: -4px 0 24px;
}

.modal-close {
    position: absolute;
    right: 16px;
    top: 14px;
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--ink-dim);
    font-size: 23px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

.modal-close:hover { color: var(--accent); border-color: var(--accent); }

.controls-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 28px;
    margin: 4px 0 24px;
    border-top: 1px solid var(--line);
}

.control-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
    font-size: 11px;
    letter-spacing: 0.05em;
    color: var(--ink-dim);
}

.keys {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    font-family: var(--mono);
    color: var(--ink-faint);
    font-size: 9px;
}

.controls-note {
    font-size: 10px;
    line-height: 1.6;
    letter-spacing: 0.04em;
    color: var(--ink-faint);
    border-left: 2px solid var(--steel);
    padding-left: 12px;
    margin: 0 0 26px;
}

/* Настройки звука */
.sound-panel { width: min(480px, 94vw); }

.sound-settings {
    margin: 0 0 28px;
    border-top: 1px solid var(--line);
}

.sound-toggle {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
    cursor: pointer;
}

.sound-toggle input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.toggle-box {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    border: 1px solid var(--ink-faint);
    background: rgba(255, 255, 255, 0.03);
    position: relative;
}

.sound-toggle input:checked + .toggle-box {
    border-color: var(--accent);
    background: rgba(255, 82, 54, 0.18);
}

.sound-toggle input:checked + .toggle-box::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 2px;
    width: 7px;
    height: 12px;
    border: solid var(--accent-soft);
    border-width: 0 2px 2px 0;
    transform: rotate(42deg);
}

.sound-toggle input:focus-visible + .toggle-box,
.sound-volume input:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }

.toggle-text {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.toggle-text small {
    font-family: var(--mono);
    font-size: 8px;
    font-weight: 400;
    letter-spacing: 0.14em;
    color: var(--ink-faint);
}

.sound-volume {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}

.volume-label {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.volume-label output {
    font-family: var(--mono);
    font-weight: 400;
    color: var(--accent-soft);
}

.sound-volume input[type="range"] {
    appearance: none;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--steel));
    cursor: pointer;
}

.sound-volume input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 14px;
    height: 20px;
    border: 0;
    background: var(--ink);
    clip-path: polygon(0 0, 100% 0, 100% 70%, 50% 100%, 0 70%);
}

.sound-volume input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 20px;
    border: 0;
    border-radius: 0;
    background: var(--ink);
}

.pause-stats,
.complete-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    margin: 26px 0 30px;
    background: var(--line);
    border: 1px solid var(--line);
}

.complete-stats { grid-template-columns: repeat(6, 1fr); }

.pause-stats > div,
.complete-stats > div {
    background: rgba(6, 14, 15, 0.96);
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pause-stats span,
.complete-stats span {
    font-family: var(--mono);
    font-size: 8px;
    letter-spacing: 0.16em;
    color: var(--ink-faint);
}

.pause-stats strong,
.complete-stats strong {
    font-family: var(--mono);
    font-size: 22px;
    font-weight: 400;
    color: var(--ink);
}

.complete-stats strong { font-size: 19px; color: var(--amber); }

.complete-next {
    margin: 24px 0 28px;
    padding: 12px 14px;
    border: 1px solid rgba(232, 179, 90, 0.25);
    background: rgba(232, 179, 90, 0.045);
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.16em;
    color: var(--amber);
}

.complete-next span { color: var(--ink-faint); }

.modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn {
    appearance: none;
    border: 1px solid rgba(190, 215, 202, 0.25);
    background: rgba(255, 255, 255, 0.035);
    color: var(--ink);
    padding: 12px 20px;
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    cursor: pointer;
    transition: all 0.15s ease;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.btn:hover {
    border-color: var(--accent);
    background: rgba(255, 82, 54, 0.12);
    color: #fff;
}

.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #150a07;
}

.btn-primary:hover {
    background: #ff7a58;
    border-color: #ff7a58;
    color: #120705;
}

.btn-ghost {
    background: transparent;
    color: var(--ink-dim);
    border-color: var(--line);
}

/* ------------------------------------------------------------------ */
/* Hint / toast                                                        */
/* ------------------------------------------------------------------ */

.hint,
.toast {
    position: absolute;
    z-index: 25;
    left: 50%;
    bottom: 72px;
    transform: translateX(-50%);
    padding: 9px 16px;
    background: rgba(3, 9, 10, 0.82);
    border: 1px solid var(--line);
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.12em;
    color: var(--ink-dim);
    backdrop-filter: blur(4px);
    white-space: nowrap;
    pointer-events: none;
}

.hint {
    transition: opacity 0.35s ease;
}

.toast {
    top: 110px;
    bottom: auto;
    border-color: rgba(232, 179, 90, 0.35);
    color: var(--amber);
    background: rgba(20, 14, 6, 0.86);
    animation: toastIn 0.25s ease both;
}

.toast.danger {
    color: #ffb09a;
    border-color: rgba(255, 82, 54, 0.4);
}

.toast.success {
    color: var(--teal);
    border-color: rgba(127, 192, 178, 0.35);
}

@keyframes toastIn {
    from { opacity: 0; transform: translate(-50%, -7px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

.noscript {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    background: #030809;
    color: var(--ink);
    font-family: var(--mono);
}

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */

@media (max-width: 980px) {
    .title-panel { width: 68vw; padding-left: 6vw; }
    .title-shade { background: linear-gradient(90deg, rgba(2, 6, 7, 0.97) 0%, rgba(2, 6, 7, 0.85) 55%, rgba(2, 6, 7, 0.25) 100%); }
    .title-record { gap: 22px; }
    .complete-stats { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 720px) {
    .title-topline { left: 6vw; right: 6vw; gap: 10px; font-size: 7px; }
    .stamp:nth-child(2) { display: none; }
    .title-panel { width: 100vw; padding: 92px 6vw 100px; }
    .title-shade { background: linear-gradient(180deg, rgba(2, 6, 7, 0.76), rgba(2, 6, 7, 0.9)); }
    .title-lead { max-width: 310px; font-size: 11px; }
    .title-bottom { left: 6vw; right: 6vw; bottom: 14px; gap: 12px; font-size: 7px; }
    .title-warning { display: none; }
    .logo-main { font-size: 16vw; }
    .logo-sub { font-size: 3.6vw; letter-spacing: 0.32em; }
    .title-record { gap: 18px; }
    .title-record strong { font-size: 14px; }
    .controls-grid { grid-template-columns: 1fr; }
    .pause-stats, .complete-stats { grid-template-columns: repeat(2, 1fr); }
    .modal-panel { padding: 28px 22px; }
    .hint { font-size: 8px; white-space: normal; text-align: center; width: 86vw; }
}
