/* ================================================================
   ГЕО-СПРИНТ — квиз «страна ↔ столица»
   Оформление в стиле inf-helpers/pz1: светлая тема, стеклянные
   карточки, градиент фиолет → циан → маджента, мягкие тени.
   Разметка не меняется — только CSS.
   ================================================================ */

:root {
    /* палитра pz1 */
    --bg: #f5f7ff;
    --ink: #161a2e;
    --ink-soft: #4a5273;
    --ink-dim: #7b84a6;
    --card: rgba(255, 255, 255, .78);
    --line: rgba(124, 92, 255, .18);
    --line-soft: rgba(124, 92, 255, .10);

    --cyan: #00c8e0;
    --violet: #7c5cff;
    --magenta: #ff5cd0;
    --mint: #16c79a;
    --amber: #ffab2e;
    --coral: #ff5c78;

    /* смысловые роли (имена сохранены от прежней темы) */
    --text: var(--ink);
    --text-dim: var(--ink-soft);
    --text-soft: var(--ink-dim);
    --ok: var(--mint);
    --red: var(--coral);
    --lime: #0b8f6d;

    --panel: rgba(255, 255, 255, .78);
    --panel-2: rgba(255, 255, 255, .62);
    --glass: rgba(255, 255, 255, .55);
    --line-hot: rgba(124, 92, 255, .34);

    --radius: 22px;
    --radius-sm: 14px;
    --shadow: 0 18px 50px -22px rgba(90, 80, 180, .45);
    --shadow-lift: 0 26px 60px -26px rgba(90, 80, 180, .6);
    --grad: linear-gradient(100deg, var(--violet) 0%, var(--cyan) 52%, var(--magenta) 100%);
    --grad-soft: linear-gradient(135deg, rgba(0, 200, 224, .14), rgba(124, 92, 255, .14));

    --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --mono: "JetBrains Mono", "Cascadia Code", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    padding: 0;
    color: var(--ink);
    background: var(--bg);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.62;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* два мягких цветных пятна, как в pz1 */
body::before,
body::after {
    content: "";
    position: fixed;
    z-index: 0;
    pointer-events: none;
    border-radius: 50%;
    filter: blur(90px);
}

body::before {
    width: 52vw;
    height: 52vw;
    left: -14vw;
    top: -16vw;
    background: radial-gradient(circle, rgba(0, 200, 224, .28), transparent 68%);
    animation: drift 22s ease-in-out infinite alternate;
}

body::after {
    width: 48vw;
    height: 48vw;
    right: -16vw;
    top: 24vh;
    background: radial-gradient(circle, rgba(255, 92, 208, .22), transparent 68%);
    animation: drift 26s ease-in-out infinite alternate-reverse;
}

@keyframes drift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(2vw, 3vh, 0) scale(1.08); }
}

.wrap {
    position: relative;
    z-index: 1;
    width: min(1120px, calc(100% - 44px));
    margin: 0 auto;
    padding: 30px 0 56px;
}

/* ---------------- шапка ---------------- */

.topbar {
    position: sticky;
    top: 12px;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 26px;
    padding: 12px 16px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .72);
    border: 1px solid var(--line);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 14px 40px -26px rgba(90, 80, 180, .75);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.brand .logo {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(140deg, var(--violet), var(--cyan));
    box-shadow: 0 12px 28px -12px rgba(124, 92, 255, .95), inset 0 1px 0 rgba(255, 255, 255, .5);
    animation: pulse 3.2s ease-in-out infinite;
}

.brand .logo svg { width: 24px; height: 24px; color: #fff; }

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.brand b {
    display: block;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    line-height: 1.15;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 16px rgba(124, 92, 255, .22));
}

.brand span {
    display: block;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink-dim);
}

.hud {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.hud-item {
    min-width: 88px;
    padding: 8px 15px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .82);
    border: 1px solid var(--line);
    box-shadow: 0 10px 24px -18px rgba(90, 80, 180, .8);
    text-align: center;
    transition: transform .24s cubic-bezier(.2, .8, .2, 1), box-shadow .24s;
}

