/* Kastgeluk: groen/crème palet uit de eerste testversie, lettertype Aptos. */
:root {
  --achtergrond: #faf8f2;
  --tekst: #293e34;
  --kaart: #fff;
  --groen: #38574b;
  --groen-donker: #2c463c;
  --olijf: #697c4c;
  --beige: #efece2;
  --zacht: #e8eddf;
  --vlak: #f0f2e9;
  --rand: #d9dfd3;
  --stil: #59675d;
  --fout: #a03530;
  --radius: .7rem;
  --font: Aptos, "Aptos Display", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --font-kop: "Aptos Display", Aptos, "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--achtergrond); color: var(--tekst); font: 16px/1.6 var(--font); }
button, a, input, select { touch-action: manipulation; font: inherit; color: inherit; }
button { cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

.shell { max-width: 1120px; margin: auto; padding: 0 40px; padding-bottom: env(safe-area-inset-bottom); }
.mast { display: flex; justify-content: space-between; align-items: center; padding: 30px 0; border-bottom: 1px solid var(--rand); gap: 20px; }
.brand { font: 600 34px/1 var(--font-kop); letter-spacing: -.5px; text-decoration: none; color: inherit; }
.brand span { display: block; font: 500 11px/2 var(--font); letter-spacing: 1.8px; margin-top: 8px; color: var(--stil); }
.mast-rechts { display: flex; align-items: center; gap: 16px; font-size: 14px; }
.eyebrow { color: #687058; margin: 0; font-size: 15px; }
h1 { font: 600 52px/1.1 var(--font-kop); letter-spacing: -1.2px; margin: 12px 0 18px; }
h1 em { font-style: normal; font-weight: 400; color: var(--olijf); }
h2 { font: 600 27px var(--font-kop); margin: 0; }
h3 { font: 600 22px var(--font-kop); margin: 14px 0 6px; }
p { color: var(--stil); }

/* knoppen */
.knop { min-height: 48px; padding: 12px 22px; border-radius: var(--radius); border: 1px solid var(--groen); background: var(--groen); color: #fff; font-weight: 600; }
.knop:hover { background: var(--groen-donker); }
.knop:disabled { opacity: .55; cursor: progress; }
.knop.licht { background: #fff; color: var(--groen); }
.knop.licht:hover { background: var(--zacht); }
.knop.groot { width: 100%; max-width: 420px; font-size: 18px; min-height: 56px; margin-top: 8px; }
.link { background: none; border: 0; padding: 4px 0; color: var(--groen); text-decoration: underline; text-underline-offset: 3px; }
.link.rood { color: var(--fout); }

/* login */
.login { max-width: 520px; margin: 60px auto; }
.login form { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.login input { flex: 1 1 220px; min-height: 48px; padding: 10px 14px; border: 1px solid var(--rand); border-radius: var(--radius); background: #fff; font-size: 17px; }

/* voorstel */
.heading { padding: 28px 0 18px; }
.keuzes { display: flex; flex-wrap: wrap; gap: 18px 26px; margin-bottom: 22px; align-items: flex-end; }
.keuze { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.label { font-size: 13px; letter-spacing: .6px; text-transform: uppercase; color: #687058; }
.seg { display: inline-flex; border: 1px solid var(--rand); border-radius: var(--radius); background: #fff; padding: 3px; gap: 3px; }
.seg button { border: 0; background: none; padding: 9px 16px; border-radius: calc(var(--radius) - 3px); min-height: 42px; }
.seg button.aan { background: var(--groen); color: #fff; font-weight: 600; }
.keuze input, .keuze select, .filters select, .d-velden input, .d-velden select { min-height: 48px; padding: 9px 12px; border: 1px solid var(--rand); border-radius: var(--radius); background: #fff; font-size: 16px; }
.keuze input { width: 210px; }
.chip { display: inline-flex; align-items: center; gap: 10px; background: var(--zacht); border-radius: 999px; padding: 4px 6px 4px 4px; min-height: 48px; }
.chip img { width: 40px; height: 40px; object-fit: cover; border-radius: 50%; background: #fff; }
.chip button { border: 0; background: #fff; width: 32px; height: 32px; border-radius: 50%; font-size: 20px; line-height: 1; }

.resultaat { margin-top: 28px; padding: 24px; background: var(--kaart); border: 1px solid var(--rand); border-radius: 16px; }
.outfit { display: flex; gap: 16px; flex-wrap: wrap; }
.outfit figure { margin: 0; flex: 1 1 160px; max-width: 240px; }
.outfit img { width: 100%; aspect-ratio: 3/4; object-fit: contain; background: #eeece4; border-radius: 10px; display: block; }
.outfit figcaption { font-size: 14px; padding-top: 8px; color: var(--stil); }
.uitleg { font-size: 18px; color: var(--tekst); margin: 18px 0 6px; }
.tip { margin: 6px 0; padding: 10px 14px; background: var(--vlak); border-radius: 8px; }
.melding { font-size: 14px; color: #8a5a1e; }
.acties { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; align-items: center; }
.acties.klein { margin-top: 10px; gap: 18px; font-size: 14px; }
.bevestiging { margin: 12px 0 0; color: var(--groen); font-weight: 600; }
.laden { display: flex; align-items: center; gap: 12px; color: var(--stil); }
.spinner { width: 22px; height: 22px; border: 3px solid var(--rand); border-top-color: var(--groen); border-radius: 50%; animation: draai 0.9s linear infinite; }
@keyframes draai { to { transform: rotate(360deg); } }

/* kast */
.collection { border-top: 1px solid var(--rand); padding: 32px 0; margin-top: 40px; }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 20px; }
.section-title span { font-size: 14px; color: var(--stil); }
.upload-panel, .empty { padding: 34px 28px; text-align: center; border: 1.5px dashed #bfcab6; border-radius: 14px; background: var(--vlak); transition: background .15s, border-color .15s; }
.upload-panel > svg { color: #788d65; }
.upload-panel.over { background: var(--zacht); border-color: var(--groen); }
.choices { display: flex; gap: 12px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.uploads { list-style: none; padding: 0; margin: 14px auto 0; max-width: 560px; text-align: left; font-size: 14px; }
.uploads li { padding: 4px 0; color: var(--stil); }
.uploads li.fout { color: var(--fout); }
.filters { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0 18px; }
.photo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.kaartje { margin: 0; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; position: relative; }
.kaartje img { aspect-ratio: 3/4; width: 100%; object-fit: contain; background: #eeece4; border-radius: 10px; display: block; }
.kaartje .onder { padding: 8px 2px 0; font-size: 14px; line-height: 1.4; }
.kaartje .onder b { display: block; font-weight: 600; color: var(--tekst); }
.kaartje .onder span { color: var(--stil); }
.badge { position: absolute; top: 8px; left: 8px; background: rgba(255,255,255,.92); border-radius: 999px; padding: 3px 10px; font-size: 12px; display: inline-flex; gap: 6px; align-items: center; }
.badge .spinner { width: 12px; height: 12px; border-width: 2px; }
.badge.let-op { background: #f7e8df; color: #822c20; }
.kaartje:focus-visible { outline: 3px solid var(--groen); outline-offset: 3px; border-radius: 10px; }

.message { padding: 14px 16px; background: #e5ecdb; border-radius: 8px; margin: 18px 0; }
.error { background: #f7e8df; color: #822c20; }
footer { font-size: 14px; color: #677064; border-top: 1px solid var(--rand); padding: 25px 0 40px; margin-top: 30px; }

.drag-overlay { position: fixed; inset: 0; background: rgba(56, 87, 75, .82); color: #fff; display: grid; place-items: center; font: 600 30px var(--font-kop); z-index: 50; pointer-events: none; }
.drag-overlay div { border: 3px dashed rgba(255,255,255,.8); border-radius: 22px; padding: 50px 60px; }

/* detail */
dialog { border: 0; border-radius: 18px; padding: 0; max-width: 860px; width: calc(100% - 32px); background: var(--achtergrond); color: var(--tekst); }
dialog::backdrop { background: rgba(41, 62, 52, .55); }
.detail { display: grid; grid-template-columns: 1fr 1.2fr; gap: 26px; padding: 26px; position: relative; }
.detail img { width: 100%; max-height: 70vh; object-fit: contain; background: #eeece4; border-radius: 12px; }
.sluit { position: absolute; top: 10px; right: 12px; border: 0; background: #fff; width: 40px; height: 40px; border-radius: 50%; font-size: 24px; line-height: 1; z-index: 1; }
.d-velden label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #687058; margin-top: 10px; }
.d-raster { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.d-info { font-size: 13px; margin: 12px 0 0; }

@media (max-width: 860px) {
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
  .detail { grid-template-columns: 1fr; }
  .detail img { max-height: 42vh; }
}
@media (max-width: 640px) {
  .shell { padding: 0 18px; }
  .mast { padding: 18px 0; }
  .brand { font-size: 28px; }
  .brand span { font-size: 9px; letter-spacing: 1px; }
  .heading { padding: 18px 0 10px; }
  h1 { font-size: 36px; letter-spacing: -.8px; }
  .keuzes { gap: 14px; }
  .keuze { flex: 1 1 100%; }
  .seg { display: flex; }
  .seg button { flex: 1; }
  .keuze input, .keuze select { width: 100%; }
  .knop.groot { max-width: none; }
  .resultaat { padding: 16px; }
  .outfit { gap: 10px; }
  .outfit figure { flex: 1 1 calc(50% - 10px); }
  .acties .knop { flex: 1 1 100%; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .upload-panel { padding: 26px 16px; }
  .choices .knop { flex: 1 1 100%; }
  .filters select { flex: 1 1 100%; }
  .d-raster { grid-template-columns: 1fr; }
  .detail { padding: 18px; }
}
