/* ============================================================
   Network — member profile (#u/:handle) + settings (#settings)
   Vanilla port of docs mockups profile.html / settings.html,
   flattened onto the shared glass/nordic tokens.
   ============================================================ */

/* ── Profile: header ──────────────────────────────────────── */

.netp-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 8px 4px 26px;
  border-bottom: 1px solid var(--glass-line);
}

.netp-id {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
}

.netp-avatar {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--nordic-line-strong, var(--glass-line));
  flex: none;
  background: var(--nordic-surface, #fff);
}

.netp-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Monogram: face + mesh gradient are set inline per handle (paintMonogram). */
.netp-mono,
.nets-avwrap .nets-mono {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 38px;
  line-height: 1;
  color: #fff;
  text-transform: uppercase;
  text-shadow: 0 1px 14px rgb(0 0 0 / 22%);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 35%),
    inset 0 0 0 1px rgb(255 255 255 / 14%);
  user-select: none;
}

.netp-handle {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--glass-ink);
  overflow-wrap: anywhere;
}

.netp-bio {
  margin-top: 8px;
  font-size: 13px;
  color: var(--glass-body);
  max-width: 52ch;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.netp-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--glass-label);
  font-variant-numeric: tabular-nums;
}

.netp-meta b {
  color: var(--glass-ink);
  font-weight: 650;
}

.netp-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.netp-share[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}

.netp-follow[aria-pressed="true"] {
  background: var(--nordic-pressed, var(--ice-quiet));
  border-color: var(--glass-ink);
}

/* ── Profile: visual collection (fanned hand of images) ────── */

/* Cards spread across the fan's width by --t (0 → left, 1 → right), tilt
   and dip along an arc; the fan itself only grows as wide as its cards
   need, so two or three images stay together instead of drifting apart.
   Hover/focus lifts a card and nudges its neighbours aside. */
.netp-gallery {
  padding: 30px 0 6px;
  border-bottom: 1px solid var(--glass-line);
}

.netp-fan {
  --card-w: clamp(104px, 24vw, 196px);
  --card-h: calc(var(--card-w) * 1.25);
  --tilt: 7;
  --dip: 18px;
  position: relative;
  width: min(100%, calc(var(--card-w) * (1 + (var(--n, 1) - 1) * 0.62)));
  height: calc(var(--card-h) + var(--dip) + 28px);
  margin: 0 auto;
}

html[data-theme] .netp-fan-card {
  --c: calc((var(--t) - 0.5) * 2); /* -1 … 1 from the middle */
  position: absolute;
  top: 14px;
  left: calc((100% - var(--card-w)) * var(--t));
  z-index: calc(var(--i) + 1);
  width: var(--card-w);
  height: var(--card-h);
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgb(0 0 0 / 5%), rgb(0 0 0 / 11%)),
    var(--nordic-surface, #fff);
  box-shadow:
    0 0 0 1px rgb(0 0 0 / 8%),
    0 2px 4px rgb(0 0 0 / 8%),
    0 14px 32px -12px rgb(0 0 0 / 38%);
  cursor: zoom-in;
  transform:
    translateY(calc(var(--c) * var(--c) * var(--dip)))
    rotate(calc(var(--c) * var(--tilt) * 1deg));
  transition:
    transform 0.55s cubic-bezier(0.22, 1.25, 0.36, 1),
    translate 0.55s cubic-bezier(0.22, 1.25, 0.36, 1),
    box-shadow 0.3s ease;
  animation: netp-deal 0.7s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  animation-delay: calc(var(--i) * 70ms);
}

.netp-fan-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
  -webkit-user-drag: none;
}
.netp-fan-card.is-loaded img { opacity: 1; }
.netp-fan-card.is-broken img { display: none; }

/* Gloss: a soft diagonal light over every print. */
.netp-fan-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(150deg, rgb(255 255 255 / 22%), transparent 38%);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 14%);
  pointer-events: none;
}

