/* Fitchecker, een app van Zonde.
   Strak als een modeblad, op crème papier, met een Pinterest-gevoel. */
:root {
  --paper: #f3efe6;
  --card: #fbf9f4;
  --ink: #1a1a1a;
  --muted: #6b665c;
  --line: #d9d2c3;
  --soft: #e8e2d5;
  --danger: #a33a2c;
  --serif: "DM Serif Display", Georgia, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --tabbar-h: 62px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--paper); }
body {
  margin: 0 auto;
  max-width: 560px;
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
  background: var(--paper);
  color: var(--ink);
  padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 28px);
}
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; }
h2 { font-size: 1.15rem; font-weight: 600; }
.serif { font-family: var(--serif); font-weight: 400; font-size: 1.9rem; letter-spacing: -.01em; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.row { display: flex; gap: 8px; }
.row > .btn { flex: 1; }

/* ---------- Kop en navigatie ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: var(--paper);
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 10px;
}
.brand { display: block; font-size: .68rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.brand-row { display: flex; align-items: center; gap: 7px; }
.brand-icon { width: 20px; height: 20px; border-radius: 6px; }
.zonde { margin-left: auto; font-size: .72rem; color: var(--muted); }
.topbar h1 { font-family: var(--serif); font-size: 2.3rem; line-height: 1.05; letter-spacing: -.01em; margin-top: 6px; }
main { padding: 0 16px; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  max-width: 560px; margin: 0 auto;
  display: flex;
  height: calc(var(--tabbar-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: var(--paper);
  border-top: 1px solid var(--line);
}
.tabbar button {
  flex: 1; border: 0; background: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: .7rem; letter-spacing: .04em; color: var(--muted);
}
.tabbar svg { width: 23px; height: 23px; }
.tabbar button.on { color: var(--ink); font-weight: 600; }

.fab {
  position: fixed; z-index: 15;
  right: max(16px, calc(50% - 280px + 16px));
  bottom: calc(var(--tabbar-h) + var(--safe-b) + 16px);
  width: 56px; height: 56px; border-radius: 50%;
  border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: var(--ink); color: var(--paper);
  box-shadow: 0 6px 18px rgba(26, 26, 26, .25);
}

.warning {
  margin: 0 16px 12px; padding: 10px 12px; border-radius: 12px;
  background: #f6dfc4; color: #6b4310; font-size: .9rem;
}

/* ---------- Knoppen en chips ---------- */
.btn {
  display: block; width: 100%;
  min-height: 48px; padding: 11px 18px;
  border: 1px solid var(--ink); border-radius: 999px;
  background: transparent; cursor: pointer; font-weight: 500;
}
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.danger { color: var(--danger); border-color: var(--danger); }
.btn.ghost { border-color: transparent; color: var(--muted); }
.btn.small { width: auto; min-height: 36px; padding: 6px 14px; font-size: .85rem; }
.btn:disabled { opacity: .35; cursor: default; }
.link { border: 0; background: none; padding: 6px 0; cursor: pointer; font-size: .85rem; text-decoration: underline; text-underline-offset: 3px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips.scroll-x { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 14px; padding: 0 16px; scrollbar-width: none; }
.chips.scroll-x::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  min-height: 36px; padding: 6px 14px;
  border: 1px solid var(--line); border-radius: 999px;
  background: transparent; cursor: pointer; font-size: .88rem; white-space: nowrap;
}
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip.add { border-style: dashed; color: var(--muted); margin-top: 10px; }

.label { font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; margin: 22px 0 8px; }
.label .req { color: var(--danger); margin-left: 4px; }
.label .muted { font-weight: 400; letter-spacing: 0; text-transform: none; font-size: .8rem; }

input[type=text] {
  width: 100%; min-height: 48px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); color: var(--ink); font: inherit; font-size: 16px; /* 16px voorkomt inzoomen op iPhone */
}

/* ---------- Kast: Pinterest-raster ---------- */
.subhead { display: flex; align-items: center; justify-content: space-between; min-height: 30px; margin-bottom: 8px; }
.wash-bar { display: flex; gap: 14px; }

.pic { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; background: var(--soft); }
.pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.swatch { width: 55%; aspect-ratio: 1; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }

.empty { text-align: left; padding: 30px 0; }
.empty h2 { margin-bottom: 8px; }
.empty p { margin: 0 0 20px; }
.empty .btn { margin-top: 8px; }

/* ---------- Sheets (schuiven van onderen omhoog) ---------- */
dialog.sheet {
  position: fixed; inset: auto 0 0 0;
  width: 100%; max-width: 560px; max-height: 92vh; max-height: 92dvh;
  margin: 0 auto; padding: 0; border: 0;
  border-radius: 24px 24px 0 0;
  background: var(--paper); color: var(--ink);
  display: none; flex-direction: column;
}
dialog.sheet:focus { outline: none; }
dialog.sheet[open] { display: flex; animation: up .22s ease-out; }
dialog.sheet::backdrop { background: rgba(26, 26, 26, .45); }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
/* Greep: een brede strook bovenaan om aan te slepen; het streepje is alleen de zichtbare hint. */
.sheet-handle {
  flex: none; width: 100%; height: 30px; cursor: grab;
  touch-action: none; display: flex; align-items: center; justify-content: center;
}
.sheet-handle::before { content: ""; width: 44px; height: 5px; border-radius: 3px; background: var(--line); }
.sheet-handle:active::before { background: var(--muted); }
/* flex-basis "auto" (niet 0): Safari op de iPhone liet het scherm anders inklappen tot een strookje. */
.sheet-body { overflow-y: auto; padding: 14px 16px 22px; flex: 1 1 auto; min-height: 0; -webkit-overflow-scrolling: touch; }
/* Het toevoegformulier is lang: altijd (bijna) schermvullend, zodat het niet verspringt. */
dialog#item-form { height: 92vh; height: 92dvh; }
.sheet-footer { flex: none; padding: 10px 16px calc(12px + var(--safe-b)); border-top: 1px solid var(--line); }
.sheet-footer .hint { margin: 0 0 8px; font-size: .82rem; color: var(--danger); text-align: center; }

.photo-area {
  display: block; width: 100%; aspect-ratio: 4 / 3; margin-top: 14px; padding: 0;
  border: 1px dashed var(--muted); border-radius: 16px;
  background: var(--soft); overflow: hidden; cursor: pointer; position: relative;
}
.photo-area { max-height: 34vh; }
.photo-area.compact { aspect-ratio: auto; height: 72px; }
.photo-area.compact .photo-empty { flex-direction: row; }
.photo-area img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* Keuze: met of zonder foto */
.choice-list { display: grid; gap: 10px; margin-top: 16px; }
.choice {
  text-align: left; padding: 18px 16px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 18px; background: var(--card);
  transition: transform .12s ease;
}
.choice:active { transform: scale(.98); }
.choice strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.45rem; margin-bottom: 4px; }
.choice span { color: var(--muted); font-size: .88rem; }
#choice-photos { background: var(--ink); color: var(--paper); border-color: var(--ink); }
#choice-photos span { color: var(--soft); }
.photo-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; height: 100%; color: var(--muted); font-size: .9rem; }
.photo-change { position: absolute; right: 10px; bottom: 10px; background: var(--ink); color: var(--paper); padding: 6px 12px; border-radius: 999px; font-size: .78rem; }
.tip { margin: 8px 2px 0; font-size: .8rem; color: var(--muted); }

