:root {
  --bg: #030605;
  --ink: #eaf2ec;
  --ink-soft: #a9bcb1;
  --muted: #6f847a;
  --line: rgba(143, 212, 196, 0.18);
  --glow: #4fd6c4;
  --glow-soft: rgba(79, 214, 196, 0.45);
  --violet: #9b7bff;
  --amber: #ffb347;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --font-display: "Syne", sans-serif;
  --font-body: "Sora", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
}

body.kiosk {
  color: var(--ink);
  font-family: var(--font-body);
  background: var(--bg);
  overflow: hidden;
  cursor: none;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

body.kiosk.show-cursor {
  cursor: auto;
}

.grain,
.scanlines {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 50;
}

.grain {
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.scanlines {
  opacity: 0.06;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 2px,
    rgba(0, 0, 0, 0.35) 3px,
    rgba(0, 0, 0, 0.35) 4px
  );
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  transition: background 0.9s var(--ease);
  background:
    radial-gradient(1100px 760px at 50% 42%, rgba(70, 170, 255, 0.32), transparent 58%),
    radial-gradient(900px 600px at 18% 78%, rgba(40, 120, 220, 0.18), transparent 55%),
    radial-gradient(700px 500px at 85% 20%, rgba(100, 200, 255, 0.12), transparent 50%),
    radial-gradient(120% 100% at 50% 50%, transparent 40%, rgba(0, 0, 0, 0.75) 100%);
}

body[data-mode="cool"]::before {
  background:
    radial-gradient(1100px 760px at 50% 42%, rgba(70, 170, 255, 0.32), transparent 58%),
    radial-gradient(900px 600px at 18% 78%, rgba(40, 120, 220, 0.18), transparent 55%),
    radial-gradient(700px 500px at 85% 20%, rgba(100, 200, 255, 0.12), transparent 50%),
    radial-gradient(120% 100% at 50% 50%, transparent 40%, rgba(0, 0, 0, 0.75) 100%);
}

body[data-mode="heat"]::before {
  background:
    radial-gradient(1100px 760px at 50% 60%, rgba(255, 140, 40, 0.38), transparent 58%),
    radial-gradient(900px 600px at 80% 25%, rgba(255, 90, 30, 0.22), transparent 55%),
    radial-gradient(700px 500px at 15% 30%, rgba(255, 180, 60, 0.14), transparent 50%),
    radial-gradient(120% 100% at 50% 50%, transparent 40%, rgba(0, 0, 0, 0.75) 100%);
}

body[data-mode="mist"]::before {
  background:
    radial-gradient(1100px 760px at 50% 36%, rgba(80, 230, 210, 0.36), transparent 58%),
    radial-gradient(900px 600px at 75% 70%, rgba(60, 200, 220, 0.2), transparent 55%),
    radial-gradient(700px 500px at 20% 25%, rgba(140, 255, 235, 0.14), transparent 50%),
    radial-gradient(120% 100% at 50% 50%, transparent 40%, rgba(0, 0, 0, 0.72) 100%);
}

body[data-mode="sanitize"]::before {
  background:
    radial-gradient(1100px 760px at 50% 40%, rgba(160, 120, 255, 0.4), transparent 58%),
    radial-gradient(900px 600px at 20% 75%, rgba(120, 70, 230, 0.24), transparent 55%),
    radial-gradient(700px 500px at 85% 20%, rgba(200, 160, 255, 0.16), transparent 50%),
    radial-gradient(120% 100% at 50% 50%, transparent 40%, rgba(0, 0, 0, 0.75) 100%);
}

body[data-mode="recycle"]::before {
  background:
    radial-gradient(1100px 760px at 48% 48%, rgba(70, 220, 130, 0.36), transparent 58%),
    radial-gradient(900px 600px at 75% 22%, rgba(40, 180, 100, 0.22), transparent 55%),
    radial-gradient(700px 500px at 18% 70%, rgba(120, 255, 170, 0.14), transparent 50%),
    radial-gradient(120% 100% at 50% 50%, transparent 40%, rgba(0, 0, 0, 0.75) 100%);
}

/* Bars */
.kiosk-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  height: 3.5rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem;
  padding: 0 clamp(1rem, 3vw, 2rem);
  border-bottom: 1px solid var(--line);
  background: rgba(3, 6, 5, 0.78);
  backdrop-filter: blur(14px);
}

