:root {
  --ink: #30263d;
  --muted: #6c6575;
  --paper: #fbf8f1;
  --white: #fffefa;
  --purple: #6744dc;
  --purple-dark: #5736c2;
  --pale: #ece5ff;
  --orange: #f6743d;
  --lime: #e5f28f;
  --line: #e5dfd8;
  --green: #2f6b50;
  --green-pale: #e3f1e8;
  --red: #b3261e;
  --red-pale: #fbe9e7;
  --radius: 24px;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: 0; background: none; }
button:disabled { cursor: not-allowed; opacity: .55; }
:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { letter-spacing: -.04em; }
h1 { font-size: clamp(38px, 5vw, 64px); line-height: 1.04; font-weight: 750; margin-bottom: 18px; }
h1 em { font-family: Georgia, serif; font-weight: 400; color: var(--purple); letter-spacing: -.05em; }
h2 { font-size: clamp(26px, 3vw, 36px); line-height: 1.12; }
h3 { font-size: 20px; line-height: 1.2; margin-bottom: 6px; }
p { line-height: 1.6; }
svg { display: block; }
.muted, small { color: var(--muted); }
.skip { position: absolute; top: -60px; left: 15px; background: white; padding: 12px; z-index: 30; }
.skip:focus { top: 10px; }

.beta-bar { min-height: 33px; background: var(--ink); color: #fff; font-size: 10px; letter-spacing: .09em; display: flex; align-items: center; padding: 6px max(16px, calc((100vw - 1240px) / 2)); }
.beta-bar i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--lime); margin-right: 7px; }
.beta-detail { opacity: .72; letter-spacing: 0; }

