/* ============================================================
   GASSTATION × RŮSTOVÝ KONFIGURÁTOR
   Single-screen interactive sales tool
   Black · Purple · Neon Green · Sticker brand vibe
   ============================================================ */

/* ---------- TOKENS ---------- */
:root {
  /* surface */
  --bg-deep:   #050308;
  --bg-base:   #0a060f;
  --bg-card:   #110a1c;
  --bg-elev:   #18102a;
  --bg-elev-2: #1f1535;

  /* text */
  --text-strong: #f6f5fb;
  --text:        #cfc8dc;
  --text-muted:  #7e7393;
  --text-faint:  #4a4458;

  /* brand accents */
  --green:        #b4ff00;
  --green-soft:   #c9ff3a;
  --green-deep:   #8ecf1a;
  --green-glow:   rgba(180, 255, 0, 0.45);
  --green-glow-2: rgba(180, 255, 0, 0.12);

  --purple:        #a855f7;
  --purple-soft:   #c084fc;
  --purple-deep:   #7c3aed;
  --purple-glow:   rgba(168, 85, 247, 0.42);
  --purple-glow-2: rgba(168, 85, 247, 0.12);

  /* lines */
  --line:        rgba(246, 245, 251, 0.07);
  --line-strong: rgba(246, 245, 251, 0.14);
  --line-purple: rgba(168, 85, 247, 0.28);
  --line-green:  rgba(180, 255, 0, 0.28);

  /* type */
  --f-sticker: "Anton", "Arial Narrow", sans-serif;
  --f-body:    "Geist", system-ui, -apple-system, sans-serif;
  --f-mono:    "JetBrains Mono", ui-monospace, monospace;

  /* metrics */
  --header-h: 64px;
  --panel-w:  380px;
  --r-sm:     8px;
  --r-md:     14px;
  --r-lg:     20px;
  --r-pill:   999px;
}

/* ---------- RESET ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

html {
  background: var(--bg-deep);
  color: var(--text);
}

body {
  font-family: var(--f-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow: hidden;
  position: relative;
  background: var(--bg-deep);
}

img, svg { display: block; max-width: 100%; }
button { font: inherit; background: none; border: none; color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
::selection { background: var(--green); color: #0a0c08; }

/* ============================================================
   ATMOSPHERE
   ============================================================ */
.atmos {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.atmos__purple,
.atmos__green {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.55;
}

.atmos__purple {
  width: 900px;
  height: 900px;
  top: -250px;
  left: -200px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.55), transparent 60%);
  animation: drift1 22s ease-in-out infinite;
}

.atmos__green {
  width: 760px;
  height: 760px;
  bottom: -300px;
  right: -150px;
  background: radial-gradient(circle, rgba(180, 255, 0, 0.22), transparent 60%);
  animation: drift2 26s ease-in-out -6s infinite;
}

@keyframes drift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(60px, 40px) scale(1.08); }
}

@keyframes drift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-50px, -30px) scale(1.05); }
}

.atmos__stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,0.4) 50%, transparent 100%),
    radial-gradient(1px 1px at 28% 72%, rgba(255,255,255,0.3) 50%, transparent 100%),
    radial-gradient(1px 1px at 45% 38%, rgba(255,255,255,0.5) 50%, transparent 100%),
    radial-gradient(1px 1px at 62% 88%, rgba(255,255,255,0.35) 50%, transparent 100%),
    radial-gradient(1px 1px at 78% 22%, rgba(255,255,255,0.4) 50%, transparent 100%),
    radial-gradient(1px 1px at 88% 62%, rgba(255,255,255,0.3) 50%, transparent 100%),
    radial-gradient(1px 1px at 8% 82%, rgba(180,255,0,0.5) 50%, transparent 100%),
    radial-gradient(1px 1px at 92% 12%, rgba(168,85,247,0.6) 50%, transparent 100%),
    radial-gradient(1px 1px at 35% 8%, rgba(255,255,255,0.4) 50%, transparent 100%),
    radial-gradient(1px 1px at 52% 58%, rgba(168,85,247,0.4) 50%, transparent 100%);
  background-size: 100% 100%;
  opacity: 0.6;
  animation: starsTwinkle 6s ease-in-out infinite;
}

