:root {
    --sotto-black: #0e0e0e;
    --sotto-ink: #1b1c1c;
    --sotto-muted: #626262;
    --sotto-line: #ded8d4;
    --sotto-panel: #ffffff;
    --sotto-background: #fbf9f8;
    --sotto-red: #9e0000;
    --sotto-red-soft: rgba(158, 0, 0, 0.42);
    --sotto-green: #2e7d32;
    --sotto-orange: #e65100;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background-color: #fbf9f8;
    color: #1b1c1c;
    overflow-x: hidden;
}

a, button {
    text-decoration-thickness: 1px;
}

.brand-logo {
    font-family: "Playfair Display", Georgia, serif;
    font-size: 34px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.01em;
    text-decoration: none;
}

.text-white { color: #ffffff; }

.register-body {
    min-height: 100vh;
    color: var(--sotto-ink);
    font-family: Inter, sans-serif;
    background: var(--sotto-background);
}

.register-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 0 auto;
    padding: 34px max(24px, calc((100% - 1120px) / 2));
    background: var(--sotto-black);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.register-logo {
    color: #ffffff;
    text-decoration: none;
}

.signin-link {
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: underline;
    text-underline-offset: 5px;
    transition: color 180ms ease;
}

.signin-link:hover {
    color: #ffffff;
}

.register-shell {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: min(100% - 48px, 1120px);
    min-height: calc(100vh - 122px);
    margin: 0 auto;
    padding: 46px 0 80px;
}

.register-card {
    width: min(100%, 620px);
    border: 1px solid var(--sotto-line);
    background: var(--sotto-panel);
    padding: 38px;
    box-shadow: 0 18px 50px rgba(27, 28, 28, 0.08);
}

.register-step-label {
    margin: 0 0 18px;
    color: var(--sotto-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.progress-track {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin-bottom: 42px;
}

.progress-segment {
    height: 3px;
    background: #ebe5e2;
}

.progress-segment.active {
    background: var(--sotto-red);
}

.step-panel {
    display: none;
}

.step-panel.active {
    display: block;
}

.register-card h2 {
    margin: 0 0 22px;
    color: var(--sotto-ink);
    font-family: "Playfair Display", Georgia, serif;
    font-size: 34px;
    font-weight: 600;
    line-height: 1.15;
}

.step-panel h2:not(:first-child) {
    margin-top: 50px;
}

.step-copy {
    margin: -6px 0 24px;
    color: var(--sotto-muted);
    font-size: 15px;
    line-height: 1.7;
}

.email-note {
    margin: 24px 0 0;
    color: var(--sotto-muted);
    font-size: 16px;
    line-height: 1.6;
    text-align: center;
}

.verification-copy {
    font-size: 18px;
    text-align: center;
}

.verification-copy strong {
    color: var(--sotto-ink);
    font-weight: 800;
}

.code-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
    margin: 30px 0 24px;
}

.code-input {
    box-sizing: border-box;
    width: 100%;
    aspect-ratio: 1;
    border: 1px solid var(--sotto-line);
    color: var(--sotto-ink);
    background: transparent;
    font: inherit;
    font-size: 26px;
    font-weight: 700;
    text-align: center;
    outline: none;
    border-radius: 0;
}

.code-input:focus {
    border-color: rgba(158, 0, 0, 0.55);
}

.choice-grid {
    display: grid;
    gap: 14px;
    margin-bottom: 14px;
}

.choice-grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.birthday-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.15fr;
    gap: 18px;
}

.choice-button,
.primary-button,
.secondary-button,
.register-input {
    border-radius: 0;
    font: inherit;
}

.choice-button {
    min-height: 64px;
    border: 1px solid var(--sotto-line);
    color: var(--sotto-ink);
    background: transparent;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.choice-button:hover,
.choice-button.selected {
    border-color: rgba(158, 0, 0, 0.55);
    background: rgba(158, 0, 0, 0.045);
    color: var(--sotto-ink);
}

.choice-button.selected {
    box-shadow: inset 0 -3px 0 var(--sotto-red);
}

.choice-button.full {
    width: 100%;
}

.field-label {
    display: block;
    margin: 22px 0 10px;
    color: var(--sotto-muted);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.register-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--sotto-line);
    background: transparent;
    color: var(--sotto-ink);
    min-height: 58px;
    padding: 0 18px;
    outline: none;
}

.register-select {
    appearance: none;
    -webkit-appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--sotto-muted) 50%),
        linear-gradient(135deg, var(--sotto-muted) 50%, transparent 50%);
    background-position:
        calc(100% - 24px) 50%,
        calc(100% - 18px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.birthday-input {
    min-height: 58px;
    font-size: 15px;
}

.register-input:focus {
    border-color: rgba(158, 0, 0, 0.55);
}

.register-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.password-field {
    position: relative;
}

.password-field .register-input {
    padding-right: 58px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    font-size: 22px;
    cursor: pointer;
}

.strength-bar {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.strength-segment {
    flex: 1;
    height: 4px;
    background: #ebe5e2;
    transition: background 200ms ease;
}

.consent-row {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    color: var(--sotto-muted);
    font-size: 15px;
    line-height: 1.6;
}

.consent-row input {
    width: 18px;
    height: 18px;
    margin-top: 3px;
    accent-color: var(--sotto-red);
}

.consent-row a {
    color: var(--sotto-red);
    text-decoration: underline;
}

.register-actions {
    display: flex;
    gap: 14px;
    margin-top: 38px;
}

.primary-button,
.secondary-button {
    min-height: 66px;
    border: 1px solid transparent;
    padding: 0 28px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.08em;
    cursor: pointer;
}

.primary-button {
    flex: 1;
    background: var(--sotto-red);
}

.primary-button:disabled {
    cursor: not-allowed;
    background: var(--sotto-red-soft);
    color: rgba(255, 255, 255, 0.42);
}

.secondary-button {
    background: transparent;
    color: var(--sotto-ink);
    border-color: var(--sotto-line);
}

.field-feedback {
    margin: 8px 0 0;
    font-size: 13px;
    min-height: 18px;
}

.field-feedback.success { color: var(--sotto-green); }
.field-feedback.error { color: var(--sotto-red); }
.field-feedback.muted { color: var(--sotto-muted); }

.age-display {
    margin: 12px 0 0;
    font-size: 14px;
    color: var(--sotto-green);
}

.age-display.error {
    color: var(--sotto-red);
}

.resend-button {
    display: block;
    margin: 12px auto 0;
    background: none;
    border: none;
    color: var(--sotto-red);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

@media (max-width: 640px) {
    .register-header {
        padding: 28px 18px;
    }
    .register-logo {
        font-size: 31px;
    }
    .signin-link {
        font-size: 12px;
    }
    .register-shell {
        width: min(100% - 36px, 560px);
        min-height: auto;
        padding: 28px 0 60px;
    }
    .register-card {
        padding: 26px;
    }
    .register-card h2 {
        font-size: 28px;
    }
    .choice-grid-two {
        grid-template-columns: 1fr;
    }
    .birthday-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .code-grid {
        gap: 8px;
    }
    .code-input {
        font-size: 20px;
    }
}
