.profile-panel {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

.profile-panel.is-hidden {
    display: none !important;
}

.profile-hero-actions {
    align-self: flex-start;
    flex-shrink: 0;
    margin-left: auto;
}

.profile-edit-link,
.profile-settings-back-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-2);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    text-decoration: none;
    transition: color var(--duration) ease, background var(--duration) ease, border-color var(--duration) ease, transform var(--duration) ease;
}

.profile-edit-link:hover,
.profile-settings-back-btn:hover {
    color: var(--profile-custom-accent, var(--c-basic));
    background: color-mix(in srgb, var(--profile-custom-accent, var(--c-basic)) 13%, transparent);
    border-color: color-mix(in srgb, var(--profile-custom-accent, var(--c-basic)) 36%, var(--border));
    transform: translateY(-1px);
}

.profile-edit-link .ui-icon,
.profile-edit-link svg,
.profile-settings-back-btn .ui-icon,
.profile-settings-back-btn svg {
    width: 18px;
    height: 18px;
}

.profile-settings-header {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.profile-settings-heading {
    min-width: 0;
}

.profile-settings-title {
    color: var(--text);
    font-size: 18px;
    font-weight: 850;
    line-height: 1.2;
}

.profile-settings-subtitle {
    margin-top: 3px;
    color: var(--text-3);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
}

.profile-overview-bio {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-2);
}

.profile-overview-bio-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
}

.profile-overview-bio .profile-field-label {
    margin-bottom: 0;
}

.profile-bio-count-wrap {
    color: var(--text-3);
    font-size: 12px;
    font-weight: 500;
}

.profile-bio-input {
    min-height: 88px;
    resize: vertical;
    padding: 10px 12px;
    line-height: 1.45;
}

.profile-settings-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 2px 0 4px;
}

.profile-settings-avatar {
    --katomu-avatar-size: 58px;
    position: relative;
    width: 58px;
    height: 58px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.profile-settings-preview-info {
    min-width: 0;
}

.profile-settings-preview-label {
    color: var(--text-3);
    font-size: 11px;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0;
}

.profile-settings-preview-name {
    color: var(--text);
    font-size: 18px;
    font-weight: 850;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#profile-settings-panel .profile-edit-section {
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
}

#profile-settings-panel #profile-age-input {
    width: 128px;
}

#profile-settings-panel .profile-input:focus {
    border-color: var(--profile-custom-accent, var(--c-basic));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--profile-custom-accent, var(--c-basic)) 16%, transparent), inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

body.light .profile-edit-link,
body.light .profile-settings-back-btn {
    background: rgba(255, 255, 255, 0.58);
    border-color: rgba(15, 23, 42, 0.09);
    color: var(--text-2);
}

body.light .profile-edit-link:hover,
body.light .profile-settings-back-btn:hover {
    color: var(--profile-custom-accent, var(--c-basic));
    background: color-mix(in srgb, var(--profile-custom-accent, var(--c-basic)) 10%, white);
}

body.light .profile-overview-bio {
    background: var(--surface-2);
    border-color: var(--border);
}

.info-help-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(5, 10, 18, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
}

.info-help-modal-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.info-help-modal {
    width: min(680px, 100%);
    max-height: min(760px, calc(100dvh - 36px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015)),
        var(--surface-2);
    box-shadow: var(--shadow-lg), 0 12px 36px rgba(0, 0, 0, 0.32);
    transform: translate3d(0, 12px, 0);
    transition: transform 0.18s ease;
}

.info-help-modal-overlay.is-open .info-help-modal {
    transform: translate3d(0, 0, 0);
}

.info-help-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.info-help-modal__title-wrap {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: var(--text);
}

.info-help-modal__title-wrap .ui-icon {
    width: 18px;
    height: 18px;
    color: var(--c-basic);
    flex-shrink: 0;
}

.info-help-modal__title {
    font-size: 16px;
    font-weight: 850;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
}

.info-help-modal__close {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.info-help-modal__close:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-2);
}

.info-help-modal__close .ui-icon {
    width: 17px;
    height: 17px;
}

.info-help-modal__content {
    padding: 18px 20px 4px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    color: var(--text-2);
    font-size: 13px;
    line-height: 1.65;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
}

.info-help-modal__content p {
    margin: 0 0 12px;
}

.info-help-modal__content p:last-child {
    margin-bottom: 0;
}

.info-help-modal__ok {
    align-self: flex-end;
    margin: 16px 20px 20px;
    min-height: 38px;
    padding: 0 18px;
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, var(--c-basic) 40%, transparent);
    background: color-mix(in srgb, var(--c-basic) 16%, transparent);
    color: var(--c-basic);
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.info-help-modal__ok:hover {
    background: color-mix(in srgb, var(--c-basic) 22%, transparent);
    border-color: color-mix(in srgb, var(--c-basic) 58%, transparent);
    transform: translateY(-1px);
}

body.light .info-help-modal-overlay {
    background: rgba(15, 23, 42, 0.28);
}

body.light .info-help-modal {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(248, 250, 252, 0.72)),
        var(--surface-2);
    border-color: rgba(15, 23, 42, 0.1);
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.18);
}

body.light .info-help-modal__header {
    border-bottom-color: rgba(15, 23, 42, 0.08);
}

body.light .info-help-modal__close {
    background: rgba(255, 255, 255, 0.64);
    border-color: rgba(15, 23, 42, 0.1);
}

@media (max-width: 768px) {
    .profile-edit-link,
    .profile-settings-back-btn {
        width: 36px;
        height: 36px;
        border-radius: 11px;
    }

    .profile-overview-bio-header {
        align-items: flex-start;
    }

    .info-help-modal-overlay {
        align-items: stretch;
        padding: 0;
    }

    .info-help-modal {
        width: 100%;
        max-height: none;
        min-height: 100dvh;
        border-radius: 0;
        border-left: 0;
        border-right: 0;
    }

    .info-help-modal__header {
        padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 12px;
    }

    .info-help-modal__content {
        padding: 16px 16px 4px;
        font-size: 13px;
    }

    .info-help-modal__ok {
        width: calc(100% - 32px);
        margin: 16px 16px calc(18px + env(safe-area-inset-bottom, 0px));
    }
}

/* Social Link Showcase (docs/planning/social_link_showcase_roadmap.md §9) */
.profile-social-link-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.profile-social-link-status {
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.4;
}

.profile-social-link-status--approved,
.profile-social-link-status--pending {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--surface-3);
    border: 1px solid var(--border);
}

.profile-social-link-status--rejected {
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.profile-social-link-icon {
    flex-shrink: 0;
}

.profile-social-link-url {
    flex: 1;
    min-width: 0;
    color: var(--c-basic);
    text-decoration: underline;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-social-link-status--pending span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.profile-social-link-hint {
    font-size: 12px;
    color: var(--text-3);
    line-height: 1.4;
    margin: 0;
}

.profile-social-link-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
