/* Verlanglijst: rustig, warm papier, één accent. Signatuur: de prijs als cadeaulabel met een gaatje. */
@font-face {
  font-family: "Outfit";
  src: url("/fonts/outfit-var-latin.woff2") format("woff2");
  font-weight: 300 800;
  font-display: block;
}

:root {
  --bg: #f6f3ee;
  --surface: #ffffff;
  --sunk: #efebe4;
  --ink: #1c1b18;
  --muted: #6f6a60;
  --line: rgba(28, 27, 24, .12);
  --accent: #d9502b;
  --accent-ink: #ffffff;
  --accent-soft: #fbe9e2;
  --ok: #2f7a4d;
  --r: 18px;
  --r-sm: 12px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --w: 680px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scrollbar-gutter: stable; -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; min-height: 100dvh; background: var(--bg); color: var(--ink);
  font: 400 16px/1.5 "Outfit", system-ui, sans-serif; letter-spacing: 0;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }

.wrap { width: min(100% - 32px, var(--w)); margin-inline: auto; }

/* Kopbalk */
.top { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 18px; text-decoration: none; letter-spacing: -.01em; }
.logo svg { width: 26px; height: 26px; flex: none; }
.top-link { font-size: 15px; color: var(--muted); text-decoration: none; padding: 10px 4px; min-height: 44px; display: inline-flex; align-items: center; }
.top-link:hover { color: var(--ink); }