/* Outranks the nordic `button:hover:not(:disabled)` skin (transform: none). */
html[data-theme] button.netp-fan-card:is(:hover, :focus-visible):not(:disabled) {
  z-index: 40;
  background: var(--nordic-surface, #fff);
  transform: translateY(-16px) rotate(0deg) scale(1.07);
  box-shadow:
    0 0 0 1px rgb(0 0 0 / 8%),
    0 6px 12px rgb(0 0 0 / 10%),
    0 28px 48px -16px rgb(0 0 0 / 48%);
}
.netp-fan-card:focus-visible {
  outline: 2px solid var(--glass-ink);
  outline-offset: 3px;
}
.netp-fan-card:is(:hover, :focus-visible) ~ .netp-fan-card { translate: 22px 0; }
.netp-fan-card:has(~ .netp-fan-card:is(:hover, :focus-visible)) { translate: -22px 0; }

@keyframes netp-deal {
  from {
    opacity: 0;
    transform: translateY(40px) rotate(0deg) scale(0.9);
  }
}

.netp-gallery-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 4px 0 18px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--glass-label);
  font-variant-numeric: tabular-nums;
}

html[data-theme] .netp-gallery-all {
  min-height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 560px) {
  .netp-fan { --card-w: clamp(92px, 30vw, 132px); --tilt: 9; --dip: 12px; }
  .netp-fan-card:is(:hover, :focus-visible) ~ .netp-fan-card { translate: 10px 0; }
  .netp-fan-card:has(~ .netp-fan-card:is(:hover, :focus-visible)) { translate: -10px 0; }
}

/* ── Profile: image viewer ─────────────────────────────────── */