.cat-group { margin-bottom: 12px; }
.cat-group p { margin: 0 0 6px; font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }

.colors { display: flex; flex-wrap: wrap; gap: 10px; }
.color { width: 36px; height: 36px; border-radius: 50%; padding: 0; cursor: pointer; border: 1px solid rgba(0,0,0,.12); }
.color.on { outline: 2px solid var(--ink); outline-offset: 3px; }

/* Detail */
.detail-pic { border-radius: 16px; overflow: hidden; margin: 10px 0 16px; }
.detail-pic .pic { aspect-ratio: 4 / 3; }
.detail-pic .pic img { object-fit: contain; }
.detail-pic img { width: 100%; max-height: 50vh; object-fit: contain; display: block; background: var(--soft); }
.detail-pic .swatch { width: 120px; margin: 30px auto; }
#detail-body h2 { font-family: var(--serif); font-weight: 400; font-size: 1.8rem; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 14px 0 22px; font-size: .92rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; display: flex; align-items: center; gap: 6px; }
.dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.actions { display: grid; gap: 8px; }

/* ---------- Categorie-editor ---------- */
.slot-options { display: grid; gap: 8px; margin-bottom: 20px; }
.slot-option {
  text-align: left; padding: 12px 14px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 14px; background: transparent;
}
.slot-option span { display: block; color: var(--muted); font-size: .84rem; margin-top: 2px; }
.slot-option.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }

/* ---------- Looks ---------- */
.controls .label:first-child { margin-top: 4px; }
.looks-empty { margin: 24px 0 8px; color: var(--muted); }
.looks {
  display: flex; gap: 12px; align-items: flex-start;
  overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory;
  margin: 18px -16px 0; padding: 0 16px;
  scroll-padding-inline: 16px; scrollbar-width: none;
  transition: height .3s cubic-bezier(.2,.7,.2,1);
}
.looks::-webkit-scrollbar { display: none; }
.look {
  flex: 0 0 88%; scroll-snap-align: start;
  scroll-snap-stop: always; /* één look per veeg, ook bij een snelle veeg */
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  padding: 14px 14px 12px;
}
.look:only-child { flex-basis: 100%; }
.look-meta { display: flex; justify-content: space-between; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.look-title { font-family: var(--serif); font-size: 3rem; line-height: 1; text-align: center; text-transform: uppercase; margin: 12px 0 4px; }
.look-why { text-align: center; font-size: .84rem; color: var(--muted); margin: 0 0 12px; min-height: 2.4em; }
.look-body { display: grid; grid-template-columns: 112px 1fr; border-top: 1px solid var(--line); }
.look-items { list-style: none; margin: 0; padding: 0; border-right: 1px solid var(--line); }
.look-item { position: relative; display: flex; flex-direction: column; align-items: center; padding: 8px 6px 8px 22px; border-bottom: 1px solid var(--line); }
.look-item:last-child { border-bottom: 0; }
.look-item .nr { position: absolute; left: 0; top: 0; width: 16px; padding: 3px 0; background: var(--ink); color: var(--paper); font-size: .66rem; text-align: center; }
.look-item.optional .nr { background: var(--muted); }
.look-pic { width: 76px; aspect-ratio: 1; border-radius: 10px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.look-pic img { width: 100%; height: 100%; object-fit: cover; display: block; background: var(--soft); }
.look-pic { background: var(--soft); }
.look-pic .swatch { width: 62%; }
.look-label { font-size: .68rem; color: var(--muted); margin-top: 4px; text-align: center; line-height: 1.2; }
.swap {
  position: absolute; right: 6px; bottom: 26px;
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--card);
  background: var(--ink); color: var(--paper); font-size: 1rem; line-height: 1; cursor: pointer; padding: 0;
}
.look-figure { display: flex; align-items: center; justify-content: center; padding: 10px 4px; }
.figure { width: 100%; max-width: 150px; height: auto; filter: drop-shadow(0 0 .6px rgba(26,26,26,.45)) drop-shadow(0 4px 10px rgba(26,26,26,.12)); }

.dots { display: flex; justify-content: center; gap: 5px; margin: 14px 0 4px; min-height: 3px; }
.dots span { width: 8px; height: 3px; border-radius: 2px; background: var(--line); transition: width .2s, background .2s; }
.dots span.on { width: 18px; background: var(--ink); }
.look-actions { margin: 14px 0 8px; }
#gen-btn { margin-top: 8px; }

.swap-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0; }
.swap-option { border: 0; background: none; padding: 0; cursor: pointer; text-align: left; }
.swap-option .pic { border-radius: 12px; overflow: hidden; }
.swap-option span { display: block; font-size: .75rem; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Situatie-kiezer ---------- */
.planner { display: grid; gap: 26px; margin-top: 10px; }
.q { font-family: var(--serif); font-size: 1.55rem; line-height: 1.15; margin: 0 0 12px; }
.day-options { display: grid; gap: 8px; }
.day-option {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  width: 100%; padding: 16px 16px; cursor: pointer; text-align: left;
  border: 1px solid var(--line); border-radius: 16px; background: var(--card);
}
.day-option strong { font-weight: 600; }
.day-option span { color: var(--muted); font-size: .82rem; }
.day-option.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.day-option.on span { color: var(--soft); }
.detail-row { margin-bottom: 18px; }
.detail-row .label { display: block; margin: 0 0 8px; }
.time-range { display: flex; align-items: center; gap: 10px; }
.time-range span { color: var(--muted); font-size: .9rem; }
input[type=time] {
  flex: 1; min-height: 46px; padding: 8px 12px; min-width: 0;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); color: var(--ink); font: inherit; font-size: 16px;
}
.search-hint { margin: 6px 2px 0; font-size: .8rem; color: var(--ink); min-height: 1.2em; }
.search-hint .faded { color: var(--muted); }
.manual-reason { margin: 0 0 8px; font-size: .88rem; color: var(--danger); }
.plan-summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; font-size: .85rem;
}
.look-actions { display: grid; gap: 8px; }

/* Kleur in het formulier */
.color-summary { display: flex; flex-wrap: wrap; gap: 6px 14px; min-height: 24px; }
.color-tag { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; }
#f-color-fix { margin: 4px 0 8px; }
.facts dd.wrap { flex-wrap: wrap; }

