.profile-edit-settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 20px; min-width: 0; }
.profile-edit-settings > .profile-edit-overview, .profile-edit-settings > .profile-bio-form { grid-column: 1 / -1; }
.profile-edit-settings > section { min-width: 0; }
.profile-edit-overview { display: flex; align-items: center; gap: 16px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(120deg, color-mix(in srgb,var(--accent) 14%,var(--panel)),var(--panel)); }
.profile-edit-overview > .social-avatar { width: 70px; height: 70px; flex: 0 0 70px; border-radius: 23px; font-size: 25px; }
.profile-edit-overview h3 { margin: 2px 0 4px; font-size: 20px; }
.profile-edit-overview > div > span:last-child { color: var(--muted); font-size: 12px; }
.profile-photo-editor, .profile-banner-settings, .profile-bio-form { padding: 21px; border: 1px solid var(--line); border-radius: 18px; background: color-mix(in srgb,var(--panel) 92%,transparent); }
.profile-photo-editor > .social-avatar { width: 88px; height: 88px; border-radius: 28px; font-size: 29px; margin: 12px 0 15px; }
.profile-photo-editor > p, .profile-banner-settings > p, .profile-bio-form > p { color: var(--muted); line-height: 1.7; font-size: 12px; }
.profile-photo-editor input[type="file"], .profile-banner-settings input[type="file"] { display: none; }
.profile-edit-settings .avatar-choices { display: flex; flex-wrap: wrap; gap: 9px; margin: 12px 0; }
.profile-edit-settings .avatar-choice { min-width: 42px; min-height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-deep,var(--bg)); color: var(--text); font-size: 18px; }
.profile-edit-settings .avatar-choice[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow); }
.profile-edit-settings .button.secondary { margin-top: 6px; }
.profile-edit-settings .muted[role="status"] { font-size: 11px; margin-top: 9px; }
.profile-edit-settings .banner-choices { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; }
.profile-edit-settings .banner-choice { min-height: 84px; border-radius: 14px; color: var(--text); border-color: var(--line); position: relative; overflow: hidden; }
.profile-edit-settings .banner-choice[aria-pressed="true"] { outline: 2px solid var(--accent); outline-offset: 2px; }
.profile-edit-settings .profile-preview-link { margin-left: 9px; }
.profile-bio-form label { display: grid; gap: 10px; font-size: 13px; font-weight: 650; }
.profile-bio-form textarea { min-height: 120px; resize: vertical; }
.profile-bio-form .profile-bio-count { display: block; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 10px; }
.profile-crop-dialog { width: min(740px,calc(100% - 28px)); max-width: none; max-height: min(92dvh,900px); padding: 0; overflow: auto; border: 1px solid var(--accent-border,var(--line)); border-radius: 24px; color: var(--text); background: var(--panel); box-shadow: 0 30px 110px #000b; }
.profile-crop-dialog::backdrop { background: #02040bd9; backdrop-filter: blur(13px); }
.profile-crop-panel { display: grid; gap: 16px; padding: clamp(20px,4vw,34px); }
.profile-crop-panel header h2 { font-size: 24px; margin: 5px 0; }
.profile-crop-panel header p { font-size: 12px; }
.profile-crop-canvas { display: block; width: min(100%,420px); aspect-ratio: 1; justify-self: center; border-radius: 50%; background: #05060b; cursor: grab; touch-action: none; border: 1px solid var(--line); }
.profile-crop-canvas:active { cursor: grabbing; }
.profile-crop-canvas.is-banner { width: 100%; aspect-ratio: 3 / 1; border-radius: 14px; }
.profile-crop-zoom { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; font-size: 12px; }
.profile-crop-zoom input { width: 100%; accent-color: var(--accent); }
.profile-crop-panel [role="status"] { min-height: 18px; font-size: 11px; }
.profile-crop-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.public-profile-bio { position: relative; z-index: 1; width: min(620px,100%); margin: 16px 0 0 110px; color: color-mix(in srgb,var(--text) 88%,transparent); font-size: 14px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
@media(max-width:900px) { .profile-edit-settings { grid-template-columns: minmax(0,1fr); } .profile-edit-settings > .profile-edit-overview, .profile-edit-settings > .profile-bio-form { grid-column: 1; } }
@media(max-width:700px) { .profile-edit-overview { padding: 16px; } .profile-edit-overview > .social-avatar { width: 58px; height: 58px; flex-basis: 58px; } .profile-edit-settings .banner-choices { grid-template-columns: repeat(2,minmax(0,1fr)); } .profile-edit-settings .profile-preview-link { margin: 10px 0 0; } .public-profile-bio { margin: 16px 0 0; font-size: 13px; } }
@media(prefers-reduced-motion:reduce) { .profile-crop-dialog, .profile-crop-dialog * { animation: none !important; transition: none !important; } }

/* Keep public profile content in one readable column within the banner. */
.public-profile-content { position: relative; z-index: 1; display: grid; gap: 18px; width: 100%; min-width: 0; }
.public-profile-identity { align-items: center; gap: 22px; }
.public-profile-identity > .social-avatar { flex: 0 0 110px; }
.public-profile-identity > div { min-width: 0; flex: 1 1 auto; padding: 0; }
.public-profile-identity h1 { margin: 0; line-height: 1.08; overflow-wrap: anywhere; }
.public-profile-identity > div > span { overflow-wrap: anywhere; }
.public-profile-identity > .button { flex: 0 0 auto; margin: 0; }
.public-profile-bio { width: min(620px,calc(100% - 132px)); margin: 0 0 0 132px; }
.profile-section-grid { grid-template-columns: minmax(0,1.15fr) minmax(300px,.85fr); align-items: start; }
.profile-history, .profile-comment-history { overflow: hidden; }
.profile-watch-card { min-width: 0; }
.profile-watch-card progress { display: block; width: 100%; height: 4px; margin-top: 7px; border: 0; border-radius: 99px; overflow: hidden; accent-color: var(--accent); }
.profile-comment-card { width: 100%; min-width: 0; }
.profile-comment-card p { overflow-wrap: anywhere; }
@media (max-width: 960px) {
  .public-profile-page { padding: 28px 24px 52px; }
  .public-profile-hero { min-height: 260px; padding: 26px; border-radius: 24px; }
  .profile-section-grid { grid-template-columns: minmax(0,1fr); gap: 18px; margin-top: 20px; }
}
@media (max-width: 700px) {
  .public-profile-page { padding: 18px 14px 38px; }
  .public-profile-hero { min-height: 0; padding: 20px 17px; border-radius: 20px; }
  .public-profile-content { gap: 14px; }
  .public-profile-identity { display: grid; grid-template-columns: 68px minmax(0,1fr); gap: 12px; align-items: center; }
  .public-profile-identity > .social-avatar { width: 68px; height: 68px; flex-basis: 68px; border-radius: 21px; font-size: 22px; }
  .public-profile-identity h1 { font-size: clamp(23px,7vw,30px); }
  .public-profile-identity .eyebrow { margin-bottom: 5px; }
  .public-profile-identity > div > span { margin-top: 3px; font-size: 12px; }
  .public-profile-identity > .button { grid-column: 1 / -1; justify-self: start; min-height: 42px; }
  .public-profile-bio { width: 100%; margin: 0; font-size: 13px; line-height: 1.7; }
  .profile-history, .profile-comment-history { padding: 17px; border-radius: 17px; }
  .profile-watch-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
  .profile-watch-card strong { font-size: 10px; }
  .profile-watch-card small { font-size: 9px; }
}
@media (max-width: 360px) {
  .public-profile-page { padding-inline: 10px; }
  .public-profile-hero { padding: 17px 14px; }
  .profile-history, .profile-comment-history { padding: 14px; }
  .profile-watch-grid { gap: 8px; }
}
