/* Powder Sky with Meadow Sorbet accents (ADR 0029). The page stays quiet;
   pastel surfaces carry hierarchy and text stays dark. This :root is the only
   token source for every stylesheet. */

/* ---------- tokens ---------- */
:root {
  --surface-page: #ececea;
  --surface-card: #fffdf8;
  --surface-warm: #f5eedf;
  --surface-sky: #c6dae4;
  --surface-lilac: #dcd4e8;
  --surface-meadow: #aebd98;
  --surface-coral: #e6aa99;
  --surface-butter: #eee2a9;

  --text-primary: #303a43;
  --text-secondary: color-mix(in srgb, var(--text-primary) 72%, transparent);
  --text-muted: color-mix(in srgb, var(--text-primary) 58%, transparent);
  --border-subtle: color-mix(in srgb, var(--text-primary) 14%, transparent);
  --border-strong: color-mix(in srgb, var(--text-primary) 26%, transparent);

  --action-primary: #6d667e;
  --action-primary-hover: #585268;
  --action-ink: #fffdf8;

  --state-success: #365c3a;
  --state-success-bg: #e3ecd9;
  --state-info: #355d73;
  --state-info-bg: #e1eff3;
  --state-warning: #765d00;
  --state-warning-bg: #f7efc8;
  --state-danger: #8f3027;
  --state-danger-bg: #f8e2dc;
  --stamp-outside: #4a5b3f;
  --focus-ring: #303a43;

  --radius-xs: 8px;
  --radius-control: 999px;
  --radius-card: 24px;
  --radius-panel: 32px;
  --radius-hero: 40px;
  --radius-media: 18px;
  --radius-pill: 999px;
  --radius-multiline: 24px;
  --radius-listing: 28px; --radius-listing-mobile: 26px; --radius-thumbnail: 16px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;

  --type-display: clamp(44px, 6vw, 72px);
  --type-h1: clamp(34px, 4vw, 46px);
  --type-h2: clamp(27px, 3vw, 32px);
  --type-h3: clamp(20px, 2vw, 22px);
  --type-body: 16px;
  --type-small: 14px;
  --type-label: 12px;

  --font-marketing: Georgia, 'Times New Roman', serif;
  --font-product: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Keep the elevation API while the product is deliberately flat. Components
     can retain their semantic layer token without painting a second edge; if
     depth returns later, it happens here instead of through local exceptions. */
  --shadow-control: none;
  --shadow-card: none;
  --shadow-raised: none;
  --shadow-nav: none;
  --shadow-float: none;

  /* Repeated surfaces stay opaque. Alpha on every card would make the
     compositor blend the moving register with its background while scrolling. */
  --surface-frost: color-mix(in srgb, var(--surface-card) 88%, var(--surface-page));
  --surface-frost-soft: color-mix(in srgb, var(--surface-card) 58%, var(--surface-page));
  --border-frost: var(--border-subtle);

  --overlay-ink: #303a43;
  --overlay-photo: color-mix(in srgb, var(--overlay-ink) 72%, transparent);
  --nav-h: 64px;
}
/* ---------- base ---------- */
* { box-sizing: border-box; }
/* overflow-x clip: nothing may pan the page sideways on phones; clip creates
   no scroll container, so position:sticky keeps working. */
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: var(--surface-page);
  color: var(--text-primary);
  font: 400 var(--type-body)/1.55 var(--font-ui);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  position: relative;
  isolation: isolate;
  -webkit-font-smoothing: antialiased;
}

/* The photo layer is dormant while every rendered body selects "none". Its
   single-layer implementation stays ready for the feature switch above: if it
   returns, the wash and image are still composed together instead of adding a
   second fullscreen translucent surface. */
