/* User profile feature styles. */
.profile-page article {
    --profile-badge-icon-size: 32px;
    --profile-ink: #111;
    --profile-about: #333;
    --profile-muted: #666;
    --profile-dotted-border: #d6d6d6;
    --profile-divider: #777;
    --profile-series-border: #ddd;
    --profile-tool-border: #000065;
    --profile-tool-bg: #f1f2f9;
    --profile-tool-bg-hover: #e8ebfb;
    --profile-tool-ink: #000065;
    --profile-field-border: #bdbdbd;
    --profile-field-bg: #fff;
    --profile-static-border: #d7d7d7;
    --profile-static-bg: #f7f7f7;
    --profile-static-ink: #555;
    --profile-slot-border: #a9a9a9;
    --profile-slot-bg: #fbfbfb;
    --profile-slot-over-border: #000065;
    --profile-slot-over-bg: #eef0ff;
    --profile-slot-empty: #999;
    --panel-radius: 5px;
    --card-radius: 5px;
    --card-gap: 12px;
    --profile-panel-bg: transparent;
    --profile-panel-border: rgba(102, 121, 155, 0.18);
    --profile-panel-shadow: none;
    --profile-text-main: #0f172a;
    --profile-text-subtle: rgba(51, 65, 85, 0.84);
    --profile-border-soft: rgba(100, 116, 139, 0.16);
    --profile-badge-bg: transparent;
    --profile-supporter-border: rgba(245, 158, 11, 0.12);
    --profile-supporter-bg: linear-gradient(180deg, rgba(255, 237, 179, 0.16), rgba(255, 255, 255, 0.72));
    --profile-icon-panel-bg: transparent;
    --profile-meta-bg: transparent;
    --profile-meta-dot: rgba(14, 165, 233, 0.92);
    max-width: 980px;
    margin: 0 auto;
    padding: 1rem 0 2rem;
    color: var(--profile-ink);
}

.profile-shell {
    display: grid;
    gap: 0.9rem;
}

.profile-head {
    padding: 0 0 0.9rem;
}

.profile-head-main {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.profile-head-copy,
.user-profile-card {
    min-width: 0;
    flex: 1 1 auto;
}

.profile-head-copy {
    display: grid;
    gap: 0.85rem;
}

.user-profile-card {
    padding: 1.2rem 1.25rem 1.15rem;
    border: 0;
    border-radius: var(--panel-radius);
    background: var(--profile-panel-bg);
    box-shadow: var(--profile-panel-shadow);
}

.profile-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    background: transparent;
}

.profile-identity {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    min-width: 0;
    flex: 1 1 auto;
    flex-wrap: wrap;
}

.profile-identity-main {
    min-width: 0;
    flex: 1 1 auto;
}

.profile-userid {
    margin: 0;
    max-width: 100%;
    color: var(--profile-text-main);
    font-size: 3rem;
    line-height: normal;
    font-weight: 900;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
}

.profile-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    flex: 0 0 auto;
    padding: 0.7rem 1rem;
    border: 0;
    border-radius: 5px;
    background: var(--profile-meta-bg);
    color: var(--profile-text-subtle);
    font-size: 1rem;
    line-height: 1.08;
    font-weight: 700;
    box-shadow: none;
    flex-wrap: wrap;
    row-gap: 0.55rem;
}

.profile-meta-info {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    min-width: 0;
}

.profile-meta-block {
    display: inline-flex;
    align-items: baseline;
    gap: 0.28rem;
    white-space: nowrap;
}

.profile-meta-value {
    color: var(--profile-text-main);
    font-weight: 900;
}

.profile-meta-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--profile-meta-dot);
}

.profile-meta-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    min-width: 0;
}

.profile-meta-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.7rem;
    border: 1px solid var(--profile-tool-border);
    border-radius: 5px;
    background: transparent;
    color: var(--profile-tool-ink);
    text-decoration: none;
    font-size: 0.84rem;
    line-height: 1.1;
    white-space: nowrap;
}

