:root {
    --rk-bg: #0b0b0c;
    --rk-orange: #fcaf17;
    --rk-orange-press: #e89e14;
    --accent: #fcaf17;
    --accent-hover: #e89e14;
    --accent-soft: rgba(252, 175, 23, 0.16);
    --accent-glow: rgba(252, 175, 23, 0.35);
    --card: #ffffff;
    --ink: #2f2f31;
    --ink-soft: #6b6b70;
    --line: #cfcfd4;
    --line-focus: #8a8a90;
    --ok: #37b24d;
    --ok-soft: rgba(55, 178, 77, 0.12);
    --danger: #e03131;
    --error: #e03131;
    --error-soft: rgba(224, 49, 49, 0.1);
    --text: #2f2f31;
    --text-secondary: #6b6b70;
    --muted: #6b6b70;
    --input-bg: #fff;
    --radius: 14px;
    --radius-sm: 6px;
    --radius-pill: 999px;
    --transition: 0.15s ease;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: ui-monospace, "SF Mono", Consolas, monospace;
    --shadow: 0 22px 60px rgba(0, 0, 0, 0.6);
    --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.18);
    --prestart-auto-col: 4.4rem;
    --prestart-auto-gap: 12px;
}

* { box-sizing: border-box; }

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html, body { margin: 0; padding: 0; }

body {
    min-height: 100vh;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.5;
    color: var(--ink);
    background-color: var(--rk-bg);
    background-image: url("bg-repeat.png");
    background-repeat: repeat;
    background-position: 0 0;
}

.hidden { display: none !important; }

.stage {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px 72px;
}

.wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 524px;
    margin-top: -24px;
}

.brand {
    display: flex;
    justify-content: center;
    margin: 0 0 28px;
}

.logo-img {
    width: 112px;
    height: 112px;
    display: block;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}

/* ——— Cards ——— */

.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 34px 40px 30px;
    margin-top: 14px;
    box-shadow: var(--shadow);
    animation: fadein 0.18s ease;
}

.card:first-child { margin-top: 0; }

.card h2,
.card > h2 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.25;
}

.card-title {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.25;
    text-align: left;
    color: var(--ink);
}

.lede {
    margin: 0 0 24px;
    font-size: 14px;
    color: var(--ink-soft);
    line-height: 1.5;
}

.muted {
    color: var(--ink-soft);
    font-size: 14px;
    line-height: 1.5;
}

.card-review {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 18px 24px;
}

.card-review-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
    flex: 1 1 auto;
}

.card-review .stars {
    font-size: 18px;
    letter-spacing: 2px;
    color: var(--rk-orange);
    line-height: 1;
}

.result-review-message {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    color: var(--ink-soft);
}

.result-review-message strong {
    display: block;
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.3;
}

.card-review .btn {
    flex: 0 0 auto;
    width: auto;
    white-space: nowrap;
    text-decoration: none;
}

.card-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.card-heading h2 { margin: 0; }

.card-heading-result {
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.card-heading-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

#panel-result .card-heading-result { margin-bottom: 0; }

.panel-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
    border-radius: 50%;
}