body {
  --bird-background-image: none;
  --bird-background-position: 80% center;
}
body[data-bird-background="none"] {
  --bird-background-image: none;
}
body[data-bird-background="parrots-scarlet-macaw"] {
  --bird-background-image: url("../img/backgrounds/parrots-scarlet-macaw.webp");
  --bird-background-position: 80% center;
}
body[data-bird-background="parrots-red-tailed-black-cockatoo"] {
  --bird-background-image: url("../img/backgrounds/parrots-red-tailed-black-cockatoo.webp");
  --bird-background-position: 20% center;
}
body[data-bird-background="parrots-rainbow-lorikeet"] {
  --bird-background-image: url("../img/backgrounds/parrots-rainbow-lorikeet.webp");
  --bird-background-position: 80% center;
}
body[data-bird-background="parrots-salmon-crested-cockatoo"] {
  --bird-background-image: url("../img/backgrounds/parrots-salmon-crested-cockatoo.webp");
  --bird-background-position: 20% center;
}
body[data-bird-background="parrots-hyacinth-macaw"] {
  --bird-background-image: url("../img/backgrounds/parrots-hyacinth-macaw.webp");
  --bird-background-position: 80% center;
}
body[data-bird-background="parrots-eclectus"] {
  --bird-background-image: url("../img/backgrounds/parrots-eclectus.webp");
  --bird-background-position: 20% center;
}
body[data-bird-background="parrots-sulphur-crested-cockatoo"] {
  --bird-background-image: url("../img/backgrounds/parrots-sulphur-crested-cockatoo.webp");
  --bird-background-position: 80% center;
}
body[data-bird-background="parrots-crimson-rosella"] {
  --bird-background-image: url("../img/backgrounds/parrots-crimson-rosella.webp");
  --bird-background-position: 20% center;
}
body[data-bird-background="parrots-blue-throated-parakeet"] {
  --bird-background-image: url("../img/backgrounds/parrots-blue-throated-parakeet.webp");
  --bird-background-position: 80% center;
}
body[data-bird-background="parrots-golden-parakeet"] {
  --bird-background-image: url("../img/backgrounds/parrots-golden-parakeet.webp");
  --bird-background-position: 20% center;
}
body[data-bird-background="parrots-chattering-lory"] {
  --bird-background-image: url("../img/backgrounds/parrots-chattering-lory.webp");
  --bird-background-position: 80% center;
}
body[data-bird-background="parrots-yellow-bibbed-lory"] {
  --bird-background-image: url("../img/backgrounds/parrots-yellow-bibbed-lory.webp");
  --bird-background-position: 20% center;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(
      color-mix(in srgb, var(--surface-page) 90%, transparent),
      color-mix(in srgb, var(--surface-page) 90%, transparent)
    ),
    var(--bird-background-image);
  background-position: center, var(--bird-background-position);
  background-repeat: no-repeat, no-repeat;
  background-size: cover, cover;
}
body[data-bird-background="none"]::before {
  content: none;
}
/* A tall desktop viewport crops more from the sides than a 16:9 monitor. Move
   the image back towards the empty centre so the outer-third subject stays
   clear of the central card. Phones keep the stronger 20/80 focal crop. */
