:root{
    --bg:#100c26; --bg2:#241a52;
    --gold:#f2c66b; --gold2:#e0a84a; --pink:#d9538a;
    --text:#f6f1e7; --dim:rgba(246,241,231,.58); --dim2:rgba(246,241,231,.38);
    --surf:rgba(255,255,255,.055); --surf2:rgba(255,255,255,.085);
    --line:rgba(255,255,255,.11); --line2:rgba(242,198,107,.34);
    --green:#1ed760; --red:#ff7a7a;
    --r:16px;
  }
  *{box-sizing:border-box; -webkit-tap-highlight-color:transparent;}
  html,body{height:100%;}
  body{
    margin:0; color:var(--text);
    font-family:'Inter','Segoe UI',system-ui,sans-serif;
    font-size:16px; line-height:1.5; letter-spacing:-.01em;
    background:var(--bg);
    background-image:
      radial-gradient(90% 55% at 50% -12%, var(--bg2) 0%, rgba(36,26,82,0) 70%),
      radial-gradient(60% 40% at 88% 8%, rgba(217,83,138,.16) 0%, rgba(217,83,138,0) 70%);
    background-attachment:fixed; background-repeat:no-repeat;
    -webkit-font-smoothing:antialiased;
  }
  .screen{
    display:none; min-height:100dvh; flex-direction:column; align-items:center;
    padding:26px 20px calc(24px + env(safe-area-inset-bottom));
  }
  .screen.active{display:flex;}
  .grow{flex:1; min-height:12px;}

  /* ---- typografie ---- */
  h1{
    font-family:'Berkshire Swash',cursive; font-weight:400; margin:0;
    font-size:1.95rem; line-height:1.15; color:var(--gold); letter-spacing:0;
    text-shadow:0 2px 18px rgba(242,198,107,.22);
  }
  .sub{ color:var(--dim); font-size:.88rem; text-align:center; margin:10px 0 0; max-width:280px; }
  .eyebrow{
    font-size:.68rem; font-weight:600; text-transform:uppercase; letter-spacing:.13em;
    color:var(--dim2); margin-bottom:10px;
  }
  .who{ font-size:1.55rem; font-weight:700; text-align:center; margin:2px 0 4px; letter-spacing:-.02em; }
  .whosub{ color:var(--dim); font-size:.82rem; text-align:center; margin-bottom:18px; }

  /* ---- home hero ---- */
  .hero{ display:flex; flex-direction:column; align-items:center; margin-top:7vh; }
  .applogo{
    width:88px; height:88px; border-radius:24px; display:block; margin-bottom:16px;
    box-shadow:0 14px 44px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.08);
  }
  .brand{ display:flex; align-items:center; gap:11px; margin-bottom:20px; }
  .brand img{ width:38px; height:38px; border-radius:11px; display:block; box-shadow:0 0 0 1px rgba(255,255,255,.08); }
  .brand h1{ font-size:1.4rem; }

  /* ---- knoppen ---- */
  .stack{ width:100%; max-width:320px; display:flex; flex-direction:column; gap:10px; }
  .btn{
    display:flex; align-items:center; justify-content:center; gap:8px;
    width:100%; max-width:320px; min-height:54px; padding:14px 20px;
    font-family:inherit; font-size:.97rem; font-weight:600; letter-spacing:-.01em;
    border:1px solid transparent; border-radius:var(--r); cursor:pointer;
    background:linear-gradient(135deg,var(--gold) 0%,var(--gold2) 100%); color:#231a45;
    box-shadow:0 6px 20px rgba(224,168,74,.22);
    transition:transform .12s ease, opacity .12s ease;
  }
  .stack .btn{ margin:0; }
  .btn + .btn{ margin-top:10px; }
  .stack .btn + .btn{ margin-top:0; }
  .btn:active{ transform:scale(.985); }
  .btn:disabled{ opacity:.35; box-shadow:none; }
  .btn.spotify{ background:var(--green); color:#07290f; box-shadow:0 6px 20px rgba(30,215,96,.2); }
  .btn.sec{
    background:var(--surf); color:var(--text); border-color:var(--line); box-shadow:none;
  }
  .btn.ghost{
    background:none; color:var(--dim); border:none; box-shadow:none; min-height:44px;
    font-size:.85rem; font-weight:500; padding:10px;
  }

  /* ---- status ---- */
  .pill{
    display:inline-flex; align-items:center; gap:7px;
    font-size:.74rem; font-weight:500; color:var(--dim);
    padding:7px 14px; border-radius:99px; background:var(--surf); border:1px solid var(--line);
    margin-bottom:18px;
  }
  .pill::before{ content:''; width:7px; height:7px; border-radius:50%; background:var(--red); }
  .pill.ok{ color:var(--text); } .pill.ok::before{ background:var(--green); box-shadow:0 0 8px rgba(30,215,96,.7); }

  /* ---- panelen ---- */
  .panel{
    width:100%; max-width:320px; background:var(--surf); border:1px solid var(--line);
    border-radius:var(--r); padding:16px 16px 14px; margin-bottom:10px;
  }
  .lbl{ font-size:.68rem; font-weight:600; text-transform:uppercase; letter-spacing:.13em; color:var(--dim2); margin-bottom:10px; }
  input[type=text]{
    width:100%; padding:13px 14px; border-radius:12px; border:1px solid var(--line);
    background:rgba(0,0,0,.22); color:var(--text); font-size:.95rem; font-family:inherit;
  }
  input[type=text]::placeholder{ color:var(--dim2); }
  input[type=text]:focus{ outline:none; border-color:var(--line2); background:rgba(0,0,0,.3); }
  .row{ display:flex; gap:8px; width:100%; max-width:320px; align-items:stretch; }
  .row .btn{ margin:0; }
  .plist{ list-style:none; padding:0; margin:0 0 12px; }
  .plist li{ display:flex; align-items:center; gap:10px; padding:10px 0; border-bottom:1px solid rgba(255,255,255,.06); font-size:.92rem; }
  .plist li:last-child{ border-bottom:none; }
  .plist .idx{ color:var(--dim2); font-size:.78rem; font-variant-numeric:tabular-nums; width:16px; }
  .plist .x{ margin-left:auto; background:none; border:none; color:var(--dim2); font-size:1rem; cursor:pointer; padding:4px 6px; line-height:1; }
  .plist .x:active{ color:var(--red); }
  .stepper{ display:flex; align-items:center; justify-content:space-between; gap:14px; }
  .stepper button{
    width:42px; height:42px; border-radius:12px; border:1px solid var(--line);
    background:rgba(0,0,0,.18); color:var(--gold); font-size:1.15rem; cursor:pointer; font-family:inherit;
  }
  .stepper button:active{ background:rgba(242,198,107,.14); }
  .stepper .val{ font-size:1.5rem; font-weight:700; color:var(--gold); font-variant-numeric:tabular-nums; }

  /* ---- scanner ---- */
  #reader{
    width:100%; max-width:320px; border-radius:20px; overflow:hidden;
    border:1px solid var(--line2); box-shadow:0 0 44px rgba(242,198,107,.14);
  }

  /* ---- tijdlijn ---- */
  .tl{ width:100%; max-width:340px; overflow-x:auto; padding:4px 2px 16px; -webkit-overflow-scrolling:touch; scrollbar-width:none; }
  .tl::-webkit-scrollbar{ display:none; }
  .tlrow{ display:flex; align-items:stretch; gap:7px; min-width:min-content; }
  .tcard{
    flex:0 0 auto; width:92px; background:var(--surf2); border:1px solid var(--line);
    border-radius:14px; padding:11px 8px; text-align:center;
  }
  .tcard .y{ font-size:1.1rem; font-weight:700; color:var(--gold); line-height:1.1; font-variant-numeric:tabular-nums; }
  .tcard .m{ font-size:.63rem; color:var(--dim); margin-top:5px; line-height:1.3; word-break:break-word; }
  .tcard.new{ border-color:rgba(30,215,96,.75); box-shadow:0 0 18px rgba(30,215,96,.28); }
  .tcard.bad{ border-color:rgba(255,122,122,.75); box-shadow:0 0 18px rgba(255,122,122,.28); }
  .gap{
    flex:0 0 auto; width:58px; min-height:76px; border-radius:14px;
    border:1px dashed var(--line2); background:rgba(242,198,107,.04);
    color:var(--gold); font-family:inherit; font-size:.66rem; font-weight:600; line-height:1.3;
    display:flex; align-items:center; justify-content:center; text-align:center; padding:6px 4px;
    cursor:pointer; font-variant-numeric:tabular-nums; transition:background .12s ease;
  }
  .gap.wide{ width:100%; min-width:220px; min-height:88px; font-size:.78rem; }
  .gap:active{ background:rgba(242,198,107,.2); }
  .tlempty{ color:var(--dim2); font-size:.82rem; text-align:center; padding:14px 0; }

  /* ---- speler ---- */
  .play{
    width:100%; max-width:320px; background:var(--surf); border:1px solid var(--line);
    border-radius:20px; padding:20px 18px; text-align:center;
  }
  .eq{ display:flex; gap:5px; justify-content:center; align-items:flex-end; height:42px; margin-bottom:16px; }
  .eq span{ width:5px; border-radius:99px; background:linear-gradient(var(--gold),var(--pink)); animation:b 1.05s ease-in-out infinite; }
  .eq span:nth-child(1){height:42%; animation-delay:0s} .eq span:nth-child(2){height:78%; animation-delay:.14s}
  .eq span:nth-child(3){height:100%; animation-delay:.28s} .eq span:nth-child(4){height:62%; animation-delay:.42s}
  .eq span:nth-child(5){height:86%; animation-delay:.56s}
  .eq.off span{ animation-play-state:paused; opacity:.22; }
  @keyframes b{0%,100%{transform:scaleY(.3)} 50%{transform:scaleY(1)}}
  .pbrow{ display:flex; gap:14px; justify-content:center; align-items:center; }
  .pbrow button{
    width:52px; height:52px; border-radius:50%; border:1px solid var(--line);
    background:rgba(0,0,0,.2); color:var(--text); font-size:1.15rem; cursor:pointer; font-family:inherit;
  }
  .pbrow button:active{ background:rgba(255,255,255,.1); }
  .pbrow button.main{
    width:66px; height:66px; border:none; font-size:1.4rem; color:#231a45;
    background:linear-gradient(135deg,var(--gold),var(--gold2));
    box-shadow:0 6px 22px rgba(224,168,74,.28);
  }
  .msg{ font-size:.82rem; color:var(--dim); min-height:2.5em; margin-top:16px; line-height:1.45; }

  /* ---- uitslag ---- */
  .verdict{ font-size:1.35rem; font-weight:700; text-align:center; margin:4px 0 14px; letter-spacing:-.02em; }
  .verdict.ok{ color:var(--green); } .verdict.no{ color:var(--red); }
  .rev{ text-align:center; margin-bottom:18px; }
  .rev .y{ font-size:3rem; font-weight:800; color:var(--gold); line-height:1; letter-spacing:-.03em; font-variant-numeric:tabular-nums; }
  .rev .m{ font-size:1.12rem; font-weight:600; margin-top:10px; letter-spacing:-.01em; }
  .rev .t{ color:var(--dim); font-size:.88rem; margin-top:5px; }
  .rev .a{ color:var(--dim2); font-size:.8rem; margin-top:2px; }

  /* ---- scores ---- */
  .scores{ width:100%; max-width:320px; display:flex; flex-direction:column; gap:6px; margin-top:6px; }
  .scores .s{
    display:flex; align-items:center; gap:10px; padding:11px 14px; border-radius:13px;
    background:var(--surf); border:1px solid transparent; font-size:.88rem;
  }
  .scores .s.cur{ background:rgba(242,198,107,.1); border-color:var(--line2); }
  .scores .n{ flex:1; font-weight:600; }
  .scores .c{ color:var(--gold); font-weight:700; font-variant-numeric:tabular-nums; }
  .tok{ font-size:.78rem; color:var(--dim); }

  .foot{ color:var(--dim2); font-size:.67rem; text-align:center; max-width:290px; margin-top:20px; line-height:1.6; }
  .trophy{ font-size:3.2rem; margin-bottom:10px; }
