/* RestockAlert — shared styles (homepage, gift pages, confirm/manage). */
:root {
  --bg: #fbf7f1;
  --paper: #ffffff;
  --ink: #1d1a17;
  --muted: #6b625a;
  --line: #ece4d9;
  --red: #b3122b;
  --red-ink: #8e0d21;
  --red-soft: #fbe9ec;
  --green: #17633a;
  --green-soft: #e6f4ec;
  --gold: #d99a1e;
  --gold-soft: #fdf3dc;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(29, 26, 23, .06), 0 6px 20px rgba(29, 26, 23, .06);
  --azure-deep: var(--red);
  --ink-2: var(--ink);
  --azure: var(--red);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font); }
a { color: var(--red); }
img { max-width: 100%; display: block; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* Header */
.top { position: sticky; top: 0; z-index: 20; background: rgba(251, 247, 241, .92); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.logo { font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -.02em; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.logo b { color: var(--red); font-weight: 800; }
.logo .bell { width: 28px; height: 28px; border-radius: 9px; background: var(--red); display: grid; place-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 12px 20px; font: 700 15px/1 var(--font); cursor: pointer; text-decoration: none; transition: transform .08s ease, background .15s ease; }
.btn:active { transform: translateY(1px); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-ink); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { padding: 9px 14px; font-size: 14px; }

/* Hero */
.hero { padding: 48px 0 28px; }
.hero h1 { font-family: var(--display); font-size: clamp(32px, 6vw, 56px); line-height: 1.04; letter-spacing: -.025em; margin: 0 0 14px; max-width: 16ch; }
.hero h1 em { font-style: normal; color: var(--red); }
.hero p.lead { font-size: clamp(17px, 2.2vw, 20px); color: var(--muted); max-width: 52ch; margin: 0 0 22px; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.dot.off { background: #b9b0a6; box-shadow: none; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 28px 0 8px; }
.step { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.step b { display: block; font-family: var(--display); font-size: 18px; margin-bottom: 4px; }
.step span { color: var(--muted); font-size: 15px; }
.step i { font-style: normal; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--gold-soft); color: #7a5208; font-weight: 800; margin-bottom: 10px; }

/* Section headings */
.sec { padding: 36px 0 8px; }
.sec h2 { font-family: var(--display); font-size: clamp(24px, 3.6vw, 34px); letter-spacing: -.02em; margin: 0 0 6px; }
.sec .sub { color: var(--muted); margin: 0 0 18px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.chip { border: 1.5px solid var(--line); background: var(--paper); border-radius: 999px; padding: 7px 13px; font: 600 14px/1 var(--font); color: var(--ink); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Gift grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; }
.card .ph { aspect-ratio: 4 / 3; background: linear-gradient(135deg, var(--gold-soft), var(--red-soft)); display: grid; place-items: center; position: relative; }
.card .ph img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.card .ph .glyph { font-family: var(--display); font-weight: 800; font-size: 44px; color: rgba(179, 18, 43, .35); }
.badge { position: absolute; top: 10px; left: 10px; border-radius: 999px; padding: 5px 10px; font: 800 12px/1 var(--font); letter-spacing: .02em; }
.badge.in { background: var(--green); color: #fff; }
.badge.out { background: var(--ink); color: #fff; }
.badge.unk { background: #fff; color: var(--muted); border: 1px solid var(--line); }
.card .body { padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card .brand { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.card h3 { margin: 0; font-size: 16px; line-height: 1.3; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.card .meta { font-size: 13px; color: var(--muted); }
.card .where { font-size: 13px; color: var(--green); font-weight: 700; }
.card .actions { margin-top: auto; padding-top: 8px; display: flex; gap: 8px; }
.card .actions .btn { flex: 1; }
.watch[aria-pressed="true"] { background: var(--green); color: #fff; }

/* Sticky tray for selected gifts */
.tray { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--ink); color: #fff; transform: translateY(110%); transition: transform .2s ease; }
.tray.show { transform: none; }
.tray .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
.tray .count { font-weight: 700; }

/* Signup sheet */
.sheet-bg { position: fixed; inset: 0; background: rgba(29, 26, 23, .45); z-index: 40; display: none; }
.sheet { position: fixed; z-index: 41; left: 50%; bottom: 0; transform: translate(-50%, 110%); width: min(560px, 100%); background: var(--paper); border-radius: 20px 20px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); transition: transform .22s ease; max-height: 92vh; overflow: auto; }
.sheet.open { transform: translate(-50%, 0); }
.sheet-bg.open { display: block; }
.sheet h3 { font-family: var(--display); font-size: 24px; margin: 0 0 6px; }
.sheet .picked { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 6px; }
.sheet .picked li { background: var(--bg); border-radius: 10px; padding: 8px 12px; font-size: 14px; display: flex; justify-content: space-between; gap: 8px; }
.sheet .picked button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 18px; line-height: 1; }
label.f { display: block; font-weight: 700; font-size: 14px; margin: 12px 0 6px; }
input[type="email"] { width: 100%; font: 16px var(--font); padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; }
input[type="email"]:focus { outline: 3px solid var(--red-soft); border-color: var(--red); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fine { font-size: 13px; color: var(--muted); }
.msg { margin-top: 10px; font-weight: 700; }
.msg.err { color: var(--red); }
.msg.ok { color: var(--green); }

/* FAQ */
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 8px; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq p { color: var(--muted); margin: 8px 0 0; }

/* Gift page */
.gift { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; padding: 28px 0; align-items: start; }
.gift .ph { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; }
.gift .ph img { width: 100%; height: 100%; object-fit: contain; }
.gift h1 { font-family: var(--display); font-size: clamp(26px, 4vw, 40px); line-height: 1.1; letter-spacing: -.02em; margin: 6px 0 10px; }
.status { border-radius: 14px; padding: 14px 16px; font-weight: 700; margin: 14px 0; }
.status.in { background: var(--green-soft); color: var(--green); }
.status.out { background: var(--red-soft); color: var(--red-ink); }
.status.unk { background: var(--gold-soft); color: #7a5208; }
.shops { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.shops li { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.shops .st { font-size: 13px; font-weight: 700; }
.st.in { color: var(--green); } .st.out { color: var(--red); } .st.unk { color: var(--muted); }

/* Footer */
.foot { margin-top: 48px; border-top: 1px solid var(--line); padding: 26px 0 90px; color: var(--muted); font-size: 14px; }
.foot a { color: var(--muted); }
.foot .links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }

@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; }
  .gift { grid-template-columns: 1fr; }
  .hero { padding-top: 32px; }
}
