/* Gifts That Change A Destiny — silent auction
   Layout: centered 1120px column; item cards in an auto-fill grid; forms in a narrow 560px column.
   Palette comes from the Changing A Destiny logo: terracotta heart, green rays, black type, on white.
   Black header/footer and green highlights are the accents; terracotta is for main buttons. */
:root {
  /* Brand palette */
  --white: #FFFFFF;
  --terracotta: #C52B09;
  --black: #111827;           /* near-black, matches the logo lettering */
  --brand-green: #3DA33A;     /* the logo's rays */
  --muted-blue: #52678D;
  --soft-green: #68C14B;
  --dusty-rose: #9C6F6D;
  --light-peach: #EFC5B9;

  /* How the palette is used */
  --bg: var(--white);
  --card: #FFFFFF;
  --surface: #F4F7F3;         /* faint green-gray panels */
  --surface-2: #E8EFE6;
  --line: #E1E7DF;
  --ink: var(--black);
  --ink-soft: #364257;
  --ink-faint: #56627A;
  --red: var(--terracotta);
  --red-ink: #A82407;         /* darker terracotta for text and hover */
  --red-soft: #FBE6DE;
  --peach: var(--light-peach);
  --rose: var(--dusty-rose);
  --green: var(--brand-green);
  --green-ink: #23731F;       /* readable green for text */
  --green-soft: #EAF5E7;
  --green-strong: #267A22;    /* green buttons: white text stays readable */
  --header-bg: var(--black);
  --header-ink: #FFFFFF;
  --header-ink-soft: #C9D1DC;
  --footer-link: #7FD06B;     /* green links on the black footer */
  --amber: #9A5B07;
  --amber-soft: #FBEFD9;
  --focus: var(--muted-blue);
  --shadow: 0 1px 2px rgb(17 24 39 / 6%), 0 4px 14px rgb(17 24 39 / 7%);

  --font-display: 'Marcellus', 'Optima', 'Palatino Linotype', Georgia, serif;
  --font-body: 'Source Sans 3', 'Segoe UI', system-ui, -apple-system, sans-serif;

  --radius: 10px;
  --radius-sm: 6px;
  --wrap: 1120px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    /* Dark mode: navy page, light text, brighter terracotta and green */
    --header-bg: #070A12;
    --bg: #0E1320;
    --card: #161D2C;
    --surface: #1A2233;
    --surface-2: #232C40;
    --line: #2C3650;
    --ink: #F7F0E8;
    --ink-soft: #D3CCC4;
    --ink-faint: #9AA9C6;
    --red: #E8502E;
    --red-ink: #FF8A6B;
    --red-soft: #3A1A12;
    --peach: #5A372E;
    --rose: #C79A97;
    --green: var(--soft-green);
    --green-ink: #8FDE73;
    --green-soft: #173018;
    --amber: #E3A84A;
    --amber-soft: #3A2C14;
    --focus: #9AB3E0;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 4px 14px rgb(0 0 0 / 25%);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; display: block; }
a { color: var(--red-ink); }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.15; margin: 0; text-wrap: balance; letter-spacing: 0.005em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); }
h3 { font-size: 1.2rem; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.narrow { max-width: 560px; }
main { flex: 1; padding-block: 28px 56px; }

/* ---- Header ---- */
.site-header { background: var(--header-bg); border-bottom: 4px solid var(--green); }
.site-header .wrap { display: flex; align-items: center; gap: 16px; padding-block: 10px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--header-ink); margin-right: auto; min-width: 0; }
.brand img { width: 52px; height: 52px; border-radius: 10px; background: #fff; padding: 3px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-family: var(--font-display); font-size: 1.15rem; line-height: 1.1; }
.brand-sub { font-size: 0.8rem; color: var(--footer-link); letter-spacing: 0.06em; text-transform: uppercase; }
.nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--header-ink-soft); font-weight: 600; padding: 8px 10px; border-radius: var(--radius-sm); font-size: 0.95rem; }
.nav a:hover { background: rgb(255 255 255 / 10%); color: var(--header-ink); }
.nav a.btn { color: #fff; }

/* ---- Buttons & inputs ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 1rem/1 var(--font-body);
  padding: 13px 20px; min-height: 46px;
  border-radius: var(--radius-sm); border: 1px solid transparent;
  background: var(--red); color: #fff; cursor: pointer; text-decoration: none;
  transition: background 0.15s, transform 0.05s;
}
.btn:hover { background: var(--red-ink); }
:root:not([data-theme="light"]) .btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn.secondary { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn.secondary:hover { background: var(--surface); }
.btn.green { background: var(--green-strong); }
.btn.green:hover { background: #186309; }
.btn.small { padding: 8px 12px; min-height: 36px; font-size: 0.9rem; }
.btn.block { width: 100%; }
.btn.link { background: none; color: var(--red-ink); padding: 4px; min-height: 0; text-decoration: underline; }

label { display: block; font-weight: 600; margin-bottom: 6px; }
.hint { font-size: 0.9rem; color: var(--ink-faint); margin-top: 4px; }
input[type="text"], input[type="tel"], input[type="email"], input[type="password"], input[type="number"], textarea, select {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 12px; min-height: 46px;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
.field { display: flex; flex-direction: column; }
.form { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1 1 180px; min-width: 0; }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; font-size: 0.95rem; color: var(--ink-soft); cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--red); }
.code-input { font-size: 1.6rem !important; letter-spacing: 0.4em; text-align: center; font-variant-numeric: tabular-nums; }

/* ---- Messages ---- */
.notice { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); font-size: 0.97rem; }
.notice.error { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 35%, transparent); color: var(--ink); }
.notice.success { background: var(--green-soft); border-color: color-mix(in srgb, var(--green) 35%, transparent); }
.notice.warn { background: var(--amber-soft); border-color: color-mix(in srgb, var(--amber) 40%, transparent); }
.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 999px; font-weight: 600;
  box-shadow: var(--shadow); z-index: 50; max-width: calc(100% - 32px); text-align: center;
}