@keyframes starsTwinkle {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 0.85; }
}

.atmos__grain {
  position: absolute;
  inset: -50%;
  opacity: 0.35;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.85  0 0 0 0 0.95  0 0 0 0 0.65  0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
  animation: grain 8s steps(8) infinite;
  pointer-events: none;
}

@keyframes grain {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-3%, 4%); }
  40%  { transform: translate(2%, -5%); }
  60%  { transform: translate(-4%, 2%); }
  80%  { transform: translate(3%, 3%); }
  100% { transform: translate(0, 0); }
}

/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: relative;
  z-index: 5;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 6, 15, 0.65);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}

.header__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* small green pulse mark (replaces logo in header) */
.header__mark {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow:
    0 0 12px var(--green-glow),
    0 0 24px var(--purple-glow);
  flex-shrink: 0;
  animation: pulse 1.6s ease-in-out infinite;
}

.header__title {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.header__title-pre {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 5px;
}

.header__title-main {
  font-family: var(--f-sticker);
  font-size: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-strong);
}

.header__meta {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* counter pill */
.counter {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid var(--line-green);
  background: rgba(180, 255, 0, 0.05);
  border-radius: var(--r-pill);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
}

.counter__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green-glow);
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.55; transform: scale(0.85); }
}

.counter__label { color: var(--text-muted); }
.counter__value {
  color: var(--green);
  font-weight: 500;
  font-size: 13px;
  min-width: 14px;
  text-align: center;
}
.counter__total { color: var(--text-faint); }

/* ============================================================
   APP LAYOUT
   ============================================================ */
.app {
  position: relative;
  z-index: 2;
  height: calc(100vh - var(--header-h));
  display: grid;
  grid-template-columns: 1fr var(--panel-w);
  overflow: hidden;
}

/* ============================================================
   STAGE / WHEEL
   ============================================================ */
.stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  min-height: 0;
}

.wheel-wrap {
  position: relative;
  width: 100%;
  max-width: min(580px, 80vh);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
}

.wheel {
  position: relative;
  width: 100%;
  height: 100%;
}

.wheel__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
}

.wheel__ring--outer {
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 30%, rgba(168, 85, 247, 0.06), transparent 65%),
    radial-gradient(circle at 50% 80%, rgba(180, 255, 0, 0.04), transparent 65%);
}

.wheel__ring--mid {
  inset: 16%;
  border: 1px solid var(--line);
  background: radial-gradient(circle, rgba(168, 85, 247, 0.05), transparent 70%);
}

.wheel__ring--dashed {
  inset: 8%;
  border: 1px dashed rgba(180, 255, 0, 0.18);
  animation: spin 80s linear infinite;
}

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

/* HUB (center logo) */
.hub {
  position: absolute;
  inset: 31%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 30%, rgba(168, 85, 247, 0.35), transparent 65%),
    var(--bg-elev);
  box-shadow:
    inset 0 0 30px rgba(168, 85, 247, 0.25),
    inset 0 0 0 1px var(--line-purple),
    0 30px 60px -20px rgba(0, 0, 0, 0.7),
    0 0 80px rgba(168, 85, 247, 0.18),
    0 0 60px rgba(180, 255, 0, 0.08);
  z-index: 4;
}

.hub__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  height: 100%;
  padding: 10px;
}

.hub__logo {
  position: relative;
  width: 86%;
  max-width: 180px;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  margin-bottom: 6px;
}

.hub__logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter:
    drop-shadow(0 6px 18px rgba(168, 85, 247, 0.45))
    drop-shadow(0 0 24px rgba(180, 255, 0, 0.18));
  display: block;
}

.hub__logo-fallback {
  display: none;
  font-family: var(--f-sticker);
  color: #fff;
  font-size: clamp(28px, 4.5vw, 42px);
  line-height: 0.82;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  -webkit-text-stroke: 1.5px var(--green);
  text-shadow:
    0 0 16px var(--green-glow),
    0 0 28px var(--purple-glow),
    0 4px 16px rgba(0, 0, 0, 0.7);
}