.netp-viewer {
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 56px 72px 76px;
  border: 0;
  background: transparent;
  color: #fff;
  overflow: hidden;
}
.netp-viewer[open] {
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
}
.netp-viewer::backdrop {
  background: rgb(10 10 12 / 86%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.netp-viewer-frame {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
}
.netp-viewer-frame img {
  max-width: 100%;
  max-height: 100%;
  display: block;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 30px 80px -20px rgb(0 0 0 / 70%);
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  user-select: none;
  -webkit-user-drag: none;
}
.netp-viewer-frame img.is-loaded { opacity: 1; transform: none; }

html[data-theme] :is(.netp-viewer-nav, .netp-viewer-close) {
  position: absolute;
  width: 44px;
  height: 44px;
  min-height: 0;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 999px;
  background: rgb(255 255 255 / 8%);
  color: #fff;
}
html[data-theme] :is(.netp-viewer-nav, .netp-viewer-close):is(:hover, :active):not(:disabled) {
  background: rgb(255 255 255 / 18%);
  border-color: rgb(255 255 255 / 28%);
  transform: none;
}
.netp-viewer-nav { top: 50%; margin-top: -22px; }
.netp-viewer-nav.is-prev { left: 16px; }
.netp-viewer-nav.is-next { right: 16px; }
.netp-viewer-nav[hidden] { display: none; }
.netp-viewer-close { top: 12px; right: 16px; }

.netp-viewer-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 72%);
  font-variant-numeric: tabular-nums;
}
.netp-viewer-link { color: #fff; }
html[data-theme] .netp-viewer-remove:is(:hover, :active):not(:disabled) {
  background: rgb(255 255 255 / 12%);
  border-color: rgb(255 255 255 / 30%);
}
html[data-theme] .netp-viewer-remove {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.netp-viewer-remove[hidden] { display: none; }

@media (max-width: 560px) {
  .netp-viewer { padding: 60px 12px 88px; }
  .netp-viewer-nav { top: auto; bottom: 14px; margin-top: 0; }
  .netp-viewer-bar { bottom: 70px; gap: 12px; flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  html[data-theme] .netp-fan-card { animation: none; transition: box-shadow 0.2s ease; }
  html[data-theme] button.netp-fan-card:is(:hover, :focus-visible):not(:disabled) { transform: translateY(-8px); }
  .netp-fan-card:is(:hover, :focus-visible) ~ .netp-fan-card,
  .netp-fan-card:has(~ .netp-fan-card:is(:hover, :focus-visible)) { translate: none; }
  .netp-viewer-frame img { transition: none; transform: none; }
}

/* ── Profile: spine feed ──────────────────────────────────── */

.netp-feed {
  position: relative;
  max-width: 1040px;
  margin: 0 auto;
  padding: 44px 0 40px;
}

.netp-feed::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--nordic-line-strong, var(--glass-line));
}

.netp-entry {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 90px 1fr;
  align-items: center;
  margin-bottom: 56px;
}

.netp-entry:last-child {
  margin-bottom: 0;
}

/* Long feeds: off-screen entries skip layout/paint; the intrinsic-size
   estimate keeps the scrollbar stable until each is first rendered. */
.netp-entry {
  content-visibility: auto;
  contain-intrinsic-size: auto 320px;
}

.netp-num {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  background: var(--nordic-surface, #fff);
  border: 1px solid var(--nordic-line-strong, var(--glass-line));
  border-radius: 999px;
  min-width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 300;
  font-variant-numeric: tabular-nums;
  color: var(--glass-ink);
}

.netp-entry:nth-child(odd) .netp-card  { grid-column: 1; justify-self: end; text-align: left; }
.netp-entry:nth-child(even) .netp-card { grid-column: 3; justify-self: start; text-align: left; }
.netp-entry:nth-child(odd) .netp-when  { grid-column: 3; justify-self: start; padding-left: 26px; }
.netp-entry:nth-child(even) .netp-when {
  grid-column: 1;
  grid-row: 1;
  justify-self: end;
  text-align: right;
  padding-right: 26px;
}

.netp-when {
  font-size: 11px;
  color: var(--glass-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.netp-card {
  max-width: 400px;
  width: 100%;
}

.netp-card > img,
.netp-image-link > img {
  width: 100%;
  height: auto;
  background: var(--glass-line);
  border: 1px solid var(--glass-line);
  border-radius: var(--radius-mini);
  display: block;
}

.netp-image-link {
  display: block;
}

.netp-card:hover > img,
.netp-card:hover .netp-image-link > img {
  border-color: var(--nordic-line-strong, var(--glass-line));
}

/* track card */
.netp-track {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--glass-line);
  border-radius: var(--radius-mini);
  padding: 14px 16px;
  background: var(--nordic-surface, rgba(255, 255, 255, 0.7));
}

.netp-track:hover {
  border-color: var(--nordic-line-strong, var(--glass-line));
  background: var(--nordic-hover, rgba(0, 0, 0, 0.02));
}

/* Record sleeve (web.css .song-sleeve): the cover is the play button. */
.netp-sleeve {
  --sleeve: 56px;
}

.netp-track-main {
  min-width: 0;
}

.netp-track-title {
  font-size: 14px;
  font-weight: 620;
  display: block;
  color: var(--glass-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

a.netp-track-title:hover {
  text-decoration: underline;
}

.netp-hearts.netp-hearts {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--glass-body);
  font-variant-numeric: tabular-nums;
  padding: 4px 6px;
  border: 0;
  background: none;
  border-radius: var(--radius-mini);
  text-transform: none;
  letter-spacing: normal;
}

button.netp-hearts:hover:not(:disabled) {
  background: var(--nordic-hover, rgba(0, 0, 0, 0.05));
  transform: none;
}

.netp-hearts svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--glass-ink);
  stroke-width: 1.6;
  flex: none;
}

.netp-hearts.is-voted svg {
  fill: var(--glass-ink);
}

/* lyric card */
.netp-lyric {
  border: 1px solid var(--glass-line);
  border-radius: var(--radius-mini);
  padding: 16px 18px;
  background: var(--nordic-surface, rgba(255, 255, 255, 0.7));
}

.netp-lyric:hover {
  border-color: var(--nordic-line-strong, var(--glass-line));
}

.netp-lyric-title {
  font-size: 14px;
  font-weight: 620;
  color: var(--glass-ink);
  display: block;
}

.netp-lyric-text {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--glass-body);
  white-space: pre-line;
  overflow-wrap: anywhere;
}

/* per-entry secondary action (own page: unpublish) */
.netp-entry-actions {
  margin-top: 8px;
  text-align: left;
}

.netp-entry-remove.netp-entry-remove {
  padding: 0;
  border: 0;
  background: none;
  font-size: 11px;
  color: var(--glass-label);
  text-transform: none;
  letter-spacing: normal;
  text-decoration: underline;
}

.netp-entry-remove.netp-entry-remove:hover:not(:disabled) {
  color: var(--nordic-error, #a32020);
  background: none;
  transform: none;
}

/* feed footer */
.netp-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding-top: 8px;
}

.netp-sentinel {
  width: 100%;
  height: 1px;
}

.netp-skeleton {
  display: grid;
  gap: 16px;
  width: min(400px, 100%);
}

.netp-skeleton[hidden] {
  display: none;
}

.netp-skeleton-card {
  display: block;
  height: 72px;
  border-radius: var(--radius-mini);
  background: var(--glass-line);
  animation: netp-pulse 1.4s ease-in-out infinite;
}

@keyframes netp-pulse {
  50% { opacity: 0.45; }
}

@media (prefers-reduced-motion: reduce) {
  .netp-skeleton-card { animation: none; }
}

.netp-empty,
.netp-error {
  padding: 48px 0;
  text-align: center;
  font-size: 13px;
  color: var(--glass-label);
}

.netp-error {
  color: var(--nordic-error, #a32020);
}

@media (max-width: 700px) {
  .netp-feed::before { left: 32px; }
  .netp-entry {
    grid-template-columns: 56px 1fr;
    margin-bottom: 40px;
  }
  .netp-num {
    left: 32px;
    top: 20px;
    min-width: 42px;
    height: 42px;
    font-size: 12px;
  }
  .netp-entry .netp-card,
  .netp-entry:nth-child(odd) .netp-card,
  .netp-entry:nth-child(even) .netp-card {
    grid-column: 2;
    grid-row: 2;
    margin-top: 10px;
    justify-self: start;
  }
  .netp-entry .netp-when,
  .netp-entry:nth-child(odd) .netp-when,
  .netp-entry:nth-child(even) .netp-when {
    grid-column: 2;
    grid-row: 1;
    justify-self: start;
    text-align: left;
    padding: 0;
    align-self: center;
  }
}

/* ── Settings ─────────────────────────────────────────────── */

.nets-wrap {
  max-width: 640px;
  padding: 4px 4px 60px;
}

.nets-title {
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 750;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.nets-section {
  margin-top: 36px;
}

.nets-sec-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--glass-label);
  margin: 0 0 12px;
}

.nets-sec-label.is-danger {
  color: var(--nordic-error, #a32020);
}

.nets-panel {
  padding: 22px;
}

/* avatar widget — vanilla port of the reui-style upload pattern */
.nets-avrow {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* `.nets-avrow > button` outranks the global nordic `button` skin, which
   would otherwise square the corners and repaint the background. */
.nets-avrow > button.nets-avwrap {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--nordic-line-strong, var(--glass-line));
  flex: none;
  cursor: pointer;
  padding: 0;
  background: var(--nordic-surface, #fff);
}

.nets-avwrap:hover:not(:disabled) {
  transform: none;
  border-color: var(--glass-ink);
}

.nets-avwrap img,
.nets-avwrap .nets-mono {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.nets-avwrap img {
  object-fit: cover;
  display: block;
}

.nets-avov {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.15s;
}

.nets-avwrap:hover .nets-avov,
.nets-avwrap:focus-visible .nets-avov {
  opacity: 1;
}

.nets-avhint {
  font-size: 12px;
  color: var(--glass-label);
  line-height: 1.6;
  margin: 0;
}

.nets-avhint.nets-avhint button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--glass-ink);
  font-size: 12px;
  text-transform: none;
  letter-spacing: normal;
  text-decoration: underline;
}

.nets-avhint.nets-avhint button:hover:not(:disabled) {
  background: none;
  transform: none;
}

/* fields */
.nets-field {
  margin-top: 18px;
}

.nets-field > label,
.nets-field-label {
  display: block;
  font-size: 11px;
  color: var(--glass-label);
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}

.nets-field input,
.nets-field textarea {
  width: 100%;
  padding: 10px 13px;
  font-size: 13px;
}

.nets-field input:disabled {
  background: var(--nordic-fill, rgba(0, 0, 0, 0.04));
  color: var(--glass-label);
}

.nets-field .nets-hint {
  font-size: 11px;
  color: var(--glass-label);
  margin: 6px 0 0;
  line-height: 1.5;
}

.nets-field .nets-hint.is-error {
  color: var(--nordic-error, #a32020);
}

/* One field, not two boxes: the /u/ prefix reads as part of the URL the
   user is typing (mirrors the nordic .input-shell pattern). */
.nets-handle-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--glass-line);
  border-radius: var(--radius-mini);
  background: var(--nordic-surface, #fff);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.nets-handle-wrap:focus-within {
  border-color: var(--glass-ink);
  box-shadow: 0 0 0 3px rgb(0 0 0 / 8%);
}

.nets-handle-wrap:has(input:disabled) {
  background: var(--nordic-fill, rgba(0, 0, 0, 0.04));
}

.nets-handle-wrap .nets-at {
  padding-left: 13px;
  color: var(--glass-label);
  font-size: 13px;
  white-space: nowrap;
  user-select: none;
}

.nets-field .nets-handle-wrap input {
  flex: 1;
  min-width: 0;
  padding-left: 1px;
  border: 0;
  border-radius: 0;
  background: transparent;
  outline: none;
}

.nets-row-end {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
  gap: 10px;
}

/* toggle */
.nets-togglerow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nets-togglerow .nets-toggle-copy {
  font-size: 13px;
  font-weight: 600;
  color: var(--glass-ink);
}

.nets-togglerow .nets-toggle-hint {
  font-size: 12px;
  color: var(--glass-label);
  margin: 4px 0 0;
}

.nets-switch.nets-switch {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  border: 0;
  background: rgba(0, 0, 0, 0.15);
  transition: background 0.15s;
  flex: none;
  padding: 0;
}

.nets-switch:hover:not(:disabled) {
  transform: none;
  background: rgba(0, 0, 0, 0.28);
}

.nets-switch[aria-checked="true"] {
  background: var(--glass-ink);
}

.nets-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s;
}

.nets-switch[aria-checked="true"]::after {
  transform: translateX(18px);
}

/* danger zone */
.nets-panel.is-danger {
  border-color: rgba(163, 32, 32, 0.3);
}

.nets-panel.is-danger p {
  font-size: 12px;
  color: var(--glass-body);
  line-height: 1.55;
  max-width: 52ch;
  margin: 0;
}

.nets-panel.is-danger p b {
  color: var(--nordic-error, #a32020);
}

.nets-btn-danger {
  border-color: rgba(163, 32, 32, 0.4);
  color: var(--nordic-error, #a32020);
}

.nets-btn-danger:hover:not(:disabled) {
  background: rgba(163, 32, 32, 0.08);
  border-color: rgba(163, 32, 32, 0.6);
  transform: none;
}

/* confirm dialog — same overlay pattern as glass-expand-overlay */
.nets-overlay {
  position: fixed;
  inset: 0;
  z-index: 320;
  background: var(--nordic-scrim, rgba(0, 0, 0, 0.44));
  display: grid;
  place-items: center;
  padding: 16px;
}

.nets-dialog {
  width: min(420px, 92vw);
  background: var(--nordic-surface, #fff);
  border-radius: var(--radius-card);
  border: 1px solid var(--glass-line);
  padding: 26px;
}

.nets-dialog h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--glass-ink);
}

.nets-dialog p {
  font-size: 12px;
  color: var(--glass-body);
  line-height: 1.55;
  margin: 0;
}

.nets-dialog input {
  width: 100%;
  margin-top: 14px;
  padding: 10px 13px;
  font-size: 13px;
}

.nets-status {
  font-size: 12px;
  margin: 12px 0 0;
  color: var(--glass-label);
}

.nets-status.is-error {
  color: var(--nordic-error, #a32020);
}

/* An empty feed has no timeline: drop the centre rail. */
.netp-feed:empty::before { display: none; }

/* Own empty profile: what to do next (reuses the nordic .how-steps cards). */
.netp-empty-self {
  max-width: 1040px;
  margin: 28px auto 12px;
}
.netp-empty-self[hidden] { display: none; }
.netp-empty-title {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--glass-ink);
}
.netp-empty-self .how-step { grid-template-rows: auto auto auto; }
.how-step-cta,
html[data-theme="nordic"] .how-step-cta {
  grid-column: 2;
  justify-self: start;
  margin-top: 8px;
  padding: 5px 11px;
  border: 1px solid var(--nordic-line-strong, var(--glass-line));
  border-radius: 999px;
  background: var(--nordic-surface, #fff);
  color: var(--glass-ink);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
  cursor: pointer;
}
.how-step-cta:hover,
html[data-theme="nordic"] .how-step-cta:hover:not(:disabled) { background: var(--nordic-hover, rgb(0 0 0 / 5%)); }

/* Settings: username label + members-only pill on one line. */
.nets-field-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
  margin-bottom: 6px;
}
.nets-field-head .nets-field-label { margin-bottom: 0; }
.nets-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border: 1px solid var(--glass-line);
  border-radius: 999px;
  background: var(--nordic-fill, rgb(0 0 0 / 4%));
  color: var(--glass-body);
  font-size: 11px;
  line-height: 1.3;
  cursor: help;
}

/* sign-in and connections (settings.js) */
.nets-kv {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  font-size: 13px;
}

.nets-kv-key { color: var(--glass-label); }

.nets-kv-val {
  color: var(--glass-ink);
  overflow-wrap: anywhere;
}

.nets-access .nets-kv[hidden] + .nets-connections[hidden] + .nets-row-end { margin-top: 0; }

/* connected AI chats (connections.js); #settings/connections scrolls here */
#settingsAccess { scroll-margin-top: 96px; }

.nets-connections {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--glass-line);
}

