:root {
  color-scheme: light;
  --ink: #192d24;
  --muted: #516256;
  --green: #193a2c;
  --pine: #234b39;
  --paper: #fffdf7;
  --cream: #f7f3e9;
  --line: #dddcd0;
  --red: #a73934;
  --serif: Georgia, 'Times New Roman', serif;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 16px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--cream); color: var(--ink); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
button, a, input, textarea, select { outline-offset: 4px; }
:focus-visible { outline: 2px solid #9d4b2d; }
button, .shop { min-height: 44px; }
.wrap { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.topbar { min-height: 78px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px 18px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: .65rem; font-weight: 750; letter-spacing: -.03em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 100%; background: var(--green); color: #f2d498; }
.hero {
  isolation: isolate; overflow: hidden; position: relative; min-height: 330px; display: flex; align-items: center;
  background: radial-gradient(ellipse at 79% 110%, #40604a 0%, transparent 53%), #162e25;
  color: #fff8e7; border-radius: 27px; padding: 50px clamp(32px, 6vw, 78px);
}
.hero::before {
  position: absolute; inset: 0; z-index: -1; content: ''; opacity: .28;
  background-image: radial-gradient(#d3c19b 1px, transparent 1px);
  background-size: 24px 24px; mask-image: linear-gradient(90deg, transparent 20%, #000 100%);
}
.hero-copy { position: relative; z-index: 1; max-width: 520px; }
.kicker { font-size: .78rem; letter-spacing: .19em; font-weight: 750; text-transform: uppercase; }
.hero .kicker { color: #edcd8f; margin: 0 0 14px; }
.hero h1, h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -.055em; }
.hero h1 { font-size: clamp(3rem, 8vw, 6.2rem); line-height: .96; margin: 0; }
.hero-copy > p:last-child { color: #efe8d7; line-height: 1.6; max-width: 355px; margin: 20px 0 0; }
.art { position: absolute; right: 8%; bottom: 1%; width: 316px; height: 296px; transform-origin: bottom right; }
.gift { position: absolute; border-radius: 5px; box-shadow: 15px 19px 35px #0c2118a6; }
.gift-back {
  width: 126px; height: 104px; right: 4px; bottom: 47px; transform: rotate(13deg);
  background: linear-gradient(90deg, transparent 45%, #a7473a 45% 59%, transparent 59%),
    repeating-linear-gradient(135deg, #e7cb91 0 10px, #f3dba6 10px 22px);
}
.gift-front {
  width: 168px; height: 142px; left: 56px; bottom: 46px; transform: rotate(-11deg);
  background: linear-gradient(90deg, transparent 43%, #e3ba75 43% 56%, transparent 56%),
    radial-gradient(#e9bfa57a 1.5px, transparent 1.5px) 0 0 / 17px 17px, #a33b36;
}
.gift-front::after { content: ''; position: absolute; inset: 0 -6px auto; height: 27px; border-radius: 5px; background: linear-gradient(90deg, transparent 44%, #f0cc8a 44% 56%, transparent 56%), #bc4b43; box-shadow: 0 4px 5px #531e2350; }
.gift-front i, .gift-front b { position: absolute; width: 62px; height: 35px; border: 7px solid #ebc685; top: -35px; }
.gift-front i { left: 24px; border-radius: 66% 90% 10% 75%; transform: rotate(17deg); }
.gift-front b { right: 26px; border-radius: 90% 66% 75% 10%; transform: rotate(-17deg); }
.star { position: absolute; color: #f2d498; font-size: 2.65rem; line-height: 1; }
.star-one { top: 38px; left: 23px; }
.star-two { top: 38px; right: 47px; font-size: 1.7rem; }
.star-three { top: 108px; right: 11px; font-size: 1.25rem; }
.card, dialog { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; }
.login { max-width: 445px; margin: 26px auto 54px; padding: clamp(23px, 5vw, 34px); }
h2 { font-size: 2.3rem; line-height: 1.12; margin: 0; }
.login > p:first-of-type { margin: 10px 0 24px; line-height: 1.55; color: var(--muted); }
form { display: grid; gap: 10px; }
label { font-weight: 650; font-size: .92rem; }
label span { color: var(--muted); font-weight: 450; }
input, textarea, select { width: 100%; border: 1px solid #9faaa0; border-radius: 10px; padding: 12px 13px; background: #fff; color: var(--ink); min-width: 0; }
textarea { resize: vertical; }
.primary, .light, .shop {
  border: 1px solid transparent; border-radius: 10px; padding: 11px 17px; font-weight: 650; text-decoration: none;
}
.primary { background: var(--green); color: #fffdf5; }
.primary:hover:enabled { background: var(--pine); }
.light, .shop { border-color: var(--line); color: var(--green); background: var(--paper); }
.light:hover, .shop:hover { background: #edece1; }
.login .primary { margin-top: 5px; }
.text-button { border: 0; padding: 4px 0; background: transparent; color: var(--green); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }
.login-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 12px; }
.message { color: #912f28; font-size: .92rem; line-height: 1.45; margin: 12px 0 0; }
.message:empty { display: none; }
#dashboard { padding: 35px 0 65px; }
.section-head { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.section-head .kicker { color: #6b5540; margin: 0 0 7px; }
.tabs { display: flex; flex-wrap: wrap; width: fit-content; gap: 5px; border: 1px solid var(--line); padding: 5px; border-radius: 12px; margin: 19px 0; }
.tabs button { border: 0; border-radius: 8px; background: transparent; color: var(--green); font-weight: 650; padding: 8px 14px; }
.tabs button[aria-pressed=true] { background: var(--green); color: var(--paper); }
.grids { display: grid; gap: 15px; }
.person { padding: 21px; }
.person h3, .person p, .wish h4 { margin: 0; overflow-wrap: anywhere; }
.person h3 { font-family: var(--serif); font-size: 1.45rem; }
.person .empty { color: var(--muted); margin-top: 9px; }
.wishes { display: grid; list-style: none; gap: 9px; padding: 0; margin: 14px 0 0; }
.wish { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; padding: 13px; border-radius: 12px; background: var(--cream); }
.wish div:first-child { min-width: 0; }
.wish p { color: var(--muted); white-space: pre-wrap; margin-top: 4px; }
.wish-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.small, .shop { font-size: .88rem; }
.shop { display: inline-flex; align-items: center; }
dialog { width: min(455px, calc(100% - 30px)); color: var(--ink); padding: 24px; }
dialog::backdrop { background: #10291f9e; }
.dialog-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 6px; }
.icon { font-size: 1.3rem; line-height: 1; padding: 7px 13px; }
#gift-form .primary { margin-top: 8px; }
@media (max-width: 800px) { .art { right: 4%; transform: scale(.77); } }
@media (max-width: 640px) {
  .wrap { width: calc(100% - 28px); }
  .topbar { min-height: 74px; }
  .hero { align-items: start; padding: 29px 23px; min-height: 330px; border-radius: 20px; }
  .hero-copy { max-width: none; }
  .hero-copy > p:last-child { max-width: 290px; margin-top: 12px; }
  .art { right: 8%; bottom: 0; transform: scale(.55); }
  .login { margin-top: 16px; }
}

.header-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.language-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.language-select { width: auto; min-height: 44px; padding: 9px 30px 9px 11px; background-color: var(--paper); border-color: var(--line); border-radius: 10px; font-size: .9rem; }
.managed-lists { display: grid; gap: 7px; max-width: 360px; margin: 0 0 14px; }
.shared-list-help { color: var(--muted); line-height: 1.5; margin: 0 0 15px; }
.person-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.gift-list-context { color: var(--muted); margin: -3px 0 5px; line-height: 1.4; }
label .label-main { color: inherit; font-weight: inherit; }
@media (max-width: 420px) {
  .topbar { align-items: flex-start; }
  .header-actions { gap: 6px; }
  .header-actions #logout { flex-basis: 100%; }
  .brand { padding-block: 5px; }
  .hero h1 { font-size: clamp(2.7rem, 12vw, 4rem); }
}

.budget { color: var(--muted); margin: 12px 0 0; }
.product-photo { width: 90px; height: 90px; object-fit: contain; background: white; border-radius: 9px; flex-shrink: 0; }
.product-details { flex: 1; min-width: 100px; }
.wish .product-price { font-weight: 750; color: var(--green); margin-top: 6px; }
#product-status:empty { display: none; }
dialog { max-height: 90vh; overflow: auto; }
@media(min-width: 850px) { .grids:has(> :nth-child(2)) { grid-template-columns: 1fr 1fr; } }
@media(max-width: 500px) { .product-photo { width: 70px; height: 70px; } .wish-actions { width: 100%; } }
