:root {
  color-scheme: light;
  --ink: #283019;
  --muted: #687057;
  --paper: #f6f1e8;
  --card: #fffdf9;
  --line: #ded8ca;
  --accent: #50623a;
  --accent-dark: #354326;
  --warm: #b46539;
  font-family: Inter, ui-rounded, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

button, a { font: inherit; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(18px, env(safe-area-inset-top)) 20px 16px;
  border-bottom: 1px solid rgba(40, 48, 25, 0.1);
}

.brand {
  color: var(--ink);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.5px;
  text-decoration: none;
}

.privacy-note { color: var(--muted); font-size: 13px; font-weight: 650; }

.page-shell { width: min(720px, 100%); margin: 0 auto; padding: 32px 16px 64px; }
.list-heading { padding: 0 4px 24px; }
.eyebrow { margin: 0 0 8px; color: var(--warm); font-size: 13px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(31px, 8vw, 48px); line-height: 1.05; letter-spacing: -1.4px; }
.description { margin: 12px 0 0; color: var(--muted); font-size: 17px; line-height: 1.5; }
.surprise-note { margin: 16px 0 0; color: var(--accent-dark); font-size: 14px; font-weight: 650; }
.status { min-height: 24px; margin: 0 4px 16px; color: var(--muted); font-size: 14px; }

.items { display: grid; gap: 14px; }
.item-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(40, 48, 25, 0.05);
}

.item-image { width: 112px; height: 112px; border-radius: 14px; background: #ebe5d9; object-fit: cover; }
.item-placeholder { display: grid; place-items: center; font-size: 36px; }
.item-content { min-width: 0; }
.item-content h2 { margin: 2px 0 4px; font-size: 19px; line-height: 1.22; }
.item-detail, .item-price { margin: 3px 0; color: var(--muted); font-size: 14px; }
.item-price { color: var(--ink); font-weight: 750; }
.item-state { display: inline-block; margin: 10px 0; padding: 5px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.state-available { color: #365624; background: #e1edda; }
.state-yours { color: #704421; background: #f7e1cf; }
.state-taken { color: #65645e; background: #eceae4; }
.item-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.item-affiliate-note { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.4; }

.button {
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 750;
  touch-action: manipulation;
}
.button:focus-visible { outline: 3px solid #e69b69; outline-offset: 2px; }
.button:disabled { cursor: wait; opacity: 0.55; }
.button-primary { background: var(--accent); color: white; }
.button-primary:active { background: var(--accent-dark); }
.button-secondary { border-color: var(--line); background: transparent; color: var(--ink); }
.button-buy { border-color: #d5b38f; background: #fff5e9; color: #69401f; }

.error-card, .empty-card {
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  text-align: center;
}
.error-card h2, .empty-card h2 { margin: 0 0 8px; }
.error-card p, .empty-card p { margin: 0 0 18px; color: var(--muted); line-height: 1.5; }

footer { padding: 24px 20px max(32px, env(safe-area-inset-bottom)); color: var(--muted); text-align: center; font-size: 13px; line-height: 1.5; }
footer p { max-width: 520px; margin: 0 auto; }
.amazon-associate-statement { margin-top: 10px; }
.legal-links { margin-top: 10px; }
.legal-links a { color: var(--accent-dark); font-weight: 700; }
.legal-page { width: min(720px, 100%); margin: 0 auto; padding: 40px 20px 64px; }
.legal-page h1 { margin-bottom: 24px; }
.legal-page h2 { margin: 28px 0 8px; font-size: 20px; }
.legal-page p { color: var(--muted); line-height: 1.6; }
.legal-page a { color: var(--accent-dark); font-weight: 700; }

@media (max-width: 480px) {
  .page-shell { padding-top: 26px; }
  .item-card { grid-template-columns: 88px minmax(0, 1fr); gap: 12px; padding: 12px; border-radius: 17px; }
  .item-image { width: 88px; height: 88px; border-radius: 12px; }
  .item-actions { margin-left: -100px; padding-top: 8px; }
  .button { flex: 1 1 130px; }
}

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

.gift-filters { display: flex; gap: 12px; margin: 24px 0; }
.gift-filters [aria-pressed="true"] { background: #382f2b; color: #fff; }
.gift-recipient { grid-column: 1 / -1; margin: 24px 0 0; font-size: 24px; }
.item-content h3 { margin: 0 0 8px; font-size: 20px; }
