:root {
  --bg: #f7f4ee;
  --bg-image: none;
  --surface: #ffffff;
  --surface-tint: #f2ede4;
  --text: #1d1d1b;
  --text-muted: #5f5b55;
  --heading: #1a332b;
  --primary: #24453a;
  --primary-dark: #1a332b;
  --secondary: #8a5a2b;
  --border: #ddd6ca;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 6px 18px rgba(0,0,0,.05);
  --radius: 10px;
  --stroke-width: 1px;
  --button-radius: 10px;
  --header-bg: #ffffff;
  --header-text: #24453a;
  --header-accent: #d9672b;
  --header-stripe: #d9672b;
  --logo-plate: transparent;
  --star: #d9672b;
  --button-bg: #24453a;
  --pill-off: #ece6db;
  --pill-sched-bg: #fbe6d6;
  --pill-sched-text: #8a3d0e;
  --hold: #f6c453;
  --hold-text: #3d2c00;
  --sold: #b3261e;
  --sold-text: #ffffff;
  --available: color-mix(in srgb, var(--primary) 14%, #fff);
  --available-text: var(--primary);
  --danger: #b3261e;
  --danger-bg: #fbeceb;
  --font-heading: Georgia, serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { font-size: 18px; }

body {
  margin: 0;
  background-color: var(--bg);
  background-image: var(--bg-image);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  /* Keeps the footer at the bottom of the screen on short pages. */
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

a { color: var(--primary); }

h1, h2 { line-height: 1.2; margin: 0 0 0.5rem; font-family: var(--font-heading); color: var(--heading); font-weight: 700; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.3rem; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  row-gap: 0.3rem;
  padding: 0.9rem 1rem;
  background: var(--header-bg);
  border-bottom: 4px solid var(--header-stripe);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.header-link { font-weight: 600; padding: 0.4rem; white-space: nowrap; }
.site-header .link-button { white-space: nowrap; }
.site-header .header-actions { margin-left: auto; gap: 0.3rem; }
@media (max-width: 480px) {
  .site-header { padding-inline: 0.8rem; }
  .site-header .header-actions { gap: 0.1rem; }
  .site-header .header-link, .site-header .link-button { font-size: 0.92rem; padding: 0.35rem 0.3rem; }
}
.site-header .header-link, .site-header .link-button { color: var(--header-text); }

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  background: var(--logo-plate);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  margin-left: -0.9rem;
  min-width: 0;
}
/* Dot-sticker logo (src/components/Logo.astro) */
.logo { gap: 0.55rem; }
.logo-dots { position: relative; flex: none; width: 46px; height: 36px; }
.logo-dot {
  position: absolute; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  font-family: var(--font-heading); font-size: 0.6rem; font-weight: 800; letter-spacing: -0.02em;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35), 0 1px 2px rgba(0, 0, 0, 0.14);
}
.logo-dot-1 { left: 0; top: 7px; z-index: 3; background: var(--primary); color: #fff; transform: rotate(-10deg); }
.logo-dot-2 { left: 12px; top: 0; z-index: 2; background: var(--hold); }
.logo-dot-3 { left: 20px; top: 10px; z-index: 1; background: var(--available); }
.logo-word { font-family: var(--font-heading); font-weight: 800; font-size: 1.3rem; letter-spacing: -0.03em; color: var(--header-text); white-space: nowrap; }
.logo-word em { font-style: normal; color: var(--header-accent); }
@media (min-width: 700px) { .logo-word { font-size: 1.45rem; } }

.page {
  flex: 1 0 auto;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

.lead { font-size: 1.1rem; color: var(--text-muted); margin: 0 0 1.5rem; }
.muted { color: var(--text-muted); }

/* Forms */
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.field .hint { display: block; font-weight: 400; color: var(--text-muted); font-size: 0.9rem; }

input[type="text"], input[type="email"], input[type="tel"], input[type="date"], textarea {
  width: 100%;
  font: inherit;
  padding: 0.7rem 0.8rem;
  border: calc(var(--stroke-width) + 1px) solid var(--border);
  border-radius: min(var(--radius), 14px);
  background: var(--surface);
  color: var(--text);
}
input:focus, textarea:focus { outline: none; border-color: var(--secondary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--secondary) 18%, transparent); }
textarea { min-height: 6rem; resize: vertical; }

.code-input {
  font-size: 1.8rem !important;
  letter-spacing: 0.4em;
  text-align: center;
  max-width: 14rem;
}

.row { display: flex; gap: 0.8rem; }
.row > .field { flex: 1; min-width: 0; }

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 1.4rem;
  font: inherit;
  font-weight: 600;
  border: none;
  border-radius: var(--button-radius);
  background: var(--button-bg);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.14);
}
.button:hover { filter: brightness(0.93); }
.button:disabled { opacity: 0.65; cursor: default; }
.button.full { width: 100%; }
.button.secondary { background: var(--surface); color: var(--primary); border: calc(var(--stroke-width) + 1px) solid var(--primary); box-shadow: none; }

.link-button {
  background: none;
  border: none;
  padding: 0.4rem;
  font: inherit;
  color: var(--primary);
  text-decoration: underline;
  cursor: pointer;
}

.actions { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; margin-top: 1.5rem; }

/* Messages */
.alert { padding: 0.8rem 1rem; border-radius: var(--radius); margin-bottom: 1.2rem; }
.alert.error { background: var(--danger-bg); color: var(--danger); }
.alert.ok { background: var(--surface-tint); color: var(--heading); border-left: 4px solid var(--secondary); }

/* Cards */
.card {
  background: var(--surface);
  border: var(--stroke-width) solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  box-shadow: var(--shadow);
}

.sale-list { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: 0.8rem; }
.sale-list a { display: block; text-decoration: none; color: inherit; }
.sale-list a:hover .card { border-color: var(--primary); }
.sale-title { font-family: var(--font-heading); font-weight: 700; font-size: 1.15rem; color: var(--heading); }

.badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  background: var(--pill-off);
  color: var(--text-muted);
}

