/* ==========================================================================
   IQOS NEON v4 — Minimalist Form × Cinema-Grade Tactile Neon Motion
   Crafted for Samsung Galaxy Z Fold 7 120Hz AMOLED
   ========================================================================== */

@property --beam-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

:root {
  --bg: #030406;
  --surface: #090B10;
  --surface-2: #0F121B;
  --surface-press: #141926;
  --line: rgba(255, 255, 255, 0.075);
  --line-hi: rgba(255, 255, 255, 0.16);

  --text: #F4F7FC;
  --text-2: #8C95A8;
  --text-3: #4F5768;

  --neon: #00E8FF;
  --neon-rgb: 0, 232, 255;
  --violet: #B17CFF;
  --violet-rgb: 177, 124, 255;
  --mint: #2EF0A5;
  --mint-rgb: 46, 240, 165;
  --amber: #FFA040;
  --amber-rgb: 255, 160, 64;
  --danger: #FF5572;
  --danger-rgb: 255, 85, 114;

  --r-xl: 26px;
  --r-lg: 20px;
  --r-md: 14px;
  --spring: cubic-bezier(0.22, 1.25, 0.36, 1);
  --smooth: cubic-bezier(0.22, 1, 0.36, 1);
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;

  /* Dynamic per-edition hardware proportions & Touch Screen coordinates */
  --holder-aspect: 141 / 920;
  --charger-aspect: 315 / 920;
  --ts-left: 22.7%;
  --ts-top: 29.0%;
  --ts-width: 54.6%;
  --ts-height: 13.4%;
}