.hub__logo.is-fallback .hub__logo-img { display: none; }
.hub__logo.is-fallback .hub__logo-fallback { display: block; }

.hub__divider {
  width: 28px;
  height: 1px;
  background: var(--green);
  opacity: 0.45;
  margin: 4px 0 4px;
}

.hub__hint {
  font-family: var(--f-mono);
  font-size: 8px;
  letter-spacing: 0.24em;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* AREA CARD */
.area {
  position: absolute;
  width: 26%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--line-strong);
  cursor: pointer;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 14px;
  z-index: 3;
  transform: translate(-50%, -50%) scale(0.5);
  opacity: 0;
  transition:
    transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1),
    opacity 0.4s ease,
    background 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.4s ease;
  box-shadow:
    0 14px 32px -10px rgba(0, 0, 0, 0.65),
    inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.area.is-mounted {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.area::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(from 0deg,
    transparent,
    var(--purple-glow),
    transparent 30%,
    var(--green-glow),
    transparent 70%);
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: -1;
  animation: spin 6s linear infinite;
}

.area:hover {
  transform: translate(-50%, -50%) scale(1.06);
  background: var(--bg-elev);
  border-color: var(--purple);
  box-shadow:
    0 20px 50px -10px rgba(0, 0, 0, 0.7),
    0 0 30px rgba(168, 85, 247, 0.25);
  z-index: 5;
}

.area:hover::before { opacity: 0.55; }

.area.has-selection {
  border-color: var(--green);
  background: linear-gradient(150deg, rgba(180, 255, 0, 0.18), rgba(168, 85, 247, 0.06) 60%);
  box-shadow:
    0 0 0 1px var(--green),
    0 0 30px var(--green-glow),
    0 14px 32px -10px rgba(0, 0, 0, 0.65);
}

.area.has-selection::before { opacity: 0.9; }

.area__num {
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--purple-soft);
  margin-bottom: 4px;
}

.area.has-selection .area__num { color: var(--green); }

.area__name {
  font-family: var(--f-sticker);
  font-size: 14px;
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-strong);
}

/* selection badge */
.area__badge {
  position: absolute;
  top: -8px;
  right: -8px;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  display: grid;
  place-items: center;
  background: var(--green);
  color: #0a0c08;
  border-radius: var(--r-pill);
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: 11px;
  border: 2px solid var(--bg-deep);
  box-shadow: 0 0 16px var(--green-glow);
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.area.has-selection .area__badge {
  opacity: 1;
  transform: scale(1);
}

.stage__hint {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.stage__hint-arrow {
  color: var(--green);
  animation: bounce 2s ease-in-out infinite;
}

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

/* ============================================================
   SELECTION PANEL (right)
   ============================================================ */
.panel {
  position: relative;
  display: flex;
  flex-direction: column;
  background: rgba(10, 6, 15, 0.55);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-left: 1px solid var(--line-strong);
  min-height: 0;
}

.panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: -1px;
  width: 1px;
  height: 50%;
  background: linear-gradient(180deg, transparent, var(--purple), transparent);
  opacity: 0.5;
  pointer-events: none;
}

.panel__head {
  padding: 22px 22px 18px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
  position: relative;
}

.panel__close {
  display: none;
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  font-size: 20px;
  line-height: 1;
  color: var(--text);
  background: var(--bg-elev);
  transition: background 0.2s, color 0.2s, transform 0.2s;
  z-index: 2;
}

.panel__close:hover {
  background: var(--green);
  color: #0a0c08;
  border-color: var(--green);
  transform: rotate(90deg);
}

.panel__head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel__head-row--main {
  align-items: baseline;
  margin-top: 6px;
}

.panel__head-label {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--purple-soft);
  text-transform: uppercase;
}

.panel__head-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--purple-soft);
  box-shadow: 0 0 8px var(--purple-glow);
  animation: pulse 1.6s ease-in-out infinite;
}