@media (min-width: 900px) {
  body:is(
    [data-bird-background="parrots-scarlet-macaw"],
    [data-bird-background="parrots-rainbow-lorikeet"],
    [data-bird-background="parrots-hyacinth-macaw"],
    [data-bird-background="parrots-sulphur-crested-cockatoo"],
    [data-bird-background="parrots-blue-throated-parakeet"],
    [data-bird-background="parrots-chattering-lory"]
  ) { --bird-background-position: 40% center; }
  body:is(
    [data-bird-background="parrots-red-tailed-black-cockatoo"],
    [data-bird-background="parrots-salmon-crested-cockatoo"],
    [data-bird-background="parrots-eclectus"],
    [data-bird-background="parrots-crimson-rosella"],
    [data-bird-background="parrots-golden-parakeet"],
    [data-bird-background="parrots-yellow-bibbed-lory"]
  ) { --bird-background-position: 60% center; }
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
input, select, textarea, button { font: inherit; color: inherit; }
::selection { background: var(--action-primary); color: var(--action-ink); }
:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

@media print {
  body::before { display: none; }
}

@keyframes zh-stamp {
  0% { opacity: 0; transform: scale(1.6) rotate(-14deg); }
  60% { opacity: 1; transform: scale(.92) rotate(-8deg); }
  100% { transform: scale(1) rotate(-8deg); }
}
@keyframes zh-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* mono micro-label — the registry voice */
.mlabel {
  font-family: var(--font-ui);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.latin { font-style: italic; color: var(--text-secondary); }

/* ---------- app frame ---------- */
.page {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-4) calc(var(--nav-h) + var(--space-6) + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  flex: 1;
}
.page.wide { max-width: 1240px; }
.page.narrow { max-width: 680px; }
.page.mid { max-width: 880px; }

.brand-logo-mark {
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.brand-logo-horizontal {
  width: 180px;
  height: auto;
  object-fit: contain;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 12px 22px;
  border: 1px solid var(--border-strong);
  background: var(--surface-card); color: var(--text-primary);
  font-weight: 600; font-size: 14px; cursor: pointer; text-align: center;
  min-height: 44px;
  border-radius: var(--radius-control);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}
.btn:hover { background: var(--surface-warm); border-color: var(--text-muted); }
.btn:active { transform: translateY(1px); }
/* pointer-events off so a disabled anchor cannot be clicked either — .btn is
   worn by both <button> and <a>. */
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: default; pointer-events: none; }
.btn.primary, .btn.brand, .btn.promote, .btn.wa { background: var(--action-primary); color: var(--action-ink); border-color: transparent; }
.btn.primary:hover, .btn.brand:hover, .btn.promote:hover, .btn.wa:hover { background: var(--action-primary-hover); border-color: transparent; }
.btn.ghost, .btn.cream, .btn.blue, .btn.google { background: transparent; color: var(--text-primary); border-color: var(--border-strong); }
.btn.ghost:hover, .btn.cream:hover, .btn.blue:hover, .btn.google:hover { background: var(--surface-warm); }
.btn.link {
  background: transparent; border-color: transparent; color: var(--action-primary);
  padding: 6px 2px; text-decoration: underline; text-underline-offset: 3px;
}
.btn.link:hover { background: transparent; border-color: transparent; color: var(--text-primary); }
.btn.danger { background: transparent; color: var(--state-danger); border-color: color-mix(in srgb, var(--state-danger) 35%, transparent); }
.btn.danger:hover { background: color-mix(in srgb, var(--state-danger) 10%, transparent); border-color: var(--state-danger); }
.btn.small { min-height: 44px; padding: 7px 14px; font-size: 12.5px; }
.btn.wide { width: 100%; }

/* ---------- badges & chips ---------- */
/* The closed badge set is neutral by default. Colour appears only when it
   communicates paid placement or a listing's own state. */
.badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
/* A badge is a pill and never breaks: two-line pills in a row of cards read as
   a layout fault long before they read as information. */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px;
  background: transparent; border: 1px solid var(--border-subtle);
  font-size: 12.5px; font-weight: 500; color: var(--text-secondary);
  white-space: nowrap;
}
.badge.featured { background: var(--action-primary); color: var(--action-ink); border-color: transparent; }
/* „Nowe" is the register's own clock speaking, so it is the register's ink —
   brighter than the neutral badges, coloured like none of the three. */
.badge.new { color: var(--text-primary); font-weight: 600; background: var(--surface-meadow); border-color: transparent; }
.badge.verified { color: var(--state-success); border-color: color-mix(in srgb, var(--state-success) 45%, transparent); }
.badge.brand { font-style: italic; font-size: 12.5px; color: var(--text-primary); }
.badge.danger { color: var(--state-danger); border-color: color-mix(in srgb, var(--state-danger) 40%, transparent); }
/* Expiry is not an error and not a sanction — the offer is one click from
   coming back. Dimmed, therefore, and not a warning colour. */
.badge.expired {
  color: var(--text-secondary);
  background: color-mix(in srgb, var(--text-secondary) 12%, transparent);
  border-color: color-mix(in srgb, var(--text-secondary) 28%, transparent);
}
.admin-badge { background: var(--action-primary); color: var(--action-ink); border-color: transparent; font-weight: 600; }
.admin-badge:hover { filter: brightness(1.05); }

.minibadge {
  font-size: 11.5px; line-height: 1.5; padding: 3px 10px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 4px;
}
.badge, .minibadge, .state, .admin-badge {
  border-radius: var(--radius-xs);
}

.state {
  flex: none;
  padding: 5px 12px;
  font-size: 12.5px; font-weight: 500;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
}
.state.active { color: var(--action-ink); background: var(--state-success); border-color: transparent; }
.state.sold { color: var(--text-secondary); background: var(--surface-warm); }

.chips { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  padding: 7px 14px;
  background: transparent;
  border: 1px solid var(--border-strong);
  font-size: 12.5px; font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  min-height: 44px;
  border-radius: var(--radius-pill);
}
.chip.on { background: var(--surface-coral); border-color: transparent; color: var(--text-primary); }

/* ---------- headings ---------- */
/* Every h1 and h2 on the service is set in the serif at weight 400. It is the
   one typographic decision the whole design rests on: the register speaks in a
   book voice, the interface around it in Manrope. */
.section-h {
  font-family: var(--font-marketing);
  font-weight: 400;
  font-size: var(--type-h2);
  line-height: 1.08;
  letter-spacing: -.03em;
  margin: 10px 0 0;
}
.section-h .no {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--action-primary);
  vertical-align: super;
  margin-inline-end: 8px;
  letter-spacing: 0;
}
.page-h { font-family: var(--font-marketing); font-weight: 400; font-size: var(--type-h1); line-height: 1.02; letter-spacing: -.04em; margin: 4px 0 0; text-wrap: balance; }
.center { text-align: center; }
/* No rule above the heading: sections are told apart by the air between them
   and by the surface they sit on, never by a line drawn across the page. */
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-3); margin-block: var(--space-8) var(--space-4); }
.section-head-row .section-h { margin: 0; }
.kicker {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--action-primary);
  margin: 0 0 10px;
}
/* ---------- forms ---------- */
.form { display: flex; flex-direction: column; gap: var(--space-5); width: 100%; max-width: 720px; }
.form label { display: flex; flex-direction: column; gap: var(--space-2); }
.form label, .field-label, .photos-label, .health-set legend, .fgroup-h {
  font-size: var(--type-small); font-weight: 700; letter-spacing: normal;
  text-transform: none; color: var(--text-primary);
}
.form input, .form select, .form textarea {
  font-size: 14px; font-weight: 400; letter-spacing: normal; text-transform: none; color: var(--text-primary);
}
/* Buttons inside a form keep their own action colour and type scale. */
.form .btn { font-size: 14px; font-weight: 600; letter-spacing: normal; text-transform: none; }
/* A sentence the reader has to read is never a micro-label: the consent rows,
   the radio captions and every hint keep sentence case. */
