:root{
  --bg-wall-1: #0b1020; /* deep asphalt */
  --bg-wall-2: #1b1f2a; /* charcoal */
  --spray-1: #ff3d6d;
  --spray-2: #ffd43b;
  --spray-3: #4ef0c6;
  --spray-4: #6b8cff;
  --panel:#0f1720;
  --muted:#e6e6e6;
  --shadow: 0 18px 40px rgba(0,0,0,0.6);
  --gap:12px;
  --safe-top: env(safe-area-inset-top);
  --safe-bottom: env(safe-area-inset-bottom);
  --outline: 8px;
}

/* base */
*{box-sizing:border-box}
html,body,#app{height:100%;margin:0;font-family:"Permanent Marker","Bangers",system-ui,-apple-system,Segoe UI,Roboto,Arial}
body{
  background:
    radial-gradient(circle at 10% 10%, rgba(255,255,255,0.4) 0, transparent 20%),
    linear-gradient(180deg,var(--bg-top),var(--bg-bottom));
  color:#1b1b1b;
  -webkit-font-smoothing:antialiased;
  font-size:16px;
  padding:12px;
  /* subtle halftone pattern using CSS gradients */
  background-image:
    linear-gradient(90deg, rgba(0,0,0,0.02) 1px, transparent 1px),
    radial-gradient(circle at 75% 25%, rgba(0,0,0,0.03) 0, transparent 10%);
  background-size: 6px 6px, 1200px 1200px;
}