.panel__title {
  font-family: var(--f-sticker);
  font-size: 32px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-strong);
  line-height: 1;
}

.panel__counter {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.panel__counter-num {
  font-family: var(--f-sticker);
  font-size: 28px;
  color: var(--green);
  letter-spacing: 0.02em;
  line-height: 1;
  text-shadow: 0 0 16px var(--green-glow-2);
}

.panel__counter-suffix {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* scroll body */
.panel__scroll {
  flex: 1;
  overflow-y: auto;
  padding: 22px;
  scrollbar-width: thin;
  scrollbar-color: var(--bg-elev-2) transparent;
}

.panel__scroll::-webkit-scrollbar { width: 6px; }
.panel__scroll::-webkit-scrollbar-track { background: transparent; }
.panel__scroll::-webkit-scrollbar-thumb {
  background: var(--bg-elev-2);
  border-radius: 4px;
}

/* empty state */
.panel-empty {
  text-align: center;
  padding: 40px 14px 30px;
  color: var(--text-muted);
}

.panel-empty__viz {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  color: var(--purple-soft);
  animation: spin 60s linear infinite;
}

.panel-empty__title {
  font-family: var(--f-sticker);
  font-size: 18px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 8px;
}

.panel-empty__sub {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 280px;
  margin: 0 auto;
}

/* filled state */
.panel-areas {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 24px;
}

.p-area {
  opacity: 0;
  animation: fadeInUp 0.35s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.p-area__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line-strong);
}

.p-area__num {
  font-family: var(--f-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--green);
  padding: 2px 6px;
  border: 1px solid var(--line-green);
  background: rgba(180, 255, 0, 0.05);
  border-radius: 3px;
}

.p-area__name {
  font-family: var(--f-sticker);
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-strong);
  flex: 1;
}

.p-area__count {
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--text-muted);
}

.p-area__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.p-area__item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
  padding: 4px 6px;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.p-area__item:hover {
  background: rgba(180, 255, 0, 0.05);
}

.p-area__item-dot {
  flex-shrink: 0;
  margin-top: 7px;
  width: 4px;
  height: 4px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--green-glow-2);
}

.p-area__item-remove {
  margin-left: auto;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  font-size: 14px;
  line-height: 1;
  color: var(--text-faint);
  border-radius: 4px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.2s, color 0.2s, background 0.2s;
}

.p-area__item:hover .p-area__item-remove {
  opacity: 1;
}

.p-area__item-remove:hover {
  color: #ff7575;
  background: rgba(255, 100, 100, 0.1);
}

/* summary text card */
.panel-summary {
  padding: 16px;
  background: linear-gradient(150deg, rgba(180, 255, 0, 0.06), rgba(168, 85, 247, 0.04) 60%);
  border: 1px solid var(--line-green);
  border-radius: var(--r-md);
  position: relative;
  overflow: hidden;
}

.panel-summary::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--green), var(--purple));
}

.panel-summary__label {
  display: block;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--green);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.panel-summary__text {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text);
}

.panel-summary__text strong {
  color: var(--text-strong);
  font-weight: 600;
}

/* panel footer */
.panel__foot {
  padding: 16px 22px 20px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  background: rgba(10, 6, 15, 0.4);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: var(--r-pill);
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1),
              background 0.25s, color 0.25s, border-color 0.25s, box-shadow 0.25s;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.btn--sm {
  padding: 10px 14px;
  font-size: 10px;
}

.btn--primary {
  flex: 1;
  background: var(--green);
  color: #0a0c08;
  box-shadow:
    0 10px 30px -10px var(--green-glow),
    0 0 0 1px rgba(180, 255, 0, 0.2);
}

.btn--primary:hover {
  background: var(--green-soft);
  transform: translateY(-2px);
  box-shadow:
    0 14px 40px -8px var(--green-glow),
    0 0 0 1px rgba(180, 255, 0, 0.35);
}

.btn--ghost {
  background: rgba(168, 85, 247, 0.06);
  color: var(--text);
  border-color: var(--line-strong);
}