.form label.check, .form label.checkbox-row, .form label.radio-opt, .radio-opt,
.form .field-hint, .form .login-hint,
.form p, .form li, .form .declaration-text {
  font-size: 13.5px; font-weight: 400; letter-spacing: normal; text-transform: none;
  color: var(--text-secondary);
}
/* A field stays solid so it is distinct from its surrounding card. */
input[type="text"], input[type="search"], input[type="email"], input[type="tel"],
input[type="number"], select, textarea {
  min-height: 48px;
  padding: 11px 16px; width: 100%;
  border: 1px solid var(--border-strong);
  background: var(--surface-card); color: var(--text-primary); font-weight: 400;
  box-shadow: var(--shadow-control);
}
input[type="text"], input[type="search"], input[type="email"], input[type="tel"],
input[type="number"], select {
  border-radius: var(--radius-control);
}
::placeholder { color: var(--text-muted); }
textarea { resize: vertical; border-radius: var(--radius-multiline); }
input:disabled, select:disabled, textarea:disabled,
input[readonly], textarea[readonly] {
  background: var(--surface-warm);
  color: var(--text-muted);
  cursor: not-allowed;
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
  border-color: var(--action-primary);
}
input:focus-visible, select:focus-visible, textarea:focus-visible,
.btn:focus-visible, a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}
[aria-invalid="true"]:focus-visible { outline-color: var(--state-danger); border-color: var(--state-danger); }
.search-pill input[type="search"], .dsearch input[type="search"] {
  border: 0; background: transparent; padding: 0; outline: none; box-shadow: none;
}
.search-pill:focus-within, .dsearch:focus-within { border-color: var(--action-primary); }
.field-msg { color: var(--state-danger); font-weight: 500; font-size: 12.5px; }
[aria-invalid="true"] { border-color: var(--state-danger); }
.field-2col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.field-label { display: block; margin-block-end: 4px; }
.radio-row { display: flex; flex-wrap: wrap; gap: 14px; }
/* .form label lays fields out in a column; a radio and its caption belong on
   one line, and it takes the same specificity to say so. */
.form label.radio-opt { flex-direction: row; align-items: center; gap: 6px; }
.radio-opt { display: flex; align-items: center; gap: 6px; }
.radio-opt input { width: auto; }
.price-field { display: flex; flex-direction: column; gap: 8px; }
.doc-warn {
  margin-block-start: 12px; padding: 12px 14px; color: var(--state-warning); font-size: 13px; line-height: 1.45;
  border: 1px solid color-mix(in srgb, var(--state-warning) 34%, transparent);
  background: var(--state-warning-bg);
  border-radius: var(--radius-card);
}
.doc-warn b { display: block; margin-block-end: 4px; }
.photos-label { display: flex; flex-direction: column; gap: 8px; font-weight: 500; font-size: 13.5px; }
.photo-strip { display: flex; gap: 8px; overflow-x: auto; }
.photo-strip img {
  width: 72px; height: 72px;
  object-fit: cover;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
}
label.check {
  display: flex; flex-direction: row; align-items: center; gap: 8px; cursor: pointer;
  min-height: 44px;
}
label.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--state-success); }
.checkbox-row {
  display: flex !important; flex-direction: row !important; align-items: flex-start; gap: 10px;
  font-size: 13.5px; color: var(--text-secondary); cursor: pointer; line-height: 1.55; font-weight: 400;
  min-height: 44px;
  padding-block: 10px;
}
.checkbox-row input[type=checkbox] { width: 20px; height: 20px; flex: none; margin-top: 1px; accent-color: var(--state-success); }
.checkbox-row a { color: var(--action-primary); }
.checkbox-row b { color: var(--text-primary); }

/* the seller's declaration text on the sell form (full Załącznik nr 2) */
.declaration-text {
  max-height: 260px; overflow-y: auto;
  font-size: 13px; color: var(--text-secondary); line-height: 1.55;
  border: 1px solid var(--border-subtle); padding: 10px 12px;
  border-radius: var(--radius-card);
}
.declaration-text ol { padding-left: 18px; margin: 8px 0 0; }
.declaration-text li { margin-bottom: 6px; }

/* health-test declaration: checkboxes on the sell form, list on the listing */
.health-set { margin: 0; padding: 0; border: 0; display: grid; gap: 8px; }
.health-set legend { padding: 0; font-size: 13.5px; font-weight: 500; }
.health-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 480px) { .health-grid { grid-template-columns: minmax(0, 1fr); } }
.health-declared { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-subtle); }
.health-declared h4 { margin: 0 0 6px; font-size: 13.5px; }
.health-declared ul { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.6; }
.health-note { margin: 6px 0 0; font-size: 12.5px; color: var(--text-secondary); }