*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.app {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: 16px 18px 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ==========================================================================
   HEADER — Ultra-Clean with Animated Conic Beam CTA
   ========================================================================== */

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 2px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.brand-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.brand-name span {
  color: var(--neon);
  text-shadow: 0 0 18px rgba(var(--neon-rgb), 0.6);
}

.brand-meta {
  font-size: 11px;
  color: var(--text-3);
  font-family: var(--font-mono);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-ghost {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.28s var(--spring), color 0.2s ease, border-color 0.25s ease, background 0.25s ease;
}

.btn-ghost:hover { color: var(--text); border-color: var(--line-hi); }
.btn-ghost:active { transform: scale(0.93); }
.btn-ghost.active {
  color: var(--neon);
  border-color: rgba(var(--neon-rgb), 0.45);
  background: rgba(var(--neon-rgb), 0.08);
}

/* Living Conic Border Beam Connect Pill */
.btn-ble {
  position: relative;
  border: none;
  padding: 1.5px;
  border-radius: 999px;
  cursor: pointer;
  background: conic-gradient(from var(--beam-angle), rgba(var(--neon-rgb), 0.15) 0deg, var(--neon) 55deg, rgba(var(--violet-rgb), 0.7) 110deg, rgba(255,255,255,0.06) 170deg, rgba(var(--neon-rgb), 0.15) 360deg);
  animation: spinBeam 4.5s linear infinite;
  box-shadow: 0 0 24px rgba(var(--neon-rgb), 0.18);
  transition: transform 0.3s var(--spring), box-shadow 0.3s ease;
}

.btn-ble:hover { box-shadow: 0 0 32px rgba(var(--neon-rgb), 0.32); }
.btn-ble:active { transform: scale(0.94); }

.btn-ble-inner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7.5px 16px;
  border-radius: 999px;
  background: #070B12;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.btn-ble.connected {
  background: conic-gradient(from var(--beam-angle), rgba(var(--mint-rgb), 0.12) 0deg, var(--mint) 60deg, rgba(var(--neon-rgb), 0.5) 120deg, rgba(255,255,255,0.05) 180deg, rgba(var(--mint-rgb), 0.12) 360deg);
  box-shadow: 0 0 22px rgba(var(--mint-rgb), 0.18);
}

.btn-ble.connected .btn-ble-inner { color: var(--mint); }

.status-dot {
  width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 10px var(--neon);
}

.btn-ble.connected .status-dot {
  background: var(--mint);
  box-shadow: 0 0 10px var(--mint);
}

.btn-ble.connecting .status-dot {
  animation: pulseFast 0.7s infinite ease-in-out;
}

@keyframes spinBeam {
  to { --beam-angle: 360deg; }
}

@keyframes pulseFast {
  0%, 100% { opacity: 1; transform: scale(1.1); }
  50% { opacity: 0.25; transform: scale(0.65); }
}

/* BLE Alert & iOS Bluefy Guide Banner */
.ble-alert {
  display: none;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: rgba(var(--danger-rgb), 0.09);
  border: 1px solid rgba(var(--danger-rgb), 0.34);
  color: #FFB4C1;
  font-size: 12px;
  line-height: 1.5;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.ble-alert.show { display: flex; }
.ble-alert.info {
  background: rgba(var(--neon-rgb), 0.08);
  border-color: rgba(var(--neon-rgb), 0.34);
  color: #D9F7FF;
}
.ble-alert-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ble-alert-title { font-size: 12px; font-weight: 700; color: var(--text); }
.ble-alert-text { font-size: 11.5px; opacity: 0.92; }
.ble-alert-actions { display: flex; align-items: center; gap: 7px; flex-shrink: 0; flex-wrap: wrap; }
.ble-alert-close {
  border: none; background: transparent; color: var(--text-2); font-size: 18px; cursor: pointer; padding: 0 4px;
}

.icon-pill-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(var(--neon-rgb), 0.34);
  background: var(--surface);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.28s var(--spring), border-color 0.25s ease, box-shadow 0.25s ease;
}
.icon-pill-btn:hover { border-color: rgba(var(--neon-rgb), 0.68); box-shadow: 0 0 16px rgba(var(--neon-rgb), 0.22); }
.icon-pill-btn:active { transform: scale(0.90); }

/* ==========================================================================
   FOLD 7 ADAPTIVE GRID
   ========================================================================== */

.layout {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(320px, 43%) minmax(0, 57%);
  gap: 18px;
  align-items: start;
}

@media (max-width: 780px) {
  .app { padding: 12px 14px 28px; gap: 12px; }
  .layout { grid-template-columns: 1fr; gap: 14px; }
  .brand-meta { display: none; }
}

/* ==========================================================================
   LEFT: CINEMA HARDWARE STAGE (Aurora Ribbons + Laser Sweep + 3D Parallax)
   ========================================================================== */

.stage-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stage {
  position: relative;
  border-radius: var(--r-xl);
  background:
    radial-gradient(80% 55% at 50% 42%, rgba(var(--neon-rgb), 0.085), transparent 70%),
    linear-gradient(180deg, #0A0D15 0%, #05070B 100%);
  border: 1px solid var(--line);
  padding: 18px;
  min-height: 458px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  perspective: 960px;
  user-select: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 24px 60px rgba(0, 0, 0, 0.72);
  transition: border-color 0.5s ease, box-shadow 0.5s ease;
}

@media (max-width: 780px) {
  .stage { min-height: 350px; padding: 15px; }
}

.stage.is-online {
  border-color: rgba(var(--neon-rgb), 0.20);
}

.stage.is-locked {
  border-color: rgba(var(--violet-rgb), 0.42);
  box-shadow: inset 0 1px 0 rgba(var(--violet-rgb), 0.16), 0 0 44px rgba(var(--violet-rgb), 0.12);
}

.stage.is-finding {
  border-color: rgba(var(--neon-rgb), 0.65);
  box-shadow: inset 0 0 36px rgba(var(--neon-rgb), 0.14), 0 0 50px rgba(var(--neon-rgb), 0.22);
}

.stage.is-heating {
  border-color: rgba(var(--amber-rgb), 0.48);
  box-shadow: inset 0 0 36px rgba(var(--amber-rgb), 0.12), 0 0 46px rgba(var(--amber-rgb), 0.16);
}

/* Canvas: Smooth Silk Aurora Ribbons + Radar + Sonar Waves */
#stageCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Dramatic Laser Scan Sweep Beam (fires on connect / lock / unlock!) */
.scan-beam {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  top: -10%;
  z-index: 6;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(90deg, transparent 0%, var(--neon) 28%, #FFFFFF 50%, var(--neon) 72%, transparent 100%);
  box-shadow: 0 0 22px 4px rgba(var(--neon-rgb), 0.75), 0 0 60px 12px rgba(var(--neon-rgb), 0.35);
}

.scan-beam.sweep-up {
  animation: sweepUp 0.95s var(--smooth) forwards;
}

.scan-beam.sweep-down-lock {
  background: linear-gradient(90deg, transparent 0%, var(--violet) 28%, #F2E4FF 50%, var(--violet) 72%, transparent 100%);
  box-shadow: 0 0 24px 4px rgba(var(--violet-rgb), 0.8), 0 0 60px 14px rgba(var(--violet-rgb), 0.38);
  animation: sweepDown 0.85s var(--smooth) forwards;
}

@keyframes sweepUp {
  0%   { top: 96%; opacity: 0; }
  15%  { opacity: 1; }
  80%  { opacity: 0.9; }
  100% { top: 4%; opacity: 0; }
}

@keyframes sweepDown {
  0%   { top: 4%; opacity: 0; }
  15%  { opacity: 1; }
  80%  { opacity: 0.9; }
  100% { top: 96%; opacity: 0; }
}

.stage-top {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stage-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(5, 8, 14, 0.64);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-2);
}

.stage-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-3);
  transition: all 0.35s ease;
}

.stage.is-online .stage-pill .dot {
  background: var(--neon);
  box-shadow: 0 0 10px var(--neon);
  animation: softBreath 2.4s infinite ease-in-out;
}
.stage.is-locked .stage-pill .dot { background: var(--violet); box-shadow: 0 0 10px var(--violet); }
.stage.is-heating .stage-pill .dot { background: var(--amber); box-shadow: 0 0 12px var(--amber); animation-duration: 0.9s; }

@keyframes softBreath {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.75); }
}

.stage-tools {
  display: flex;
  gap: 6px;
}