.kiosk-bar__brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.04em;
  color: var(--ink);
  text-decoration: none;
  text-shadow: 0 0 22px var(--glow-soft);
}

.kiosk-bar__status {
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--glow);
}

.pulse-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--glow);
  box-shadow: 0 0 12px var(--glow);
  animation: pulse 1.6s ease-in-out infinite;
}

.kiosk-bar__meta {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
}

@keyframes pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* Stage */
.kiosk-stage {
  height: 100svh;
  display: grid;
  grid-template-columns: minmax(150px, 0.85fr) minmax(0, 2.5fr) minmax(150px, 0.85fr);
  gap: clamp(0.75rem, 2vw, 1.5rem);
  align-items: center;
  padding: 4.5rem clamp(1rem, 2.5vw, 2rem) 5rem;
}

.hud {
  display: grid;
  gap: 0.85rem;
}

.hud__block {
  padding: 0.95rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  background: linear-gradient(160deg, rgba(79, 214, 196, 0.06), rgba(0, 0, 0, 0.45));
  box-shadow: inset 0 0 30px rgba(79, 214, 196, 0.04), 0 10px 30px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
}

.hud__label {
  margin: 0 0 0.3rem;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.hud__value {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.5vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-shadow: 0 0 20px var(--glow-soft);
}

.hud__value small {
  font-size: 0.5em;
  margin-left: 0.15rem;
  color: var(--glow);
}

.hud__value--text {
  font-size: clamp(0.95rem, 1.6vw, 1.2rem);
  letter-spacing: 0.08em;
  color: var(--glow);
}

.hud__meter {
  margin-top: 0.65rem;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.hud__meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--glow), #9fe6d8);
  box-shadow: 0 0 10px var(--glow-soft);
  transition: width 0.8s var(--ease);
}

/* Viz */
.viz {
  position: relative;
  width: 100%;
}

.viz__bloom {
  position: absolute;
  inset: -22%;
  background: radial-gradient(circle at 50% 48%, rgba(70, 170, 255, 0.42), transparent 58%);
  filter: blur(10px);
  animation: bloom 4.5s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
  transition: background 0.9s var(--ease);
}

body[data-mode="cool"] .viz__bloom { background: radial-gradient(circle at 50% 48%, rgba(70, 170, 255, 0.42), transparent 58%); }
body[data-mode="heat"] .viz__bloom { background: radial-gradient(circle at 50% 62%, rgba(255, 130, 40, 0.5), transparent 55%); }
body[data-mode="mist"] .viz__bloom { background: radial-gradient(circle at 50% 38%, rgba(80, 230, 210, 0.48), transparent 55%); }
body[data-mode="sanitize"] .viz__bloom { background: radial-gradient(circle at 50% 44%, rgba(160, 120, 255, 0.52), transparent 55%); }
body[data-mode="recycle"] .viz__bloom { background: radial-gradient(circle at 50% 50%, rgba(70, 220, 130, 0.48), transparent 55%); }

.viz__frame {
  position: relative;
  z-index: 1;
  aspect-ratio: 5 / 4;
  max-height: calc(100svh - 9rem);
  margin: 0 auto;
  border-radius: 1.35rem;
  overflow: hidden;
  border: 1px solid rgba(143, 212, 196, 0.28);
  background: radial-gradient(circle at 50% 42%, rgba(79, 214, 196, 0.06), transparent 55%), #070d0b;
  box-shadow: 0 0 0 1px rgba(79, 214, 196, 0.08), 0 30px 90px rgba(0, 0, 0, 0.65), 0 0 80px rgba(79, 214, 196, 0.14);
  transition: border-color 0.9s var(--ease), box-shadow 0.9s var(--ease);
}