.panel-icon-ok { background: var(--ok); color: #fff; }
.panel-icon-warn,
.panel-icon-bad { background: #ffe9e9; color: var(--danger); }

.client-notice {
    margin-bottom: 16px;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #ffe4b3;
    background: #fff5e6;
    color: #9a6b00;
    font-size: 13.5px;
    line-height: 1.45;
    white-space: pre-line;
}

.error { color: var(--danger); }

.error-body {
    margin: 0;
    color: var(--ink);
    font-size: 14.5px;
    line-height: 1.6;
}

.error-hint {
    margin-top: 10px;
    font-size: 13.5px;
    color: var(--ink-soft);
}

.error-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.error-actions .btn {
    text-decoration: none;
}

.result-expiry-row {
    align-items: center;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 12px;
    margin: 16px 0 0;
}

.result-expiry-row:not(:has(> :not(.hidden))) {
    display: none;
    margin: 0;
}

.result-expiry-row .btn-copy-all {
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 13px;
    padding: 8px 14px;
    white-space: nowrap;
    width: auto;
}

.result-expiry-notice {
    color: var(--ink-soft);
    display: block;
    flex: 1 1 auto;
    font-size: 13.5px;
    margin: 0;
    min-width: 0;
}

.result-expiry-notice .result-expiry-timer {
    font-variant-numeric: tabular-nums;
    color: var(--ink);
    font-weight: 700;
}

.status-message {
    font-size: 14px;
    min-height: 1.4em;
    font-weight: 500;
    color: var(--ink-soft);
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #ededf1;
}

.status-message-error { color: var(--danger); }

.info-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.info-heading h2 {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-soft);
}

.info-heading .btn-copy-all,
.result-expiry-row .btn-copy-all {
    padding: 8px 14px;
    font-size: 13px;
}

.info-heading.info-heading--copy-only {
    justify-content: flex-end;
}

.info-heading.info-heading--copy-only h2 { display: none; }

.info-fields.hidden,
.info-fields:empty {
    display: none;
    margin: 0;
    border: none;
}

.info-heading.hidden + .info-fields + .info-section,
.info-fields.hidden + .info-section {
    margin-top: 0;
}

#form-prestart.prestart-completed .prestart-field-body input,
#form-prestart.prestart-completed .prestart-nickname-input-wrap input,
#form-prestart.prestart-completed .prestart-password-input-wrap input {
    cursor: pointer;
}

.prestart-field-body.prestart-field-copied::after {
    content: "Скопировано";
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    padding: 3px 8px;
    border-radius: 5px;
    background: var(--ok-soft);
    color: var(--ok);
    font-size: 12px;
    font-weight: 600;
    pointer-events: none;
}

.billing-pause-notice {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 6px;
    border: 1px solid #f5c6cb;
    background: #ffe9e9;
}

.billing-pause-title {
    display: block;
    color: var(--danger);
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
}

.billing-pause-message {
    margin: 0;
    color: #8a2b2b;
    font-size: 14px;
}

.input-notice {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 6px;
    border: 1px solid #f5c6cb;
    background: #ffe9e9;
    text-align: left;
}

.input-notice-title {
    display: block;
    margin: 0 0 4px;
    color: var(--danger);
    font-size: 14px;
    font-weight: 700;
}

.input-notice-text {
    margin: 0;
    color: #8a2b2b;
    font-size: 13.5px;
}

.queue-info {
    margin-top: 14px;
    padding: 12px 14px;
    background: #fff5e6;
    border-radius: 6px;
    color: #9a6b00;
    border: 1px solid #ffe4b3;
    font-size: 14px;
    font-weight: 500;
}

.progress {
    margin-top: 18px;
    height: 6px;
    background: #ececf0;
    border-radius: var(--radius-pill);
    overflow: hidden;
    position: relative;
}

.progress #progress-fill {
    height: 100%;
    width: 0%;
    background: var(--rk-orange);
    position: relative;
    z-index: 1;
    will-change: width;
}

.progress.progress-connecting #progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 42%;
    height: 100%;
    animation: progress-shuttle 2.2s ease-in-out infinite alternate;
}

@keyframes progress-shuttle {
    0% { left: -42%; }
    100% { left: 100%; }
}

dl,
.info-fields {
    display: grid;
    grid-template-columns: minmax(120px, 140px) 1fr;
    gap: 0;
    margin: 0 0 8px;
    border: 1px solid #eaeaee;
    border-radius: 8px;
    background: #f6f6f8;
    overflow: hidden;
}

.info-fields dt,
.info-fields dd {
    padding: 10px 16px;
    border-bottom: 1px solid #ededf1;
}

.info-fields dt:nth-last-of-type(1),
.info-fields dd:nth-last-of-type(1) { border-bottom: none; }

dt {
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
}

dd {
    margin: 0;
    word-break: break-word;
    font-weight: 600;
    color: var(--ink);
    font-size: 14px;
    text-align: right;
}

