[hidden] { display: none !important; }

.profile-page {
    min-height: 100dvh;
    color: var(--ink);
    background:
        linear-gradient(90deg, rgba(248, 244, 235, 0.94), rgba(248, 244, 235, 0.7)),
        url('../image/kyoto-sun.jpg') center / cover fixed;
}

.profile-header {
    display: flex;
    width: min(100% - 40px, 1420px);
    min-height: 86px;
    align-items: center;
    justify-content: space-between;
    margin-inline: auto;
    border-bottom: 1px solid rgba(24, 37, 34, 0.16);
}

.profile-header__back {
    padding-bottom: 5px;
    border-bottom: 1px solid currentColor;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.profile-main {
    display: grid;
    width: min(100% - 40px, 1420px);
    min-height: calc(100dvh - 86px);
    grid-template-columns: minmax(0, 1.1fr) minmax(380px, 0.9fr);
    gap: clamp(50px, 8vw, 130px);
    align-items: center;
    margin-inline: auto;
    padding: 70px 0 90px;
}

.profile-kicker,
.profile-card__eyebrow {
    margin: 0 0 22px;
    color: var(--terracotta-deep);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.2em;
}

.profile-hero h1 {
    margin: 0;
    font-family: var(--display);
    font-size: clamp(58px, 7vw, 108px);
    font-weight: 400;
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.profile-hero h1 em { color: var(--terracotta-deep); font-weight: 400; }
.profile-hero > p:last-child { max-width: 540px; margin: 34px 0 0; color: rgba(24, 37, 34, 0.68); line-height: 1.9; }

.profile-card {
    padding: clamp(36px, 5vw, 66px);
    background: rgba(255, 253, 248, 0.88);
    border: 1px solid rgba(24, 37, 34, 0.14);
    box-shadow: 0 28px 90px rgba(24, 37, 34, 0.12);
    backdrop-filter: blur(18px);
}

.profile-card h2 { margin: 0; font-family: var(--display); font-size: clamp(34px, 4vw, 52px); font-weight: 500; }
.profile-details { margin: 38px 0; border-top: 1px solid rgba(24, 37, 34, 0.14); }
.profile-details div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 18px 0; border-bottom: 1px solid rgba(24, 37, 34, 0.14); }
.profile-details dt { color: rgba(24, 37, 34, 0.58); font-size: 11px; }
.profile-details dd { margin: 0; font-size: 13px; font-weight: 700; }
.profile-security-status {
    display: inline-flex;
    width: max-content;
    align-items: center;
    gap: 7px;
    color: #3f6c58;
    white-space: nowrap;
}

.profile-security-status::before {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    background: currentColor;
    border-radius: 50%;
    content: "";
}

.profile-action {
    display: flex;
    min-height: 54px;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    color: var(--white);
    background: var(--forest);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.profile-actions {
    display: grid;
    gap: 12px;
}

.profile-action--secondary {
    width: 100%;
    color: var(--forest);
    background: transparent;
    border: 1px solid var(--forest);
    font: inherit;
    cursor: pointer;
}

.profile-action--secondary:hover:not(:disabled) {
    color: var(--white);
    background: var(--forest);
}

.profile-action--secondary:disabled {
    cursor: wait;
    opacity: 0.56;
}

.profile-logout-error {
    margin: 12px 0 0;
    color: #9a432f;
    font-size: 11px;
    line-height: 1.7;
}

.profile-state { min-height: 280px; display: grid; align-content: center; justify-items: start; gap: 18px; }
.profile-state__mark { width: 28px; height: 28px; border: 2px solid rgba(24, 37, 34, 0.18); border-top-color: var(--forest); border-radius: 50%; animation: profile-spin 0.9s linear infinite; }
.profile-state p { margin: 0; color: rgba(24, 37, 34, 0.62); line-height: 1.8; }
.profile-state--error strong { font-family: var(--display); font-size: 30px; }
.profile-state--error .profile-action { width: 100%; margin-top: 12px; }
@keyframes profile-spin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
    .profile-main { grid-template-columns: 1fr; padding-top: 54px; }
    .profile-hero h1 { font-size: clamp(54px, 14vw, 82px); }
}

@media (max-width: 560px) {
    .profile-page {
        background-attachment: scroll;
        background-position: center top;
        background-size: cover;
    }

    .profile-header,
    .profile-main {
        width: min(100% - 28px, 1420px);
    }

    .profile-header .brand__seal img {
        object-fit: cover;
        object-position: center;
        transform: scale(1.28);
    }

    .profile-main {
        gap: 42px;
        padding: 36px 0 56px;
    }

    .profile-hero h1 {
        font-size: clamp(42px, 11vw, 64px);
        line-height: 1.02;
    }

    .profile-hero > p:last-child {
        margin-top: 18px;
        font-size: 14px;
        line-height: 1.8;
    }

    .profile-card {
        padding: 28px 22px;
        border-radius: 0;
        box-shadow: 0 22px 70px rgba(24, 37, 34, 0.12);
    }

    .profile-details div {
        display: grid;
        gap: 7px;
    }
}
