/* ============ GiftGenius — "The Curated Gifting Studio" ============
   A warm editorial personal-shopper studio. Blush paper, deep
   cranberry as the single accent, Fraunces serif for the curated
   voice. Gift ideas render as numbered editorial picks with
   "why this fits" pull-quotes; people as profile cards; occasions
   as a countdown timeline. */
:root {
  --paper: #faf5ee;
  --paper-2: #f4ecdf;
  --card: #fffdf9;
  --line: #e9ddca;
  --line-soft: #f2ead9;
  --ink: #33261f;
  --ink-soft: #5c4c40;
  --muted: #97826e;
  --berry: #a8324a;
  --berry-deep: #7e2337;
  --berry-soft: #f9e7ec;
  --berry-ring: rgba(168, 50, 74, .14);
  --gold: #c09a4a;
  --radius-was-18px;
  --radius-sm-was-11px;
  --shadow: 0 1px 2px rgba(51, 38, 31, .05), 0 14px 34px rgba(51, 38, 31, .08);
  --serif: "Fraunces", "Iowan Old Style", Charter, Georgia, serif;
  --sans: "Inter", -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.6;
  background: var(--paper);
  background-image: radial-gradient(ellipse 90% 40% at 50% -8%, #fffdf6 0%, transparent 60%);
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 960px; margin: 0 auto; padding: 0 24px; }

/* ---------- masthead ---------- */
.masthead { background: #2c1a21; color: #f7efe6; position: sticky; top: 0; z-index: 50; box-shadow: 0 4px 20px rgba(44, 26, 33, .35); }
.masthead-in { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 16px; padding-bottom: 16px; }
.brand { display: flex; gap: 14px; align-items: center; }
.brand-mark { width: 46px; height: 46px; border-radius: 0; background: var(--berry); display: flex; align-items: center; justify-content: center; flex: none; box-shadow: 0 8px 18px rgba(168, 50, 74, .45); transform: rotate(-4deg); }
.brand-text h1 { margin: 0; font-family: var(--serif); font-size: 27px; font-weight: 700; letter-spacing: -.01em; }
.tag { margin: 4px 0 0; color: #cdbba9; font-size: 12.5px; max-width: 46ch; }
.tabs { display: flex; gap: 4px; background: rgba(255,255,255,.08); border-radius: 0; padding: 5px; }
.tab {
  border: 0; background: transparent; cursor: pointer; font: 600 13.5px var(--sans); color: #d8c7b4;
  padding: 10px 18px; border-radius: 0; transition: all .16s ease; white-space: nowrap;
}
.tab:hover { color: #fff; }
.tab.active { background: var(--berry); color: #fff; box-shadow: 0 4px 12px rgba(168,50,74,.5); }

/* ---------- layout ---------- */
.main { padding-top: 26px; padding-bottom: 64px; }
.panel { display: none; animation: pickin .3s ease both; }
.panel.active { display: block; }
@keyframes pickin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.panel-head { display: flex; align-items: baseline; gap: 12px; margin: 6px 0 16px; }
.panel-head h2 { margin: 0; font-family: var(--serif); font-size: 27px; font-weight: 600; }
.panel-note { color: var(--muted); font-size: 13px; font-style: italic; font-family: var(--serif); }
.stack { display: grid; gap: 12px; }

/* ---------- banner ---------- */
.banner {
  background: var(--berry-soft); border: 1px solid #efd3da; color: var(--berry-deep);
  border-radius: 0; padding: 13px 18px; margin-bottom: 20px; font-size: 14px; line-height: 1.9;
  display: flex; align-items: flex-start; gap: 10px;
}
.b-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--berry); flex: none; margin-top: 8px; box-shadow: 0 0 0 4px var(--berry-ring); }

/* ---------- forms ---------- */
.card-form {
  background: var(--card); border: 1px solid var(--line); border-radius: 0;
  padding: 22px; box-shadow: var(--shadow); margin-bottom: 18px;
}
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
input, select {
  background: #fff; border: 1px solid var(--line); color: var(--ink);
  border-radius: 0; padding: 11px 14px; font: 500 14px var(--sans); width: 100%; margin-bottom: 12px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.frow input, .frow select { margin-bottom: 0; }
input:focus, select:focus { outline: none; border-color: var(--berry); box-shadow: 0 0 0 3px var(--berry-ring); }
input::placeholder { color: #b7a68d; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2397826e' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.btn {
  background: var(--berry); color: #fff; border: 0; border-radius: 0;
  font: 700 14px var(--sans); padding: 12px 26px; cursor: pointer;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
  box-shadow: 0 8px 18px rgba(168, 50, 74, .3);
}
.btn:hover { background: var(--berry-deep); transform: translateY(-1px); }
.btn:active { transform: scale(.98); }
.btn.small { padding: 9px 18px; font-size: 13px; }
.btn.ghost { background: transparent; color: var(--berry); border: 1.5px solid var(--berry); box-shadow: none; }
.btn.ghost:hover { background: var(--berry-soft); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 16px; }
.int-chip {
  border: 1.5px solid var(--line); background: #fff; color: var(--ink-soft);
  font: 600 12.5px var(--sans); padding: 8px 15px; border-radius: 0; cursor: pointer;
  transition: all .15s ease;
}
.int-chip:hover { border-color: var(--berry); color: var(--berry); }
.int-chip.selected { background: var(--berry); border-color: var(--berry); color: #fff; box-shadow: 0 4px 10px rgba(168,50,74,.3); }
.ai-row { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.ai-row input { margin-bottom: 0; max-width: 340px; }

/* ---------- cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 0;
  padding: 18px 22px; box-shadow: var(--shadow); position: relative;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(51,38,31,.06), 0 18px 40px rgba(51,38,31,.1); }
.card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.card-head strong { font-family: var(--serif); font-size: 18px; font-weight: 600; }
.pill {
  font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
  background: var(--paper-2); color: var(--ink-soft); border: 1px solid var(--line);
  padding: 4px 11px; border-radius: 0; white-space: nowrap;
}
.pill.hot { background: var(--berry); border-color: var(--berry); color: #fff; }
.link { background: none; border: 0; color: var(--muted); font: 600 12.5px var(--sans); cursor: pointer; margin-left: auto; text-decoration: underline; text-underline-offset: 3px; }
.link:hover { color: var(--berry); }
.bar { height: 7px; background: var(--paper-2); border-radius: 0; margin: 10px 0 4px; overflow: hidden; }
.bar > div { height: 100%; background: var(--berry); border-radius: 0; transition: width .4s ease; }

/* ---------- budget overview strip ---------- */
.budget-strip {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 0;
  padding: 14px 18px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.budget-strip .bs .num { font-family: var(--serif); font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
.budget-strip .bs .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; margin-top: 2px; }

/* ---------- shortlist + tools rows ---------- */
.short-head { display: flex; align-items: baseline; gap: 10px; margin: 22px 0 10px; }
.short-head h3 { margin: 0; font-family: var(--serif); font-size: 19px; }
.card.short { border-left: 3px solid var(--gold); }
.tools-row { margin-bottom: 12px; }
.card .link + .link { margin-left: 2px; }
.nudge { font-size: 13px; color: var(--berry-deep); background: var(--berry-soft); border-radius: 0; padding: 8px 13px; margin-top: 10px; font-weight: 600; }
.overwarn { font-size: 13px; color: #9a3412; background: #fef3e8; border-radius: 0; padding: 8px 13px; margin-top: 8px; font-weight: 600; }
.budget-strip .bs.over .num { color: #9a3412; }
.age-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; margin: 8px 14px 8px 0; cursor: pointer; }
.form-err { color: #b3261e; font-size: 13.5px; font-weight: 600; margin: 8px 0 0; }
.card.past { opacity: .85; }
.empty {
  border: 1.5px dashed var(--line); border-radius: 0; padding: 30px; text-align: center;
  color: var(--muted); font-size: 14px; background: rgba(255, 253, 249, .6);
}

/* ---------- gift picks ---------- */
.card.gift { border-left: 5px solid var(--berry); }
.card.gift .card-head strong { font-size: 20px; }
.why {
  font-family: var(--serif); font-style: italic; font-size: 15.5px; color: var(--ink-soft);
  border-left: 3px solid var(--gold); padding: 4px 0 4px 14px; margin: 10px 0 14px;
}
.why-mark {
  display: inline-block; font: 800 10.5px var(--sans); letter-spacing: .12em; text-transform: uppercase;
  color: var(--berry); margin-right: 8px; font-style: normal;
}
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.ai-note { margin-top: 12px; font-size: 13.5px; color: var(--ink-soft); background: var(--paper-2); border-radius: 0; padding: 12px 16px; }
.note-line { font-size: 13.5px; color: var(--ink-soft); margin-top: 8px; padding-left: 2px; }
.note-line::before { content: "— "; color: var(--gold); }
.gave-line { font-size: 13.5px; color: var(--ink-soft); margin-top: 6px; }
.gave-label { font-weight: 700; color: var(--berry-deep); }
.pill.split { background: var(--berry-soft); border-color: #e3b8c4; color: var(--berry-deep); }

.muted { color: var(--muted); }
.foot { padding: 24px 0 8px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); margin-top: 26px; }

/* ---------- responsive ---------- */
@media (max-width: 700px) {
  .masthead-in { flex-direction: column; align-items: stretch; }
  .tabs { justify-content: center; flex-wrap: wrap; }
  .frow { grid-template-columns: 1fr; }
  .ai-row { flex-direction: column; align-items: stretch; }
  .ai-row input { max-width: none; }
  .brand-text h1 { font-size: 24px; }
}

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

/* ---------- 2026 redesign: fit rings, rank medallions, interest tags ---------- */
.card.gift { display: grid; grid-template-columns: 64px 1fr; gap: 6px 18px; }
.gift-main { min-width: 0; }
.rank-medal {
  width: 52px; height: 52px; background: var(--berry); color: #fff;
  display: grid; place-items: center; font-family: var(--serif);
  font-size: 22px; font-weight: 700; grid-row: 1;
}
.fit-ring { display: flex; align-items: center; gap: 10px; margin: 10px 0 2px; }
.fit-ring .ring { position: relative; width: 46px; height: 46px; flex: none; }
.fit-ring .ring-bg { fill: none; stroke: var(--line); stroke-width: 6; }
.fit-ring .ring-fg { fill: none; stroke: var(--gold); stroke-width: 6; }
.fit-ring .ring-num {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink);
}
.fit-lbl { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.itags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 2px; }
.itag {
  font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  background: var(--berry-soft); color: var(--berry-deep); border: 1px solid #e3b8c4;
  padding: 3px 10px;
}
.itag.person { background: var(--paper-2); color: var(--ink-soft); border-color: var(--line); }
@media (max-width: 560px) {
  .card.gift { grid-template-columns: 44px 1fr; }
  .rank-medal { width: 40px; height: 40px; font-size: 18px; }
}