dd.copyable { cursor: pointer; }
dd.copyable:hover { background: #fff5e6; color: #9a6b00; }
dd.copyable.copied { background: var(--ok-soft); color: var(--ok); }

dd.info-field-with-badge {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

dd.field-placeholder {
    color: var(--muted);
    font-weight: 400;
    font-style: italic;
}

.result-fields {
    margin: 0 0 4px;
    padding: 14px 16px;
    border: 1px solid #eaeaee;
    border-radius: 8px;
    background: #f6f6f8;
    font-family: var(--font-mono);
    font-size: 13.5px;
    white-space: pre-wrap;
    word-break: break-word;
}

.result-activation { margin-top: 22px; }

.result-activation-list {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    column-gap: 16px;
    row-gap: 10px;
    align-items: center;
}

.result-activation-item {
    display: contents;
}

.result-activation-game {
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-soft);
    white-space: nowrap;
}

.result-activation-key-wrap {
    position: relative;
    width: 100%;
    min-width: 0;
    font-family: var(--font-mono);
    font-size: 13.5px;
}

.result-activation-key {
    width: 100%;
    height: 48px;
    padding: 0 38px 0 12px;
    border-radius: 5px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    font-family: inherit;
    font-size: inherit;
    letter-spacing: 0;
}

.result-activation-key:focus {
    outline: none;
    border-color: var(--line-focus);
}

.order-type-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    cursor: help;
}

.order-type-badge-normal {
    border: 1px solid #e2e2e2;
    background: #fff;
    color: var(--ink-soft);
}

.order-type-badge-priority {
    border: 1px solid #ffe4b3;
    background: #fff5e6;
    color: #9a6b00;
}

.order-type-badge::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 0;
    bottom: calc(100% + 10px);
    z-index: 5;
    width: min(300px, calc(100vw - 48px));
    padding: 10px 12px;
    border-radius: 6px;
    background: #1b1b1f;
    color: #fff;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.4;
    text-align: left;
    white-space: pre-line;
    pointer-events: none;
    opacity: 0;
}

.order-type-badge:hover::after { opacity: 1; }

/* ——— Form fields ——— */

.info-section { margin-top: 22px; }

.info-section > h2 {
    margin: 0 0 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-soft);
}

.prestart-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0;
}

.prestart-field {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
}

.rk-field { position: relative; }

.rk-field-label,
.prestart-field.rk-field > .prestart-label,
.enter-code-field .rk-field-label {
    position: absolute;
    left: 14px;
    top: 9px;
    z-index: 1;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    color: var(--ink-soft);
    pointer-events: none;
}

.field-label-top {
    display: block;
    font-size: 12px;
    color: var(--ink-soft);
    margin: 0 0 6px;
    font-weight: 400;
}

.prestart-label { color: var(--ink-soft); font-size: 12px; }

.prestart-field-body {
    display: block;
    min-width: 0;
    width: 100%;
    position: relative;
}

.field-help {
    position: absolute;
    top: 50%;
    right: 10px;
    z-index: 2;
    width: 22px;
    height: 22px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #d8d8de;
    border-radius: 50%;
    background: #fff;
    color: #8a8a90;
    font-size: 12px;
    font-weight: 700;
    cursor: help;
}

.prestart-field-body > .field-help { top: 28px; }

.nickname-check-spinner {
    position: absolute;
    top: 28px;
    right: 38px;
    z-index: 2;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
    border-radius: 50%;
    border: 2px solid rgba(252, 175, 23, 0.22);
    border-top-color: var(--rk-orange);
    animation: nickname-check-spin 0.75s linear infinite;
    pointer-events: none;
}

.nickname-check-spinner.hidden { display: none; }

@keyframes nickname-check-spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

.prestart-nickname-input-wrap.is-checking input { padding-right: 58px; }

.field-help::after {
    content: attr(data-tooltip);
    position: absolute;
    right: 0;
    bottom: calc(100% + 10px);
    width: min(320px, calc(100vw - 48px));
    padding: 9px 12px;
    border-radius: 5px;
    background: #1e6cb4;
    color: #fff;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.45;
    text-align: left;
    white-space: normal;
    pointer-events: none;
    opacity: 0;
}

.field-help:hover::after,
.field-help:focus-visible::after { opacity: 1; }

.prestart-field input,
.prestart-field-body input { width: 100%; box-sizing: border-box; }

.prestart-field select {
    width: 100%;
    height: 56px;
    margin: 0;
    padding: 20px 34px 6px 14px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237a7a80' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-color: #fff;
    border: 1px solid var(--line);
    border-radius: 5px;
    color: var(--ink);
    font-family: inherit;
    font-size: 16px;
    cursor: pointer;
}