/* ---- Status pills ---- */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-soft); white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.open { background: var(--green-soft); color: var(--green-ink); }
.pill.closed { background: var(--surface-2); color: var(--ink-soft); }
.pill.draft { background: var(--amber-soft); color: var(--amber); }
.pill.winning, .pill.won, .pill.paid { background: var(--green-soft); color: var(--green-ink); }
.pill.outbid, .pill.failed { background: var(--red-soft); color: var(--red-ink); }
.pill.lost, .pill.pending, .pill.processing { background: var(--surface-2); color: var(--ink-soft); }

/* ---- Home intro (the auction name lives in the header, so this stays small) ---- */
.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; }
.intro { display: flex; flex-direction: column; gap: 16px; margin-bottom: 22px; }
.intro-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.eyebrow-text { font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); font-weight: 600; }
.intro-guest { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 32px; align-items: start; padding: 18px; background: var(--surface); border-radius: var(--radius); }
.intro-guest .hero-lede { grid-column: 1 / -1; }
.hero-lede { color: var(--ink-soft); max-width: 60ch; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; align-self: end; }
.my-summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: var(--ink); background: var(--card);
}
.my-summary:hover { border-color: color-mix(in srgb, var(--red) 35%, var(--line)); }
.my-summary-text { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.my-summary-chips { display: flex; gap: 6px; flex-wrap: wrap; font-size: 0.95rem; }
.my-summary-link { font-weight: 600; color: var(--red-ink); white-space: nowrap; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; gap: 10px; font-size: 0.95rem; color: var(--ink-soft); }
.steps li::before { content: counter(s); width: 26px; height: 26px; border-radius: 50%; background: var(--green-strong); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 0.85rem; }
.steps strong { color: var(--ink); }

/* ---- Item grid ---- */
.grid-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.card {
  display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; color: inherit; transition: box-shadow 0.15s, border-color 0.15s;
}
.card:hover { box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--green) 55%, var(--line)); }
.card-photo { aspect-ratio: 4 / 3; background: var(--surface); position: relative; max-width: 100%; }
.card-photo img { width: 100%; height: 100%; object-fit: cover; }
.card-body .pill { align-self: flex-start; }
.no-photo { width: 100%; height: 100%; display: grid; place-items: center; color: var(--ink-faint); }
.no-photo img { width: 72px; height: 72px; opacity: 0.35; filter: grayscale(1); object-fit: contain; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body h3 { font-size: 1.15rem; }
.card-meta { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-top: auto; }
.stat-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-faint); font-weight: 600; }
.stat-value { font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat-sub { font-size: 0.85rem; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.empty { text-align: center; padding: 48px 16px; color: var(--ink-faint); border: 1px dashed var(--line); border-radius: var(--radius); }

/* ---- Item page ---- */
.back { display: inline-block; margin-bottom: 16px; text-decoration: none; font-weight: 600; color: var(--ink-soft); }
.item-layout {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 0 36px; align-items: start;
  grid-template-areas: "photo panel" "desc panel";
}
.item-layout > .item-photo { grid-area: photo; }
.item-layout > .bid-panel { grid-area: panel; }
.item-layout > .item-desc { grid-area: desc; }
.item-photo { border-radius: var(--radius); overflow: hidden; background: var(--surface); aspect-ratio: 4 / 3; max-width: 100%; }
.item-photo img { width: 100%; height: 100%; object-fit: contain; }
.item-desc { margin-top: 18px; color: var(--ink-soft); white-space: pre-line; max-width: 65ch; }
.bid-panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 16px; background: var(--card); }
.bid-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.bid-stats .big { font-size: 2rem; }
.stepper { display: grid; grid-template-columns: 52px 1fr 52px; gap: 8px; }
.stepper button { font: 700 1.4rem/1 var(--font-body); border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--radius-sm); cursor: pointer; }
.stepper button:hover { background: var(--surface-2); }
.stepper input { text-align: center; font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.fee-note { font-size: 0.9rem; color: var(--ink-faint); }
.confirm-box { border: 2px solid var(--red); border-radius: var(--radius-sm); padding: 14px; display: flex; flex-direction: column; gap: 12px; background: var(--red-soft); }
.history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.history li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
.history li:last-child { border-bottom: none; }
.history .when { color: var(--ink-faint); font-size: 0.85rem; }

/* ---- Panels / sections ---- */
.panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 16px; background: var(--card); }
.stack { display: flex; flex-direction: column; gap: 20px; }
.muted { color: var(--ink-faint); }
.steps-bar { display: flex; gap: 6px; margin-bottom: 18px; }
.steps-bar span { flex: 1; height: 5px; border-radius: 999px; background: var(--surface-2); }
.steps-bar span.on { background: var(--red); }
.card-box { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; min-height: 90px; background: var(--card); }
.mock-card { display: grid; gap: 10px; }
.secure-line { display: flex; gap: 8px; align-items: center; font-size: 0.88rem; color: var(--ink-faint); }
.list-plain { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.list-plain li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.list-plain li:last-child { border-bottom: none; }
.address { font-style: normal; line-height: 1.5; }

/* ---- Tables (admin) ---- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--surface); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-faint); font-weight: 700; white-space: nowrap; }
tr:last-child td { border-bottom: none; }
td.money, th.money { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.thumb { width: 52px; height: 40px; object-fit: cover; border-radius: 4px; background: var(--surface); }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* Admin layout */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; overflow-x: auto; }
.tabs button { font: 600 0.98rem var(--font-body); background: none; border: none; padding: 12px 14px; color: var(--ink-soft); cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--red); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 22px; }
.kpi { background: var(--surface); border-radius: var(--radius-sm); padding: 14px 16px; }
.mode-line { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.dialog-back { position: fixed; inset: 0; background: rgb(0 0 0 / 45%); display: grid; place-items: center; padding: 16px; z-index: 40; }
.dialog { background: var(--card); border-radius: var(--radius); padding: 22px; width: 100%; max-width: 620px; max-height: calc(100vh - 32px); overflow: auto; display: flex; flex-direction: column; gap: 16px; box-shadow: var(--shadow); }
.photo-preview { width: 160px; aspect-ratio: 4 / 3; border-radius: var(--radius-sm); object-fit: cover; background: var(--surface); }

/* ---- Footer ---- */
.site-footer { background: var(--header-bg); border-top: 4px solid var(--green); font-size: 0.92rem; color: var(--header-ink-soft); }
.site-footer strong { color: var(--header-ink); }
.site-footer a { color: var(--footer-link); }
.site-footer .wrap { display: flex; gap: 24px; justify-content: space-between; flex-wrap: wrap; padding-block: 22px; }

/* ---- Phones (most bidders) ---- */
.show-sm { display: none; }
.site-footer { padding-bottom: env(safe-area-inset-bottom, 0px); }

@media (max-width: 820px) {
  .item-layout {
    grid-template-columns: 1fr;
    grid-template-areas: "photo" "panel" "desc";
    gap: 18px;
  }
  .bid-panel { position: static; }
  .item-desc { margin-top: 0; }
}
@media (max-width: 560px) {
  main { padding-block: 16px 40px; }
  .hide-sm { display: none !important; }
  .show-sm { display: inline; }

  /* Header: one compact row */
  .site-header .wrap { flex-wrap: nowrap; gap: 10px; padding-block: 8px; }
  .brand { gap: 10px; }
  .brand img { width: 40px; height: 40px; }
  .brand-name { font-size: 1rem; }
  .brand-sub { display: none; }
  .nav { flex-wrap: nowrap; gap: 2px; flex: none; }
  .nav a { padding: 10px 8px; min-height: 44px; display: inline-flex; align-items: center; }
  .nav a.btn { padding: 10px 12px; }

  /* Home: get to the items fast */
  .intro { gap: 12px; margin-bottom: 18px; }
  .intro-guest { grid-template-columns: 1fr; padding: 14px; gap: 12px; }
  .intro-guest .hero-lede { display: none; }
  .steps { gap: 8px; }
  .steps li { font-size: 0.92rem; }
  .hero-cta .btn { flex: 1 1 0; }

  /* Item list: compact rows, photo on the left */
  .items { grid-template-columns: 1fr; gap: 10px; }
  .card { flex-direction: row; min-height: 112px; }
  .card-photo { width: 112px; flex: none; aspect-ratio: auto; }
  .card-body { padding: 10px 12px; gap: 6px; min-width: 0; }
  .card-body h3 { font-size: 1.05rem; }
  .card-meta { gap: 8px; }
  .stat-value { font-size: 1.2rem; }
  .no-photo img { width: 48px; height: 48px; }

  /* Item page */
  .item-photo { aspect-ratio: 16 / 10; }
  .bid-panel, .panel { padding: 16px; gap: 14px; }
  .bid-stats .big { font-size: 1.7rem; }
  .stepper { grid-template-columns: 56px 1fr 56px; }
  .stepper button, .stepper input { min-height: 54px; }
  .btn { min-height: 52px; }
  .btn.small { min-height: 40px; }

  /* Bottom bar that keeps the bid button in reach */
  .bid-dock {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    display: flex; align-items: center; gap: 12px;
    padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -4px 14px rgb(0 0 0 / 8%);
  }
  .bid-dock .btn { flex: 1; }
  body.has-dock main { padding-bottom: 110px; }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
}
@media (min-width: 561px) {
  .bid-dock { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
.item-photo .no-photo img { width: 120px; height: 120px; }
.bid-line { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* Green underline under section headings ("Auction items", "My bids") */
.grid-head h2, .panel > h2 { position: relative; padding-bottom: 8px; }
.grid-head h2::after, .panel > h2::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 44px; height: 3px; border-radius: 2px; background: var(--green);
}

/* Privacy policy / terms pages */
.legal { display: flex; flex-direction: column; gap: 14px; }
.legal h1 { margin-bottom: 2px; }
.legal h2 { margin-top: 16px; font-size: 1.35rem; }
.legal ul { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
.legal p, .legal li { max-width: 68ch; color: var(--ink-soft); }
.legal strong { color: var(--ink); }
.footer-legal { flex-basis: 100%; font-size: 0.85rem; }

/* ---- Photo carousel (item page) ---- */
.carousel { position: relative; width: 100%; height: 100%; }
.carousel-track {
  display: flex; height: 100%; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scroll-behavior: smooth; overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.carousel-slide { flex: 0 0 100%; height: 100%; scroll-snap-align: center; }
.carousel-slide img { width: 100%; height: 100%; object-fit: contain; }
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer;
  display: grid; place-items: center; padding: 0 0 3px;
  font: 400 2rem/1 var(--font-body); color: #fff; background: rgb(17 24 39 / 55%);
  transition: background 0.15s;
}
.carousel-btn:hover { background: rgb(17 24 39 / 80%); }
.carousel-btn.prev { left: 10px; }
.carousel-btn.next { right: 10px; }
.carousel-count {
  position: absolute; top: 10px; right: 10px; padding: 3px 10px; border-radius: 999px;
  font-size: 0.8rem; font-weight: 700; color: #fff; background: rgb(17 24 39 / 65%);
  font-variant-numeric: tabular-nums;
}
.carousel-dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; }
.carousel-dots button {
  width: 8px; height: 8px; padding: 0; border: none; border-radius: 4px; cursor: pointer;
  background: rgb(255 255 255 / 65%); box-shadow: 0 0 0 1px rgb(17 24 39 / 25%); transition: width 0.15s, background 0.15s;
}
.carousel-dots button[aria-current="true"] { width: 22px; background: #fff; }
@media (prefers-reduced-motion: reduce) { .carousel-track { scroll-behavior: auto; } }

/* Photo count badge on item cards */
.photo-count {
  position: absolute; left: 6px; bottom: 6px; display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 7px; border-radius: 999px; font-size: 0.75rem; font-weight: 700;
  color: #fff; background: rgb(17 24 39 / 70%); font-variant-numeric: tabular-nums;
}

/* Admin: photo manager in the item dialog */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; margin-bottom: 10px; }
.photo-tile { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; }
.photo-cover { position: absolute; top: 5px; left: 5px; padding: 1px 7px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; color: #fff; background: var(--green-strong); }
.photo-tools { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; background: rgb(17 24 39 / 70%); }
.photo-tools button { flex: 1; min-height: 30px; border: none; background: none; color: #fff; font: 700 1rem/1 var(--font-body); cursor: pointer; }
.photo-tools button:hover:not([disabled]) { background: rgb(255 255 255 / 15%); }
.photo-tools button[disabled] { opacity: 0.35; cursor: default; }