/* Schuifje */
.slider { width: 100%; accent-color: var(--ink); margin: 8px 0 2px; }
.slider-ends { display: flex; justify-content: space-between; font-size: .75rem; color: var(--muted); }
.settings-block { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.settings-block .label { margin-top: 6px; }
#tab-instellingen h2.first { margin-top: 4px; }

/* ---------- Welkom ---------- */
dialog.welcome {
  position: fixed; inset: 0; width: 100%; max-width: 560px; height: 100vh; height: 100dvh; max-height: none;
  margin: 0 auto; padding: calc(env(safe-area-inset-top, 0px) + 48px) 24px calc(var(--safe-b) + 28px);
  border: 0; background: var(--paper); color: var(--ink);
  display: none; flex-direction: column;
}
dialog.welcome[open] { display: flex; }
dialog.welcome::backdrop { background: var(--paper); }
.w-step { flex: 1; display: flex; flex-direction: column; gap: 14px; }
.w-step .btn:first-of-type { margin-top: auto; }
.w-title { font-family: var(--serif); font-size: 2.6rem; line-height: 1.02; letter-spacing: -.01em; }
.w-step p { margin: 0; color: var(--muted); font-size: 1rem; }
.w-step p.w-value { color: var(--ink); font-weight: 600; text-align: center; }
.w-dots { display: flex; justify-content: center; gap: 6px; margin-top: 18px; }
.w-dots span { width: 8px; height: 3px; border-radius: 2px; background: var(--line); }
.w-dots span.on { width: 18px; background: var(--ink); }

/* ---------- Kast: prikbord met polaroids ---------- */
:root {
  --hand: Caveat, "Segoe Print", "Bradley Hand", cursive;
  /* Kurk: nagemaakte korrel (twee lagen ruis). Een echte kurkfoto kan hier later in:
     --cork-photo: url("img/kurk.jpg"); */
  --cork-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .32 0 0 0 0 .2 0 0 0 0 .09 0 0 0 1.6 -.72'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --cork-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='2' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .96 0 0 0 0 .86 0 0 0 0 .66 0 0 0 1.4 -.78'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.corkboard {
  position: relative; margin: 0 -6px;
  padding: 13px;                                   /* houten lijst */
  border-radius: 4px;
  background:
    url("../img/hout-boven.jpg") top left / auto 13px repeat-x,
    url("../img/hout-onder.jpg") bottom left / auto 13px repeat-x,
    url("../img/hout-links.jpg") top left / 13px auto repeat-y,
    url("../img/hout-rechts.jpg") top right / 13px auto repeat-y,
    #b58955;
  box-shadow: 0 12px 26px rgba(60, 40, 20, .3);
}
.pol-grid {
  /* minmax(0, 1fr): een lang onderschrift ("wit t-shirt · 18 wk") mag de kolom niet breder maken dan het scherm */
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; align-items: start;
  padding: 28px 14px 36px; min-height: 220px;
  /* Kurk uit je eigen ontwerp, naadloos herhalend (292px = halve tegel, scherp op de iPhone) */
  background: #c9a074 url("../img/kurk.jpg") 0 0 / 292px auto repeat;
  box-shadow: inset 0 0 22px rgba(70, 45, 20, .45), inset 0 2px 4px rgba(40, 25, 10, .4);
}
.polaroid {
  position: relative; display: block; width: 100%; padding: 8px 8px 0; border: 0; cursor: pointer; text-align: center;
  background: #f8f5ec linear-gradient(170deg, rgba(255,255,255,.6), rgba(214,204,182,.25)); border-radius: 2px;
  transform: translateY(var(--dy)) rotate(var(--r));
  box-shadow: 0 1px 1px rgba(0,0,0,.12), 0 6px 12px rgba(40, 25, 10, .28);
  /* Vergeten stukken vergelen: --age loopt van 0 tot ~0.65 */
  filter: sepia(var(--age)) saturate(calc(1 - var(--age) * .45)) brightness(calc(1 - var(--age) * .06));
  transition: transform .22s cubic-bezier(.2,.7,.2,1), box-shadow .22s;
  animation: pinIn .45s cubic-bezier(.2,.7,.2,1) both;
}
.pol-img { aspect-ratio: 1; overflow: hidden; background: #ddd6c8; }
.pol-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pol-color { width: 100%; height: 100%; box-shadow: inset 0 0 18px rgba(0,0,0,.12); }
.pol-cap {
  display: block; padding: 9px 2px 14px; font-family: var(--hand); font-size: 1.22rem; font-weight: 600; line-height: 1.1; text-transform: lowercase;
  color: #2a2a2a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* Punaise: een bolletje met glans en schaduw op het papier */
.pushpin {
  position: absolute; top: -6px; left: var(--px); z-index: 2;
  width: 20px; height: 20px; margin-left: -10px; border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, color-mix(in srgb, var(--pin), #fff 45%) 0 12%, var(--pin) 45%, color-mix(in srgb, var(--pin), #000 30%) 92%, color-mix(in srgb, var(--pin), #000 50%) 100%);
  box-shadow: 2px 4px 3px rgba(0,0,0,.35), inset 0 0 0 1px rgba(0,0,0,.12);
}
/* Aantikken: los van het bord, recht, iets groter */
.polaroid.lifted { transform: translateY(-6px) rotate(0deg) scale(1.06); box-shadow: 0 18px 30px rgba(40, 25, 10, .35); z-index: 3; }
.polaroid.lifted .pushpin { opacity: 0; transition: opacity .1s; }
/* In de was: sticker erop en wat grijzer */
.polaroid.washing .pol-img { filter: grayscale(.8) opacity(.6); }
.pol-sticker {
  position: absolute; top: 38%; left: 50%; transform: translate(-50%, -50%) rotate(-8deg);
  background: #f4e27a; color: #3b3300; font-family: var(--hand); font-size: 1.1rem; font-weight: 600;
  padding: 2px 10px; box-shadow: 0 2px 4px rgba(0,0,0,.2);
}
/* Net toegevoegd: de foto "ontwikkelt" zich, zoals een echte polaroid */
.polaroid.developing .pol-img > * { animation: develop 2.4s ease-out both; }
@keyframes develop {
  0% { filter: brightness(2.2) saturate(0) contrast(.6); opacity: .25; }
  60% { filter: brightness(1.2) saturate(.5); opacity: .9; }
  100% { filter: none; opacity: 1; }
}

/* Waarom deze look: kleurstalen zoals in een verfwaaier, quote en korte uitleg */
.why-more { margin: 34px 0 10px; padding-top: 22px; border-top: 1px solid var(--line); }
.why-more.fade { animation: stepIn .4s cubic-bezier(.2,.7,.2,1) both; }
.why-kicker { margin: 0; font-size: .7rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.why-quote { margin: 10px 0 22px; font-family: var(--serif); font-size: 1.75rem; line-height: 1.15; }
.chips-palette { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 24px; }
.chip-card { background: #fff; padding: 5px 5px 8px; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 6px 14px rgba(40,25,10,.08); border-radius: 3px; }
.chip-color { aspect-ratio: 3 / 4; border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.chip-name { display: block; margin-top: 6px; font-size: .74rem; font-weight: 600; }
.chip-pct { display: block; font-size: .7rem; color: var(--muted); }
.why-reasons { display: grid; gap: 14px; }
.why-reason { display: grid; grid-template-columns: 86px 1fr; gap: 10px; align-items: baseline; }
.why-label { font-size: .68rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.why-reason p { margin: 0; font-size: .92rem; line-height: 1.45; }

/* Jas-advies bovenaan een look */
.coat {
  display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap;
  margin: -4px auto 12px; padding: 5px 12px; width: fit-content; max-width: 100%;
  border-radius: 999px; font-size: .8rem;
}
.coat strong { font-weight: 600; }
.coat span { color: inherit; opacity: .75; }
.coat-ja { background: var(--ink); color: var(--paper); }
.coat-handig { background: var(--soft); color: var(--ink); }
.coat-nee { border: 1px solid var(--line); color: var(--muted); }

/* ---------- Achterkant en omdraaien ---------- */
.back-row { display: flex; gap: 12px; align-items: center; margin-top: 10px; }
.back-area {
  position: relative; flex: none; width: 84px; height: 84px; padding: 0; overflow: hidden; cursor: pointer;
  border: 1px dashed var(--muted); border-radius: 12px; background: var(--soft);
}
.back-area img { width: 100%; height: 100%; object-fit: cover; display: block; }
.back-empty { font-size: .78rem; line-height: 1.25; }
.back-label { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(26,26,26,.6); color: #fff; font-size: .65rem; padding: 2px 0; }
.back-remove { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: var(--paper); font-size: .85rem; line-height: 20px; }
.back-hint { margin: 0; font-size: .78rem; color: var(--muted); }
.pol-flip { position: absolute; right: 8px; bottom: 8px; font-size: .9rem; color: #8a8170; }

.flip-wrap { perspective: 1200px; margin: 14px auto 6px; width: min(78%, 300px); }
.flip-card { position: relative; transform-style: preserve-3d; -webkit-transform-style: preserve-3d; transition: transform .6s cubic-bezier(.2,.7,.2,1); cursor: pointer; }
.flip-card.flipped { transform: rotateY(180deg); }
.flip-face {
  padding: 10px 10px 0; text-align: center;
  background: #f8f5ec linear-gradient(170deg, rgba(255,255,255,.6), rgba(214,204,182,.25));
  box-shadow: 0 2px 2px rgba(0,0,0,.1), 0 14px 28px rgba(40,25,10,.25);
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.flip-face.back { position: absolute; inset: 0; transform: rotateY(180deg); }
.flip-face .pol-cap { font-size: 1.4rem; }
.no-back { display: flex; height: 100%; align-items: center; justify-content: center; text-align: center; padding: 12px; font-family: var(--hand); font-size: 1.15rem; color: rgba(255,255,255,.92); text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.flip-hint { text-align: center; font-size: .78rem; color: var(--muted); margin: 0 0 6px; }

.look-pic.flippable { position: relative; cursor: pointer; transition: transform .16s ease-in; }
.look-pic.turning { transform: scaleX(0); }
.flip-badge { position: absolute; left: 4px; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: rgba(251,249,244,.9); font-size: .7rem; line-height: 18px; text-align: center; }

/* ---------- Pinterest-gevoel: borden, tegels en beweging ---------- */
.boards {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity;
  margin: 4px -16px 18px; padding: 2px 16px 4px; scroll-padding-inline: 16px; scrollbar-width: none;
}
.boards::-webkit-scrollbar { display: none; }
.board { flex: 0 0 104px; scroll-snap-align: start; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; }
.board-cover {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
  aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: var(--soft);
  outline: 2px solid transparent; outline-offset: 2px; transition: outline-color .15s, transform .15s;
}
.board-cover > div { background: var(--soft); overflow: hidden; display: flex; }
.board-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.board-cover span { flex: 1; }
.board.on .board-cover { outline-color: var(--ink); }
.board:active .board-cover { transform: scale(.96); }
.board-name { display: block; margin-top: 6px; font-size: .82rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-count { display: block; font-size: .72rem; color: var(--muted); }

@keyframes pinIn { from { opacity: 0; transform: translateY(14px) scale(.98); } }

/* Knoppen geven een klein "klikje" */
.btn, .chip, .day-option, .slot-option { transition: transform .12s ease, background .15s, color .15s; }
.btn:active:not(:disabled), .chip:active, .day-option:active { transform: scale(.97); }

/* Looks: de middelste look groot, de buren kleiner en lichter */
.look { transition: transform .35s cubic-bezier(.2,.7,.2,1), opacity .35s; transform-origin: center top; will-change: transform; }
.looks .look:not(.active) { transform: scale(.93); opacity: .55; }
.look.active .look-title { animation: titleIn .5s cubic-bezier(.2,.7,.2,1) both; }
@keyframes titleIn { from { opacity: 0; letter-spacing: .08em; } }

/* Lege kast: een klein moodboard als uitnodiging */
/* minmax(0, 1fr): de tegels mogen nooit breder worden dan het scherm (anders schuift een lege kast opzij) */
.mood-collage { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 6px 0 26px; }
.mood-collage span { min-width: 0; overflow: hidden; }
.mood-collage span {
  display: flex; align-items: flex-end; aspect-ratio: 3 / 4; padding: 10px; border-radius: 14px;
  font-family: var(--serif); font-size: 1.05rem; color: var(--ink);
  transform: rotate(var(--r)); animation: pinIn .5s both;
  box-shadow: 0 6px 16px rgba(26,26,26,.08);
}
.mood-collage span:nth-child(2n) { aspect-ratio: 3 / 5; margin-top: -14px; }
.mood-collage span:nth-child(1) { animation-delay: .05s } .mood-collage span:nth-child(2) { animation-delay: .1s }
.mood-collage span:nth-child(3) { animation-delay: .15s } .mood-collage span:nth-child(4) { animation-delay: .2s }
.mood-collage span:nth-child(5) { animation-delay: .25s } .mood-collage span:nth-child(6) { animation-delay: .3s }

/* Keuzescherm: grote tegels per soort dag, stappen schuiven zacht in beeld */
.day-options { grid-template-columns: 1fr 1fr; }
.day-option { flex-direction: column; justify-content: flex-end; align-items: flex-start; min-height: 120px; padding: 16px; }
.day-option strong { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; line-height: 1.05; }
.day-option:nth-child(1) { background: var(--card); }
.day-option:nth-child(2) { background: #1a1a1a; color: var(--paper); border-color: #1a1a1a; }
.day-option:nth-child(2) span { color: var(--soft); }
.day-option:nth-child(3) { grid-column: span 2; min-height: 84px; background: var(--soft); }
.day-option.on { outline: 2px solid var(--ink); outline-offset: 3px; }
.day-option:nth-child(1).on, .day-option:nth-child(3).on { background: var(--ink); color: var(--paper); }
.day-option.on span { color: var(--soft); }
.step:not(.hidden) { animation: stepIn .35s cubic-bezier(.2,.7,.2,1) both; }
@keyframes stepIn { from { opacity: 0; transform: translateY(16px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Wat wordt de look vandaag? ---------- */
dialog.plan-dialog { overflow-y: auto; padding-top: calc(env(safe-area-inset-top, 0px) + 18px); }
dialog.plan-dialog .w-title { font-size: 2.3rem; margin: 6px 0 4px; }
.plan-head { display: flex; justify-content: space-between; align-items: center; }
.close:focus:not(:focus-visible) { outline: none; }
.close { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--soft); cursor: pointer; display: flex; align-items: center; justify-content: center; }
dialog.plan-dialog .planner { padding-bottom: 24px; }
.looks-start { margin-top: 10px; padding: 22px 18px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); }
.looks-start p { margin: 0 0 16px; }
.looks-start .q { margin-bottom: 8px; }

/* ---------- Instellingen ---------- */
#tab-instellingen h2 { margin: 22px 0 6px; }
.settings-head { display: flex; align-items: center; justify-content: space-between; }
.settings-head h2 { margin: 0 !important; }
.settings-group { margin-top: 18px; }
.settings-group > p:first-child { margin: 0 0 6px; font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.settings-row {
  display: flex; justify-content: space-between; align-items: center; width: 100%;
  min-height: 48px; padding: 10px 2px; cursor: pointer; text-align: left;
  background: none; border: 0; border-bottom: 1px solid var(--line);
}

/* ---------- Melding ---------- */
.toast {
  position: fixed; left: 50%; z-index: 100;
  bottom: calc(var(--tabbar-h) + var(--safe-b) + 88px);
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--paper);
  padding: 10px 18px; border-radius: 999px; font-size: .88rem;
  transition: opacity .2s, transform .2s; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Look-kaart: ontwerp met penseelstreken, notities en krabbels ---------- */
.topbar h1.swash { position: relative; display: inline-block; }
.topbar h1.swash::after {
  content: ""; position: absolute; left: 30%; right: 2%; bottom: -9px; height: 14px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'%3E%3Cpath d='M3 10C55 3 130 1 197 6' fill='none' stroke='%23b39c7d' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}

.look {
  position: relative; overflow: hidden; border: 0; border-radius: 28px; padding: 16px 14px 14px;
  background-color: #f8f4ec;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 90'%3E%3Cpath d='M8 70C50 30 120 8 192 14C150 30 96 52 30 86C18 90 4 82 8 70Z' fill='%23d8ccb6' opacity='.45'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 90'%3E%3Cpath d='M6 60C58 44 112 18 194 8C160 34 108 58 22 84C10 86 0 70 6 60Z' fill='%23d8ccb6' opacity='.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 150px auto, 200px auto;
  background-position: -50px 150px, right -60px top 430px;
  box-shadow: 0 12px 30px rgba(60, 45, 25, .13), inset 0 1px 0 rgba(255,255,255,.8);
}
.look::after {
  content: ""; position: absolute; left: -44px; bottom: -40px; width: 170px; height: 96px; z-index: 0;
  background: #9fb3a0; opacity: .6; border-radius: 58% 42% 50% 50%; transform: rotate(-14deg);
}
.look > * { position: relative; z-index: 1; }

.look-meta { align-items: center; letter-spacing: 0; text-transform: none; }
.sit-pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 12px; border-radius: 999px;
  background: #7f9a84; color: #f6f3ec; font-size: .68rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
}
.weather-tag { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 500; color: var(--ink); }
.weather-tag svg { color: #b08a3e; flex: none; }
.look-title { font-size: 3.4rem; margin: 18px 0 6px; }
.look-why { color: #5a554c; font-size: .9rem; }

.coat {
  margin: 0 auto 14px; padding: 9px 18px; gap: 8px;
  background: #fbf8f2; color: var(--ink); border: 1px solid var(--line);
  box-shadow: 0 3px 8px rgba(40, 25, 10, .07); font-size: .86rem;
}
.coat svg { width: 20px; height: 20px; }
.coat span { opacity: .7; }
.coat-ja { border-color: var(--ink); background: #fbf8f2; color: var(--ink); }
.coat-handig { background: #fbf8f2; }

.look-body { border-top: 0; grid-template-columns: 120px 1fr; margin-top: 4px; }
.look-items { position: relative; border-right: 1px solid rgba(60, 45, 25, .08); padding-left: 10px; }
.look-items::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 9px; border-radius: 6px; background: #ebe3d4; }
.look-item { border-bottom: 0; padding: 12px 8px 10px 12px; }
.look-item .nr {
  left: 2px; top: 4px; width: 26px; height: 26px; padding: 0; z-index: 2;
  border-radius: 50%; line-height: 26px; font-size: .8rem; font-weight: 600;
  box-shadow: 0 0 0 2px #f8f4ec;
}
.look-pic { width: 86px; border-radius: 16px; box-shadow: 0 5px 12px rgba(40, 25, 10, .16); }
.look-label { font-size: .78rem; color: var(--ink); margin-top: 7px; }
.swap { right: 4px; bottom: 32px; width: 28px; height: 28px; border-color: #f8f4ec; }

.look-figure { position: relative; padding: 34px 4px 30px; }
.note {
  position: absolute; z-index: 2; display: flex; flex-direction: column; align-items: center;
  font-family: var(--hand); font-size: 1.18rem; font-weight: 600; line-height: 1; color: #3a332a; white-space: nowrap;
}
.note svg { color: #3a332a; }
.note-top { right: 0; top: 4px; }

.note-side { left: 2px; bottom: 26%; }

.doodle { position: absolute; right: 6px; bottom: 6px; color: #b39c7d; }

/* Fototips in het toevoegscherm */
div.tip { margin: 10px 2px 0; padding: 10px 12px; border-radius: 12px; background: var(--soft); font-size: .8rem; color: var(--ink); }
div.tip strong { display: block; margin-bottom: 4px; font-size: .82rem; }
div.tip ul { margin: 0; padding-left: 16px; display: grid; gap: 3px; color: var(--muted); }
div.tip b { color: var(--ink); font-weight: 600; }
.tip.warn { margin: 10px 2px 0; padding: 10px 12px; border-radius: 12px; background: #f6e4c6; color: #6b4310; font-size: .82rem; }

/* Voor wie is je kast? (welkomstscherm) */
.gender-options { display: grid; gap: 10px; margin-top: 8px; }
.gender-options .day-option { min-height: 64px; justify-content: center; }
.gender-options .day-option strong { font-size: 1.4rem; }
.gender-options .day-option:nth-child(n) { background: var(--card); color: var(--ink); border-color: var(--line); grid-column: auto; }
.gender-options .day-option.on { background: var(--ink); color: var(--paper); }

/* Locatie in instellingen */
.loc-status { margin: 0 0 10px; font-size: .9rem; }
.city-results { margin-top: 12px; }
#city-input { margin-top: 12px; }

/* Fijnafstemming look-kaart */
.sit-pill, .weather-tag { white-space: nowrap; }
.weather-tag { font-size: .78rem; }
.coat { flex-wrap: nowrap; white-space: nowrap; max-width: calc(100% - 8px); }
.coat span { overflow: hidden; text-overflow: ellipsis; }
.note .arrow { color: #3a332a; margin-top: 2px; }
.note-top .arrow { transform: scaleX(-1) rotate(10deg); }
.note-side .arrow { transform: rotate(-35deg); }

/* ---------- Fase 3: uitgeknipt, flat-lay, favorieten ---------- */
/* Stickerrand: wit randje rondom het uitgeknipte stuk, plus een zachte schaduw */
.sticker, .look-pic.cut img, .fl-item.cut img {
  filter: drop-shadow(1.6px 0 0 #fff) drop-shadow(-1.6px 0 0 #fff) drop-shadow(0 1.6px 0 #fff) drop-shadow(0 -1.6px 0 #fff)
          drop-shadow(0 4px 6px rgba(40, 25, 10, .22));
}
.look-pic.cut { background: #efe9dd; box-shadow: none; }
.look-pic.cut img { object-fit: contain; padding: 6px; background: transparent; }

.look-figure .view-toggle {
  position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%); z-index: 3;
  display: flex; padding: 3px; border-radius: 999px; background: rgba(255,255,255,.7); box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.view-toggle button { white-space: nowrap; border: 0; background: none; padding: 4px 10px; border-radius: 999px; font-size: .7rem; font-weight: 600; color: var(--muted); cursor: pointer; }
.view-toggle button.on { background: var(--ink); color: var(--paper); }
.look-figure.view-flatlay, .look-figure.view-pop { padding-bottom: 40px; }

/* Onder elkaar: de flat-lay over de hele breedte, het bijschrift eronder (niet ernaast). */
.look-figure.view-flatlay { flex-direction: column; }
.flatlay { position: relative; width: 100%; height: 400px; }
.fl-item { position: absolute; display: flex; align-items: center; justify-content: center; transform: rotate(var(--r)); }
.fl-item img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.fl-item.nocut img.photo { border-radius: 10px; box-shadow: 0 4px 10px rgba(40,25,10,.2); border: 3px solid #fff; }
.fl-item .fl-color { width: 70%; height: 70%; border-radius: 12px; border: 3px solid #fff; box-shadow: 0 4px 10px rgba(40,25,10,.2); }

.fav-btn {
  position: absolute; right: 14px; top: 52px; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line);
  background: #fbf8f2; color: var(--ink); display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: transform .15s ease;
}
.fav-btn.on { color: #c0392b; border-color: #e7c3bd; }
.fav-btn:active { transform: scale(.9); }

.fav-list { display: grid; gap: 10px; margin-top: 14px; }
.fav-row { display: flex; align-items: center; gap: 8px; }
.fav-show { flex: 1; display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); cursor: pointer; text-align: left; }
.fav-thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; width: 64px; height: 64px; flex: none; border-radius: 10px; overflow: hidden; background: #efe9dd; }
.fav-thumb { display: flex; align-items: center; justify-content: center; overflow: hidden; }
.fav-thumb img { width: 100%; height: 100%; object-fit: contain; }
.fav-thumb .swatch { width: 70%; }
.fav-text { display: grid; gap: 2px; }
.fav-del { width: 40px; height: 40px; border: 0; background: none; color: #c0392b; cursor: pointer; }

.progress { height: 8px; border-radius: 4px; background: var(--soft); overflow: hidden; margin: 18px 0 8px; }
.progress-bar { height: 100%; width: 0; background: var(--ink); transition: width .3s; }

.cutout-status {
  position: fixed; left: 50%; z-index: 25; transform: translateX(-50%);
  bottom: calc(var(--tabbar-h) + var(--safe-b) + 14px);
  padding: 7px 14px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: .8rem;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
}

/* ---------- Fase 4: stijl leren ---------- */
/* Moodboard: Pinterest-wand met foto's, of stijl-tegels zolang er nog geen foto's zijn */
.mood-grid { margin: 12px 0 16px; }
.mood-wall { columns: 2; column-gap: 10px; }
.mood-pin { position: relative; display: block; width: 100%; margin: 0 0 10px; padding: 0; border: 0; background: none; break-inside: avoid; cursor: pointer; }
.mood-pin img { width: 100%; display: block; border-radius: 14px; }
.mood-pin.on img { outline: 3px solid var(--ink); outline-offset: 2px; }
.mood-heart { position: absolute; right: 8px; bottom: 8px; width: 34px; height: 34px; border-radius: 50%; background: rgba(251,249,244,.9); display: flex; align-items: center; justify-content: center; color: var(--ink); }
.mood-pin.on .mood-heart { color: #c0392b; }
.mood-styles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mood-style { display: grid; gap: 4px; text-align: left; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); cursor: pointer; }
.mood-style strong { font-family: var(--serif); font-weight: 400; font-size: 1.15rem; line-height: 1.1; }
.mood-style.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.mood-style.on .muted { color: var(--soft); }
.mood-dots { display: flex; gap: 4px; }
.mood-dots span { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
#welcome .w-step:has(#w-mood) { overflow-y: auto; }

/* Stijlprofiel in Instellingen */
.style-profile { display: grid; gap: 8px; margin: 6px 0 10px; }
.style-bar { display: grid; grid-template-columns: 130px 1fr 38px; gap: 10px; align-items: center; font-size: .86rem; }
.style-bar .bar { height: 8px; border-radius: 4px; background: var(--soft); overflow: hidden; }
.style-bar .bar span { display: block; height: 100%; background: var(--ink); border-radius: 4px; }

/* Trend-label en duimpjes op de look-kaart */
.trend-badge {
  display: flex; align-items: center; justify-content: center; gap: 6px; width: fit-content; margin: -4px auto 12px;
  padding: 4px 12px; border-radius: 999px; background: #efe2c8; color: #6b4a14; font-size: .74rem; font-weight: 600; letter-spacing: .02em;
}
.rate { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(60,45,25,.08); }
.rate-q { font-family: var(--hand); font-size: 1.15rem; font-weight: 600; color: #3a332a; margin-right: 4px; }
.rate-btn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: #fbf8f2; color: var(--ink); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform .15s; }
.rate-btn.down svg { transform: rotate(180deg); }
.rate-btn.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.rate-btn:active { transform: scale(.9); }
.why-not { margin-top: 8px; text-align: center; }
.why-not summary { cursor: pointer; font-size: .82rem; font-weight: 600; list-style: none; }
.why-not summary::-webkit-details-marker { display: none; }
.why-not summary span { color: var(--muted); font-weight: 400; }
.why-not .chips { justify-content: center; margin-top: 8px; }

/* Kastcheck */
.kc-list { display: grid; gap: 10px; margin-top: 12px; }
.kc-row { display: grid; grid-template-columns: 56px 1fr; gap: 10px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.kc-pic { width: 56px; height: 56px; border-radius: 10px; overflow: hidden; background: var(--soft); display: flex; align-items: center; justify-content: center; }
.kc-pic img { width: 100%; height: 100%; object-fit: cover; }
.kc-pic .swatch { width: 60%; }
.kc-text { display: grid; gap: 2px; }
.kc-btns { grid-column: 1 / -1; display: flex; gap: 8px; }
.kc-btns .chip { flex: 1; }

dialog.welcome { overflow-y: auto; }

/* ---------- Poetsronde ---------- */
/* Favorieten-pil rechtsboven */
.topbar { position: sticky; }
.fav-pill {
  position: absolute; right: 16px; bottom: 14px;
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px 7px 11px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card);
  color: var(--ink); font-size: .8rem; font-weight: 600; cursor: pointer;
  box-shadow: 0 2px 6px rgba(40, 25, 10, .08); transition: transform .12s;
}
.fav-pill svg { color: #c0392b; }
.fav-pill:active { transform: scale(.95); }

/* Flat-lay: één bijschrift eronder in plaats van notities over de foto's */
.fl-caption { margin: 6px 0 0; text-align: center; font-family: var(--hand); font-size: 1.15rem; font-weight: 600; color: #3a332a; }

/* Welkomstscherm: het belangrijkste punt in een kader */
.w-step p.w-callout { color: var(--ink); background: var(--soft); border-radius: 14px; padding: 12px 14px; font-size: .95rem; }

/* Tweede leven */
.gone-list { margin-top: 12px; }
a.link-row { color: var(--ink); text-decoration: none; }

/* Kast: penseelstreken langs de randen, zoals op de look-kaarten */
#tab-kast { position: relative; }
#tab-kast::before, #tab-kast::after {
  content: ""; position: absolute; z-index: 0; pointer-events: none; background-repeat: no-repeat; background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 90'%3E%3Cpath d='M8 70C50 30 120 8 192 14C150 30 96 52 30 86C18 90 4 82 8 70Z' fill='%23d8ccb6' opacity='.55'/%3E%3C/svg%3E");
}
#tab-kast::before { left: -60px; top: 40px; width: 190px; height: 90px; transform: rotate(-8deg); }
#tab-kast::after { right: -70px; top: 520px; width: 210px; height: 95px; transform: rotate(170deg); }
#tab-kast > * { position: relative; z-index: 1; }

/* Nog een streek langs de linkerkant van het prikbord, half erachter */
.corkboard::before {
  content: ""; position: absolute; left: -44px; top: 46%; width: 150px; height: 70px; z-index: -1; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 90'%3E%3Cpath d='M6 60C58 44 112 18 194 8C160 34 108 58 22 84C10 86 0 70 6 60Z' fill='%239fb3a0' opacity='.45'/%3E%3C/svg%3E") no-repeat center / contain;
  transform: rotate(12deg);
}
/* Penseelstreken in de kast: op plekken waar ze niet achter de borden vallen */
#tab-kast::before { left: auto; right: -64px; top: 170px; width: 200px; height: 90px; transform: rotate(-14deg); opacity: .9; }
#tab-kast::after { right: auto; left: -74px; top: 760px; width: 220px; height: 100px; transform: rotate(168deg); opacity: .9; }
/* Prikbord iets smaller, zodat de penseelstreken langs de zijkanten zichtbaar zijn */
.corkboard { margin: 0 8px; }
#tab-kast::before, #tab-kast::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 90'%3E%3Cpath d='M8 70C50 30 120 8 192 14C150 30 96 52 30 86C18 90 4 82 8 70Z' fill='%23cdbb98' opacity='.75'/%3E%3C/svg%3E");
}
#tab-kast::before { right: -40px; top: 210px; transform: rotate(-70deg); }
#tab-kast::after { left: -52px; top: 640px; transform: rotate(110deg); }
.corkboard::before { left: -30px; top: 30%; }

/* ---------- Fase 5: klaar voor anderen ---------- */
/* Nieuwe versie */
.update-banner {
  position: fixed; z-index: 50; inset: auto; left: 12px; right: 12px; top: calc(env(safe-area-inset-top, 0px) + 8px);
  width: auto; height: auto; max-width: 536px; margin: 0 auto; padding: 12px 16px; border: 0; border-radius: 14px;
  background: var(--ink); color: var(--paper); font: inherit; font-size: .92rem; text-align: left;
  box-shadow: 0 6px 20px rgba(0,0,0,.25); cursor: pointer;
}
.update-banner b { display: block; margin-top: 2px; text-decoration: underline; }

/* Back-up-herinnering in de kast */
.backup-nudge { margin: 4px 0 12px; padding: 12px 14px; border-radius: 14px; background: var(--soft); }
.backup-nudge p { margin: 0 0 10px; font-size: .92rem; }
.backup-nudge .row { display: flex; gap: 8px; }

/* Beginscherm-stap */
.hs-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; font-size: 1.02rem; }
.hs-steps li::marker { font-weight: 600; }
.share-icon {
  display: inline-block; width: 15px; height: 18px; vertical-align: -3px; margin-left: 2px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 15 18'%3E%3Cpath d='M7.5 1v11M3.5 5l4-4 4 4M2.5 8H1v9h13V8h-1.5' fill='none' stroke='%231a1a1a' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}
#w-homescreen { display: flex; flex-direction: column; gap: 14px; }
.w-privacy { align-self: center; margin-top: 2px; font-size: .9rem; color: var(--muted); }

/* Privacy */
.privacy h3 { margin: 18px 0 6px; font-size: 1rem; font-weight: 600; }
.privacy p, .privacy li { font-size: .95rem; line-height: 1.45; }
.privacy ul { margin: 6px 0; padding-left: 20px; }

/* ---------- Fitchecker Wrapped ---------- */
/* Simpel voor nu; later uit te breiden met bewegende animaties. */
dialog.wrapped {
  position: fixed; inset: 0; width: 100%; max-width: 560px; height: 100vh; height: 100dvh; max-height: none;
  margin: 0 auto; padding: 0; border: 0; background: var(--ink); color: var(--paper); overflow: hidden;
  transition: background .3s ease; box-sizing: border-box;
}
dialog.wrapped::backdrop { background: var(--ink); }
dialog.wrapped.wr-cream { background: var(--paper); color: var(--ink); }
dialog.wrapped.wr-green { background: #2f5a3c; color: var(--paper); }
dialog.wrapped.wr-light { color: var(--ink); }
.wr-bars { position: absolute; z-index: 2; left: 16px; right: 64px; top: calc(env(safe-area-inset-top, 0px) + 14px); display: flex; gap: 4px; }
.wr-bars span { flex: 1; height: 3px; border-radius: 2px; background: currentColor; opacity: .25; }
.wr-bars span.done, .wr-bars span.on { opacity: .9; }
.wr-close { position: absolute; z-index: 2; right: 12px; top: calc(env(safe-area-inset-top, 0px) + 2px); background: transparent; color: inherit; }
.wr-slide {
  height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 12px;
  padding: calc(env(safe-area-inset-top, 0px) + 64px) 28px calc(var(--safe-b) + 40px);
  animation: wr-in .35s ease both; cursor: pointer; -webkit-user-select: none; user-select: none;
}
@keyframes wr-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.wr-slide p, .wr-slide h2 { margin: 0; }
.wr-kicker { font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; opacity: .7; }
.wr-huge { font-family: var(--serif); font-weight: 400; font-size: clamp(4rem, 26vw, 8.5rem); line-height: .9; letter-spacing: -.02em; }
/* Lange woorden (september, lichtblauw) moeten altijd passen. */
.wr-word { font-size: clamp(2.8rem, 15vw, 5.6rem); overflow-wrap: anywhere; }
.wr-slide > * { max-width: 100%; min-width: 0; }
.wr-quote { font-size: clamp(3rem, 15vw, 5.4rem); font-style: italic; }
.wr-title { font-family: var(--serif); font-weight: 400; font-size: 2.3rem; line-height: 1.05; }
.wr-big { font-family: var(--serif); font-size: 1.9rem; line-height: 1.1; }
.wr-text { font-size: 1.08rem; line-height: 1.4; opacity: .9; }
.wr-small { font-size: .88rem; opacity: .65; }
.wr-hero { width: 72%; max-width: 280px; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; }
.wr-hero img, .wr-grid img { max-width: 100%; max-height: 100%; object-fit: contain; }
.wr-hero img.cut, .wr-grid img.cut { filter: drop-shadow(0 0 0 #fff) drop-shadow(0 6px 14px rgba(0,0,0,.25)); }
.wr-hero img.photo, .wr-grid img.photo { border-radius: 12px; border: 4px solid #fff; }
.wr-swatch { display: block; width: 78%; height: 78%; border-radius: 16px; border: 4px solid #fff; box-shadow: 0 6px 14px rgba(0,0,0,.2); }
.wr-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 6px; }
.wr-grid > div { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; padding: 6px; border-radius: 14px; background: rgba(255,255,255,.08); }
.wr-cream .wr-grid > div { background: rgba(0,0,0,.05); }
.wr-btn { margin-top: 10px; align-self: flex-start; }
.wr-ink .wr-btn { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.wr-actions { display: flex; gap: 10px; margin-top: 18px; }
.wr-actions .btn { flex: 1; }

/* ---------- Wekelijkse tip: als een iPhone-melding ---------- */
.tip-banner {
  position: fixed; z-index: 60; inset: auto; left: 8px; right: 8px; top: calc(env(safe-area-inset-top, 0px) + 8px);
  width: auto; height: auto; max-width: 544px; margin: 0 auto; padding: 12px 40px 12px 12px; border: 0; border-radius: 22px;
  display: flex; gap: 11px; align-items: flex-start; overflow: visible;
  background: rgba(246, 244, 240, .86); color: #111;
  -webkit-backdrop-filter: blur(22px) saturate(1.6); backdrop-filter: blur(22px) saturate(1.6);
  box-shadow: 0 10px 30px rgba(0,0,0,.18), 0 0 0 .5px rgba(0,0,0,.06);
  transform: translateY(calc(-100% - 40px)); opacity: 0;
  transition: transform .5s cubic-bezier(.2, 1.15, .4, 1), opacity .25s ease;
  touch-action: none; -webkit-user-select: none; user-select: none;
}
.tip-banner.hidden { display: none; }
.tip-banner.in { transform: none; opacity: 1; }
.tip-banner.out { transform: translateY(calc(-100% - 40px)); opacity: 0; transition: transform .3s ease-in, opacity .3s ease-in; }
.tip-icon { width: 38px; height: 38px; border-radius: 9px; flex: none; }
.tip-body { flex: 1; min-width: 0; }
.tip-body p { margin: 0; }
.tip-meta { display: flex; justify-content: space-between; font-size: .72rem; letter-spacing: .02em; color: #6d6a64; margin-bottom: 2px !important; }
.tip-title { font-weight: 600; font-size: .95rem; line-height: 1.25; }
.tip-text { font-size: .92rem; line-height: 1.3; color: #222; }
.tip-close {
  position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.08); color: #444; cursor: pointer;
}
.tip-banner .tip-meta span:last-child { margin-right: 4px; }

/* ---------- Personage (fase 6) ---------- */
.look-figure.view-personage { flex-direction: column; padding-bottom: 40px; }
canvas.personage {
  display: block; width: auto; max-width: 100%; height: 380px; margin: 0 auto; aspect-ratio: 1 / 3.4;
  opacity: 0; transition: opacity .25s ease;
  filter: drop-shadow(0 6px 10px rgba(40, 25, 10, .12));
}
canvas.personage.ready { opacity: 1; aspect-ratio: auto; }
.look-figure.view-personage .fl-caption { margin-top: 8px; }

/* ---------- Fototips met schets ---------- */
.pt-examples { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 4px 0 14px; }
.pt-examples figure { margin: 0; display: flex; flex-direction: column; }
.pt-examples img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: contain; border-radius: 12px; background: #f6f3ee; }
.pt-examples figcaption { margin-top: 6px; font-size: .82rem; line-height: 1.25; color: var(--muted); }
.pt-examples figcaption span { font-weight: 700; margin-right: 2px; }
.pt-good figcaption span { color: #3f7d4e; }
.pt-bad figcaption span { color: var(--danger); }
.pt-bad img { opacity: .85; }
.photo-tips ul { margin: 0 0 10px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.photo-tips li { font-size: .95rem; line-height: 1.35; }
.pt-hide { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: .92rem; color: var(--muted); }
.pt-hide input { width: 18px; height: 18px; accent-color: var(--ink); }
.cut-note { margin: 6px 0 0; }

/* Kast vol: meer plekken */
#slots-pack { background: var(--ink); color: var(--paper); border-color: var(--ink); }
#slots-pack span { color: var(--soft); }
.slots-restore { text-align: center; margin-top: 14px; }

/* ---------- Je kast vullen: eerste look en opdracht van vandaag ---------- */
.start-card { margin: 4px 0 14px; padding: 16px 16px 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); }
.start-card h3 { font-size: 1.6rem; font-weight: 400; line-height: 1.1; margin: 2px 0 6px; }
.start-card p { margin: 0 0 10px; }
.start-card .row { display: flex; gap: 8px; }
.sc-kicker { font-size: .68rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin: 0 0 4px; }
.sc-steps { list-style: none; margin: 4px 0 14px; padding: 0; display: grid; gap: 7px; font-size: .92rem; }
.sc-steps li { display: flex; align-items: center; gap: 10px; }
.sc-steps li::before { content: ''; flex: none; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--muted); }
.sc-steps li.done { color: var(--muted); text-decoration: line-through; }
.sc-steps li.done::before { border-color: var(--ink); background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23f3efe6' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; }
.sc-progress { font-family: var(--hand); font-size: 1.3rem; margin: -4px 0 8px !important; }
.sc-bar { height: 6px; border-radius: 99px; background: var(--soft); overflow: hidden; }
.sc-bar span { display: block; height: 100%; border-radius: 99px; background: var(--ink); transition: width .5s cubic-bezier(.2,.7,.2,1); }
.sc-pct { font-size: .78rem; color: var(--muted); margin: 6px 0 12px !important; }
.fl-thanks { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--soft); }
.fl-thanks p { margin: 0 0 10px; }

/* ---------- Story maken ---------- */
.story-preview { display: flex; justify-content: center; margin: 4px 0; }
.story-preview img { width: min(62vw, 260px); aspect-ratio: 9 / 16; border-radius: 14px; box-shadow: 0 8px 24px rgba(40, 25, 10, .18); }
#slots-invite { background: transparent; border-style: dashed; }