.prestart-field select:focus {
    outline: none;
    border-color: var(--line-focus);
}

.prestart-field select:disabled {
    opacity: 1;
    color: var(--ink-soft);
    cursor: default;
    background-color: #f6f6f8;
}

.prestart-dob-row,
.prestart-nickname-row,
.prestart-password-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--prestart-auto-col);
    column-gap: var(--prestart-auto-gap);
    align-items: start;
    min-width: 0;
    width: 100%;
}

.prestart-dob-row { align-items: center; }

.prestart-dob {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.15fr;
    gap: 12px;
    min-width: 0;
}

#prestart-birth-month { order: 1; }
#prestart-birth-day { order: 2; }
#prestart-birth-year { order: 3; }

.prestart-dob select {
    width: 100%;
    min-width: 0;
    height: 52px;
    padding: 0 28px 0 14px;
}

.prestart-nickname-row.prestart-row--no-toggle,
.prestart-password-row.prestart-row--no-toggle,
.prestart-dob-row.prestart-row--no-toggle {
    grid-template-columns: minmax(0, 1fr);
}

.prestart-nickname-input-wrap,
.prestart-password-input-wrap { min-width: 0; width: 100%; }

.prestart-nickname-auto,
.prestart-password-auto,
.prestart-dob-random {
    white-space: nowrap;
    align-self: center;
    margin-top: 0;
}

.prestart-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: var(--ink);
    font-size: 13px;
    font-weight: 500;
    user-select: none;
}

.prestart-checkbox input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--rk-orange);
}

.prestart-newsletter.prestart-field {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
}

.prestart-newsletter input[type="checkbox"] {
    appearance: none;
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 1.5px solid var(--line);
    border-radius: 4px;
    background: #fff;
    position: relative;
}

.prestart-newsletter input[type="checkbox"]:checked {
    background: var(--rk-orange);
    border-color: var(--rk-orange);
}

.prestart-newsletter input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid #1c1403;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.prestart-newsletter span { color: var(--ink-soft); font-weight: 400; }

.prestart-field input.prestart-readonly-input {
    background: #f6f6f8;
    color: var(--ink-soft);
}

.prestart-field input.prestart-readonly-input.prestart-password-revealed {
    color: var(--ink);
    font-family: var(--font-mono);
    font-style: normal;
}

#form-prestart .field-error { margin: 6px 0 0; }
#form-prestart .prestart-field-error { margin: 6px 2px 0; }
#form-prestart .prestart-field-error > div + div { margin-top: 2px; }

.password-hint {
    margin: 6px 2px 0;
    color: var(--ink-soft);
    font-size: 12px;
    line-height: 1.4;
}

.password-hint.hidden { display: none; }

.password-reveal {
    position: absolute;
    top: 28px;
    right: 10px;
    z-index: 2;
    width: 28px;
    height: 28px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: #8a8a90;
    cursor: pointer;
}

.password-reveal.hidden { display: none; }
.password-reveal:hover,
.password-reveal:focus-visible { color: var(--ink); }

.prestart-password-input-wrap.is-manual .field-help { display: none; }

.password-strength {
    display: flex;
    gap: 4px;
    margin: 8px 0 0;
    height: 4px;
}

.password-strength.hidden { display: none; }

.password-strength span {
    flex: 1;
    background: #e4e4ea;
    border-radius: 2px;
}