body[data-mode="cool"] .viz__frame {
  border-color: rgba(100, 180, 255, 0.45);
  box-shadow: 0 0 0 1px rgba(70, 170, 255, 0.15), 0 30px 90px rgba(0, 0, 0, 0.65), 0 0 100px rgba(70, 170, 255, 0.28);
}
body[data-mode="heat"] .viz__frame {
  border-color: rgba(255, 160, 60, 0.5);
  box-shadow: 0 0 0 1px rgba(255, 140, 40, 0.18), 0 30px 90px rgba(0, 0, 0, 0.65), 0 0 110px rgba(255, 130, 40, 0.35);
}
body[data-mode="mist"] .viz__frame {
  border-color: rgba(80, 230, 210, 0.5);
  box-shadow: 0 0 0 1px rgba(80, 230, 210, 0.18), 0 30px 90px rgba(0, 0, 0, 0.65), 0 0 110px rgba(80, 230, 210, 0.32);
}
body[data-mode="sanitize"] .viz__frame {
  border-color: rgba(170, 130, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(160, 120, 255, 0.2), 0 30px 90px rgba(0, 0, 0, 0.65), 0 0 120px rgba(160, 120, 255, 0.4);
}
body[data-mode="recycle"] .viz__frame {
  border-color: rgba(80, 220, 140, 0.5);
  box-shadow: 0 0 0 1px rgba(70, 220, 130, 0.18), 0 30px 90px rgba(0, 0, 0, 0.65), 0 0 110px rgba(70, 220, 130, 0.35);
}

.viz__grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(79, 214, 196, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 214, 196, 0.05) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at center, black 40%, transparent 82%);
  opacity: 0.55;
}

.viz__schematic {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  padding: 0.4rem;
}

/* Housing */
.housing {
  fill: rgba(10, 18, 15, 0.35);
  stroke: rgba(143, 212, 196, 0.4);
  stroke-width: 2;
  filter: drop-shadow(0 0 16px rgba(79, 214, 196, 0.22));
}

.chamber {
  fill: rgba(6, 12, 10, 0.35);
  stroke: rgba(143, 212, 196, 0.18);
  stroke-width: 1.4;
}

.mark {
  fill: rgba(234, 242, 236, 0.9);
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.05em;
}

/* Fans */
.fan-housing {
  fill: rgba(79, 214, 196, 0.05);
  stroke: rgba(159, 230, 216, 0.55);
  stroke-width: 1.5;
}

.fan-blades {
  fill: rgba(201, 247, 238, 0.85);
}

.fan-hub {
  fill: #c9f7ee;
}

/* Manifold */
.manifold {
  fill: none;
  stroke: rgba(143, 212, 196, 0.45);
  stroke-width: 3;
  stroke-linecap: round;
}

.nozzle-stub {
  stroke: rgba(143, 212, 196, 0.45);
  stroke-width: 2;
}

.nozzle {
  fill: rgba(79, 214, 196, 0.35);
}

/* Stage FX — hidden unless active mode */
.fx {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

body[data-mode="cool"] .fx--cool,
body[data-mode="mist"] .fx--mist,
body[data-mode="heat"] .fx--heat,
body[data-mode="sanitize"] .fx--sanitize,
body[data-mode="recycle"] .fx--recycle {
  opacity: 1;
  visibility: visible;
}

.air {
  stroke: rgba(120, 190, 255, 0.95);
  stroke-width: 2.2;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(70, 170, 255, 0.95));
}

.drop {
  fill: #c8fff6;
  filter: drop-shadow(0 0 5px rgba(80, 230, 210, 1));
}

.mist-haze {
  fill: rgba(80, 230, 210, 0.08);
  opacity: 0;
}

body[data-mode="mist"] .mist-haze {
  opacity: 1;
  animation: mist-breathe 2.4s ease-in-out infinite;
}

