/* NYX Nieuwjaar 2027 – huisstijl (thema C: zwart-goud, vleugje groen, subtiel wijnrood) */
:root {
  --night: #0E0D0B; --pine: #1B1915; --pine-2: #151310; --line: #3A342A; --line-2: #4A4235;
  --red: #9E2630; --gold: #E2B84F; --gold-2: #F3D27E; --cream: #FBF3E4; --text-2: #EAE3D6; --muted: #CFC6B6; --muted-2: #B3A893;
  --ok: #9FE0B5; --bad: #F2A0A4; --nyx: #9B74C4;
  --serif: 'Fraunces', Georgia, serif; --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; --mono: 'Space Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--night); color: var(--cream); font-family: var(--sans); -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; min-height: 100dvh; position: relative; overflow-x: hidden; }
a { color: var(--gold); }
a:hover { color: var(--gold-2); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { position: relative; z-index: 1; max-width: 520px; margin: 0 auto; padding: 18px 20px 28px; display: flex; flex-direction: column; gap: 16px; }
.wrap.narrow { max-width: 460px; }
.wrap.wide { max-width: 980px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #C9B8E0; text-decoration: none; }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: var(--pine); color: var(--cream); border: 0; text-decoration: none; flex-shrink: 0; }
.iconbtn svg { width: 22px; height: 22px; }

.title { margin: 0; font-family: var(--serif); font-weight: 700; font-size: 34px; line-height: 1.08; }
.title.xl { font-size: 54px; line-height: .98; }
.title .gold, .gold { color: var(--gold); }
.lead { margin: 0; font-size: 16px; line-height: 1.55; color: var(--text-2); }
.small { font-size: 13px; color: var(--muted); line-height: 1.5; }
.label { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-2); }
.h2 { margin: 0; font-family: var(--serif); font-size: 22px; font-weight: 700; }

.card { background: var(--pine); border-radius: 18px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.card.gold { border: 1.5px solid var(--gold); }
.card.red { border: 1.5px solid var(--red); }
.card.row { flex-direction: row; align-items: flex-start; gap: 14px; }
.card .ico { width: 26px; height: 26px; flex-shrink: 0; color: var(--gold); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }

.btn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 20px; border: 0; border-radius: 16px; background: var(--gold); color: var(--night); font-size: 17px; font-weight: 600; text-decoration: none; text-align: center; }
.btn:hover { color: var(--night); filter: brightness(1.07); }
.btn.ghost { background: transparent; border: 1.5px solid var(--gold); color: var(--gold); }
.btn.ghost:hover { color: var(--gold-2); }
.btn.dark { background: var(--pine); border: 1.5px solid var(--line-2); color: var(--cream); }
.btn.dark:hover { color: var(--cream); }
.btn.sm { min-height: 44px; font-size: 14px; padding: 0 14px; border-radius: 12px; }
.btn[disabled] { opacity: .55; cursor: default; filter: none; }
.linkbtn { background: none; border: 0; color: var(--gold); font-weight: 600; padding: 10px 4px; min-height: 44px; }

.field { display: flex; flex-direction: column; gap: 8px; }
.field label, .field .lbl { font-size: 15px; font-weight: 600; }
.input { min-height: 54px; padding: 0 16px; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--pine); color: var(--cream); font-size: 17px; width: 100%; }
.input.on-pine { background: var(--night); }
.input:focus { border-color: var(--gold); outline: none; }
.pin { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pin input { height: 66px; text-align: center; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--pine); color: var(--gold); font: 700 28px var(--serif); width: 100%; }
.pin input:focus { border-color: var(--gold); outline: none; }
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.chip { min-height: 48px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--night); color: var(--cream); font-weight: 600; font-size: 15px; padding: 0 12px; }
.chip[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--night); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips .chip { border-radius: 999px; padding: 0 18px; }

