:root {
  --bg: #fbf7f0;
  --surface: #ffffff;
  --surface-2: #f3ede2;
  --text: #1d2a22;
  --muted: #5d6b61;
  --border: #e4dccd;
  --green: #1f3d2b;
  --green-2: #2f5a40;
  --red: #b3262e;
  --gold: #c9a227;
  --focus: #c9a227;
  --shadow: 0 1px 2px rgb(31 61 43 / 6%), 0 8px 24px rgb(31 61 43 / 8%);
  --radius: 18px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1a14;
    --surface: #16241c;
    --surface-2: #1d2f25;
    --text: #eef2ec;
    --muted: #a7b5aa;
    --border: #2b4135;
    --green: #8fc79d;
    --green-2: #a7d6b3;
    --red: #ec6b72;
    --gold: #e3c063;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 30%);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}
img { max-width: 100%; display: block; }
a { color: var(--green-2); }
h1, h2, h3 { font-family: Fraunces, Georgia, serif; font-weight: 700; line-height: 1.12; margin: 0; letter-spacing: -0.01em; }
h4 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 1080px; margin: 0 auto; padding: 18px 16px;
}
.brand-mark { flex: none; display: block; }
.brand-mark .g { stroke: var(--garland, #e8a33d); }
.brand-mark .gd { fill: var(--garland, #e8a33d); }
.brand { white-space: nowrap; display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-family: Fraunces, Georgia, serif; font-weight: 700; font-size: 20px; }
.topbar nav a { color: var(--muted); font-size: 14px; text-decoration: none; }
.topbar nav a:hover { color: var(--text); }

main { max-width: 1080px; margin: 0 auto; padding: 0 16px 48px; }

.hero { text-align: center; padding: 28px 0 24px; max-width: 680px; margin: 0 auto; }
.eyebrow { color: var(--red); font-weight: 600; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; margin: 0 0 10px; }
.hero h1 { font-size: clamp(34px, 7vw, 58px); color: var(--green); }
.lede { color: var(--muted); font-size: 18px; margin: 16px auto 0; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.center { text-align: center; padding: 40px 24px; display: grid; gap: 12px; justify-items: center; }

.upload { max-width: 620px; margin: 0 auto; padding: 20px; display: grid; gap: 18px; }
.dropzone {
  display: grid; place-items: center; min-height: 220px; border: 2px dashed var(--border); border-radius: 14px;
  background: var(--surface-2); cursor: pointer; overflow: hidden; position: relative; transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--green-2); }
.dz-empty { display: grid; gap: 6px; justify-items: center; text-align: center; color: var(--muted); padding: 24px; }
.dz-empty svg { color: var(--green-2); }
.dz-empty strong { color: var(--text); font-size: 18px; }
.dz-preview { width: 100%; max-height: 420px; object-fit: cover; }

.describe summary { cursor: pointer; color: var(--green-2); font-weight: 500; }
.describe textarea, .notes input {
  width: 100%; margin-top: 8px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; resize: vertical;
}
.notes { display: grid; font-weight: 500; }

.chips { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips legend { font-weight: 500; margin-bottom: 8px; padding: 0; }
.opt { color: var(--muted); font-weight: 400; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); cursor: pointer; font-size: 14px; user-select: none;
}
.chip input:checked + span { background: var(--green); color: var(--bg); border-color: var(--green); }
.chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: 600 15px/1 Inter, system-ui, sans-serif; cursor: pointer; text-decoration: none;
}
.btn:hover { border-color: var(--green-2); }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; font-size: 17px; min-height: 52px; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.primary:disabled { opacity: .6; cursor: progress; }
.btn.ghost { background: transparent; }
.btn.small { min-height: 34px; padding: 6px 12px; font-size: 13px; }

.error { color: var(--red); margin: 0; font-weight: 500; }
.fineprint { color: var(--muted); font-size: 13px; margin: 0; text-align: center; }
.turnstile:empty { display: none; }

.how { list-style: none; padding: 0; margin: 36px auto 0; max-width: 820px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.how li { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); }
.how b { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--green); color: var(--bg); font-size: 14px; }

.loading { max-width: 520px; margin: 48px auto; padding: 40px 24px; text-align: center; display: grid; gap: 10px; justify-items: center; }
.loading p { color: var(--muted); margin: 0; }
.ornament {
  width: 64px; height: 64px; border-radius: 50%; position: relative; margin-bottom: 8px;
  background: radial-gradient(circle at 35% 30%, #ff8a8f, var(--red) 55%, #6e1218);
  animation: swing 1.6s ease-in-out infinite; transform-origin: 50% -30px;
}
.ornament::before { content: ""; position: absolute; top: -9px; left: 24px; width: 16px; height: 11px; border-radius: 3px; background: var(--gold); }
@keyframes swing { 0%, 100% { transform: rotate(-12deg); } 50% { transform: rotate(12deg); } }
@media (prefers-reduced-motion: reduce) { .ornament { animation: none; } }

.results-head { margin: 12px 0 24px; max-width: 820px; }
.results-head h2 { font-size: clamp(20px, 3vw, 26px); font-weight: 500; }
.tags { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { background: var(--surface-2); color: var(--muted); border-radius: 999px; padding: 4px 10px; font-size: 13px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 16px; scrollbar-width: thin; }
.tab {
  flex: none; display: grid; gap: 2px; text-align: left; padding: 12px 16px; min-width: 170px; border-radius: 14px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; font: inherit;
}
.tab small { color: var(--muted); font-size: 12px; }
.tab strong { font-family: Fraunces, Georgia, serif; font-size: 17px; }
.tab[aria-selected="true"] { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); background: var(--surface-2); }

.idea { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.idea-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.idea-title { font-size: clamp(24px, 4vw, 32px); color: var(--green); }
.idea-vibe { color: var(--muted); margin: 6px 0 0; font-style: italic; }
.idea-meta { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.pill { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--text); }
.pill.difficulty { text-transform: capitalize; }
.palette { display: flex; gap: 0; margin: 18px 0; border-radius: 12px; overflow: hidden; height: 40px; border: 1px solid var(--border); }
.palette span { flex: 1; }
.idea-desc { margin: 0 0 20px; font-size: 17px; }
.idea-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.visual-col { position: sticky; top: 12px; display: grid; gap: 14px; }
.steps-wrap { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--border); }

/* Budget input */
.budget-field { display: grid; gap: 8px; }
.budget-field > label { font-weight: 500; }
.budget-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.money { display: flex; align-items: center; gap: 4px; border: 1px solid var(--border); border-radius: 12px; padding: 0 12px; background: var(--surface); }
.money span { color: var(--muted); font-weight: 600; }
.money input { width: 96px; border: 0; background: transparent; color: var(--text); font: 600 18px Inter, system-ui, sans-serif; padding: 10px 0; }
.money input:focus { outline: none; }
.money:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.chip button { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; font: 14px Inter, system-ui, sans-serif; }
.chip button[aria-pressed="true"] { background: var(--green); color: var(--bg); border-color: var(--green); }
.hint { margin: 0; color: var(--muted); font-size: 13px; }

/* Live visual */
.visual { position: relative; border-radius: 16px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); }
.ba { position: relative; --split: 50%; min-height: 220px; }
.ba > img, .ba .before { width: 100%; display: block; }
.ba .before.blank { aspect-ratio: 4 / 3; background: linear-gradient(135deg, var(--surface-2), var(--border)); }
.ba .after { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; clip-path: inset(0 0 0 var(--split)); transition: opacity .35s; }
.ba.solo .after { position: static; clip-path: none; }
.ba.solo:not(.busy) .before { display: none; }
.ba.busy .after { opacity: .55; filter: saturate(.7); }
.ba-slider { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; z-index: 3; }
.ba:has(.after:not([hidden]))::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: var(--split); width: 3px; transform: translateX(-50%);
  background: #fff; box-shadow: 0 0 8px rgb(0 0 0 / 40%); pointer-events: none; z-index: 2;
}
.ba-tag { position: absolute; top: 10px; z-index: 2; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: rgb(0 0 0 / 55%); color: #fff; pointer-events: none; }
.ba-tag.left { left: 10px; }
.ba-tag.right { right: 10px; }
.ba:not(:has(.after:not([hidden]))) .ba-tag, .ba:not(:has(.after:not([hidden]))) .ba-slider { display: none; }
.render-status {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 4; display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; border-radius: 999px; background: rgb(15 26 20 / 82%); color: #fff; font-size: 14px; font-weight: 500; white-space: nowrap;
}
.render-status[hidden] { display: none; }
.render-status .btn { min-height: 0; padding: 4px 12px; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgb(255 255 255 / 35%); border-top-color: #fff; animation: spin .8s linear infinite; }
.spinner[hidden] { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }

/* Running total */
.tally { background: var(--surface-2); border-radius: 14px; padding: 14px; display: grid; gap: 10px; }
.tally-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.tally-count { color: var(--muted); font-size: 14px; }
.tally-total { font-family: Fraunces, Georgia, serif; font-size: 26px; }
.meter { height: 10px; border-radius: 999px; background: var(--border); overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; background: var(--green-2); border-radius: inherit; transition: width .3s ease, background .2s; }
.meter.over span { background: var(--red); }
.tally-note { margin: 0; font-size: 13px; color: var(--muted); }
.tally-note.over { color: var(--red); font-weight: 600; }
.tally-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.amazon-cart { background: #ff9900; border-color: #ff9900; color: #111; }

/* Product rows with checkboxes */
.product { grid-template-columns: auto 1fr; column-gap: 12px; transition: opacity .2s, border-color .2s; }
.product > :not(.check) { grid-column: 2; }
.product .check { grid-row: 1 / span 3; padding-top: 2px; }
.product .check input { width: 22px; height: 22px; accent-color: var(--green-2); cursor: pointer; }
.product.off { opacity: .55; }
.product.off .product-name { text-decoration: line-through; text-decoration-color: var(--muted); }
.product.has-thumb { grid-template-columns: auto 1fr 84px; }
.thumb { grid-column: 3 !important; grid-row: 1 / span 3; display: grid; gap: 2px; text-decoration: none; color: var(--muted); font-size: 12px; text-align: center; }
.thumb img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; background: var(--surface-2); }
.product-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.product-price { font-weight: 600; white-space: nowrap; }
.tag-extra { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--gold); font-weight: 600; margin-left: 6px; }
.steps { margin: 0; padding-left: 22px; display: grid; gap: 10px; }

.products { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.product { border: 1px solid var(--border); border-radius: 14px; padding: 14px; display: grid; gap: 8px; }
.product-name { font-weight: 600; }
.product-qty { color: var(--muted); font-weight: 400; }
.product-why { color: var(--muted); font-size: 14px; margin: 0; }
.shop { display: flex; flex-wrap: wrap; gap: 6px; }
.shop a { text-decoration: none; }
.shop a.amazon { background: #ff9900; border-color: #ff9900; color: #111; }
.shop a.etsy { background: #f1641e; border-color: #f1641e; color: #fff; }
.shop a.target { background: #cc0000; border-color: #cc0000; color: #fff; }
.shop a.walmart { background: #0071dc; border-color: #0071dc; color: #fff; }
.etsy-listings { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.etsy-listings a { display: grid; gap: 4px; text-decoration: none; color: var(--text); font-size: 12px; }
.etsy-listings img { aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: var(--surface-2); }
.etsy-listings .price { color: var(--muted); }

.disclosure { color: var(--muted); font-size: 13px; margin-top: 20px; }

.footer { max-width: 1080px; margin: 0 auto; padding: 28px 16px 40px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.footer p { margin: 6px 0; }
.footer .member { margin-top: 18px; text-align: center; font-size: 12px; letter-spacing: 0.3px; }
.footer .member img { display: inline-block; vertical-align: -2px; margin: 0 2px 0 4px; }
@media (prefers-color-scheme: dark) { .footer .member img { filter: invert(1) hue-rotate(180deg); } }
.footer .member .hz-word { font-family: Fraunces, Georgia, serif; font-size: 14px; color: var(--text); letter-spacing: 0; }

.prose { max-width: 760px; margin: 0 auto; padding: 8px 0 40px; }
.prose h1 { font-size: clamp(30px, 5vw, 42px); color: var(--green); margin-bottom: 12px; }
.prose h2 { font-size: 24px; margin: 32px 0 8px; }
.prose code, .prose pre { background: var(--surface-2); border-radius: 8px; font-size: 14px; }
.prose code { padding: 2px 6px; }
.prose pre { padding: 14px; overflow-x: auto; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--green); color: var(--bg);
  padding: 10px 18px; border-radius: 999px; font-weight: 500; box-shadow: var(--shadow); z-index: 10;
}

.mini-tally { display: none; }

@media (max-width: 760px) {
  .mini-tally {
    display: block; position: sticky; bottom: 12px; margin: 16px auto 0; width: fit-content; z-index: 5;
    background: var(--green); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-weight: 600; box-shadow: var(--shadow);
  }
  .mini-tally.over { background: var(--red); color: #fff; }
  .results-head { grid-template-columns: 1fr; }
  .idea-body { grid-template-columns: 1fr; }
  .visual-col { position: static; }
  .how { grid-template-columns: 1fr; }
  .idea { padding: 18px; }
  .topbar nav a { font-size: 13px; text-align: right; }
}

/* ---- Holidays, modes and growth features ---- */
.topbar nav { display: flex; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
.countdown { font: 600 12px Inter, system-ui, sans-serif; color: var(--red); background: var(--surface-2); border-radius: 999px; padding: 2px 8px; }
.holiday-picker { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.holiday-picker legend { font-weight: 500; margin-bottom: 8px; padding: 0; }
.holiday-chip span { display: inline-flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.holiday-chip small { font-size: 11px; opacity: .75; }
.mode-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mode-toggle label { position: relative; }
.mode-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.mode-toggle span { display: block; text-align: center; padding: 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-weight: 500; }
.mode-toggle input:checked + span { background: var(--green); color: var(--bg); border-color: var(--green); }
.mode-toggle input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
#inventory { display: grid; gap: 10px; }
#inventory .hint { margin: 8px 0 0; }
.bins { display: flex; align-items: center; gap: 10px; border: 1px dashed var(--border); border-radius: 12px; padding: 10px 12px; cursor: pointer; color: var(--muted); }
.bins input { max-width: 100%; }
#already-own { width: 100%; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; font: inherit; background: var(--surface); color: var(--text); }
.house-banner { background: var(--surface-2); border-radius: 12px; padding: 10px 14px; font-weight: 500; }
.tags.owned li { background: transparent; border: 1px solid var(--border); }
.tags.owned li.label { border: 0; color: var(--text); font-weight: 600; padding-left: 0; }
.tag-owned { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--green-2); font-weight: 600; margin-left: 6px; }
.btn.pin { background: #e60023; border-color: #e60023; color: #fff; text-decoration: none; }
.publish { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); cursor: pointer; }
.watch-form { margin-top: 14px; padding: 14px; display: grid; gap: 8px; max-width: 520px; }
.watch-form .row { display: flex; gap: 8px; }
.watch-form input { flex: 1; min-width: 0; border: 1px solid var(--border); border-radius: 999px; padding: 8px 14px; font: inherit; background: var(--surface); color: var(--text); }
.house-rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin: 20px 0; }
.room { display: grid; gap: 6px; padding: 10px; text-decoration: none; color: var(--text); }
.room img { border-radius: 12px; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.room strong { text-transform: capitalize; }
.room span { color: var(--muted); font-size: 14px; }
.room select { font: inherit; padding: 6px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.house-list { padding: 20px; }
.house-group h4 { margin-top: 18px; text-transform: none; letter-spacing: 0; font-size: 15px; color: var(--text); }
.products.compact .product { grid-template-columns: 1fr; }
.pass-dialog { border: 0; border-radius: var(--radius); padding: 24px; max-width: 380px; width: calc(100% - 32px); background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.pass-dialog::backdrop { background: rgb(0 0 0 / 45%); }
.pass-dialog ul { padding-left: 20px; }
.effects { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.effects span { position: absolute; top: -40px; opacity: .35; color: var(--muted); animation: fall linear infinite; will-change: transform; }
.effects[data-effect="bats"] span { top: 20%; left: -60px !important; opacity: .5; animation-name: flit; }
.effects[data-effect="fireworks"] span, .effects[data-effect="confetti"] span { color: var(--gold); }
.effects[data-effect="hearts"] span { color: var(--red); }
main, .footer, .topbar { position: relative; z-index: 1; }
@keyframes fall { to { transform: translate3d(30px, 110vh, 0) rotate(360deg); } }
@keyframes flit { 0% { transform: translate3d(0, 0, 0); } 25% { transform: translate3d(30vw, -6vh, 0); } 50% { transform: translate3d(60vw, 4vh, 0); } 100% { transform: translate3d(120vw, -10vh, 0); } }
@media (prefers-reduced-motion: reduce) { .effects { display: none; } }

/* Server-rendered gallery and SEO pages */
.static-page { max-width: 1080px; margin: 0 auto; padding: 0 16px 48px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0 0 24px; }
.chip-link { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; font-size: 14px; }
.chip-link.on { background: var(--green); color: var(--bg); border-color: var(--green); }
.gallery { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.gallery a { display: grid; gap: 6px; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow); }
.gallery img, .gallery .swatch { border-radius: 12px; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.gallery .swatch { display: flex; overflow: hidden; }
.gallery .swatch span { flex: 1; }
.gallery span { color: var(--muted); font-size: 13px; text-transform: capitalize; }
.empty { text-align: center; color: var(--muted); }
.topic-list { columns: 2 220px; padding-left: 18px; }
.topic-list li { margin: 4px 0; }
.prose { padding: 20px 24px; margin: 8px 0 28px; }
.section-title { margin: 24px 0 14px; }

/* Phone layout: nothing in the form may be wider than the screen. */
.upload { grid-template-columns: minmax(0, 1fr); }
.upload > *, .upload fieldset { min-width: 0; }
fieldset { min-inline-size: 0; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bins { position: relative; }
.bins #inventory-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mode-toggle { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mode-toggle span { overflow-wrap: anywhere; }
.holiday-picker .chip span { padding: 6px 12px; }
#description, #already-own, .notes input { max-width: 100%; }
html, body { overflow-x: hidden; }
@media (max-width: 480px) {
  .upload { padding: 14px; }
  .topbar { padding: 12px 16px; flex-wrap: wrap; }
  .topbar nav { gap: 10px; font-size: 13px; }
  .topbar nav a:last-child { display: none; }
  .hero { padding: 16px 0; }
  .actions .btn { flex: 1 1 auto; }
  .watch-form .row { flex-direction: column; }
}
.pass-tiers { display: grid; gap: 10px; margin: 12px 0; }
.pass-tier { text-align: left; padding: 14px; cursor: pointer; font: inherit; color: var(--text); display: grid; gap: 4px; }
.pass-tier:hover { border-color: var(--red); }
.pass-tier .price { color: var(--red); font-weight: 700; }
.pass-tier small { color: var(--muted); }
.photo-field { position: relative; }
.pick-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pick-row .btn { justify-content: center; text-align: center; cursor: pointer; position: relative; overflow: hidden; }
.remove-photo { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgb(0 0 0 / 60%); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
.remove-photo.small { position: static; width: 30px; height: 30px; font-size: 18px; margin-left: auto; }
.bins-thumb { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bins-thumb img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; flex: none; }
.bins-thumb span { color: var(--muted); font-size: 14px; min-width: 0; }
.pick-row .btn { white-space: nowrap; padding: 10px 12px; font-size: 14px; }
.pass-dialog form { position: relative; display: grid; gap: 10px; }
.dialog-x { position: absolute; top: -8px; right: -8px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 24px; cursor: pointer; }
.dialog-x:hover { color: var(--text); background: var(--surface-2); }
#watch-dialog h3 { margin: 0; padding-right: 32px; }
#watch-dialog input { border: 1px solid var(--border); border-radius: 999px; padding: 10px 14px; font: inherit; background: var(--surface); color: var(--text); }
#watch-dialog .fineprint { margin: 0; }
#watch-dialog .watch-form { margin: 0; padding: 0; max-width: none; }
.results-head.compact { padding: 4px 0 12px; }
.results-head.compact h2 { font-size: clamp(22px, 5vw, 32px); }
.results-head.compact h2::first-letter { text-transform: uppercase; }
.results-more { margin-top: 20px; }
.room-notes { margin-top: 16px; color: var(--muted); }
.room-notes summary { cursor: pointer; font-weight: 500; color: var(--text); }
.room-notes p { margin: 10px 0 0; line-height: 1.5; }
.idea-about { margin-top: 20px; }
.idea-about .palette { margin-bottom: 12px; }
/* Palette as separate color squares. */
.palette { display: flex; gap: 8px; height: auto; border: 0; border-radius: 0; overflow: visible; flex-wrap: wrap; }
.palette span { flex: none; width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--border); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 8%); }
.crumbs { white-space: normal; }
.crumb-sep { display: inline-block; margin: 0 0.2em; font-weight: 600; line-height: 1; transform: translateY(-0.06em); color: var(--muted); }
.countdown { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px 4px 8px; line-height: 1; font-size: 12px; border-radius: 999px; margin-left: 2px; }
.countdown .cd-emoji { font-size: 14px; line-height: 1; }
.have-card { border: 1px solid var(--border); border-radius: 14px; padding: 14px; display: grid; gap: 10px; background: var(--surface-2); }
.have-head { display: flex; gap: 12px; align-items: flex-start; }
.have-icon { font-size: 24px; line-height: 1; }
.have-head strong { font-size: 16px; }
.have-head .hint { margin: 4px 0 0; }
.notes .hint { display: block; margin-top: 6px; }
.idea-head { margin-bottom: 14px; }
.idea-meta { margin-bottom: 4px; }
.tools { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; margin: 0 0 14px; }
.tools strong { display: block; margin-bottom: 6px; }
.tools-list { margin: 0; padding-left: 18px; columns: 2 180px; }
.tools-list li { margin: 2px 0; }
.photo-tips { list-style: none; margin: -6px 0 0; padding: 10px 12px; display: grid; gap: 4px; font-size: 13px; color: var(--muted); background: var(--surface-2); border-radius: 12px; }
.photo-tips strong { color: var(--text); }
.game-slot { width: 100%; max-width: 520px; margin: 0 auto 8px; }
.render-game { margin-top: 8px; }
.jump-game { display: block; width: 100%; touch-action: manipulation; cursor: pointer; border-radius: 12px; background: var(--surface-2); outline: none; }
.jump-game:focus-visible { outline: 3px solid var(--focus); }
.spinner.emoji { width: auto; height: auto; border: 0; border-radius: 0; font-size: 18px; font-style: normal; line-height: 1; animation: hop .9s ease-in-out infinite; }
@keyframes hop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@media (prefers-reduced-motion: reduce) { .spinner.emoji { animation: none; } }
.ba-tag { transition: none; }
.see-all { text-align: center; margin: 14px 0 0; }
.see-all a { font-weight: 600; }
.share-form { gap: 10px; }
/* Loading game: full screen on phones */
.game-overlay { position: fixed; inset: 0; z-index: 50; background: var(--bg); display: flex; flex-direction: column; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.game-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(12px + env(safe-area-inset-top)) 16px 8px; }
.game-msg { font-family: Fraunces, Georgia, serif; font-size: 18px; color: var(--text); }
.game-stage { flex: 1; position: relative; }
.game-stage .jump-game { height: 100%; border-radius: 0; background: transparent; }
.game-exit { position: absolute; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 2; box-shadow: var(--shadow); white-space: nowrap; }
.game-sound { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; width: 36px; height: 36px; font-size: 16px; cursor: pointer; }
.game-slot, .render-game { position: relative; }
.game-slot > .game-sound, .render-game > .game-sound { position: absolute; top: 6px; left: 6px; width: 28px; height: 28px; font-size: 13px; }
.game-fs { margin-top: 6px; }
body.game-open { overflow: hidden; }
.game-status { position: absolute; top: calc(64px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); width: min(340px, calc(100% - 32px)); z-index: 2; pointer-events: none; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px 12px; box-shadow: var(--shadow); }
.game-status-row { display: flex; align-items: center; justify-content: center; gap: 10px; }
.game-status .game-msg { font-family: Fraunces, Georgia, serif; font-size: 18px; font-weight: 700; color: var(--text); }
.game-spin { font-size: 22px; display: inline-block; animation: hop .9s ease-in-out infinite; }
.game-progress { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin: 10px 0 8px; }
.game-progress span { display: block; height: 100%; width: 40%; border-radius: 999px; background: var(--red); animation: game-indet 1.4s ease-in-out infinite; }
@keyframes game-indet { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
.game-status.done .game-progress span { animation: none; width: 100%; transform: none; }
.game-status.done .game-spin { animation: none; }
.game-sub { color: var(--muted); font-size: 12px; }
.game-bar { justify-content: flex-end; }
.game-exit { left: 16px; right: 16px; transform: none; width: auto; min-height: 56px; font-size: 18px; }
@media (prefers-reduced-motion: reduce) { .game-progress span, .game-spin { animation: none; } }
.definition { margin: 0 auto 14px; font-size: 13px; color: var(--muted); max-width: 420px; line-height: 1.5; }
.definition b { font-family: Fraunces, Georgia, serif; color: var(--text); font-size: 15px; }
.definition .ipa { font-family: "Charis SIL", "Times New Roman", serif; }
.definition i { color: var(--muted); margin-right: 2px; }
.more-holidays { font: inherit; font-size: 14px; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); max-width: 100%; }
/* Idea switcher */
.ideas-hint { margin: 0 0 8px; color: var(--muted); font-size: 14px; }
.tabs { scroll-snap-type: x mandatory; scroll-padding: 0 16px; }
.tab { scroll-snap-align: start; position: relative; }
.tab small { display: flex; align-items: center; gap: 6px; }
.diff { text-transform: capitalize; font-weight: 700; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text); }
.diff-easy { background: rgb(46 139 87 / 22%); }
.diff-medium { background: rgb(201 162 39 / 26%); }
.diff-ambitious { background: rgb(179 38 46 / 24%); }
.tab[aria-selected="true"]::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: -1px; height: 3px; border-radius: 3px; background: var(--red); }
@media (max-width: 640px) {
  .tabs { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
  .tab { min-width: 72%; }
}
.idea-nav { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--border); }
.idea-nav .btn { flex: 1 1 220px; white-space: normal; line-height: 1.3; }
.render-game { min-height: 0; }
.game-close { position: absolute; top: 6px; right: 6px; z-index: 2; }
.game-overlay .game-bar { min-height: 52px; }
.photo-check { font-size: 14px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); line-height: 1.45; }
.photo-check.checking { color: var(--muted); }
.photo-check.good { color: var(--text); }
.photo-check.maybe { background: rgb(201 162 39 / 18%); }
.photo-check.bad { background: rgb(179 38 46 / 20%); font-weight: 500; }
/* Definition tucked under the logo, left-aligned */
.brand-block { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.brand-block .definition { margin: 0 0 0 38px; max-width: none; font-size: 11.5px; line-height: 1.2; color: var(--muted); white-space: nowrap; text-align: left; }
.brand-block .definition b { font-size: 12px; font-family: Fraunces, Georgia, serif; color: var(--text); }
.brand-block .definition { margin-left: 0; }
/* Stable H1, seasonal tagline below it */
.hero-sub { margin: 10px 0 0; font-family: Fraunces, Georgia, serif; font-weight: 700; font-size: clamp(22px, 4.5vw, 32px); line-height: 1.15; color: var(--red); }
@media (max-width: 480px) {
  .mode-toggle { grid-template-columns: 1fr; }
}
/* SEO guide pages */
.crumbs-nav { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.crumbs-nav a { color: var(--muted); }
.seo-hero { text-align: left; max-width: 760px; margin: 0; padding: 18px 0 8px; }
.seo-hero h1 { font-size: clamp(30px, 6vw, 46px); }
.answer { font-size: 18px; line-height: 1.55; margin: 14px 0; padding: 14px 16px; border-left: 4px solid var(--red); background: var(--surface-2); border-radius: 0 12px 12px 0; }
.seo h2 { margin: 34px 0 12px; font-size: clamp(22px, 4vw, 28px); }
.seo .lede { text-align: left; margin: 10px 0 0; max-width: 760px; }
.seo-ideas { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.seo-idea { padding: 16px; }
.seo-idea h3 { font-size: 18px; margin: 0 0 6px; }
.seo-idea p { margin: 0; color: var(--muted); line-height: 1.5; }
.seo-steps { padding-left: 22px; display: grid; gap: 10px; line-height: 1.55; max-width: 760px; }
.seo-products { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.seo-products li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 14px 16px; align-items: center; }
.seo-products p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.seo-faq section { border-top: 1px solid var(--border); padding: 12px 0; max-width: 760px; }
.seo-faq h3 { font-size: 17px; margin: 0 0 6px; font-family: Inter, system-ui, sans-serif; }
.seo-faq p { margin: 0; line-height: 1.55; color: var(--muted); }
.seo-cta { padding: 22px; margin: 34px 0 0; text-align: center; }
.popular-ideas { max-width: 760px; margin: 32px auto 0; text-align: center; }
.popular-ideas h2 { font-size: 20px; margin: 0 0 10px; }
.popular-ideas ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.popular-ideas a { display: inline-block; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; text-decoration: none; color: var(--text); font-size: 14px; background: var(--surface); }
/* Holiday picker: one scrollable row of single-line chips */
.holiday-picker { display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
.holiday-picker::-webkit-scrollbar { display: none; }
.holiday-chip { flex: none; scroll-snap-align: start; }
.holiday-chip span { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; white-space: nowrap; padding: 8px 12px; line-height: 1; }
.cd-badge { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; opacity: 1; color: var(--muted); padding: 2px 6px; border-radius: 999px; background: var(--surface-2); }
.chip input:checked + span .cd-badge { background: rgb(255 255 255 / 22%); color: inherit; }
.more-holidays { flex: none; padding: 8px 12px; line-height: 1; }
/* Photo first: options reveal once the photo passes */
.options { display: grid; gap: 18px; }
.options[hidden] { display: none !important; }
.options-intro { margin: 4px 0 0; font-family: Fraunces, Georgia, serif; font-size: 18px; font-weight: 700; color: var(--text); }
.options.reveal { animation: options-in .35s ease-out; }
@keyframes options-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .options.reveal { animation: none; } }
.photo-check .btn { margin-left: 4px; }
/* The scroller is the inner row, so the legend isn't clipped */
.holiday-picker { display: block; overflow: visible; -webkit-mask-image: none; mask-image: none; padding: 0; }
/* Next 90 days as a block of tiles, in date order, everything visible at once (no sideways scroll). */
.holiday-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; padding: 2px 0 4px; }
.holiday-row .holiday-chip { display: flex; min-width: 0; }
.holiday-row .holiday-chip > span { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 9px 3px; border-radius: 14px; white-space: normal; text-align: center; line-height: 1.15; min-height: 64px; }
.holiday-row .hc-top { display: flex; align-items: center; justify-content: center; gap: 6px; font-style: normal; }
.holiday-row .hc-emoji { font-size: 20px; line-height: 1; font-weight: 400; }
.holiday-row .hc-name { font-size: 12.5px; font-weight: 600; font-style: normal; }
.holiday-row .cd-badge { font-size: 11px; }
.holiday-row .holiday-more, .sheet-option { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 9px 3px; min-height: 64px; border-radius: 14px; border: 1px dashed var(--border); background: var(--surface); color: var(--text); font: inherit; text-align: center; line-height: 1.15; cursor: pointer; }
.holiday-row .holiday-more.on, .sheet-option.on { border-style: solid; background: var(--green); color: var(--bg); border-color: var(--green); }
.holiday-row .holiday-more.on .cd-badge { background: rgb(255 255 255 / 22%); color: inherit; }
.holiday-more:focus-visible, .sheet-option:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Themed chooser (replaces system selects): bottom sheet on phones, centered card on desktop. */
.sheet { border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 100%; max-height: 80vh; border-radius: 22px 22px 0 0; background: linear-gradient(var(--surface), var(--surface)), var(--bg); color: var(--text); box-shadow: var(--shadow); display: flex; flex-direction: column; animation: sheet-up .22s ease-out; }
.sheet:not([open]) { display: none; }
.sheet::backdrop { background: rgb(0 0 0 / 45%); }
.sheet-grip { width: 40px; height: 4px; border-radius: 4px; background: var(--border); margin: 10px auto 0; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 18px 6px; font-family: Fraunces, Georgia, serif; font-size: 20px; }
.sheet-close { border: 0; background: none; color: var(--muted); font-size: 26px; line-height: 1; cursor: pointer; padding: 4px 8px; }
.sheet-body { overflow-y: auto; padding: 0 18px calc(18px + env(safe-area-inset-bottom)); }
.sheet-group { margin: 12px 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--red); }
.sheet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.sheet-option { border-style: solid; min-height: 78px; }
.sheet-option .hc-emoji { font-size: 22px; line-height: 1; font-weight: 400; }
.sheet-option .hc-name { font-size: 12.5px; font-weight: 600; font-style: normal; }
.sheet-sub { font-size: 11px; color: var(--muted); }
.sheet-option.on .sheet-sub { color: inherit; opacity: .8; }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 640px) {
  .sheet { margin: auto; max-width: 520px; border-radius: 20px; animation-name: sheet-pop; }
  .sheet-grip { display: none; }
}
@keyframes sheet-pop { from { transform: scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.room-pick { margin-top: 6px; }
.holiday-row::-webkit-scrollbar { display: none; }

#upload-form > .holiday-picker { margin-bottom: 4px; }

/* Photo picker: drag-and-drop with one button on computers; two big buttons on touch devices. */
.dz-choose { margin-top: 6px; pointer-events: none; }
@media (hover: hover) and (pointer: fine) {
  .pick-row { display: none; }
}
.pick-emoji { font-size: 26px; line-height: 1; }
@media (hover: none), (pointer: coarse) {
  .photo-field:has(.dz-empty:not([hidden])) { display: none; }
  .pick-row { gap: 10px; }
  .pick-row .btn { flex-direction: column; gap: 6px; padding: 18px 12px; font-size: 16px; font-weight: 600; white-space: normal; border-radius: 18px; }
}

.save-pic:not([hidden]) { margin: 10px auto 0; display: flex; }

/* Headings line up with the logo on the left instead of sitting centered. */
.hero { text-align: left; margin: 0; max-width: 720px; }
.hero .lede { margin-left: 0; margin-right: 0; }
.fineprint, .seo-cta, .popular-ideas, .see-all, .empty { text-align: left; }
.popular-ideas { margin-left: 0; }
.popular-ideas ul, .chip-row { justify-content: flex-start; }
.photo-tips[hidden] { display: none; }

/* Inside/outside is automatic; this line says which and offers a one-tap fix. */
.mode-note { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--gold); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Loading checklist on the game screen. */
.game-status.has-steps { text-align: left; padding: 14px 18px 12px; }
.game-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.game-steps li { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--muted); }
.game-steps li i { width: 18px; height: 18px; flex: none; border-radius: 50%; border: 2px solid var(--border); display: grid; place-items: center; font-style: normal; font-size: 11px; }
.game-steps li.now { color: var(--text); font-weight: 600; }
.game-steps li.now i { border-color: var(--red); border-top-color: transparent; animation: game-step-spin .8s linear infinite; }
.game-steps li.done { color: var(--text); }
.game-steps li.done i { border-color: var(--green-2); background: var(--green-2); color: var(--bg); }
.game-steps li.done i::after { content: "✓"; font-weight: 700; }
.game-status.has-steps .game-msg { font-family: inherit; font-size: 13px; font-weight: 400; color: var(--muted); margin: 10px 0 2px; font-style: italic; }
.game-status.has-steps .game-sub { display: block; font-size: 11px; }
@keyframes game-step-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .game-steps li.now i { animation: none; border-top-color: var(--red); } }