.profile-meta-action:hover,
.profile-meta-action:focus-visible {
    background: var(--profile-tool-bg-hover);
}

.profile-header-logout {
    flex: 0 0 auto;
    align-self: flex-start;
    color: var(--profile-muted);
    font-size: 0.94rem;
    line-height: 1.2;
    text-decoration: underline;
    text-underline-offset: 2px;
    white-space: nowrap;
}

.profile-header-logout:hover,
.profile-header-logout:focus-visible {
    color: var(--profile-text-main);
}

.profile-head-logout-row {
    display: flex;
    justify-content: flex-end;
}

.profile-about {
    margin: 0.8rem 0 0;
    max-width: 52rem;
    font-size: 1rem;
    line-height: 1.65;
    max-height: calc(1.65rem * 20);
    overflow-y: auto;
    scrollbar-gutter: stable;
    padding-right: 0.35rem;
    color: var(--profile-about);
}

.supporter-section,
.featured-section {
    margin-top: 0.9rem;
}

.supporter-card,
.supporter-mini-card,
.supporter-summary-card,
.featured-card {
    min-width: 0;
    border-radius: var(--card-radius);
}

.supporter-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.8rem 0.95rem;
    border: 1px solid var(--profile-supporter-border);
    background: var(--profile-supporter-bg);
}

.supporter-row,
.featured-row {
    display: flex;
    gap: var(--card-gap);
}

.featured-row {
    flex-wrap: wrap;
    justify-content: flex-start;
}

.supporter-icon-wrap,
.supporter-mini-icon-wrap,
.featured-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--profile-icon-panel-bg);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}

.supporter-icon-wrap {
    width: 80px;
    height: 80px;
    border-radius: 5px;
    flex: 0 0 auto;
}