.password-strength[data-score="1"] span:nth-child(1) { background: #d64545; }
.password-strength[data-score="2"] span:nth-child(-n+2) { background: #e67e22; }
.password-strength[data-score="3"] span:nth-child(-n+3) { background: #fcaf17; }
.password-strength[data-score="4"] span { background: #2f9e44; }

#form-prestart .prestart-field-body input[type="text"],
#form-prestart .prestart-field-body input[type="email"],
#form-prestart .prestart-nickname-input-wrap input,
#form-prestart .prestart-password-input-wrap input {
    display: block;
    width: 100%;
    height: 56px;
    padding: 20px 38px 6px 14px;
}

.registration-actions {
    margin-top: 16px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.registration-actions .btn {
    width: auto;
    min-width: 120px;
    min-height: 48px;
    padding: 14px 32px;
    font-size: 15.5px;
    letter-spacing: 0;
    text-transform: none;
}

.registration-actions .start-cooldown-hint {
    width: 100%;
    order: 3;
    margin: 0;
    text-align: center;
    font-size: 13.5px;
}

.btn-random {
    margin-right: auto;
    background: none;
    border: none;
    padding: 0;
    color: var(--rk-orange);
    font: 600 13px/1.4 var(--font);
    text-decoration: underline;
    cursor: pointer;
}

.btn-random:hover { color: var(--rk-orange-press); }

.btn-random:disabled {
    color: #9a9aa3;
    cursor: default;
    pointer-events: none;
    text-decoration: none;
}

.row-end {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.order-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 220px;
    padding: 40px 28px;
    text-align: center;
}

.order-loading-spinner {
    width: 52px;
    height: 52px;
    margin-bottom: 12px;
    border-radius: 50%;
    border: 4px solid #ececf0;
    border-top-color: var(--rk-orange);
    animation: order-loading-spin 1s linear infinite;
}

.order-loading-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--ink);
}

.order-loading .lede { margin: 0; }

@keyframes order-loading-spin { to { transform: rotate(360deg); } }

.enter-code-form {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
}

.enter-code-field {
    display: block;
    position: relative;
    margin: 0;
}

#form-enter-code .enter-code-field input[type="text"] {
    display: block;
    width: 100%;
    flex: none;
    height: 56px;
    padding: 20px 14px 6px;
}

#form-enter-code .field-error { margin: 8px 0 0; }

form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

input[type="text"],
input[type="email"],
input[type="password"] {
    flex: 1 1 200px;
    min-width: 0;
    height: 56px;
    padding: 0 14px;
    border-radius: 5px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.15s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: var(--line-focus);
}

input.input-invalid { border-color: var(--danger); }

.field-error {
    margin: 8px 0 0;
    color: var(--danger);
    font-size: 12.5px;
    line-height: 1.4;
    width: 100%;
}

.nickname-rules {
    margin: 0 0 14px;
    font-size: 13px;
}

#form-code.form-code,
#form-nickname.form-nickname {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#form-code .code-input-row,
#form-nickname .nickname-input-row {
    display: flex;
    gap: 12px;
    align-items: stretch;
    width: 100%;
}

#form-code #code-wrong-notice {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
}

#form-code .code-input-row input {
    flex: 1 1 auto;
    min-width: 0;
    text-align: center;
    font-weight: 700;
    letter-spacing: 0.2em;
    font-size: 22px;
}

#form-nickname .nickname-input-row input {
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
    font-size: 16px;
}

#form-code .code-input-row .btn,
#form-nickname .nickname-input-row .btn {
    flex: 0 0 auto;
    min-width: 120px;
}

#form-code .field-error,
#form-nickname .field-error { margin: 0; }

.resend-code-hint {
    margin: 10px 0 0;
    color: #8b8b93;
    font: 400 13px/1.45 var(--font);
}

.prestart-hint {
    margin: 6px 2px 0;
    font: 400 13px/1.45 var(--font);
}

.prestart-hint a,
#code-hosted-note a {
    color: #7eb6ff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

#code-hosted-note {
    margin: 0 0 12px;
}

#panel-code .lede {
    margin-bottom: 10px;
}

#code-sent-email {
    display: inline-block;
    font-weight: 600;
    white-space: nowrap;
}

.btn-resend-code {
    display: inline-block;
    margin-top: 10px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--ink);
    font: 500 13.5px/1.4 var(--font);
    cursor: pointer;
    text-align: left;
}

.btn-resend-code:disabled {
    color: #9a9aa3;
    cursor: default;
    pointer-events: none;
}

.btn-change-email {
    display: inline;
    padding: 0;
    border: 0;
    background: none;
    color: var(--ink);
    font: 500 13px/1.45 inherit;
    cursor: pointer;
    text-decoration: underline;
}

.btn-change-email:disabled {
    color: #9a9aa3;
    cursor: default;
    pointer-events: none;
    text-decoration: none;
}

#panel-code .card-title { text-align: left; }

