/* Community covers share the site's warm surfaces in both colour themes. */
.profile-cover {
  --cover-reveal:220px; --cover-art-height:420px; --cover-fade:100px;
  position:relative; isolation:isolate; min-width:0; overflow:hidden;
  border:1px solid var(--fl-border); border-radius:var(--fl-radius) var(--fl-radius) 36px var(--fl-radius);
  background:var(--fl-editorial); color:var(--fl-ivory);
}
.profile-cover.dashboard-masthead,.profile-cover.profile-publication-header { display:block; padding:var(--cover-reveal) 0 0; }
.profile-cover-art {
  position:absolute; z-index:-1; inset:0 0 auto; height:var(--cover-art-height); overflow:hidden;
  background:var(--fl-editorial);
}
/* Empty covers use the theme's warm palette; uploaded photos keep their own
   colour and crop. Surface mixes also soften the treatment in light mode. */
.profile-cover:not(:has(.profile-cover-art img)) {
  --cover-reveal:clamp(136px,17vw,190px);
  --cover-fade:clamp(84px,9vw,110px);
}
.profile-cover-art:not(:has(img)) {
  background:
    radial-gradient(ellipse 85% 80% at 50% 28%,transparent 32%,color-mix(in srgb,var(--fl-bg-deep) 36%,transparent) 100%),
    radial-gradient(ellipse 58% 65% at 82% -8%,color-mix(in srgb,var(--fl-champagne) 18%,transparent),color-mix(in srgb,var(--fl-blush) 6%,transparent) 48%,transparent 78%),
    radial-gradient(ellipse 52% 75% at 12% 18%,color-mix(in srgb,var(--fl-rose) 24%,transparent),color-mix(in srgb,var(--fl-rose) 8%,transparent) 45%,transparent 80%),
    radial-gradient(ellipse 62% 80% at 68% 40%,color-mix(in srgb,var(--fl-mauve) 19%,transparent),transparent 75%),
    radial-gradient(ellipse 80% 65% at 40% -28%,color-mix(in srgb,var(--fl-blush) 15%,transparent),transparent 85%),
    linear-gradient(125deg,color-mix(in srgb,var(--fl-merlot) 60%,var(--fl-editorial)),color-mix(in srgb,var(--fl-mauve) 12%,var(--fl-editorial)) 62%,var(--fl-editorial));
}
.profile-cover-art::after {
  content:''; position:absolute; inset:0;
  background:linear-gradient(180deg,
    transparent calc(var(--cover-reveal) - var(--cover-fade)),
    color-mix(in srgb,var(--fl-editorial) 20%,transparent) calc(var(--cover-reveal) - var(--cover-fade) * .6),
    color-mix(in srgb,var(--fl-editorial) 65%,transparent) calc(var(--cover-reveal) - var(--cover-fade) * .2),
    color-mix(in srgb,var(--fl-editorial) 94%,transparent) calc(var(--cover-reveal) + 12px),
    var(--fl-editorial) calc(var(--cover-reveal) + 120px));
}
.profile-cover-art img { display:block; width:100%; height:100%; object-fit:cover; object-position:var(--cover-x,50%) var(--cover-y,50%); transform:scale(var(--cover-scale,1)); transform-origin:var(--cover-x,50%) var(--cover-y,50%); }
.profile-cover-monogram { position:absolute; top:28px; left:28px; font:italic 500 24px/1 var(--fl-serif); color:var(--fl-secondary); opacity:.34; pointer-events:none; }
.profile-cover-art:has(img) .profile-cover-monogram { display:none; }
.profile-cover-content { position:relative; min-width:0; padding:28px; }
.profile-cover .profile-cover-content :is(h1,p,strong,a,span) { overflow-wrap:anywhere; }
.profile-cover .profile-cover-content p,.profile-cover .dashboard-masthead-meta span { color:var(--fl-text); }
.profile-cover-edit {
  position:relative; display:flex; align-items:center; gap:8px; width:fit-content;
  max-width:calc(100% - 56px); min-height:44px; margin:0 28px 0 auto; padding:0;
  border:0; border-radius:4px; background:none; box-shadow:none;
  color:var(--fl-text); font-size:12px; font-weight:600; text-decoration:none;
}
.profile-cover-edit:hover { color:var(--fl-ivory); text-decoration:underline; text-underline-offset:3px; }
.profile-cover-edit + .profile-cover-content { padding-top:8px; }
.profile-cover :is(a,button):focus-visible,.profile-banner-editor :is(a,button,input):focus-visible { outline:2px solid var(--fl-ivory); outline-offset:3px; }
.dashboard-cover-content { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,.8fr); align-items:center; gap:28px; }
.profile-cover .dashboard-masthead-account { min-width:0; grid-template-columns:80px minmax(0,1fr); gap:16px; }
.profile-cover .dashboard-avatar-edit { width:80px; height:80px; }
.profile-cover .dashboard-avatar-image { width:100%; height:100%; }
.profile-cover .dashboard-masthead-meta { min-width:0; width:auto; padding-left:16px; }
.profile-cover .dashboard-masthead-meta a { gap:12px; }
.profile-cover .user-dashboard-title { font-size:clamp(2rem,4vw,3.6rem); }
.profile-cover .profile-publication-identity > div { min-width:0; }
.profile-cover .profile-publication-identity h1 { font-size:clamp(2.4rem,5vw,4.5rem); line-height:1.05; }
.profile-cover .profile-publication-identity > div > p,.profile-cover .profile-publication-stats dt { color:var(--fl-text); font-size:.75rem; line-height:1.5; }
.profile-cover .forum-secondary-back { color:var(--fl-text); }
.profile-cover .follow-actions { display:flex; flex-wrap:wrap; gap:10px; }
.profile-cover .profile-publication-bio { max-width:70ch; }
.profile-banner-editor { scroll-margin-top:100px; }
.profile-banner-editor form { display:grid; gap:14px; }
.profile-banner-preview { --banner-edit-height:var(--cover-reveal); padding-top:var(--banner-edit-height); }
.profile-banner-editor .profile-banner-drag {
  position:absolute; inset:0 0 auto; display:flex; align-items:flex-end; justify-content:flex-end;
  width:100%; height:var(--banner-edit-height); min-height:44px; margin:0; padding:12px;
  border:0; border-radius:0; background:transparent; box-shadow:none; cursor:grab;
  touch-action:none; user-select:none;
}
.profile-banner-editor .profile-banner-drag[hidden] { display:none; }
.profile-banner-editor .profile-banner-drag:disabled { cursor:default; }
.profile-banner-drag.is-dragging { cursor:grabbing; }
.profile-banner-drag span { display:inline-flex; align-items:center; gap:8px; padding:6px 10px; border:1px solid var(--fl-border-strong); border-radius:999px; background:var(--fl-editorial); color:var(--fl-ivory); font-size:12px; pointer-events:none; }
.profile-banner-editor .profile-banner-drag:focus-visible { outline-offset:-4px; }
.profile-banner-preview .profile-cover-content { padding:18px 24px; }
.profile-banner-preview-label { margin:0 0 4px; font-size:11px; letter-spacing:.1em; text-transform:uppercase; }
.profile-banner-preview strong { font:500 32px/1.15 var(--fl-serif); }
.profile-banner-guidance { margin:0; color:var(--fl-text); font-size:13px; line-height:1.6; }
.profile-banner-file-label { font-weight:600; color:var(--fl-ivory); }
.profile-banner-editor input[type=file] { box-sizing:border-box; max-width:100%; width:100%; min-width:0; min-height:44px; color:var(--fl-text); font:inherit; font-size:13px; }
.profile-banner-editor input::file-selector-button { min-height:44px; border:1px solid var(--fl-border-strong); border-radius:8px; padding:8px 14px; margin-right:10px; color:var(--fl-ivory); background:var(--fl-popover); cursor:pointer; }
.profile-banner-position { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:10px 24px; min-width:0; margin:8px 0 0; padding:16px 0 0; border:0; border-top:1px solid var(--fl-border); }
.profile-banner-position legend { padding-right:12px; color:var(--fl-ivory); font-weight:600; }
.profile-banner-position p { grid-column:1/-1; margin:0; font-size:13px; color:var(--fl-text); }
.profile-banner-position label { display:flex; justify-content:space-between; align-items:center; gap:12px; font-size:13px; color:var(--fl-text); }
.profile-banner-position output { font-variant-numeric:tabular-nums; }
.profile-banner-position input[type=range] { width:100%; height:44px; min-width:0; margin:0; accent-color:var(--fl-rose); }
.profile-banner-actions { display:flex; flex-wrap:wrap; gap:10px; }
.profile-banner-actions button { min-height:44px; }
.nickserv-settings .profile-banner-actions button { width:auto; margin:0; }
.nickserv-settings .profile-banner-editor .profile-banner-guidance,
.nickserv-settings .profile-banner-editor .profile-banner-position p,
.nickserv-settings .profile-banner-editor .public-profile-editor__heading p,
.nickserv-settings .profile-banner-editor [data-banner-feedback] { color:var(--fl-text); }
[data-banner-feedback] { margin:0; min-height:1.5em; color:var(--fl-text); font-size:14px; }
[data-banner-feedback].is-error { border-left:3px solid var(--fl-danger); padding-left:12px; font-weight:600; }
@media(max-width:1100px) { .dashboard-cover-content { grid-template-columns:minmax(0,1fr); } }
@media(max-width:600px) {
  .profile-cover { --cover-reveal:170px; --cover-art-height:340px; --cover-fade:80px; }
  .profile-cover-content { padding:20px; }
  .profile-cover-edit { max-width:calc(100% - 40px); margin-right:20px; }
  .profile-cover .dashboard-masthead-account { grid-template-columns:64px minmax(0,1fr); gap:12px; }
  .profile-cover .dashboard-avatar-edit { width:64px; height:64px; }
  .profile-cover .dashboard-masthead-meta a { grid-template-columns:minmax(0,1fr); gap:2px; }
  .profile-cover .dashboard-masthead-meta span { font-size:10px; }
  .profile-cover .profile-publication-identity { flex-direction:row; gap:16px; }
  .profile-cover .profile-publication-identity .profile-avatar-large { flex:0 0 64px; width:64px; height:64px; }
  .profile-cover .profile-publication-identity h1 { font-size:clamp(1.75rem,6vw,2.5rem); }
  .profile-banner-position { grid-template-columns:minmax(0,1fr); gap:8px; }
  .profile-banner-actions button { flex:1 1 140px; }
}