.heatwave {
  fill: none;
  stroke: rgba(255, 170, 70, 0.95);
  stroke-width: 2.4;
  stroke-linecap: round;
  filter: drop-shadow(0 0 8px rgba(255, 130, 40, 0.9));
}

.flow-bead {
  fill: #6ed9a0;
  filter: drop-shadow(0 0 8px rgba(70, 220, 130, 0.9));
}

.recycle-arrow {
  fill: #6ed9a0;
  filter: drop-shadow(0 0 8px rgba(70, 220, 130, 0.85));
}

.recycle-mark {
  fill: none;
  stroke: #6ed9a0;
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 10px rgba(70, 220, 130, 0.8));
}

.uv-orb {
  fill: rgba(180, 140, 255, 0.55);
  filter: drop-shadow(0 0 10px rgba(160, 120, 255, 0.9));
}

/* Container */
.pot-body {
  fill: rgba(18, 30, 26, 0.92);
  stroke: rgba(143, 212, 196, 0.4);
  stroke-width: 1.5;
}

.pot-rim {
  fill: none;
  stroke: rgba(143, 212, 196, 0.55);
  stroke-width: 1.5;
}

.pot-slot {
  fill: rgba(79, 214, 196, 0.14);
  stroke: rgba(143, 212, 196, 0.35);
  stroke-width: 1;
}