/* „Polecane" strip on /shop (#303): distinct frame, sideways scroll on phones */
.polecane-ctl { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
#polecane-shop { border: 1px solid var(--action-primary); padding: 12px 14px; margin-bottom: 16px; }
.minibadge.paid { color: var(--action-ink); background: var(--action-primary); border-color: transparent; }
.suggest-row.promoted { background: color-mix(in srgb, var(--action-primary) 8%, transparent); }

/* per-field validation message + read-only field explanation (/witaj) */
.field-err { font-size: 12.5px; font-weight: 400; color: var(--state-danger); }
.field-hint { font-size: 12.5px; font-weight: 400; color: var(--text-secondary); }

/* form group label (sell form sections) */
.fgroup {
  border: 1px solid var(--border-subtle);
  background: var(--surface-card);
  padding: var(--space-6);
  display: flex; flex-direction: column; gap: var(--space-5);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-card);
}
.fgroup-h {
  font-family: var(--font-ui);
  font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-secondary); font-weight: 400;
  margin: 0 0 2px;
}

/* photo dropzone */
.photos-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 28px 16px;
  border: 2px dashed var(--border-strong);
  background: var(--surface-card);
  color: var(--text-primary);
  cursor: pointer;
  text-align: center;
  transition: border-color .15s ease, background .15s ease;
  border-radius: var(--radius-card);
}
.photos-drop:hover, .photos-drop:focus-within { border-color: var(--action-primary); background: var(--surface-sky); }
.photos-drop-title { font-weight: 600; font-size: 14.5px; }
.photos-drop-hint { font-size: 12.5px; color: var(--text-secondary); }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}
.hidden { display: none !important; }

/* ---------- login ---------- */
.login-hero { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 0 6px; }
.login-sub { color: var(--text-secondary); margin: 4px 0 0; text-align: center; }
.login-hint { font-size: 12.5px; color: var(--text-secondary); margin: 0; font-weight: 400; }
.login-msg { font-size: 13px; color: var(--state-danger); margin: 0; }
.login-divider { display: flex; align-items: center; gap: 12px; color: var(--text-muted); font-size: 12px; }
.login-divider::before, .login-divider::after { content: ""; flex: 1; height: 1px; background: var(--border-strong); }
.dev-admin { display: inline-block; margin-top: 10px; font-size: 12.5px; color: var(--text-muted); text-decoration: underline; }
.dev-admin:hover { color: var(--action-primary); }

/* ---------- profile / me ---------- */
.profile-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.profile-id { flex: 1; min-width: 0; }
.profile-id h1 { margin: 0; font-weight: 700; font-size: 24px; letter-spacing: -.015em; overflow-wrap: anywhere; }
/* flex-basis 100% = always its own row, so the badges never get squeezed into
   a narrow column beside the avatar. */
.profile-badges { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; }
.logout { margin-inline-start: auto; }

/* auto-fit, not a fixed four: /me shows four tiles and the breeder profile two,
   and the same grid has to seat both — and drop to two columns on a phone. */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-block: 8px 6px; }

/* what the two gate stages know about the account holder (#306) */
.profile-data {
  margin: 0 0 18px; padding: 16px 18px;
  border: 1px solid var(--border-subtle); background: var(--surface-card);
}
.data-row {
  display: flex; flex-wrap: wrap; gap: 4px 16px; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid var(--border-subtle);
}
.data-row:first-child { padding-top: 0; }
.data-label { color: var(--text-secondary); font-size: 14px; }
.data-value { text-align: end; }
.profile-data .btn { margin-top: 14px; }