.btn {
    padding: 14px 32px;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 15.5px;
    font-weight: 700;
    font-family: inherit;
    transition: background 0.15s, transform 0.05s, border-color 0.15s;
}

.btn:active:not(:disabled) { transform: translateY(1px); }

.btn:disabled {
    opacity: 0.55;
    cursor: default;
}

.btn.primary {
    background: var(--rk-orange);
    color: #1c1403;
}

.btn.primary:hover:not(:disabled) { background: var(--rk-orange-press); }

.btn.secondary {
    background: #fff;
    color: var(--ink);
    border-color: #b0b0b7;
}

.btn.secondary:hover:not(:disabled) {
    background: #f4f4f6;
    border-color: #8f8f97;
}

.input-timer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 14px;
    padding: 10px 14px;
    border-radius: 6px;
    background: #fff5e6;
    border: 1px solid #ffe4b3;
}

.input-timer-row .input-timer {
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    width: auto;
    flex: 1 1 auto;
}

.input-timer-attempts {
    margin: 0;
    font-size: 13.5px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
    white-space: nowrap;
}

.input-timer {
    margin: 0 0 14px;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13.5px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    background: #fff5e6;
    color: var(--ink);
    border: 1px solid #ffe4b3;
}

.input-timer-row.input-timer-urgent,
.input-timer.input-timer-urgent {
    background: #ffe9e9;
    border-color: #f5c6cb;
}

.input-timer-row.input-timer-urgent .input-timer,
.input-timer-row.input-timer-urgent .input-timer-attempts,
.input-timer.input-timer-urgent { color: var(--danger); }

code {
    background: #f6f6f8;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.85em;
    font-family: var(--font-mono);
    border: 1px solid #e2e2e2;
}

.launcher-help-trigger {
    background: #fff !important;
    border-color: #b0b0b7 !important;
    color: var(--ink) !important;
}

.launcher-help-trigger:hover {
    background: #f4f4f6 !important;
    border-color: #8f8f97 !important;
    color: var(--ink) !important;
}

.card-heading-result .launcher-help-trigger {
    margin-top: 0;
    margin-left: auto;
}

.support-fab {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 80;
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 50%;
    background: var(--rk-orange);
    color: #1c1403;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.support-fab:hover { transform: scale(1.05); }

.site-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 70;
    text-align: center;
    padding: 12px 90px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

.site-footer button {
    background: none;
    border: none;
    padding: 0;
    color: rgba(255, 255, 255, 0.55);
    font: inherit;
    cursor: pointer;
    pointer-events: auto;
}

.site-footer button:hover { color: #fff; text-decoration: underline; }

@keyframes fadein {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: none; }
}

@media (max-width: 560px) {
    .stage { padding: 20px 12px 72px; }
    .wrap { margin-top: -12px; }
    .logo-img { width: 88px; height: 88px; }
    .brand { margin-bottom: 20px; }
    .card { padding: 24px 20px 22px; border-radius: 12px; }
    .card-review { flex-direction: column; align-items: stretch; }
    .card-review .btn { width: 100%; }
    .card-title { font-size: 21px; }
    .prestart-dob { gap: 8px; }
    .prestart-dob select { height: 50px; font-size: 15px; padding: 0 22px 0 10px; }
    #form-code .code-input-row,
    #form-nickname .nickname-input-row,
    #form-email { flex-direction: column; }
    #form-code .code-input-row .btn,
    #form-nickname .nickname-input-row .btn,
    #form-email .btn,
    .registration-actions .btn { width: 100%; }
    .registration-actions { justify-content: stretch; }
    .btn-random { margin-right: 0; width: 100%; text-align: left; }
    .info-fields { grid-template-columns: 1fr; }
    .info-fields dt { padding-bottom: 0; border-bottom: none; }
    .info-fields dd { text-align: left; padding-top: 2px; }
    .result-activation-list { grid-template-columns: 1fr; }
    .result-activation-item {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
    .result-activation-key-wrap { width: 100%; }
    .card-heading-result { flex-wrap: wrap; }
    .support-fab { right: 14px; bottom: 14px; width: 52px; height: 52px; }
    .site-footer { padding: 10px 12px 12px; }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