/* top instruction banner — comic caption */
.top-instruction{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  padding:18px;
  background:linear-gradient(90deg, #fff3d9, #fff6e6);
  border-radius:18px;
  margin:0 6px;
  box-shadow: var(--soft-shadow);
  border: solid var(--comic-outline) #2b2b2b;
  transform: rotate(-1deg);
}
.top-instruction h1{
  margin:0;
  font-size:56px;
  color:#2b2b2b;
  font-weight:900;
  letter-spacing:1px;
  text-transform:uppercase;
  text-shadow: 2px 2px 0 #fff;
  -webkit-text-stroke: 2px #2b2b2b;
  animation: pulseBlink 1.2s infinite;
}
.top-instruction p{
  margin:0;
  font-size:14px;
  color:var(--muted);
  text-align:center;
  max-width:920px;
  font-weight:700;
}

/* big neon instruction style placed right under the title */
/* blinking / pulsing animation for instruction text */
@keyframes pulseBlink {
  0% { transform: translateY(0) scale(1); opacity:1; text-shadow: 0 0 6px #bfffee, 0 0 18px rgba(57,255,194,0.95), 0 8px 28px rgba(15,15,15,0.55); }
  50% { transform: translateY(-2px) scale(1.02); opacity:0.85; text-shadow: 0 0 10px #bfffee, 0 0 30px rgba(57,255,194,1), 0 12px 36px rgba(15,15,15,0.6); }
  100% { transform: translateY(0) scale(1); opacity:1; text-shadow: 0 0 6px #bfffee, 0 0 18px rgba(57,255,194,0.95), 0 8px 28px rgba(15,15,15,0.55); }
}

@keyframes fastBlink {
  0% { opacity:1; filter:brightness(1.0); }
  50% { opacity:0.3; filter:brightness(1.6); }
  100% { opacity:1; filter:brightness(1.0); }
}

.neon{
  margin-top:6px;
  font-size:48px;
  font-weight:900;
  color:#39ffc2; /* neon cyan-green */
  text-align:center;
  -webkit-text-stroke: 2px #0f0f0f;
  text-shadow:
    0 0 6px #bfffee,
    0 0 20px rgba(57,255,194,0.95),
    0 10px 30px rgba(15,15,15,0.55);
  letter-spacing:0.6px;
  display:block;
  animation: fastBlink 1s infinite;
}

/* slightly smaller on narrow screens */
@media (max-width:720px){
  .neon{ font-size:36px; }
  .top-instruction h1{ font-size:40px; }
}

/* prominent top PDF export button */
.top-export-btn{
  font-size:16px;
  padding:14px 18px;
  border-radius:14px;
  background: linear-gradient(90deg,#ff9a66,#ff6b6b);
  color:white;
  font-weight:900;
  border:6px solid #2b2b2b;
  box-shadow: 0 12px 30px rgba(0,0,0,0.18);
  cursor:pointer;
  transform: translateZ(0);
}
.top-export-btn:hover{transform:translateY(-3px)}

/* comic post-it / speech bubble styles */
.postit{
  margin-top:18px;
  background: linear-gradient(180deg,#fff8b8,#fff1a0);
  border-radius:10px;
  width:100%;
  max-width:1100px;
  min-height:170px;
  display:flex;
  flex-direction:column;
  gap:12px;
  align-self:center;
  transform: translateZ(0);
  position:relative;
  padding:18px;
  box-shadow: 0 16px 36px rgba(0,0,0,0.2);
  border: solid var(--comic-outline) #2b2b2b;
  font-weight:800;
}
.speech-bubble::after{
  content:"";
  position:absolute;
  left:24px;
  bottom:-18px;
  width:34px;height:34px;
  background:linear-gradient(180deg,#fff8b8,#fff1a0);
  transform: rotate(45deg);
  border-left: solid var(--comic-outline) #2b2b2b;
  border-top: solid var(--comic-outline) #2b2b2b;
  box-shadow: 0 10px 20px rgba(0,0,0,0.12);
}
.postit-title{
  font-weight:900;
  color:#2b2b2b;
  font-size:28px;
  letter-spacing:0.6px;
  text-transform:uppercase;
  text-shadow: 1px 1px 0 #fff;
}
.postit-body{
  font-size:18px;
  color:#2b2b2b;
  line-height:1.45;
}

/* layout */
.container{height:calc(100vh - 220px);display:flex;flex-direction:column;padding:calc(var(--safe-top) + 14px) 8px calc(var(--safe-bottom) + 12px) 8px;gap:12px}
.tabs{display:flex;gap:10px;justify-content:flex-start;align-items:center;flex-wrap:nowrap;overflow:auto;padding:6px 2px}
.tab{
  background:#fff;
  border-radius:999px;padding:10px 14px;font-weight:900;font-size:15px;color:#222;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);min-width:90px;text-align:center;transition:transform .12s ease, box-shadow .12s ease;
  border: 4px solid #2b2b2b;
}
.tab:hover{transform:translateY(-3px)}
.tab.active{color:#fff;background:linear-gradient(90deg,var(--accent),var(--accent-2));box-shadow:none;border-color:transparent}

/* content cards with comic outline */
.content{flex:1;overflow:hidden;display:flex;flex-direction:column;gap:12px;align-items:stretch}
.section{background:transparent;display:flex;flex-direction:column;gap:12px;overflow:auto;padding:6px}
.group{
  background:linear-gradient(180deg,#fff,#fff3e6);
  border-radius:10px;
  padding:12px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.16);
  display:flex;flex-direction:column;
  gap:10px;overflow:hidden;
  transition:box-shadow .12s ease, transform .12s ease;
  border: solid var(--comic-outline) #2b2b2b;
}
.group.dragging {
  box-shadow:0 24px 50px rgba(0,0,0,0.22);
  transform:scale(1.02) rotate(-0.6deg);
}
.group-header{display:flex;justify-content:space-between;align-items:center;gap:10px}
.group-left{display:flex;align-items:center;gap:12px}
.group-handle{width:46px;height:46px;border-radius:12px;background:linear-gradient(180deg,#ffdede,#fff1f0);color:#2b2b2b;display:flex;align-items:center;justify-content:center;font-weight:900;flex-shrink:0;cursor:grab;border:4px solid #2b2b2b}
.group-title{
  font-weight:900;
  font-size:22px;
  color:#2b2b2b;
  text-shadow:1px 1px 0 #fff;
  letter-spacing:0.4px;
}
.helper{font-size:13px;color:var(--muted);font-weight:700}

/* list / items styled like comic panels */
.list{display:flex;flex-direction:column;gap:12px;padding-bottom:6px}
.item{
  background: linear-gradient(180deg,#fff,#fff9f4);
  border-radius:10px;padding:12px 12px;display:flex;align-items:center;gap:12px;
  box-shadow:0 8px 18px rgba(0,0,0,0.14);
  user-select:none;
  cursor:grab;
  touch-action:pan-y;
  border: 4px solid #2b2b2b;
  position:relative;
}
.item:active{cursor:grabbing}
.handle{width:46px;height:46px;border-radius:10px;background:linear-gradient(180deg,#fff3d9,#fff0d6);color:#2b2b2b;display:flex;align-items:center;justify-content:center;font-weight:900;flex-shrink:0;border:3px solid #2b2b2b}
.label{flex:1;font-size:17px;font-weight:900;color:#2b2b2b}
.rank-badge{width:46px;height:46px;border-radius:50%;background:conic-gradient(#fff6d8,#ffd8d8);color:#2b2b2b;display:flex;align-items:center;justify-content:center;font-weight:900;border:4px solid #2b2b2b;box-shadow: 0 6px 14px rgba(0,0,0,0.12);font-size:16px}

/* footer / buttons — pop comic buttons */
.footer{display:flex;gap:10px;justify-content:space-between;align-items:center;padding-top:8px}
.btn{background:linear-gradient(90deg,#ff6b6b,#ff9a66);color:white;padding:12px 14px;border-radius:12px;border:0;font-weight:900;box-shadow: 0 10px 22px rgba(0,0,0,0.18);transition:transform .12s ease, opacity .12s ease;border:4px solid #2b2b2b}
.btn:hover{transform:translateY(-3px)}
.btn.muted{background:#fff;color:#2b2b2b;border:4px solid #2b2b2b;box-shadow:0 8px 18px rgba(0,0,0,0.12)}

/* modal with comic border */
.modal{position:fixed;inset:0;background:rgba(0,0,0,0.35);display:flex;align-items:center;justify-content:center;padding:20px}
.hidden{display:none}
.modal-card{width:100%;max-width:720px;background:var(--card);border-radius:12px;padding:12px;box-shadow:0 20px 40px rgba(0,0,0,0.2);display:flex;flex-direction:column;gap:8px;border:6px solid #2b2b2b}
textarea{width:100%;height:220px;border-radius:6px;padding:8px;border:2px dashed #2b2b2b;font-family:monospace}
.modal-actions{display:flex;gap:8px;justify-content:flex-end}

/* responsive tweaks */
@media (max-width:720px){
  body{font-size:15px;padding:8px}
  .tabs{gap:8px;padding:6px 0;overflow-x:auto}
  .tab{min-width:84px;padding:9px 12px;font-size:14px}
  .group-title{font-size:16px}
  .item{padding:10px}
  textarea{height:160px}
}