/* This invitation uses the action colour, never the danger state. */
.metryka-callout {
  margin: 18px 0; padding: 16px 18px;
  border: 1px solid color-mix(in srgb, var(--action-primary) 70%, transparent);
  background: color-mix(in srgb, var(--action-primary) 18%, transparent);
}
.metryka-callout .section-h { margin-top: 0; font-size: 18px; }
.metryka-gaps { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.metryka-gaps li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
/* 16ch is a floor: at min-width 0 the field list shrank to a two-letter column on a phone instead of wrapping onto its own line */
.metryka-gap-fields { flex: 1 1 16ch; font-size: 13px; color: var(--text-secondary); }
/* my-listings management */
.manage-list { display: flex; flex-direction: column; gap: 10px; }
.manage-row {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface-card); border: 1px solid var(--border-subtle); padding: 12px;
}
.manage-thumb { flex: none; width: 74px; height: 74px; overflow: hidden; border: 1px solid var(--border-subtle); }
.manage-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.manage-mid { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.manage-title { font-weight: 600; font-size: 14.5px; line-height: 1.3; color: var(--text-primary); }
.manage-title:hover { color: var(--action-primary); }
.manage-price { font-weight: 700; font-size: 14.5px; }
.manage-badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.manage-stats { display: flex; gap: 16px; margin-top: 2px; }
.manage-metric { font-size: 13px; color: var(--text-secondary); }
.manage-metric b { color: var(--text-primary); font-weight: 600; }
.manage-cycle { margin-top: 4px; font-size: 13px; color: var(--text-secondary); }
.manage-source { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; font-size: 13px; color: var(--text-secondary); }
.manage-source-when { color: var(--text-muted); }
.manage-actions { flex: none; display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.manage-actions .btn { white-space: nowrap; }
@media (max-width: 640px) { .manage-row { flex-wrap: wrap; } .manage-actions { flex-direction: row; flex-wrap: wrap; width: 100%; } }

/* ---------- verify page ---------- */
.verify-intro {
  position: relative;
  background: var(--surface-card); border: 1px solid var(--border-subtle); padding: 22px; margin-bottom: 4px;
  overflow: hidden;
}
.verify-intro h1 { font-weight: 700; font-size: 21px; margin: 0 0 8px; letter-spacing: -.015em; }
.verify-intro p { color: var(--text-secondary); line-height: 1.6; margin: 0 0 8px; max-width: 46em; }
.verify-for { color: var(--text-primary) !important; }
.verify-fee { display: flex; align-items: baseline; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-subtle); }
.verify-fee-amount { font-weight: 700; font-size: 24px; letter-spacing: -.01em; color: var(--text-primary); }
.verify-fee-note { font-family: var(--font-ui); font-size: 11px; color: var(--text-secondary); }
.cites-box {
  border: 1px dashed var(--border-strong);
  background: var(--surface-card);
 padding: 15px; margin-block: 4px;
}
.cites-box-h {
  font-family: var(--font-ui); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  font-weight: 400; color: var(--text-secondary); margin: 0 0 10px;
}

/* ---------- legal & pricing ---------- */
.legal { max-width: 760px; }
.legal-title { font-weight: 700; font-size: 27px; letter-spacing: -.015em; margin-block: 6px; }
.legal-intro { color: var(--text-secondary); font-size: 16px; line-height: 1.6; margin-bottom: 14px; }
.legal-section { border-top: 1px solid var(--border-strong); padding-block: 18px 4px; margin: 0; counter-increment: legal; }
.legal-section h2 {
  font-weight: 700; font-size: 16.5px; margin: 0 0 8px;
}
.legal-section h2::before {
  content: counter(legal, decimal-leading-zero);
  font-family: var(--font-ui); font-size: 12px; font-weight: 400;
  color: var(--action-primary);
  margin-inline-end: 12px;
  vertical-align: 2px;
}
.legal-section p { color: var(--text-secondary); line-height: 1.65; margin: 0 0 8px; }
main.legal { counter-reset: legal; }

/* ---------- legal documents (Regulamin, Polityka) ---------- */
.legal-doc { max-width: 760px; }
.legal-meta {
  display: grid; grid-template-columns: auto 1fr; gap: 2px 14px;
  font-family: var(--font-ui); font-size: 11.5px; letter-spacing: .04em;
  margin: 0 0 18px; padding-bottom: 14px; border-bottom: 1px solid var(--border-strong);
}
.legal-meta dt { color: var(--text-muted); text-transform: uppercase; }
.legal-meta dd { color: var(--text-secondary); margin: 0; }
.legal-toc { margin: 0 0 8px; }
.legal-toc ol { margin: 0; padding-inline-start: 20px; }
.legal-toc li { color: var(--text-secondary); line-height: 1.55; margin-bottom: 3px; font-size: 14px; }
.legal-toc a { color: var(--text-secondary); text-decoration: none; }
.legal-toc a:hover { color: var(--text-primary); text-decoration: underline; }
.legal-doc-section {
  border-top: 1px solid var(--border-strong); padding-block: 18px 4px;
  scroll-margin-top: 72px;
}
.legal-doc-section h2 { font-weight: 700; font-size: 16.5px; margin: 0 0 10px; }
.legal-doc-section p,
.legal-doc-section li { color: var(--text-secondary); line-height: 1.65; }
.legal-doc-section p { margin: 0 0 8px; }
.legal-doc-section ol,
.legal-doc-section ul { margin: 0 0 10px; padding-inline-start: 22px; }
.legal-doc-section li { margin-bottom: 6px; }
.legal-doc-section blockquote {
  margin: 0 0 10px; padding: 14px 16px;
  border-inline-start: 2px solid var(--action-primary); background: var(--surface-card);
}
.legal-table-wrap { overflow-x: auto; margin: 0 0 12px; }
.legal-table-wrap table { border-collapse: collapse; min-width: 520px; font-size: 13.5px; }
.legal-table-wrap th,
.legal-table-wrap td {
  border: 1px solid var(--border-strong); padding: 8px 10px;
  text-align: start; vertical-align: top; color: var(--text-secondary); line-height: 1.5;
}
.legal-table-wrap th { color: var(--text-primary); font-weight: 700; }

@media print {
  .legal-doc-section { break-inside: auto; }
  .legal-table-wrap { overflow-x: visible; }
  .legal-table-wrap table { min-width: 0; width: 100%; }
}

/* ---------- price list (/cennik) ---------- */
.price-group { border-top: 1px solid var(--border-strong); padding-block: 18px 4px; scroll-margin-top: 72px; }
.price-group h2 { font-weight: 700; font-size: 16.5px; margin: 0 0 8px; }
.price-group-note, .price-payments { color: var(--text-secondary); line-height: 1.6; font-size: 14px; margin: 0 0 14px; }
.price-rows { list-style: none; display: grid; gap: 8px; margin: 0; padding: 0; }
.price-row {
  display: grid; grid-template-columns: 1fr auto; align-items: baseline; column-gap: 12px;
  border: 1px solid var(--border-subtle); background: var(--surface-card); padding: 13px 15px;
}
.price-label { font-weight: 600; font-size: 14.5px; }
.price-amount { font-family: var(--font-ui); font-weight: 700; font-size: 15px; white-space: nowrap; }
.price-period {
  grid-column: 1; font-family: var(--font-ui); font-size: 10.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-muted); margin-top: 3px;
}
.price-order { grid-column: 1 / -1; font-size: 12.5px; font-weight: 600; color: var(--action-primary); margin-top: 5px; }
.price-footnote {
  border-top: 1px solid var(--border-strong); margin-top: 24px; padding-top: 16px;
  color: var(--text-secondary); line-height: 1.6; font-size: 13.5px;
}
/* Monthly and yearly are two equal options of one plan, so they share a row. */
#abonament .price-rows { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#abonament .price-row:last-child { grid-column: 1 / -1; }
@media (max-width: 560px) { #abonament .price-rows { grid-template-columns: 1fr; } }

@media (min-width: 900px) {
  .page { padding-top: 30px; padding-bottom: 64px; }

  /* Desktop puts the head back at the top of the info column; the phone keeps
     plain DOM order (title, price, photo, description, metryka, breeder). */
  .listing-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) 420px;
    grid-template-areas:
      "left head"
      "left right";
    grid-template-rows: auto 1fr;
    gap: 20px 44px;
    align-items: start;
  }
  .listing-head { grid-area: head; }
  .listing-left { grid-area: left; }
  .listing-right { grid-area: right; }
  .listing-right { display: flex; flex-direction: column; gap: 14px; }
  /* main shot + thumbnail strip, like the registry card */
  .gallery { flex-flow: row wrap; margin: 0; padding: 0; overflow: visible; }
  .gallery-img { width: 100%; aspect-ratio: 4 / 3.2; }
  .gallery-img:not(:first-child) { width: calc(25% - 6px); flex: none; aspect-ratio: 1 / 1; }
  .stamp { width: 92px; height: 92px; font-size: 9px; top: 16px; }
  .stamp b { font-size: 16px; }

  .grid { gap: 22px 18px; }
  .hero { margin-top: -30px; }
}

