:root {
  color-scheme: dark; --pad: 16px;
  --bg: #070b1a; --panel: #0e1430; --line: #26306b; --text: #e6ecff; --muted: #9aa6d6;
  --cyan: #38f9ff; --pink: #ff3df2; --green: #7dff6b; --amber: #ffd23d; --red: #ff4d6d;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: radial-gradient(ellipse at top, #141c48 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--text); font: 16px/1.5 -apple-system, system-ui, sans-serif;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
main { max-width: 900px; margin: 0 auto; padding: var(--pad); }
button, input, select { font-size: 16px; min-height: 44px; }
h1 { margin: 0; font-size: 1.35rem; letter-spacing: .04em; color: var(--cyan); text-shadow: 0 0 8px rgba(56,249,255,.6); }
h2 { margin: 0 0 12px; font-size: 1rem; text-transform: uppercase; letter-spacing: .12em; color: var(--pink); }

.bridge { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.mascot { width: 64px; height: 64px; flex: none; filter: drop-shadow(0 0 6px rgba(56,249,255,.5)); }
.mascot.sm { width: 44px; height: 44px; }
.hello, .mini, .source { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }
.source { font-size: .8rem; }

.sample-banner {
  margin: 0 0 var(--pad); padding: 8px 12px; border: 1px dashed var(--amber); border-radius: 10px;
  color: var(--amber); font-weight: 700; text-align: center; letter-spacing: .08em;
}
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: var(--pad);
  margin-bottom: var(--pad); box-shadow: 0 0 18px rgba(56,249,255,.08) inset;
}
.gauges { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.gauge { border: 1px solid var(--line); border-radius: 12px; padding: 12px; min-width: 0; }
.g-name { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; }
.g-val { font-size: 1.6rem; font-weight: 700; }
.g-val.small { font-size: 1.05rem; }
.g-detail { color: var(--muted); font-size: .8rem; margin-top: 6px; overflow-wrap: anywhere; }
.gauge.ok .g-val { color: var(--green); }
.gauge.warn .g-val { color: var(--amber); }
.gauge.critical .g-val { color: var(--red); }
.gauge.unknown .g-val { color: var(--muted); }

.bar { height: 10px; border-radius: 6px; background: #1a2250; overflow: hidden; margin-top: 8px; }
.bar > span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--cyan), var(--pink)); box-shadow: 0 0 10px var(--cyan); transition: width .6s ease; }
.gauge.warn .bar > span { background: var(--amber); box-shadow: 0 0 10px var(--amber); }
.gauge.critical .bar > span { background: var(--red); box-shadow: 0 0 10px var(--red); }
.bar-label { margin: 6px 0 0; font-size: .9rem; }

.checklist, .list { list-style: none; margin: 10px 0 0; padding: 0; }
.checklist li { display: grid; grid-template-columns: 24px 1fr; gap: 0 6px; padding: 6px 0; border-top: 1px solid var(--line); }
.checklist small { grid-column: 2; color: var(--muted); }
.checklist .done .tick { color: var(--green); }
.checklist .pending .tick { color: var(--amber); }
.list li { padding: 6px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.task.done { color: var(--muted); text-decoration: line-through; }

.side-mascot, .foot { display: flex; align-items: center; gap: 10px; }
.controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.controls button { flex: 1 1 120px; border-radius: 10px; border: 1px solid var(--line); background: #141b40; color: var(--muted); }
.controls button:disabled { opacity: .55; cursor: not-allowed; }
.foot { justify-content: center; padding: 8px 0 24px; }

@media (prefers-reduced-motion: reduce) { .bar > span { transition: none; } }

/* ---- Mascots: tappable, idle bob + blink + glow pulse. Only transform/opacity animate (cheap, GPU-friendly). ---- */
.mascot-btn {
  flex: none; display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0;
  background: none; border: 0; border-radius: 50%; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.mascot-btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }
.mascot-btn { --bob: 3.2s; --bob-delay: 0s; --blink-delay: 0s; }
#bolt-btn { --bob: 2.6s; --bob-delay: -.8s; --blink-delay: -2s; }
#nova-btn { --bob: 3.8s; --bob-delay: -1.6s; --blink-delay: -3.5s; }
.mascot-btn svg { animation: bob var(--bob) ease-in-out var(--bob-delay) infinite; }
.mascot-btn .eyes { transform-box: fill-box; transform-origin: center; animation: blink 5s var(--blink-delay) infinite; }
.mascot-btn .halo { opacity: .2; animation: pulse 2.4s ease-in-out infinite; }
.mascot-btn .beacon { animation: pulse 1.2s ease-in-out infinite; }
.mascot-btn.mood-warn .halo { stroke: var(--amber); animation-duration: 1.4s; }
.mascot-btn.mood-critical .halo { stroke: var(--red); animation-duration: .8s; }
.mascot-btn.react svg { animation: hop .5s ease-out; }

@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
@keyframes pulse { 0%, 100% { opacity: .2; } 50% { opacity: .9; } }
@keyframes hop { 0% { transform: translateY(0) scale(1); } 40% { transform: translateY(-8px) scale(1.08) rotate(-6deg); } 100% { transform: translateY(0) scale(1); } }

@media (prefers-reduced-motion: reduce) {
  .mascot-btn svg, .mascot-btn .eyes, .mascot-btn .halo, .mascot-btn .beacon { animation: none !important; }
  .mascot-btn .halo { opacity: .6; }
  .mascot-btn.react svg { animation: none !important; }
  .mascot-btn.react .halo { opacity: 1; } /* still-image reaction: halo lights up, no motion */
}