.circle-btn {
  border: 1px solid var(--line);
  background: rgba(5, 8, 14, 0.64);
  color: var(--text-2);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: transform 0.28s var(--spring), color 0.2s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.circle-btn:hover { color: var(--neon); border-color: rgba(var(--neon-rgb), 0.45); }
.circle-btn:active { transform: scale(0.88); }
.circle-btn.spinning svg { animation: spin360 0.75s var(--smooth); }
.circle-btn.active-warm {
  color: var(--amber);
  border-color: rgba(var(--amber-rgb), 0.55);
  box-shadow: 0 0 16px rgba(var(--amber-rgb), 0.28);
}

@keyframes spin360 {
  to { transform: rotate(360deg); }
}

/* Official Cutout 3D Floating Rig */
.rig-wrap {
  position: relative;
  z-index: 3;
  flex: 1;
  display: grid;
  place-items: center;
  padding: 12px 0 16px;
}

.rig {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 18px;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.2s ease-out;
}

.rig-pedestal {
  position: absolute;
  bottom: -12px;
  left: 50%;
  width: 230px;
  height: 28px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(var(--neon-rgb), 0.36) 0%, rgba(var(--violet-rgb), 0.14) 48%, transparent 74%);
  filter: blur(13px);
  opacity: 0.45;
  transition: all 0.5s ease;
  pointer-events: none;
}

.stage.is-online .rig-pedestal { opacity: 0.95; }
.stage.is-locked .rig-pedestal { background: radial-gradient(ellipse, rgba(var(--violet-rgb), 0.46), transparent 72%); }
.stage.is-heating .rig-pedestal { background: radial-gradient(ellipse, rgba(var(--amber-rgb), 0.52), transparent 74%); }
.stage.is-eco .rig-pedestal { background: radial-gradient(ellipse, rgba(var(--mint-rgb), 0.42), transparent 74%); }

.hw-holder {
  position: relative;
  height: 266px;
  aspect-ratio: var(--holder-aspect);
  transform: translateZ(24px);
  animation: levitateA 5.4s ease-in-out infinite;
  cursor: pointer;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.82)) drop-shadow(-2px 0 14px rgba(var(--neon-rgb), 0.16));
  transition: filter 0.45s ease;
}

.hw-charger {
  position: relative;
  height: 282px;
  aspect-ratio: var(--charger-aspect);
  transform: translateZ(6px);
  animation: levitateB 6.2s ease-in-out infinite;
  cursor: pointer;
  filter: drop-shadow(0 22px 32px rgba(0, 0, 0, 0.85)) drop-shadow(4px 0 18px rgba(var(--violet-rgb), 0.14));
  transition: filter 0.45s ease;
}

@media (max-width: 780px) {
  .hw-holder { height: 198px; }
  .hw-charger { height: 210px; }
}

@keyframes levitateA {
  0%, 100% { transform: translateZ(24px) translateY(0); }
  50% { transform: translateZ(24px) translateY(-6px); }
}

@keyframes levitateB {
  0%, 100% { transform: translateZ(6px) translateY(0); }
  50% { transform: translateZ(6px) translateY(-4px); }
}

.hw-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  pointer-events: none;
  transition: filter 0.5s ease, opacity 0.5s ease;
}

.stage:not(.is-online) .hw-img { opacity: 0.88; }
.stage.is-locked .hw-img { filter: brightness(0.56) saturate(0.75); }
.stage.is-heating .hw-holder {
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.82)) drop-shadow(0 0 22px rgba(var(--amber-rgb), 0.42));
}

.stage.is-finding .hw-holder {
  animation: vibShakeA 0.16s linear infinite;
  filter: drop-shadow(0 0 24px rgba(var(--neon-rgb), 0.6));
}

.stage.is-finding .hw-charger {
  animation: vibShakeB 0.19s linear infinite;
  filter: drop-shadow(0 0 26px rgba(var(--neon-rgb), 0.45));
}

@keyframes vibShakeA {
  0%, 100% { transform: translateZ(24px) translate(-2.2px, 0) rotate(-1.3deg); }
  50% { transform: translateZ(24px) translate(2.2px, -1px) rotate(1.3deg); }
}

@keyframes vibShakeB {
  0%, 100% { transform: translateZ(6px) translate(1.4px, 0) rotate(0.6deg); }
  50% { transform: translateZ(6px) translate(-1.4px, 1px) rotate(-0.6deg); }
}

/* Sub-Pixel Aligned Hardware Touch Screen Overlay */
.ts-overlay {
  position: absolute;
  left: var(--ts-left);
  top: var(--ts-top);
  width: var(--ts-width);
  height: var(--ts-height);
  border-radius: 999px;
  pointer-events: none;
  display: grid;
  place-items: center;
  background: rgba(2, 5, 11, 0.90);
  box-shadow:
    0 0 0 1.5px rgba(var(--neon-rgb), var(--led-a, 0.92)),
    0 0 calc(15px * var(--led-s, 1)) rgba(var(--neon-rgb), calc(0.72 * var(--led-a, 0.92))),
    inset 0 0 8px rgba(var(--neon-rgb), calc(0.42 * var(--led-a, 0.92)));
  transition: all 0.42s ease;
}

.stage:not(.is-online) .ts-overlay { --led-a: 0.30; --led-s: 0.35; }
.stage.bright-low .ts-overlay { --led-a: 0.34; --led-s: 0.40; }

.stage.is-eco .ts-overlay {
  box-shadow:
    0 0 0 1.5px rgba(var(--mint-rgb), var(--led-a, 0.9)),
    0 0 calc(15px * var(--led-s, 1)) rgba(var(--mint-rgb), calc(0.65 * var(--led-a, 0.9)));
}

.stage.is-heating .ts-overlay {
  box-shadow:
    0 0 0 1.8px rgba(var(--amber-rgb), 0.98),
    0 0 24px rgba(var(--amber-rgb), 0.85),
    inset 0 0 10px rgba(var(--amber-rgb), 0.5);
}

