:root {
  color-scheme: light;
  --paper: #f5f0e5;
  --paper-deep: #ebe4d4;
  --ink: #1c3329;
  --muted: #6f766b;
  --green: #244c3c;
  --green-dark: #19382c;
  --orange: #df704b;
  --gold: #c99a3f;
  --line: #ded8c9;
  --white: #fffdf8;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); }
button, input, textarea { font: inherit; }
a { color: inherit; }
.hidden { display: none !important; }

.site-header {
  min-height: 76px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 7.2%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(28, 51, 41, .12);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-size: 13px; letter-spacing: .01em; }
.brand b { display: block; font-size: 15px; letter-spacing: -.025em; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; background: var(--green); color: var(--paper); font-family: "Playfair Display", serif; font-size: 22px; border-radius: 50%; }
.header-link { font-size: 12px; text-decoration: none; font-weight: 700; }
.header-link span { margin-left: 6px; color: var(--orange); }

.hero {
  max-width: 1440px;
  min-height: 560px;
  padding: 58px 9% 62px;
  margin: auto;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  align-items: center;
  gap: 8%;
  position: relative;
  overflow: hidden;
}
.hero-copy { position: relative; z-index: 1; }
.eyebrow { color: var(--orange); font-size: 10px; font-weight: 700; letter-spacing: .15em; margin: 0 0 14px; text-transform: uppercase; }
.eyebrow-dot { display: inline-block; width: 6px; height: 6px; margin: 0 7px 1px 0; border-radius: 50%; background: var(--orange); }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: Georgia, serif; font-weight: 500; letter-spacing: -.035em; }
h1 { font-size: clamp(52px, 6.2vw, 88px); line-height: .98; margin: 0 0 22px; }
h1 em { color: var(--orange); font-weight: 500; }
.hero-description { max-width: 410px; color: #555f54; font-size: 15px; line-height: 1.8; margin-bottom: 26px; }
.hero-actions { display: flex; gap: 17px; align-items: center; flex-wrap: wrap; }
.button { min-height: 44px; padding: 0 17px; display: inline-flex; gap: 18px; align-items: center; justify-content: center; border: 0; border-radius: 3px; text-decoration: none; cursor: pointer; font-size: 11px; font-weight: 700; transition: background .2s, transform .2s; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button-dark { color: white; background: var(--green); }
.button-dark:hover:not(:disabled) { background: var(--green-dark); }
.button-outline { border: 1px solid var(--line); background: transparent; color: var(--ink); white-space: nowrap; }
.button-outline:hover:not(:disabled) { background: var(--paper-deep); }
.button:disabled { opacity: .48; cursor: not-allowed; }
.button-full { width: 100%; margin-top: 18px; }
.hero-note { color: var(--muted); font-size: 10px; }
.hero-facts { display: flex; gap: 31px; margin-top: 47px; }
.hero-facts div { display: flex; flex-direction: column; gap: 4px; }
.hero-facts strong { font-family: "Playfair Display", Georgia, serif; font-size: 24px; font-weight: 500; }
.hero-facts span { color: var(--muted); font-size: 9px; }
.hero-art { position: relative; max-width: 400px; margin: 0 auto; transform: rotate(2deg); }
.image-frame { height: 400px; width: min(100%, 350px); background: var(--paper-deep); padding: 13px; box-shadow: 0 22px 50px rgba(48, 47, 35, .18); }
.image-frame img { height: 100%; width: 100%; object-fit: cover; object-position: center 78%; filter: saturate(.8); }
.image-caption { display: block; text-align: center; margin-top: 16px; font-family: "Playfair Display", serif; font-size: 15px; font-style: italic; }
.image-caption span { color: var(--orange); font-style: normal; margin-left: 5px; }
.stamp { position: absolute; right: -53px; top: 31px; width: 88px; height: 88px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--paper); background: var(--orange); border-radius: 50%; transform: rotate(11deg); box-shadow: 0 8px 18px rgba(81, 46, 30, .2); }
.stamp span { font-size: 6px; font-weight: 700; letter-spacing: .11em; }
.stamp strong { font-size: 19px; }
.hero-decoration { position: absolute; right: -12px; bottom: -132px; color: rgba(36, 76, 60, .035); font-family: "Playfair Display", serif; font-size: 460px; line-height: 1; pointer-events: none; }

.exchange-section, .how-section { padding: 73px 9%; }
.exchange-section { background: #e9e5d8; }
.section-heading { max-width: 1100px; margin: 0 auto 30px; display: flex; justify-content: space-between; gap: 30px; align-items: end; }
.section-heading h2 { font-size: clamp(32px, 4vw, 47px); margin: 0; }
.section-heading > p { max-width: 310px; color: var(--muted); font-size: 12px; line-height: 1.7; margin: 0 0 4px; }
.app-grid { max-width: 1100px; margin: auto; display: grid; grid-template-columns: minmax(270px, .75fr) minmax(0, 1.7fr); gap: 18px; align-items: start; }
.card { background: var(--white); border: 1px solid rgba(28, 51, 41, .08); border-radius: 5px; box-shadow: 0 10px 24px rgba(39, 43, 31, .035); }
.account-card { padding: 23px; }
.card-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.icon-circle { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 50%; background: #f5e9d8; color: var(--orange); }
.card-heading .eyebrow { margin-bottom: 4px; font-size: 8px; }
.card h3 { font-family: "Playfair Display", Georgia, serif; font-size: 20px; font-weight: 500; margin: 0; }
.auth-tabs { display: flex; gap: 17px; border-bottom: 1px solid var(--line); margin-bottom: 17px; }
.auth-tab { padding: 0 0 10px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font-size: 11px; cursor: pointer; }
.auth-tab.active { color: var(--green); border-color: var(--orange); font-weight: 700; }
form label { display: block; margin: 13px 0 6px; color: #404b41; font-size: 10px; font-weight: 700; }
form input:not([type="checkbox"]), form textarea { width: 100%; padding: 10px 11px; border: 1px solid var(--line); border-radius: 3px; outline: none; background: #fffefa; color: var(--ink); font-size: 11px; }
form input:focus, form textarea:focus { border-color: var(--green); box-shadow: 0 0 0 2px rgba(36, 76, 60, .1); }
form textarea { resize: vertical; line-height: 1.5; }
.privacy-note, .field-help, .sticker-fields small { color: var(--muted); font-size: 9px; line-height: 1.6; }
.privacy-note { margin: 13px 0 0; }
.signed-in { padding: 9px 10px; margin: 0 0 8px; background: #edf2eb; font-size: 10px; }
.field-help { margin: 6px 0; }
.address-suggestions { position: relative; z-index: 3; max-height: 220px; overflow-y: auto; margin-top: 3px; border: 1px solid var(--line); border-radius: 3px; background: var(--white); box-shadow: 0 8px 18px rgba(39, 43, 31, .12); }
.address-suggestion { width: 100%; padding: 10px 11px; border: 0; border-bottom: 1px solid #eeece4; background: transparent; color: var(--ink); text-align: left; font-size: 10px; cursor: pointer; }
.address-suggestion:last-child { border-bottom: 0; }
.address-suggestion:hover, .address-suggestion.active { background: #edf2eb; }
.address-privacy { font-size: 8px; }
.coordinates { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 9px; border-radius: 3px; background: #f4f1e9; color: var(--muted); font-size: 9px; }

.sticker-picker { margin-top: 18px; }
.sticker-picker-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.picker-title { margin: 0 0 4px; color: var(--ink); font-size: 13px; font-weight: 700; }
.picker-hint { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.sticker-total { padding: 5px 8px; border-radius: 20px; background: #f4f1e9; color: var(--muted); font-size: 9px; white-space: nowrap; }
.sticker-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin: 13px 0 10px; }
.sticker-mode { min-height: 36px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 3px; background: transparent; color: var(--muted); font-size: 10px; font-weight: 700; cursor: pointer; }
.sticker-mode.active { border-color: var(--green); background: var(--green); color: white; }
.sticker-legend { display: flex; gap: 13px; margin-bottom: 8px; color: var(--muted); font-size: 8px; }
.sticker-legend span { display: inline-flex; align-items: center; gap: 4px; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; }
.duplicate-dot { background: var(--orange); }
.needs-dot { background: var(--green); }
.sticker-grid { max-height: 246px; overflow-y: auto; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; padding: 1px 3px 4px 1px; overscroll-behavior: contain; }
.sticker-number { min-width: 0; aspect-ratio: 1; padding: 0; border: 1px solid var(--line); border-radius: 3px; background: #fffefa; color: #536052; font-size: 9px; cursor: pointer; transition: background .12s, border-color .12s, color .12s; }
.sticker-number:hover { border-color: var(--green); }
.sticker-number:focus-visible, .sticker-mode:focus-visible, .count-control:focus-visible, .count-remove:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.sticker-number.is-duplicate { border-color: var(--orange); background: #fae9df; color: #9c452e; font-weight: 700; }
.sticker-number.is-needed { border-color: var(--green); background: #e8efe7; color: var(--green-dark); font-weight: 700; }
.duplicate-counts { margin-top: 13px; padding-top: 10px; border-top: 1px solid #eeece4; }
.count-heading { display: flex; justify-content: space-between; gap: 6px; margin: 0 0 7px; font-size: 9px; font-weight: 700; }
.count-heading span { color: var(--muted); font-size: 8px; font-weight: 400; }
.duplicate-count-list { display: flex; flex-wrap: wrap; gap: 5px; }
.duplicate-count { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px; border: 1px solid var(--line); border-radius: 3px; background: #fffefa; }
.count-number { min-width: 20px; color: var(--ink); text-align: center; font-size: 9px; font-weight: 700; }
.count-control { width: 22px; height: 22px; padding: 0; border: 0; border-radius: 2px; background: #f4f1e9; color: var(--green); font-size: 15px; line-height: 1; cursor: pointer; }
.count-value { min-width: 22px; text-align: center; font-size: 9px; }
.count-remove { padding: 4px; border: 0; background: transparent; color: #a8462d; font-size: 8px; cursor: pointer; }
.count-empty { margin: 0; color: var(--muted); font-size: 9px; }
.text-button { padding: 0; border: 0; background: none; color: var(--green); font-size: 9px; text-decoration: underline; cursor: pointer; }
.logout-button { display: block; margin: 13px auto 0; }
.status-message { margin: 13px 0 0; padding: 10px; border-radius: 3px; background: #edf2eb; color: var(--green); font-size: 10px; line-height: 1.5; }
.status-message.error { background: #fbebe6; color: #a8462d; }

.map-card { padding: 22px; }
.map-topline { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.map-topline .eyebrow { margin-bottom: 4px; font-size: 8px; }
.map-count { padding: 6px 9px; border-radius: 20px; background: #edf2eb; color: var(--green); font-size: 9px; white-space: nowrap; }
.map-toolbar { display: flex; gap: 10px; justify-content: space-between; margin: 17px 0 8px; }
.demo-filter { display: flex; align-items: center; gap: 6px; margin: 0 0 9px; color: var(--muted); font-size: 9px; cursor: pointer; }
.demo-filter input { accent-color: var(--green); }
.search-wrap { min-height: 39px; flex: 1; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); }
.search-wrap span { font-size: 20px; line-height: 1; }
.search-wrap input { width: 100%; border: 0; outline: none; background: transparent; font-size: 10px; }
.search-wrap input:focus { box-shadow: none; }
.map-hint { min-height: 28px; margin: 0 0 9px; color: var(--muted); font-size: 9px; line-height: 1.5; }
#map { width: 100%; height: 300px; border-radius: 3px; background: #e5e8db; z-index: 1; }
.neighbor-list { max-height: 280px; overflow-y: auto; }
.neighbor-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 11px 1px; border-bottom: 1px solid #eeece4; }
.neighbor-select { min-width: 0; flex: 1; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.neighbor-select input { accent-color: var(--green); }
.neighbor-initial { flex: 0 0 29px; width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; background: #f5e9d8; color: var(--green); font-family: "Playfair Display", serif; font-size: 13px; }
.neighbor-info { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.neighbor-info strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.neighbor-info small { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.demo-badge { display: inline-block; margin-left: 4px; padding: 2px 4px; border-radius: 2px; background: #fae9df; color: #a8462d; font-family: system-ui, sans-serif; font-size: 7px; font-weight: 700; letter-spacing: .04em; vertical-align: 1px; }
.number-tags { flex: 0 0 100%; display: flex; flex-wrap: wrap; gap: 3px; color: var(--muted); font-size: 10px; }
.number-tags .needed-tag, .number-tags .duplicate-tag { position: relative; box-sizing: border-box; width: 34px; height: 34px; display: inline-grid; place-items: center; padding: 2px; border: 1px solid var(--green); border-radius: 3px; background: #e8efe7; color: var(--green-dark); text-align: center; font-size: 10px; font-weight: 700; }
.number-tags .duplicate-tag { padding-top: 8px; border-color: var(--orange); background: #fae9df; color: #9c452e; }
.duplicate-tag sup { position: absolute; top: 2px; right: 2px; font-size: 7px; line-height: 1; }
.number-tags .duplicate-tag.is-needed, .number-tags .needed-tag.is-match { border-color: var(--gold); background: var(--gold); color: var(--ink); }
.match-label { color: #ad533a; font-size: 8px; white-space: nowrap; }
.empty-state { padding: 18px 4px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.map-attribution { margin: 9px 0 0; color: var(--muted); text-align: right; font-size: 8px; }
.map-attribution a { color: var(--green); }
.map-popup { display: flex; flex-direction: column; gap: 5px; min-width: 145px; }
.map-popup strong { font-family: "Playfair Display", serif; font-size: 15px; }
.map-popup span, .map-popup small { font-size: 10px; }
.map-popup .number-tags { flex: none; max-width: 240px; }
.map-popup small { color: var(--muted); }
.map-popup .match-note { color: #ad533a; }
.popup-select { align-self: flex-start; margin-top: 3px; padding: 6px 8px; border: 0; border-radius: 2px; background: var(--green); color: white; font-size: 9px; cursor: pointer; }

.how-section { max-width: 1440px; margin: auto; }
.steps { max-width: 1100px; margin: 45px auto 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.steps article { padding: 18px 0; border-top: 1px solid var(--line); }
.steps article > span { color: var(--orange); font-family: "Playfair Display", serif; font-size: 23px; }
.steps h3 { margin: 13px 0 8px; font-family: "Playfair Display", serif; font-size: 20px; font-weight: 500; }
.steps p { max-width: 250px; margin-bottom: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
footer { display: flex; justify-content: space-between; gap: 20px; padding: 22px 9%; background: var(--green); color: #e8e4d8; font-size: 9px; }
footer span span { color: #eaa078; }

@media (max-width: 900px) {
  .hero { padding: 54px 7%; gap: 4%; }
  .image-frame { height: 355px; width: 290px; }
  .exchange-section, .how-section { padding: 60px 6%; }
  .app-grid { grid-template-columns: minmax(250px, .85fr) minmax(0, 1.4fr); gap: 12px; }
  .account-card, .map-card { padding: 17px; }
  .sticker-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); max-height: 280px; gap: 5px; }
}

@media (max-width: 680px) {
  .site-header { min-height: 65px; padding: 0 5%; }
  .brand { font-size: 11px; }
  .brand b { font-size: 13px; }
  .hero { min-height: auto; padding: 48px 7% 41px; grid-template-columns: 1fr; gap: 34px; }
  h1 { font-size: clamp(58px, 15vw, 82px); }
  .hero-description { max-width: 460px; font-size: 13px; }
  .hero-facts { gap: 18px; margin-top: 35px; }
  .hero-facts strong { font-size: 21px; }
  .hero-facts span { max-width: 100px; font-size: 8px; line-height: 1.4; }
  .hero-art { width: min(78%, 330px); }
  .image-frame { width: 100%; height: 330px; }
  .stamp { right: -34px; width: 73px; height: 73px; }
  .stamp span { font-size: 5px; }
  .exchange-section, .how-section { padding: 49px 5%; }
  .section-heading { align-items: start; flex-direction: column; gap: 12px; margin-bottom: 23px; }
  .section-heading > p { max-width: 420px; }
  .app-grid { grid-template-columns: 1fr; }
  .map-card { grid-row: 1; }
  #map { height: 280px; }
  .map-toolbar { align-items: stretch; flex-direction: column; }
  .map-toolbar .button { min-height: 38px; }
  .steps { grid-template-columns: 1fr; gap: 10px; margin-top: 28px; }
  .steps article { display: grid; grid-template-columns: 42px 1fr; column-gap: 8px; padding: 14px 0; }
  .steps article > span { grid-row: span 2; }
  .steps h3 { margin: 0 0 6px; }
  .steps p { max-width: unset; }
  footer { padding: 19px 5%; font-size: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
