/* ==========================================================
   REGISTER — Crater auth match (extends login.css)
========================================================== */

.register-shell {
    /* auth-shell sizing from login.css; widen for step 2 */
}

.register-shell--wide {
    width: min(960px, calc(100% - 24px));
}

.register-progress {
    margin: 0 0 18px;
    text-align: center;
}

.progress-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    margin-bottom: 8px;
}

.progress-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e8e0db;
    border: 1px solid #b5a79e;
    color: #6c625e;
    font-size: 11px;
    font-weight: bold;
}

.progress-step.active {
    background: linear-gradient(#bd1818, #7c0707);
    border-color: #4e0000;
    color: #fff;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .2) inset;
}

.progress-step.complete {
    background: linear-gradient(#2a7a2a, #1a5a1a);
    border-color: #0f3d0f;
    color: #fff;
}

.progress-line {
    width: 48px;
    height: 3px;
    background: #d9d0ca;
}

.progress-line.complete {
    background: linear-gradient(90deg, #2a7a2a, #bd1818);
}

.progress-labels {
    display: flex;
    justify-content: center;
    gap: 52px;
    font-size: 10px;
    font-weight: bold;
    color: #8a7e78;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.progress-label.is-active {
    color: #760909;
}

.progress-label.is-complete {
    color: #1a5a1a;
}

/* ---- Step 2 frame ---- */

.register-step2-frame {
    overflow: hidden;
    border: 1px solid #340000;
    border-top: 4px solid #8d0000;
    background:
        repeating-linear-gradient(0deg, transparent 0 31px, rgba(113, 50, 32, .04) 31px 32px),
        #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .52);
}

.register-step2-header {
    padding: 22px 28px 0;
}

.register-step2-title-row {
    margin-bottom: 16px;
}

.register-step2-form {
    padding: 0 22px 24px;
}

.register-final-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.register-selection-column {
    flex: 1 1 auto;
    min-width: 0;
}

.section-title {
    margin: 0 0 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid #8d0000;
    color: #760909;
    font-size: 13px;
    font-weight: bold;
}

.sprite-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
    gap: 8px;
    margin: 0 0 20px;
}

.sprite-cell {
    min-width: 0;
}

.sprite-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 8px 4px;
    border: 1px solid #c8bcb4;
    border-radius: 3px;
    background: linear-gradient(#fff, #f3ebe6);
    cursor: pointer;
    transition: border-color .12s ease, box-shadow .12s ease, background .12s ease;
}

.sprite-option:hover {
    border-color: #8d0000;
}

.sprite-option:has(input:checked) {
    border-color: #8d0000;
    background: #fff5f5;
    box-shadow: 0 0 0 1px #8d0000;
}

.sprite-option img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    image-rendering: pixelated;
}

.sprite-option input {
    margin: 0;
    accent-color: #8d0000;
}

.generation-section {
    margin-bottom: 12px;
    padding: 12px;
    background: linear-gradient(180deg, #faf6f3 0%, #f0e8e2 100%);
    border: 1px solid #d9cfc7;
    border-radius: 3px;
}

.generation-title {
    margin: 0 0 10px;
    font-size: 11px;
    font-weight: bold;
    color: #5a0c0c;
    letter-spacing: .02em;
}

.pokemon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 8px;
}

.pokemon-cell {
    min-width: 0;
}

.pokemon-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 4px;
    border: 1px solid #c8bcb4;
    border-radius: 3px;
    background: #fff;
    cursor: pointer;
    font-size: 10px;
    font-weight: bold;
    color: #5a0c0c;
    text-align: center;
    transition: border-color .12s ease, box-shadow .12s ease, background .12s ease;
}

.pokemon-option:hover {
    border-color: #8d0000;
}

.pokemon-option:has(input:checked) {
    border-color: #8d0000;
    background: #fff5f5;
    box-shadow: 0 0 0 1px #8d0000;
}

.pokemon-option img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    image-rendering: auto;
}

.pokemon-option input {
    margin: 0;
    accent-color: #8d0000;
}

.trainer-preview {
    flex: 0 0 210px;
    position: sticky;
    top: 12px;
}

.register-trainer-card {
    border: 1px solid #5a0c0c;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 14px rgba(90, 12, 12, .18);
}

.register-trainer-card-header {
    padding: 7px 12px;
    background: linear-gradient(#b31515, #790707);
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    text-align: center;
    text-shadow: 0 1px #3b0000;
}

.register-trainer-card-body {
    padding: 14px 12px 16px;
    text-align: center;
    background:
        repeating-linear-gradient(0deg, #fff 0 31px, #f7f2ed 31px 62px);
}

.preview-trainer {
    width: 68px;
    height: 68px;
    object-fit: contain;
    image-rendering: pixelated;
    margin-bottom: 6px;
}

.preview-username {
    font-size: 14px;
    font-weight: bold;
    color: #5a0c0c;
    margin-bottom: 4px;
    word-break: break-word;
}

.preview-details {
    font-size: 10px;
    color: #6c625e;
    line-height: 1.4;
    margin-bottom: 8px;
}

.register-trainer-card-body hr {
    border: none;
    border-top: 1px solid #e0d5cd;
    margin: 10px 0;
}

.preview-title {
    font-size: 10px;
    font-weight: bold;
    color: #8a6060;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.preview-pokemon {
    width: 100px;
    height: 100px;
    object-fit: contain;
    image-rendering: auto;
    margin-bottom: 4px;
}

.preview-pokemon-name {
    font-size: 13px;
    font-weight: bold;
    color: #b00000;
}

.preview-level {
    font-size: 11px;
    color: #555;
    font-weight: bold;
}

.register-nav-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #d9d0ca;
    flex-wrap: wrap;
}

.register-btn-secondary {
    display: inline-block;
    padding: 10px 16px;
    border: 1px solid #8f8178;
    border-radius: 3px;
    background: linear-gradient(#fff, #ded6d0);
    color: #4f0707;
    font: bold 12px Verdana, Arial, sans-serif;
    text-decoration: none;
}

.register-btn-secondary:hover {
    background: #fff;
    color: #920b0b;
}

.register-submit-inline {
    width: auto;
    min-width: 160px;
    margin-top: 0;
    padding-inline: 20px;
}

@media (max-width: 720px) {
    .register-final-layout {
        flex-direction: column;
    }

    .trainer-preview {
        flex: none;
        width: 100%;
        max-width: 260px;
        margin: 0 auto;
        position: static;
    }

    .register-step2-header,
    .register-step2-form {
        padding-inline: 16px;
    }
}

@media (max-width: 430px) {
    .progress-labels {
        gap: 36px;
    }

    .register-nav-row {
        flex-direction: column;
    }

    .register-submit-inline,
    .register-btn-secondary {
        width: 100%;
        text-align: center;
    }
}