.btn--ghost:hover {
  border-color: var(--purple);
  color: var(--purple-soft);
  background: rgba(168, 85, 247, 0.12);
}

/* ============================================================
   MODAL
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 3, 8, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
}

.modal__panel {
  position: relative;
  width: min(540px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--line-purple);
  border-radius: var(--r-lg);
  padding: 26px 28px;
  box-shadow:
    0 50px 120px -20px rgba(0, 0, 0, 0.85),
    0 0 60px rgba(168, 85, 247, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  transform: translateY(20px) scale(0.96);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.25s;
  scrollbar-width: thin;
  scrollbar-color: var(--bg-elev-2) transparent;
}

.modal.is-open .modal__panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal__panel::-webkit-scrollbar { width: 6px; }
.modal__panel::-webkit-scrollbar-thumb { background: var(--bg-elev-2); border-radius: 4px; }

.modal__panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--purple), var(--green), transparent);
  opacity: 0.7;
}

.modal__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.modal__head-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.modal__num {
  color: var(--green);
  font-weight: 600;
  font-size: 13px;
  padding: 4px 8px;
  border: 1px solid var(--line-green);
  background: rgba(180, 255, 0, 0.06);
  border-radius: 4px;
}

.modal__num-divider, .modal__num-total {
  color: var(--text-faint);
}

.modal__cat {
  color: var(--text-muted);
  margin-left: 6px;
}

.modal__close {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  font-size: 20px;
  line-height: 1;
  color: var(--text);
  background: var(--bg-elev);
  transition: background 0.2s, color 0.2s, transform 0.2s, border-color 0.2s;
}

.modal__close:hover {
  background: var(--green);
  color: #0a0c08;
  border-color: var(--green);
  transform: rotate(90deg);
}

.modal__title {
  font-family: var(--f-sticker);
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-strong);
  margin-bottom: 18px;
}

/* benefit block */
.modal__benefit {
  padding: 14px 16px;
  background: linear-gradient(140deg, rgba(180, 255, 0, 0.08), rgba(168, 85, 247, 0.04) 60%);
  border: 1px solid var(--line-green);
  border-left: 3px solid var(--green);
  border-radius: var(--r-sm);
  margin-bottom: 20px;
}

.modal__benefit-label {
  display: block;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--green);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.modal__benefit-text {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-strong);
}

/* checklist */
.modal__list-block {
  margin-bottom: 16px;
}

.modal__list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.modal__list-label {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.modal__list-progress {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--green);
  padding: 3px 8px;
  background: rgba(180, 255, 0, 0.06);
  border: 1px solid var(--line-green);
  border-radius: 3px;
}

.checklist {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: rgba(168, 85, 247, 0.03);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.check-item:hover {
  border-color: var(--line-purple);
  background: rgba(168, 85, 247, 0.08);
}

.check-item.is-checked {
  border-color: var(--green);
  background: linear-gradient(120deg, rgba(180, 255, 0, 0.1), rgba(168, 85, 247, 0.04));
}

.check-item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.check-item__box {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1.5px solid var(--text-muted);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #0a0c08;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.check-item__box svg {
  width: 12px;
  height: 12px;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.2s, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.check-item.is-checked .check-item__box {
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 0 12px var(--green-glow);
}

.check-item.is-checked .check-item__box svg {
  opacity: 1;
  transform: scale(1);
}

.check-item__label {
  font-size: 13px;
  color: var(--text);
  line-height: 1.4;
}

.check-item.is-checked .check-item__label {
  color: var(--text-strong);
}

/* details collapsible */
.modal__details {
  margin-bottom: 20px;
}

.modal__details-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--purple-soft);
  border-radius: var(--r-sm);
  transition: background 0.2s, color 0.2s;
}

.modal__details-toggle:hover {
  color: var(--green);
  background: rgba(180, 255, 0, 0.05);
}

.modal__details-arrow {
  display: inline-block;
  transition: transform 0.25s ease;
  font-size: 11px;
}