.listing-grid { display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 900px) { .listing-grid { display: grid; } }
.listing-left, .listing-right { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* ---------- lightbox ---------- */
.lightbox {
  border: 0; padding: 0;
  background: color-mix(in srgb, var(--overlay-ink) 93%, transparent);
  width: 100vw; height: 100dvh; max-width: none; max-height: none;
}
.lightbox img { width: 100%; height: 100%; object-fit: contain; }
.lightbox-close {
  position: fixed; top: 16px; inset-inline-end: 16px;
  width: 40px; height: 40px; border: 0; background: var(--overlay-ink); color: var(--surface-card);
  font-size: 16px; cursor: pointer; z-index: 2;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* =========================================================================
   Sell form: CITES panel, required markers. The species type-ahead itself
   lives with the other type-aheads, in search.css.
   ========================================================================= */
.req { color: var(--state-danger); text-decoration: none; font-weight: 700; margin-inline-start: 2px; cursor: help; }
.fgroup-h .req { color: var(--state-danger); }

/* The picked species: what it means legally + the upsell to verification. */
.species-picked {
  border: 1px solid color-mix(in srgb, var(--action-primary) 40%, var(--border-strong));
  background: color-mix(in srgb, var(--action-primary) 5%, var(--surface-card));
  padding: 14px 15px;
}
.species-picked.free { border-color: var(--border-strong); background: var(--surface-card); }
.sp-head { display: flex; align-items: center; gap: 9px; }
.sp-tag {
  font-family: var(--font-ui); font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 9px; background: var(--action-primary); color: var(--action-ink); font-weight: 700;
}
.sp-tag.free { background: transparent; color: var(--text-secondary); border: 1px solid var(--border-strong); font-weight: 500; }
.sp-name { font-size: 14.5px; }
.sp-body { margin: 8px 0 0; font-size: 13px; line-height: 1.55; color: var(--text-secondary); }
.legal-assessment {
  display: grid; gap: 12px; margin-top: 16px; padding: 16px;
  border: 1px solid var(--border-strong); background: var(--surface-card);
  border-radius: var(--radius-card);
}
.legal-assessment-title { margin: 0; font-size: 17px; line-height: 1.25; }
.legal-assessment-note { margin: 0; color: var(--text-secondary); font-size: 12.5px; line-height: 1.55; }
.legal-question { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border-subtle); }
.legal-question > label { margin: 0; }
.legal-declaration { font-weight: 500 !important; }
.legal-result { padding: 11px 12px; color: var(--text-secondary); background: var(--surface-warm); font-size: 13px; line-height: 1.45; }
.legal-result.publish_on_declaration { color: var(--state-success); background: var(--state-success-bg); }
.legal-result.manual_review { color: var(--state-warning); background: var(--state-warning-bg); }
.legal-result.block { color: var(--state-danger); background: var(--state-danger-bg); }
#sell-submit:disabled { background: var(--border-subtle); color: var(--text-secondary); cursor: not-allowed; }
#sell-submit:disabled:hover { filter: none; transform: none; }
#sell-blocked { margin-top: -4px; }

/* ---------- mobile polish ---------- */
@media (max-width: 559px) {
  .hero { padding-block: 24px 26px; gap: 0; }
  /* Full-width cards would otherwise show a very tall square photo. Declared
     here, after the base .card-photo rule, so it actually wins. */
  .card-photo { aspect-ratio: 16 / 11; }
  .section-head-row { flex-wrap: wrap; gap: 8px; }
  .join-band { padding: 22px 20px; }
  .bpanel-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bstat:nth-child(2) { border-inline-end: 0; }
  .bstat:nth-child(-n+2) { border-bottom: 1px solid var(--border-subtle); }
  /* Two cells above, so the third takes the whole second row: half a row wide
     and hard against one side is not a centred cell (#365). */
  .bstat:nth-child(3) { grid-column: 1 / -1; }
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .stat-row { gap: 8px; }
  .tabbar { flex-wrap: wrap; }
  .suggest { min-width: 0; }
}

/* ---------- who is selling: declared seller identity (#17) ---------- */
/* Deliberately plain — no badge chrome, no check mark. This block states what
   the seller typed, and must never read as something zhodowli confirmed. */
.sid { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border-subtle); }
.sid-h { margin: 0 0 6px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-secondary); }
.sid-type { margin: 0 0 8px; font-size: 15px; font-weight: 600; }
.sid-rows { margin: 0; display: grid; gap: 6px; }
.sid-row { display: grid; grid-template-columns: minmax(0, 1fr); }
.sid-k { margin: 0; font-size: 12px; color: var(--text-secondary); }
.sid-v { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
.sid-note { margin: 10px 0 0; font-size: 11px; color: var(--text-secondary); line-height: 1.5; }
@media (min-width: 560px) {
  .sid-row { grid-template-columns: minmax(0, 110px) minmax(0, 1fr); gap: 10px; align-items: baseline; }
}

/* ---------- contact reveal (#88) ---------- */
.reveal { display: grid; gap: 8px; }
.reveal form { display: grid; gap: 8px; margin: 0; }
.reveal-note { margin: 0; font-size: 11px; color: var(--text-secondary); line-height: 1.5; }
.reveal-err { margin: 0; padding: 10px 12px; font-size: 13px;
  color: var(--state-danger); background: color-mix(in srgb, var(--state-danger) 8%, transparent); }

/* ---------- document pack (/dokumenty) and the purchase history ---------- */
.doc-sheet h2 { font-weight: 700; font-size: 16.5px; margin: 18px 0 8px; border-top: 1px solid var(--border-strong); padding-top: 14px; }
.doc-sheet p, .doc-sheet li { color: var(--text-secondary); line-height: 2; }
.doc-head { text-align: end; }
.doc-actions { display: flex; gap: 8px; margin: 0 0 12px; }
.fill { display: inline-block; min-width: 130px; border-bottom: 1px dotted var(--text-muted); }
.fill.wide { min-width: 280px; max-width: 100%; }
.doc-signatures { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 36px; }
.doc-sign { flex: 1 1 200px; text-align: center; font-size: 12px; }
.history-wrap { overflow-x: auto; }
.history-table { border-collapse: collapse; min-width: 520px; width: 100%; font-size: 13.5px; }
.history-table th, .history-table td { border-bottom: 1px solid var(--border-subtle); padding: 8px 10px; text-align: start; vertical-align: top; color: var(--text-secondary); line-height: 1.5; }
.history-table th { color: var(--text-primary); font-weight: 700; white-space: nowrap; }

/* Shared Powder Sky silhouettes for the existing domain surfaces. */
.profile-data, .metryka-callout, .manage-row, .verify-intro,
.cites-box, .legal-meta, .legal-toc, .legal-doc-section, .price-row,
.species-picked, .reveal-err, .doc-sheet {
  border-radius: var(--radius-card);
}
.manage-thumb, .sp-tag {
  border-radius: var(--radius-xs);
}
.lightbox {
  border-radius: var(--radius-panel);
}
@media print { .doc-actions { display: none; } }