.stage.is-locked .ts-overlay {
  box-shadow:
    0 0 0 1.6px rgba(var(--violet-rgb), 0.88),
    0 0 18px rgba(var(--violet-rgb), 0.62);
}

.ts-svg { width: 96%; height: 96%; opacity: var(--led-a, 0.95); transition: opacity 0.35s ease; }
.ts-ring { animation: softBreath 3s ease-in-out infinite; }
.stage.is-heating .ts-ring { animation: heatArc 1.5s linear infinite; }

@keyframes heatArc {
  from { stroke-dashoffset: 130; }
  to { stroke-dashoffset: 0; }
}

.charger-led {
  position: absolute;
  left: 2.3%;
  top: 7.4%;
  width: 3.3%;
  height: 7.1%;
  border-radius: 999px;
  pointer-events: none;
  background: var(--neon);
  opacity: var(--led-a, 0.82);
  box-shadow: 0 0 calc(12px * var(--led-s, 1)) rgba(var(--neon-rgb), 0.88);
  animation: softBreath 2.6s ease-in-out infinite;
  transition: all 0.4s ease;
}
.stage:not(.is-online) .charger-led { opacity: 0.16; box-shadow: none; }
.stage.bright-low .charger-led { --led-a: 0.28; --led-s: 0.35; }
.stage.is-locked .charger-led { background: var(--violet); box-shadow: 0 0 12px rgba(var(--violet-rgb), 0.78); }

/* ==========================================================================
   ANIMATED NEON ARC GAUGES (Bottom of Stage)
   ========================================================================== */

.arc-hud {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.arc-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.arc-ring-box {
  position: relative;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.arc-ring-box svg {
  width: 42px;
  height: 42px;
  transform: rotate(-90deg);
}

.arc-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 3;
}

.arc-fg {
  fill: none;
  stroke: var(--neon);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 100.53;
  stroke-dashoffset: 100.53;
  filter: drop-shadow(0 0 5px rgba(var(--neon-rgb), 0.75));
  transition: stroke-dashoffset 0.9s var(--smooth), stroke 0.4s ease;
}

.arc-fg.mint {
  stroke: var(--mint);
  filter: drop-shadow(0 0 5px rgba(var(--mint-rgb), 0.7));
}

.arc-fg.violet {
  stroke: var(--violet);
  filter: drop-shadow(0 0 5px rgba(var(--violet-rgb), 0.7));
}

.arc-center-icon {
  position: absolute;
  color: var(--text-2);
  display: grid;
  place-items: center;
}

.arc-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.arc-k {
  font-size: 10.5px;
  color: var(--text-3);
}

.arc-v {
  font-size: 16.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.arc-v small {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-2);
  margin-left: 1px;
}

/* ==========================================================================
   LIVING PRIMARY ACTION BUTTONS (Lock & Find with Ripple + Conic Beam)
   ========================================================================== */

.quick-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.tactile-btn {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(16, 20, 31, 0.9), rgba(9, 11, 17, 0.95));
  color: var(--text);
  border-radius: var(--r-lg);
  padding: 15px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.3s var(--spring), border-color 0.3s ease, box-shadow 0.35s ease, background 0.35s ease;
}

.tactile-btn:hover {
  border-color: var(--line-hi);
  transform: translateY(-1px);
}

.tactile-btn:active {
  transform: scale(0.955);
}

.tactile-btn.active-violet {
  border-color: rgba(var(--violet-rgb), 0.65);
  background: linear-gradient(145deg, rgba(var(--violet-rgb), 0.20), rgba(11, 9, 22, 0.95));
  box-shadow: 0 0 28px rgba(var(--violet-rgb), 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.tactile-btn.active-neon {
  border-color: rgba(var(--neon-rgb), 0.72);
  background: linear-gradient(145deg, rgba(var(--neon-rgb), 0.20), rgba(7, 14, 24, 0.95));
  box-shadow: 0 0 30px rgba(var(--neon-rgb), 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.tactile-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--text-2);
  flex-shrink: 0;
  transition: all 0.32s var(--spring);
}

.tactile-btn.active-violet .tactile-icon {
  color: #E7D6FF;
  background: rgba(var(--violet-rgb), 0.22);
  border-color: rgba(var(--violet-rgb), 0.55);
  box-shadow: 0 0 16px rgba(var(--violet-rgb), 0.4);
  transform: scale(1.06);
}

.tactile-btn.active-neon .tactile-icon {
  color: var(--neon);
  background: rgba(var(--neon-rgb), 0.2);
  border-color: rgba(var(--neon-rgb), 0.6);
  box-shadow: 0 0 18px rgba(var(--neon-rgb), 0.45);
  animation: pulseIcon 0.9s infinite ease-in-out;
}

@keyframes pulseIcon {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.tactile-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tactile-title {
  font-size: 13.5px;
  font-weight: 600;
}

.tactile-sub {
  font-size: 11px;
  color: var(--text-2);
}

/* Pointer Ripple Effect on all tactile controls */
.ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  pointer-events: none;
  background: radial-gradient(circle, rgba(var(--neon-rgb), 0.42) 0%, rgba(var(--neon-rgb), 0) 70%);
  animation: rippleExpand 0.62s var(--smooth) forwards;
}

.ripple.violet {
  background: radial-gradient(circle, rgba(var(--violet-rgb), 0.45) 0%, rgba(var(--violet-rgb), 0) 70%);
}

@keyframes rippleExpand {
  to { transform: scale(2.8); opacity: 0; }
}

/* ==========================================================================
   RIGHT: FLUID SLIDING TABS + LIQUID SEGMENTED + 2x2 HARDWARE TILES
   ========================================================================== */

.deck-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Fluid Sliding Tab Switcher */
.tabs {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 4px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.tab-glider {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 8px) / 3);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(var(--neon-rgb), 0.16), rgba(var(--violet-rgb), 0.12));
  border: 1px solid rgba(var(--neon-rgb), 0.36);
  box-shadow: 0 0 18px rgba(var(--neon-rgb), 0.14);
  transition: transform 0.42s var(--spring);
  pointer-events: none;
}

