:root {
  color-scheme: light;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #463b40;
  background: #fbf5f0;
  font-synthesis: none;
  --muted: #766b70;
  --line: #eddee3;
  --paper: #fffaf8;
  --accent: #a85e72;
  --rose: #f7e8ed;
  --sage: #edf2ec;
  --butter: #fff2dd;
  --teal: #eaf2f0;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; background: #fbf5f0; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
textarea { width: 100%; min-height: 46px; padding: 10px 13px; border: 1px solid #d8cbb9; border-radius: 10px; background: #fffaf8; font: inherit; resize: vertical; }
:focus-visible { outline: 3px solid #bd7955; outline-offset: 3px; }
.page-shell { width: min(100% - 36px, 980px); margin: 0 auto; padding: 52px 0 40px; }
.page-header { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .9fr); align-items: center; gap: clamp(30px, 6vw, 72px); margin: 0 auto 38px; text-align: left; }
.header-copy { max-width: 470px; }
.hero-photo { width: min(100%, 420px); aspect-ratio: 3 / 4; justify-self: end; margin: 0; overflow: hidden; border: 8px solid #fffaf7; border-radius: 30px; background: var(--rose); box-shadow: 0 16px 36px rgb(129 82 101 / 12%); }
.hero-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.eyebrow { margin: 0 0 11px; color: #9c6579; font-size: .75rem; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.1rem, 5.3vw, 3.6rem); font-weight: 500; letter-spacing: -.045em; line-height: 1.03; }
h1 .title-note { display: block; margin-top: .28em; font-size: .5em; font-style: italic; font-weight: 400; letter-spacing: -.02em; line-height: 1.2; }
.intro { margin: 18px 0 0; max-width: 56ch; color: var(--muted); font-size: 1.05rem; line-height: 1.65; }
.toolbar { position: sticky; z-index: 2; top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 18px; padding: 12px 14px 12px 20px; border: 1px solid var(--line); border-radius: 16px; background: rgb(255 250 248 / 94%); box-shadow: 0 5px 24px rgb(52 41 28 / 6%); backdrop-filter: blur(10px); }
.selection-count { margin: 0; color: var(--muted); font-size: .94rem; }
.button { min-height: 44px; padding: 10px 16px; border: 0; border-radius: 11px; font-weight: 680; transition: transform .15s ease, background .15s ease; }
.button:not(:disabled):hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: #a85e72; }
.button-primary:hover:not(:disabled) { background: #8e4f63; }
.button-secondary { color: #70495a; border: 1px solid #e7cbd5; background: #fff9f7; }
.gift-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.gift-card { position: relative; min-height: 180px; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: 0 4px 16px rgb(90 61 72 / 4%); }
.gift-card:nth-child(4n + 2) { background: #fff8f3; }
.gift-card:nth-child(4n + 3) { background: #f6f8f2; }
.gift-card:nth-child(4n) { background: #f4f8f7; }
.gift-card.is-reserved { background: #f0eeec; }
.gift-card-top { display: flex; align-items: flex-start; gap: 13px; }
.gift-card input[type="checkbox"] { width: 21px; height: 21px; flex: 0 0 auto; margin: 3px 0 0; accent-color: var(--accent); }
.gift-card h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 1.32rem; font-weight: 600; line-height: 1.2; }
.gift-description { margin: 10px 0 0 34px; color: var(--muted); font-size: .94rem; line-height: 1.5; }
.gift-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 15px 0 0 34px; }
.gift-links a { color: #985d72; font-size: .9rem; text-underline-offset: 3px; }
.gift-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 17px 0 0 34px; }
.status { display: inline-flex; align-items: center; gap: 7px; color: #496449; font-size: .85rem; font-weight: 650; }
.status::before { width: 8px; height: 8px; border-radius: 50%; background: #6c956b; content: ""; }
.is-reserved .status { color: #716c62; }
.is-reserved .status::before { background: #9d9589; }
.price { color: var(--muted); font-size: .9rem; }
.notice { min-height: 24px; margin: 0 0 9px; color: #67422f; font-size: .94rem; }
.notice:empty { min-height: 0; margin-bottom: 0; }
.notice.error { color: #9b2e23; }
.manage-panel { display: grid; gap: 17px; margin: 42px 0 0; padding: clamp(22px, 5vw, 34px); border: 1px solid #dce6da; border-radius: 20px; background: var(--sage); }
.manage-panel h2, .code-dialog h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 1.75rem; font-weight: 550; }
.muted { margin: 9px 0 0; color: var(--muted); line-height: 1.55; }
.code-form label { display: block; margin-bottom: 7px; font-size: .88rem; font-weight: 650; }
.inline-form { display: flex; gap: 9px; }
input:not([type="checkbox"]) { width: 100%; min-width: 0; min-height: 46px; padding: 10px 13px; border: 1px solid #e4cfd6; border-radius: 10px; background: #fffaf8; }
.manage-results { padding-top: 5px; }
.manage-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.manage-list { display: grid; gap: 8px; margin: 0 0 13px; padding: 0; list-style: none; }
.manage-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid #ddd0be; border-radius: 11px; background: #fffaf3; }
.manage-row label { display: flex; align-items: center; gap: 10px; }
.manage-row input { width: 19px; height: 19px; accent-color: var(--accent); }
.manage-actions { display: flex; flex-wrap: wrap; gap: 9px; }
footer { margin: 24px auto 0; max-width: 58ch; color: #857f74; font-size: .83rem; line-height: 1.5; text-align: center; }
.owner-entry { margin-top: 12px; text-align: center; }
.text-button { padding: 6px 10px; border: 0; color: #887c6e; background: transparent; font-size: .82rem; text-decoration: underline; text-underline-offset: 3px; }
.owner-panel { display: grid; gap: 16px; margin-top: 20px; padding: clamp(20px, 4vw, 30px); border: 1px solid #d7c8b6; border-radius: 20px; background: #fff8f3; }
.owner-panel h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 1.8rem; font-weight: 550; }
.owner-panel h3 { margin: 0 0 4px; font-family: Georgia, "Times New Roman", serif; font-size: 1.3rem; }
.owner-panel .manage-heading { margin-bottom: 0; }
.item-form { display: grid; gap: 8px; padding: 16px; border: 1px solid #eadde0; border-radius: 13px; background: #fff6f4; }
.item-form label { margin-top: 4px; font-size: .86rem; font-weight: 650; }
.owner-items { display: grid; gap: 9px; }
.owner-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: #fffdf9; }
.owner-row-title { display: grid; gap: 4px; }
.owner-row-title span { color: var(--muted); font-size: .85rem; }
.owner-row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.owner-row-actions .button { min-height: 38px; padding: 7px 10px; font-size: .85rem; }
.button-danger { color: #8e4f63; border: 1px solid #e2bbc7; background: #fff6f5; }
.code-dialog { width: min(100% - 28px, 490px); padding: 32px; border: 1px solid var(--line); border-radius: 20px; color: inherit; background: var(--paper); box-shadow: 0 25px 80px rgb(31 23 17 / 25%); }
.code-dialog::backdrop { background: rgb(30 24 19 / 55%); backdrop-filter: blur(3px); }
.dialog-close { display: flex; justify-content: flex-end; margin: -18px -16px 9px; }
.icon-button { width: 38px; height: 38px; border: 0; border-radius: 50%; color: #5d554b; background: #f2ece3; font-size: 1.6rem; }
.code-dialog > p:not(.eyebrow) { color: var(--muted); line-height: 1.55; }
.code-box { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin: 18px 0; padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: #f7f1e8; }
.code-box code { overflow-wrap: anywhere; font-size: 1.02rem; font-weight: 700; letter-spacing: .06em; }
.code-dialog > form:last-child { margin-top: 19px; }
.code-dialog > form:last-child button { width: 100%; }
@media (max-width: 640px) {
  .page-shell { width: min(100% - 24px, 560px); padding-top: 24px; }
  .page-header { grid-template-columns: 1fr; gap: 20px; margin-bottom: 28px; text-align: center; }
  .header-copy { grid-column: 1; grid-row: 2; margin: 0 auto; }
  .hero-photo { grid-column: 1; grid-row: 1; width: min(100%, 360px); justify-self: center; border-width: 6px; border-radius: 24px; }
  .page-header { margin-bottom: 28px; }
  .intro { font-size: .97rem; }
  .toolbar { top: 8px; padding: 10px; }
  .selection-count { font-size: .83rem; }
  .toolbar .button { padding-inline: 11px; font-size: .86rem; }
  .gift-grid { grid-template-columns: 1fr; gap: 10px; }
  .gift-card { min-height: 0; padding: 19px; }
  .inline-form { flex-direction: column; }
  .inline-form .button { width: 100%; }
  .manage-heading { align-items: flex-start; flex-direction: column; }
  .manage-row { align-items: flex-start; }
  .owner-row { align-items: flex-start; flex-direction: column; }
  .owner-row-actions { justify-content: flex-start; }
  .code-dialog { padding: 25px 21px; }
  .code-box { align-items: stretch; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; } }
