.profile-container {
    max-width: var(--page-max-width);
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Share mission card (link + optional edit panel for owner) */
.share-mission-card {
    padding: 0.85rem 1.2rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.share-mission-card__row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.share-mission-card__link-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.share-text {
    color: var(--brand-ink);
    font-weight: 600;
    flex-shrink: 0;
}

.share-link {
    color: #1f7a76;
    font-family: monospace;
    font-size: 0.9rem;
    word-break: break-all;
}

.share-link:hover {
    text-decoration: underline;
}

.share-copy-btn {
    padding: 0.25rem 0.65rem;
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.85);
    color: var(--brand-cool);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.share-copy-btn:hover {
    background: rgba(31, 122, 118, 0.1);
}

.share-copy-btn--success {
    background: #d1e7dd;
    color: #0f5132;
    border-color: #badbcc;
}

.share-mission-card__end {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    flex-wrap: wrap;
}

.share-mission-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--brand-ink);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.share-mission-edit-btn:hover {
    background: rgba(31, 122, 118, 0.08);
    border-color: rgba(31, 122, 118, 0.35);
}

.share-mission-edit-btn__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    font-size: 1.1rem;
    line-height: 1;
    font-weight: 700;
    color: #1f7a76;
}

.share-mission-edit-btn__label {
    white-space: nowrap;
}

.share-social {
    flex-shrink: 0;
}

.share-btn {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s;
}

.share-btn:hover {
    opacity: 0.85;
}

.share-btn-twitter {
    background: #000;
    color: #fff;
}

.share-btn-bluesky {
    background: #1185fe;
    color: #fff;
}

.share-mission-card__edit {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-soft);
}

.share-mission-card__edit-lede {
    margin: 0 0 0.85rem;
    font-size: 0.92rem;
    color: var(--brand-muted, #5c6b6a);
    line-height: 1.45;
}

.share-mission-card__feedback {
    margin: 0.75rem 0 0;
    padding-top: 0.65rem;
    border-top: 1px solid var(--border-soft);
    font-size: 0.88rem;
    color: var(--brand-cool);
}

/* Overall completion card */
.overall-card {
    background: linear-gradient(135deg, #1f7a76 0%, #2a948f 100%);
    color: white;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-soft);
}

.overall-label {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    opacity: 0.9;
}

.overall-progress-wrap {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.overall-bar-outer {
    flex: 1;
    height: 20px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    overflow: hidden;
}

.overall-bar-inner {
    height: 100%;
    background: white;
    border-radius: 10px;
    transition: width 0.6s ease;
    min-width: 2px;
}

.overall-percentage {
    font-size: 1.5rem;
    font-weight: 700;
    min-width: 60px;
    text-align: right;
}

.overall-counts {
    font-size: 0.9rem;
    opacity: 0.85;
}

/* Watch rank (public — all profile viewers) */
.watch-rank-card {
    background: var(--card-bg);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
}

.watch-rank-card__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--brand-ink);
    margin: 0 0 0.35rem;
}

.watch-rank-card__lede {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.45;
}

.watch-rank-display {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
    padding: 0.75rem 0 0.5rem;
    border-top: 1px solid var(--border-soft);
}

.watch-rank-display__title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1f7a76;
    line-height: 1.2;
}

.watch-rank-progress {
    margin: 0.65rem 0 0;
    font-size: 0.92rem;
    color: var(--brand-ink);
    line-height: 1.45;
}

.watch-rank-max {
    margin: 0.65rem 0 0;
    font-size: 0.95rem;
    color: #145c59;
    font-weight: 600;
}

/* Visit streak badges (signed-in profile owner only) */
.visit-badges-card {
    background: var(--card-bg);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    padding: 1.25rem 1.5rem;
    margin-top: 2rem;
    margin-bottom: 0;
}

.visit-badges-card--loading {
    display: flex;
    align-items: center;
    min-height: 3.5rem;
}

.visit-badges-loading-text {
    margin: 0;
    font-size: 0.95rem;
    color: var(--brand-ink);
    font-weight: 600;
}

.visit-badges-card__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--brand-ink);
    margin: 0 0 0.35rem;
}

.visit-badges-card__lede {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.45;
}

.visit-badges-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem 2rem;
    margin: 0 0 1rem;
    padding: 0.75rem 0 1rem;
    border-top: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
}

.visit-badges-stat {
    margin: 0;
}

.visit-badges-stat dt {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #666;
    margin: 0 0 0.2rem;
}

.visit-badges-stat dd {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1f7a76;
}

