/* Specenstein — haunted laboratory theme. See .kiro/steering/design-language.md */
:root {
  --bg: #12081f;
  --bg2: #1b0f2e;
  --panel: #211338;
  --bone: #f3ead8;
  --muted: #c9b8e8;
  --pumpkin: #ff7a1a;
  --spectral: #8dff6a;
  --witch: #8b5cf6;
  --danger: #ff5a5a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--bone);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg2) 60%, var(--bg) 100%);
  min-height: 100vh;
  line-height: 1.55;
}

.lab-header {
  text-align: center;
  padding: 2.5rem 1rem 1rem;
}

.wordmark {
  font-family: "Creepster", "Inter", cursive;
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  letter-spacing: 0.06em;
  color: var(--pumpkin);
  text-shadow: 0 0 22px rgba(255, 122, 26, 0.45), 0 3px 0 #5b2100;
}

.tagline { color: var(--muted); margin: 0.4rem auto 1.2rem; max-width: 40rem; }

.lantern-wrap { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; }

.lantern {
  position: relative;
  width: 92px; height: 92px;
  border-radius: 50%;
  border: 3px dashed rgba(255, 122, 26, 0.55);
  overflow: hidden;
  background: #2a1a12;
}
.lantern-fill {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 0%;
  background: radial-gradient(circle at 50% 80%, #ffd23e, var(--pumpkin) 70%);
  transition: height 0.6s ease;
}
.lantern-face {
  position: relative; z-index: 1;
  font-size: 3rem; line-height: 92px;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.6));
}
.lantern-label { color: var(--muted); font-size: 0.9rem; max-width: 34rem; }
.lantern-label.complete { color: var(--spectral); font-weight: 600; }

main { max-width: 72rem; margin: 0 auto; padding: 1rem; }

.panel {
  background: var(--panel);
  border: 2px dashed rgba(243, 234, 216, 0.35); /* stitched seam */
  border-radius: 14px;
  padding: 1.2rem 1.4rem;
  margin-bottom: 1.4rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.panel h2, .panel h3 {
  font-family: "Creepster", "Inter", cursive;
  letter-spacing: 0.05em;
  color: var(--pumpkin);
  margin-top: 0;
}

label { display: block; font-weight: 600; margin: 0.8rem 0 0.3rem; }
label .optional { color: var(--muted); font-weight: 400; }

input[type="text"], textarea {
  width: 100%;
  background: #150b28;
  color: var(--bone);
  border: 1px solid rgba(139, 92, 246, 0.6);
  border-radius: 8px;
  padding: 0.65rem 0.8rem;
  font: inherit;
}
input[type="text"]:focus-visible, textarea:focus-visible,
button:focus-visible, input[type="checkbox"]:focus-visible {
  outline: 3px solid var(--spectral);
  outline-offset: 2px;
}

.warning { color: var(--danger); font-weight: 600; }

.preset-row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0.9rem 0; color: var(--muted); }

button {
  font: inherit;
  cursor: pointer;
  border-radius: 999px;
  border: 1px solid rgba(243,234,216,0.4);
  background: #2d1b4d;
  color: var(--bone);
  padding: 0.45rem 1rem;
}
button:hover { border-color: var(--pumpkin); }
button.primary {
  background: var(--pumpkin);
  color: #22100a;
  font-weight: 800;
  border: none;
  padding: 0.7rem 1.4rem;
  box-shadow: 0 0 18px rgba(255,122,26,0.35);
}
button.primary:hover { background: #ff8c3b; }
button.ghost { background: transparent; }

.spec-title { font-family: "Creepster", "Inter", cursive; color: var(--spectral); letter-spacing: 0.04em; margin-bottom: 0; }
.spec-meta { color: var(--muted); margin-top: 0.2rem; }

.jars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; align-items: start; }
.jar { margin-bottom: 0; max-height: 34rem; overflow: auto; }
.jar h3 { color: var(--witch); }

.req-list { padding-left: 1.2rem; margin: 0; }
.req-list li { margin-bottom: 0.6rem; font-size: 0.92rem; }
.req-list .ears { color: var(--spectral); font-weight: 600; }

#designBody h4, #taskBody h4 { color: var(--pumpkin); margin: 0.9rem 0 0.3rem; font-size: 0.95rem; }
#designBody ul { margin: 0.2rem 0 0.6rem; padding-left: 1.1rem; font-size: 0.92rem; }
#designBody p { font-size: 0.92rem; }

.task-phase { margin-bottom: 0.6rem; }
.task-item { display: flex; gap: 0.55rem; align-items: flex-start; padding: 0.3rem 0; font-size: 0.92rem; }
.task-item input[type="checkbox"] { margin-top: 0.25rem; accent-color: var(--pumpkin); width: 1.05rem; height: 1.05rem; flex: none; }
.task-item.done span.task-text { color: var(--spectral); text-decoration: line-through; }
.size-chip {
  flex: none;
  font-size: 0.72rem; font-weight: 800;
  border: 1px solid var(--witch); color: var(--muted);
  border-radius: 6px; padding: 0.05rem 0.35rem; margin-top: 0.15rem;
}

.actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 1.2rem 0 0.4rem; align-items: center; }
.export-note { color: var(--spectral); }

.how code { background: #150b28; padding: 0.1rem 0.35rem; border-radius: 6px; color: var(--spectral); }
.how-note { color: var(--muted); }

footer { text-align: center; color: var(--muted); padding: 1rem 1rem 2.2rem; font-size: 0.88rem; }

@keyframes flicker {
  0%, 100% { opacity: 1; }
  92% { opacity: 1; }
  93% { opacity: 0.55; }
  94% { opacity: 1; }
  97% { opacity: 0.7; }
  98% { opacity: 1; }
}
.lantern { animation: flicker 6s infinite; }

@media (max-width: 720px) {
  .jars { grid-template-columns: 1fr; }
  .jar { max-height: none; }
}

@media (prefers-reduced-motion: reduce) {
  .lantern { animation: none; }
  .lantern-fill { transition: none; }
}