.hud-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px -20px rgba(90, 80, 180, .9);
}

.hud-item small {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ink-dim);
}

.hud-item b {
    display: block;
    font-family: var(--mono);
    font-size: 20px;
    font-weight: 700;
    color: #0a97ad;
    font-variant-numeric: tabular-nums;
}

.hud-item.hot b { color: #c0335a; }
.hud-item.good b { color: #0b8f6d; }

/* ---------------- вступление ---------------- */

.intro {
    position: relative;
    padding: 28px 30px;
    margin-bottom: 26px;
    border-radius: var(--radius);
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, .9);
    outline: 1px solid var(--line);
    outline-offset: -1px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.intro::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    height: 3px;
    background: var(--grad);
    opacity: .9;
}

.intro h1 {
    margin: 0 0 10px;
    font-size: clamp(27px, 4.2vw, 42px);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -.02em;
}

.intro h1 em {
    font-style: normal;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 22px rgba(124, 92, 255, .28));
}

.intro p {
    margin: 0;
    max-width: 74ch;
    color: var(--ink-soft);
    font-size: 16.5px;
}

.rules {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 18px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .01em;
    color: var(--ink-soft);
    background: rgba(255, 255, 255, .82);
    border: 1px solid var(--line);
    box-shadow: 0 10px 24px -18px rgba(90, 80, 180, .8);
}

.chip b {
    color: #0a97ad;
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 700;
}

/* ---------------- игровое поле ---------------- */

.board {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

.col {
    display: grid;
    gap: 12px;
}

.col-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 6px 8px;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ink-dim);
    border-bottom: 1px solid var(--line);
}

.col-head b { color: #0a97ad; }
.col-head.b b { color: #c93ba6; }

/* плашка */
.plate {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 12px 16px 12px 12px;
    text-align: left;
    color: inherit;
    font: inherit;
    cursor: pointer;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, .9);
    outline: 1px solid var(--line);
    outline-offset: -1px;
    background: var(--card);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform .3s cubic-bezier(.2, .8, .2, 1),
                box-shadow .3s,
                outline-color .2s,
                background .2s;
}

/* тонкая цветная полоса сверху — приём pz1 */
.plate::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 3px;
    width: 100%;
    background: var(--grad);
    opacity: 0;
    transition: opacity .22s ease;
    pointer-events: none;
}

.plate:hover::before { opacity: .9; }

.plate:hover,
.plate:focus-visible {
    transform: translateY(-3px);
    outline-color: rgba(124, 92, 255, .45);
    box-shadow: var(--shadow-lift);
}

.plate:focus-visible {
    outline: 2px solid var(--violet);
    outline-offset: 2px;
}

.plate .pic {
    position: relative;
    flex: 0 0 108px;
    height: 68px;
    border-radius: 12px;
    background: linear-gradient(150deg, rgba(124, 92, 255, .10), rgba(0, 200, 224, .10));
    border: 1px solid rgba(124, 92, 255, .18);
    display: grid;
    place-items: center;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
}

.plate .pic svg { width: 100%; height: 100%; display: block; }

/* фото достопримечательности */
.plate .pic .ph {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center 45%;
    filter: saturate(1.05) contrast(1.02);
    transition: transform .4s cubic-bezier(.2, .8, .2, 1), filter .3s ease;
}

.plate:hover .pic .ph { transform: scale(1.07); filter: saturate(1.14) contrast(1.05); }

.plate.locked .pic .ph { filter: saturate(1) contrast(1) brightness(.98); }

/* флаг страны — вписываем целиком, без обрезки */
.plate .pic.pic-flag {
    padding: 8px;
    background: linear-gradient(160deg, rgba(255, 255, 255, .92), rgba(245, 247, 255, .78));
}

.plate .pic .ph.flag {
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(90, 80, 180, .28);
}