.modal__details-toggle[aria-expanded="true"] .modal__details-arrow {
  transform: rotate(90deg);
  color: var(--green);
}

.modal__details-body {
  margin-top: 10px;
  padding: 14px 16px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
  animation: detailsIn 0.3s ease;
}

@keyframes detailsIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.modal__foot {
  display: flex;
  gap: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--bg-elev);
  border: 1px solid var(--green);
  border-radius: var(--r-pill);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-strong);
  opacity: 0;
  transition: opacity 0.3s, transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
  pointer-events: none;
  box-shadow:
    0 20px 50px -12px rgba(0, 0, 0, 0.6),
    0 0 30px var(--green-glow-2);
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast__dot {
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--green-glow);
}

/* ============================================================
   MOBILE TRIGGER (hidden on desktop)
   ============================================================ */
.m-trigger {
  display: none;
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  z-index: 50;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--bg-elev);
  border: 1px solid var(--line-green);
  border-radius: var(--r-pill);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-strong);
  box-shadow:
    0 14px 40px -10px rgba(0, 0, 0, 0.7),
    0 0 30px var(--green-glow-2);
}

.m-trigger__left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.m-trigger__dot {
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--green-glow);
  animation: pulse 1.6s ease-in-out infinite;
}

.m-trigger__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.m-trigger__count {
  font-family: var(--f-sticker);
  color: var(--green);
  font-size: 18px;
  letter-spacing: 0.04em;
}

.m-trigger__cta {
  color: var(--text-muted);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* tablet */
@media (max-width: 1080px) {
  :root { --panel-w: 340px; }

  .header__title-pre { display: none; }
  .header__title-main { font-size: 16px; }
}

/* mobile — switch to stacked layout */
@media (max-width: 820px) {
  body {
    overflow: auto;
    height: auto;
  }

  .header {
    height: auto;
    flex-direction: row;
    padding: 12px 16px;
    position: sticky;
    top: 0;
  }

  .brand-logo { width: 36px; height: 36px; }
  .header__title-main { font-size: 15px; }

  .counter {
    padding: 6px 10px;
    font-size: 10px;
  }

  .counter__total { display: none; }

  .app {
    height: auto;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  /* Hide circular wheel — show stacked cards */
  .stage {
    padding: 20px 16px 100px;
  }

  .wheel-wrap {
    max-width: 100%;
    aspect-ratio: auto;
  }

  .wheel {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .wheel__ring,
  .hub {
    display: none;
  }

  .area {
    position: static !important;
    transform: none !important;
    opacity: 1 !important;
    width: 100% !important;
    aspect-ratio: auto;
    border-radius: var(--r-md);
    padding: 18px 22px;
    display: flex;
    align-items: center;
    text-align: left;
    justify-content: flex-start;
    gap: 14px;
    border-width: 1.5px;
  }

  .area:hover {
    transform: scale(1.01) !important;
  }

  .area__num {
    font-size: 14px;
    color: var(--green);
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .area__name {
    font-size: 18px;
    flex: 1;
  }

  .area__badge {
    position: static;
    border: none;
  }

  .stage__hint {
    position: static;
    transform: none;
    margin-top: 14px;
    text-align: center;
    justify-content: center;
  }

  /* Right panel becomes overlay */
  .panel {
    position: fixed;
    inset: 0;
    border-left: none;
    background: var(--bg-base);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
    z-index: 70;
  }

  .panel.is-open {
    transform: translateY(0);
  }

  .panel__close {
    display: grid;
  }

  .panel__head {
    padding-right: 64px;
  }

  /* mobile trigger button */
  .m-trigger {
    display: flex;
  }

  /* modal becomes bottom sheet on small mobile */
  .modal__panel {
    padding: 22px;
  }

  .modal__title { font-size: 24px; }
  .modal__foot { flex-direction: column; }
  .btn { justify-content: center; }
}

@media (max-width: 480px) {
  .header__title-pre { display: none; }
  .panel__title { font-size: 26px; }
  .panel__counter-num { font-size: 22px; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