.tab {
  position: relative;
  z-index: 1;
  border: none;
  background: transparent;
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 0;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.25s ease;
}

.tab.active { color: var(--text); }

.panel {
  display: none;
  flex-direction: column;
  gap: 12px;
}

.panel.active {
  display: flex;
  animation: panelReveal 0.38s var(--smooth);
}

@keyframes panelReveal {
  from { opacity: 0; transform: translateY(10px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Liquid Sliding Segmented Controls (Brightness & FlexBattery) */
.liquid-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 520px) {
  .liquid-grid { grid-template-columns: 1fr; }
}

.liquid-card {
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.liquid-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.liquid-title {
  font-size: 13px;
  font-weight: 600;
}

.liquid-state {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--neon);
}

.liquid-track {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 3px;
  border-radius: 13px;
  background: var(--bg);
  border: 1px solid var(--line);
}

.liquid-thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(var(--neon-rgb), 0.24), rgba(var(--violet-rgb), 0.14));
  border: 1px solid rgba(var(--neon-rgb), 0.55);
  box-shadow: 0 0 18px rgba(var(--neon-rgb), 0.24);
  transition: transform 0.44s var(--spring), background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
  pointer-events: none;
}

.liquid-track.pos-right .liquid-thumb {
  transform: translateX(100%);
}

.liquid-track.eco-glow.pos-right .liquid-thumb {
  background: linear-gradient(135deg, rgba(var(--mint-rgb), 0.24), rgba(var(--neon-rgb), 0.12));
  border-color: rgba(var(--mint-rgb), 0.62);
  box-shadow: 0 0 18px rgba(var(--mint-rgb), 0.26);
}

.liquid-opt {
  position: relative;
  z-index: 1;
  border: none;
  background: transparent;
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
  padding: 9px 6px;
  cursor: pointer;
  transition: color 0.25s ease;
}

.liquid-opt.active { color: var(--text); }

/* 2x2 Tactile Backlit Hardware Feature Tiles */
.tile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.hw-tile {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(160deg, rgba(13, 16, 25, 0.9), rgba(8, 10, 15, 0.96));
  padding: 15px 15px 14px;
  cursor: pointer;
  text-align: left;
  color: var(--text);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  min-height: 112px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: transform 0.3s var(--spring), border-color 0.35s ease, box-shadow 0.38s ease, background 0.38s ease;
}

.hw-tile:hover {
  border-color: var(--line-hi);
  transform: translateY(-1px);
}

.hw-tile:active {
  transform: scale(0.955);
}

.hw-tile.on {
  border-color: rgba(var(--neon-rgb), 0.42);
  background:
    radial-gradient(90% 80% at 15% 10%, rgba(var(--neon-rgb), 0.14), transparent 65%),
    linear-gradient(160deg, rgba(14, 19, 30, 0.94), rgba(8, 11, 17, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(var(--neon-rgb), 0.26),
    0 10px 28px rgba(0, 0, 0, 0.45),
    0 0 22px rgba(var(--neon-rgb), 0.10);
}

.tile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tile-icon {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-3);
  transition: all 0.35s var(--spring);
}

.hw-tile.on .tile-icon {
  color: var(--neon);
  background: rgba(var(--neon-rgb), 0.14);
  box-shadow: 0 0 16px rgba(var(--neon-rgb), 0.28);
  transform: scale(1.06);
}

.tile-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.10);
  transition: all 0.35s var(--spring);
}

.hw-tile.on .tile-led {
  background: var(--neon);
  box-shadow: 0 0 12px var(--neon), 0 0 4px #fff;
  transform: scale(1.1);
}

.tile-bottom {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tile-name {
  font-size: 13.5px;
  font-weight: 600;
}

.tile-sub {
  font-size: 11px;
  color: var(--text-2);
}

/* Compact Bottom Bar inside Controls: Vibration Pills + Hold-to-Reset */
.card {
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-2);
}

.vib-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.vib-pill {
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-3);
  background: rgba(255, 255, 255, 0.02);
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.25s var(--spring), color 0.25s ease, border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.vib-pill:hover {
  color: var(--text-2);
  border-color: var(--line-hi);
}

.vib-pill:active {
  transform: scale(0.93);
}

