.profile-page { width: 100%; }
.profile-card { overflow: hidden; border: 1px solid var(--border); border-radius: 1.35rem; background: var(--surface); color: var(--text); box-shadow: 0 16px 38px var(--shadow); }
/* Normal covers follow their own aspect ratio at the full card width. */
.profile-cover, .settings-cover-preview { position: relative; isolation: isolate; display: block; width: 100%; max-width: none; min-width: 0; height: auto; overflow: hidden; background: var(--profile-cover); }
.profile-cover:not(.has-cover), .settings-cover-preview:not(.has-cover) { height: clamp(120px, 18vw, 190px); }
[data-profile-cover] > img:not(.profile-cover-backdrop) { position: relative; z-index: 1; display: block; width: 100%; max-width: none; height: auto; object-fit: contain; object-position: center; }
/* Only unusually tall images get a height limit; their full image stays visible. */
[data-profile-cover].is-tall > img:not(.profile-cover-backdrop) { max-height: clamp(280px, 65svh, 640px); }
[data-profile-cover] > img.profile-cover-backdrop { position: absolute; z-index: 0; inset: 0; display: none; width: 100%; max-width: none; height: 100%; object-fit: cover; object-position: center; filter: blur(24px) brightness(.65); transform: scale(1.08); pointer-events: none; }
[data-profile-cover].is-tall > .profile-cover-backdrop { display: block; }
.profile-summary { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.25rem; padding: 1.5rem 2.5rem; }
.profile-identity { display: flex; align-items: flex-start; gap: 2rem; min-width: 0; }
.profile-avatar { display: grid; place-items: center; flex: 0 0 148px; width: 148px; height: 148px; overflow: hidden; border: 2px solid var(--border); border-radius: 50%; background: var(--profile-avatar-background); color: var(--accent); box-shadow: 0 10px 30px var(--shadow); font-size: 3rem; font-weight: 850; }
.profile-avatar img, .settings-avatar-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.profile-heading { min-width: 0; padding-top: .15rem; }
.profile-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.profile-heading h1 { margin: 0; color: var(--text); font-size: clamp(1.1rem, 1.6vw, 1.35rem); line-height: 1.2; overflow-wrap: anywhere; }
.profile-username { margin: .15rem 0 0; color: var(--text-muted); font-size: .9rem; font-weight: 650; line-height: 1.35; }
.profile-role-badge { max-width: 70%; overflow: hidden; padding: .26rem .52rem; border-radius: .42rem; background: var(--accent-soft); color: var(--accent); font-size: .68rem; font-weight: 700; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.profile-description { max-width: 40rem; margin: .3rem 0 .75rem; color: var(--text); font-size: .9rem; line-height: 1.45; white-space: pre-line; }
.profile-description.is-empty { color: var(--text-muted); font-style: italic; }
.profile-meta { display: flex; flex-wrap: wrap; gap: .8rem 1.5rem; color: var(--text-muted); }
.profile-meta-item { display: flex; align-items: center; gap: .65rem; }
.profile-meta-item + .profile-meta-item { padding-left: 1.5rem; border-left: 1px solid var(--border); }
.profile-meta-item > span { display: grid; gap: .05rem; line-height: 1.2; }
.profile-meta-item svg { flex: 0 0 25px; width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.profile-meta-item strong { color: var(--text); font-size: .9rem; font-variant-numeric: tabular-nums; }
.profile-meta-item small { color: var(--text-muted); font-size: .72rem; }
.profile-meta-regular { margin-top: 1rem; }
.profile-settings { min-height: 48px; display: inline-flex; align-items: center; gap: .55rem; flex: 0 0 auto; margin-top: .15rem; padding: .65rem 1rem; border: 1px solid var(--border); border-radius: .9rem; font-weight: 650; }
.profile-settings:hover { border-color: var(--accent); color: var(--accent); background: var(--surface-hover); }
.profile-subscription-form { flex: 0 0 auto; margin: .15rem 0 0; }
.profile-subscription { min-height: 48px; white-space: nowrap; }
.profile-tabs { display: flex; gap: .25rem; min-width: 0; overflow-x: auto; padding: 0 1.25rem; border-top: 1px solid var(--border); scrollbar-width: thin; }
.profile-tabs a { position: relative; flex: 0 0 auto; padding: 1rem .9rem .9rem; color: var(--text-muted); font-size: .88rem; font-weight: 650; }
.profile-tabs a:hover, .profile-tabs a.is-active { color: var(--text); }
.profile-tabs a.is-active::after { position: absolute; right: .7rem; bottom: 0; left: .7rem; height: 3px; content: ''; border-radius: 3px 3px 0 0; background: var(--accent); }
.profile-tabs span { display: inline-grid; min-width: 1.65rem; min-height: 1.35rem; place-items: center; margin-left: .28rem; padding: 0 .4rem; border-radius: 999px; background: var(--accent-soft); color: var(--text-muted); font-size: .72rem; }
.profile-overview, .profile-predictions { margin-top: 1.25rem; padding: clamp(1.35rem, 3vw, 2.25rem); border: 1px solid var(--border); border-radius: 1.35rem; background: var(--surface); box-shadow: 0 10px 30px var(--shadow); }
.profile-overview { padding: 1rem 1.15rem 1.15rem; }
.profile-overview-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.profile-overview-heading h2 { margin: 0; font-size: 1.08rem; }
.profile-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.profile-section-heading h2 { margin: .3rem 0 0; font-size: clamp(1.45rem, 2.5vw, 1.9rem); }
.profile-predictions-total { flex: 0 0 auto; color: var(--accent); font-size: .82rem; font-weight: 700; }
.profile-stats-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .45rem; margin: .8rem 0 0; }
.profile-stat { display: grid; min-width: 0; min-height: 70px; align-content: center; padding: .65rem .72rem; border: 1px solid var(--border); border-radius: .7rem; background: var(--stat-background); }
.profile-stat dt { color: var(--text-muted); font-size: .68rem; font-weight: 700; line-height: 1.25; }
.profile-stat dd { margin: .2rem 0 0; overflow-wrap: anywhere; color: var(--text); font-size: .9rem; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.profile-profit { margin-top: 1.4rem; padding-top: 1.4rem; border-top: 1px solid var(--border); container-type: inline-size; }
.profile-profit [hidden] { display: none !important; }
.profile-profit-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.profile-profit-heading h3 { margin: 0; font-size: 1.05rem; }
.profile-profit-heading p { margin: .35rem 0 0; color: var(--text-muted); font-size: .75rem; }
.profile-profit-periods { display: flex; gap: .2rem; padding: .25rem; border: 1px solid var(--border); border-radius: .7rem; background: var(--surface-hover); }
.profile-profit-periods button { min-height: 36px; padding: .4rem .7rem; border: 0; border-radius: .45rem; background: transparent; color: var(--text-muted); font: inherit; font-size: .75rem; font-weight: 650; cursor: pointer; white-space: nowrap; }
.profile-profit-periods button:hover { color: var(--text); background: var(--surface-hover); }
.profile-profit-periods button[aria-pressed='true'] { background: var(--accent-soft); color: var(--accent); }
.profile-profit-periods button:focus-visible, .profile-profit-plot svg:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.profile-profit-metrics { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 1rem; margin: 1.5rem 0 .65rem; }
.profile-profit-metrics dt { color: var(--text-muted); font-size: .7rem; line-height: 1.4; }
.profile-profit-metrics dd { margin: .3rem 0 0; font-size: 1.1rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.profile-profit-metrics > div:first-child dd { font-size: 1.4rem; }
.profile-profit .is-positive { color: var(--accent); }
.profile-profit .is-negative { color: var(--danger); }
.profile-profit-plot { width: 100%; min-width: 0; }
.profile-profit-plot svg { display: block; width: 100%; overflow: visible; cursor: crosshair; border-radius: .35rem; }
.profile-profit-axis { fill: var(--text-muted); font-family: inherit; font-size: 10px; font-variant-numeric: tabular-nums; }
.profile-profit-grid { stroke: var(--border); stroke-width: 1; stroke-dasharray: 3 5; }
.profile-profit-zero { stroke: var(--text-muted); stroke-width: 1; opacity: .65; }
.profile-profit-gain { color: var(--accent); }
.profile-profit-loss { color: var(--danger); }
.profile-profit-area { fill: currentColor; opacity: .09; }
.profile-profit-line { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.profile-profit-flat { color: var(--text-muted); }
.profile-profit-guide { stroke: var(--text-muted); stroke-dasharray: 3 4; opacity: .55; }
.profile-profit-marker { fill: var(--surface); stroke: currentColor; stroke-width: 2.5; color: var(--text-muted); }
.profile-profit-detail { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 76px; margin-top: .5rem; padding: .85rem 1rem; border: 1px solid var(--border); border-radius: .75rem; background: var(--stat-background); }
.profile-profit-detail > div { display: grid; gap: .35rem; min-width: 0; }
.profile-profit-detail > div:last-child { flex-shrink: 0; text-align: right; }
.profile-profit-detail span { color: var(--text-muted); font-size: .7rem; }
.profile-profit-detail strong { font-size: .8rem; line-height: 1.4; overflow-wrap: anywhere; }
.profile-profit-detail [data-profit-event] { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.profile-profit-help, .profile-profit-note { margin: .75rem 0 0; color: var(--text-muted); font-size: .68rem; line-height: 1.6; }
.profile-profit-note { max-width: 58rem; }
.profile-profit-empty { display: grid; place-items: center; min-height: 220px; margin: .8rem 0; padding: 1.5rem; border: 1px dashed var(--border); border-radius: .8rem; color: var(--text-muted); font-size: .85rem; text-align: center; }
@media (max-width: 600px) {
  .profile-profit-periods { width: 100%; }
  .profile-profit-periods button { flex: 1; padding-inline: .35rem; }
  .profile-profit-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem .7rem; }
  .profile-profit-detail { align-items: flex-start; flex-direction: column; gap: .65rem; }
  .profile-profit-detail > div:last-child { text-align: left; }
}
@container (max-width: 340px) {
  .profile-profit-periods { flex-wrap: wrap; }
  .profile-profit-periods button { flex: 1 0 45%; }
  .profile-profit-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-profit-metrics dd, .profile-profit-metrics > div:first-child dd { font-size: 1rem; }
  .profile-profit-detail { align-items: flex-start; flex-direction: column; }
  .profile-profit-detail > div:last-child { flex-shrink: 1; text-align: left; }
}
.profile-predictions { display: grid; gap: 1.6rem; }
.profile-prediction-actions { display: flex; flex-wrap: wrap; gap: .75rem; padding-top: 1rem; }
@media (max-width: 600px) { .profile-prediction-actions .button { width: 100%; } }
.profile-prediction-group { display: grid; gap: .8rem; }
.profile-prediction-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.profile-prediction-heading h3 { display: flex; align-items: center; gap: .5rem; margin: 0; font-size: 1.05rem; }
.profile-prediction-heading > span { color: var(--text-muted); font-size: .78rem; font-variant-numeric: tabular-nums; }
.profile-status-dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--text-muted); }
.profile-status-dot-pending { background: #d99820; }
.profile-status-dot-won { background: var(--accent); }
.profile-status-dot-lost { background: #cc5260; }
.profile-predictions-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.profile-predictions-empty { display: flex; align-items: center; justify-content: center; gap: .65rem; min-height: 76px; padding: 1rem; border: 1px solid var(--border); border-radius: .9rem; background: var(--surface-hover); color: var(--text-muted); }
.profile-predictions-empty span { color: var(--accent); font-size: 1.3rem; }
.profile-predictions-empty p { margin: 0; font-size: .8rem; }
.profile-connections-panel { margin-top: 1.25rem; padding: clamp(1.35rem, 3vw, 2.25rem); border: 1px solid var(--border); border-radius: 1.35rem; background: var(--surface); box-shadow: 0 10px 30px var(--shadow); }
.profile-connections-heading h2 { margin: .35rem 0 0; font-size: clamp(1.45rem, 2.5vw, 1.9rem); }
.profile-connections-list { margin: 1.35rem 0 0; padding: 0; overflow: hidden; border: 1px solid var(--border); border-radius: .9rem; list-style: none; }
.profile-connection-row + .profile-connection-row { border-top: 1px solid var(--border); }
.profile-connection-row a { display: flex; align-items: center; gap: .8rem; min-height: 4.75rem; padding: .8rem 1rem; }
.profile-connection-row a:hover { background: var(--surface-hover); }
.profile-connection-avatar { display: grid; width: 3rem; height: 3rem; place-items: center; overflow: hidden; border-radius: 50%; background: linear-gradient(145deg, var(--accent), #133b36); color: var(--on-accent); font-weight: 800; }
.profile-connection-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.profile-connection-identity { display: grid; min-width: 0; line-height: 1.35; }
.profile-connection-identity strong, .profile-connection-identity small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-connection-identity small { color: var(--text-muted); }
.profile-connections-empty { padding: 1.5rem; color: var(--text-muted); text-align: center; }
.profile-referrals-panel { margin-top: 1.25rem; padding: clamp(1.35rem, 3vw, 2.25rem); border: 1px solid var(--border); border-radius: 1.35rem; background: var(--surface); box-shadow: 0 10px 30px var(--shadow); }
.profile-referrals-heading h2 { margin: .35rem 0 0; font-size: clamp(1.45rem, 2.5vw, 1.9rem); }
.profile-referrals-description { max-width: 48rem; margin: 1rem 0 0; color: var(--text); line-height: 1.55; }
.profile-referral-income { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-top: 1.35rem; padding: 1rem 1.2rem; border: 1px solid var(--border); border-radius: 1rem; background: var(--surface-hover); }
.profile-referral-income > div { display: grid; gap: .35rem; }
.profile-referral-income span { color: var(--text-muted); font-size: .875rem; }
.profile-referral-income strong { color: var(--accent); font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.profile-referrals-heading .text-muted { max-width: 48rem; margin: .4rem 0 0; line-height: 1.55; }
.profile-referral-share { display: grid; gap: .55rem; margin-top: 1.35rem; }
.profile-referral-share > label { display: block; margin-bottom: .55rem; font-size: .9rem; font-weight: 700; }
.profile-referral-copy + label { margin-top: .75rem; }
.profile-referral-copy { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .65rem; }
.profile-referral-copy input { min-width: 0; min-height: 48px; padding: .7rem .85rem; border: 1px solid color-mix(in srgb, var(--text-muted) 42%, var(--border)); border-radius: .65rem; background: var(--stat-background); color: var(--text); box-shadow: inset 0 1px 0 var(--header-highlight), inset 0 0 0 1px color-mix(in srgb, var(--text-muted) 7%, transparent); font: inherit; cursor: text; }
.profile-referral-copy input:hover { border-color: color-mix(in srgb, var(--text-muted) 42%, var(--border)); background: var(--stat-background); color: var(--text); }
.profile-referral-copy input:focus { border-color: color-mix(in srgb, var(--text-muted) 42%, var(--border)); background: var(--stat-background); color: var(--text); outline: 2px solid var(--accent-soft); outline-offset: 2px; }
.copy-value-field::selection { background: #c9ddd5; color: #102019; }
.profile-referral-copy .button { min-height: 48px; }
.profile-referral-status { min-height: 1.25rem; margin: .1rem 0 0; color: var(--accent); font-size: .8rem; }
.profile-referrals-list-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; }
.profile-referrals-list-heading h3 { margin: 0; font-size: 1.05rem; }
.profile-referrals-total { color: var(--text-muted); font-size: .78rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.profile-referrals-panel .profile-connection-row a { position: relative; overflow: hidden; isolation: isolate; }
.profile-referrals-panel .profile-connection-row a::before { position: absolute; z-index: 2; top: -55%; left: -48%; width: 34%; height: 210%; content: ''; pointer-events: none; opacity: 0; background: linear-gradient(90deg, transparent, rgba(145, 154, 158, .1), rgba(215, 220, 222, .48), rgba(145, 154, 158, .1), transparent); filter: blur(.8px); transform: skewX(-20deg) translateX(0); }
.profile-referrals-panel .profile-connection-row a:hover::before { animation: profile-referral-sheen .86s ease-out; }
@keyframes profile-referral-sheen { 0% { opacity: 0; transform: skewX(-20deg) translateX(0); } 20% { opacity: .65; } 100% { opacity: 0; transform: skewX(-20deg) translateX(440%); } }
.profile-settings-panel { padding: clamp(1.35rem, 3vw, 2.25rem); border: 1px solid var(--border); border-radius: 1.35rem; background: var(--surface); box-shadow: 0 10px 30px var(--shadow); }
.settings-heading h2 { margin: .45rem 0 0; font-size: clamp(1.7rem, 3vw, 2.2rem); }
.profile-settings-form { display: grid; gap: 0; max-width: 920px; margin-top: clamp(1.6rem, 3vw, 2.25rem); }
.settings-form-error { margin: 0; padding: .75rem .9rem; border: 1px solid var(--danger); border-radius: .65rem; background: var(--danger-soft); color: var(--danger); font-size: .875rem; }
.settings-cover-field { display: grid; gap: .55rem; margin-bottom: 1.5rem; }
.settings-editor-label { font-size: 1rem; font-weight: 700; }
.settings-cover-frame { position: relative; width: 100%; min-width: 0; height: auto; }
.settings-cover-preview { border: 1px solid var(--border); border-radius: 1rem; }
.settings-cover-frame .settings-avatar-actions { right: .75rem; bottom: .75rem; }
.settings-profile-row { display: grid; grid-template-columns: 118px minmax(0, 1fr); align-items: start; gap: 1.35rem; }
.settings-avatar-field { position: relative; align-self: start; }
.settings-avatar-frame { position: relative; width: 108px; height: 108px; padding: 5px; border: 1px solid var(--border); border-radius: 1.35rem; background: var(--surface-hover); }
.settings-avatar-preview { display: grid; place-items: center; width: 100%; height: 100%; overflow: hidden; border-radius: 1rem; background: var(--accent-soft); color: var(--accent); font-size: 2rem; font-weight: 800; }
.settings-avatar-actions { position: absolute; right: -10px; bottom: -10px; display: flex; gap: .35rem; }
.settings-avatar-action { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid var(--border); border-radius: .55rem; background: var(--surface); color: var(--text-muted); cursor: pointer; box-shadow: 0 4px 12px var(--shadow); }
.settings-avatar-action:hover { border-color: var(--accent); color: var(--accent); }
.settings-avatar-action svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.settings-avatar-delete:hover { border-color: var(--danger); color: var(--danger); }
.settings-avatar-errors { position: absolute; top: calc(100% + .4rem); width: 15rem; }
.settings-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.settings-field { display: grid; align-content: start; gap: .4rem; font-size: .875rem; }
.settings-field > span { font-size: 1rem; font-weight: 700; }
.settings-field input, .settings-field textarea { min-width: 0; min-height: 48px; padding: .7rem .85rem; border: 1px solid var(--border); border-radius: .65rem; background: var(--surface-hover); color: var(--text); font: inherit; }
.settings-field textarea { min-height: 120px; line-height: 1.5; resize: vertical; }
.settings-field input:focus, .settings-field textarea:focus { border-color: var(--accent); }
.settings-field input[aria-invalid='true'], .settings-field textarea[aria-invalid='true'] { border-color: var(--danger); }
.settings-description { grid-column: 1 / -1; }
.settings-errors { margin: 0; padding-left: 1.1rem; color: var(--danger); font-size: .8rem; }
.settings-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.settings-submit { min-height: 52px; padding-inline: 1.35rem; }
.settings-cancel { min-height: 52px; padding-inline: 1.35rem; }
@media (max-width: 1050px) { .profile-predictions-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .profile-summary { align-items: flex-start; flex-direction: column; padding: 1.5rem; } .profile-settings, .profile-subscription-form, .profile-subscription { align-self: stretch; justify-content: center; } .profile-subscription-form .profile-subscription { width: 100%; } .profile-stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .settings-profile-row { grid-template-columns: 1fr; } .settings-fields { grid-template-columns: 1fr; } .settings-avatar-errors { position: static; width: auto; } }
@media (max-width: 600px) { .profile-card { border-radius: 1rem; } .profile-summary { padding-inline: 1.1rem; } .profile-identity { align-items: flex-start; flex-direction: column; gap: 1rem; } .profile-avatar { flex-basis: 104px; width: 104px; height: 104px; border-radius: 50%; } .profile-meta-item + .profile-meta-item { padding-left: 0; border-left: 0; } .profile-overview-heading, .profile-section-heading { align-items: flex-start; flex-direction: column; } .profile-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .profile-predictions-grid { grid-template-columns: 1fr; } .settings-submit, .settings-cancel { width: 100%; } }
@media (max-width: 600px) { .profile-referral-copy { grid-template-columns: 1fr; } .profile-referral-copy .button { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .profile-referrals-panel .profile-connection-row a::before { display: none; animation: none !important; } }

.profile-checkin-admin { display: flex; flex-wrap: wrap; padding: 0 1rem 1rem; }
.profile-checkin-admin .button { white-space: normal; text-align: center; }

/* Keep the viewport stable when a shorter profile section replaces a long one. */
.profile-page[data-profile-page] { overflow-anchor: none; }
.profile-navigation-notice { position: fixed; z-index: 1000; bottom: 1rem; left: 50%; transform: translateX(-50%); width: min(90vw, 36rem); padding: 1rem; border: 1px solid var(--border); border-radius: .75rem; background: var(--surface); color: var(--text); box-shadow: 0 8px 30px var(--shadow); }
.profile-navigation-notice[hidden] { display: none; }
.profile-navigation-notice button { margin-left: .75rem; }

@media (max-width: 767px) {
  .profile-identity { width: 100%; gap: 16px; }
  .profile-avatar { width: 88px; height: 88px; flex-basis: 88px; }
  .profile-nav { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: thin; }
  .profile-nav a { flex: 0 0 auto; min-height: 44px; }
  .profile-stats-grid, .profile-profit-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-profit-periods { flex-wrap: wrap; }
  .profile-profit-periods button { min-height: 44px; flex: 1; }
  .profile-prediction-heading { flex-wrap: wrap; gap: 8px; }
  .settings-form :is(input, select, textarea) { min-width: 0; max-width: 100%; }
}
