/* Ben Kalf — Kerstman van Amersfoort: winternacht-variant van de tuintool-stijl */

:root {
  --paper: #f6f1e3;
  --ink: #2f2a22;
  --ink-soft: #5a5244;
  --line: #d8cfb8;
  --green: #4a6741;
  --green-soft: #e4ead8;
  --rood: #a4432e;
  --ui-bg: #fbf8ef;
  --nacht: #141d2b;
  --shadow: 0 2px 10px rgba(60,50,30,.12);
  font-size: 14px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%;
  font-family: "Inter", system-ui, sans-serif;
  color: var(--ink); background: var(--ui-bg); overflow: hidden;
}

/* ── topbar (zelfde familie als de tuintool) ── */
#topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 6px 14px; background: var(--ui-bg);
  border-bottom: 2px solid var(--ink); height: 52px;
}
.brand { display: flex; flex-direction: column; line-height: 1; margin-right: 6px; }
.brand-sig { font-family: "Caveat", cursive; font-weight: 700; font-size: 26px; transform: rotate(-3deg); }
.brand-sub { font-size: 9px; letter-spacing: 2px; text-transform: uppercase; color: var(--rood); font-weight: 600; }
.proj-name {
  font-family: "Caveat", cursive; font-size: 20px; font-weight: 600; width: 240px;
  border: none; border-bottom: 1px dashed var(--line);
  background: transparent; color: var(--ink); padding: 2px 6px; outline: none;
}
.proj-name:focus { border-bottom-color: var(--rood); }
.topbar-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.topbar-actions .sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }

button, .linkbtn {
  font-family: inherit; font-size: 12.5px; font-weight: 500;
  background: var(--paper); color: var(--ink);
  border: 1.5px solid var(--ink); border-radius: 6px;
  padding: 5px 10px; cursor: pointer; text-decoration: none; display: inline-block;
  box-shadow: 1.5px 1.5px 0 rgba(47,42,34,.55);
}
button:hover, .linkbtn:hover { background: var(--green-soft); }
button:active { transform: translate(1px,1px); box-shadow: none; }

/* ── layout ── */
#main { display: flex; height: calc(100% - 52px); }
#left {
  width: 290px; flex: 0 0 290px; background: var(--ui-bg);
  border-right: 2px solid var(--ink); overflow-y: auto;
  display: flex; flex-direction: column;
}
.panel { padding: 10px 12px; border-bottom: 1px solid var(--line); }
.panel.grow { flex: 1; }
.panel h3 {
  font-family: "Caveat", cursive; font-size: 20px; font-weight: 700;
  margin: 0 0 6px; border-bottom: 1px solid var(--ink);
}
.hint { font-size: 11px; color: var(--ink-soft); line-height: 1.45; margin: 4px 0 8px; }
label { display: block; font-size: 11.5px; color: var(--ink-soft); margin-bottom: 8px; }
select, input[type=range] { width: 100%; margin-top: 3px; }
select {
  font-family: inherit; font-size: 12px; border: 1.5px solid var(--ink);
  border-radius: 6px; background: var(--paper); padding: 4px 6px;
}
input[type=range] { accent-color: var(--rood); }
.chk { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--ink); }
.chk input { accent-color: var(--rood); width: auto; margin: 0; }

.chips { display: flex; gap: 6px; margin: 4px 0 8px; }
.chip {
  width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid var(--line); cursor: pointer; box-shadow: none; padding: 0;
}
.chip.actief { border-color: var(--ink); transform: scale(1.12); }

#bestelLijst {
  white-space: pre-wrap; font-family: "Inter", sans-serif; font-size: 11.5px; line-height: 1.55;
  background: var(--paper); border: 1px dashed var(--line); border-radius: 6px;
  padding: 8px 10px; margin: 0 0 8px; max-height: 40vh; overflow-y: auto;
}
.btnrow { display: flex; gap: 6px; flex-wrap: wrap; }

/* ── scène ── */
#canvasWrap { flex: 1; position: relative; }
#scene { width: 100%; height: 100%; display: block; background: var(--nacht); }

.plan-label { font-family: "Caveat", cursive; pointer-events: none; user-select: none; }

/* sneeuwval & fonkelingen */
@keyframes vallen {
  from { transform: translateY(-60px); }
  to   { transform: translateY(700px); }
}
.vlok { animation: vallen linear infinite; }
@keyframes twinkel { 0%,100% { opacity: 1; } 50% { opacity: .2; } }
.twk { animation: twinkel ease-in-out infinite; }
@keyframes sterf { 0%,100% { opacity: .9; } 50% { opacity: .3; } }
.ster { animation: sterf ease-in-out infinite; }

/* ── dialog ── */
.dialog {
  position: fixed; inset: 0; background: rgba(20,29,43,.55);
  display: flex; align-items: center; justify-content: center; z-index: 50;
}
.dialog[hidden] { display: none; }
.dialog-box {
  background: var(--ui-bg); border: 2px solid var(--ink); border-radius: 10px;
  padding: 18px 22px; width: 380px; max-height: 70vh; overflow-y: auto; box-shadow: var(--shadow);
}
.dialog-box h3 { font-family: "Caveat", cursive; font-size: 22px; margin: 0 0 10px; }
.saved-row { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-bottom: 1px dotted var(--line); }
.saved-row .nm { flex: 1; cursor: pointer; font-weight: 500; }
.saved-row .nm:hover { color: var(--rood); }
.saved-row .del { border: none; box-shadow: none; background: none; color: var(--rood); }
#dialogClose { margin-top: 12px; }

::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 5px; }
