/* Zgrabi web styles: Aurora design tokens (DECISIONS R11-1, R11-3) and the shared components.
   The theme follows the system setting; the profile toggle sets data-theme on <html> (NFR-008).
   Every colour pair used for text passes WCAG AA in both themes. */

@import url("../fonts/fonts.css");

:root {
  --zg-bg: #F5F6FB;
  --zg-surface: #FFFFFF;
  --zg-raised: #ECEEF7;
  --zg-line: #D5D9EA;
  --zg-field: #767C9C;
  --zg-text: #12142A;
  --zg-muted: #525878;
  --zg-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23525878' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  --zg-accent: #08734A;
  --zg-accent-2: #4F6B00;
  --zg-on-accent: #FFFFFF;
  --zg-ok: #0E7A3D;
  --zg-warn: #8A5100;
  --zg-bad: #B3223A;
  --zg-tint: rgba(8, 115, 74, 0.10);
  /* These brand surfaces stay deep space in both themes; the home hero follows the theme (R19-11). */
  --zg-space: #0A0C1B;
  --zg-space-surface: #151933;
  --zg-space-text: #EEF0FF;
  --zg-space-muted: #A3A9CF;
  --zg-neon: #62F0A6;
  --zg-neon-2: #C8F26A;

  --zg-font: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --zg-display: "Unbounded", "Onest", system-ui, sans-serif;
  --zg-mono: "JetBrains Mono", ui-monospace, monospace;
  --zg-r-chip: 8px;
  --zg-r-control: 12px;
  --zg-r-card: 18px;
  --zg-r-sheet: 28px;
  --zg-tabbar-h: 76px;
  --zg-header-h: 73px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --zg-bg: #0A0C1B;
    --zg-surface: #151933;
    --zg-raised: #1D2245;
    --zg-line: #2C3266;
    --zg-field: #6A71A8;
    --zg-text: #EEF0FF;
    --zg-muted: #A3A9CF;
    --zg-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23A3A9CF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    --zg-accent: #62F0A6;
    --zg-accent-2: #C8F26A;
    --zg-on-accent: #06101C;
    --zg-ok: #5BE49B;
    --zg-warn: #FFC266;
    --zg-bad: #FF7D8C;
    --zg-tint: rgba(98, 240, 166, 0.14);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --zg-bg: #0A0C1B;
  --zg-surface: #151933;
  --zg-raised: #1D2245;
  --zg-line: #2C3266;
  --zg-field: #6A71A8;
  --zg-text: #EEF0FF;
  --zg-muted: #A3A9CF;
    --zg-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23A3A9CF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  --zg-accent: #62F0A6;
  --zg-accent-2: #C8F26A;
  --zg-on-accent: #06101C;
  --zg-ok: #5BE49B;
  --zg-warn: #FFC266;
  --zg-bad: #FF7D8C;
  --zg-tint: rgba(98, 240, 166, 0.14);
  color-scheme: dark;
}

/* --- base ---------------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
/* Always keep room for the scrollbar, so the centred header does not shift between short and tall pages. */
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
body {
  margin: 0;
  background: var(--zg-bg);
  color: var(--zg-text);
  font: 400 16px/1.5 var(--zg-font);
  overflow-x: hidden;
}
a { color: var(--zg-accent); }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--zg-accent); outline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
p { margin: 0; }

.zg-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.zg-skip {
  position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 16px;
  border-radius: var(--zg-r-control); background: var(--zg-accent); color: var(--zg-on-accent); font-weight: 600;
}
.zg-skip:focus { top: 12px; }

.zg-display { font-family: var(--zg-display); font-weight: 700; letter-spacing: -0.01em; }
.zg-price { font-family: var(--zg-display); font-weight: 500; }
.zg-mono { font-family: var(--zg-mono); font-weight: 500; letter-spacing: 0.04em; }
.zg-muted { color: var(--zg-muted); }

/* --- layout -------------------------------------------------------------------------------- */

.zg-app { min-height: 100vh; display: flex; flex-direction: column; }
.zg-main { flex: 1; padding-bottom: 32px; }
.zg-container { width: 100%; max-width: 1240px; margin: 0 auto; padding-inline: 16px; }
.zg-page { display: flex; flex-direction: column; gap: 20px; padding-top: 20px; padding-bottom: 32px; }
.zg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

@media (min-width: 900px) {
  .zg-main { padding-bottom: 48px; }
  .zg-container { padding-inline: 20px; }
  .zg-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
}

/* --- header (desktop) and tab bar (phone) ------------------------------------------------- */

.zg-header { display: none; background: var(--zg-surface); border-bottom: 1px solid var(--zg-line); }
.zg-header__row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding-top: 12px; padding-bottom: 12px; }
.zg-header__search {
  flex: 1 1 320px; min-width: 0; height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 14px;
  border: 1px solid var(--zg-field); border-radius: var(--zg-r-control); background: var(--zg-bg);
  color: var(--zg-muted); text-decoration: none;
}
.zg-header__nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }

.zg-mobilebar {
  display: flex; align-items: center; justify-content: space-between; padding: 10px 8px 10px 16px;
  background: var(--zg-space); color: var(--zg-space-text);
}

.zg-tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: var(--zg-tabbar-h);
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 6px 8px 14px;
  background: var(--zg-surface); border-top: 1px solid var(--zg-line);
}
.zg-tab {
  min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--zg-muted); text-decoration: none; font-size: 12px; font-weight: 500;
}
.zg-tab[aria-current="page"] { color: var(--zg-accent); font-weight: 600; }
.zg-tab__sell {
  width: 40px; height: 32px; border-radius: var(--zg-r-control); display: grid; place-items: center;
  background: var(--zg-accent); color: var(--zg-on-accent);
}
.zg-tab__icon { position: relative; display: grid; }
.zg-iconbtn .zg-tab__badge { top: 2px; right: 0; }
.zg-tab__badge {
  position: absolute; top: -6px; right: -10px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px;
  background: var(--zg-accent-2); color: var(--zg-on-accent); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}

@media (min-width: 900px) {
  .zg-header { display: block; }
  .zg-mobilebar, .zg-tabbar { display: none; }
}

/* --- brand -------------------------------------------------------------------------------- */

.zg-brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: inherit; text-decoration: none; }
.zg-brand__word { font-family: var(--zg-display); font-weight: 700; font-size: 22px; letter-spacing: -0.02em; line-height: 1; }

/* --- controls ------------------------------------------------------------------------------ */

.zg-btn {
  min-height: 48px; padding: 0 22px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: var(--zg-r-control); background: var(--zg-accent); color: var(--zg-on-accent);
  font-weight: 600; text-decoration: none; cursor: pointer;
}
.zg-btn--secondary { background: transparent; color: var(--zg-text); border: 1.5px solid var(--zg-accent); }
.zg-btn--ghost { background: transparent; color: var(--zg-accent); padding: 0 12px; }
.zg-btn--danger { background: transparent; color: var(--zg-bad); border: 1.5px solid var(--zg-bad); }
.zg-btn[disabled], .zg-btn[aria-disabled="true"] { background: var(--zg-raised); color: var(--zg-muted); border-color: transparent; cursor: not-allowed; }
.zg-iconbtn {
  width: 44px; height: 44px; display: inline-grid; place-items: center; border: 0; border-radius: var(--zg-r-control);
  background: transparent; color: inherit; cursor: pointer; position: relative; text-decoration: none;
}

.zg-field { display: flex; flex-direction: column; gap: 6px; }
.zg-field__label { font-size: 15px; font-weight: 600; }
.zg-field__hint { font-size: 13px; color: var(--zg-muted); }
.zg-field__error { font-size: 14px; color: var(--zg-bad); }
.zg-input {
  width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--zg-field); border-radius: var(--zg-r-control);
  background: var(--zg-surface); color: var(--zg-text);
}
/* Every dropdown, in the theme: the field of the inputs beside it, and the chevron of the search page's sort (NFR-025). */
select.zg-input {
  -webkit-appearance: none; appearance: none; padding-inline-end: 40px; cursor: pointer; text-overflow: ellipsis;
  background-image: var(--zg-chevron); background-repeat: no-repeat; background-position: right 14px center; background-size: 18px;
}
select.zg-input:hover:not(:disabled) { border-color: var(--zg-accent); }
select.zg-input:disabled { cursor: not-allowed; }
/* The list that opens, in the theme too, with a mouse or trackpad. A touch screen keeps the browser's own picker,
   which suits a thumb and is what people expect there (R29-7); so do browsers without this. */
@media (pointer: fine) { @supports (appearance: base-select) {
  select.zg-input, .zg-select select { appearance: base-select; display: flex; align-items: center; }
  select.zg-input::picker-icon, .zg-select select::picker-icon { display: none; }
  select.zg-input::picker(select), .zg-select select::picker(select) {
    appearance: base-select; margin-block: 4px; padding: 6px; border: 1px solid var(--zg-line); border-radius: 14px;
    max-block-size: min(320px, 60vh); overflow-y: auto;
    /* Down, and up only when it does not fit: the browser's default is the side with the most room. */
    position-try-order: normal;
    background: var(--zg-surface); color: var(--zg-text); box-shadow: 0 12px 28px rgba(10, 12, 27, .28);
    opacity: 1; transform: none;
    transition: opacity var(--zg-t-fast) var(--zg-ease), transform var(--zg-t-fast) var(--zg-ease);
  }
  @starting-style {
    select.zg-input::picker(select), .zg-select select::picker(select) { opacity: 0; transform: translateY(-4px); }
  }
  select.zg-input option, .zg-select select option {
    display: flex; align-items: center; min-height: 40px; padding: 8px 12px; border-radius: 10px;
    background: transparent; color: var(--zg-text); font: 400 15px var(--zg-font); cursor: pointer;
  }
  select.zg-input option::checkmark, .zg-select select option::checkmark { display: none; }
  select.zg-input option:hover, select.zg-input option:focus-visible, .zg-select select option:hover, .zg-select select option:focus-visible {
    background: var(--zg-tint); color: var(--zg-text); outline: none;
  }
  select.zg-input option:checked, .zg-select select option:checked { color: var(--zg-accent); font-weight: 600; }
  @media (prefers-reduced-motion: reduce) {
    select.zg-input::picker(select), .zg-select select::picker(select) { transition: none; }
  }
} }
.zg-input[aria-invalid="true"] { border: 2px solid var(--zg-bad); }

.zg-chip {
  min-height: 44px; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--zg-field); background: transparent; color: var(--zg-text); text-decoration: none;
  font-size: 14px; font-weight: 500; white-space: nowrap; cursor: pointer;
}
.zg-chip[aria-pressed="true"] { border: 1.5px solid var(--zg-accent); background: var(--zg-tint); color: var(--zg-accent); }

.zg-status { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: var(--zg-r-chip); background: var(--zg-raised); font-size: 13px; font-weight: 600; }
.zg-status::before { content: ""; width: 7px; height: 7px; border-radius: 999px; background: currentColor; }
.zg-status--ok { color: var(--zg-ok); }
.zg-status--warn { color: var(--zg-warn); }
.zg-status--bad { color: var(--zg-bad); }
.zg-status--accent { color: var(--zg-accent); }

/* --- surfaces ------------------------------------------------------------------------------ */

.zg-card { background: var(--zg-surface); border-radius: var(--zg-r-card); padding: 16px; }
.zg-card--line { border: 1px solid var(--zg-line); }
.zg-note { display: flex; gap: 12px; padding: 14px; border-radius: 16px; border: 1.5px solid var(--zg-warn); background: var(--zg-surface); }

.zg-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 48px 24px; }
.zg-state__icon { width: 72px; height: 72px; border-radius: 999px; display: grid; place-items: center; background: var(--zg-raised); color: var(--zg-muted); }
.zg-state--error .zg-state__icon { color: var(--zg-warn); }

