:root { color-scheme: light; --pine: #314b32; --dark: #233623; --berry: #963d34; --paper: #f7edda; --line: #d8c6a3; --gold: #d4ac65; }
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(ellipse at top, #fff9e9, var(--paper) 65%) fixed; color: var(--dark); font: 1rem/1.55 system-ui, sans-serif; }
.bar { background: #fff8e9; color: var(--dark); border-bottom: 1px solid var(--line); }
nav, main { width: min(100% - 2rem, 68rem); margin: auto; }
nav { min-height: 4.25rem; display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.brand { display: flex; align-items: center; gap: 1rem; color: inherit; text-decoration: none; font-family: Georgia, serif; }
.wordmark { font-size: clamp(1.75rem, 5vw, 2.5rem); font-style: italic; font-weight: bold; letter-spacing: -.06em; }
.brand-title { border-left: 1px solid var(--line); padding-left: 1rem; font-size: 1.05rem; font-weight: bold; }
main { padding: clamp(1.5rem, 4vw, 3.5rem) 0 4rem; }
h1, h2, p { margin: 0 0 .75rem; overflow-wrap: anywhere; }
h1, h2 { font-family: Georgia, serif; line-height: 1.12; }
h1 { font-size: clamp(2rem, 6vw, 3.7rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.7rem); }
a { color: var(--pine); text-underline-offset: .18em; }
.hero {
  display: flex;
  align-items: center;
  min-height: clamp(8rem, 17vw, 12rem);
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: linear-gradient(100deg, #fff4db 5%, #fff4dbdc 36%, transparent 66%), url("storybook.webp") center / cover;
}
.hero h1 {
  position: relative;
  z-index: 1;
  max-width: 62%;
  margin: 0;
  font-size: clamp(1.65rem, 4vw, 2.75rem);
  letter-spacing: -.025em;
}
.ornament { font-size: 2.5rem; line-height: 1; }
.ornament { color: var(--berry); display: block; margin-bottom: 1rem; }
.group, .page-heading { margin: 1.75rem 0 1rem; }
.heading, .actions, .account { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .75rem; }
.actions { justify-content: flex-start; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: 1rem; }
.panel { padding: clamp(1rem, 4vw, 1.75rem); background: linear-gradient(150deg, #fff9eb, #f8edd5); border: 1px solid var(--line); border-radius: .85rem; box-shadow: 0 2px 5px #4b382010; }
.narrow { max-width: 28rem; margin: 1rem auto; }
.narrow h1 { font-size: clamp(2rem, 5vw, 2.7rem); }
.list-card { display: flex; align-items: center; gap: .85rem; text-decoration: none; min-width: 0; overflow-wrap: anywhere; }
.list-card:hover { border-color: var(--pine); }
.card-icon { flex: 0 0 auto; display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: .6rem; font-size: 1.6rem; background: #f0e3c8; }
.list-card strong { font: bold 1.2rem/1.25 Georgia, serif; }
.arrow { margin-left: auto; }
small { font-size: .875rem; }
.list-card small, .account small { display: block; }
.list-card .list-counts { display: flex; flex-wrap: wrap; gap: .15rem .7rem; margin-top: .2rem; }
.list-counts span { white-space: nowrap; }
.stack { display: grid; gap: .9rem; justify-items: start; margin-bottom: 1rem; }
label { display: grid; gap: .25rem; width: 100%; font-weight: 650; }
label small { font-weight: normal; }
input, textarea, select { width: 100%; border: 1px solid #877f74; border-radius: .45rem; padding: .6rem .75rem; font: inherit; color: inherit; background: white; }
textarea { resize: vertical; }
.store-fields { width: 100%; min-width: 0; margin: 0; padding: 0; border: 0; }
.store-fields legend { padding: 0; margin-bottom: .35rem; font-weight: 650; }
.store-fields legend small { font-weight: 400; }
.store-rows { display: grid; gap: .45rem; margin-bottom: .45rem; }
.store-row { display: flex; gap: .5rem; }
.store-row input { min-width: 0; }
.store-fields button[hidden] { display: none; }
@supports (field-sizing: content) {
  .auto-grow { field-sizing: content; resize: none; }
}
button, .button { min-height: 44px; border: 1px solid transparent; border-radius: .45rem; background: var(--pine); color: white; padding: .55rem .85rem; font: inherit; font-weight: 650; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
.quiet { color: inherit; background: transparent; border-color: currentColor; }
.danger { background: var(--berry); }
:focus-visible { outline: 3px solid #bd7424; outline-offset: 3px; }
summary { cursor: pointer; font-weight: 650; padding: .45rem 0; }
.add { margin-bottom: 1rem; }
.inset, .delete { margin-top: .65rem; }
.account { padding: .75rem 0; border-bottom: 1px solid var(--line); }
.account:last-child { border: 0; }
.notice { background: #edf3eb; padding: .65rem .85rem; border-radius: .45rem; }
.gift-detail { max-width: 44rem; margin-inline: auto; }
.gift-type { margin: 0 0 .25rem; color: var(--pine); font-size: .85rem; font-weight: 700; }
.gift-detail-title { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1rem; }
.gift-detail-title h1 { min-width: 0; margin: 0; font-size: clamp(1.85rem, 5vw, 2.9rem); }
.gift-detail-title .button { margin-inline-start: auto; }
.gift-type-pill { background: #f0e3c8; }
.gift-detail-state { margin-top: .6rem; display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .65rem; }
.gift-detail-state p { margin: 0; }
.gift-detail-actions { margin-top: .75rem; align-items: center; gap: .35rem .6rem; }
.gift-detail-header .notice-error { margin-top: .75rem; }
.gift-detail .store-heading { font-size: 1.2rem; margin-bottom: .35rem; }
.gift-heading { display: flex; flex-wrap: wrap; align-items: center; column-gap: .75rem; }
.gift-heading > :is(h1, h2) { min-width: 0; }
.wish-summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; }
.shopping-items { display: grid; gap: .75rem; }
.shopping-card { padding: .9rem 1rem; }
.shopping-note {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.shopping-section > .group { margin-block: 1rem; }
.shopping-section + .shopping-section { padding-top: 1.25rem; border-top: 1px solid var(--line); }
.shopping-recipient, .shopping-items h4 { margin: 0 0 .75rem; font: bold 1.2rem/1.25 Georgia, serif; }
.wish-card-actions { margin-inline-start: auto; }
.wish-meta { display: flex; flex-wrap: wrap; gap: .25rem .75rem; font-size: .9rem; }
.gift-heading .status { margin: 0 0 .75rem; }
.status { width: fit-content; max-width: 100%; padding: .3rem .75rem; border-radius: 2rem; font-size: .9rem; font-weight: 700; }
.status-available { color: #064c40; background: #c4eee0; }
.status-claimed { color: #6b2443; background: #f5d6e4; }
.gift-conversation { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.gift-conversation h2 small { font: 500 .9rem system-ui, sans-serif; white-space: nowrap; }
.message-input { min-height: 4.25rem; font-weight: 400; }
.gift-conversation .stack { margin-bottom: 0; }
.notice-error { background: #fce8e5; color: #842b24; border: 1px solid #c77a71; }
.notice code { display: block; overflow-wrap: anywhere; }
.comment { padding: .55rem 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.comment strong { font-size: .9rem; }
.comment p { margin: .15rem 0 0; }
.comment + form { margin-top: 1rem; }
.notes { white-space: pre-wrap; }
.store-references { margin: 0 0 .75rem; padding-inline-start: 1.2rem; overflow-wrap: anywhere; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.25rem 0; }

.entrance { padding-top: 0; overflow: hidden; }
.entrance::before {
  content: "";
  display: block;
  height: 10rem;
  margin: 0 calc(-1 * clamp(1rem, 4vw, 1.75rem)) 1.25rem;
  background: url("storybook-mobile.webp") center 44% / cover;
}
.group > .heading { margin-bottom: 1rem; }
.add-child-fallback > summary { list-style: none; }
.add-child-fallback > summary::-webkit-details-marker { display: none; }
.add-child-trigger, .add-child-fallback > summary {
  min-height: 44px;
  padding: .6rem .85rem;
  border-radius: 2rem;
  background: var(--pine);
  color: white;
}
.add-child-trigger[hidden], .child-dialog-actions [hidden] { display: none; }
.child-dialog { width: min(28rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); color: var(--dark); }
.child-dialog::backdrop { background: rgb(23 35 25 / 55%); }
.child-dialog .stack { margin: 1rem 0 0; }
.child-dialog-actions { justify-self: end; }
.install-dialog p { font-weight: 400; }
.install-dialog-actions { justify-content: flex-end; }
@media (max-width: 42rem) {
  .hero { position: relative; min-height: 7.5rem; background: #fff4db; overflow: hidden; }
  .hero h1 { max-width: 60%; }
  .hero::after {
    content: "";
    position: absolute;
    inset: 0 0 0 50%;
    background: linear-gradient(90deg, #fff4db, transparent 35%), url("storybook-mobile.webp") center 42% / cover;
  }
  .brand { gap: .6rem; }
  .brand-title { padding-left: .6rem; font-size: .9rem; }
}

.nav-actions { display: flex; align-items: center; justify-content: flex-end; gap: .7rem; }
.nav-actions a { padding: .6rem .15rem; }
.nav-actions button { white-space: nowrap; }
.nav-actions button[hidden] { display: none; }
@media (max-width: 28rem) {
  nav:has(.nav-actions) .brand-title { display: none; }
}

.denied { text-align: center; max-width: 38rem; margin: auto; overflow: hidden; }
.denied-art {
  height: clamp(12rem, 45vw, 20rem);
  border-radius: .6rem;
  margin-bottom: 1.25rem;
  background: url("storybook-mobile.webp") center 44% / cover;
}
.denied p { font: italic 1.3rem Georgia, serif; }