.supporter-icon {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.supporter-title {
    color: var(--profile-text-main);
    font-size: 1.3rem;
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.035em;
}

.supporter-mini-card,
.supporter-summary-card {
    flex: 1 1 0;
    border: 1px solid var(--profile-supporter-border);
    background: var(--profile-supporter-bg);
}

.supporter-mini-card {
    padding: 0.8rem 0.8rem 0.95rem;
}

.supporter-mini-icon-wrap {
    height: 74px;
    border-radius: 5px;
}

.supporter-mini-icon {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

.supporter-mini-title {
    margin-top: 0.65rem;
    text-align: center;
}

.supporter-mini-year {
    color: var(--profile-text-main);
    font-size: 1.1rem;
    line-height: 1.06;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.supporter-mini-tier {
    margin-top: 0.35rem;
    color: var(--profile-text-subtle);
    font-size: 0.88rem;
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.supporter-summary-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.9rem;
    text-align: center;
}

.supporter-summary-range {
    color: var(--profile-text-main);
    font-size: 1.3rem;
    line-height: 1.06;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.supporter-summary-count {
    margin-top: 0.5rem;
    color: var(--profile-text-subtle);
    font-size: 0.98rem;
    line-height: 1.1;
    font-weight: 700;
    opacity: 0.82;
}

.featured-card {
    display: block;
    flex: 0 0 124px;
    width: 124px;
    padding: 0.5rem 0.35rem;
    border: 0;
    background: var(--profile-badge-bg);
    color: inherit;
    text-decoration: none;
}

.featured-card:hover,
.featured-card:focus-visible {
    background: transparent;
    transform: translateY(-1px);
}

.featured-icon-wrap {
    width: 100%;
    height: 96px;
    border-radius: 5px;
}

.featured-icon {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.featured-title {
    height: 36px;
    margin-top: 0.65rem;
    overflow: hidden;
    text-align: center;
    color: var(--profile-text-main);
    font-size: 0.94rem;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.profile-section {
    margin-top: 0.95rem;
    padding-top: 0.95rem;
    border-top: 1px solid var(--profile-border-soft);
}

.profile-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.7rem;
}

.profile-section-title {
    margin: 0;
    color: var(--profile-text-main);
    font-size: 0.98rem;
    line-height: 1.2;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.profile-section-link {
    color: var(--profile-tool-ink);
    font-size: 0.82rem;
    text-decoration: none;
}

.profile-section-link:hover,
.profile-section-link:focus-visible {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.profile-links-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.profile-link-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.65rem;
    border: 1px solid var(--profile-border-soft);
    border-radius: 5px;
    background: transparent;
    color: var(--profile-text-main);
    text-decoration: none;
    font-size: 0.88rem;
    line-height: 1.2;
}

.profile-link-chip-label {
    color: var(--profile-muted);
    font-weight: 700;
}

.profile-link-chip-value {
    font-weight: 800;
}

.profile-activity-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.profile-activity-column {
    min-width: 0;
    padding: 0.75rem 0.8rem;
    border: 0;
    border-radius: 5px;
    background: var(--profile-badge-bg);
}

.profile-activity-column-title {
    margin: 0;
    color: var(--profile-text-main);
    font-size: 0.9rem;
    line-height: 1.2;
    font-weight: 900;
}

.profile-activity-list {
    display: grid;
    gap: 0.6rem;
}

.profile-activity-item {
    min-width: 0;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--profile-border-soft);
}

.profile-activity-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.profile-activity-link {
    display: grid;
    gap: 0.22rem;
    color: inherit;
    text-decoration: none;
}

.profile-activity-link:hover .profile-topic-title,
.profile-activity-link:focus-visible .profile-topic-title {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.profile-topic-title {
    display: block;
    color: var(--profile-text-main);
    font-size: 0.93rem;
    line-height: 1.3;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-topic-meta,
.profile-comment-meta {
    color: var(--profile-muted);
    font-size: 0.78rem;
    line-height: 1.35;
}

.profile-comment-snippet {
    color: var(--profile-about);
    font-size: 0.88rem;
    line-height: 1.4;
    min-height: calc(0.88rem * 1.4 * 2);
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.badge-chip,
.badge-series-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: inherit;
    background: transparent;
    padding: 0;
    border-radius: 0;
}

.badge-icon {
    width: var(--profile-badge-icon-size, 32px);
    height: var(--profile-badge-icon-size, 32px);
    display: block;
}

.profile-owner-tools {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.35rem;
    padding-top: 0.1rem;
    flex: 0 0 auto;
}

.profile-owner-tool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--profile-tool-border);
    border-radius: 2px;
    background: var(--profile-tool-bg);
    color: var(--profile-tool-ink);
    text-decoration: none;
    font-size: 0.84em;
    line-height: 1.2;
    white-space: nowrap;
}

button.profile-owner-tool {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    font: inherit;
    font-size: 0.84em;
    line-height: 1.2;
    margin: 0;
    box-sizing: border-box;
}

.profile-owner-tool:hover,
.profile-owner-tool:focus-visible {
    background: var(--profile-tool-bg-hover);
}

.profile-grid {
    display: grid;
    grid-template-columns: 420px minmax(0, 1fr);
    gap: 1.75rem;
    align-items: start;
    padding-bottom: 0.8rem;
}

.profile-grid.is-actions-only {
    grid-template-columns: 1fr;
}

.info-grid {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    row-gap: 0.5rem;
    align-items: center;
}

.info-grid dt {
    font-size: 0.92em;
    color: var(--profile-muted);
}

.info-grid dd {
    margin: 0;
    min-width: 0;
}

.info-grid a {
    text-decoration: none;
    border-bottom: 1px dotted currentColor;
}

.actions {
    display: grid;
    gap: 0.8rem;
    align-content: start;
    justify-items: start;
    text-align: left;
}

.action-group {
    display: grid;
    gap: 0.32rem;
    justify-items: start;
}

.action-group + .action-group {
    padding-top: 0.55rem;
    border-top: 1px dotted var(--profile-dotted-border);
}

.action-link {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.action-line {
    line-height: 1.5;
}

.badge-lens {
    padding-top: 0.95rem;
}

.badge-list {
    display: grid;
    gap: 0.7rem;
}

.profile-badge-nudge {
    margin: 0;
    color: var(--profile-muted);
    font-size: 0.95em;
    line-height: 1.55;
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.profile-badge-nudge-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    object-fit: contain;
}

.profile-badge-nudge-copy {
    min-width: 0;
}

.profile-badge-nudge a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.profile-badge-footnote {
    margin: 1.35rem 0 0;
    color: var(--profile-muted);
    font-size: 0.92em;
    line-height: 1.6;
}

.profile-badge-footnote a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.badge-series-row {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 0.65rem;
    align-items: center;
    padding-top: 0.55rem;
    border-top: 1px dotted var(--profile-series-border);
}

.badge-series-row:first-child {
    border-top: 0;
    padding-top: 0;
}

.badge-series-title {
    color: var(--profile-muted);
    font-size: 0.92em;
}

.badge-series-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 0.35rem;
    align-items: center;
}

.badge-series-item {
    opacity: 0.28;
}

.badge-series-item.is-current,
.badge-series-item.is-owned {
    opacity: 1;
}

.owner-activity-panel {
    display: grid;
    gap: 0.75rem;
}

.owner-activity-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.owner-activity-title {
    margin: 0;
    font-size: 1em;
    font-weight: 700;
}

.owner-activity-list {
    display: grid;
    gap: 0.3rem;
    justify-items: start;
}

.owner-activity-sections {
    display: grid;
    gap: 0.95rem;
}

.owner-activity-section {
    padding-top: 0.85rem;
    border-top: 1px solid var(--profile-border-soft);
}

.owner-activity-section:first-child {
    padding-top: 0;
    border-top: 0;
}

.owner-activity-section-list {
    display: grid;
    gap: 0.38rem;
}

.owner-activity-item {
    min-width: 0;
}

.owner-activity-item-link {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.owner-activity-item-link:hover .owner-activity-item-title,
.owner-activity-item-link:focus-visible .owner-activity-item-title {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.owner-activity-item-title {
    min-width: 0;
    flex: 1 1 auto;
    color: var(--profile-text-main);
    font-size: 0.92rem;
    line-height: 1.35;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.owner-activity-item-meta {
    flex: 0 0 auto;
    color: var(--profile-muted);
    font-size: 0.78rem;
    line-height: 1.2;
    white-space: nowrap;
}

.owner-activity-empty {
    color: var(--profile-muted);
    font-size: 0.86rem;
    line-height: 1.45;
}

.profile-manage-card {
    margin-top: 0.95rem;
    padding: 1.05rem 1.15rem;
    border: 1px solid var(--profile-panel-border);
    border-radius: var(--panel-radius);
    background: transparent;
    box-shadow: none;
}

.profile-settings {
    display: grid;
    gap: 0.9rem;
}

.profile-edit-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
}

.profile-edit-header-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 0.55rem;
}

.profile-edit-title {
    font-size: 1.28em;
    font-weight: 700;
}

.profile-save-flash {
    padding: 0.43rem 0.7rem;
    border: 1px solid rgba(22, 163, 74, 0.28);
    border-radius: 999px;
    background: rgba(22, 163, 74, 0.12);
    color: #166534;
    font-size: 0.82rem;
    line-height: 1.2;
    white-space: nowrap;
    transition: opacity 0.28s ease, transform 0.28s ease;
}

.profile-save-flash.is-hidden {
    opacity: 0;
    transform: translateY(-2px);
}

.profile-edit-row {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 0.75rem 1.5rem;
    align-items: start;
}

.profile-edit-row.is-separated {
    margin-top: 0.95rem;
    padding-top: 0.95rem;
    border-top: 1px dotted var(--profile-divider);
}

.profile-edit-row.is-wide {
    grid-template-columns: 1fr;
}

.profile-edit-side {
    display: grid;
    gap: 0.16rem;
    padding-top: 0.15rem;
}

.profile-edit-side-title {
    font-size: 1em;
    font-weight: 700;
}

.profile-edit-side-note {
    color: var(--profile-muted);
    font-size: 0.84em;
    line-height: 1.4;
}

.profile-edit-main {
    min-width: 0;
}

.profile-settings form {
    margin: 0;
}

.profile-settings textarea,
.profile-settings input[type="text"],
.profile-settings input[type="email"],
.profile-settings input[type="password"] {
    border: 1px solid var(--profile-field-border);
    padding: 0.45rem 0.55rem;
    background: var(--profile-field-bg);
    border-radius: 2px;
    font: inherit;
    color: var(--profile-ink);
}

.profile-edit-main textarea {
    width: 100%;
    max-width: 778px;
    min-height: 200px;
}

.profile-edit-main input[type="text"],
.profile-edit-main input[type="email"],
.profile-edit-main input[type="password"] {
    width: min(100%, 30rem);
}

.profile-settings button:not(.featured-selected-badge):not(.featured-pool-item),
.profile-settings .button-link {
    border: 1px solid var(--profile-tool-border);
    min-width: auto;
    padding: 0.45rem 0.7rem;
    background: transparent;
    border-radius: 5px;
    color: var(--profile-tool-ink);
    text-decoration: none;
    cursor: pointer;
    font: inherit;
    font-size: 0.84rem;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
}

button.profile-meta-action {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: inherit;
    margin: 0;
}

.profile-settings button:not(.featured-selected-badge):not(.featured-pool-item):not(.profile-save-action):not(:disabled):hover,
.profile-settings button:not(.featured-selected-badge):not(.featured-pool-item):not(.profile-save-action):not(:disabled):focus-visible,
.profile-settings .button-link:hover,
.profile-settings .button-link:focus-visible {
    background: var(--profile-tool-bg-hover);
}

.profile-settings button.profile-save-action {
    background: rgba(100, 116, 139, 0.16);
    border-color: rgba(100, 116, 139, 0.42);
    color: rgba(71, 85, 105, 0.96);
    cursor: not-allowed;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.profile-settings button.profile-save-action:disabled,
.profile-settings button.profile-save-action.is-disabled {
    background: rgba(100, 116, 139, 0.16);
    border-color: rgba(100, 116, 139, 0.42);
    color: rgba(71, 85, 105, 0.96);
    cursor: not-allowed;
    opacity: 1;
}

.profile-settings button.profile-save-action.is-dirty {
    background: rgba(59, 130, 246, 0.14);
    border-color: rgba(59, 130, 246, 0.34);
    color: var(--profile-text-main);
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.08);
}

.profile-settings button.profile-save-action.is-dirty:hover,
.profile-settings button.profile-save-action.is-dirty:focus-visible {
    background: rgba(59, 130, 246, 0.2);
}

.profile-settings .profile-form-actions,
.profile-settings .button-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.55rem;
}

.featured-editor {
    display: grid;
    gap: 0.8rem;
}

.featured-selected {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.45rem;
    width: 100%;
}

.featured-slot {
    min-height: 10.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem;
    border: 1px dotted var(--profile-slot-border);
    background: var(--profile-slot-bg);
    border-radius: 5px;
}

.featured-slot.is-over {
    border-color: var(--profile-slot-over-border);
    background: var(--profile-slot-over-bg);
}

.featured-slot.is-empty {
    color: var(--profile-slot-empty);
    font-size: 0.86em;
}

.profile-settings .featured-selected-badge,
.profile-settings .featured-pool-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    min-width: auto;
    padding: 0;
    margin: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
    color: inherit;
    cursor: grab;
    line-height: 1.06;
}

.profile-settings .featured-selected-badge {
    width: 100%;
    min-height: 9.45rem;
    align-items: stretch;
}

.featured-selected-preview {
    display: grid;
    width: 100%;
    min-height: 100%;
    padding: 0.55rem;
    border: 1px solid var(--profile-border-soft);
    border-radius: 5px;
    background: transparent;
}

.featured-selected-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 88px;
    border-radius: 5px;
    background: transparent;
}

.featured-selected-preview .badge-icon {
    width: 80px;
    height: 80px;
}

.featured-selected-title {
    margin-top: 0.5rem;
    color: var(--profile-text-main);
    font-size: 0.84rem;
    line-height: 1.15;
    font-weight: 800;
    text-align: center;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.profile-settings .featured-selected-badge:hover,
.profile-settings .featured-pool-item:hover,
.profile-settings .featured-selected-badge:focus-visible,
.profile-settings .featured-pool-item:focus-visible {
    opacity: 0.8;
}

.featured-pool {
    display: grid;
    gap: 0.45rem;
}

.featured-pool-row {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 0.55rem;
    align-items: center;
}

.featured-pool-title {
    color: var(--profile-muted);
    font-size: 0.88em;
    line-height: 1.4;
    white-space: nowrap;
}

.featured-pool-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.18rem 0.32rem;
    align-items: center;
}

.featured-pool-item.is-selected {
    opacity: 0.25;
}

.profile-inline-form {
    display: grid;
    grid-template-columns: minmax(0, 14rem) minmax(0, 14rem) auto;
    align-items: center;
    gap: 0.55rem;
}

.profile-inline-form.is-single-action {
    grid-template-columns: auto;
    justify-content: start;
}

.profile-inline-fields {
    display: contents;
}

.profile-inline-field,
.profile-static-field {
    width: 100%;
    min-width: 0;
}

.profile-static-field {
    border: 1px solid var(--profile-static-border);
    padding: 0.45rem 0.55rem;
    background: var(--profile-static-bg);
    color: var(--profile-static-ink);
    border-radius: 2px;
    line-height: 1.35;
}

.profile-geekgold-balance {
    font-size: 1.05em;
    font-weight: 700;
    letter-spacing: 0.01em;
}

@media (prefers-color-scheme: dark) {
    .profile-save-flash {
        border-color: rgba(74, 222, 128, 0.26);
        background: rgba(22, 163, 74, 0.2);
        color: #dcfce7;
    }

    .profile-page article {
        --profile-ink: #e5e5e5;
        --profile-about: #d7d7d7;
        --profile-muted: #b1b1b1;
        --profile-dotted-border: #50545b;
        --profile-divider: #5b5f67;
        --profile-series-border: #494d55;
        --profile-tool-border: #7b84ff;
        --profile-tool-bg: #303540;
        --profile-tool-bg-hover: #3a4050;
        --profile-tool-ink: #dce0ff;
        --profile-field-border: #59606d;
        --profile-field-bg: #262a31;
        --profile-static-border: #4f5561;
        --profile-static-bg: #20242a;
        --profile-static-ink: #ced2da;
        --profile-slot-border: #5c6270;
        --profile-slot-bg: #242831;
        --profile-slot-over-border: #8a90ff;
        --profile-slot-over-bg: rgba(102, 102, 255, 0.18);
        --profile-slot-empty: #9ca3af;
        --profile-panel-bg: transparent;
        --profile-panel-border: rgba(148, 163, 184, 0.14);
        --profile-panel-shadow: none;
        --profile-text-main: #f8fafc;
        --profile-text-subtle: rgba(226, 232, 240, 0.88);
        --profile-border-soft: rgba(148, 163, 184, 0.14);
        --profile-badge-bg: transparent;
        --profile-supporter-border: rgba(250, 204, 21, 0.10);
        --profile-supporter-bg: linear-gradient(180deg, rgba(250, 204, 21, 0.06), rgba(250, 204, 21, 0.015)), transparent;
        --profile-icon-panel-bg: transparent;
        --profile-meta-bg: transparent;
        --profile-meta-dot: rgba(125, 211, 252, 0.9);
    }

    .featured-card:hover,
    .featured-card:focus-visible {
        background: transparent;
    }
}

.profile-inline-form .button-link,
.profile-inline-form button {
    justify-self: start;
}

.profile-inline-form .button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.profile-inline-fields input[type="email"],
.profile-inline-fields input[type="password"] {
    width: 100%;
    max-width: none;
}

@media (max-width: 820px) {
    .profile-head-main {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 0.65rem;
        margin-bottom: 0.45rem;
    }

    .profile-header {
        display: flex;
        justify-content: flex-start;
    }

    .profile-identity {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
        width: 100%;
        max-width: 100%;
        flex: 1 1 auto;
    }

    .profile-userid {
        font-size: clamp(2.6rem, 10vw, 4rem);
        text-align: left;
    }

    .profile-meta {
        width: fit-content;
        max-width: 100%;
        white-space: normal;
        justify-self: start;
        padding-left: 0;
    }

    .profile-meta-info {
        width: 100%;
        justify-content: flex-start;
    }

    .supporter-row,
    .featured-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-activity-grid {
        grid-template-columns: 1fr;
    }

    .profile-owner-tools {
        width: 100%;
        justify-content: start;
        gap: 0.45rem;
        padding-top: 0;
    }

    .profile-edit-header {
        display: grid;
        gap: 0.6rem;
    }

    .profile-edit-header-actions {
        justify-content: start;
    }

    .owner-activity-header {
        display: grid;
        gap: 0.6rem;
    }

    .profile-grid,
    .profile-grid.is-actions-only {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .badge-series-row {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }

    .profile-meta-actions {
        width: 100%;
        gap: 0.5rem;
        justify-content: flex-start;
    }

    .supporter-card {
        align-items: flex-start;
    }

    .supporter-icon-wrap {
        width: 72px;
        height: 72px;
    }

    .supporter-icon {
        width: 56px;
        height: 56px;
    }

    .supporter-title {
        font-size: 1.15rem;
    }

    .featured-icon-wrap {
        height: 88px;
    }

    .featured-icon {
        width: 72px;
        height: 72px;
    }

    .profile-edit-row {
        grid-template-columns: 1fr;
        gap: 0.45rem;
    }

    .featured-selected {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .featured-pool-row {
        grid-template-columns: 1fr;
    }

    .profile-inline-form,
    .profile-inline-fields {
        align-items: stretch;
    }

    .profile-inline-form {
        grid-template-columns: 1fr;
    }

    .profile-inline-field,
    .profile-static-field {
        width: 100%;
    }
}

@media (max-width: 560px) {
    .supporter-row {
        grid-template-columns: 1fr;
    }

    .featured-row {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 0.35rem;
    }

    .featured-card {
        width: auto;
        min-width: 0;
        padding: 0.2rem 0;
    }

    .featured-icon-wrap {
        height: 52px;
    }

    .featured-icon {
        width: 42px;
        height: 42px;
    }

    .featured-title {
        height: auto;
        min-height: 2.35em;
        margin-top: 0.35rem;
        font-size: 0.68rem;
        line-height: 1.15;
        letter-spacing: 0;
    }

    .featured-selected {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-meta {
        display: grid;
        width: auto;
        max-width: 100%;
        justify-items: start;
    }

    .profile-meta-info {
        display: inline-flex;
        align-items: center;
        gap: 0.65rem;
    }

    .profile-link-chip {
        width: 100%;
        justify-content: space-between;
    }
}
