/* ═══════════════════════════════════════════════════════════════════
   profile-styles.css — Profile-page shell + feed (NAP 2)
   ═══════════════════════════════════════════════════════════════════
   NAP 2 scope: base + ProfileHeader + ProfileTopNav + ProfileFeed +
   ProfilePost. Iter 4 /about portfolio styles land on NAP 4 under a
   scoped `.iter4-portfolio` prefix.

   Palette (Iter 4 cinema-grade):
     --bg              #0A0A0A   deep black
     --text            #F5F5F0   warm off-white
     --text-muted      #9A9A92   muted off-white
     --accent          #FF9F1C   amber
     --accent-ink      #0A0A0A   ink-on-amber
     --border          rgba(245, 245, 240, 0.10)
     --border-strong   rgba(245, 245, 240, 0.18)

   Type:
     --serif           Fraunces 200-400  (headlines, brand)
     --sans            Inter 300-500     (body)
     --mono            JetBrains Mono    (meta — type chip, date)
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --bg: #0A0A0A;
  --text: #F5F5F0;
  --text-muted: #9A9A92;
  --accent: #FF9F1C;
  --accent-ink: #0A0A0A;
  --border: rgba(245, 245, 240, 0.10);
  --border-strong: rgba(245, 245, 240, 0.18);

  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;

  --content-max: 680px;
  --gutter: 1.25rem;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

#root {
  min-height: 100vh;
}

/* ── Platform nav-bar — extracted to /platform-nav.css for reuse
       across pricing.html, handbook.html, founding.html, privacy.html
       (and profile.html, which loads it explicitly via <link>). The
       sticky behaviour + amber active-underline live in that shared
       file now. ───────────────────────────────────────────────── */

/* ── Layout shell ─────────────────────────────────────────────── */

.profile-page {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ── ProfileHeader ────────────────────────────────────────────── */

.profile-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 3rem 0 2rem;
}

.profile-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 2rem;
  letter-spacing: 0.03em;
  flex-shrink: 0;
  position: relative;
  /* Subtle inset border for a "step" feel against the dark background. */
  box-shadow: inset 0 0 0 1px rgba(10, 10, 10, 0.4);
  transition: opacity 200ms ease;
}

.profile-avatar > span {
  /* Optical alignment — initials sit slightly above geometric center. */
  transform: translateY(-1px);
}

/* When a real image is set, swap the amber-on-black initial-tile look
   for a cover-fitted portrait. The amber background is irrelevant
   beneath an opaque image but we keep the inset border for the same
   "step" against the dark page. */
.profile-avatar.profile-avatar-image {
  background: transparent;
  overflow: hidden;
}

.profile-avatar.profile-avatar-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-avatar.is-uploading {
  opacity: 0.5;
}

/* Edit-avatar button overlay — visible only when isAdmin. Sits at the
   bottom-right of the avatar circle, big enough to tap on mobile but
   not screaming for attention in the read-only viewer. */
.profile-avatar-edit {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border-strong);
  font-family: var(--serif);
  font-weight: 400;
  font-size: 0.875rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: border-color 160ms ease, color 160ms ease, transform 160ms ease;
  z-index: 1;
}

.profile-avatar-edit:hover:not(:disabled),
.profile-avatar-edit:focus-visible:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.05);
  outline: none;
}

.profile-avatar-edit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.profile-avatar-error {
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #E55B4A;
  margin: 0.5rem 0 0;
  max-width: 28ch;
}

.profile-identity {
  min-width: 0;
}

.profile-name {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  line-height: 1.1;
  margin: 0 0 0.25rem;
  letter-spacing: -0.01em;
}

.profile-role {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}

/* ── ProfileTopNav ────────────────────────────────────────────── */

.profile-top-nav {
  position: sticky;
  /* Sticks below the platform nav-bar above. The 56px value matches
     the platform-nav inner padding (0.875rem×2) + brand content height
     in the desktop breakpoint. Mobile bar shrinks to ~48px (see media
     query below) — the gap is visually fine, content never overlaps. */
  top: 56px;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  margin: 0 calc(var(--gutter) * -1);
  padding: 0 var(--gutter);
}