.web-address { font-weight: 600; word-break: break-all; }

/* Item form */
.photo-picker { display: block; position: relative; }
.photo-picker input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.photo-picker:focus-within .button { outline: 3px solid var(--secondary); outline-offset: 2px; }
.photo-status { margin-top: 0.4rem; }
.photo-previews { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.6rem; }
.photo-previews img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }

.price-input { display: flex; align-items: center; gap: 0.4rem; max-width: 12rem; }
.price-input span { font-weight: 700; font-size: 1.2rem; }

.saved-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem; }
.saved-banner .button { min-height: 44px; }

.photo-grid { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-bottom: 1.2rem; }
.photo-tile { display: flex; flex-direction: column; align-items: center; }
.photo-tile img { width: 110px; height: 110px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }

.danger-zone { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.link-button.danger { color: var(--danger); }

/* Sale page items */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 1.5rem 0 0.8rem; }
.section-head h2 { margin: 0; }

.item-list { list-style: none; padding: 0; margin: 1rem 0 2rem; display: grid; gap: 0.8rem; }
.item-row { padding: 0.8rem; scroll-margin-top: 1rem; }
.item-main { display: flex; gap: 0.9rem; align-items: center; text-decoration: none; color: inherit; }
.item-main > span { display: flex; flex-direction: column; min-width: 0; }
.item-thumb { width: 72px; height: 72px; flex: none; object-fit: cover; border-radius: 8px; background: var(--surface-tint); }
.item-title { font-weight: 700; overflow-wrap: anywhere; }
.item-price { font-size: 1.1rem; }
.edit-link { color: var(--primary); text-decoration: underline; font-size: 0.9rem; }
.status-sold .item-title, .status-sold .item-price { color: var(--text-muted); text-decoration: line-through; }

.status-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.4rem; margin-top: 0.8rem; }
.status-button {
  min-height: 46px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border: calc(var(--stroke-width) + 1px) solid var(--border);
  border-radius: var(--button-radius);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
}
.status-button.available.current { background: var(--available); border-color: var(--available); color: var(--available-text); }
.status-button.hold.current { background: var(--hold); border-color: var(--hold); color: var(--hold-text); }
.status-button.sold.current { background: var(--sold); border-color: var(--sold); color: var(--sold-text); }

.sale-details { margin-top: 2rem; border-top: 1px solid var(--border); padding-top: 1rem; }
.sale-details summary { font-weight: 600; color: var(--primary); cursor: pointer; padding: 0.5rem 0; font-size: 1.05rem; }
.sale-details[open] summary { margin-bottom: 1rem; }

