.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
}

.login-frame {
    width: min(1160px, 100%);
    min-height: min(700px, calc(100vh - 56px));
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(380px, 0.8fr);
    overflow: hidden;
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    background: var(--surface-soft);
}

.login-identity {
    position: relative;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 42px 48px 38px;
    overflow: hidden;
    border-right: 1px solid var(--hairline);
    background: var(--surface-soft);
}

.login-identity::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 5px;
    height: 128px;
    background: var(--primary);
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.login-brand > span:last-child,
.login-brand strong,
.login-brand small {
    display: block;
}

.login-brand strong {
    color: var(--ink);
    font-size: 16px;
    font-weight: 700;
}

.login-brand small {
    color: var(--muted);
    font-size: 10px;
}

.login-mark {
    position: relative;
    width: 30px;
    height: 30px;
    border: 2px solid var(--primary);
    border-radius: 6px;
}

.login-mark::before,
.login-mark::after {
    content: "";
    position: absolute;
    left: 7px;
    right: 7px;
    height: 2px;
    background: var(--primary);
}

.login-mark::before {
    top: 8px;
}

.login-mark::after {
    bottom: 8px;
}

.identity-copy {
    margin: 54px 0 34px;
}

.identity-copy p {
    margin: 0 0 10px;
    color: var(--primary);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.identity-copy h1 {
    max-width: 560px;
    margin: 0;
    color: var(--ink);
    font-size: clamp(42px, 5vw, 68px);
    line-height: 1.08;
    font-weight: 700;
    letter-spacing: 0;
}

.tarot-deck {
    min-height: 250px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 14px;
    padding-top: 20px;
    border-top: 1px solid var(--hairline);
}

.visual-card {
    width: min(150px, 28%);
    aspect-ratio: 0.66;
    display: grid;
    grid-template-rows: auto 1fr auto 1fr auto;
    place-items: center;
    padding: 14px;
    border: 1px solid var(--hairline-strong);
    border-radius: 6px;
    color: var(--muted);
    background: var(--canvas);
}

.visual-card:nth-child(1),
.visual-card:nth-child(3) {
    transform: translateY(22px);
}

.visual-card-primary {
    border-color: var(--primary);
    color: var(--primary);
    background: #10110b;
}

.card-index,
.card-caption {
    font-family: "Cascadia Code", Consolas, monospace;
    font-size: 10px;
    text-transform: uppercase;
}

.card-symbol {
    color: var(--primary);
    font-size: 36px;
}

.card-line {
    width: 1px;
    height: 100%;
    min-height: 34px;
    background: var(--hairline-strong);
}

.visual-card-primary .card-line {
    background: var(--primary);
}

.login-access {
    display: grid;
    place-items: center;
    padding: 52px;
    background: var(--surface-card);
}

.login-panel {
    width: min(360px, 100%);
}

.login-panel header {
    margin-bottom: 30px;
}

.session-status {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 22px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.session-status span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
}

.login-panel h2 {
    margin: 0 0 7px;
    color: var(--ink);
    font-size: 30px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 0;
}

.login-panel header p {
    margin: 0;
    color: var(--muted);
}

.login-field {
    margin-bottom: 18px;
}

.login-field label {
    display: block;
    margin-bottom: 7px;
    color: var(--body);
    font-size: 12px;
    font-weight: 500;
}

.login-field input {
    width: 100%;
    min-height: 48px;
    padding: 11px 13px;
    border: 1px solid var(--hairline-strong);
    border-radius: var(--radius);
    color: var(--ink);
    background: var(--surface-soft);
    outline: none;
}

.login-field input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(250, 255, 105, 0.12);
}

.login-button {
    width: 100%;
    min-height: 48px;
    margin-top: 8px;
    border: 0;
    border-radius: var(--radius);
    color: var(--canvas);
    background: var(--primary);
    cursor: pointer;
    font-weight: 600;
}

.login-button:hover,
.login-button:focus-visible {
    background: var(--primary-active);
    outline: none;
}

.login-messages {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
}

.login-message {
    padding: 10px 12px;
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: var(--radius);
    color: #fecaca;
    background: rgba(239, 68, 68, 0.08);
}

.login-panel footer {
    margin-top: 28px;
    color: var(--muted-soft);
    font-size: 10px;
    text-align: center;
    text-transform: uppercase;
}

@media (max-width: 860px) {
    .login-page {
        padding: 16px;
    }

    .login-frame {
        min-height: calc(100vh - 32px);
        grid-template-columns: 1fr;
    }

    .login-identity {
        min-height: 310px;
        padding: 28px;
        border-right: 0;
        border-bottom: 1px solid var(--hairline);
    }

    .identity-copy {
        margin: 42px 0 0;
    }

    .identity-copy h1 {
        font-size: 42px;
    }

    .tarot-deck {
        display: none;
    }

    .login-access {
        padding: 42px 28px;
    }
}

@media (max-width: 460px) {
    .login-identity {
        min-height: 260px;
        padding: 24px;
    }

    .identity-copy h1 {
        font-size: 34px;
    }

    .login-access {
        padding: 34px 24px;
    }
}