.vib-pill::before {
  content: "";
  width: 5.5px;
  height: 5.5px;
  border-radius: 50%;
  background: currentColor;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.vib-pill.on {
  color: var(--text);
  border-color: rgba(var(--neon-rgb), 0.48);
  background: rgba(var(--neon-rgb), 0.10);
  box-shadow: 0 0 14px rgba(var(--neon-rgb), 0.14);
}

.vib-pill.on::before {
  background: var(--neon);
  box-shadow: 0 0 8px var(--neon);
}

.vib-exp {
  font-size: 9.5px;
  color: var(--text-3);
  margin-left: 1px;
}

/* Hold-to-Reset Animated Fill Pill */
.btn-reset {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(var(--danger-rgb), 0.42);
  background: rgba(var(--danger-rgb), 0.06);
  color: #FF879C;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
  touch-action: none;
  flex-shrink: 0;
  transition: transform 0.25s var(--spring), border-color 0.25s ease, box-shadow 0.25s ease;
}

.btn-reset:active { transform: scale(0.95); }
.btn-reset .fill {
  position: absolute;
  inset: 0;
  width: 0%;
  background: linear-gradient(90deg, rgba(var(--danger-rgb), 0.45), rgba(var(--danger-rgb), 0.85));
}
.btn-reset span { position: relative; z-index: 1; }

/* ==========================================================================
   TAB 2: STATS & SPECS
   ========================================================================== */

.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.stat-tile {
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 14px 15px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-tile.hi {
  border-color: rgba(var(--neon-rgb), 0.26);
  background: radial-gradient(90% 90% at 0% 0%, rgba(var(--neon-rgb), 0.11), var(--surface) 70%);
}

.stat-v {
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.stat-tile.hi .stat-v { color: var(--neon); text-shadow: 0 0 16px rgba(var(--neon-rgb), 0.35); }
.stat-tile.warm {
  border-color: rgba(var(--amber-rgb), 0.42);
  background: radial-gradient(90% 90% at 0% 0%, rgba(var(--amber-rgb), 0.14), var(--surface) 70%);
}
.stat-tile.warm .stat-v { color: var(--amber); text-shadow: 0 0 14px rgba(var(--amber-rgb), 0.4); }

.bars {
  height: 116px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  align-items: end;
  padding-top: 12px;
}

.bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  height: 100%;
  justify-content: flex-end;
}

.bar-v { font-size: 10.5px; font-family: var(--font-mono); color: var(--text-3); }
.bar-col.today .bar-v { color: var(--neon); }

.bar-fill {
  width: 100%;
  max-width: 24px;
  min-height: 4px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, rgba(255,255,255,0.22), rgba(255,255,255,0.06));
  transition: height 0.65s var(--spring);
}

.bar-col.today .bar-fill {
  background: linear-gradient(180deg, var(--neon), rgba(var(--violet-rgb), 0.5));
  box-shadow: 0 0 16px rgba(var(--neon-rgb), 0.45);
}

.bar-col.over .bar-fill { background: linear-gradient(180deg, var(--amber), rgba(var(--danger-rgb), 0.55)); }
.bar-d { font-size: 10.5px; color: var(--text-3); }
.bar-col.today .bar-d { color: var(--text); }

.spec-rows { display: flex; flex-direction: column; }
.spec-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
}
.spec-row:first-child { border-top: none; padding-top: 2px; }
.spec-row:last-child { padding-bottom: 2px; }
.spec-k { color: var(--text-2); }
.spec-v { font-family: var(--font-mono); font-size: 12px; color: var(--text); }

/* ==========================================================================
   TAB 3: PROTOCOL DEBUG LAB
   ========================================================================== */