@media (max-width: 480px) {
  .profile-top-nav {
    top: 48px;
  }
}

.profile-top-nav-inner {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--content-max);
  margin: 0 auto;
}

.profile-top-nav-tabs {
  display: flex;
  gap: 0;
}

/* Language toggle — EN / HU / ES chip group on the right of the
   profile-top-nav. Per STRATEGIC_PIVOT v1.0 §3 only platform chrome
   translates; post body stays EN. The active language is persisted
   in localStorage (key: aiprismatik-lang). */
.profile-top-nav-langs {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.profile-lang {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  padding: 0.25rem 0.5rem;
  border-radius: 2px;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.profile-lang:hover,
.profile-lang:focus-visible {
  color: var(--text);
  outline: none;
}

.profile-lang.is-active {
  color: var(--accent);
  border-color: var(--accent);
}

@media (max-width: 480px) {
  .profile-top-nav-inner {
    gap: 0.5rem;
  }
  .profile-lang {
    font-size: 0.625rem;
    padding: 0.2rem 0.375rem;
  }
}

.profile-tab {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
  padding: 1rem 1.25rem;
  cursor: pointer;
  position: relative;
  transition: color 160ms ease;
}

.profile-tab:hover,
.profile-tab:focus-visible {
  color: var(--text);
  outline: none;
}

.profile-tab.is-active {
  color: var(--text);
}

.profile-tab.is-active::after {
  content: "";
  position: absolute;
  left: 1.25rem;
  right: 1.25rem;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
}

/* ── Main content ─────────────────────────────────────────────── */

.profile-main {
  padding: 2rem 0 4rem;
}

/* ── ProfileFeed ──────────────────────────────────────────────── */

.profile-feed {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.profile-feed-state {
  padding: 3rem 0;
  text-align: center;
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.875rem;
  letter-spacing: 0.04em;
}

.profile-feed-state-error {
  color: var(--accent);
}

.profile-feed-load-more {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.875rem 1.5rem;
  cursor: pointer;
  border-radius: 2px;
  align-self: center;
  margin-top: 1rem;
  transition: background 160ms ease, border-color 160ms ease;
}

.profile-feed-load-more:hover:not(:disabled),
.profile-feed-load-more:focus-visible:not(:disabled) {
  background: rgba(245, 245, 240, 0.04);
  border-color: var(--accent);
  outline: none;
}

.profile-feed-load-more:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── ProfilePost ──────────────────────────────────────────────── */

.profile-post {
  border-top: 1px solid var(--border);
  padding-top: 2rem;
}

.profile-post:first-child {
  border-top: 0;
  padding-top: 0;
}

.profile-post-header {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.profile-post-type {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
  padding: 0.25rem 0.5rem;
  border: 1px solid rgba(255, 159, 28, 0.30);
  border-radius: 2px;
}

.profile-post-date {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

/* Share button — visible to ALL viewers. Pushed to the right edge of
   the post-header via margin-left: auto. Sits to the left of the
   admin-only delete button when both are rendered. */
.profile-post-share {
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.625rem;
  border-radius: 2px;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.profile-post-share:hover,
.profile-post-share:focus-visible {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(255, 159, 28, 0.04);
  outline: none;
}

/* Admin-only delete button — hidden for non-admin viewers. Sits to the
   right of the Share button (which holds margin-left:auto). Subtle by
   default (muted text + faint border), red-tinted on hover so the
   destructive nature is signalled before the click. */
.profile-post-delete {
  margin-left: 0.5rem;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.625rem;
  border-radius: 2px;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.profile-post-delete:hover:not(:disabled),
.profile-post-delete:focus-visible:not(:disabled) {
  color: #E55B4A;
  border-color: rgba(229, 91, 74, 0.45);
  background: rgba(229, 91, 74, 0.06);
  outline: none;
}

.profile-post-delete:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Admin-only edit-pencil. Sits between Share and Delete in the
   header. Hover tinted amber (neutral edit action), matches the
   mono-uppercase aesthetic of Share/Delete for visual continuity. */
.profile-post-edit {
  margin-left: 0.5rem;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.625rem;
  border-radius: 2px;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.profile-post-edit:hover:not(:disabled),
.profile-post-edit:focus-visible:not(:disabled) {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(255, 159, 28, 0.05);
  outline: none;
}

/* ── ProfilePost inline-edit mode ─────────────────────────────── */

.profile-post.is-editing {
  background: rgba(255, 159, 28, 0.015);
  border: 1px dashed var(--border-strong);
  border-radius: 3px;
  padding: 1.25rem;
  /* Override the post-card hairline top-border so the dashed frame
     reads as a single unit. */
  border-top: 1px dashed var(--border-strong);
  margin-top: 1.5rem;
}

.profile-post.is-editing + .profile-post {
  /* Restore separator spacing for the next post after an editing one. */
  border-top: 1px solid var(--border);
  padding-top: 2rem;
}

/* Type-select in edit-mode header — uses the same look as the
   ProfilePostForm select for consistency, but smaller. */
.profile-post-edit-type {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  padding: 0.25rem 1.75rem 0.25rem 0.5rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%23F5F5F0' stroke-width='1.5' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
}

.profile-post-edit-type option {
  background-color: #1a1a1a;
  color: #F5F5F0;
}

.profile-post-edit-cancel,
.profile-post-edit-save {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 2px;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.profile-post-edit-cancel {
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.profile-post-edit-cancel:hover:not(:disabled),
.profile-post-edit-cancel:focus-visible:not(:disabled) {
  color: var(--text);
  border-color: var(--text-muted);
  outline: none;
}

.profile-post-edit-save {
  margin-left: 0.5rem;
  background: var(--accent);
  color: var(--accent-ink);
  border: 1px solid var(--accent);
}

.profile-post-edit-save:hover:not(:disabled),
.profile-post-edit-save:focus-visible:not(:disabled) {
  background: #FFB347;
  border-color: #FFB347;
  outline: none;
}

.profile-post-edit-cancel:disabled,
.profile-post-edit-save:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* The inline edit form body — sits where the title/media/body normally
   would. Stacked input + textarea + optional remove-image checkbox. */
.profile-post-edit-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.profile-post-edit-title {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  padding: 0.625rem 0.75rem;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  line-height: 1.2;
  letter-spacing: -0.005em;
  transition: border-color 160ms ease;
}

.profile-post-edit-title:focus {
  outline: none;
  border-color: var(--accent);
}

.profile-post-edit-form .profile-post-edit-body {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  padding: 0.75rem;
  font-family: var(--mono);
  font-weight: 300;
  font-size: 0.875rem;
  line-height: 1.6;
  min-height: 8rem;
  resize: vertical;
  transition: border-color 160ms ease;
}

.profile-post-edit-form .profile-post-edit-body:focus {
  outline: none;
  border-color: var(--accent);
}

.profile-post-edit-remove-image {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.profile-post-edit-remove-image input[type="checkbox"] {
  margin: 0;
  cursor: pointer;
  accent-color: var(--accent);
}

.profile-post-edit-remove-image:hover {
  color: var(--text);
}

.profile-post-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  line-height: 1.2;
  margin: 0 0 1rem;
  letter-spacing: -0.005em;
}

.profile-post-media {
  margin: 1.25rem 0;
}

.profile-post-media img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 2px;
}

.profile-post-body {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
}

.profile-post-body p {
  margin: 0 0 1rem;
}

.profile-post-body p:last-child {
  margin-bottom: 0;
}

.profile-post-body strong {
  font-weight: 500;
  color: var(--text);
}

.profile-post-body em {
  font-style: italic;
}

.profile-post-body a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 159, 28, 0.40);
  transition: border-color 160ms ease;
}

.profile-post-body a:hover,
.profile-post-body a:focus-visible {
  border-bottom-color: var(--accent);
  outline: none;
}

.profile-post-body blockquote {
  border-left: 2px solid var(--accent);
  padding: 0.25rem 0 0.25rem 1.25rem;
  margin: 1.25rem 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  color: var(--text-muted);
}

.profile-post-body code {
  font-family: var(--mono);
  font-size: 0.875em;
  background: rgba(245, 245, 240, 0.06);
  padding: 0.125rem 0.375rem;
  border-radius: 2px;
}

.profile-post-body ul,
.profile-post-body ol {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
}

.profile-post-body li {
  margin-bottom: 0.375rem;
}

/* ── ProfilePost actions-footer (csapó / clapperboard reaction) ── */

.profile-post-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* The reaction button. Mono-typography + boxed-chip styling so it
   reads as a deliberate platform-action, NOT a casual social-media
   like-button. Brand DNA: this is a STUDIO, fans clap at the work
   like a film audience — not Facebook heart-spam. */
.profile-post-clap {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  padding: 0.375rem 0.75rem;
  border-radius: 2px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.profile-post-clap-icon {
  display: block;
  flex-shrink: 0;
}

.profile-post-clap-count {
  font-variant-numeric: tabular-nums;
  min-width: 1ch;
  text-align: left;
}

.profile-post-clap:hover:not(:disabled),
.profile-post-clap:focus-visible:not(:disabled) {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(255, 159, 28, 0.04);
  outline: none;
}

/* Active state — user has clapped. The slate body fills amber while
   the clap-stick stripes stay outlined (currentColor inherits the
   amber from the parent). Brand-DNS: a "lit" clapperboard. */
.profile-post-clap.is-liked {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(255, 159, 28, 0.08);
}

.profile-post-clap.is-liked .profile-post-clap-icon rect {
  fill: var(--accent);
}

.profile-post-clap:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── ProfilePostForm (NAP 3) ──────────────────────────────────── */

.profile-post-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.5rem;
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  margin-bottom: 2.5rem;
  background: rgba(245, 245, 240, 0.015);
}

.profile-post-form-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 1.25rem;
  letter-spacing: -0.005em;
  margin: 0;
  color: var(--text);
}

.profile-post-form-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
}

.profile-post-form-label {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.profile-post-form-hint {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.75rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-muted);
  margin-left: 0.5rem;
  opacity: 0.7;
}

.profile-post-form-select,
.profile-post-form-input,
.profile-post-form-textarea,
.profile-post-form-file {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  padding: 0.625rem 0.75rem;
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 300;
  line-height: 1.5;
  transition: border-color 160ms ease, background 160ms ease;
}

.profile-post-form-select:focus,
.profile-post-form-input:focus,
.profile-post-form-textarea:focus,
.profile-post-form-file:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(245, 245, 240, 0.02);
}

.profile-post-form-select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%23F5F5F0' stroke-width='1.5' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  padding-right: 2.25rem;
}

/* Browsers render <option> elements via the OS-native popup and only
   partially honour CSS. Setting explicit background + color on the
   option ensures the dropdown items don't inherit a low-contrast
   default that reads as "disabled" against the dark page background.
   Verified on Chrome (Win + macOS) and Firefox; Safari ignores option
   styling but uses native dark-mode contrast from `color-scheme: dark`
   on :root, which keeps options readable. */
.profile-post-form-select option {
  background-color: #1a1a1a;
  color: #F5F5F0;
  padding: 0.5rem;
}

.profile-post-form-textarea {
  min-height: 12rem;
  resize: vertical;
  font-family: var(--mono);
  font-size: 0.875rem;
  line-height: 1.6;
}

.profile-post-form-file {
  padding: 0.5rem;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.profile-post-form-file::file-selector-button {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.375rem 0.875rem;
  border-radius: 2px;
  cursor: pointer;
  margin-right: 0.75rem;
  transition: border-color 160ms ease;
}

.profile-post-form-file::file-selector-button:hover {
  border-color: var(--accent);
}

.profile-post-form-counter {
  position: absolute;
  right: 0.25rem;
  bottom: -1.25rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  opacity: 0.6;
}

.profile-post-form-counter.is-over {
  color: #E55B4A;
  opacity: 1;
}

.profile-post-form-input.is-over,
.profile-post-form-textarea.is-over {
  border-color: #E55B4A;
}

.profile-post-form-preview {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding: 0.75rem;
  border: 1px dashed var(--border-strong);
  border-radius: 2px;
}

.profile-post-form-preview img {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  display: block;
  border-radius: 2px;
  background: #000;
}

.profile-post-form-preview-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.profile-post-form-preview-remove {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.375rem 0.75rem;
  border-radius: 2px;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease;
}

.profile-post-form-preview-remove:hover:not(:disabled),
.profile-post-form-preview-remove:focus-visible:not(:disabled) {
  color: var(--text);
  border-color: var(--accent);
  outline: none;
}

.profile-post-form-preview-remove:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.profile-post-form-error {
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: #E55B4A;
  padding: 0.75rem 0.875rem;
  border: 1px solid rgba(229, 91, 74, 0.35);
  border-radius: 2px;
  background: rgba(229, 91, 74, 0.05);
}

.profile-post-form-submit-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 0.5rem;
}

.profile-post-form-stage {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-transform: uppercase;
}

.profile-post-form-submit {
  background: var(--accent);
  color: var(--accent-ink);
  border: 0;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.875rem 1.75rem;
  border-radius: 2px;
  cursor: pointer;
  transition: background 160ms ease, opacity 160ms ease;
}

.profile-post-form-submit:hover:not(:disabled),
.profile-post-form-submit:focus-visible:not(:disabled) {
  background: #FFB347;
  outline: none;
}

.profile-post-form-submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── JoinCTA (fan-acquisition prompt at bottom of feed) ─────── */

.profile-cta {
  margin-top: 4rem;
  padding: 2.25rem 1.75rem;
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  background: rgba(255, 159, 28, 0.025);
  text-align: center;
}

.profile-cta-eyebrow {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.625rem;
}

.profile-cta-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  line-height: 1.2;
  letter-spacing: -0.005em;
  margin: 0 0 0.5rem;
  color: var(--text);
}

.profile-cta-body {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0 0 1.75rem;
}

.profile-cta-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: stretch;
}

@media (min-width: 480px) {
  .profile-cta-actions {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 1rem;
  }
}

.profile-cta-action {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.875rem 1.75rem;
  border-radius: 2px;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
  display: inline-block;
  text-align: center;
}

.profile-cta-action-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border: 1px solid var(--accent);
}