.plate:hover .pic .ph.flag { transform: none; }

.plate .txt { min-width: 0; }

.plate .txt b {
    display: block;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.22;
    color: var(--ink);
}

.plate .txt small {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.plate .tag {
    margin-left: auto;
    flex: 0 0 auto;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    color: var(--ink-dim);
    opacity: .85;
}

/* состояния */
.plate.sel {
    outline: 2px solid var(--violet);
    outline-offset: -1px;
    background: linear-gradient(150deg, rgba(124, 92, 255, .10), rgba(0, 200, 224, .10)), var(--card);
    box-shadow: 0 20px 46px -22px rgba(124, 92, 255, .95);
    transform: translateY(-3px);
}

.plate.sel::before { opacity: 1; }

.plate.sel .tag { color: var(--violet); opacity: 1; }

.plate.locked {
    cursor: default;
    outline: 1.5px solid rgba(22, 199, 154, .5);
    background: linear-gradient(150deg, rgba(22, 199, 154, .12), rgba(22, 199, 154, .03)), var(--card);
    box-shadow: 0 18px 40px -24px rgba(22, 199, 154, .8);
    transform: none;
}

.plate.locked::before {
    background: linear-gradient(90deg, var(--mint), var(--cyan));
    opacity: .9;
}

.plate.locked .tag {
    color: #0b8f6d;
    opacity: 1;
}

.plate.locked::after {
    content: "✓";
    position: absolute;
    right: 8px;
    top: 8px;
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    font-size: 13px;
    font-weight: 800;
    border-radius: 50%;
    color: #fff;
    background: var(--mint);
    box-shadow: 0 0 0 3px rgba(22, 199, 154, .18), 0 6px 16px -6px rgba(22, 199, 154, .9);
}

.plate.wrong {
    animation: shake .38s ease;
    outline-color: var(--coral);
    box-shadow: 0 0 0 3px rgba(255, 92, 120, .14), 0 18px 40px -24px rgba(255, 92, 120, .8);
}

.plate.hint {
    animation: hintpulse 1.1s ease 2;
}

/* неверная пара: плашка гаснет и больше не выбирается */
.plate.dead {
    cursor: not-allowed;
    opacity: .42;
    filter: grayscale(1);
    outline-color: rgba(124, 92, 255, .08);
    background: rgba(240, 241, 248, .72);
    box-shadow: 0 8px 22px -20px rgba(90, 80, 180, .5);
    transform: none;
    pointer-events: none;
    /* анимация появления .reveal иначе перебивает opacity */
    animation: none;
    transition: opacity .3s ease, filter .3s ease;
}

.plate.dead::before {
    background: linear-gradient(90deg, #c3c7d6, #d8dbe6);
    opacity: .5;
}

.plate.dead .pic .ph {
    filter: grayscale(1) contrast(.9);
}

.plate.dead .txt b,
.plate.dead .txt small,
.plate.dead .tag {
    color: var(--ink-dim);
    opacity: .75;
}

.plate.dead::after {
    content: "×";
    position: absolute;
    right: 8px;
    top: 8px;
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    font-size: 15px;
    font-weight: 800;
    border-radius: 50%;
    color: #fff;
    background: #b9bece;
    box-shadow: 0 0 0 3px rgba(185, 190, 206, .18);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    22% { transform: translateX(-6px); }
    46% { transform: translateX(5px); }
    70% { transform: translateX(-3px); }
}

@keyframes hintpulse {
    0%, 100% { box-shadow: 0 0 0 1px rgba(124, 92, 255, .25), var(--shadow); }
    50% { box-shadow: 0 0 0 3px rgba(124, 92, 255, .55), 0 22px 50px -24px rgba(124, 92, 255, .95); }
}

/* ---------------- перекрёстная линия совпадения ---------------- */
.pairline {
    display: none;
}

/* ---------------- нижняя панель ---------------- */

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 20px;
    font-family: var(--font);
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ink-soft);
    cursor: pointer;
    border-radius: 13px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 12px 28px -22px rgba(90, 80, 180, .9);
    transition: transform .22s cubic-bezier(.2, .8, .2, 1), box-shadow .22s, color .2s, background .2s;
}