.header { max-width: 1296px; padding: 22px 28px; display: flex; align-items: center; gap: 28px; margin: auto; }
.brand { display: flex; align-items: center; font-size: 30px; font-weight: 800; letter-spacing: -1.7px; white-space: nowrap; }
.brand svg { width: 39px; height: 28px; color: var(--orange); margin-right: 8px; }
.brand-dot { color: var(--orange); }
.header-credit { font-size: 8px; letter-spacing: .14em; font-weight: 400; margin: 9px 0 0 10px; color: var(--muted); }
nav { display: flex; gap: 24px; font-size: 14px; margin-left: auto; }
nav a { padding: 9px 0; position: relative; }
nav a.active { font-weight: 700; }
nav a.active::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background: var(--purple); }
.account { display: flex; align-items: center; gap: 10px; font-size: 13px; }
nav[hidden] + .account { margin-left: auto; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--pale); color: var(--purple); display: grid; place-items: center; font-weight: 800; overflow: hidden; flex-shrink: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border-radius: 100px; font-size: 14px; font-weight: 700; padding: 14px 22px; min-height: 46px; line-height: 1.2; transition: transform .18s, background .18s; text-align: center; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.primary { background: var(--purple); color: #fff; }
.primary:hover:not(:disabled) { background: var(--purple-dark); }
.dark { background: var(--ink); color: #fff; }
.light { background: #fff; border: 1px solid var(--line); }
.orange { background: var(--orange); color: var(--ink); }
.danger { background: #fff; border: 1px solid #e7b8b3; color: var(--red); }
.small { font-size: 12px; padding: 9px 16px; min-height: 38px; }
.text-button { font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; padding: 8px 0; }
.wide { width: 100%; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

main { min-height: 68vh; padding-bottom: 60px; }
main:focus { outline: none; }
.wrap { max-width: 1240px; margin: auto; padding: 0 28px; }
.narrow { max-width: 760px; }
.loading { display: flex; flex-direction: column; align-items: center; padding-top: 90px; color: var(--muted); }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 4px solid var(--pale); border-top-color: var(--purple); animation: spin 0.9s linear infinite; margin-bottom: 14px; }
@keyframes spin { to { transform: rotate(360deg); } }

.eyebrow { display: inline-flex; align-items: center; gap: 8px; text-transform: uppercase; font-size: 10px; letter-spacing: .15em; font-weight: 700; margin-bottom: 16px; }
.eyebrow::before { content: '✳'; color: var(--orange); font-size: 18px; }

.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; padding-top: 36px; }
.hero .intro { color: var(--muted); font-size: 16px; max-width: 440px; margin-bottom: 26px; }
.hero-art { background: var(--pale); border-radius: 36px; aspect-ratio: 1.15; display: grid; place-items: center; position: relative; overflow: hidden; }
.hero-art .blob { position: absolute; border-radius: 50%; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 60px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.step b { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--lime); margin-bottom: 12px; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; padding: 26px 0 22px; }
.page-head h1 { margin-bottom: 4px; }
.page-head p { margin-bottom: 0; color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card + .card { margin-top: 18px; }
.loop-card { display: flex; flex-direction: column; gap: 6px; transition: transform .18s, box-shadow .18s; }
.loop-card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(48, 38, 61, .08); }
.loop-card .meta { font-size: 12px; color: var(--muted); }
.empty { text-align: center; padding: 48px 22px; }
.empty p { color: var(--muted); max-width: 420px; margin: 0 auto 20px; }

.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; padding: 5px 10px; border-radius: 100px; background: var(--pale); color: var(--purple); white-space: nowrap; }
.chip.open { background: var(--lime); color: var(--ink); }
.chip.closed { background: #f1ece6; color: var(--ink); }
.chip.purchased, .chip.delivered, .chip.ok { background: var(--green-pale); color: var(--green); }
.chip.cancelled { background: var(--red-pale); color: var(--red); }
.chip.surprise { background: #fff1e9; color: #a64716; }
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }

.progress { height: 9px; border-radius: 20px; background: #eee9f2; overflow: hidden; margin: 10px 0 6px; }
.progress div { height: 100%; background: var(--purple); border-radius: 20px; transition: width .5s ease; }
.progress-label { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: var(--muted); gap: 10px; }
.progress-label strong { font-size: 17px; color: var(--ink); }

.loop-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; align-items: start; padding-top: 18px; }
.loop-hero { background: var(--pale); border-radius: 30px; padding: 30px; }
.loop-hero h1 { font-size: clamp(30px, 4vw, 46px); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 18px 0 4px; }
.fact { background: rgba(255, 255, 255, .7); border-radius: 16px; padding: 12px 14px; font-size: 13px; }
.fact span { display: block; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.big-total { font-size: 34px; font-weight: 800; letter-spacing: -.04em; }
.note { white-space: pre-wrap; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .amount { font-weight: 800; white-space: nowrap; }
.list .msg { font-size: 13px; color: var(--muted); margin: 3px 0 0; overflow-wrap: anywhere; }

form .field { margin-bottom: 16px; }
label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.hint { font-size: 12px; color: var(--muted); font-weight: 400; }
input[type=text], input[type=url], input[type=email], input[type=date], input[inputmode], textarea, select {
  width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 12px 14px; min-height: 46px; font-size: 16px;
}
textarea { min-height: 90px; resize: vertical; }
input[aria-invalid=true], textarea[aria-invalid=true] { border-color: var(--red); }
.error { color: var(--red); font-size: 12px; margin-top: 5px; }
.form-error { background: var(--red-pale); color: var(--red); padding: 12px 14px; border-radius: 14px; font-size: 13px; margin-bottom: 14px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14px; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--purple); }
.money { position: relative; }
.money::before { content: '€'; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.money input { padding-left: 30px; }

.share { display: flex; gap: 8px; }
.share input { flex: 1; min-width: 0; font-size: 13px; background: #faf8ff; }
.notice { background: #fff8e8; border: 1px solid #f3e1b5; border-radius: 16px; padding: 12px 14px; font-size: 13px; line-height: 1.5; }
.notice.info { background: #f5f2ff; border-color: #ddd3ff; }

.wish-thumb { position: relative; display: grid; place-items: center; width: 92px; height: 92px; flex-shrink: 0; border-radius: 16px; background: var(--pale); color: var(--purple); overflow: hidden; }
.wish-thumb svg { width: 36px; height: 36px; }
.wish-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.list .wish { gap: 16px; }
.wish-name { display: block; font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; }
.wish-meta { display: flex; gap: 6px 14px; align-items: baseline; flex-wrap: wrap; margin-top: 4px; font-size: 13px; }
.wish-meta .text-button { padding: 0; }
.wish-price { font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.wish-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.with-thumb { display: flex; gap: 14px; align-items: flex-end; }
.with-thumb .field { flex: 1; min-width: 0; }
.with-thumb .wish-thumb { width: 64px; height: 64px; margin-bottom: 16px; }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 8px 6px; }
.table td { border-top: 1px solid var(--line); padding: 12px 6px; vertical-align: middle; overflow-wrap: anywhere; }
.table td:last-child { text-align: right; }

dialog { border: 0; border-radius: 26px; padding: 28px; width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 40px); color: var(--ink); box-shadow: 0 30px 80px rgba(48, 38, 61, .3); }
dialog::backdrop { background: rgba(48, 38, 61, .45); }
dialog .close { position: absolute; top: 14px; right: 16px; font-size: 26px; width: 40px; height: 40px; border-radius: 50%; }
dialog .close:hover { background: var(--pale); }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); opacity: 0; background: var(--ink); color: #fff; padding: 13px 20px; border-radius: 100px; font-size: 14px; transition: .25s; pointer-events: none; z-index: 50; max-width: calc(100vw - 32px); text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.bad { background: var(--red); }

footer { max-width: 1240px; margin: auto; padding: 30px 28px 40px; display: flex; gap: 20px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); }
.footer-brand { font-size: 22px; color: var(--ink); }
.powered { margin-left: auto; }

@media (max-width: 900px) {
  .hero, .loop-layout { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .steps { grid-template-columns: 1fr; margin-top: 36px; }
}
@media (max-width: 700px) {
  .wrap { padding: 0 16px; }
  .header { padding: 16px; flex-wrap: wrap; gap: 12px; }
  .brand { font-size: 26px; }
  .header-credit { display: none; }
  nav { order: 3; width: 100%; margin: 0; gap: 20px; overflow-x: auto; }
  .account { margin-left: auto; }
  .account .who { display: none; }
  .row { grid-template-columns: 1fr; }
  .wish-thumb { width: 72px; height: 72px; }
  .loop-hero { padding: 22px; border-radius: 24px; }
  .card { padding: 18px; }
  .beta-detail { display: none; }
  footer { padding: 24px 16px 32px; }
  .powered { margin-left: 0; }
  .table thead { display: none; }
  .table tr { display: grid; grid-template-columns: 1fr auto; }
  .table td { border-top: 0; padding: 4px 0; }
  .table tr { border-top: 1px solid var(--line); padding: 10px 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Product auto-fill status under the link field */
.lookup-status { font-size: 13px; line-height: 1.45; color: var(--muted); margin: -6px 0 14px; min-height: 0; overflow-wrap: anywhere; }
.lookup-status:empty { display: none; }
.lookup-status.ok { color: var(--green); }
.lookup-status.warn { color: #8a5a00; }
.lookup-status.busy { display: flex; align-items: center; gap: 8px; }
.spinner.small { width: 14px; height: 14px; border-width: 2px; margin: 0; flex: none; }

/* v1.5: product card, Revolut payment, fair split, WhatsApp */
.gift-card { display: flex; gap: 14px; align-items: center; margin-top: 14px; background: rgba(255, 255, 255, .7); border-radius: 18px; padding: 10px; }
.gift-card .wish-thumb { width: 72px; height: 72px; }
.pay-panel { background: var(--pale); border-radius: 18px; padding: 16px; margin: 0 0 16px; }
.pay-panel h3 { margin-bottom: 10px; }
.pay-help { font-size: 13px; margin: 8px 0 10px; }
.copy-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; padding: 6px 0; border-top: 1px solid rgba(48, 38, 61, .08); overflow-wrap: anywhere; }
.copy-row .text-button { padding: 4px 0; flex-shrink: 0; }
.fair-share { background: #fffbe6; border: 1px solid #f1e3a1; border-radius: 14px; padding: 10px 12px; font-size: 14px; margin: 0 0 14px; }
.quick-amounts { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.chip-button { border: 1px solid var(--line); background: #fff; border-radius: 100px; padding: 9px 16px; min-height: 40px; font-weight: 700; font-size: 14px; }
.chip-button:hover { border-color: var(--purple); }
.chip-button.suggested { background: var(--lime); border-color: var(--lime); }
.button.whatsapp { background: #1f7a4d; color: #fff; }
.button.whatsapp:hover { background: #17633e; }
.chip.paid { background: #fff1e9; color: #a64716; }

/* v1.6: gift history and bought marks */
.list .wish.taken .wish-name, .list .wish.taken .wish-price { opacity: .6; }
.list .wish.taken .wish-thumb { filter: grayscale(.6); opacity: .8; }

/* Wishlist v1.7: the list is the page. One link bar on top, details open on paste. */
.page-head .actions { flex-shrink: 0; }
.wish-banner { margin: 0 0 14px; }
.wish-banner .text-button { padding: 0; }
.quick-add { margin: 0 0 6px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.quick-add-bar { display: flex; gap: 10px; align-items: flex-end; }
.quick-add-bar .field { flex: 1; min-width: 0; margin-bottom: 0; }
.quick-add-bar .button { flex-shrink: 0; }
.quick-add .lookup-status { margin: 10px 0 0; }
.quick-add-extra { display: none; margin-top: 16px; }
.quick-add.open .quick-add-extra { display: block; }
.quick-add.open .quick-add-bar .button, .quick-add.open .quick-add-manual { display: none; }
.quick-add-manual { padding: 8px 0 0; color: var(--muted); }
.wish-heading { margin-top: 16px; }
.wish-got { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; }
.wish-got summary { cursor: pointer; font-weight: 800; font-size: 15px; padding: 6px 0; list-style-position: inside; }
.wish-got .list li:first-child { border-top: 0; }
.wish-empty { display: flex; gap: 14px; align-items: center; padding: 18px 0 4px; color: var(--purple); }
.wish-empty svg { width: 44px; height: 44px; flex-shrink: 0; }
.wish-empty p { margin: 0; color: var(--muted); font-size: 14px; }
.wish-empty strong { color: var(--ink); }
.wish-foot { font-size: 13px; margin: 12px 4px 0; }
@media (max-width: 700px) {
  .page-head .actions { width: 100%; }
  .page-head .actions .button { flex: 1; justify-content: center; }
}

/* ===== Cheerful design proposal ===== */
:root { --peach: #ffe3d3; --mint: #d9f3ea; --pink: #ffe1ea; --sun: #fff3b8; --shadow: 0 1px 0 rgba(48,38,61,.04), 0 12px 32px -14px rgba(103,68,220,.28); }
body {
  background:
    radial-gradient(circle at 6% 10%, rgba(229,242,143,.55), transparent 260px),
    radial-gradient(circle at 98% 6%, rgba(255,179,199,.40), transparent 300px),
    radial-gradient(circle at 94% 70%, rgba(103,68,220,.10), transparent 340px),
    radial-gradient(circle at 2% 82%, rgba(246,116,61,.12), transparent 300px),
    var(--paper);
  background-attachment: fixed;
}
/* Navigation: active page as a soft pill */
nav { gap: 6px; }
nav a { padding: 8px 14px; border-radius: 100px; transition: background .18s; }
nav a:hover { background: rgba(103,68,220,.07); }
nav a.active { background: var(--pale); color: var(--purple-dark); }
nav a.active::after { display: none; }

/* Page headings: a little icon badge and a hand-drawn underline */
.head-badge { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 18px; margin-bottom: 14px; transform: rotate(-6deg); box-shadow: var(--shadow); background-repeat: no-repeat; background-position: center; background-size: 30px; }
.head-badge.wish { background-color: var(--peach); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='4' y='10' width='16' height='10' rx='2' fill='%23f6743d'/%3E%3Crect x='3' y='7' width='18' height='4' rx='1.5' fill='%236744dc'/%3E%3Crect x='11' y='7' width='2' height='13' fill='%23fff'/%3E%3Cpath d='M12 7C9 2 5 4 7 6c1 1 3 1 5 1Zm0 0c3-5 7-3 5-1-1 1-3 1-5 1Z' fill='none' stroke='%236744dc' stroke-width='1.6'/%3E%3C/svg%3E"); }
.head-badge.loops { background-color: var(--sun); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 30'%3E%3Cpath d='M24 15C11-8-7 7 7 21c7 7 13-1 17-6C37-8 55 7 41 21c-7 7-13-1-17-6Z' fill='none' stroke='%23f6743d' stroke-width='6' stroke-linecap='round'/%3E%3C/svg%3E"); background-size: 34px; }
.head-badge.history { background-color: var(--mint); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-8-5-8-11a4.5 4.5 0 0 1 8-2.8A4.5 4.5 0 0 1 20 10c0 6-8 11-8 11Z' fill='%23f6743d'/%3E%3C/svg%3E"); }
.page-head h1 { position: relative; display: inline-block; isolation: isolate; }
.page-head h1::after { content: ''; position: absolute; z-index: -1; left: 2px; right: 30%; bottom: -6px; height: 12px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M2 8c30-6 60-6 90-2s70 4 106-3' fill='none' stroke='%23f6743d' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%; opacity: .85; }
.page-head p { margin-top: 10px; }

/* Cards: softer, lifted */
.card, .step { border-color: #ece6f6; box-shadow: var(--shadow); }
.button.primary { box-shadow: 0 8px 18px -8px rgba(103,68,220,.7); }
.button:hover:not(:disabled) { transform: translateY(-2px) rotate(-1deg); }

/* Wishlist: colourful picture tiles, price stickers, playful rows */
.wish-thumb { background: var(--pale); }
.wish-thumb img { inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); border-radius: 12px; }
.list .wish:nth-child(5n+2) .wish-thumb { background: var(--peach); color: var(--orange); }
.list .wish:nth-child(5n+3) .wish-thumb { background: var(--sun); color: #a07b00; }
.list .wish:nth-child(5n+4) .wish-thumb { background: var(--mint); color: var(--green); }
.list .wish:nth-child(5n+5) .wish-thumb { background: var(--pink); color: #b23a63; }
.list .wish { border-radius: 20px; padding: 14px 10px; margin: 0 -10px; border-top: 0; transition: background .18s; }
.list .wish:hover { background: #faf7ff; }
.list .wish .wish-thumb { transition: transform .25s; }
.list .wish:hover .wish-thumb { transform: rotate(-4deg) scale(1.04); }
.wish-price { display: inline-block; background: var(--lime); padding: 2px 10px; border-radius: 10px; font-size: 16px; transform: rotate(-2deg); }
.wish-heading { display: flex; align-items: center; gap: 8px; }
.wish-heading .hint { background: var(--pale); color: var(--purple); font-weight: 700; padding: 2px 9px; border-radius: 100px; font-size: 12px; }
.quick-add { background: linear-gradient(135deg, #f5f0ff, #fff4ec); margin: -22px -22px 6px; padding: 20px 22px 18px; border-radius: var(--radius) var(--radius) 0 0; border-bottom: 1px dashed #d9cff5; }
.quick-add-bar input { border-color: #d9cff5; }
.wish-empty svg { width: 64px; height: 64px; }

/* Loops: gift picture on every card, bolder progress */
.loop-card { padding: 0; overflow: hidden; gap: 0; }
.grid > .card + .card { margin-top: 0; }
.loop-card > *:not(.loop-art) { margin-left: 20px; margin-right: 20px; }
.loop-card > .chip-row { margin-top: 16px; }
.loop-card > h3 { margin-top: 10px; }
.loop-card > .meta:last-child { margin-bottom: 20px; margin-top: 4px; }
.loop-art { position: relative; height: 150px; display: grid; place-items: center; background: var(--pale); }
.grid > .loop-card:nth-child(4n+2) .loop-art { background: var(--peach); }
.grid > .loop-card:nth-child(4n+3) .loop-art { background: var(--mint); }
.grid > .loop-card:nth-child(4n+4) .loop-art { background: var(--sun); }
.loop-art .wish-thumb { width: 112px; height: 112px; background: transparent; transform: rotate(-4deg); transition: transform .3s; }
.loop-art .wish-thumb img { border-radius: 16px; box-shadow: 0 10px 24px -10px rgba(48,38,61,.35); }
.loop-card:hover .loop-art .wish-thumb { transform: rotate(3deg) scale(1.06); }
.loop-occasion { position: absolute; top: 12px; right: 12px; background: #fff; border-radius: 100px; font-size: 11px; font-weight: 700; padding: 5px 10px; box-shadow: var(--shadow); }
.progress { height: 12px; background: #efe9f7; }
.progress div { background: linear-gradient(90deg, var(--purple), #a35ad8 60%, var(--orange)); position: relative; }
.progress.full div { background: linear-gradient(90deg, #2f6b50, #57b07f); }
.progress-label .pct { font-weight: 800; color: var(--purple); }
.loop-hero { background: linear-gradient(140deg, var(--pale), #fff0e6); position: relative; overflow: hidden; }
.loop-hero::after { content: ''; position: absolute; right: -30px; top: -30px; width: 140px; height: 140px; border-radius: 50%; background: rgba(229,242,143,.7); }
.loop-hero > * { position: relative; z-index: 1; }

/* Empty states and landing */
.empty-art { width: 180px; margin: 0 auto 10px; }
.empty-art svg { width: 100%; }
.steps .step:nth-child(1) b { background: var(--lime); }
.steps .step:nth-child(2) b { background: var(--peach); }
.steps .step:nth-child(3) b { background: var(--mint); }
.steps .step:nth-child(2) { transform: rotate(.8deg); }
.steps .step:nth-child(3) { transform: rotate(-.8deg); }
.chip.open { box-shadow: inset 0 0 0 1px rgba(48,38,61,.08); }

/* Footer: a cheerful wave of colour */
footer { border-top: 0; position: relative; padding-top: 44px; }
footer::before { content: ''; position: absolute; left: 28px; right: 28px; top: 0; height: 14px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 14'%3E%3Cpath d='M0 7c10-8 20-8 30 0s20 8 30 0' fill='none' stroke='%236744dc' stroke-width='3'/%3E%3Cpath d='M60 7c10-8 20-8 30 0s20 8 30 0' fill='none' stroke='%23f6743d' stroke-width='3'/%3E%3C/svg%3E") repeat-x left center / 120px 14px; opacity: .55; }

/* Confetti */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.confetti i { position: absolute; top: -12px; left: var(--x); width: 9px; height: 13px; border-radius: 2px; animation: confetti-fall 2.2s cubic-bezier(.2,.6,.4,1) var(--d) forwards; opacity: 0; }
@keyframes confetti-fall { 0% { opacity: 1; transform: translateY(0) rotate(0); } 100% { opacity: 0; transform: translateY(85vh) rotate(var(--r)); } }

@media (max-width: 700px) {
  nav a { padding: 7px 12px; }
  .head-badge { width: 44px; height: 44px; border-radius: 14px; background-size: 24px; }
  .quick-add { margin: -18px -18px 6px; padding: 16px 18px; }
}
.loop-hero .gift-card .wish-thumb { width: 110px; height: 110px; transform: rotate(-3deg); background: var(--peach); }
@media (max-width: 700px) { .loop-hero .gift-card .wish-thumb { width: 84px; height: 84px; } }

/* v1.8: lists for someone else */
.list-card .list-art { height: 120px; }
.list-art span { display: grid; place-items: center; width: 74px; height: 74px; border-radius: 24px; background: var(--white); color: var(--purple); font-size: 36px; font-weight: 800; letter-spacing: -.04em; transform: rotate(-5deg); box-shadow: var(--shadow); transition: transform .3s; }
.list-card:hover .list-art span { transform: rotate(4deg) scale(1.06); }
.list-card > .meta strong { color: var(--ink); }
.list-hint { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; border: 2px dashed var(--line); background: transparent; box-shadow: none; }
.list-hint p { margin-bottom: 14px; }
.list-chips { margin-top: 10px; }
.chip.bought { background: var(--sun); color: #6b5200; }
/* v1.12: "Got it" on a list you manage is a real button, so it reads as tappable next to the Edit/Remove links. */
.button.got-it { background: var(--green-pale); color: var(--green); border: 1.5px solid var(--green); gap: 6px; margin-right: 6px; }
.button.got-it:hover:not(:disabled) { background: var(--green); color: #fff; }
.button.got-it:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.label-like { display: block; font-size: 13px; font-weight: 700; }
.danger-zone { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.danger-zone p { font-size: 13px; margin: 8px 0 0; }

/* v1.9: list photos, suggestions, treat ideas */
.list-photo { display: grid; place-items: center; width: 96px; height: 96px; margin-bottom: 14px; padding: 0; border-radius: 26px; overflow: hidden; background: var(--white); border: 4px solid var(--white); box-shadow: var(--shadow); transform: rotate(-5deg); transition: transform .25s; }
.list-photo { position: relative; }
.list-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 20px; display: block; }
button.list-photo:hover { transform: rotate(3deg) scale(1.04); }
.list-photo.add { border: 2px dashed var(--purple); background: var(--pale); color: var(--purple); font-size: 12px; font-weight: 700; gap: 2px; align-content: center; line-height: 1.2; text-align: center; }
.list-photo.add span { font-size: 24px; }
.photo-row { display: flex; gap: 14px; align-items: center; margin-top: 6px; }
.photo-preview { width: 76px; height: 76px; flex-shrink: 0; border-radius: 20px; overflow: hidden; background: var(--pale); display: grid; place-items: center; font-size: 28px; transform: rotate(-4deg); }
.photo-preview { position: relative; }
.photo-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-hint { margin: 8px 0 0; font-size: 12px; }
.suggest-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: -6px 0 6px; }
.chip-button.small { min-height: 34px; padding: 6px 12px; font-size: 13px; }
.chip-button[aria-pressed="true"] { background: var(--lime); border-color: var(--lime); }
.suggest-note { display: block; margin: 0 0 16px; font-size: 12px; color: var(--muted); }
.ideas { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 14px; }
.ideas .hint { margin-right: 4px; }
.list-art .has-photo { position: relative; padding: 0; overflow: hidden; border: 4px solid var(--white); }
.list-art .has-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
/* v1.9: character icons */
.list-photo.icon { background: transparent; border: 0; box-shadow: none; overflow: visible; }
.list-photo.icon svg, .photo-preview svg, .list-art .has-icon svg { width: 100%; height: 100%; display: block; }
.list-photo.icon svg { filter: drop-shadow(0 6px 14px rgba(48, 38, 61, .14)); }
.photo-preview:has(svg) { background: transparent; }
.icon-hint { margin: 14px 0 8px; font-size: 13px; }
.icon-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.icon-choice { display: grid; justify-items: center; gap: 4px; padding: 6px 2px 8px; border: 2px solid transparent; border-radius: 16px; background: none; font-size: 11px; font-weight: 700; line-height: 1.15; color: var(--ink); min-width: 0; }
.icon-choice svg { width: 100%; max-width: 64px; aspect-ratio: 1; transition: transform .2s; }
.icon-choice:hover svg { transform: rotate(-6deg) scale(1.06); }
.icon-choice[aria-pressed="true"] { border-color: var(--purple); background: var(--pale); }
.icon-choice span { text-align: center; hyphens: none; }
@media (max-width: 460px) { .icon-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; } }
.icon-clear { margin-top: 8px; }
.photo-field { margin-bottom: 22px; }
.list-art .has-icon { background: transparent; box-shadow: none; padding: 0; }
.list-art .has-icon svg { filter: drop-shadow(0 6px 12px rgba(48, 38, 61, .14)); }

/* v1.10: privacy notice and legal links */
.small-print { font-size: 13px; color: var(--muted); margin-top: 14px; }
.small-print a, .footer-link { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.footer-link:hover, .small-print a:hover { color: var(--ink); }
.legal { padding-bottom: 40px; }
.legal h1 { margin: 26px 0 6px; }
.legal h2 { font-size: 21px; margin: 34px 0 10px; }
.legal p, .legal li { line-height: 1.6; }
.legal ul { padding-left: 22px; }
.legal li + li { margin-top: 6px; }
.legal table { width: 100%; border-collapse: collapse; font-size: 14px; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.legal th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.legal .table-scroll { overflow-x: auto; }
.legal address { font-style: normal; line-height: 1.6; margin-bottom: 14px; }

/* v1.10: account page */
.account-link { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; border-radius: 999px; }
.account-link:hover .who, .account-link:focus-visible .who { text-decoration: underline; text-underline-offset: 3px; }
.account-who { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; overflow-wrap: anywhere; }
.avatar.big { width: 52px; height: 52px; font-size: 22px; }
.danger-zone h2 { font-size: 21px; margin: 0 0 10px; }
.danger-zone ul { padding-left: 22px; line-height: 1.55; }
.danger-zone li + li { margin-top: 6px; }
.sign-in-note { max-width: 46ch; line-height: 1.5; }
.sign-in-note b { font-weight: 600; overflow-wrap: anywhere; }