/* Sale page sections */
.section { margin: 1.2rem 0; }
.section-plain { margin: 1.8rem 0; }
.section-top { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; margin-bottom: 0.6rem; }
.card.section > .section-top {
  margin: -1.1rem -1.1rem 0.9rem;
  padding: 0.75rem 1.1rem;
  background: var(--surface-tint);
  border-bottom: var(--stroke-width) solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
}
.section-top h2 { margin: 0; }
.switch-status {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  margin: 0 0 0.6rem;
  padding: 0.55rem 0.75rem;
  border-radius: min(var(--radius), 12px);
  background: var(--pill-off);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
}
.switch-status.has-schedule { background: var(--pill-sched-bg); color: var(--pill-sched-text); }
.switch-status svg { flex: none; width: 1.15rem; height: 1.15rem; margin-top: 0.15rem; }
.switch-text { margin: 0.4rem 0 0.9rem; }
.switch-links { display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; justify-content: center; margin-top: 0.5rem; }
.web-address-line { margin: 0 0 0.4rem; }
.hint-line { margin: 0.8rem 0 0; font-size: 0.95rem; }

.pill {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  white-space: nowrap;
}
.pill-on { background: var(--primary); color: #fff; }
.pill-off { background: var(--pill-off); color: var(--text-muted); }
.pill-scheduled { background: var(--pill-sched-bg); color: var(--pill-sched-text); }
.sale-list .pill { margin-top: 0.4rem; }

.address-edit { margin-bottom: 0.8rem; }
.address-edit summary { cursor: pointer; font-weight: 600; padding: 0.3rem 0; }
.address-edit[open] summary { margin-bottom: 0.8rem; }
.address-edit form { margin-bottom: 0.5rem; }

.address-fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 0.9rem 1rem 0.2rem; margin: 0 0 1.1rem; }
.address-fieldset legend { font-weight: 700; padding: 0 0.3rem; }
.address-fieldset > .hint { margin: 0 0 0.9rem; color: var(--text-muted); font-size: 0.9rem; }

.sale-details summary { margin-bottom: 0; }

.time-block { border: none; padding: 0; margin: 0 0 0.6rem; }
.time-block[hidden] { display: none; }
.time-block legend { font-weight: 700; margin-bottom: 0.15rem; padding: 0; }
.time-hint { margin: 0 0 0.6rem; color: var(--text-muted); font-size: 0.92rem; }
.check { display: flex; align-items: center; gap: 0.6rem; font-weight: 600; margin: 0.2rem 0 1rem; cursor: pointer; }
.check input { width: 1.4rem; height: 1.4rem; accent-color: var(--primary); }

/* Slide-up panel for "Set a time instead" */
dialog.sheet {
  border: none;
  border-radius: 16px 16px 0 0;
  padding: 1.4rem 1rem 1.2rem;
  width: 100%;
  max-width: 640px;
  margin: auto auto 0;
  background: var(--surface);
  color: var(--text);
  border-top: 5px solid var(--header-stripe);
}
dialog.sheet[open] { animation: sheet-up 0.22s ease-out; }
dialog.sheet::backdrop { background: rgba(0, 0, 0, 0.45); }
dialog.sheet h2 { margin-bottom: 0.3rem; }
.sheet-close { display: block; margin: 0.6rem auto 0; }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 700px) {
  dialog.sheet { margin: auto; border-radius: 16px; }
}

/* Header, footer, banners */
.header-actions { display: flex; align-items: center; gap: 0.6rem; }
.preview-banner {
  background: var(--secondary);
  color: #fff;
  text-align: center;
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
}
.preview-banner a { color: #fff; font-weight: 700; margin-left: 0.5rem; }
.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem 1rem 2.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1.4rem; }
.footer-mail-note { margin: 0; font-size: 0.78rem; color: var(--text-muted); text-align: center; }

/* "Powered by StarviewData" (pattern from the shared CLAUDE.md) */
.powered-by { display: inline-flex; align-items: center; gap: 0.4rem; margin: 0.3rem 0 0; font-size: 0.8rem; color: var(--text-muted); }
.starview-link { display: inline-flex; align-items: baseline; gap: 2px; text-decoration: none; opacity: 0.8; transition: opacity 0.2s; }
.starview-link:hover { opacity: 1; }
.sv-main   { font-size: 0.82rem; font-weight: 700; color: var(--text-muted); letter-spacing: -0.3px; }
.sv-accent { font-size: 0.58rem; font-weight: 600; color: var(--secondary); font-style: italic; letter-spacing: -0.2px; }
.sv-star   { fill: var(--star); width: 10px; height: 10px; transform: translateY(-2px); margin-left: 1px; }

/* Admin */
.admin-nav { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.2rem; }
.admin-nav a {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 2px solid var(--border);
  text-decoration: none;
  font-weight: 600;
}
.admin-nav a[aria-current="page"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 0.6rem; margin-bottom: 1.5rem; }
.stat { display: flex; flex-direction: column; align-items: center; padding: 0.8rem; }
.stat-n { font-family: var(--font-heading); font-size: 1.8rem; font-weight: 700; color: var(--primary); line-height: 1.1; }
.preview-stop { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; }