.btn:hover,
.btn:focus-visible {
    transform: translateY(-2px);
    color: var(--ink);
    background: rgba(124, 92, 255, .09);
    box-shadow: 0 18px 36px -22px rgba(124, 92, 255, .9);
}

.btn.primary {
    color: #fff;
    background: linear-gradient(135deg, var(--violet), var(--cyan));
    border-color: transparent;
    box-shadow: 0 16px 36px -18px rgba(124, 92, 255, .95), inset 0 1px 0 rgba(255, 255, 255, .4);
}

.btn.primary:hover {
    background: linear-gradient(135deg, var(--cyan), var(--violet));
    box-shadow: 0 20px 44px -18px rgba(0, 200, 224, .95);
}

.btn[disabled] {
    opacity: .45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn.mini {
    padding: 8px 14px;
    font-size: 12px;
}

/* ---------------- сообщения ---------------- */

.flash {
    margin-top: 16px;
    min-height: 26px;
    font-size: 15.5px;
    letter-spacing: .01em;
    color: var(--ink-soft);
}

.flash.ok { color: #0b8f6d; }
.flash.err { color: #c0335a; }
.flash.hint { color: var(--violet); }

/* ---------------- итоги ---------------- */

.result {
    position: relative;
    margin-top: 26px;
    padding: 26px 28px;
    border-radius: var(--radius);
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, .9);
    outline: 1px solid var(--line);
    outline-offset: -1px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: none;
}

.result::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    height: 3px;
    background: var(--grad);
}

.result.show { display: block; animation: rise .45s cubic-bezier(.2, .8, .2, 1) both; }

@keyframes rise {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

.result h2 {
    margin: 0 0 6px;
    font-size: clamp(22px, 2.8vw, 30px);
    font-weight: 800;
    letter-spacing: -.01em;
}

.result h2 em {
    font-style: normal;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.result .score {
    font-family: var(--mono);
    font-size: 14.5px;
    color: var(--ink-soft);
    margin-bottom: 16px;
}

.result .score b { color: #0a97ad; font-size: 19px; }

.result table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14.5px;
}

.result th,
.result td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--line-soft);
}

.result th {
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--violet);
    background: rgba(124, 92, 255, .06);
}

.result td { color: var(--ink-soft); }

.result td.c {
    font-family: var(--mono);
    font-weight: 700;
    color: #0a97ad;
    white-space: nowrap;
}

.result td.f { color: var(--ink-dim); font-size: 13.5px; }

.result tr.miss td { color: #c0335a; }

.result tr:hover td { background: rgba(0, 200, 224, .05); }

/* ---------------- подвал ---------------- */

/* титры фотографий */
.credits {
    margin-top: 28px;
    padding: 16px 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 14px 34px -26px rgba(90, 80, 180, .8);
    font-size: 13px;
    color: var(--ink-soft);
}

.credits summary {
    cursor: pointer;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--violet);
    list-style: none;
}

.credits summary::-webkit-details-marker { display: none; }

.credits summary::before {
    content: "+ ";
    font-family: var(--mono);
    font-weight: 700;
}

.credits[open] summary::before { content: "− "; }

.credits-note {
    margin: 10px 0 8px;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--ink-dim);
}

.credits ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 7px;
    max-height: 260px;
    overflow-y: auto;
}

.credits li {
    font-size: 12.5px;
    line-height: 1.45;
    padding-left: 14px;
    position: relative;
}

.credits li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: .62em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), var(--violet));
    box-shadow: 0 0 8px rgba(0, 200, 224, .8);
}

.credits a {
    color: var(--ink);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px dotted rgba(124, 92, 255, .45);
}

.credits a:hover {
    color: var(--violet);
    border-bottom-color: var(--violet);
}