.zg-skel { background: var(--zg-raised); border-radius: 8px; }
@media (prefers-reduced-motion: no-preference) {
  .zg-skel { animation: zg-pulse 1.4s ease-in-out infinite; }
}
@keyframes zg-pulse { 50% { opacity: 0.55; } }

/* --- starfield (brand band) ---------------------------------------------------------------- */

.zg-hero { position: relative; overflow: hidden; background: var(--zg-bg); color: var(--zg-text); }
.zg-hero > :not(.zg-stars) { position: relative; }
.zg-stars { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  .zg-tw { animation: zg-tw 4.2s ease-in-out infinite; }
  .zg-tw2 { animation: zg-tw 5.6s ease-in-out -2.1s infinite; }
}
@keyframes zg-tw { 0%, 100% { opacity: 0.9; } 50% { opacity: 0.2; } }

/* --- footer ------------------------------------------------------------------------------ */

.zg-footer {
  display: flex; flex-direction: column; gap: 28px;
  padding-bottom: calc(var(--zg-tabbar-h) + 16px);
}
.zg-prefs { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }

@media (min-width: 900px) { .zg-footer { padding-bottom: 24px; } }
.zg-main:focus { outline: none; }
/* Phones reach language and theme from the profile tab, as in the approved prototype. */
@media (max-width: 899px) { .zg-footer { display: none; } .zg-main { padding-bottom: calc(var(--zg-tabbar-h) + 16px); } }

/* --- responsive helpers ------------------------------------------------------------------- */

@media (max-width: 899px) { .zg-desk { display: none !important; } }
@media (min-width: 900px) { .zg-phone { display: none !important; } }
.zg-prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }

/* --- sections ----------------------------------------------------------------------------- */