/* Long-form pages (admin notes, how it works, privacy) */
.doc h2 { margin-top: 2rem; }
.doc p, .doc li { max-width: 62ch; }
.doc li { margin-bottom: 0.4rem; }
.doc code { font-size: 0.85em; background: var(--pill-off); padding: 0.1em 0.35em; border-radius: 4px; overflow-wrap: anywhere; }
.doc table { width: 100%; border-collapse: collapse; margin: 0.8rem 0; font-size: 0.95rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--border); }
.doc tbody th { white-space: nowrap; }

/* Theme lab */
.theme-grid { display: grid; gap: 1.2rem; margin: 1.5rem 0; }
.theme-card { padding: 0; overflow: hidden; }
.theme-sample { background-color: var(--bg); background-image: var(--bg-image); color: var(--text); font-family: var(--font-body); }
.theme-sample .site-header { padding: 0.7rem 0.9rem; }
.theme-sample-body { padding: 0.9rem; display: grid; gap: 0.7rem; }
.sample-heading { font-size: 1.15rem; }
.sample-pills { display: flex; gap: 0.4rem; }
.sample-button { pointer-events: none; }
.theme-sample .status-button { display: inline-flex; align-items: center; justify-content: center; }
.theme-info { padding: 1rem; border-top: 1px solid var(--border); }
.theme-info h2 { display: flex; align-items: center; gap: 0.6rem; }
.theme-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
@media (min-width: 900px) {
  .page:has(.theme-grid) { max-width: 1040px; }
  .theme-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Home page */
.page:has(.home) { max-width: 1040px; }
.hero { display: grid; gap: 1.5rem; align-items: center; padding: 0.5rem 0 2rem; }
@media (min-width: 820px) { .hero { grid-template-columns: 1.15fr 0.85fr; gap: 2.5rem; padding: 1.5rem 0 2.5rem; } }
.hero h1 { font-size: clamp(2.1rem, 5.5vw, 3rem); line-height: 1.08; letter-spacing: -0.5px; }
.hero-price { display: block; font-size: 0.58em; font-weight: 600; margin-top: 0.45rem; color: var(--primary); letter-spacing: 0; }
.beta-mark { text-decoration: none; color: var(--secondary); margin-left: 0.1em; }
.hero .lead { font-size: 1.15rem; max-width: 32rem; }
.hero-actions .button { min-height: 58px; padding: 0 2rem; font-size: 1.05rem; }
.hero-signin { margin-top: 0.9rem; }

/* Sample sale on a phone */
.hero-visual { position: relative; display: flex; justify-content: center; padding: 2.2rem 0 0.5rem; }
.hero-visual::before {
  content: '';
  position: absolute;
  inset: 10% 4% 0;
  background:
    radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--secondary) 30%, transparent), transparent 62%),
    radial-gradient(circle at 70% 75%, color-mix(in srgb, var(--primary) 26%, transparent), transparent 62%);
  filter: blur(28px);
}
.phone {
  position: relative;
  width: min(290px, 82vw);
  background: #1d1d1f;
  border-radius: 40px;
  padding: 11px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.22), 0 4px 12px rgba(0, 0, 0, 0.12);
  transform: rotate(2.5deg);
}
.phone-notch { position: absolute; top: 11px; left: 50%; transform: translateX(-50%); width: 92px; height: 20px; background: #1d1d1f; border-radius: 0 0 14px 14px; z-index: 2; }
.phone-screen {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-height: 470px;
  padding: 2rem 0.75rem 0.9rem;
  border-radius: 30px;
  overflow: hidden;
  background-color: var(--bg);
  background-image: var(--bg-image);
  color: var(--text);
}
.mock-head { background: var(--header-bg); color: var(--header-text); border-radius: 16px; padding: 0.75rem 0.9rem; border-bottom: 3px solid var(--header-stripe); }
.mock-title { font-family: var(--font-heading); font-weight: 700; font-size: 1.05rem; line-height: 1.2; }
.mock-sub { font-size: 0.74rem; opacity: 0.85; }
.mock-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.mock-item { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem; background: var(--surface); border: var(--stroke-width) solid var(--border); border-radius: 14px; box-shadow: var(--shadow); }
.mock-thumb { width: 44px; height: 44px; flex: none; border-radius: 10px; }
.tint-a { background: linear-gradient(135deg, #d2a676, #8a5a35); }
.tint-b { background: radial-gradient(circle, #efe6d8 0 11%, #1f1f1f 12% 58%, #3a3a3a 59% 66%, #1f1f1f 67%); }
.tint-c { background: linear-gradient(135deg, #8fd0ef, #3b82c4); }
.tint-d { background: linear-gradient(135deg, #f5d98a, #b8892b); }
.mock-name { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 0.8rem; font-weight: 600; line-height: 1.25; }
.mock-cost { font-weight: 700; font-size: 0.85rem; color: var(--primary); }
.mock-sold .mock-name { color: var(--text-muted); text-decoration: line-through; }
.mock-sold .mock-thumb { opacity: 0.5; }
.mock-chip { font-size: 0.66rem; font-weight: 700; padding: 0.15rem 0.5rem; border-radius: 999px; white-space: nowrap; }
.chip-available { background: var(--available); color: var(--available-text); }
/* Round yard-sale price stickers */
.mock-dot {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  font-family: var(--font-heading); font-weight: 800; font-size: 0.82rem; letter-spacing: -0.02em; transform: rotate(8deg);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35), 0 1px 2px rgba(0, 0, 0, 0.14);
}
.dot-available { background: var(--available); color: var(--available-text); }
.dot-hold { background: var(--hold); color: var(--hold-text); font-size: 0.6rem; letter-spacing: 0.04em; }
.dot-sold { background: var(--sold); color: var(--sold-text); font-size: 0.6rem; letter-spacing: 0.04em; }
.chip-sold { background: var(--sold); color: var(--sold-text); }
.chip-hold { background: var(--hold); color: var(--hold-text); }
.mock-call { margin-top: auto; padding: 0.6rem; text-align: center; font-weight: 700; font-size: 0.9rem; color: #fff; background: var(--button-bg); border-radius: var(--button-radius); }

/* Beta price tag hanging off the phone. BETA: remove with the sticker. */
.beta-tag {
  position: absolute;
  z-index: 3;
  top: 0.4rem;
  right: max(0.2rem, calc(50% - 190px));
  padding: 0.5rem 1rem 0.5rem 2.1rem;
  background: var(--hold);
  color: var(--hold-text);
  clip-path: polygon(18px 0, 100% 0, 100% 100%, 18px 100%, 0 50%);
  border-radius: 0 10px 10px 0;
  transform-origin: 0 50%;
  animation: tag-sway 4.5s ease-in-out infinite;
}
.beta-tag::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 50%;
  width: 9px;
  height: 9px;
  margin-top: -4.5px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
}
.beta-tag-small { display: block; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.beta-tag-big { display: block; font-family: var(--font-heading); font-weight: 700; font-size: 1.05rem; line-height: 1.15; }
@keyframes tag-sway { 0%, 100% { transform: rotate(-9deg); } 50% { transform: rotate(-4deg); } }
@media (prefers-reduced-motion: reduce) { .beta-tag { animation: none; transform: rotate(-7deg); } }

/* Beta announcement. BETA: remove with the card. */
.beta-card {
  position: relative;
  overflow: hidden;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin: 0 0 1.5rem;
  padding: 1.4rem 1.4rem 1.3rem;
  border-radius: var(--radius);
  background: var(--button-bg);
  color: #fff;
  box-shadow: var(--shadow);
}
.beta-card::after {
  content: '';
  position: absolute;
  right: -50px;
  top: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.09);
  pointer-events: none;
}
.beta-card h2 { color: #fff; font-size: 1.6rem; margin-bottom: 0.35rem; }
.beta-card p { margin: 0; opacity: 0.95; max-width: 46rem; }
.beta-card a { color: #fff; font-weight: 700; }
.beta-card-badge {
  flex: none;
  margin-top: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--hold);
  color: var(--hold-text);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
@media (max-width: 560px) { .beta-card { flex-direction: column; gap: 0.5rem; } }

/* How it works / What to expect */
.info-grid { display: grid; gap: 1.3rem; margin-bottom: 1.3rem; }
@media (min-width: 900px) { .info-grid { grid-template-columns: 1fr 1fr; align-items: start; } }
.info-card { padding: 1.3rem 1.3rem 1.1rem; }
.info-card h2 { margin-bottom: 1rem; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.1rem; }
.steps li { display: grid; grid-template-columns: 2.8rem 1fr; column-gap: 0.9rem; }
.step-icon {
  grid-row: span 2;
  width: 2.8rem;
  height: 2.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface-tint);
  color: var(--primary);
  border: 2px solid var(--border);
}
.step-icon svg { width: 1.35rem; height: 1.35rem; }
.steps strong { font-size: 1.05rem; color: var(--heading); }
.step-text { color: var(--text-muted); }
.expect { margin: 0; display: grid; gap: 0.9rem; }
.expect > div { padding-left: 0.9rem; border-left: 3px solid var(--secondary); }
.expect dt { font-weight: 700; color: var(--heading); }
.expect dd { margin: 0.1rem 0 0; color: var(--text-muted); }
.more-link { margin: 1.2rem 0 0; font-weight: 600; }

.people-note {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin: 0 0 1.3rem;
  padding: 1.1rem 1.3rem;
  border-radius: var(--radius);
  border: var(--stroke-width) dashed var(--border);
  background: var(--surface);
}
.people-note svg { flex: none; width: 2rem; height: 2rem; padding: 0.35rem; border-radius: 50%; background: var(--surface-tint); color: var(--secondary); }
.people-note h2 { font-size: 1.15rem; margin-bottom: 0.2rem; }
.people-note p { margin: 0; color: var(--text-muted); }

.closing {
  text-align: center;
  padding: 2rem 1.2rem;
  border-radius: var(--radius);
  background: var(--surface-tint);
  border: var(--stroke-width) solid var(--border);
}
.closing p { color: var(--text-muted); margin: 0 0 1.1rem; }

/* Online days on the sale page */
.days-box { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.4rem 1rem; padding: 0.6rem 0.8rem; margin: 0 0 0.8rem; border-radius: min(var(--radius), 12px); background: var(--surface-tint); }
.days-links { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; font-size: 0.95rem; }
.switch-blocked p { margin-top: 0.2rem; }

/* Day picker */
.day-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.2rem, 1fr)); gap: 0.5rem; margin: 0.8rem 0 1.2rem; }
.day-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.05rem;
  padding: 0.6rem 0.3rem;
  border: calc(var(--stroke-width) + 1px) solid var(--border);
  border-radius: min(var(--radius), 14px);
  background: var(--surface);
  cursor: pointer;
  text-align: center;
  user-select: none;
}
.day-tile input { position: absolute; opacity: 0; pointer-events: none; }
.day-weekday { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.day-date { font-weight: 700; font-size: 1.05rem; }
.day-note { font-size: 0.7rem; font-weight: 700; color: var(--secondary); }
.day-tile.sale-day { border-style: dashed; border-color: var(--secondary); }
.day-tile:has(input:checked) { background: var(--primary); border-color: var(--primary); border-style: solid; color: #fff; }
.day-tile:has(input:checked) .day-weekday, .day-tile:has(input:checked) .day-note { color: #fff; opacity: 0.9; }
.day-tile:has(input:focus-visible) { outline: 3px solid var(--secondary); outline-offset: 2px; }
.day-past { opacity: 0.4; cursor: default; }
.day-taken { cursor: default; background: var(--surface-tint) !important; color: var(--text) !important; border-color: var(--border) !important; }
.day-taken .day-weekday, .day-taken .day-note { color: var(--text-muted) !important; }

.order-summary, .checkout-lines { margin-bottom: 1.2rem; }
.summary-row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.35rem 0; }
.summary-row.discount { color: var(--secondary); font-weight: 600; }
.summary-row.total { border-top: 1px solid var(--border); margin-top: 0.3rem; padding-top: 0.6rem; font-weight: 700; font-size: 1.1rem; }

/* Beta checkout (stand-in for Stripe's hosted page) */
.page:has(.checkout) { max-width: 900px; }
.checkout-banner { text-align: center; font-weight: 700; font-size: 0.9rem; padding: 0.45rem 0.8rem; margin: 0 0 1.4rem; border-radius: 999px; background: var(--hold); color: var(--hold-text); }
.checkout-grid { display: grid; gap: 1.5rem; }
@media (min-width: 760px) { .checkout-grid { grid-template-columns: 1fr 1fr; align-items: start; gap: 2.5rem; } }
.checkout-total { font-family: var(--font-heading); font-size: 2.6rem; font-weight: 700; margin: 0; color: var(--heading); }
.checkout-sale { font-weight: 700; margin: 0.6rem 0 0.1rem; }
.checkout-lines { margin-top: 1.2rem; }
.field-label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.checkout-static { padding: 0.7rem 0.8rem; border: calc(var(--stroke-width) + 1px) solid var(--border); border-radius: min(var(--radius), 14px); background: var(--surface-tint); }
.checkout-cancel { text-align: center; margin-top: 0.6rem; }

/* Move days */
.move-from { display: flex; flex-wrap: wrap; gap: 0.2rem 1.4rem; }
.move-form .section .day-grid { margin-bottom: 0.4rem; }
.receipt-moves { margin: -0.4rem 0 1rem; padding-left: 1.2rem; font-size: 0.95rem; }

/* Receipt */
.receipt-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.receipt-head h1 { margin: 0; }
@media print {
  .site-header, .site-footer, .no-print, .preview-banner { display: none !important; }
  body { background: #fff !important; }
  .receipt { box-shadow: none; border: none; }
}

/* Admin lists and detail pages */
.small-heading { font-size: 1rem; margin: 1.2rem 0 0.4rem; }
.excluded-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.3rem; }
.excluded-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem; }
.page:has(.admin-wide) { max-width: 1100px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.admin-search { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin: 0.5rem 0 1rem; }
.admin-search input { flex: 1 1 16rem; width: auto; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.8rem; }
.filter-chips a {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.3rem 0.8rem; border-radius: 999px;
  border: calc(var(--stroke-width) + 1px) solid var(--border);
  background: var(--surface); text-decoration: none; font-weight: 600; font-size: 0.95rem;
}
.filter-chips a[aria-current="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip-count { font-size: 0.8rem; opacity: 0.75; }

.table-scroll {
  overflow-x: auto;
  background: var(--surface);
  border: var(--stroke-width) solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.admin-table th, .admin-table td { text-align: left; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table thead th { background: var(--surface-tint); color: var(--heading); font-weight: 700; white-space: nowrap; }
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: color-mix(in srgb, var(--surface-tint) 50%, transparent); }
.admin-table .pill { font-size: 0.78rem; }
.num { text-align: right !important; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.strong-link { font-weight: 700; }
.break { overflow-wrap: anywhere; }
.small { font-size: 0.85rem; }
.preserve-lines { white-space: pre-line; }

.admin-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.9rem 1.4rem; margin: 1rem 0 1.5rem; }
.admin-facts dt { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.admin-facts dd { margin: 0.1rem 0 0; }

.admin-items { list-style: none; padding: 0; margin: 0 0 2rem; display: grid; gap: 0.7rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); }
.admin-items li { display: flex; gap: 0.9rem; align-items: flex-start; padding: 0.8rem; }
.admin-items .item-price { margin-right: 0.5rem; }
.status-pill-available { background: var(--available); color: var(--available-text); }
.status-pill-hold { background: var(--hold); color: var(--hold-text); }
.status-pill-sold { background: var(--sold); color: var(--sold-text); }

@media (max-width: 480px) {
  .row { flex-direction: column; gap: 0; }
}

/* Sign in: Google button and the "or" line under it */
.google-button { display: flex; align-items: center; justify-content: center; gap: 0.6rem; text-decoration: none; }
.google-button svg { width: 20px; height: 20px; flex: none; }
.or-divider { display: flex; align-items: center; gap: 0.8rem; margin: 1.2rem 0; color: var(--text-muted); font-size: 0.9rem; }
.or-divider::before, .or-divider::after { content: ''; flex: 1; border-top: 1px solid var(--border); }

/* ── Animated sticker icons (home, How it works). Motion starts when an ancestor gets .in ── */
/* Animated icon tiles: sticker-colored circles. Motion starts once the card is on screen (.in). */
.anim-ic { flex: none; display: grid; place-items: center; width: 3.4rem; height: 3.4rem; border-radius: 50%; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.4); }
.anim-ic.small { width: 2.8rem; height: 2.8rem; }
.anim-ic svg { width: 55%; height: 55%; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.tone-available { background: var(--available); color: var(--available-text); }
.tone-hold { background: var(--hold); color: var(--hold-text); }
.tone-sold { background: var(--sold); color: var(--sold-text); }
.tone-primary { background: var(--primary); color: #fff; }


/* ── Icon motions (only after .in, never with reduced motion) ── */
.ic-flash, .ic-spark, .ic-wave { opacity: 0; }
.ic-flash { stroke-width: 1.4; }
@media (prefers-reduced-motion: no-preference) {
  .in .ic-paper { animation: ic-paper 3.2s ease-in-out infinite; }
  .in .ic-flash { animation: ic-flash 2.8s ease-out infinite; transform-origin: 12px 13px; transform-box: view-box; }
  .in .ic-spark { animation: ic-spark 2.8s ease-out infinite; }
  .in .ic-scan { animation: ic-scan 2.4s ease-in-out infinite; }
  .in .ic-swing { animation: ic-swing 3s ease-in-out infinite; transform-origin: 7.5px 7.5px; transform-box: view-box; }
  .in .ic-coin { animation: ic-coin 4s ease-in-out infinite; transform-origin: 12px 12px; transform-box: view-box; }
  .in .ic-bounce { animation: ic-bounce 2.2s ease-in-out infinite; }
  .in .ic-shadow { animation: ic-shadow 2.2s ease-in-out infinite; transform-origin: 12px 21.5px; transform-box: view-box; }
  .in .ic-hand-m { animation: ic-spin 6s linear infinite; transform-origin: 12px 12px; transform-box: view-box; }
  .in .ic-hand-h { animation: ic-spin 36s linear infinite; transform-origin: 12px 12px; transform-box: view-box; }
  .in .ic-wave { animation: ic-wave 2s ease-out infinite; }
  .in .ic-wave.w2 { animation-delay: 0.3s; }
  .in .ic-cursor { animation: ic-blink 1.1s steps(1) infinite; }
  }
@keyframes ic-paper { 0%, 100% { transform: translateY(3px); } 45%, 60% { transform: translateY(-3px); } }
@keyframes ic-flash { 0%, 70% { opacity: 0; transform: scale(1); } 74% { opacity: 1; transform: scale(1.4); } 100% { opacity: 0; transform: scale(2.8); } }
@keyframes ic-spark { 0%, 70% { opacity: 0; } 76% { opacity: 1; } 100% { opacity: 0; } }
@keyframes ic-scan { 0%, 100% { transform: translateY(-7px); opacity: 0.25; } 50% { transform: translateY(7px); opacity: 1; } }
@keyframes ic-swing { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }
@keyframes ic-coin { 0%, 70%, 100% { transform: scaleX(1); } 78% { transform: scaleX(0.1); } 86% { transform: scaleX(1); } }
@keyframes ic-bounce { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-3px); } }
@keyframes ic-shadow { 0%, 100% { transform: scale(1); opacity: 0.5; } 40% { transform: scale(0.7); opacity: 0.25; } }
@keyframes ic-spin { to { transform: rotate(360deg); } }
@keyframes ic-wave { 0% { opacity: 0; } 30% { opacity: 1; } 100% { opacity: 0; } }
@keyframes ic-blink { 50% { opacity: 0; } }
@keyframes hang-sway { 0%, 100% { rotate: -6deg; } 50% { rotate: 6deg; } }


/* Sale page chunks: one card per job, each with a tinted header strip and an icon. */
.card.chunk > .chunk-head {
  display: flex; align-items: center; gap: 0.6rem;
  margin: -1.1rem -1.1rem 0.9rem; padding: 0.7rem 1.1rem;
  background: var(--surface-tint); border-bottom: var(--stroke-width) solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
}
.chunk-head h2, .chunk-head .h2-like { margin: 0; font-size: 1.15rem; font-family: var(--font-heading); font-weight: 700; color: var(--heading); }
.chunk-meta { margin-left: auto; font-size: 0.88rem; }
.chunk-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.8rem; flex: 1; }
.chunk-title .chunk-meta { margin-left: 0; }
.chunk-ic, .section-top .chunk-ic {
  flex: none; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--surface); border: var(--stroke-width) solid var(--border); color: var(--primary);
}
.chunk-ic svg { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.section-top .section-title { display: flex; align-items: center; gap: 0.6rem; }
.section-top h2 { font-size: 1.15rem; }
.chunk-empty { margin: 0.8rem 0 0; }
/* Sale details is a <details>; its summary is the header strip. */
.sale-details.chunk { margin-top: 1.2rem; border-top: var(--stroke-width) solid var(--border); padding-top: 1.1rem; }
.sale-details.chunk > summary.chunk-head { cursor: pointer; list-style: none; padding-right: 2.4rem; position: relative; font-size: inherit; }
.sale-details.chunk > summary.chunk-head::-webkit-details-marker { display: none; }
.sale-details.chunk > summary.chunk-head::after {
  content: ''; position: absolute; right: 1.2rem; top: 50%; width: 0.5rem; height: 0.5rem; margin-top: -0.35rem;
  border-right: 2px solid var(--primary); border-bottom: 2px solid var(--primary); rotate: 45deg; transition: rotate 0.2s;
}
.sale-details.chunk[open] > summary.chunk-head::after { rotate: 225deg; margin-top: -0.1rem; }
.sale-details.chunk:not([open]) > summary.chunk-head { margin-bottom: -1.1rem; border-bottom: none; border-radius: var(--radius); }