.nets-conn-head {
  font-size: 13px;
  color: var(--glass-label);
  margin-bottom: 8px;
}

.nets-conn-empty {
  font-size: 13px;
  color: var(--glass-body);
  margin: 0;
}

.nets-conn-empty a { color: var(--glass-ink); }

.nets-conn-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nets-conn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}

.nets-conn + .nets-conn { border-top: 1px solid var(--glass-line); }

.nets-conn-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--nordic-fill, rgb(0 0 0 / 4%));
  color: var(--glass-ink);
}

.nets-conn-copy {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}

.nets-conn-copy b {
  font-size: 13px;
  font-weight: 600;
  color: var(--glass-ink);
  overflow-wrap: anywhere;
}

.nets-conn-copy small {
  font-size: 12px;
  color: var(--glass-label);
}

.nets-conn-off { flex: none; }
.nets-conn-off .icon { display: none; }

@media (max-width: 640px) {
  /* Phones: the unplug icon alone, so the meta keeps its width. */
  .nets-conn-off.nets-conn-off {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
  }
  .nets-conn-off .icon { display: block; }
  .nets-conn-off span { display: none; }
  .nets-conn-copy small span { display: block; }
  .nets-conn-copy small .nets-conn-sep { display: none; }
}

/* /connect (connections.js); signed out it stands alone, without the shell */
.connect-public {
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 16px 24px;
  background: var(--nordic-surface, #fff);
}

.connect-public .nets-wrap { width: 100%; }
.mb-connect-brand { margin-bottom: 18px; }

.mb-connect-lead {
  font-size: 14px;
  line-height: 1.55;
  color: var(--glass-body);
  max-width: 56ch;
  margin: 0;
}

.mb-connect-url {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.mb-connect-url code {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  color: var(--glass-ink);
  overflow-wrap: anywhere;
  user-select: all;
}

.mb-connect-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mb-connect-clients {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.mb-connect-client h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--glass-ink);
  margin: 0 0 10px;
}

.mb-connect-steps {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--glass-body);
}

.mb-connect-steps li + li { margin-top: 6px; }

.mb-connect-client .nets-hint {
  font-size: 12px;
  color: var(--glass-label);
  line-height: 1.5;
  margin: 12px 0 0;
}

.mb-connect-facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.mb-connect-facts li,
.mb-connect-off p {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--glass-body);
  margin: 0;
}

.mb-connect-facts .icon,
.mb-connect-off .icon {
  flex: none;
  margin-top: 1px;
  color: var(--glass-ink);
}

.mb-connect-off a { color: var(--glass-ink); }

@media (max-width: 640px) {
  .nets-access .nets-row-end { flex-direction: column-reverse; }
  .nets-access .nets-row-end button { width: 100%; }
  .mb-connect-copy { width: 100%; justify-content: center; }
}