.profile-cta-action-primary:hover,
.profile-cta-action-primary:focus-visible {
  background: #FFB347;
  border-color: #FFB347;
  outline: none;
}

.profile-cta-action-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.profile-cta-action-secondary:hover,
.profile-cta-action-secondary:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

/* ── AboutPlaceholder (NAP 4 will replace with Iter 4 portfolio) ─ */

.profile-about {
  padding: 2.5rem 0 3rem;
}

.profile-about-paragraph {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  margin: 0 0 1.25rem;
  text-wrap: pretty;
}

.profile-about-paragraph:last-child {
  margin-bottom: 0;
}

/* ── Responsive — feed already mobile-first; refine at larger sizes */

@media (min-width: 640px) {
  .profile-header {
    padding: 4rem 0 2.5rem;
  }
  .profile-avatar {
    width: 96px;
    height: 96px;
    font-size: 2.25rem;
  }
}

/* ── Profile-edit modal (NAP 4 — stáblista-név) ───────────────── */

.profile-edit-button {
  margin-top: 0.5rem;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease;
}

.profile-edit-button:hover,
.profile-edit-button:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
  outline: none;
}

.profile-edit-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(2px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: profile-edit-fade-in 160ms ease;
}

@keyframes profile-edit-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.profile-edit-modal {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.profile-edit-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 1.5rem;
  line-height: 1.2;
  margin: 0 0 0.75rem;
  letter-spacing: -0.01em;
}