.zg-section { display: flex; flex-direction: column; gap: 12px; }
.zg-section__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.zg-section__title { font-size: 18px; font-weight: 600; }
.zg-section__title--sm { font-size: 17px; }
.zg-section__more { font-size: 14px; font-weight: 600; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.zg-page__title { font-size: 24px; overflow-wrap: anywhere; }
.zg-state__title { font-size: 20px; line-height: 1.3; }
.zg-state__mark { color: var(--zg-field); opacity: 0.7; }
@media (min-width: 900px) {
  .zg-section { gap: 16px; }
  .zg-section__title { font-family: var(--zg-display); font-weight: 700; font-size: 24px; }
  .zg-section__title--sm { font-family: var(--zg-font); font-weight: 600; font-size: 18px; }
  .zg-page__title { font-size: 28px; }
}

/* --- listing cards ------------------------------------------------------------------------ */

.zg-cards { list-style: none; margin: 0; padding: 0; }
.zg-cards > li { min-width: 0; }
.zg-cards__more { grid-column: 1 / -1; }
.zg-lcard { position: relative; height: 100%; border-radius: 16px; overflow: hidden; background: var(--zg-surface); }
.zg-lcard__link { display: flex; flex-direction: column; height: 100%; color: var(--zg-text); text-decoration: none; }
.zg-lcard__img {
  position: relative; aspect-ratio: 4 / 3; width: 100%; display: grid; place-items: center;
  background: var(--zg-raised); color: var(--zg-muted); overflow: hidden;
}
.zg-lcard__img img { width: 100%; height: 100%; object-fit: cover; }
/* A card's other photos (SRC-034). They swap at once: a pointer sweeping across must not wait for a fade. */
.zg-lcard__more { position: absolute; inset: 0; visibility: hidden; pointer-events: none; }
.zg-lcard__more[data-on="true"] { visibility: visible; }
.zg-lcard__img[data-slow="true"] > img { filter: blur(2px) brightness(.95); }
.zg-lcard__loadbar { position: absolute; inset: 0 0 auto; height: 3px; overflow: hidden; background: color-mix(in srgb, var(--zg-accent) 15%, transparent); pointer-events: none; }
.zg-lcard__loadbar > span { display: block; width: 25%; height: 100%; background: var(--zg-accent); animation: zg-card-loadbar 1.1s var(--zg-ease) infinite; }
@keyframes zg-card-loadbar { from { transform: translateX(-100%); } to { transform: translateX(400%); } }
.zg-lcard__morecount { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(10, 12, 27, .55); color: #fff; font-size: 14px; font-weight: 600; pointer-events: none; }
.zg-lcard__dots { position: absolute; left: 50%; bottom: 8px; display: flex; gap: 5px; transform: translateX(-50%); pointer-events: none; }
.zg-lcard__dots > span { width: 6px; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .6); box-shadow: 0 0 2px rgba(10, 12, 27, .6); transition: width var(--zg-t-fast) var(--zg-ease), background-color var(--zg-t-fast) var(--zg-ease); }
.zg-lcard__dots > span[data-on="true"] { width: 16px; background: #fff; }
@media (prefers-reduced-motion: reduce) { .zg-lcard__dots > span { transition: none; } .zg-lcard__loadbar > span { animation: none; width: 100%; } }
.zg-lcard__badge {
  position: absolute; left: 10px; top: 10px; padding: 2px 10px; border-radius: 8px;
  background: var(--zg-text); color: var(--zg-bg); font-size: 12px; font-weight: 600;
}
.zg-lcard__body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.zg-lcard__price { font-size: 16px; }
.zg-lcard__title, .zg-lcard__meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zg-lcard__title { font-size: 14px; font-weight: 600; }
.zg-lcard__meta { font-size: 13px; color: var(--zg-muted); }
.zg-lcard__link:hover .zg-lcard__title { text-decoration: underline; }
.zg-fav {
  width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 999px;
  background: transparent; color: var(--zg-text); cursor: pointer;
}
.zg-fav__dot { width: 32px; height: 32px; border-radius: 999px; display: grid; place-items: center; background: var(--zg-surface); }
.zg-fav[aria-pressed="true"] { color: var(--zg-accent); }
.zg-lcard__fav { position: absolute; top: 6px; right: 6px; }

/* --- home --------------------------------------------------------------------------------- */

.zg-home__hero { color: var(--zg-text); }
.zg-home__hero .zg-stars { color: var(--zg-accent); }
.zg-stars__spark { fill: var(--zg-accent-2); }
.zg-home__hero-body { display: flex; flex-direction: column; gap: 14px; padding-top: 20px; padding-bottom: 18px; }
.zg-home__heading { font-size: 24px; }
.zg-home__lead { max-width: 600px; font-size: 18px; color: var(--zg-muted); }
.zg-home__search {
  height: 48px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border: 1px solid var(--zg-field);
  border-radius: var(--zg-r-control); background: var(--zg-surface); color: var(--zg-muted); text-decoration: none;
}
.zg-home__ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.zg-btn--neon { background: var(--zg-accent); color: var(--zg-on-accent); }
.zg-btn--outline-neon { background: transparent; color: var(--zg-text); border: 1.5px solid var(--zg-accent); }
.zg-home { gap: 24px; }
@media (min-width: 900px) {
  .zg-home__hero-body { padding-top: 72px; padding-bottom: 64px; gap: 20px; }
  .zg-home__heading { max-width: 720px; font-size: clamp(32px, 5vw, 52px); line-height: 1.1; }
  .zg-home { gap: 48px; padding-top: 40px; }
}

/* One width for every chip: the widest one's (R24-9). */
.zg-cats { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; }
.zg-cats__item {
  flex: none; min-height: 44px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 999px;
  background: var(--zg-surface); border: 1px solid var(--zg-line); color: var(--zg-text);
  text-decoration: none; font-size: 14px; font-weight: 500; white-space: nowrap;
}
.zg-cats__item:hover { border-color: var(--zg-accent); }
@media (min-width: 900px) {
  .zg-cats:not(.zg-cats--sub) { display: grid; grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin: 0; padding: 0; overflow: visible; }
  .zg-cats:not(.zg-cats--sub) .zg-cats__item {
    min-height: 72px; padding: 14px 16px; border-radius: 16px; align-items: flex-end;
    font-size: 16px; font-weight: 600; white-space: normal; line-height: 1.25;
  }
  .zg-cats--sub { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); margin: 0; padding: 0; overflow: visible; }
}

.zg-promise {
  display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px;
  background: var(--zg-surface); color: var(--zg-text); text-decoration: none; font-size: 14px;
}
.zg-promise svg { flex: none; color: var(--zg-accent); }
/* The row's whole width in every language, since the bolder words are wider than their reservation. */
.zg-promise > span { flex: 1; min-width: 0; }
.zg-promise .zg-tr { display: grid; width: 100%; }
.zg-promise strong { color: var(--zg-accent); font-weight: 600; }

.zg-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.zg-steps__item { padding: 20px; border-radius: var(--zg-r-card); background: var(--zg-surface); display: flex; flex-direction: column; gap: 6px; }
.zg-steps__n { font-size: 28px; color: var(--zg-accent); line-height: 1; }
.zg-steps__item strong { font-size: 17px; }

/* --- search ------------------------------------------------------------------------------- */

.zg-searchbox { position: relative; display: flex; gap: 8px; align-items: center; }
.zg-searchbox > svg { position: absolute; left: 14px; top: 14px; color: var(--zg-muted); pointer-events: none; }
.zg-searchbox__input { flex: 1; min-width: 0; padding-left: 44px; padding-right: 44px; }
.zg-searchbox__input::-webkit-search-cancel-button { display: none; }
.zg-searchbox__clear { position: absolute; right: 2px; top: 2px; color: var(--zg-muted); }
.zg-searchbox:has(.zg-searchbox__submit) .zg-searchbox__clear { right: 112px; }
@media (max-width: 899px) { .zg-searchbox .zg-searchbox__clear { right: 2px; } }
.zg-searchbox__submit { flex: none; width: 104px; }

.zg-search { display: flex; flex-direction: column; gap: 16px; }
.zg-search__bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.zg-chip--filters { background: var(--zg-surface); color: var(--zg-text); border-color: var(--zg-line); font-weight: 600; }
.zg-chip--filters-on { background: var(--zg-accent); color: var(--zg-on-accent); border-color: transparent; }
.zg-chip--remove { gap: 6px; padding: 0 10px 0 14px; }
.zg-activefilters { display: flex; gap: 8px; flex-wrap: wrap; }
.zg-search__sort { display: flex; align-items: center; gap: 8px; margin-left: auto; font-size: 14px; }
.zg-input--sm { width: auto; min-height: 44px; padding: 0 10px; font-size: 14px; }
.zg-search__layout { display: flex; gap: 24px; align-items: flex-start; }
.zg-search__aside {
  flex: 0 0 280px; position: sticky; top: var(--zg-side-top, 16px); padding: 20px; border-radius: var(--zg-r-card);
  background: var(--zg-surface); display: flex; flex-direction: column; gap: 16px;
}
.zg-search__results { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.zg-search__count { font-size: 14px; }
.zg-search__more { align-self: center; margin-top: 8px; }

.zg-flip { position: relative; } /* motion/use-list-motion places what is leaving against it */
.zg-activefilters:empty { display: none; }
.zg-filters { display: flex; flex-direction: column; gap: 20px; }
.zg-fieldset { margin: 0; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.zg-fieldset legend { padding: 0; margin-bottom: 6px; }
.zg-filters__pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.zg-filters__pair label { display: flex; flex-direction: column; gap: 4px; }
.zg-filters__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.zg-filters__chips .zg-chip { border-radius: 10px; }
/* A chip holding a whole sentence wraps on a narrow screen, in every language's reservation too. */
.zg-report .zg-tr__on { text-align: start; }
.zg-chip.zg-self-start { white-space: normal; max-width: 100%; height: auto; }

/* One row in every language, so nothing under it moves, though each crumb is as wide as its own text (I18-015). */
.zg-crumbs { font-size: 14px; color: var(--zg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zg-crumbs a { min-height: 44px; display: inline-flex; align-items: center; }

/* --- filter sheet (phone) ------------------------------------------------------------------ */

.zg-sheet {
  margin: auto 0 0; width: 100%; max-width: 100%; max-height: calc(100dvh - 56px); padding: 0; border: 0;
  border-radius: var(--zg-r-sheet) var(--zg-r-sheet) 0 0; background: var(--zg-surface); color: var(--zg-text);
}
.zg-sheet[open] { display: flex; flex-direction: column; }
.zg-sheet::backdrop { background: rgba(5, 6, 14, 0.6); }
.zg-sheet__head { display: flex; align-items: center; justify-content: space-between; padding: 10px 8px 8px 16px; border-bottom: 1px solid var(--zg-line); }
.zg-sheet__title { font-size: 18px; font-weight: 600; }
.zg-sheet__body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; }
.zg-sheet__foot { display: flex; gap: 10px; padding: 12px 16px 20px; border-top: 1px solid var(--zg-line); }
.zg-sheet__foot .zg-btn { flex: 1; }
.zg-sheet__foot .zg-sheet__apply { flex: 1.4; }

/* --- listing page ------------------------------------------------------------------------- */

.zg-item { display: flex; flex-direction: column; gap: 16px; }
.zg-item__media, .zg-item__side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (min-width: 900px) {
  .zg-item { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr); gap: 32px; align-items: start; }
  .zg-item__side { position: sticky; top: var(--zg-side-top, 16px); }
}
.zg-gallery { display: flex; flex-direction: column; gap: 10px; }
.zg-gallery__main {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--zg-r-card); overflow: hidden;
  background: var(--zg-raised); display: grid; place-items: center;
}
.zg-gallery__main img { width: 100%; height: 100%; object-fit: contain; }
/* Never the pointer's target: a photo swapped out from under it would take the news of leaving with it (SRC-035). */
.zg-gallery__layer { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.zg-gallery__layer--in { animation: zg-gallery-in var(--zg-t-med) var(--zg-ease) both; }
@keyframes zg-gallery-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .zg-gallery__layer--back { display: none; }
  .zg-gallery__layer--in { animation: none; }
  .zg-gallery__nav, .zg-gallery__nav svg { transition: none; }
  .zg-gallery__nav:hover, .zg-gallery__nav:active, .zg-gallery__nav:hover svg { transform: none; }
}
.zg-gallery__none { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--zg-muted); }
.zg-gallery__badge { left: 14px; top: 14px; font-size: 14px; }
/* No transform to centre it: a press's or a hover's would replace it, and the arrow would jump (SRC-035). */
.zg-gallery__nav {
  position: absolute; top: calc(50% - 22px); width: 44px; height: 44px; border: 0; border-radius: 999px;
  display: grid; place-items: center; background: var(--zg-surface); color: var(--zg-text); cursor: pointer; opacity: 0.94;
  box-shadow: 0 2px 8px rgba(10, 12, 27, .22);
  transition: transform var(--zg-t-fast) var(--zg-ease), box-shadow var(--zg-t-fast) var(--zg-ease), opacity var(--zg-t-fast) var(--zg-ease);
}
.zg-gallery__nav svg { transition: transform var(--zg-t-fast) var(--zg-ease); }
@media (hover: hover) {
  .zg-gallery__nav:hover { opacity: 1; transform: scale(1.08); box-shadow: 0 6px 16px rgba(10, 12, 27, .28); }
  .zg-gallery__nav--prev:hover svg { transform: translateX(-2px); }
  .zg-gallery__nav--next:hover svg { transform: translateX(2px); }
}
.zg-gallery__nav:active { box-shadow: 0 1px 4px rgba(10, 12, 27, .22); }
.zg-gallery__nav--prev { left: 10px; }
.zg-gallery__nav--next { right: 10px; }
.zg-gallery__count {
  position: absolute; right: 12px; bottom: 12px; padding: 2px 10px; border-radius: 999px;
  background: rgba(10, 12, 27, 0.72); color: #EEF0FF; font-size: 13px; font-weight: 600;
}
.zg-gallery__thumbs { display: flex; gap: 8px; overflow-x: auto; }
.zg-gallery__thumb {
  flex: none; width: 64px; height: 64px; padding: 0; border-radius: 10px; overflow: hidden; cursor: pointer;
  border: 1px solid var(--zg-line); background: var(--zg-raised);
}
.zg-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.zg-gallery__thumb[aria-pressed="true"] { border: 2px solid var(--zg-accent); }

.zg-item__buy { display: flex; flex-direction: column; gap: 14px; }
.zg-item__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.zg-item__title { font-size: 20px; font-weight: 600; overflow-wrap: anywhere; }
.zg-item__price { font-size: 26px; }
.zg-item__fav { flex: none; background: var(--zg-raised); border-radius: var(--zg-r-control); }
.zg-item__fav .zg-fav__dot { background: transparent; }
.zg-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.zg-actions .zg-actions__buy { grid-column: 1 / -1; }
.zg-actions .zg-btn { padding: 0 12px; }
.zg-note { border-color: var(--zg-warn); }

.zg-estimate { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--zg-line); }
.zg-estimate__title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--zg-accent); }
.zg-estimate__rows { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.zg-estimate__row { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.zg-estimate__row dd { margin: 0; text-align: right; }
.zg-estimate__note { font-size: 13px; color: var(--zg-muted); }

.zg-details { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; padding: 16px; border-radius: var(--zg-r-card); background: var(--zg-surface); }
.zg-details dt { font-size: 13px; color: var(--zg-muted); }
.zg-details dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.zg-item__desc { display: flex; flex-direction: column; gap: 8px; }

.zg-seller {
  display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--zg-r-card);
  background: var(--zg-surface); color: var(--zg-text); text-decoration: none;
}
.zg-seller__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.zg-seller__name { font-weight: 600; }
.zg-seller__meta { font-size: 14px; }
.zg-avatar {
  flex: none; width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center;
  background: var(--zg-tint); color: var(--zg-accent); font-weight: 700; text-transform: uppercase;
}
.zg-avatar--lg { width: 72px; height: 72px; font-size: 24px; font-family: var(--zg-display); }
.zg-report { align-self: flex-start; color: var(--zg-muted); padding: 0 4px; }

/* --- member profile ------------------------------------------------------------------------ */

.zg-profile { display: flex; gap: 16px; align-items: center; }
.zg-profile__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.zg-profile__name { font-size: 22px; overflow-wrap: anywhere; }
.zg-profile__badges { display: flex; gap: 8px; flex-wrap: wrap; }
.zg-ratingboxes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 560px; }
.zg-ratingbox { padding: 14px; border-radius: 16px; background: var(--zg-surface); display: flex; flex-direction: column; gap: 2px; }
.zg-ratingbox__label { font-size: 13px; }
.zg-ratingbox__avg { font-size: 24px; }
.zg-ratingbox__of { font-family: var(--zg-font); font-size: 14px; font-weight: 400; }
.zg-tabs { display: flex; border-bottom: 1px solid var(--zg-line); }
.zg-tabs__tab {
  min-height: 48px; padding: 0 16px; border: 0; border-bottom: 3px solid transparent; background: transparent;
  color: var(--zg-muted); font-weight: 600; cursor: pointer;
}
.zg-tabs__tab[aria-selected="true"] { color: var(--zg-text); border-bottom-color: var(--zg-accent); }
.zg-ratings { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.zg-ratings__item { padding: 14px; border-radius: 16px; background: var(--zg-surface); display: flex; flex-direction: column; gap: 4px; }
.zg-ratings__head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.zg-ratings__who { font-weight: 600; }
.zg-stars { color: var(--zg-accent-2); letter-spacing: 2px; }
.zg-state__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* --- list filters (DECISIONS R14-1) -------------------------------------------------------- */

.zg-facet__n { font-size: 12px; font-weight: 500; color: var(--zg-muted); }
.zg-chip[aria-pressed="true"] .zg-facet__n { color: inherit; }
.zg-chip--size { min-width: 52px; justify-content: center; border-radius: 10px; padding: 0 12px; font-weight: 600; }
.zg-chip--colour { border-radius: 10px; padding: 0 12px 0 8px; }
.zg-swatch { width: 22px; height: 22px; border-radius: 999px; flex: none; border: 1px solid var(--zg-field); }
.zg-chip[aria-pressed="true"] .zg-swatch { outline: 2px solid var(--zg-accent); outline-offset: 1px; }
.zg-swatch--black { background: #16181F; }
.zg-swatch--white { background: #FFFFFF; }
.zg-swatch--grey { background: #9096A3; }
.zg-swatch--beige { background: #DCC9A6; }
.zg-swatch--brown { background: #7A4E2B; }
.zg-swatch--red { background: #D32F3C; }
.zg-swatch--pink { background: #F08CB6; }
.zg-swatch--orange { background: #F0802A; }
.zg-swatch--yellow { background: #F5D131; }
.zg-swatch--green { background: #2F9E5B; }
.zg-swatch--blue { background: #2F73D9; }
.zg-swatch--navy { background: #1B2A5B; }
.zg-swatch--purple { background: #7E4BC9; }
.zg-swatch--gold { background: linear-gradient(135deg, #F3D67A, #B98A25); }
.zg-swatch--silver { background: linear-gradient(135deg, #EEF0F4, #A4A9B4); }
.zg-swatch--multicolour { background: conic-gradient(#D32F3C, #F5D131, #2F9E5B, #2F73D9, #7E4BC9, #D32F3C); }
.zg-facet__find { position: relative; }
.zg-facet__find svg { position: absolute; left: 12px; top: 15px; color: var(--zg-muted); pointer-events: none; }
.zg-facet__find .zg-input { padding-left: 38px; }
.zg-facet__find .zg-input::-webkit-search-cancel-button { display: none; }
.zg-facet__list { list-style: none; margin: 4px 0 0; padding: 0; max-height: 268px; overflow-y: auto; }
.zg-facet__row { min-height: 44px; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.zg-facet__row input { width: 20px; height: 20px; flex: none; accent-color: var(--zg-accent); }
.zg-facet__name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.zg-facet__none { font-size: 14px; padding: 8px 0; }

/* --- login --------------------------------------------------------------------------------- */

.zg-auth { max-width: 460px; display: flex; flex-direction: column; gap: 16px; padding-top: 24px; padding-bottom: 32px; }
.zg-auth__form { display: flex; flex-direction: column; gap: 16px; }
.zg-auth__link { align-self: center; min-height: 44px; display: inline-flex; align-items: center; font-weight: 600; text-decoration: none; }
.zg-auth__other { text-align: center; }
.zg-auth__other a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }

/* --- checkout, payment and order ----------------------------------------------------------- */

.zg-small { font-size: 14px; }
.zg-block { display: block; }
.zg-pagehead { display: flex; align-items: center; gap: 4px; margin-left: -8px; }
.zg-section__legend { padding: 0; margin-bottom: 8px; font-size: 17px; font-weight: 600; }
.zg-card.zg-fieldset { padding: 16px; gap: 8px; }
.zg-card.zg-fieldset legend { float: left; width: 100%; }
.zg-card.zg-fieldset legend + * { clear: both; }
.zg-choice { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; padding: 8px 0; cursor: pointer; }
.zg-choice input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--zg-accent); }
.zg-choice--box { padding: 12px 14px; border: 1px solid var(--zg-line); border-radius: 14px; }
.zg-choice--box[data-on="true"] { border: 1.5px solid var(--zg-accent); }
.zg-choice__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.zg-choice__head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.zg-choice__title { font-weight: 600; }
.zg-choice__price { font-weight: 600; white-space: nowrap; }
.zg-btn--big { min-height: 52px; font-size: 17px; width: 100%; }
.zg-btn--dashed { background: transparent; color: var(--zg-accent); border: 1.5px dashed var(--zg-accent); width: 100%; }
.zg-thumb { width: 64px; height: 64px; flex: none; border-radius: 12px; overflow: hidden; background: var(--zg-raised); display: block; }
.zg-thumb img { width: 100%; height: 100%; object-fit: cover; }
.zg-orderhead { display: flex; gap: 12px; align-items: center; }
.zg-orderhead__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.zg-orderhead__body a { color: inherit; }
.zg-checkout { display: flex; flex-direction: column; gap: 16px; }
.zg-checkout__main, .zg-checkout__side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.zg-checkout__sum { display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 900px) {
  .zg-checkout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); gap: 24px; align-items: start; }
  .zg-checkout__side { position: sticky; top: var(--zg-side-top, 16px); }
}
.zg-lines { margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.zg-lines__row { display: flex; justify-content: space-between; gap: 12px; }
.zg-lines__row dd { margin: 0; white-space: nowrap; }
.zg-lines__total { padding-top: 10px; border-top: 1px solid var(--zg-line); font-weight: 700; font-size: 18px; }
.zg-addressform { display: flex; flex-direction: column; gap: 12px; padding-top: 8px; }
.zg-addressform__title { font-size: 16px; font-weight: 600; }
.zg-addressform__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.zg-pay { max-width: 560px; }
.zg-pay__amount { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0; text-align: center; }
.zg-pay__total { font-size: 34px; line-height: 1.15; }
.zg-pay__safe { display: flex; gap: 12px; }
.zg-pay__safe svg { flex: none; color: var(--zg-accent); }
.zg-result { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; padding: 40px 12px; }
.zg-result__title { font-size: 24px; line-height: 1.25; }
.zg-result__icon {
  width: 88px; height: 88px; border-radius: 999px; display: grid; place-items: center;
  font-size: 44px; font-weight: 700; background: var(--zg-raised);
}
.zg-result__icon--ok { background: var(--zg-accent); color: var(--zg-on-accent); }
.zg-result__icon--warn { color: var(--zg-warn); }
.zg-result__icon--bad { color: var(--zg-bad); }
.zg-result__action { align-self: stretch; }
.zg-result__spin { width: 72px; height: 72px; border-radius: 999px; border: 6px solid var(--zg-line); border-top-color: var(--zg-accent); }
@media (prefers-reduced-motion: no-preference) {
  .zg-result__spin { animation: zg-spin 1.1s linear infinite; }
}
@keyframes zg-spin { to { transform: rotate(360deg); } }
.zg-order { max-width: 720px; }
.zg-nextstep { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 16px; background: var(--zg-surface); border: 1.5px solid var(--zg-accent); }
.zg-nextstep--off { border-color: var(--zg-line); }
.zg-nextstep__title { font-size: 17px; }
.zg-nextstep__actions { display: flex; flex-direction: column; gap: 10px; }
.zg-timeline { list-style: none; margin: 0; padding: 0; }
.zg-timeline__step { position: relative; display: flex; gap: 12px; min-height: 52px; padding-bottom: 10px; }
.zg-timeline__dot { width: 16px; height: 16px; flex: none; margin-top: 3px; border-radius: 999px; border: 2px solid var(--zg-field); background: transparent; }
.zg-timeline__step:not(:last-child)::before { content: ""; position: absolute; left: 7px; top: 22px; bottom: 0; width: 2px; background: var(--zg-line); }
.zg-timeline__step--done .zg-timeline__dot { border-color: var(--zg-accent); background: var(--zg-accent); }
.zg-timeline__step--done:not(:last-child)::before { background: var(--zg-accent); }
.zg-timeline__text { display: flex; flex-direction: column; }
.zg-timeline__step:not(.zg-timeline__step--done) .zg-timeline__label { color: var(--zg-muted); }
.zg-timeline__step[aria-current="step"] .zg-timeline__label { font-weight: 700; }
.zg-tracking__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.zg-order__help { display: flex; flex-wrap: wrap; gap: 8px; }
.zg-verify-next { margin: 8px 0 0 32px; }
.zg-collectcode { display: flex; flex-direction: column; gap: 4px; }
.zg-collectcode__value { font-size: 28px; }

/* --- profile tab and addresses ------------------------------------------------------------- */

.zg-menu { border-radius: var(--zg-r-card); background: var(--zg-surface); overflow: hidden; }
.zg-menu__row {
  min-height: 56px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  color: var(--zg-text); text-decoration: none; border-top: 1px solid var(--zg-line);
}
.zg-menu__row:first-child { border-top: 0; }
.zg-account__balance { font-size: 24px; }
.zg-account__logout { align-self: center; color: var(--zg-bad); }
.zg-addresslist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.zg-addressrow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.zg-addressrow__actions { display: flex; flex-wrap: wrap; gap: 4px; }
.zg-auth__form > .zg-status { align-self: flex-start; }

/* --- selling (S14, S15, S16, S31) ------------------------------------------------------------ */
.zg-sell { max-width: 1100px; }
.zg-pagehead--between { justify-content: space-between; flex-wrap: wrap; }
.zg-savestate { min-height: 20px; }
.zg-accent { color: var(--zg-accent); }
.zg-sellgrid { display: flex; flex-direction: column; gap: 20px; }
.zg-sellgrid__fields { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 20px; }
.zg-sellmain { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.zg-sellabout { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.zg-field--wide { grid-column: 1 / -1; }
.zg-field__label--row { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; width: 100%; }
.zg-field__optional { font-weight: 400; }
.zg-textarea { padding: 12px 14px; resize: vertical; font: inherit; line-height: 1.5; }
.zg-sellsub { display: flex; flex-direction: column; gap: 14px; margin: 0 0 8px 34px; }
.zg-check { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; padding: 8px 0; }
.zg-check input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--zg-accent); }
.zg-check__text { display: flex; flex-direction: column; font-weight: 500; }
.zg-triple { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.zg-sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.zg-size { min-height: 56px; border-radius: 10px; border: 1px solid var(--zg-field); background: transparent; color: var(--zg-text);
  display: flex; flex-direction: column; align-items: center; justify-content: center; font: 600 15px var(--zg-font); cursor: pointer; }
.zg-size--on { border: 1.5px solid var(--zg-accent); background: var(--zg-tint); }
.zg-size { padding: 8px 4px; gap: 2px; }
.zg-size .zg-small { white-space: nowrap; }
.zg-size__name { display: block; text-align: center; overflow-wrap: anywhere; line-height: 1.2; }
.zg-size s, .zg-size s * { text-decoration: line-through; }
/* Tiles with an icon: categories and couriers on the listing form (R20-1). */
.zg-catpick { gap: 8px; }
.zg-catpick__tiles { display: grid; gap: 8px; outline: none; }
.zg-catpick__back .zg-tr__on { text-align: start; }
.zg-catpick__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.zg-catpick__back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 8px 0 0; border: 0; background: none;
  color: var(--zg-accent); font: 500 14px var(--zg-font); cursor: pointer; }
.zg-catpick__group { display: inline-flex; align-items: center; gap: 6px; color: var(--zg-muted); font-size: 14px; font-weight: 500; }
.zg-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); grid-auto-rows: 1fr; gap: 8px; }
/* In the filters and on a category page: two rows of text at most, ending in "…" (SRC-033). */
.zg-filters .zg-tile, .zg-cats--sub .zg-tile { min-height: 0; padding: 10px 6px 8px; gap: 4px; }
.zg-filters .zg-tile__name, .zg-cats--sub .zg-tile__name { height: 2.5em; overflow: hidden; }
.zg-filters .zg-tile__name .zg-tr, .zg-cats--sub .zg-tile__name .zg-tr { display: grid; grid-template-rows: 2.5em; width: 100%; height: 2.5em; }
.zg-filters .zg-tile__name .zg-tr__on, .zg-cats--sub .zg-tile__name .zg-tr__on {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.zg-tiles--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.zg-tile { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 6px; min-height: 96px; padding: 12px 6px 10px;
  border-radius: 14px; border: 1px solid var(--zg-field); background: transparent; color: var(--zg-text); text-align: center;
  font: 500 13px/1.25 var(--zg-font); cursor: pointer; overflow-wrap: anywhere;
  animation: zg-tile-in var(--zg-t-med) var(--zg-ease) both; }
.zg-tile__icon { display: inline-flex; color: var(--zg-accent); transition: transform var(--zg-t-fast) var(--zg-ease); }
.zg-tile__name { display: block; width: 100%; }
.zg-tile__hint { display: block; width: 100%; color: var(--zg-muted); font-size: 12px; font-weight: 400; }
.zg-tile--on, .zg-tile[aria-current="page"] { border: 1.5px solid var(--zg-accent); background: var(--zg-tint); }
a.zg-tile { text-decoration: none; }
.zg-cats--sub .zg-tile { min-width: 104px; scroll-snap-align: start; }
.zg-tile--on .zg-tile__icon, .zg-tile[aria-current="page"] .zg-tile__icon { animation: zg-pop var(--zg-t-slow) var(--zg-ease); }
/* A short wave across the set, which never delays a click and stays within --zg-t-slow. */
.zg-tile:nth-child(n+2) { animation-delay: 6ms; } .zg-tile:nth-child(n+3) { animation-delay: 12ms; } .zg-tile:nth-child(n+4) { animation-delay: 18ms; }
.zg-tile:nth-child(n+5) { animation-delay: 24ms; } .zg-tile:nth-child(n+6) { animation-delay: 30ms; } .zg-tile:nth-child(n+7) { animation-delay: 36ms; }
.zg-tile:nth-child(n+8) { animation-delay: 42ms; } .zg-tile:nth-child(n+9) { animation-delay: 48ms; } .zg-tile:nth-child(n+10) { animation-delay: 54ms; }
.zg-tile:nth-child(n+11) { animation-delay: 60ms; } .zg-tile:nth-child(n+12) { animation-delay: 66ms; }
@keyframes zg-tile-in { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
@media (hover: hover) { .zg-tile:hover { transform: var(--zg-hover-lift); box-shadow: 0 6px 16px rgba(10, 12, 27, .14); border-color: var(--zg-accent); } }
/* Room for the suggestion is kept, so the tiles under it never jump when it appears (LST-031). */
.zg-suggest { min-height: 44px; display: flex; align-items: center; }
.zg-suggest__chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; max-width: 100%; padding: 0 14px 0 10px; border-radius: 999px;
  border: 1.5px solid var(--zg-accent); background: var(--zg-tint); color: var(--zg-text); font: 500 14px var(--zg-font); cursor: pointer; text-align: start; }
.zg-suggest__spark { display: inline-flex; color: var(--zg-accent); animation: zg-pop var(--zg-t-slow) var(--zg-ease); }
.zg-recent { display: grid; gap: 6px; margin-top: 4px; }
.zg-recent__label { display: inline-flex; align-items: center; gap: 6px; }
.zg-recent__list { display: flex; flex-wrap: wrap; gap: 6px; }
.zg-recent__chip { display: inline-flex; align-items: center; gap: 6px; }
.zg-admin__listrow { display: grid; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--zg-line); }
.zg-sizes__note { grid-column: 1 / -1; }
.zg-courierpacks { display: grid; gap: 12px; }
.zg-courierpack { display: grid; gap: 6px; }
.zg-packmeasures { display: grid; gap: 8px; }
.zg-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.zg-photos__add { aspect-ratio: 1; border-radius: 12px; border: 1.5px dashed var(--zg-accent); background: transparent; color: var(--zg-accent);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 4px; font: 600 12px var(--zg-font); cursor: pointer; }
.zg-photo { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--zg-raised); cursor: grab; }
.zg-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.zg-photo__size { position: absolute; left: 4px; bottom: 4px; padding: 0 6px; border-radius: 6px; background: rgba(10, 12, 27, .72); color: #EEF0FF; font-size: 11px; line-height: 18px; opacity: 0; pointer-events: none; transition: opacity var(--zg-t-fast) var(--zg-ease); }
.zg-photo:hover .zg-photo__size, .zg-photo:focus-within .zg-photo__size { opacity: 1; }
.zg-plainlist { list-style: none; margin: 0; padding: 0; }
.zg-photo__cover { position: absolute; left: 4px; bottom: 4px; padding: 0 6px; border-radius: 6px; background: var(--zg-accent); color: var(--zg-on-accent); font-size: 11px; font-weight: 700; }
.zg-photo__tools { position: absolute; top: 2px; right: 2px; display: flex; gap: 2px; }
.zg-photo__tool { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 8px; background: rgba(10, 12, 27, 0.78); color: #EEF0FF; cursor: pointer; }
.zg-combo { position: relative; }
.zg-combo__list { position: absolute; z-index: 20; top: 78px; left: 0; right: 0; margin: 0; padding: 4px; list-style: none; max-height: 320px; overflow-y: auto;
  border: 1px solid var(--zg-field); border-radius: var(--zg-r-control); background: var(--zg-surface); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25); }
.zg-combo__option { min-height: 44px; padding: 10px 12px; border-radius: 8px; cursor: pointer; }
.zg-combo__option--on, .zg-combo__option:hover { background: var(--zg-tint); }
.zg-combo__none { padding: 10px 12px; }
.zg-sellside { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.zg-sellprice { display: flex; flex-direction: column; gap: 14px; align-self: start; width: 100%; }
.zg-priceinput { position: relative; }
.zg-priceinput input { padding-right: 56px; min-height: 52px; font-size: 20px; }
.zg-priceinput > span { position: absolute; right: 14px; top: 14px; font-weight: 600; }
.zg-sellactions { display: flex; flex-direction: column; gap: 10px; }
.zg-btn--bad { color: var(--zg-bad); }
.zg-btn--start { align-self: flex-start; padding-left: 0; }
.zg-note--plain { border-color: var(--zg-field); }
.zg-state--left { align-items: flex-start; text-align: left; max-width: 480px; margin: 0 auto; }
.zg-gatesteps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; align-self: stretch; }
.zg-gatestep { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--zg-surface); }
.zg-gatestep__n { width: 28px; height: 28px; flex: none; border-radius: 999px; display: grid; place-items: center; background: var(--zg-raised); font-weight: 700; font-size: 14px; }
.zg-gatestep__n--on { background: var(--zg-accent); color: var(--zg-on-accent); }
.zg-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--zg-line); overflow-x: auto; }
.zg-tabs__tab { flex: none; min-height: 48px; padding: 0 12px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--zg-muted); font: 600 15px var(--zg-font); cursor: pointer; }
.zg-tabs__tab--on { border-bottom-color: var(--zg-accent); color: var(--zg-text); }
.zg-minelist { margin: 12px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.zg-minerow { display: flex; flex-direction: column; gap: 10px; }
.zg-minerow__top { display: flex; gap: 12px; }
.zg-minerow__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.zg-minerow__head { display: flex; justify-content: space-between; gap: 8px; }
.zg-minerow__title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zg-minerow__price { flex: none; }
.zg-minerow__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.zg-minerow__actions .zg-btn { flex: 1 1 120px; }
.zg-statuschip { align-self: flex-start; display: inline-flex; gap: 6px; align-items: center; padding: 2px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; }
.zg-statuschip__dot { width: 7px; height: 7px; border-radius: 999px; background: currentColor; }
.zg-statuschip--ok { color: var(--zg-ok); background: var(--zg-tint); }
.zg-statuschip--warn { color: var(--zg-warn); background: var(--zg-raised); }
.zg-statuschip--bad { color: var(--zg-bad); background: var(--zg-raised); }
.zg-statuschip--lime { color: var(--zg-accent-2); background: var(--zg-raised); }
.zg-statuschip--off { color: var(--zg-muted); background: var(--zg-raised); }
.zg-appeal { display: flex; flex-direction: column; gap: 10px; }
.zg-idcard { display: flex; flex-direction: column; gap: 8px; border: 1.5px solid var(--zg-field); }
.zg-idcard--ok { border-color: var(--zg-ok); color: inherit; }
.zg-idcard--warn { border-color: var(--zg-warn); }
.zg-idcard--bad { border-color: var(--zg-bad); }
.zg-idcard__title { margin: 0; display: inline-flex; gap: 8px; align-items: center; font-size: 17px; font-weight: 700; }
.zg-idcard__dot { width: 10px; height: 10px; border-radius: 999px; background: var(--zg-field); }
.zg-idcard--ok .zg-idcard__dot { background: var(--zg-ok); }
.zg-idcard--warn .zg-idcard__dot { background: var(--zg-warn); }
.zg-idcard--bad .zg-idcard__dot { background: var(--zg-bad); }
.zg-idcard .zg-btn { align-self: flex-start; }
@media (min-width: 900px) {
  .zg-sellgrid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
  /* The price and the buttons stay in view while the form scrolls (R24-1). */
  .zg-sellside { position: sticky; top: var(--zg-side-top, 16px); }
}

/* --- after a sale (S23, S37, S38, S40) -------------------------------------------------------- */
.zg-choice--off { opacity: 0.6; }
.zg-center { text-align: center; }
.zg-qr { display: block; border-radius: 8px; }
.zg-label { display: flex; flex-direction: column; gap: 16px; }
.zg-label__head { display: flex; justify-content: space-between; align-items: center; }
.zg-label__code { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px; border-radius: 20px; background: #FFFFFF; color: #12142A; }
.zg-label__number { font-size: 22px; letter-spacing: 0.06em; text-align: center; }
.zg-label__pin { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.zg-label__pinvalue { font-size: 30px; letter-spacing: 0.12em; color: var(--zg-accent); }
.zg-labelrows { margin: 0; }
.zg-labelrow { display: flex; align-items: center; gap: 8px; min-height: 52px; border-top: 1px solid var(--zg-line); }
.zg-labelrow__text { flex: 1; min-width: 0; padding: 6px 0; }
.zg-labelrow__text dd { margin: 0; overflow-wrap: anywhere; }
.zg-copy { flex: none; }
.zg-pickupcode { font-size: 40px; letter-spacing: 0.18em; }
.zg-pickupinput { min-height: 60px; font-size: 28px; letter-spacing: 0.18em; text-align: center; }
.zg-link--bad { color: var(--zg-bad); font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
.zg-nextstep--warn { border-color: var(--zg-warn); }
.zg-proofs { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.zg-proofs img { width: 100%; border-radius: 10px; display: block; }
.zg-stepper { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.zg-stepper__controls { display: inline-flex; align-items: center; gap: 8px; }
.zg-stepper__btn { width: 44px; height: 44px; border: 1px solid var(--zg-field); border-radius: 10px; background: transparent; color: var(--zg-text); font-size: 20px; cursor: pointer; }
.zg-stepper__value { min-width: 84px; text-align: center; font-weight: 600; }

/* --- the same space in every language (R16-3): the other languages reserve their room invisibly ----- */
.zg-tr { display: inline-grid; grid-template-columns: minmax(0, 1fr); max-width: 100%; min-width: 0; vertical-align: baseline; }
/* First in order, so the visible text gives the baseline, not the reservation of no height before it. */
.zg-tr__on { grid-area: 1 / 1; min-width: 0; order: -1; }
.zg-tr__hold { grid-area: 1 / 1; min-width: 0; visibility: hidden; pointer-events: none; }
.zg-tr__hold::before { content: attr(data-c); }
.zg-tr[data-a]::before, .zg-tr[data-b]::after { grid-area: 1 / 1; visibility: hidden; pointer-events: none; min-width: 0; }
/* Width from every other language, one per line and at no height; height from the longest (R24-9). */
.zg-tr[data-a]::before { content: attr(data-a); white-space: pre-line; height: 0; overflow: hidden; }
.zg-tr[data-b]::after { content: attr(data-b); }
a:not([class]) .zg-tr__on { text-decoration: underline; }
/* Text sits where its control wants it inside the reserved room. */
.zg-btn, .zg-chip, .zg-tab, .zg-tabs__tab, .zg-iconbtn, .zg-size, .zg-cats__item, .zg-header__nav a, .zg-mobilebar a, .zg-state, .zg-sheet__foot { text-align: center; }
.zg-section__more, .zg-lines dd, .zg-estimate__row dd, .zg-choice__price, .zg-minerow__price { text-align: end; }
@media (min-width: 900px) { .zg-cats:not(.zg-cats--sub) .zg-cats__item { text-align: start; } }


/* --- motion (R16-1, docs/UI-RULES.md): everything moves, nothing waits ------------------------------ */
:root {
  --zg-t-fast: 120ms; --zg-t-med: 200ms; --zg-t-slow: 280ms;
  --zg-ease: cubic-bezier(.2, .8, .2, 1);
  --zg-hover-lift: translateY(-1px);
}
html { -webkit-tap-highlight-color: transparent; }
:where(button, .zg-btn, .zg-chip, .zg-tab, .zg-tabs__tab, .zg-size, .zg-tile, .zg-cats__item, .zg-iconbtn, .zg-menu__row) { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
:where(a, button, summary, select, input, textarea, label, [role="button"], [role="tab"], [role="radio"], [role="option"]) {
  transition: color var(--zg-t-fast) ease, background-color var(--zg-t-fast) ease, border-color var(--zg-t-fast) ease,
    box-shadow var(--zg-t-fast) ease, opacity var(--zg-t-fast) ease, transform var(--zg-t-fast) var(--zg-ease),
    text-decoration-color var(--zg-t-fast) ease, outline-color var(--zg-t-fast) ease;
}
:where(.zg-lcard, .zg-card, .zg-seller, .zg-minerow, .zg-lcard__img img, svg, .zg-fav__dot, .zg-timeline__dot, .zg-statuschip, .zg-note) {
  transition: transform var(--zg-t-med) var(--zg-ease), box-shadow var(--zg-t-med) ease, background-color var(--zg-t-fast) ease,
    border-color var(--zg-t-fast) ease, color var(--zg-t-fast) ease, fill var(--zg-t-fast) ease;
}

/* Pressing: everything that can be pressed gives way a little, and more while held. */
:where(a[class], button, summary, label.zg-choice, label.zg-check, [role="button"], [role="tab"], [role="radio"], [role="option"]):active:not(:disabled, [aria-disabled="true"]) { transform: scale(.975); }
:where(.zg-lcard):has(.zg-lcard__link:active) { transform: scale(.985); }
[data-holding="true"]:not(:disabled) { transform: scale(.95); }
:where(input[type="checkbox"], input[type="radio"]):active { transform: scale(.88); }
.zg-ripple { position: fixed; z-index: 9999; overflow: hidden; pointer-events: none; }
.zg-ripple__dot { position: absolute; border-radius: 50%; background: currentColor; }
.zg-ripple--hold { background: color-mix(in srgb, currentColor 14%, transparent); transition: background-color var(--zg-t-slow) ease; }

/* Hovering, only where hover exists. Transform and colour only, so nothing shifts. */
@media (hover: hover) and (pointer: fine) {
  :where(.zg-btn, .zg-size, .zg-chip):hover:not(:disabled, [aria-disabled="true"], :active) { transform: var(--zg-hover-lift); box-shadow: 0 6px 16px rgba(10, 12, 27, .18); }
  :where(.zg-btn--ghost):hover:not(:disabled, :active) { box-shadow: none; background: var(--zg-tint); }
  .zg-iconbtn:hover, .zg-tab:hover, .zg-tabs__tab:hover, .zg-menu__row:hover, .zg-combo__option:hover { background-color: var(--zg-tint); }
  .zg-menu__row:hover svg { transform: translateX(3px); }
  .zg-cats__item:hover, .zg-seller:hover { transform: var(--zg-hover-lift); box-shadow: 0 6px 16px rgba(10, 12, 27, .14); }
  .zg-lcard:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(10, 12, 27, .2); }
  .zg-lcard:hover .zg-lcard__img img { transform: scale(1.04); }
  .zg-fav:hover .zg-fav__dot { transform: scale(1.12); }
  .zg-photo:hover { transform: scale(1.03); }
  .zg-choice--box:hover, .zg-check:hover input { border-color: var(--zg-accent); }
  a:not([class]):hover { text-decoration-thickness: 2px; }
}

/* Something appears: a short fade and rise, never holding anything up. */
@keyframes zg-enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes zg-pop { 0% { transform: scale(.8); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes zg-vt-out { to { opacity: 0; transform: translateX(calc(var(--zg-dir, 1) * -14px)); } }
@keyframes zg-vt-in { from { opacity: 0; transform: translateX(calc(var(--zg-dir, 1) * 18px)); } }
@keyframes zg-sheet-in { from { transform: translateY(100%); } }
@keyframes zg-sheet-out { to { transform: translateY(100%); } }
.zg-enter, .zg-field__error, [role="alert"], [role="status"]:not(.zg-sr-only), .zg-note, .zg-sellsub, .zg-combo__list, .zg-appeal, .zg-lcard, .zg-minerow, .zg-photo, .zg-label__code {
  animation: zg-enter var(--zg-t-med) var(--zg-ease) both;
}
.zg-fav[aria-pressed="true"] .zg-fav__dot svg { animation: zg-pop var(--zg-t-slow) var(--zg-ease); }

/* Screen changes: the old screen leaves, the new one arrives; back goes the other way. */
html[data-nav="back"] { --zg-dir: -1; }
/* Header and tab bar stay still across a screen; a language change crossfades them with the rest. */
html[data-vt]:not([data-vt="language"]) .zg-header { view-transition-name: zg-header; }
html[data-vt]:not([data-vt="language"]) .zg-mobilebar { view-transition-name: zg-mobilebar; }
html[data-vt]:not([data-vt="language"]) .zg-tabbar { view-transition-name: zg-tabbar; }
html[data-vt="screen"] .zg-main { view-transition-name: zg-main; }
html[data-vt="swap"] .zg-sheet { view-transition-name: zg-sheet; }
::view-transition-group(zg-header), ::view-transition-group(zg-mobilebar), ::view-transition-group(zg-tabbar) { animation: none; z-index: 2; }
::view-transition-new(zg-header), ::view-transition-new(zg-mobilebar), ::view-transition-new(zg-tabbar) { animation: none; }
::view-transition-old(zg-header), ::view-transition-old(zg-mobilebar), ::view-transition-old(zg-tabbar) { display: none; }
::view-transition-group(zg-main) { animation: none; overflow: clip; }
::view-transition-old(zg-main) { animation: zg-vt-out var(--zg-t-med) ease-in both; }
::view-transition-new(zg-main) { animation: zg-vt-in var(--zg-t-slow) var(--zg-ease) both; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: var(--zg-t-med); }
html[data-vt="language"]::view-transition-old(root), html[data-vt="language"]::view-transition-new(root) { animation-duration: var(--zg-t-slow); }
::view-transition-group(zg-sheet) { animation: none; z-index: 3; }
::view-transition-old(zg-sheet) { animation: zg-sheet-out var(--zg-t-med) ease-in both; }
::view-transition-new(zg-sheet) { animation: zg-sheet-in var(--zg-t-slow) var(--zg-ease) both; }
@supports not (view-transition-name: none) {
  .zg-main > * { animation: zg-enter var(--zg-t-slow) var(--zg-ease) both; }
  .zg-sheet { animation: zg-sheet-in var(--zg-t-slow) var(--zg-ease) both; }
}

/* Reduced motion: none of the above. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  :where(a, button, label, [role="tab"], [role="radio"]):active, .zg-lcard:hover, [data-holding="true"] { transform: none !important; }
}

/* --- category and search head (SRC-019): subcategories, count and sort ------------------------------ */
.zg-cats { scroll-snap-type: x proximity; scroll-padding-inline: 16px; }
/* A phone's row of categories: one width, and a name's two rows at most in any language (I18-014, NFR-003). */
@media (max-width: 719px) {
  .zg-cats:not(.zg-cats--sub) { grid-auto-columns: 148px; grid-auto-rows: 1fr; }
  .zg-cats:not(.zg-cats--sub) .zg-cats__item { justify-content: center; padding: 6px 12px; border-radius: 14px; white-space: normal; line-height: 1.2; font-size: 13px; text-align: center; }
  .zg-cats:not(.zg-cats--sub) .zg-cats__item .zg-tr { width: 100%; }
}
.zg-cats__item { scroll-snap-align: start; }
.zg-cats__item[aria-current="page"] { background: var(--zg-tint); border: 1.5px solid var(--zg-accent); color: var(--zg-accent); font-weight: 600; }
.zg-cats__item .zg-tr__on, .zg-btn .zg-tr__on, .zg-chip .zg-tr__on { display: grid; align-content: center; }
.zg-search__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.zg-search__bar { flex-wrap: nowrap; justify-content: space-between; min-height: 44px; }
.zg-search__count { margin: 0; flex: 1; min-width: 0; }
.zg-search__sort { margin-left: 0; flex: none; }
.zg-select { position: relative; display: inline-flex; align-items: center; width: 200px; color: var(--zg-text); }
.zg-select select {
  width: 100%; min-height: 44px; padding: 0 40px 0 16px; border: 1px solid var(--zg-line); border-radius: 999px;
  background: var(--zg-surface); color: inherit; font: 500 14px var(--zg-font); cursor: pointer;
  -webkit-appearance: none; appearance: none; text-overflow: ellipsis;
}
.zg-select select:hover { border-color: var(--zg-accent); }
.zg-select svg { position: absolute; right: 14px; pointer-events: none; color: var(--zg-muted); }
.zg-select:hover svg { transform: translateY(1px); color: var(--zg-accent); }
@media (pointer: fine) { @supports (appearance: base-select) { .zg-select select { appearance: base-select; display: flex; align-items: center; } } }

/* Phones: a row that scrolls sideways, fading at its edges, with room so nothing is cut off. */
@media (max-width: 719px) {
  .zg-cats--sub {
    margin-block: -6px; padding-block: 6px; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 28px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 28px), transparent 100%);
  }
  .zg-cats--sub .zg-tile:hover { transform: none; box-shadow: none; }
}
/* Wider: tiles of one width that wrap, so a longer translation never makes the row uneven. */
@media (min-width: 720px) {
  .zg-cats--sub { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 8px; margin: 0; padding: 4px 0; overflow: visible; }
  .zg-cats--sub .zg-tile { min-width: 0; }
}
/* Phones: filters and sort share one row, sort taking the room it needs; the count goes under them. */
@media (max-width: 899px) {
  .zg-search__bar { flex-wrap: wrap; }
  .zg-search__bar .zg-chip--filters { flex: none; }
  .zg-search__sort { flex: 1 1 0; min-width: 0; }
  .zg-select { width: 100%; }
  .zg-search__count { order: 3; flex: 1 0 100%; font-size: 13px; min-height: 20px; }
}
/* The title and its search button always share a row; a long name wraps instead of pushing it down. */
.zg-search > .zg-section__head { flex-wrap: nowrap; align-items: flex-start; }
.zg-search > .zg-section__head .zg-page__title { flex: 1; min-width: 0; }
.zg-search > .zg-section__head .zg-iconbtn { flex: none; }
@media (max-width: 719px) { .zg-search > .zg-section__head .zg-page__title { font-size: 22px; line-height: 1.25; } }

/* --- no photo (SRC-021): the logo's constellation on deep space, in both themes ------------------------ */
/* A shade above the deep-space page, so the card keeps its edge in the dark theme. */
.zg-noimg { position: absolute; inset: 0; display: block; overflow: hidden; background: #10142E; }
.zg-noimg__art { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.zg-lcard:hover .zg-noimg__art { transform: scale(1.04); }
.zg-thumb, .zg-gallery__thumb, .zg-photo, .zg-gallery__main { position: relative; }

/* All category cards are one height, whatever their names, with the text sitting on the same line. */
@media (min-width: 900px) {
  .zg-cats:not(.zg-cats--sub) { grid-auto-rows: 1fr; }
  .zg-cats:not(.zg-cats--sub) .zg-cats__item { align-items: stretch; }
  .zg-cats:not(.zg-cats--sub) .zg-cats__item .zg-tr { display: grid; width: 100%; }
  .zg-cats:not(.zg-cats--sub) .zg-cats__item .zg-tr__on { align-content: end; }
}
@media (min-width: 720px) { .zg-cats--sub { grid-auto-rows: 1fr; } }

/* The navbar's logo answers a successful load with the loader's comet pass (R16-6). The keyframes are
   the loader's own (css/loader.css), so the two always match. Outside it, the extra layers are hidden. */
.zg-mark__track, .zg-mark__comet { display: none; }
@media (prefers-reduced-motion: no-preference) {
  html[data-logo="arrive"] .zg-brand .zg-mark__track { display: inline; }
  html[data-logo="arrive"] .zg-brand .zg-mark__comet { display: inline; stroke-dasharray: .22 1.6; animation: zg-comet .5s linear 1 both; }
  html[data-logo="arrive"] .zg-brand .zg-mark__l1 { stroke-dasharray: 1 1; animation: zg-line1 .5s linear 1 both; }
  html[data-logo="arrive"] .zg-brand .zg-mark__l2 { stroke-dasharray: 1 1; animation: zg-line2 .5s linear 1 both; }
  html[data-logo="arrive"] .zg-brand .zg-mark__l3 { stroke-dasharray: 1 1; animation: zg-line3 .5s linear 1 both; }
  html[data-logo="arrive"] .zg-brand [class^="zg-mark__s"] { transform-box: fill-box; transform-origin: center; }
  html[data-logo="arrive"] .zg-brand .zg-mark__s1 { animation: zg-star1 .5s linear 1 both; }
  html[data-logo="arrive"] .zg-brand .zg-mark__s2 { animation: zg-star2 .5s linear 1 both; }
  html[data-logo="arrive"] .zg-brand .zg-mark__s3 { animation: zg-star3 .5s linear 1 both; }
  html[data-logo="arrive"] .zg-brand .zg-mark__s4 { animation: zg-star4 .5s linear 1 both; }
}

/* --- shared pieces of the account, order and message screens ------------------------------- */
.zg-stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.zg-stack--tight { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.zg-self-start { align-self: flex-start; }
.zg-ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.zg-nowrap { white-space: nowrap; }
.zg-wrap { overflow-wrap: anywhere; }
.zg-strike { text-decoration: line-through; }
.zg-bullets { margin: 0; padding-inline-start: 18px; display: flex; flex-direction: column; gap: 4px; }
.zg-avatar { overflow: hidden; }
.zg-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.zg-iconbtn__dot { position: absolute; top: 9px; right: 9px; width: 9px; height: 9px; border-radius: 999px; background: var(--zg-accent-2); box-shadow: 0 0 0 2px var(--zg-bg); }
.zg-radio { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; }
.zg-radio input { width: 20px; height: 20px; flex: none; margin: 0; accent-color: var(--zg-accent); }
.zg-radio--box { padding: 8px 14px; border: 1px solid var(--zg-line); border-radius: var(--zg-r-control); background: var(--zg-surface); }
.zg-radio--box:has(input:checked) { border-color: var(--zg-accent); box-shadow: inset 0 0 0 0.5px var(--zg-accent); }
/* NFR-022. The underline is on the text itself: an inline grid (.zg-tr) takes none from its link. */
.zg-footer__top { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 24px; align-items: start;
  padding-top: 32px; border-top: 1px solid var(--zg-line); }
.zg-footer__nav { display: contents; }
.zg-footer__brand { grid-column: 2; grid-row: 1; text-align: center; }
.zg-footer__group { grid-column: 1; grid-row: 1; }
.zg-footer__group + .zg-footer__group { grid-column: 3; justify-self: end; text-align: end; }
.zg-footer__mark { display: inline-flex; align-items: center; gap: 8px; }
.zg-footer__tagline { margin: 8px 0 0; color: var(--zg-muted); font-size: 14px; }
.zg-footer__title { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.zg-footer__list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.zg-footer__link { display: inline-block; padding-block: 4px; color: var(--zg-muted); font-size: 14px; text-decoration: none;
  transition: color var(--zg-t-fast) var(--zg-ease); }
.zg-footer__link .zg-tr__on { text-decoration: underline 1.5px transparent; text-underline-offset: 4px;
  transition: text-decoration-color var(--zg-t-fast) var(--zg-ease); }
.zg-footer__link:hover, .zg-footer__link:focus-visible { color: var(--zg-text); }
.zg-footer__link:hover .zg-tr__on, .zg-footer__link:focus-visible .zg-tr__on { text-decoration-color: var(--zg-accent); }
@media (min-width: 900px) {
  .zg-sheet--center { margin: auto; max-width: 520px; border-radius: var(--zg-r-sheet); }
}

/* --- messages (S18, S19) ----------------------------------------------------------------------- */
.zg-chat__title { padding-inline: 8px; }
.zg-chat__search { padding-inline: 8px; }
.zg-chat__none { padding: 16px 8px; }
.zg-chat__pick { padding: 48px 24px; text-align: center; }
.zg-chat__pane { min-width: 0; }
.zg-chat--open .zg-chat__list { display: none; }
.zg-chat:not(.zg-chat--open) .zg-chat__pane { display: none; }
@media (min-width: 900px) {
  .zg-chat { display: grid !important; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 0;
    background: var(--zg-surface); border: 1px solid var(--zg-line); border-radius: 20px; padding: 0; overflow: hidden;
    /* It is its own card, so the page's spacing and the container's gutters become margins: clear of the header, and in line with its content. */
    width: calc(100% - 40px); max-width: 1200px; margin: 20px auto;
    /* The screen under the header, the same space above and below (MSG-010); what is long scrolls inside. */
    height: calc(100dvh - var(--zg-header-h) - 40px); min-height: 480px; }
  .zg-chat--open .zg-chat__list, .zg-chat .zg-chat__list { display: block; padding: 16px 8px; border-inline-end: 1px solid var(--zg-line); min-height: 0; overflow-y: auto; }
  .zg-chat:not(.zg-chat--open) .zg-chat__pane { display: block; }
  .zg-chat .zg-chat__pane { min-height: 0; overflow-y: auto; }
  .zg-chat .zg-thread { height: 100%; min-height: 0; }
  .zg-chat .zg-msgs { min-height: 0; overflow-y: auto; }
}
.zg-convos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.zg-convo { display: flex; gap: 12px; align-items: center; padding: 10px 8px; border-radius: 14px; color: inherit; text-decoration: none; }
.zg-convo[aria-current="page"] { background: var(--zg-raised); }
.zg-convo__media { position: relative; flex: none; }
.zg-convo__who { position: absolute; right: -4px; bottom: -4px; }
.zg-convo__who .zg-avatar { width: 26px; height: 26px; font-size: 11px; border: 2px solid var(--zg-bg); }
.zg-convo__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.zg-convo__line { display: flex; justify-content: space-between; gap: 8px; align-items: center; min-width: 0; }
.zg-convo__name { font-weight: 600; overflow-wrap: anywhere; }
.zg-convo--unread .zg-convo__name { font-weight: 700; }
.zg-convo__snippet { font-size: 14px; color: var(--zg-muted); }
.zg-convo--unread .zg-convo__snippet { color: var(--zg-text); }
.zg-convo__unread { flex: none; min-width: 20px; height: 20px; padding: 0 6px; box-sizing: border-box; border-radius: 999px; background: var(--zg-accent-2); color: var(--zg-on-accent); font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; }
.zg-thread { display: flex; flex-direction: column; min-height: 560px; min-width: 0; }
.zg-thread__head { display: flex; align-items: center; gap: 6px; padding: 8px; border-bottom: 1px solid var(--zg-line); position: relative; }
.zg-thread__who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.zg-thread__who .zg-avatar { width: 36px; height: 36px; font-size: 13px; flex: none; }
.zg-thread__name { font-size: 16px; font-weight: 600; margin: 0; overflow-wrap: anywhere; }
.zg-thread__listing { display: flex; gap: 10px; align-items: center; padding: 10px 16px; background: var(--zg-raised); color: inherit; text-decoration: none; }
.zg-thread__listing-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.zg-deal { display: flex; flex-direction: column; gap: 8px; margin: 12px 16px 0; padding: 14px; border-radius: 16px; background: var(--zg-surface); border: 1.5px solid var(--zg-accent); }
.zg-deal__title { display: flex; gap: 8px; align-items: center; font-weight: 600; color: var(--zg-text); }
.zg-deal__title svg { color: var(--zg-accent); flex: none; }
.zg-deal--inline { margin: 0; }
.zg-deal__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.zg-deal__actions .zg-btn { flex: 1 1 auto; }
.zg-msgs { list-style: none; margin: 0; padding: 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.zg-msgs__end { height: 0; }
.zg-msg { max-width: 78%; padding: 10px 14px; display: flex; flex-direction: column; gap: 4px; overflow-wrap: anywhere; animation: zg-enter var(--zg-t-med) var(--zg-ease) both; }
.zg-msg--mine { align-self: flex-end; border-radius: 18px 18px 4px 18px; background: var(--zg-accent); color: var(--zg-on-accent); }
.zg-msg--theirs { align-self: flex-start; border-radius: 18px 18px 18px 4px; background: var(--zg-raised); }
.zg-msg--unsent { background: transparent; color: var(--zg-text); border: 1.5px dashed var(--zg-bad); }
.zg-msg--theirs { position: relative; }
.zg-msg__report { position: absolute; left: 100%; bottom: calc(50% - 22px); color: var(--zg-muted); }
.zg-thread__note { margin: 12px 16px 0; }
.zg-showmore { align-self: center; margin-top: 12px; }
.zg-admin__restrictselect { width: 280px; max-width: 100%; }
.zg-thread__who-body { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.zg-thread__active { font-size: 12px; }
.zg-msg__time { font-size: 11px; opacity: 0.75; text-align: end; }
.zg-msg__photo { display: block; width: 200px; max-width: 100%; aspect-ratio: 1; border-radius: 12px; overflow: hidden; }
.zg-msg__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.zg-msg__warning { font-size: 12px; font-weight: 600; }
.zg-msgcard { align-self: stretch; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--zg-field); display: flex; flex-direction: column; gap: 2px; }
.zg-composer { position: sticky; bottom: calc(var(--zg-tabbar-h) + env(safe-area-inset-bottom, 0px)); padding: 10px 12px; background: var(--zg-surface); border-top: 1px solid var(--zg-line); display: flex; flex-direction: column; gap: 8px; }
@media (min-width: 900px) { .zg-composer { bottom: 0; } }
.zg-composer__row { display: flex; gap: 6px; align-items: center; }
.zg-composer__input { flex: 1; min-width: 0; border-radius: 22px; min-height: 44px; }
.zg-composer__offer { min-height: 44px; padding: 0 12px; flex: none; }
.zg-composer__send { background: var(--zg-accent); color: var(--zg-on-accent); border-radius: 999px; flex: none; }
.zg-composer__send[disabled] { background: var(--zg-raised); color: var(--zg-muted); }
.zg-composer__photos { display: flex; gap: 6px; flex-wrap: wrap; }
.zg-composer__photo { width: 56px; height: 56px; padding: 0; border: 0; border-radius: 10px; overflow: hidden; cursor: pointer; background: var(--zg-raised); }
.zg-composer__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.zg-menu-wrap { position: relative; }
.zg-popmenu { position: absolute; inset-inline-end: 0; top: 48px; z-index: 5; min-width: 240px; padding: 6px; border-radius: 14px; background: var(--zg-surface); border: 1px solid var(--zg-line); box-shadow: 0 12px 32px rgba(5, 6, 14, 0.25); }
.zg-popmenu__item { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: var(--zg-text); font: inherit; text-align: start; cursor: pointer; }
.zg-popmenu__item.zg-link--bad { color: var(--zg-bad); }
.zg-offer__about { display: flex; gap: 12px; align-items: center; }
.zg-offer__about-body { display: flex; flex-direction: column; min-width: 0; }
.zg-offer__amount { font-size: 20px; font-weight: 500; flex: 1; min-width: 0; }
.zg-offer__chips { display: flex; gap: 8px; }
.zg-offer__chips .zg-chip { flex: 1; justify-content: center; }

/* --- orders, cases, returns, ratings ------------------------------------------------------------ */
.zg-orderrow { display: flex; gap: 12px; color: inherit; text-decoration: none; }
.zg-orderrow__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.zg-orderrow__body .zg-minerow__head { width: 100%; }
.zg-evidence { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.zg-evidence__add, .zg-evidence__item { aspect-ratio: 1; border-radius: 12px; overflow: hidden; display: grid; place-items: center; padding: 0; cursor: pointer; }
.zg-evidence__add { border: 1.5px dashed var(--zg-accent); color: var(--zg-accent); font-size: 13px; font-weight: 600; text-align: center; }
.zg-evidence__item { border: 0; background: var(--zg-raised); }
.zg-evidence__item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.zg-evidencelist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.zg-evidencelist__photo { max-width: 260px; width: 100%; border-radius: 12px; display: block; }
.zg-starpick { display: flex; gap: 4px; }
.zg-starpick__star { width: 48px; height: 48px; border: 0; background: transparent; font-size: 34px; line-height: 1; color: var(--zg-field); cursor: pointer; }
.zg-starpick__star--on { color: var(--zg-accent-2); }

/* --- notifications (S27) ------------------------------------------------------------------------ */
.zg-notifs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.zg-notif { display: flex; gap: 10px; padding: 12px; border-radius: 14px; color: inherit; text-decoration: none; }
.zg-notif--unread { background: var(--zg-surface); }
.zg-notif__dot { flex: none; width: 8px; height: 8px; margin-top: 8px; border-radius: 999px; background: transparent; }
.zg-notif--unread .zg-notif__dot { background: var(--zg-accent-2); }
.zg-notif__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.zg-notif__line { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.zg-notif__title { font-weight: 500; min-width: 0; }
.zg-notif--unread .zg-notif__title { font-weight: 700; }

/* --- wallet (S32, S33) -------------------------------------------------------------------------- */
.zg-balance { display: flex; flex-direction: column; gap: 10px; }
.zg-balance__value { font-size: 30px; line-height: 1.15; }
.zg-balance__pending { display: flex; flex-direction: column; gap: 2px; padding-block: 10px; border-block: 1px solid var(--zg-line); }
.zg-balance .zg-minerow__head { display: flex; justify-content: space-between; gap: 12px; }
.zg-ledger { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.zg-ledgerrow { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--zg-line); }
.zg-ledgerrow:last-child { border-bottom: 0; }
.zg-ledgerrow__sign { flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--zg-raised); font-weight: 700; }
.zg-ledgerrow__sign--plus { color: var(--zg-ok); }
.zg-ledgerrow__sign--wait { color: var(--zg-warn); }
.zg-ledgerrow__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.zg-ledgerrow__title { font-weight: 500; overflow-wrap: anywhere; }
.zg-ledgerrow__amount { flex: none; text-align: end; }

/* --- settings (S34) ----------------------------------------------------------------------------- */
.zg-settings__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.zg-settings__text { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.zg-settings__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; }
.zg-settings__row .zg-btn--ghost { flex: none; }
.zg-card.zg-settings { padding-inline-end: 24px; }
/* Whatever ends a row ends at the card's right edge (ACC-041): a text button's words, not its padding, which
   still shows as the hover background. A reservation's spare room goes to the left of the words. */
.zg-settings__row > .zg-btn--ghost, .zg-settings__actions > .zg-btn--ghost:last-child { margin-inline-end: -12px; }
.zg-settings__row .zg-btn--ghost .zg-tr__on, .zg-settings__row > .zg-muted .zg-tr__on { text-align: end; }
.zg-prefstable { width: 100%; border-collapse: collapse; }
.zg-prefstable th, .zg-prefstable td { padding: 8px 4px; text-align: center; font-weight: 400; }
.zg-prefstable th[scope="col"] { width: 72px; }
.zg-prefstable th[scope="col"], .zg-prefstable td { padding-inline-end: 0; text-align: end; }
.zg-prefstable th[scope="row"] { padding-inline-start: 0; text-align: start; }
.zg-prefstable thead th { font-size: 13px; color: var(--zg-muted); }
.zg-prefstable input, .zg-settings__row input[type="checkbox"] { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--zg-accent); }
.zg-codes { list-style: none; margin: 0; padding: 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; background: var(--zg-raised); border-radius: 12px; }

/* --- help, legal, contact ------------------------------------------------------------------------ */
/* Equal rows: a step that reserves room for a longer translation (R16-3) must not open a bigger gap. */
.zg-howsteps { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-rows: 1fr; gap: 10px; }
.zg-howstep { display: flex; gap: 12px; align-items: flex-start; }
.zg-howstep__n { flex: none; width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center; background: var(--zg-tint); color: var(--zg-accent); font-weight: 700; font-size: 14px; }
.zg-doc { display: flex; flex-direction: column; gap: 12px; }
.zg-doc p { margin: 0; line-height: 1.6; }
.zg-doc__li { padding-inline-start: 18px; position: relative; }
.zg-doc__li::before { content: ""; position: absolute; inset-inline-start: 4px; top: 0.65em; width: 5px; height: 5px; border-radius: 999px; background: var(--zg-muted); }
.zg-supportrow { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: start; cursor: pointer; }
.zg-supportlog { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }

/* --- Staff area (A01-A12). Everything comes from the tokens, so both themes hold. --- */
.zg-admin { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; background: var(--zg-bg); }
.zg-admin__side { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 12px; background: var(--zg-surface); color: var(--zg-text); border-inline-end: 1px solid var(--zg-line); }
.zg-admin__nav { flex: 1 0 auto; display: flex; flex-direction: column; gap: 6px; }
.zg-admin__group { display: flex; flex-direction: column; gap: 2px; }
.zg-admin__group-title { padding: 0 10px; font-size: 12px; font-weight: 600; color: var(--zg-muted); }
.zg-admin__link { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 10px; border-radius: 10px; color: var(--zg-text); font-size: 14px; text-decoration: none; }
@media (min-width: 900px) { .zg-admin__link { min-height: 30px; } }
.zg-admin__link svg { flex: none; color: var(--zg-muted); }
.zg-admin__link[aria-current="page"] { background: var(--zg-tint); color: var(--zg-accent); font-weight: 600; }
.zg-admin__link[aria-current="page"] svg { color: inherit; }
.zg-admin__foot { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; border-top: 1px solid var(--zg-line); }
.zg-admin__who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.zg-admin__who-body { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 14px; line-height: 1.3; }
.zg-admin__foot .zg-segments--locales { flex: 1 1 100%; grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); }
.zg-segments { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 2px; border-radius: 10px; background: var(--zg-raised); }
.zg-segments__item { min-width: 34px; min-height: 28px; display: grid; place-items: center; padding: 0 6px; border: 0; border-radius: 8px; background: transparent; color: var(--zg-muted); font: 600 12px var(--zg-font); text-decoration: none; cursor: pointer; }
.zg-segments__item[aria-current="true"], .zg-segments__item[aria-checked="true"] { background: var(--zg-surface); color: var(--zg-text); box-shadow: 0 0 0 1px var(--zg-line); }
.zg-admin__settingform { display: flex; flex-direction: column; gap: 16px; }
.zg-admin__fields { display: flex; flex-direction: column; gap: 14px; }
.zg-admin__group-fields { display: flex; flex-direction: column; gap: 12px; padding: 12px 14px; border: 1px solid var(--zg-line); border-radius: 12px; }
.zg-admin__group-fields > legend { padding: 0 6px; }
.zg-admin__sidebyside { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.zg-admin__row { max-width: 420px; }
.zg-admin__number { max-width: 200px; }
.zg-admin__select { max-width: 320px; }
.zg-admin__check { display: flex; align-items: center; gap: 10px; min-height: 32px; cursor: pointer; }
.zg-admin__check input { width: 18px; height: 18px; flex: none; margin: 0; accent-color: var(--zg-accent); }
.zg-admin__choices { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.zg-admin__branch { border: 1px solid var(--zg-line); border-radius: 10px; padding: 0 12px; }
.zg-admin__branch-title { min-height: 40px; display: flex; align-items: center; font-weight: 600; cursor: pointer; }
.zg-admin__branch[open] { padding-bottom: 12px; }
.zg-admin__linkish[aria-current="true"] { color: var(--zg-text); text-decoration: none; }
.zg-admin__main { min-width: 0; padding: 28px 32px; color: var(--zg-text); }
.zg-admin__page { display: flex; flex-direction: column; gap: 18px; }
.zg-admin__h1 { margin: 0; font-size: 26px; line-height: 1.2; }
.zg-admin__h2 { margin: 0 0 12px; font-size: 17px; font-weight: 600; }
.zg-admin__h3 { margin: 12px 0 6px; font-size: 15px; font-weight: 600; }
.zg-admin__card { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.zg-admin__tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.zg-admin__tile { display: flex; flex-direction: column; gap: 4px; padding: 16px; color: var(--zg-text); text-decoration: none; }
.zg-admin__figure { font-size: 24px; font-weight: 500; line-height: 1.2; }
.zg-admin__split { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.zg-admin__split > * { flex: 1 1 380px; min-width: 0; }
.zg-admin__stack { display: flex; flex-direction: column; gap: 20px; }
.zg-admin__wrap { overflow-x: auto; }
.zg-admin__table { width: 100%; border-collapse: collapse; font-size: 14px; }
.zg-admin__table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--zg-muted); padding: 8px 10px; border-bottom: 1px solid var(--zg-line); white-space: nowrap; }
.zg-admin__table td { padding: 10px; border-bottom: 1px solid var(--zg-line); vertical-align: top; }
.zg-admin__search { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.zg-admin__search .zg-input { flex: 1 1 240px; min-width: 200px; }
.zg-admin__form { display: flex; flex-direction: column; gap: 10px; }
.zg-admin__text { min-height: 96px; height: auto; padding: 10px 12px; line-height: 1.5; resize: vertical; }
.zg-admin__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.zg-admin__dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; font-size: 14px; }
.zg-admin__dl dt { color: var(--zg-muted); }
.zg-admin__dl dd { margin: 0; overflow-wrap: anywhere; }
.zg-admin__list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.zg-admin__rowline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.zg-admin__items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.zg-admin__item { display: flex; flex-direction: column; gap: 6px; }
.zg-admin__linkish { padding: 0; min-height: 24px; border: 0; background: none; color: var(--zg-accent); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; text-align: left; }
.zg-admin__facts { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14px; }
.zg-admin__evidence { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.zg-admin__field { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 6px; }
.zg-admin__roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0 12px; }
.zg-admin__radio { display: flex; gap: 10px; align-items: center; min-height: 36px; }
.zg-admin__cell { width: 130px; height: 36px; padding: 0 6px; font-size: 13px; }
.zg-admin__pre { white-space: pre-wrap; }
@media (max-width: 760px) {
  .zg-admin { grid-template-columns: minmax(0, 1fr); }
  .zg-admin__side { position: static; height: auto; border-inline-end: 0; border-bottom: 1px solid var(--zg-line); }
  .zg-admin__main { padding: 20px 16px; }
}

.zg-offline { margin: 0; padding: 10px 16px; background: var(--zg-raised); color: var(--zg-text); text-align: center; font-size: 14px; }
.zg-offline--notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; }

/* A tile's note always takes the tile's full width, so a line breaks at the same place in every language. */
.zg-admin__tile .zg-statuschip { display: flex; width: 100%; box-sizing: border-box; align-items: flex-start; }
.zg-admin__tile .zg-statuschip > :last-child { flex: 1 1 0; min-width: 0; }
.zg-admin__tile .zg-statuschip__dot { flex: none; margin-top: 7px; }

/* --- what stays in reach on a phone (R24-1) --------------------------------------------------- */

.zg-stickybar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 15; display: flex; align-items: center; gap: 10px;
  padding: max(8px, env(safe-area-inset-top)) 12px 8px; background: var(--zg-surface); border-bottom: 1px solid var(--zg-line);
  box-shadow: 0 4px 12px rgba(10, 12, 27, .12); opacity: 0; visibility: hidden; transform: translateY(-100%);
  transition: opacity var(--zg-t-med) var(--zg-ease), transform var(--zg-t-med) var(--zg-ease), visibility 0s linear var(--zg-t-med);
}
.zg-stickybar[data-on="true"] { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.zg-stickybar__price { flex: 1; min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zg-stickybar .zg-btn { min-height: 40px; padding: 0 14px; flex: none; }
.zg-stickybar__field { position: relative; flex: 1; min-width: 0; }
.zg-stickybar__field input { width: 100%; min-height: 40px; padding-right: 46px; font-weight: 700; }
.zg-stickybar__field > span { position: absolute; right: 10px; top: 10px; font-size: 14px; }
@media (min-width: 900px) { .zg-stickybar:not(.zg-stickybar--wide) { display: none; } }
.zg-sellerbar { display: flex; align-items: center; gap: 10px; }
.zg-sellerbar .zg-avatar { width: 40px; height: 40px; font-size: 14px; flex: none; }
.zg-sellerbar__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.zg-sellerbar__name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.zg-sellerbar__facts { display: flex; align-items: center; gap: 8px; overflow: hidden; white-space: nowrap; font-size: 13px; color: var(--zg-muted); }
.zg-sellerbar__rating { flex: none; }
/* On the narrowest phones a confirmation shortens rather than leaving the bar. */
.zg-sellerbar__facts .zg-status { flex: 0 1 auto; min-width: 0; font-size: 12px; padding-inline: 8px; }
.zg-sellerbar__facts .zg-status .zg-tr__on { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 899px) { .zg-sellerbar { padding-inline: 0; } }
.zg-sellerbar__rating strong { color: var(--zg-text); }
@media (min-width: 900px) {
  .zg-sellerbar__body { flex-direction: row; align-items: center; gap: 16px; }
  .zg-sellerbar__name { flex: none; font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { .zg-stickybar { transition: none; } }
