@import url('https://fonts.googleapis.com/css2?family=Bungee&family=VT323&family=Baloo+2:wght@500;700;800&display=swap');

:root{
  --ink:#1a0033;
  --deep:#3d0099;
  --water:#00e5ff;
  --mint:#f0f0ff;
  --paper:#fffbe6;
  --sun:#ffe600;
  --coral:#ff3399;
  --lime:#39ff14;
  --line:#000;
  --muted:#5b3a8a;
  --shadow:6px 6px 0 #000;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}

body{
  margin:0;
  color:var(--ink);
  font:17px/1.5 'Baloo 2','Comic Sans MS',cursive,sans-serif;
  background:
    radial-gradient(#fff 1px,transparent 1.5px) 0 0/22px 22px,
    radial-gradient(#fff 1px,transparent 1.5px) 11px 11px/22px 22px,
    repeating-linear-gradient(45deg,#7d00ff 0 40px,#3d0099 40px 80px);
  background-attachment:fixed;
}

button,input,textarea{font:inherit}
button{cursor:pointer}

.app-shell{
  min-height:100vh;
  max-width:760px;
  margin:auto;
  background:var(--paper);
  border-left:4px solid #000;
  border-right:4px solid #000;
  box-shadow:0 0 0 4px var(--sun),0 0 40px #000a;
}

.topbar{
  height:72px;
  padding:12px 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  background:#000;
  color:#fff;
  position:sticky;
  top:0;
  z-index:10;
  border-bottom:4px solid var(--sun);
  background-image:repeating-linear-gradient(90deg,#ff3399 0 4px,transparent 4px 8px);
  background-size:100% 3px;
  background-repeat:no-repeat;
  background-position:bottom;
}

.brand{
  text-decoration:none;
  display:flex;
  align-items:center;
  gap:10px;
  font:14px/1 'Bungee',cursive;
  letter-spacing:1px;
  background:linear-gradient(90deg,#ff3399,#ffe600,#39ff14,#00e5ff,#ff3399);
  background-size:300% auto;
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
  animation:rainbow 4s linear infinite;
}
.brand em{
  font-style:normal;
  font-size:10px;
  letter-spacing:2px;
  display:block;
}
.brand-mark{
  display:block;
  width:38px;
  height:38px;
  object-fit:cover;
  border:3px solid #000;
  border-radius:50%;
  box-shadow:3px 3px 0 #ff3399;
  animation:spin 6s linear infinite;
}

.topbar-actions{display:flex;align-items:center;gap:10px}
.score-pill{
  background:var(--lime);
  color:#000;
  border:2px solid #000;
  border-radius:99px;
  padding:6px 12px;
  font:800 13px 'Baloo 2';
  box-shadow:2px 2px 0 #000;
}
.icon-button{
  border:2px solid #fff;
  background:var(--coral);
  color:#fff;
  font-size:17px;
  padding:4px 9px;
  border-radius:6px;
  box-shadow:2px 2px 0 #000;
}

.screen{padding:26px 20px 44px;animation:rise .35s ease both}

.hero{
  min-height:calc(100vh - 72px);
  display:flex;
  flex-direction:column;
  justify-content:center;
  position:relative;
  overflow:hidden;
  background:linear-gradient(155deg,var(--deep) 0 53%,var(--water) 53%);
  color:#fff;
  padding:34px 24px;
  border-bottom:4px solid #000;
}
.hero:after{
  content:'★ ALTENA ★';
  position:absolute;
  right:-25px;
  bottom:40px;
  font:700 46px/1 'Bungee',cursive;
  letter-spacing:-2px;
  color:#ffffff17;
  transform:rotate(-8deg);
}
.eyebrow,.kicker{
  color:#000;
  background:var(--sun);
  display:inline-block;
  padding:3px 10px;
  border:2px solid #000;
  font:700 12px 'Baloo 2';
  letter-spacing:1.5px;
  text-transform:uppercase;
  box-shadow:2px 2px 0 #000;
}
.hero-logo{
  position:absolute;
  top:16px;
  right:16px;
  width:clamp(90px,22vw,150px);
  height:clamp(90px,22vw,150px);
  z-index:3;
  filter:drop-shadow(4px 4px 0 #000);
}
.hero-photo{
  display:block;
  width:130px;
  aspect-ratio:3/4;
  object-fit:cover;
  border:4px solid #fff;
  outline:3px solid #000;
  box-shadow:5px 5px 0 #000;
  transform:rotate(-5deg);
  margin:16px 0 0;
}
.hero h1{
  max-width:560px;
  margin:16px 0 18px;
  font:400 clamp(38px,11vw,66px)/1 'Bungee',cursive;
  letter-spacing:-1px;
  text-shadow:4px 4px 0 #ff3399,8px 8px 0 #000;
}
.hero p{max-width:480px;font-size:18px;color:#f0e6ff}
.hero-stats{display:flex;gap:18px;margin:28px 0 32px;flex-wrap:wrap}
.hero-actions{margin:-14px 0 26px}
.stat{
  background:#fff;
  color:#000;
  border:3px solid #000;
  border-radius:8px;
  padding:8px 14px;
  box-shadow:var(--shadow);
}
.stat strong{display:block;font:700 25px 'Baloo 2'}
.stat span{display:block;font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:1px}

.primary-button,.secondary-button{
  display:inline-flex;
  justify-content:center;
  align-items:center;
  min-height:54px;
  border:3px solid #000;
  border-radius:8px;
  padding:13px 20px;
  font:800 15px 'Baloo 2';
  text-transform:uppercase;
  letter-spacing:.5px;
  text-decoration:none;
  box-shadow:var(--shadow);
  transition:transform .05s, box-shadow .05s;
}
.primary-button:active,.secondary-button:active{
  transform:translate(4px,4px);
  box-shadow:0 0 0 #000;
}
.primary-button{background:var(--sun);color:#000}
.secondary-button{background:var(--water);color:#000}
.button-row{display:flex;gap:10px;flex-wrap:wrap}
.wide{width:100%}

.resume-banner{
  background:repeating-linear-gradient(45deg,#ffe600,#ffe600 10px,#000 10px,#000 12px);
  color:#000;
  padding:2px;
  margin-bottom:22px;
  border-radius:6px;
}
.resume-banner strong{
  display:block;
  background:var(--paper);
  margin:4px;
  padding:10px 12px;
  border-radius:3px;
}

.section-title{
  font:400 30px/1.1 'Bungee',cursive;
  margin:10px 0 14px;
  color:var(--deep);
  text-shadow:3px 3px 0 var(--sun);
}
.lede{color:var(--muted);margin-top:0;font-weight:700}

.form-card,.info-card,.question-card,.finish-card{
  background:#fff;
  border:3px solid #000;
  border-radius:10px;
  padding:20px;
  box-shadow:var(--shadow);
  margin:20px 0;
}

.field{display:block;margin:16px 0}
.field span{display:block;font-weight:800;margin-bottom:7px;color:var(--deep)}
.field input,.field textarea{
  width:100%;
  border:2px solid #000;
  border-radius:6px;
  padding:13px;
  background:var(--mint);
  color:var(--ink);
  outline:0;
}
.field input:focus,.field textarea:focus{
  border-color:var(--coral);
  box-shadow:3px 3px 0 var(--coral);
}

.rules{display:grid;gap:10px;padding:0;list-style:none;color:var(--muted);font-weight:700}
.rules li{display:flex;gap:9px}
.rules li:before{content:'★';color:var(--coral)}

.score-grid{display:grid;gap:14px;margin:22px 0}
.score-rule{
  display:grid;
  grid-template-columns:minmax(86px,auto) 1fr;
  gap:12px;
  align-items:center;
  background:#fff;
  border:3px solid #000;
  border-radius:10px;
  padding:14px;
  box-shadow:4px 4px 0 #000;
}
.score-rule strong{
  color:#000;
  background:var(--sun);
  border:2px solid #000;
  border-radius:6px;
  padding:8px 10px;
  text-align:center;
  font:800 19px 'Baloo 2';
  white-space:nowrap;
}
.score-rule span{color:var(--muted);font-weight:700}
.score-formula{
  background:var(--deep);
  color:#fff;
  border:3px solid #000;
  border-radius:10px;
  padding:16px;
  margin:20px 0;
  box-shadow:var(--shadow);
}
.score-formula strong{display:block;color:var(--sun);font-size:21px}
.score-formula span{display:block;margin-top:5px;color:#f0e6ff;font-weight:700}

.progress-wrap{display:flex;align-items:center;gap:12px;margin-bottom:18px}
.progress{
  height:14px;
  flex:1;
  background:#fff;
  border:2px solid #000;
  border-radius:10px;
  overflow:hidden;
}
.progress span{
  display:block;
  height:100%;
  background:repeating-linear-gradient(45deg,var(--coral) 0 8px,var(--sun) 8px 16px);
  transition:width .5s ease;
}
.stop-meta{
  display:flex;
  justify-content:space-between;
  color:#fff;
  background:var(--deep);
  padding:4px 10px;
  border-radius:5px;
  font:700 12px 'Baloo 2';
  text-transform:uppercase;
  letter-spacing:1px;
}
.stop-title{
  font:400 34px/1.1 'Bungee',cursive;
  letter-spacing:-1px;
  margin:14px 0;
  color:var(--coral);
  text-shadow:3px 3px 0 #000;
}
.location-label{color:var(--coral);font-weight:800}

.illustration{
  height:190px;
  margin:18px -20px;
  display:grid;
  place-items:center;
  position:relative;
  overflow:hidden;
  background:linear-gradient(160deg,var(--water),var(--deep));
  color:#fff;
  border-top:3px solid #000;
  border-bottom:3px solid #000;
}
.illustration:before{
  content:'';
  position:absolute;
  width:170%;
  height:80px;
  bottom:-26px;
  background:var(--ink);
  border-radius:50% 50% 0 0/100% 100% 0 0;
  transform:rotate(-4deg);
}
.illustration span{
  position:relative;
  z-index:1;
  font:400 42px 'Bungee',cursive;
  opacity:.9;
}
.photo-note{
  position:absolute;
  bottom:10px;
  z-index:2;
  background:var(--sun);
  border:2px solid #000;
  padding:5px 9px;
  font-size:11px;
  font-weight:800;
}

.detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:16px 0}
.detail{background:var(--mint);border:2px solid #000;padding:12px;border-radius:6px}
.detail small{display:block;color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:1px}
.detail strong{display:block;margin-top:3px}

.question-card{border-left:6px solid var(--coral)}
.question-card h3{margin:0 0 10px;font:400 21px/1.2 'Bungee',cursive;color:var(--deep)}
.question-photo{
  display:block;
  width:100%;
  max-height:320px;
  object-fit:cover;
  border:3px solid #000;
  border-radius:8px;
  box-shadow:4px 4px 0 #000;
  margin:0 0 14px;
}
.question-photo.is-blurry{
  filter:blur(var(--photo-blur));
  transform:scale(1.02);
}
.hint-photo{
  width:min(100%,260px);
  height:auto;
  max-height:none;
  object-fit:contain;
  margin:12px auto 0;
}
.question-timer{
  background:var(--mint);
  border:2px solid #000;
  border-radius:8px;
  padding:10px;
  margin:0 0 14px;
  box-shadow:3px 3px 0 #000;
}
.timer-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  color:#000;
  font-weight:800;
  text-transform:uppercase;
}
.timer-track{
  height:12px;
  overflow:hidden;
  background:#fff;
  border:2px solid #000;
  border-radius:999px;
  margin:7px 0;
}
.timer-track span{
  display:block;
  height:100%;
  background:linear-gradient(90deg,var(--lime),var(--sun),var(--coral));
  transition:width .2s linear;
}
.question-timer small{
  display:block;
  color:var(--muted);
  font-weight:800;
}
.question-timer.is-empty .timer-track span{background:var(--coral)}
.question-card select,.answer-input{
  width:100%;
  padding:13px;
  border:2px solid #000;
  border-radius:6px;
  background:var(--mint);
  color:var(--ink);
}
.choice{
  display:block;
  padding:11px;
  border:2px solid #000;
  border-radius:6px;
  margin:8px 0;
  background:#fff;
}
.choice input{margin-right:8px}

.hint{
  display:block;
  background:var(--sun);
  padding:11px 13px;
  margin:13px 0;
  border:2px dashed #000;
  color:#000;
  font-weight:700;
}
.feedback{font-weight:800;padding:11px 0}
.success{color:#0a7d2c;animation:blink 1s step-end 3}
.error{color:#c8003c}

.map-button{color:var(--deep);font-weight:800;text-decoration:underline wavy var(--coral)}

.pause-screen{text-align:center;padding-top:80px}

.code-strip{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}
.code-chip{
  display:grid;
  place-items:center;
  width:42px;
  height:42px;
  background:var(--deep);
  color:var(--sun);
  border:2px solid #000;
  border-radius:5px;
  font:700 20px 'VT323',monospace;
  box-shadow:2px 2px 0 #000;
}

.score-big{
  font:400 60px 'Bungee',cursive;
  color:var(--coral);
  line-height:1;
  text-shadow:4px 4px 0 var(--sun);
}
.finish-card{background:var(--deep);color:#fff;border:3px solid var(--sun)}
.finish-card .muted{color:#d9c8ff}
.result-row{display:flex;justify-content:space-between;border-bottom:2px dotted #ffffff55;padding:9px 0}

.footer-links{display:flex;gap:8px;flex-wrap:wrap;margin-top:18px}
.privacy-note{
  text-align:center;
  color:#fff;
  background:var(--ink);
  font:12px 'VT323',monospace;
  letter-spacing:.5px;
  padding:10px 20px;
}

#app:focus{outline:0}

.modal-overlay{
  position:fixed;
  inset:0;
  background:#1a0033cc;
  display:grid;
  place-items:center;
  padding:20px;
  z-index:100;
  animation:rise .15s ease both;
}
.modal-box{
  background:var(--paper);
  border:3px solid #000;
  border-radius:10px;
  box-shadow:var(--shadow);
  padding:22px;
  max-width:420px;
  width:100%;
}
.modal-box p{margin:0 0 18px;font-weight:700;color:var(--ink)}
.modal-box .button-row{flex-wrap:nowrap}
.modal-box .button-row button{flex:1}

::selection{background:var(--coral);color:#fff}
::-webkit-scrollbar{width:14px}
::-webkit-scrollbar-track{background:#000}
::-webkit-scrollbar-thumb{background:var(--sun);border:3px solid #000}

@keyframes rise{from{opacity:0;transform:translateY(9px)}to{opacity:1;transform:none}}
@keyframes rainbow{to{background-position:300% center}}
@keyframes spin{to{transform:rotate(360deg)}}
@keyframes blink{50%{opacity:.15}}

@media(min-width:700px){
  .hero{padding:70px 60px}
  .screen{padding:34px 50px 60px}
  .illustration{margin-left:-50px;margin-right:-50px;height:230px}
}
@media(prefers-reduced-motion:reduce){
  *,*:before,*:after{animation:none!important;transition:none!important}
}
@media print{
  .topbar,.privacy-note,.button-row,.hint,.feedback{display:none!important}
  .screen{padding:0}
  .form-card,.question-card{box-shadow:none;break-inside:avoid}
}