.credits .lic {
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 7px;
    font-family: var(--mono);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .02em;
    color: #0b8f6d;
    background: rgba(22, 199, 154, .13);
    border: 1px solid rgba(22, 199, 154, .34);
    white-space: nowrap;
}

.foot {
    margin-top: 36px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ink-dim);
}

.foot code {
    font-family: var(--mono);
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    color: var(--violet);
}

/* ---------------- появление ---------------- */

.reveal {
    opacity: 0;
    transform: translateY(22px);
    animation: rise .7s cubic-bezier(.2, .8, .2, 1) forwards;
}

/* ---------------- адаптив ---------------- */

@media (max-width: 900px) {
    body { font-size: 16px; }

    .board { grid-template-columns: 1fr; gap: 16px; }

    .col-head { padding-top: 8px; }

    .plate .pic { flex-basis: 92px; height: 58px; }

    .plate .txt b { font-size: 17px; }
}

@media (max-width: 560px) {
    .wrap { width: calc(100% - 20px); padding-top: 12px; padding-bottom: 36px; }

    .topbar {
        position: static;
        gap: 10px;
        padding: 12px;
        margin-bottom: 16px;
    }

    .brand b { font-size: 16px; }

    .hud { width: 100%; }

    .hud-item { flex: 1 1 0; min-width: 0; padding: 7px 6px; border-radius: 11px; }

    .hud-item b { font-size: 16px; }

    .intro { padding: 18px 16px; margin-bottom: 18px; }

    .intro h1 { font-size: 23px; line-height: 1.2; }

    .plate { padding: 9px 12px 9px 9px; gap: 10px; }

    .plate .pic { flex-basis: 76px; height: 50px; }

    .plate .txt b { font-size: 16px; }

    .plate .txt small { font-size: 10px; letter-spacing: .05em; }

    .plate .tag { display: none; }

    .btn { padding: 12px 16px; font-size: 13px; }

    .btn.big { width: 100%; justify-content: center; }

    .btn.mini { padding: 7px 11px; font-size: 11px; }

    .start-form { padding: 16px; gap: 12px; }

    .start-form .btn { width: 100%; justify-content: center; }

    .actions { margin-top: 18px; }

    .actions .btn { flex: 1 1 auto; justify-content: center; }

    .flash { font-size: 14px; min-height: 22px; }

    .result { padding: 20px; }

    .final-grid { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }

    .final-card { padding: 13px 14px; }

    .final-card b { font-size: 17px; }

    .round-over { padding: 12px; }

    .round-over-card { padding: 20px 16px; }

    .ro-list { font-size: 13px; }
}

/* ---------------- экраны, старт, итоги ---------------- */

.screen { animation: rise .4s cubic-bezier(.2, .8, .2, 1) both; }

.screen[hidden] { display: none !important; }

.screen-title {
    margin: 26px 0 8px;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--ink);
}

.screen-title em {
    font-style: normal;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.screen-note,
.screen-hint {
    margin: 0 0 18px;
    font-size: 15px;
    color: var(--ink-soft);
}

.screen-hint {
    margin-top: 16px;
    font-size: 13.5px;
    color: var(--ink-dim);
}

.start-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 14px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: var(--shadow);
}

.field {
    display: flex;
    flex: 1 1 280px;
    flex-direction: column;
    gap: 7px;
}

.field > span {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--violet);
}

.field input {
    width: 100%;
    padding: 13px 16px;
    font-family: var(--font);
    font-size: 16px;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgba(255, 255, 255, .92);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.field input::placeholder { color: #a7aec8; }

.field input:focus {
    border-color: rgba(124, 92, 255, .55);
    box-shadow: 0 0 0 4px rgba(124, 92, 255, .12);
}

.btn.big {
    padding: 15px 28px;
    font-size: 14px;
}

.shake { animation: shake .42s cubic-bezier(.36, .07, .19, .97) both; }

@keyframes shake {
    10%, 90% { transform: translateX(-1px); }
    20%, 80% { transform: translateX(2px); }
    30%, 50%, 70% { transform: translateX(-4px); }
    40%, 60% { transform: translateX(4px); }
}

.round-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 12px;
    margin: 22px 0 4px;
}

.round-label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ink-dim);
}