.profile-edit-intro {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0 0 1.5rem;
}

.profile-edit-field {
  display: block;
  margin: 0 0 1.25rem;
}

.profile-edit-field-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
}

.profile-edit-field input[type="text"] {
  display: block;
  width: 100%;
  background: rgba(245, 245, 240, 0.04);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  padding: 0.625rem 0.75rem;
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color 160ms ease;
  box-sizing: border-box;
}

.profile-edit-field input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
}

.profile-edit-field-hint {
  display: block;
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: 0.375rem;
  letter-spacing: 0.02em;
}

.profile-edit-radio-group {
  border: 0;
  padding: 0;
  margin: 0 0 1.25rem;
}

.profile-edit-radio-group legend {
  padding: 0;
}

.profile-edit-radio {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0;
  font-family: var(--serif);
  font-size: 0.9375rem;
  cursor: pointer;
}

.profile-edit-radio input[type="radio"] {
  accent-color: var(--accent);
  flex-shrink: 0;
  margin: 0;
}

.profile-edit-preview {
  background: rgba(255, 159, 28, 0.06);
  border: 1px solid rgba(255, 159, 28, 0.2);
  border-radius: 4px;
  padding: 0.75rem 1rem;
  margin: 0 0 1rem;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.profile-edit-preview-label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.profile-edit-preview-name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.0625rem;
  color: var(--accent);
}