.visit-badges-email-cta {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    line-height: 1.45;
    color: #555;
}

.visit-badges-email-cta__link {
    color: #1f7a76;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

.visit-badges-email-cta__link:hover {
    color: #165c59;
}

.visit-badges-earned {
    margin-bottom: 1rem;
}

.visit-badges-subsection {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-soft);
}

.visit-badges-subsection:first-of-type {
    margin-top: 0.75rem;
    padding-top: 0;
    border-top: none;
}

.visit-badges-subheading {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--brand-ink);
    margin: 0 0 0.5rem;
}

.visit-badges-next-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--brand-ink);
    margin: 0.75rem 0 0.35rem;
}

.visit-badges-muted {
    color: #666;
    font-weight: 500;
}

.visit-badges-chip-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.visit-badges-chip {
    display: inline-block;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    background: rgba(31, 122, 118, 0.1);
    color: #145c59;
    border: 1px solid rgba(31, 122, 118, 0.25);
}

.visit-badges-next {
    padding-top: 0.25rem;
}

.visit-badges-next-target {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--brand-ink);
}

.visit-badges-next-bar-outer {
    height: 14px;
    background: #e8f4f3;
    border-radius: 7px;
    overflow: hidden;
}

.visit-badges-next-bar-inner {
    height: 100%;
    background: linear-gradient(90deg, #1f7a76, #2a948f);
    border-radius: 7px;
    transition: width 0.45s ease;
    min-width: 2px;
}

.visit-badges-next-caption {
    margin: 0.45rem 0 0;
    font-size: 0.88rem;
    color: var(--brand-ink);
}

.visit-badges-all-earned {
    margin: 0.5rem 0 0;
    font-size: 0.95rem;
    color: #145c59;
    font-weight: 600;
}

/* Per-series list */
.series-list {
    background: var(--card-bg);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.series-row {
    display: grid;
    grid-template-columns: 220px 1fr 80px;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.5rem;
    border-bottom: 1px solid var(--border-soft);
}

.series-row:last-child {
    border-bottom: none;
}

.series-row:hover {
    background: rgba(31, 122, 118, 0.04);
}

.series-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--brand-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.series-progress {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.progress-bar-outer {
    flex: 1;
    height: 14px;
    background: #e8f4f3;
    border-radius: 7px;
    overflow: hidden;
}

.progress-bar-inner {
    height: 100%;
    background: linear-gradient(90deg, #1f7a76, #2a948f);
    border-radius: 7px;
    transition: width 0.6s ease;
    min-width: 2px;
}

.progress-percentage {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1f7a76;
    min-width: 42px;
    text-align: right;
}

.series-counts {
    font-size: 0.8rem;
    color: #666;
    text-align: right;
    white-space: nowrap;
}

/* Not found card */
.not-found-card {
    background: var(--card-bg);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-soft);
}

.not-found-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.not-found-card h2 {
    font-size: 1.5rem;
    color: var(--brand-ink);
    margin-bottom: 0.75rem;
}

.not-found-card p {
    color: #666;
    margin-bottom: 1.5rem;
}

.btn-home {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background: linear-gradient(135deg, #1f7a76, #2a948f);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
}

.btn-home:hover {
    opacity: 0.9;
}

/* Last 30 days section */
.recent-section {
    margin-top: 2rem;
    background: var(--card-bg);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.recent-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-soft);
    background: rgba(31, 122, 118, 0.05);
}

.recent-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--brand-ink);
}

.recent-chart {
    padding: 0.5rem 0;
}

.public-handle-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.public-handle-prefix {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.85rem;
    color: var(--brand-muted, #5c6b6a);
}

.public-handle-input {
    flex: 1 1 140px;
    min-width: 120px;
    max-width: 280px;
    padding: 0.4rem 0.55rem;
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.9rem;
}

.public-handle-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.public-handle-save {
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 640px) {
    .profile-container {
        padding: 1rem;
    }

    .series-row {
        grid-template-columns: 1fr;
        gap: 0.4rem;
        padding: 0.8rem 1rem;
    }

    .series-name {
        font-size: 0.9rem;
    }

    .series-counts {
        text-align: left;
    }

    .overall-card {
        padding: 1.2rem;
    }

    .overall-percentage {
        font-size: 1.2rem;
    }

    .share-mission-card__end {
        margin-left: 0;
        width: 100%;
        justify-content: flex-start;
    }

    .share-mission-edit-btn__label {
        display: none;
    }

    .watch-rank-card {
        padding: 1rem 1.1rem;
    }

    .watch-rank-display__title {
        font-size: 1.15rem;
    }
}