/* Coils — only lit during cool */
.coil-ring {
  fill: none;
  stroke: url(#coilGrad);
  stroke-width: 3.2;
  opacity: 0.2;
}

body[data-mode="cool"] .coil-ring {
  opacity: 1;
  stroke: #6eb8ff;
  stroke-dasharray: 14 9;
  filter: drop-shadow(0 0 10px rgba(70, 170, 255, 0.95));
  animation: coil-flow 1.1s linear infinite;
}

/* Plant */
.plant {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: sway 4.8s ease-in-out infinite;
}
.plant--b { animation-delay: 0.7s; }
.plant--c { animation-delay: 1.4s; }
.plant--d { animation-delay: 2.1s; }

.stem {
  fill: none;
  stroke: #6cc47f;
  stroke-width: 2.8;
  stroke-linecap: round;
}

.leaf {
  fill: url(#leafGrad);
  stroke: rgba(150, 230, 165, 0.75);
  stroke-width: 1;
}

.bud {
  fill: #8fe6a0;
}

.root {
  fill: none;
  stroke: rgba(190, 220, 200, 0.28);
  stroke-width: 1.3;
  stroke-linecap: round;
}

/* UV */
.uv-lamp {
  fill: rgba(155, 123, 255, 0.15);
  opacity: 0.2;
}

.uv-wash {
  fill: rgba(140, 110, 255, 0);
  mix-blend-mode: screen;
}

body[data-mode="sanitize"] .uv-lamp {
  fill: #c4a8ff;
  filter: drop-shadow(0 0 18px rgba(160, 120, 255, 1));
  animation: uv-pulse 1.8s ease-in-out infinite;
}

body[data-mode="sanitize"] .uv-wash {
  fill: rgba(150, 110, 255, 0.22);
  animation: uv-breathe 2.2s ease-in-out infinite;
}

body[data-mode="sanitize"] .housing {
  stroke: rgba(180, 140, 255, 0.55);
  filter: drop-shadow(0 0 22px rgba(160, 120, 255, 0.45));
}

/* Reservoir */
.tank-label {
  fill: rgba(169, 188, 177, 0.7);
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.16em;
}

.tank {
  fill: rgba(8, 15, 12, 0.9);
  stroke: rgba(143, 212, 196, 0.35);
  stroke-width: 1.5;
}

.tank-fill {
  opacity: 0.85;
}

.tank-heatwash {
  fill: rgba(255, 150, 60, 0.4);
  opacity: 0;
}

.heater {
  fill: none;
  stroke: rgba(143, 212, 196, 0.35);
  stroke-width: 3;
  stroke-linecap: round;
}

body[data-mode="heat"] .tank {
  stroke: rgba(255, 170, 80, 0.85);
  filter: drop-shadow(0 0 22px rgba(255, 130, 40, 0.55));
}

body[data-mode="heat"] .tank-heatwash {
  opacity: 1;
  fill: rgba(255, 140, 40, 0.55);
  animation: heat-pulse 1.6s ease-in-out infinite;
}

body[data-mode="heat"] .heater {
  stroke: #ffb347;
  filter: drop-shadow(0 0 12px rgba(255, 130, 40, 1));
  animation: heat-pulse 0.9s ease-in-out infinite;
}

body[data-mode="heat"] .housing {
  stroke: rgba(255, 160, 80, 0.45);
  filter: drop-shadow(0 0 20px rgba(255, 130, 40, 0.35));
}

/* Recycle supply pipe */
.supply {
  stroke: rgba(143, 212, 196, 0.14);
  stroke-width: 2;
  stroke-dasharray: 6 8;
}

body[data-mode="recycle"] .supply {
  stroke: rgba(80, 220, 140, 0.75);
  stroke-width: 2.5;
  filter: drop-shadow(0 0 8px rgba(70, 220, 130, 0.8));
  animation: dash 1s linear infinite;
}

body[data-mode="recycle"] .housing {
  stroke: rgba(90, 220, 140, 0.5);
  filter: drop-shadow(0 0 20px rgba(70, 220, 130, 0.35));
}

body[data-mode="mist"] .housing {
  stroke: rgba(80, 230, 210, 0.5);
  filter: drop-shadow(0 0 20px rgba(80, 230, 210, 0.35));
}

body[data-mode="cool"] .housing {
  stroke: rgba(100, 180, 255, 0.5);
  filter: drop-shadow(0 0 20px rgba(70, 170, 255, 0.35));
}

body[data-mode="mist"] .nozzle {
  fill: #9ff5e8;
  filter: drop-shadow(0 0 10px rgba(80, 230, 210, 1));
  animation: mist-breathe 1.2s ease-in-out infinite;
}

/* Control */
.control {
  fill: rgba(79, 214, 196, 0.08);
  stroke: rgba(79, 214, 196, 0.5);
  stroke-width: 1.2;
  filter: drop-shadow(0 0 8px rgba(79, 214, 196, 0.3));
}

.control-temp {
  fill: var(--glow);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* Readout */
.viz__readout {
  position: absolute;
  left: 1.25rem;
  bottom: 1.15rem;
  z-index: 4;
  display: grid;
  gap: 0.4rem;
}

.viz__badge {
  display: inline-flex;
  width: fit-content;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  background: rgba(70, 170, 255, 0.18);
  border: 1px solid rgba(100, 180, 255, 0.5);
  color: #9ecfff;
  box-shadow: 0 0 18px rgba(70, 170, 255, 0.28);
}

body[data-mode="cool"] .viz__badge { background: rgba(70, 170, 255, 0.18); border-color: rgba(100, 180, 255, 0.5); color: #9ecfff; box-shadow: 0 0 18px rgba(70, 170, 255, 0.28); }
body[data-mode="heat"] .viz__badge { background: rgba(255, 150, 60, 0.2); border-color: rgba(255, 170, 80, 0.6); color: #ffd9a8; box-shadow: 0 0 20px rgba(255, 130, 40, 0.4); }
body[data-mode="mist"] .viz__badge { background: rgba(80, 230, 210, 0.2); border-color: rgba(80, 230, 210, 0.55); color: #c9f7ee; box-shadow: 0 0 20px rgba(80, 230, 210, 0.35); }
body[data-mode="sanitize"] .viz__badge { background: rgba(160, 120, 255, 0.22); border-color: rgba(170, 130, 255, 0.6); color: #d2c4ff; box-shadow: 0 0 22px rgba(160, 120, 255, 0.4); }
body[data-mode="recycle"] .viz__badge { background: rgba(70, 220, 130, 0.2); border-color: rgba(90, 220, 140, 0.55); color: #b8f0d0; box-shadow: 0 0 20px rgba(70, 220, 130, 0.35); }

.viz__phase {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.1vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.9), 0 0 20px rgba(79, 214, 196, 0.25);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}

.viz__phase.is-swap {
  opacity: 0;
  transform: translateY(10px);
}

@keyframes coil-flow { to { stroke-dashoffset: -46; } }
@keyframes dash { to { stroke-dashoffset: -120; } }
@keyframes bloom {
  0%, 100% { opacity: 0.55; transform: scale(0.96); }
  50% { opacity: 1; transform: scale(1.04); }
}
@keyframes sway {
  0%, 100% { transform: rotate(-1.8deg); }
  50% { transform: rotate(1.8deg); }
}
@keyframes heat-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}
@keyframes mist-breathe {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}
@keyframes uv-pulse {
  0%, 100% {
    opacity: 0.55;
    filter: drop-shadow(0 0 8px rgba(155, 123, 255, 0.55));
  }
  50% {
    opacity: 1;
    filter: drop-shadow(0 0 20px rgba(155, 123, 255, 1));
  }
}
@keyframes uv-breathe {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}
@keyframes recycle-spin {
  to { transform: rotate(360deg); }
}

/* Footer */
.kiosk-foot {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem clamp(1rem, 3vw, 2rem);
  border-top: 1px solid var(--line);
  background: rgba(3, 6, 5, 0.82);
  backdrop-filter: blur(14px);
}

.phases {
  display: flex;
  gap: 0.4rem;
}

.phases button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.35s var(--ease), border-color 0.35s var(--ease), background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.phases button.is-active {
  color: #04120e;
  background: #6eb8ff;
  border-color: #6eb8ff;
  box-shadow: 0 0 22px rgba(70, 170, 255, 0.45);
}

body[data-mode="cool"] .phases button.is-active { background: #6eb8ff; border-color: #6eb8ff; color: #041018; box-shadow: 0 0 22px rgba(70, 170, 255, 0.5); }
body[data-mode="heat"] .phases button.is-active { background: var(--amber); border-color: var(--amber); box-shadow: 0 0 26px rgba(255, 130, 40, 0.55); }
body[data-mode="sanitize"] .phases button.is-active { background: #b79cff; border-color: #b79cff; color: #1a1028; box-shadow: 0 0 26px rgba(160, 120, 255, 0.55); }
body[data-mode="mist"] .phases button.is-active { background: #9fe6d8; border-color: #9fe6d8; box-shadow: 0 0 26px rgba(80, 230, 210, 0.5); }
body[data-mode="recycle"] .phases button.is-active { background: #6ed9a0; border-color: #6ed9a0; box-shadow: 0 0 26px rgba(70, 220, 130, 0.5); }

.kiosk-foot__tag {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 900px) {
  body.kiosk {
    cursor: auto;
    overflow: auto;
  }

  .kiosk-stage {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100svh;
    padding-bottom: 6rem;
  }

  .hud {
    grid-template-columns: 1fr 1fr;
  }

  .hud--right {
    order: 3;
  }

  .viz {
    order: 2;
  }

  .viz__frame {
    max-height: none;
  }

  .kiosk-bar__meta {
    display: none;
  }

  .kiosk-foot {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pulse-dot,
  .viz__bloom,
  .coil-ring,
  .supply,
  .uv-wash,
  .uv-lamp,
  .plant,
  .heater,
  .tank-heatwash {
    animation: none !important;
  }

  .fx animate,
  .fx animateTransform,
  .fx animateMotion,
  .fan-blades animateTransform {
    display: none;
  }

  body[data-mode="cool"] .coil-ring,
  body[data-mode="mist"] .nozzle,
  body[data-mode="heat"] .tank-heatwash {
    opacity: 1;
  }
}