.round-label b { color: var(--violet); font-size: 15px; }

.round-sub {
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    color: #0a97ad;
    border-radius: 999px;
    background: rgba(0, 200, 224, .12);
}

/* финальный экран */
.final-verdict {
    margin: 0 0 20px;
    font-size: 16px;
    color: var(--ink-soft);
}

.final-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
    margin-bottom: 26px;
}

.final-card {
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--card);
    box-shadow: 0 14px 34px -26px rgba(90, 80, 180, .8);
}

.final-card small {
    display: block;
    margin-bottom: 6px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ink-dim);
}

.final-card b {
    font-size: 20px;
    font-weight: 800;
    color: var(--ink);
    word-break: break-word;
}

.final-card.hot b { color: #0a97ad; }

.final-sub {
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--violet);
}

.table-scroll {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .72);
}

.final-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.final-table th,
.final-table td {
    padding: 11px 14px;
    text-align: left;
    border-bottom: 1px solid var(--line-soft);
}

.final-table th {
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--violet);
    background: rgba(124, 92, 255, .06);
    white-space: nowrap;
}

.final-table td { color: var(--ink-soft); }

.final-table tr.miss td { color: #c0335a; }

.final-table tr.total td {
    font-weight: 800;
    color: var(--ink);
    background: rgba(0, 200, 224, .07);
    border-bottom: none;
}

.final-actions { flex-wrap: wrap; }

.send-form { margin-top: 14px; }

/* оверлей конца раунда */
.round-over {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(22, 26, 46, .38);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: fadeIn .25s ease both;
}

.round-over[hidden] { display: none !important; }

.round-over-card {
    width: min(560px, 100%);
    padding: 28px 26px;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 40px 90px -40px rgba(60, 50, 140, .8);
    animation: rise .38s cubic-bezier(.2, .8, .2, 1) both;
}

.ro-kicker {
    margin: 0 0 8px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink-dim);
}

.ro-title {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -.01em;
    color: var(--ink);
}

.ro-sub {
    margin: 0 0 16px;
    font-size: 14.5px;
    color: var(--ink-soft);
}

.ro-list {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
    text-align: left;
    font-size: 14px;
    color: var(--ink-soft);
}

.ro-list li {
    padding: 7px 12px;
    border-radius: 10px;
    background: rgba(0, 200, 224, .07);
}

.ro-list li.miss {
    color: #c0335a;
    background: rgba(255, 92, 120, .1);
}

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

@media (max-width: 560px) {
    .screen-title { font-size: 22px; margin-top: 18px; }
    .ro-title { font-size: 20px; }
    .start-form { padding: 16px; }
    .final-table th,
    .final-table td { padding: 9px 10px; font-size: 13px; }
}

/* тач-цели: на телефоне убрать ховер-подпрыгивание, чтобы не залипало */
@media (hover: none) {
    .plate:hover { transform: none; box-shadow: var(--shadow); }
    .plate:hover .pic .ph { transform: none; }
    .btn:hover { transform: none; }
}

/* ---------------- печать ---------------- */

@media print {
    body { background: #fff; color: #111; }
    body::before, body::after { display: none; }
    .topbar, .intro, .plate, .result, .credits {
        background: #fff !important;
        box-shadow: none !important;
        border: 1px solid #bbb !important;
        color: #111 !important;
        backdrop-filter: none !important;
    }
    .plate .txt small, .col-head, .foot { color: #555 !important; }
    .actions, .hud { display: none; }
    .reveal { opacity: 1 !important; transform: none !important; animation: none !important; }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
    .reveal { opacity: 1; transform: none; }
}