.profile-edit-privacy {
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0 0 1.25rem;
  letter-spacing: 0.02em;
}

.profile-edit-error {
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.5;
  color: #E55B4A;
  margin: 0 0 1rem;
  letter-spacing: 0.02em;
}

.profile-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.profile-edit-cancel,
.profile-edit-save {
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  padding: 0.5rem 1.25rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.profile-edit-cancel {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
}

.profile-edit-cancel:hover:not(:disabled),
.profile-edit-cancel:focus-visible:not(:disabled) {
  color: var(--text);
  border-color: var(--text);
  outline: none;
}

.profile-edit-save {
  background: var(--accent);
  color: var(--accent-ink);
  border: 1px solid var(--accent);
}

.profile-edit-save:hover:not(:disabled),
.profile-edit-save:focus-visible:not(:disabled) {
  background: transparent;
  color: var(--accent);
  outline: none;
}

.profile-edit-save:disabled,
.profile-edit-cancel:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ── Profile-edit modal — mobile pass (≤480px) ──────────────────
   64% of pre-launch visitors are on mobile (baseline analytics
   2026-05-28, brief §7.2). The modal must read cleanly on iPhone
   SE-class viewports (~375px wide). Tightens internal padding +
   shrinks title, makes the action-button row full-width-stacked. */

@media (max-width: 480px) {
  .profile-edit-overlay {
    padding: 0.5rem;
    /* Allow the modal to consume slightly more of the viewport on
       narrow screens — the previous 1rem gutter left ~12px of
       content area lost on each side. */
  }

  .profile-edit-modal {
    padding: 1.25rem;
    border-radius: 6px;
    /* Slightly larger radius on mobile so it doesn't feel sheet-
       glued to the edges. */
  }

  .profile-edit-title {
    font-size: 1.25rem;
    line-height: 1.2;
  }

  .profile-edit-intro {
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
  }

  .profile-edit-field {
    margin-bottom: 1rem;
  }

  .profile-edit-field input[type="text"] {
    font-size: 16px;
    /* 16px MIN on iOS prevents the auto-zoom on focus that breaks
       the modal layout. Lower font-sizes trigger Safari's "form
       too tiny" heuristic. */
  }

  .profile-edit-radio {
    /* On mobile the username preview text after the radio (e.g.
       "(@AkosShowrunner)") can push past viewport; allow wrap. */
    align-items: flex-start;
    line-height: 1.35;
  }

  .profile-edit-preview {
    /* Stack label + name vertically on narrow screens — the inline
       flex-row collapses awkwardly when the realname is long. */
    flex-direction: column;
    gap: 0.25rem;
    align-items: flex-start;
  }

  .profile-edit-preview-name {
    font-size: 1rem;
  }

  .profile-edit-privacy {
    font-size: 0.6875rem;
    margin-bottom: 1rem;
  }

  .profile-edit-actions {
    /* Full-width stacked buttons — Save above Cancel (primary on
       top is the iOS convention for action sheets). The order is
       handled via flex-direction-reverse: the DOM keeps Cancel
       first for tab-order, but the visual is Save → Cancel. */
    flex-direction: column-reverse;
    gap: 0.5rem;
  }

  .profile-edit-cancel,
  .profile-edit-save {
    width: 100%;
    padding: 0.75rem 1.25rem;
    font-size: 0.8125rem;
  }
}

/* ── Reduced motion preference ───────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
