/* Gift pages. Everything else comes from site.css. */
select, textarea { width: 100%; padding: 10px 14px; font: inherit; color: var(--ink); background: var(--bg); border: 2px solid var(--gray); border-radius: 4px; }
select { min-height: 56px; }
textarea { min-height: 120px; line-height: 1.4; resize: vertical; }
select:focus, textarea:focus { border-color: var(--ink); }
.gift-options { display: grid; gap: 10px; border: 0; padding: 0; margin: 0 0 8px; }
.gift-options legend, .gift-group legend { font-weight: 500; padding: 0; margin-bottom: 8px; }
.gift-group { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
.gift-club { display: grid; gap: 4px; border: 2px solid var(--gray); border-radius: 4px; padding: 14px; }
.gift-club:has(input:checked) { border-color: var(--ink); }
.gift-club input { width: 24px; min-height: 24px; height: 24px; accent-color: var(--ink); }
.gift-club .row { display: flex; gap: 12px; align-items: center; }
.gift-club .nm { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 1.4rem; letter-spacing: 0.03em; }
.gift-months { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.gift-months label { display: grid; gap: 2px; border: 2px solid var(--gray); border-radius: 4px; padding: 12px; cursor: pointer; }
.gift-months label:has(input:checked) { border-color: var(--ink); }
.gift-months input { width: 22px; min-height: 22px; height: 22px; accent-color: var(--ink); }
.gift-note { border-left: 4px solid var(--ink); padding: 4px 0 4px 14px; margin: 16px 0; font-size: 1.125rem; white-space: pre-wrap; }
.gift-two { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .gift-two { grid-template-columns: 1fr 1fr; } }
.gift-facts { display: grid; gap: 6px; margin: 12px 0 20px; }
.gift-facts div { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line, #DEDCD9); padding: 6px 0; }
.gift-facts dt { color: var(--muted); }
.gift-facts dd { margin: 0; text-align: right; }
.gift-section { margin: 28px 0; }
.gift-section h2 { margin-bottom: 8px; }
.gift-code { font-family: var(--display); font-weight: 800; font-size: 2rem; letter-spacing: 0.12em; }
.gift-bad { border-color: var(--stop, #8A1F33); }

/* ---- the gift form: four short screens (stepped by /js/member.js, filled in by /js/gift.js) ---- */
.gift-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 8px 0 6px; }
.gift-bar span { height: 4px; border-radius: 2px; background: var(--line); transition: background-color 0.25s; }
.gift-bar span.on { background: var(--ink); }
.gift-count { margin: 0; min-height: 1.4em; }
.gift-form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.gift-form textarea { min-height: 96px; }

.gift-clubs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gift-pick { position: relative; display: grid; justify-items: center; align-content: start; gap: 4px; padding: 16px 12px 18px; border: 2px solid var(--line); border-radius: 16px; text-align: center; cursor: pointer; transition: border-color 0.2s, background-color 0.2s, color 0.2s, transform 0.2s; }
.gift-pick:hover { border-color: var(--ink); }
.gift-pick:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.gift-clubs:has(input:checked) .gift-pick:not(:has(input:checked)) { opacity: 0.5; }
.gift-tick { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); opacity: 0; transform: scale(0.6); transition: opacity 0.2s, transform 0.2s; }
.gift-tick::after { content: ""; position: absolute; left: 8px; top: 8px; width: 11px; height: 6px; border-left: 2.5px solid var(--bg); border-bottom: 2.5px solid var(--bg); transform: rotate(-45deg); }
.gift-pick:has(input:checked) .gift-tick { opacity: 1; transform: none; }
.gift-pick:has(input:focus-visible) { outline: 3px solid var(--muted); outline-offset: 3px; }
.gift-art { width: 100%; max-width: 150px; height: 110px; object-fit: contain; }
.gift-pick:has(input:checked) .gift-art { transform: scale(1.06); }
.gift-art { transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
.gift-pick-name { font-family: var(--display); font-weight: 800; font-size: 1.7rem; line-height: 0.95; text-transform: uppercase; letter-spacing: 0.01em; }
.gift-pick-covers { font-size: 13px; line-height: 1.35; color: var(--muted); }

.gift-pills legend { padding: 0; margin: 0 0 10px; font-family: var(--display); font-weight: 800; font-size: 1.3rem; text-transform: uppercase; letter-spacing: 0.03em; }
.live .gift-pills-club { display: none; }
.gift-pills-club { color: var(--muted); }
.pills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pill { display: block; cursor: pointer; }
.pill-in { display: grid; justify-items: center; align-content: center; gap: 2px; min-height: 60px; padding: 8px 6px; border: 2px solid var(--ink); border-radius: 999px; font-family: var(--display); font-weight: 800; font-size: 1.2rem; letter-spacing: 0.04em; text-transform: uppercase; text-align: center; transition: background-color 0.2s, color 0.2s; }
.pill input:checked + .pill-in { background: var(--ink); color: var(--bg); }
.pill input:focus-visible + .pill-in { outline: 3px solid var(--muted); outline-offset: 3px; }
.pill input:disabled + .pill-in { opacity: 0.45; cursor: not-allowed; }
.pill-off { font-size: 13px; font-weight: 800; letter-spacing: 0.08em; line-height: 1; }
.gift-pills.wait { opacity: 0.4; pointer-events: none; }
.pill-price { font-size: 13px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.live .pill-price { display: none; }
.gift-total { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0; min-height: 4.6rem; color: var(--muted); }
.gift-total strong { font-family: var(--display); font-weight: 800; font-size: 3rem; line-height: 1; color: var(--ink); }
.gift-was { font-family: var(--display); font-weight: 800; font-size: 1.5rem; color: var(--gray); }
.gift-chip { padding: 5px 10px 4px; border-radius: 999px; background: var(--ink); color: var(--bg); font-family: var(--display); font-weight: 800; font-size: 0.95rem; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1; }
.gift-once { flex-basis: 100%; font-size: 15px; }
.field-help { margin: -6px 0 0; }

.gift-when { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px; align-items: stretch; }
.leaf { display: grid; grid-template-rows: auto 1fr auto; justify-items: center; align-items: center; border-radius: 14px; overflow: hidden; background: #f3f2ef; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08); text-align: center; }
.leaf-m { width: 100%; padding: 6px 0 5px; background: var(--ink); color: var(--bg); font-family: var(--display); font-weight: 800; font-size: 1.05rem; letter-spacing: 0.12em; text-transform: uppercase; }
.leaf-d { font-family: var(--display); font-weight: 800; font-size: 5rem; line-height: 0.9; padding-top: 6px; color: var(--ink); }
.leaf-w { padding: 0 4px 10px; font-family: var(--display); font-weight: 800; font-size: 0.9rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.gift-when-pick { display: grid; gap: 8px; }
.choice { display: block; cursor: pointer; }
.choice-in { display: grid; gap: 2px; height: 100%; padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; transition: border-color 0.2s; }
.choice-in strong { font-family: var(--display); font-weight: 800; font-size: 1.25rem; text-transform: uppercase; letter-spacing: 0.03em; line-height: 1.05; }
.choice-in span { font-size: 14px; color: var(--muted); line-height: 1.3; }
.choice input:checked + .choice-in { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.choice input:checked + .choice-in span { color: #d6d2cd; }
.choice input:focus-visible + .choice-in { outline: 3px solid var(--muted); outline-offset: 3px; }

.gift-later { display: grid; gap: 14px; }
.has-cal [data-date-field] { display: none; }
.has-cal .gift-date-fields { grid-template-columns: 1fr; }
.cal { border: 2px solid var(--line); border-radius: 14px; padding: 12px; width: 100%; max-width: 400px; justify-self: center; }
.cal:empty { display: none; }
.cal-head { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; margin-bottom: 6px; }
.cal-title { text-align: center; font-family: var(--display); font-weight: 800; font-size: 1.35rem; text-transform: uppercase; letter-spacing: 0.04em; }
.cal-nav { width: 44px; height: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ink); cursor: pointer; position: relative; }
.cal-nav::before { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; border-left: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: translate(-30%, -50%) rotate(45deg); }
.cal-nav.next::before { transform: translate(-70%, -50%) rotate(-135deg); }
.cal-nav:hover:not(:disabled) { background: var(--line); }
.cal-nav:disabled { opacity: 0.25; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-dow { text-align: center; font-size: 12px; font-weight: 600; color: var(--muted); padding: 4px 0; }
.cal-day { aspect-ratio: 1; min-height: 40px; width: 100%; padding: 0; border: 0; border-radius: 50%; background: none; font: inherit; font-weight: 500; color: var(--ink); cursor: pointer; }
.cal-day:hover:not(:disabled) { background: var(--line); }
.cal-day { position: relative; }
.cal-day.today::after { content: ""; position: absolute; left: 50%; bottom: 5px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }
.cal-day.on, .cal-day.on:hover:not(:disabled) { background: var(--ink); color: var(--bg); font-weight: 700; }
.cal-day:disabled { color: #c9c7c2; cursor: default; }
.gift-arrives { margin: 0; font-weight: 600; color: var(--ink); }
.gift-begins { margin: 0; color: var(--body); }
.time-pills { grid-template-columns: repeat(3, 1fr); }
.time-pill { width: 100%; background: var(--bg); color: var(--ink); cursor: pointer; }
.time-pill.on { background: var(--ink); color: var(--bg); }
.time-more summary { min-height: 44px; display: inline-flex; align-items: center; font-size: 15px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; list-style: none; }
.time-more summary::-webkit-details-marker { display: none; }
.time-more[open] summary { display: none; }
.time-more label { display: block; margin-bottom: 8px; }
.gift-form select { padding-right: 40px; appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.gift-receipt { display: grid; gap: 0; margin: 0; padding: 4px 16px; border-radius: 14px; background: #f3f2ef; }
.gift-receipt > div { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.gift-receipt > div:last-child { border-bottom: 0; }
.gift-receipt dt { font-family: var(--display); font-weight: 800; font-size: 0.95rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.gift-receipt dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.gift-receipt-total dd { font-family: var(--display); font-weight: 800; font-size: 1.5rem; line-height: 1.1; }
.gift-from { display: grid; gap: 16px; }
.switch { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; min-height: 56px; margin: 0; cursor: pointer; font-weight: 400; }
.switch-text { display: grid; gap: 2px; }
.switch-text strong { font-weight: 600; color: var(--ink); }
.switch-text span { font-size: 14px; line-height: 1.35; color: var(--muted); }
.switch-track { position: relative; width: 56px; height: 32px; border-radius: 999px; background: #c9c7c2; transition: background-color 0.2s; }
.switch-track::after { content: ""; position: absolute; left: 3px; top: 3px; width: 26px; height: 26px; border-radius: 50%; background: #ffffff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1); }
.switch input:checked ~ .switch-track { background: var(--ink); }
.switch input:checked ~ .switch-track::after { transform: translateX(24px); }
.switch input:focus-visible ~ .switch-track { outline: 3px solid var(--muted); outline-offset: 3px; }
.gift-from-name { margin: 0; transition: opacity 0.2s; }
.gift-from:has(#anonymous:checked) .gift-from-name { opacity: 0.35; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .switch-track, .switch-track::after, .gift-from-name { transition: none; } }
.gift-secure { margin: -4px 0 0; text-align: center; }
@media (min-width: 640px) {
  .gift-art { height: 140px; max-width: 190px; }
  .gift-pick-name { font-size: 2.1rem; }
  .gift-when { grid-template-columns: 132px minmax(0, 1fr); }
  .leaf-d { font-size: 4.4rem; }
}
@media (prefers-reduced-motion: reduce) { .gift-pick, .gift-art, .pill-in, .gift-bar span { transition: none; } }