.raw-list { display: flex; flex-direction: column; gap: 8px; }
.raw-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-family: var(--font-mono); font-size: 11px; }
.raw-id { color: var(--neon); flex-shrink: 0; }
.raw-bytes { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.b-chip { padding: 2px 5px; border-radius: 5px; background: rgba(255,255,255,0.05); color: var(--text-2); transition: all 0.35s ease; }
.b-chip.hi { background: rgba(var(--neon-rgb), 0.24); color: var(--neon); box-shadow: 0 0 10px rgba(var(--neon-rgb), 0.55); }

.cmd-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.cmd-btn {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
  color: var(--text-2);
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 11.5px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  transition: transform 0.25s var(--spring), border-color 0.2s ease, color 0.2s ease;
}
.cmd-btn:hover { color: var(--text); border-color: rgba(var(--neon-rgb), 0.42); }
.cmd-btn:active { transform: scale(0.96); }
.cmd-btn.done { color: var(--mint); border-color: rgba(var(--mint-rgb), 0.38); }

.hex-row { display: flex; gap: 8px; flex-wrap: wrap; }
.hex-input {
  flex: 1;
  min-width: 150px;
  background: var(--bg);
  border: 1px solid var(--line-hi);
  border-radius: 10px;
  padding: 9px 12px;
  color: var(--neon);
  font-family: var(--font-mono);
  font-size: 12px;
  outline: none;
}
.hex-input:focus { border-color: rgba(var(--neon-rgb), 0.65); }

.log-stream {
  height: 196px;
  overflow-y: auto;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.log-item { display: grid; grid-template-columns: 50px 30px 1fr; gap: 6px; line-height: 1.4; }
.log-t { color: var(--text-3); }
.log-d.TX { color: var(--neon); }
.log-d.RX { color: var(--mint); }
.log-d.GATT { color: var(--violet); }
.log-d.SYS { color: var(--amber); }
.log-m { color: var(--text-2); word-break: break-all; }
.log-m b { color: var(--text); font-weight: 500; }

/* Minimal Floating Toast */
.toast-wrap {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99;
  pointer-events: none;
}

.toast {
  padding: 9px 18px;
  border-radius: 999px;
  background: rgba(11, 15, 24, 0.92);
  border: 1px solid rgba(var(--neon-rgb), 0.42);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 500;
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.72), 0 0 22px rgba(var(--neon-rgb), 0.16);
  animation: toastPop 0.34s var(--spring);
}

@keyframes toastPop {
  from { opacity: 0; transform: translateY(14px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}


/* ==========================================================================
   IQOS NEON Web v2.0 Additions — Multi-Edition Studio, Cooldown, Anti-Lost,
   Spend Ledger, Dock-Charging & iOS Safe Area
   ========================================================================== */

.app {
  padding-bottom: calc(30px + env(safe-area-inset-bottom, 0px));
}

.stage.is-dock-charging {
  border-color: rgba(var(--mint-rgb), 0.56);
  box-shadow: inset 0 0 32px rgba(var(--mint-rgb), 0.10), 0 0 44px rgba(var(--mint-rgb), 0.18);
}
.stage.is-dock-charging .stage-pill .dot {
  background: var(--mint);
  box-shadow: 0 0 12px var(--mint);
  animation-duration: 1.1s;
}
.stage.is-dock-charging .rig-pedestal {
  background: radial-gradient(ellipse, rgba(var(--mint-rgb), 0.46), transparent 74%);
}

/* Real Hardware Undocked Visual Cue (f8a54120 6B / no holder battery) */
.stage.is-undocked .hw-holder {
  opacity: 0.34;
  filter: grayscale(0.35) drop-shadow(0 18px 28px rgba(0, 0, 0, 0.72));
}
.stage.is-undocked .ts-overlay {
  --led-a: 0.14;
  --led-s: 0.20;
}
.stage.is-undocked .stage-pill .dot {
  background: var(--amber);
  box-shadow: 0 0 10px var(--amber);
}

/* Native Android App Download Nav Pill & Promo Card */
.app-nav-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6.5px 11px;
  font-size: 11.5px;
}
.app-ver-chip {
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--neon);
  padding: 1.5px 6px;
  border-radius: 999px;
  background: rgba(var(--neon-rgb), 0.12);
  border: 1px solid rgba(var(--neon-rgb), 0.36);
}
@media (max-width: 440px) {
  .app-nav-link .app-ver-chip { display: none; }
}
.app-promo-card {
  border-color: rgba(var(--neon-rgb), 0.24);
  background:
    radial-gradient(90% 100% at 0% 0%, rgba(var(--neon-rgb), 0.08), transparent 65%),
    var(--surface);
}

.circle-btn.active-neon {
  color: var(--neon);
  border-color: rgba(var(--neon-rgb), 0.58);
  background: rgba(var(--neon-rgb), 0.12);
  box-shadow: 0 0 16px rgba(var(--neon-rgb), 0.28);
}

.rig-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.hw-img.swapping {
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.18s ease, transform 0.22s ease;
}

/* Subtle Edition Switcher Pill below Hardware */
.edition-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px 5px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(8, 11, 18, 0.72);
  backdrop-filter: blur(12px);
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.28s var(--spring), border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}
.edition-badge:hover {
  color: var(--text);
  border-color: rgba(var(--neon-rgb), 0.44);
  box-shadow: 0 0 16px rgba(var(--neon-rgb), 0.16);
}
.edition-badge:active { transform: scale(0.95); }

.edition-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}

.edition-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 1.5px 6px;
  border-radius: 999px;
  color: #FFE4A3;
  background: linear-gradient(135deg, rgba(255, 198, 92, 0.24), rgba(255, 132, 64, 0.18));
  border: 1px solid rgba(255, 200, 100, 0.42);
}

/* Unsynced Neutral Liquid Track (prevents fake stale slider before hardware sync) */
.liquid-track.unsynced .liquid-thumb {
  opacity: 0;
  transform: translateX(50%) scale(0.88);
}

/* Card Helpers, Cooldown Lock & Anti-Lost Toggle */
.card-text-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.card-sub {
  font-size: 11px;
  color: var(--text-2);
  line-height: 1.4;
}
.card-sub.accent {
  color: var(--violet);
  font-weight: 600;
}
.card-divider {
  height: 1px;
  background: var(--line);
  margin: 2px 0;
}

.cooldown-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.cd-pill {
  border: 1px solid rgba(var(--violet-rgb), 0.36);
  background: rgba(var(--violet-rgb), 0.08);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 6px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.26s var(--spring), background 0.25s ease, border-color 0.25s ease;
}
.cd-pill:hover {
  border-color: rgba(var(--violet-rgb), 0.65);
  background: rgba(var(--violet-rgb), 0.16);
}
.cd-pill:active { transform: scale(0.95); }