/* Knoppen: plat, geen til, alleen indrukken */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--ink); color: #fff; font-weight: 500; font-size: 16px; text-decoration: none;
  transition: background-color .15s var(--ease), transform .1s var(--ease);
}
.btn:hover { background: #34322d; }
.btn:active { transform: scale(.97); }
.btn.accent { background: var(--accent); color: var(--accent-ink); }
.btn.accent:hover { background: #c4451f; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--sunk); }
.btn.soft { background: var(--sunk); color: var(--ink); }
.btn.soft:hover { background: #e6e1d8; }
.btn.small { min-height: 40px; padding: 0 14px; font-size: 15px; }
.btn[disabled] { opacity: .5; cursor: default; }
.icon-btn {
  width: 44px; height: 44px; flex: none; display: inline-grid; place-items: center; border: 0; border-radius: 999px;
  background: transparent; color: var(--muted); cursor: pointer; transition: background-color .15s var(--ease), transform .1s var(--ease);
}
.icon-btn:hover { background: var(--sunk); color: var(--ink); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg, .btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Velden */
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; color: var(--muted); }
.field label span { color: var(--muted); opacity: .8; }
.input, .textarea {
  width: 100%; min-height: 48px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface); font-size: 16px; transition: border-color .15s var(--ease);
}
.input:hover, .textarea:hover { border-color: rgba(28, 27, 24, .24); }
.input:focus, .textarea:focus { outline: none; border-color: var(--ink); }
.textarea { min-height: 88px; resize: vertical; }

/* Startpagina */
.hero { padding: clamp(40px, 9vw, 96px) 0 32px; }
.hero h1 { font-size: clamp(36px, 7vw, 56px); line-height: 1.05; letter-spacing: -.025em; font-weight: 600; margin: 0 0 16px; }
.hero p { font-size: 19px; color: var(--muted); margin: 0 0 28px; max-width: 30em; }
.create { display: flex; gap: 8px; background: var(--surface); padding: 8px; border-radius: 999px; }
.create .input { border: 0; border-radius: 999px; min-height: 48px; }
.create .input:focus { box-shadow: none; }
.create .btn { flex: none; }
.hint { font-size: 14px; color: var(--muted); margin: 12px 0 0; }

.demo { margin: 40px 0 0; display: grid; gap: 10px; }
.section-title { font-size: 15px; font-weight: 500; color: var(--muted); margin: 48px 0 12px; }
.mine { display: grid; gap: 8px; padding: 0; margin: 0; list-style: none; }
.mine a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; padding: 12px 18px;
  background: var(--surface); border-radius: var(--r-sm); text-decoration: none; transition: background-color .15s var(--ease);
}
.mine a:hover { background: #fffdfa; }
.mine small { color: var(--muted); }
.foot { padding: 64px 0 40px; font-size: 14px; color: var(--muted); }

/* Lijstkop */
.list-head { padding: 24px 0 20px; display: flex; align-items: flex-start; gap: 12px; }
.list-title {
  flex: 1; min-width: 0; margin: 0; font-size: clamp(28px, 5vw, 38px); line-height: 1.1; letter-spacing: -.02em; font-weight: 600;
  border: 0; background: none; padding: 4px 0; width: 100%; border-radius: 8px;
}
input.list-title:hover { background: rgba(28, 27, 24, .04); }
input.list-title:focus { outline: none; background: var(--surface); padding-inline: 10px; }
.list-sub { color: var(--muted); margin: -12px 0 20px; font-size: 15px; }

/* Tabs: van anderen / koop ik zelf */
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--sunk); border-radius: 999px; margin-bottom: 16px; }
.tab {
  flex: 1; min-height: 44px; border: 0; border-radius: 999px; background: transparent; cursor: pointer; font-weight: 500;
  color: var(--muted); display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.tab[aria-selected="true"] { background: var(--surface); color: var(--ink); }
.tab .n { font-size: 13px; min-width: 22px; padding: 0 6px; border-radius: 999px; background: rgba(28, 27, 24, .07); line-height: 20px; }
.tab-note { font-size: 14px; color: var(--muted); margin: -4px 4px 16px; font-style: italic; }
.tab-note.flush { margin: 0; }

/* Plakbalk: het hart van de app */
.paste { display: flex; gap: 8px; align-items: center; background: var(--surface); padding: 6px 6px 6px 18px; border-radius: 999px; }
.paste svg.lead { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; }
.paste input { flex: 1; min-width: 0; border: 0; background: none; min-height: 48px; font-size: 16px; }
.paste input:focus { outline: none; }
.paste .add-btn svg { display: none; }
@media (max-width: 560px) { .paste .add-btn svg { display: block; width: 22px; height: 22px; stroke-width: 2.2; } }
.paste-msg { font-size: 14px; margin: 10px 18px 0; color: var(--muted); }
.paste-msg.err { color: #b23a17; }

/* Cadeaus */
.items { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.item {
  display: grid; grid-template-columns: 76px 1fr auto; gap: 14px; align-items: center;
  background: var(--surface); border-radius: var(--r); padding: 10px 10px 10px 10px;
}
.item.enter { animation: enter .32s var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateY(-6px); } }
.thumb {
  width: 76px; height: 76px; border-radius: var(--r-sm); background: #fff; overflow: hidden; display: grid; place-items: center;
  outline: 1px solid rgba(28, 27, 24, .06); outline-offset: -1px;
}
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.thumb.empty { background: var(--sunk); outline: 0; }
.thumb.empty svg { width: 28px; height: 28px; fill: none; stroke: #b3ab9d; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.item-main { min-width: 0; }
.item-title { margin: 0 0 6px; font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-title a { text-decoration: none; }
.item-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 14px; color: var(--muted); }
.note { font-size: 14px; color: var(--muted); margin: 6px 0 0; font-style: italic; }
.item-actions { display: flex; align-items: center; }

/* Signatuur: prijs als cadeaulabel */
.tag {
  position: relative; display: inline-flex; align-items: center; height: 26px; padding: 0 10px 0 20px;
  background: var(--accent-soft); color: #8f2f12; font-weight: 600; font-size: 14px;
  border-radius: 6px 13px 13px 6px; font-variant-numeric: tabular-nums;
}
.tag::before {
  content: ""; position: absolute; left: 8px; top: 50%; width: 6px; height: 6px; margin-top: -3px;
  border-radius: 50%; background: var(--surface);
}
.tag.none { background: var(--sunk); color: var(--muted); font-weight: 500; }

/* Zelf gekocht */
.check {
  width: 44px; height: 44px; flex: none; display: inline-grid; place-items: center; border: 0; background: none; cursor: pointer; border-radius: 999px;
}
.check span {
  width: 24px; height: 24px; border-radius: 50%; border: 1.8px solid rgba(28, 27, 24, .3); display: grid; place-items: center;
  transition: background-color .2s var(--ease), border-color .2s var(--ease);
}
.check svg { width: 14px; height: 14px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transition: opacity .15s; }
.check[aria-pressed="true"] span { background: var(--ok); border-color: var(--ok); }
.check[aria-pressed="true"] svg { opacity: 1; }
.item.done .item-title, .item.done .thumb { opacity: .45; }
.item.done .item-title { text-decoration: line-through; }

/* Laden */
.item.loading .thumb, .item.loading .sk { background: linear-gradient(90deg, var(--sunk), #f7f4ef, var(--sunk)); background-size: 200% 100%; animation: sk 1.1s linear infinite; }
.sk { height: 12px; border-radius: 6px; margin: 6px 0; }
@keyframes sk { to { background-position: -200% 0; } }

.empty-state { text-align: center; padding: 44px 16px; color: var(--muted); }
.empty-state svg { width: 40px; height: 40px; margin: 0 auto 12px; fill: none; stroke: #b3ab9d; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }

/* Gast */
.claim-btn { min-height: 40px; }
.item.claimed { background: transparent; outline: 1px dashed var(--line); outline-offset: -1px; }
.item.claimed .thumb, .item.claimed .item-title { opacity: .5; }
.badge { font-size: 13px; color: var(--muted); }
.badge.mine { color: var(--ok); font-weight: 500; }
.linkish { border: 0; background: none; padding: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 13px; min-height: 32px; }

/* Dialogen: korte micro-animatie */
dialog {
  width: min(100% - 24px, 460px); border: 0; padding: 0; border-radius: 22px; background: var(--surface); color: var(--ink);
  opacity: 1; transform: none;
  transition: opacity .2s var(--ease), transform .2s var(--ease), overlay .2s allow-discrete, display .2s allow-discrete;
}
dialog:not([open]) { opacity: 0; transform: translateY(8px) scale(.98); }
@starting-style { dialog[open] { opacity: 0; transform: translateY(8px) scale(.98); } }
dialog::backdrop { background: rgba(28, 27, 24, .35); transition: background-color .2s, overlay .2s allow-discrete, display .2s allow-discrete; }
@starting-style { dialog[open]::backdrop { background: rgba(28, 27, 24, 0); } }
.dlg { padding: 22px; display: grid; gap: 16px; }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dlg-head h2 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.dlg-actions { display: flex; gap: 8px; justify-content: space-between; align-items: center; padding-top: 4px; }
.dlg-actions .right { display: flex; gap: 8px; margin-left: auto; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Keuzepillen (geen dropdown) */
.pills { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.pills legend { font-size: 14px; color: var(--muted); padding: 0; margin-bottom: 6px; }
.pills .opts { display: flex; gap: 6px; flex-wrap: wrap; }
.pills input { position: absolute; opacity: 0; pointer-events: none; }
.pills label {
  min-height: 40px; padding: 0 16px; border-radius: 999px; background: var(--sunk); display: inline-flex; align-items: center; cursor: pointer;
  font-size: 15px; transition: background-color .15s var(--ease), color .15s var(--ease);
}
.pills input:checked + label { background: var(--ink); color: #fff; }
.pills input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; cursor: pointer; }
.switch small { display: block; color: var(--muted); font-size: 13px; }
.switch input { appearance: none; width: 44px; height: 26px; border-radius: 999px; background: rgba(28, 27, 24, .18); position: relative; flex: none; cursor: pointer; transition: background-color .2s var(--ease); }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); }
.switch input:checked { background: var(--ok); }
.switch input:checked::after { transform: translateX(18px); }

.share-link { display: flex; gap: 8px; }
.share-link .input { font-size: 15px; color: var(--muted); }
.share-row { display: flex; gap: 8px; flex-wrap: wrap; }
.share-row .btn { flex: 1; }
.private { font-size: 14px; color: var(--muted); background: var(--sunk); border-radius: var(--r-sm); padding: 12px 14px; margin: 0; }

/* Menu bij een cadeau */
.menu { position: relative; }
.menu-pop {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 5; min-width: 210px; padding: 6px; background: var(--surface);
  border-radius: 14px; box-shadow: 0 10px 30px rgba(28, 27, 24, .12), 0 0 0 1px rgba(28, 27, 24, .06);
  opacity: 0; transform: translateY(-4px); visibility: hidden;
  transition: opacity .16s var(--ease), transform .16s var(--ease), visibility 0s linear .16s;
}
.menu.open .menu-pop { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
.menu-pop button {
  display: flex; width: 100%; align-items: center; gap: 10px; min-height: 40px; padding: 0 12px; border: 0; border-radius: 9px;
  background: none; cursor: pointer; text-align: left; font-size: 15px;
}
.menu-pop button:hover { background: var(--sunk); }
.menu-pop button.danger { color: #b23a17; }
.menu-pop svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 12px); opacity: 0; z-index: 20;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px; font-size: 15px; pointer-events: none;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 560px) {
  .item { grid-template-columns: 64px 1fr auto; gap: 12px; padding: 8px; }
  .thumb { width: 64px; height: 64px; }
  .create { flex-direction: column; border-radius: 22px; }
  .create .btn { width: 100%; }
  .paste { padding-left: 14px; }
  .paste .add-btn { width: 48px; padding: 0; }
  .paste .add-btn span { display: none; }
  .row2 { grid-template-columns: 1fr; }
  .guest-actions { flex-direction: column; align-items: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.sk.short { width: 40%; }

/* Account: rond icoon rechtsboven, popup met korte micro-animatie (geen til, geen gloed) */
.top-right { display: flex; align-items: center; gap: 4px; }
.acct { position: relative; }
.acct-btn {
  width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; padding: 0; cursor: pointer;
  display: grid; place-items: center; transition: background-color .15s var(--ease), transform .1s var(--ease);
}
.acct-btn:hover { background: var(--sunk); }
.acct-btn:active { transform: scale(.96); }
.avatar { width: 34px; height: 34px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--surface); color: var(--ink); font-weight: 600; font-size: 15px; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.acct-pop {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 10; width: min(340px, calc(100vw - 32px));
  background: var(--surface); border-radius: 18px; padding: 18px; display: grid; gap: 12px;
  box-shadow: 0 12px 36px rgba(28, 27, 24, .14), 0 0 0 1px rgba(28, 27, 24, .05);
  opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: top right; visibility: hidden;
  transition: opacity .18s var(--ease), transform .18s var(--ease), visibility 0s linear .18s;
}
.acct.open .acct-pop { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
.acct-h { margin: 0; font-weight: 600; font-size: 17px; }
.acct-sub { margin: -8px 0 0; color: var(--muted); font-size: 14px; }
.google-btn { background: var(--surface); color: var(--ink); outline: 1px solid var(--line); outline-offset: -1px; width: 100%; }
.google-btn:hover { background: var(--sunk); }
.google-btn svg { width: 18px; height: 18px; }
.acct-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.acct-or::before, .acct-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.acct-mail { display: grid; gap: 8px; }
.acct-mail .btn { width: 100%; }
.acct-msg { margin: 0; font-size: 14px; color: var(--muted); }
.acct-msg.ok { color: var(--ok); }
.acct-msg.err { color: #b23a17; }
.acct-who { display: flex; align-items: center; gap: 12px; }
.acct-who b { display: block; font-weight: 600; }
.acct-who small { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.acct-row { display: flex; gap: 8px; }
.acct-row .btn { flex: 1; }

/* Keuzelijst (custom, geen native select): pil + zwevend paneel, vinkje bij de keuze, fade + 4px */
.dd { position: relative; display: inline-block; }
.dd-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; max-width: 100%; padding: 0 12px 0 16px; border: 0;
  border-radius: 999px; background: var(--sunk); color: var(--ink); font-size: 15px; font-weight: 500; cursor: pointer;
  transition: background-color .15s var(--ease), transform .1s var(--ease);
}
.dd-btn:hover { background: #e6e1d8; }
.dd-btn:active { transform: scale(.97); }
.dd-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.dd-chev { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .18s var(--ease); }
.dd.open .dd-chev { transform: rotate(180deg); }
.dd-pop {
  position: absolute; left: 0; top: calc(100% + 6px); z-index: 20; min-width: 220px; max-width: min(320px, calc(100vw - 48px));
  max-height: 280px; overflow-y: auto; margin: 0; padding: 6px; list-style: none; background: var(--surface); border-radius: 14px;
  box-shadow: 0 10px 30px rgba(28, 27, 24, .14), 0 0 0 1px rgba(28, 27, 24, .05); outline: none;
  opacity: 0; transform: translateY(-4px); visibility: hidden;
  transition: opacity .16s var(--ease), transform .16s var(--ease), visibility 0s linear .16s;
}
.dd.open .dd-pop { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
.dd-pop li {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 36px; padding: 0 10px;
  border-radius: 9px; cursor: pointer; font-size: 15px;
}
.dd-pop li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-pop li.active { background: var(--sunk); }
.dd-tick { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--ok); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.target-row { display: flex; align-items: center; gap: 10px; margin: 10px 4px 0; color: var(--muted); font-size: 14px; }
.field-label { font-size: 14px; color: var(--muted); }
#e-list-row .dd-pop { position: absolute; }
dialog { overflow: visible; }