.msg { border-radius: 14px; padding: 12px 14px; font-size: 15px; line-height: 1.45; }
.msg.err { background: #4A1F22; color: #F7C6C8; }
.msg.ok { background: #1F5A3A; color: #C8F2D5; }
.hidden { display: none !important; }

/* Aftellen */
.count { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; text-align: center; background: var(--pine); border-radius: 20px; padding: 16px 10px; }
.count.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); background: none; padding: 0; gap: 10px; }
.count.c3 > div { background: var(--pine); border-radius: 14px; padding: 12px 0; }
.count b { display: block; font-family: var(--serif); font-size: 36px; font-weight: 700; color: var(--gold); line-height: 1.1; }
.count span { font-size: 12px; color: var(--muted); }

/* Tegels */
.tile { position: relative; min-height: 124px; padding: 14px 10px 12px; border-radius: 18px; border: 1.5px solid var(--line-2); background: var(--pine-2); color: var(--cream); display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; text-align: center; text-decoration: none; }
.tile svg.t { width: 30px; height: 30px; color: var(--gold); }
.tile.locked svg.t { color: #A69C89; }
.tile b { font-size: 13px; font-weight: 600; line-height: 1.25; hyphens: auto; }
.tile small { font-size: 11px; color: var(--muted-2); }
.tile .lock { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border-radius: 50%; background: var(--night); display: flex; align-items: center; justify-content: center; }
.tile .lock svg { width: 12px; height: 12px; }
.tile.open { border-color: var(--gold); background: var(--pine); }

/* Sheet */
.sheet-back { position: fixed; inset: 0; z-index: 50; background: rgba(5, 12, 9, .62); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 520px; background: var(--pine); border-radius: 26px 26px 0 0; padding: 12px 22px calc(26px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; max-height: 92vh; overflow: auto; }
.sheet .grab { align-self: center; width: 44px; height: 5px; border-radius: 3px; background: #5A5142; }

/* Toast */
.toast { position: fixed; left: 50%; top: 18px; transform: translateX(-50%); z-index: 80; display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 999px; background: var(--gold); color: var(--night); font-weight: 600; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); max-width: 92vw; }
.toast.err { background: #F2A0A4; }

/* Decor */
.garland { display: block; width: 100%; height: auto; position: relative; z-index: 1; }
.forest { display: block; width: 100%; height: auto; margin-top: 8px; }
.snow { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.snow i { position: absolute; top: -10px; border-radius: 50%; background: #fff; animation: nyxsnow linear infinite; }
@keyframes nyxsnow { from { transform: translate(0, -20px); } 50% { transform: translate(14px, 50vh); } to { transform: translate(-6px, 105vh); } }
@media (prefers-reduced-motion: reduce) { .snow { display: none; } .pulse { animation: none !important; } }
.baubles { display: inline-block; vertical-align: top; margin-left: 8px; width: 34px; height: 40px; }
.pulse { animation: nyxpulse 2.4s ease-in-out infinite; }
@keyframes nyxpulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
.spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .25); border-top-color: currentColor; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Foto's */
.photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.photos button { padding: 0; border: 0; border-radius: 8px; overflow: hidden; aspect-ratio: 1 / 1; background: var(--pine); }
.photos img { width: 100%; height: 100%; object-fit: cover; }
.lightbox { position: fixed; inset: 0; z-index: 70; background: #070605; display: flex; flex-direction: column; padding: 16px 16px calc(20px + env(safe-area-inset-bottom)); gap: 14px; }
.lightbox .pic { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.lightbox .pic img { max-height: 100%; max-width: 100%; object-fit: contain; border-radius: 10px; }

/* Tabellen admin */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl td, .tbl th { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #6EE09A; flex-shrink: 0; }
.dot.off { background: #F2A0A4; }
.dot.unk { background: #A69C89; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #1F5A3A; color: #C8F2D5; }
.pill.bad { background: #4A1F22; color: #F7C6C8; }
.tag { padding: 3px 8px; border-radius: 999px; background: #4A1F22; color: #F7C6C8; font-size: 12px; font-weight: 600; }