/* Luxury Tactile Neon Switch */
.neon-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  cursor: pointer;
}
.neon-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.neon-switch-track {
  width: 44px;
  height: 25px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line-hi);
  position: relative;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.neon-switch-track::after {
  content: "";
  position: absolute;
  top: 2.5px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #A8B2C5;
  transition: transform 0.32s var(--spring), background 0.3s ease, box-shadow 0.3s ease;
}
.neon-switch input:checked + .neon-switch-track {
  background: rgba(var(--neon-rgb), 0.22);
  border-color: rgba(var(--neon-rgb), 0.62);
  box-shadow: 0 0 16px rgba(var(--neon-rgb), 0.25);
}
.neon-switch input:checked + .neon-switch-track::after {
  transform: translateX(19px);
  background: var(--neon);
  box-shadow: 0 0 10px var(--neon);
}

/* Stepper & Spend Grid */
.stepper {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.step-btn {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--line-hi);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.22s var(--spring), border-color 0.2s ease;
}
.step-btn:hover { border-color: rgba(var(--neon-rgb), 0.5); color: var(--neon); }
.step-btn:active { transform: scale(0.9); }
.step-val {
  min-width: 48px;
  text-align: center;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-2);
}

.spend-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.spend-box {
  border-radius: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 12px 13px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.spend-v {
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.spend-sub {
  font-size: 11.5px;
  font-family: var(--font-mono);
  color: var(--neon);
}

/* ==========================================================================
   APPEARANCE STUDIO BOTTOM SHEET (8 Editions + 5 Themes)
   ========================================================================== */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}
.sheet-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.sheet {
  width: 100%;
  max-width: 620px;
  max-height: 86dvh;
  background: linear-gradient(180deg, #0D111A 0%, #07090F 100%);
  border: 1px solid var(--line-hi);
  border-bottom: none;
  border-radius: 26px 26px 0 0;
  padding: 10px 18px calc(22px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 14px;
  transform: translateY(28px);
  transition: transform 0.36s var(--spring);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.85);
}
@media (min-width: 781px) {
  .sheet-backdrop { align-items: center; padding: 20px; }
  .sheet { border-radius: 26px; border-bottom: 1px solid var(--line-hi); max-height: 82dvh; }
}
.sheet-backdrop.open .sheet {
  transform: translateY(0);
}

.sheet-handle {
  width: 38px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  margin: 0 auto 2px;
}
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.sheet-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.sheet-sub {
  font-size: 11.5px;
  color: var(--text-2);
  margin-top: 2px;
}

.studio-tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 3px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--line);
}
.studio-glider {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(var(--neon-rgb), 0.18), rgba(var(--violet-rgb), 0.14));
  border: 1px solid rgba(var(--neon-rgb), 0.42);
  transition: transform 0.36s var(--spring);
  pointer-events: none;
}
.studio-tab {
  position: relative;
  z-index: 1;
  border: none;
  background: transparent;
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 0;
  cursor: pointer;
  transition: color 0.25s ease;
}
.studio-tab.active { color: var(--text); }

.studio-body {
  overflow-y: auto;
  padding-right: 2px;
  -webkit-overflow-scrolling: touch;
}
.studio-pane { display: none; }
.studio-pane.active { display: block; animation: panelReveal 0.28s var(--smooth); }

.edition-section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-3);
  margin-bottom: 8px;
}

.edition-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (min-width: 560px) {
  .edition-grid { grid-template-columns: repeat(4, 1fr); }
}

.edition-card {
  position: relative;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(16, 20, 32, 0.92), rgba(8, 10, 16, 0.98));
  padding: 12px 10px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text);
  text-align: center;
  transition: transform 0.28s var(--spring), border-color 0.25s ease, box-shadow 0.25s ease;
}
.edition-card:hover {
  border-color: var(--line-hi);
  transform: translateY(-2px);
}
.edition-card:active { transform: scale(0.96); }
.edition-card.selected {
  border-color: rgba(var(--neon-rgb), 0.68);
  background: radial-gradient(90% 80% at 50% 20%, rgba(var(--neon-rgb), 0.14), rgba(10, 13, 21, 0.98));
  box-shadow: 0 0 24px rgba(var(--neon-rgb), 0.18), inset 0 1px 0 rgba(var(--neon-rgb), 0.3);
}

.edition-thumb-pair {
  height: 78px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  pointer-events: none;
}
.edition-thumb-pair img.th-h {
  height: 68px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.75));
}
.edition-thumb-pair img.th-c {
  height: 76px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.8));
}

.edition-card-badge {
  position: absolute;
  top: 7px;
  right: 7px;
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  color: #FFE4A3;
  background: linear-gradient(135deg, rgba(255, 198, 92, 0.26), rgba(255, 128, 60, 0.2));
  border: 1px solid rgba(255, 200, 100, 0.45);
}

.edition-card-name {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.2;
}
.edition-card-sub {
  font-size: 10px;
  color: var(--text-3);
  font-family: var(--font-mono);
}

/* 5 Neon Themes List */
.theme-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.theme-card {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #10141F;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  color: var(--text);
  text-align: left;
  transition: transform 0.24s var(--spring), border-color 0.25s ease, background 0.25s ease;
}
.theme-card:active { transform: scale(0.98); }
.theme-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.theme-ring {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  padding: 3px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.theme-ring-core {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #080A10;
  display: grid;
  place-items: center;
}
.theme-ring-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.theme-name { font-size: 13.5px; font-weight: 600; }
.theme-sub { font-size: 11px; color: var(--text-2); margin-top: 1px; }
.theme-active-tag { font-size: 11.5px; font-weight: 600; }
