/* ============================================================
   CalDo — site styles. World = bright splash-art sky (canvas),
   UI = the app's dark card language (this file).
   ============================================================ */

:root {
  --green: #2fd97e;
  --green-soft: #8ff0bd;
  --blue: #4c8dff;
  --blue-soft: #a6c8ff;
  --amber: #f5b040;
  --amber-soft: #ffd694;
  --red: #ff6b6b;
  --ink: #071018;
  --card: rgba(9, 16, 27, 0.82);
  --card-solid: #0c1524;
  --line: rgba(148, 184, 230, 0.16);
  --line-strong: rgba(148, 184, 230, 0.3);
  --text: #eef6ff;
  --muted: #9fb2c8;
  --shadow: 0 18px 50px rgba(2, 8, 18, 0.45);
  --r-lg: 22px;
  --r-md: 16px;
  --font: "Nunito", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* the hidden attribute must always win, even over display rules below */
[hidden] { display: none !important; }

html, body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: #6cb6ff;
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; cursor: pointer; }

#scene {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  display: block;
  touch-action: none;
}

/* ---------- generic app card ---------- */
.app-card {
  position: fixed;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text);
  z-index: 30;
}

/* ============================================================
   START VEIL
   ============================================================ */
#veil {
  position: fixed; inset: 0; z-index: 60;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  background: radial-gradient(ellipse at 50% 72%, rgba(4, 12, 24, 0.42), rgba(4, 12, 24, 0.05) 55%, transparent 75%);
  transition: opacity 0.7s ease, visibility 0.7s;
  padding: 24px;
}
#veil.gone { opacity: 0; visibility: hidden; pointer-events: none; }

.veil-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 620px; }

.brand-mark { display: flex; gap: 7px; margin-bottom: 2px; }
.brand-dot { width: 11px; height: 11px; border-radius: 50%; box-shadow: 0 2px 10px rgba(0,0,0,.35); }
.dot-green { background: var(--green); }
.dot-blue { background: var(--blue); }
.dot-amber { background: var(--amber); }

.veil-logo {
  font-size: clamp(64px, 12vw, 118px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 0.95;
  color: #fff;
  text-shadow: 0 6px 0 rgba(10, 40, 80, 0.22), 0 24px 60px rgba(4, 20, 44, 0.55);
}

.veil-tag {
  font-size: clamp(18px, 3vw, 26px);
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 18px rgba(4, 20, 44, 0.6);
}

.veil-sub {
  font-size: clamp(14px, 1.9vw, 17px);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 2px 14px rgba(4, 20, 44, 0.65);
  max-width: 460px;
}

.btn-start {
  margin-top: 18px;
  padding: 18px 54px;
  font-size: clamp(18px, 2.6vw, 24px);
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(6, 14, 26, 0.55);
  border: 2.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  backdrop-filter: blur(6px);
  animation: pulse 2.2s ease-in-out infinite;
  transition: transform 0.15s ease, background 0.2s ease;
}
.btn-start:hover { transform: scale(1.05); background: rgba(6, 14, 26, 0.75); }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.45); }
  50% { box-shadow: 0 0 0 14px rgba(255, 255, 255, 0); }
}

.link-skip {
  background: none; border: none;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px; font-weight: 700;
  text-decoration: underline dotted;
  text-underline-offset: 4px;
  opacity: 0.85;
}
.link-skip:hover { opacity: 1; }

.veil-hint {
  position: absolute; bottom: max(20px, env(safe-area-inset-bottom));
  font-size: 12px; font-weight: 700; letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.75);
}

/* ============================================================
   HUD
   ============================================================ */
#hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  pointer-events: none;
}
#hud > * { pointer-events: auto; }

.hud-logo {
  font-size: 24px; font-weight: 900; letter-spacing: -0.02em;
  color: #fff; text-shadow: 0 2px 12px rgba(4, 20, 44, 0.55);
}

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

.hud-rings {
  display: flex; gap: 6px; padding: 6px 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  box-shadow: var(--shadow);
}
.ring { width: 30px; height: 30px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 3.4; }
.ring-bg { stroke: rgba(148, 184, 230, 0.18); }
.ring-fg { stroke-dasharray: 88; stroke-dashoffset: 88; stroke-linecap: round; transition: stroke-dashoffset 0.6s ease; }
.ring-ic { transform-origin: 18px 18px; transform: rotate(90deg); }
.ring-fuel .ring-fg { stroke: var(--green); }
.ring-fuel .ring-ic { fill: var(--green); }
.ring-move .ring-fg { stroke: var(--blue); }
.ring-move .ring-ic { fill: var(--blue); }
.ring-balance .ring-fg { stroke: var(--amber); }
.ring-balance .ring-ic { stroke: var(--amber); fill: none; }
.ring.complete { animation: ringpop 0.5s ease; }
@keyframes ringpop { 40% { transform: rotate(-90deg) scale(1.25); } }

.btn-icon {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--card); border: 1px solid var(--line);
  font-size: 17px; box-shadow: var(--shadow);
}

/* ============================================================
   PROGRESS RAIL
   ============================================================ */
#rail {
  position: fixed; right: 18px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 14px; z-index: 50;
}
.rail-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  border: 2px solid rgba(255, 255, 255, 0.7);
  position: relative; padding: 0;
  transition: background 0.3s, transform 0.3s;
}
.rail-dot.active { background: #fff; transform: scale(1.35); }
.rail-dot.done { background: var(--green); border-color: var(--green-soft); }
.rail-dot span {
  position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  color: #fff; text-shadow: 0 1px 8px rgba(4, 20, 44, 0.7);
  opacity: 0; transition: opacity 0.25s; pointer-events: none; white-space: nowrap;
}
.rail-dot:hover span, .rail-dot.active span { opacity: 1; }

/* ============================================================
   ZONE PANELS
   ============================================================ */
.panel {
  position: fixed; z-index: 30;
  top: 50%; transform: translateY(-50%) translateX(0);
  left: 4vw;
  width: min(400px, 42vw);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 26px 26px 20px;
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}
.panel.show { opacity: 1; pointer-events: auto; }
.panel:not(.show) { transform: translateY(-50%) translateX(-24px); }

.kicker {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 900; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 10px;
}
.k-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); }
.k-dot.k-green { background: var(--green); }
.panel-fuel .k-dot { background: var(--green); }
.panel-move .k-dot { background: var(--blue); }
.panel-balance .k-dot { background: var(--amber); }
.panel-fuel .kicker { color: var(--green); }
.panel-move .kicker { color: var(--blue-soft); }
.panel-balance .kicker { color: var(--amber); }

.panel h2 {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 900; line-height: 1.08; letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.panel .lead { font-size: 14.5px; font-weight: 600; color: var(--muted); line-height: 1.55; margin-bottom: 14px; }

.feature-list { list-style: none; margin-bottom: 16px; }
.feature-list li {
  position: relative; padding-left: 24px;
  font-size: 13.5px; font-weight: 700; line-height: 1.4;
  margin-bottom: 8px; color: var(--text);
}
.feature-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  font-weight: 900;
}
.panel-fuel .feature-list li::before { color: var(--green); }
.panel-move .feature-list li::before { color: var(--blue); }
.panel-balance .feature-list li::before { color: var(--amber); }

.challenge-chip {
  display: flex; flex-direction: column; gap: 2px;
  border: 1.6px dashed var(--line-strong);
  border-radius: var(--r-md);
  padding: 10px 14px;
  font-size: 12.5px; color: var(--muted); font-weight: 600;
}
.challenge-chip strong { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 900; }
.panel-fuel .challenge-chip { border-color: rgba(47, 217, 126, 0.5); }
.panel-fuel .challenge-chip strong { color: var(--green); }
.panel-move .challenge-chip { border-color: rgba(76, 141, 255, 0.55); }
.panel-move .challenge-chip strong { color: var(--blue-soft); }
.panel-balance .challenge-chip { border-color: rgba(245, 176, 64, 0.55); }
.panel-balance .challenge-chip strong { color: var(--amber); }

/* ============================================================
   FUEL — analysis card
   ============================================================ */
#analysis-card {
  right: 4vw; top: 50%; transform: translateY(-50%);
  width: min(330px, 38vw);
  padding: 18px 20px;
  opacity: 0; transition: opacity 0.5s, transform 0.5s;
}
#analysis-card.show { opacity: 1; }
#analysis-card:not(.show) { transform: translateY(-50%) translateX(24px); pointer-events: none; }

.card-head {
  display: flex; align-items: center; gap: 9px;
  font-size: 14px; font-weight: 900; margin-bottom: 12px;
}
.card-head.amber { color: var(--amber-soft); }
.card-count { margin-left: auto; font-size: 12px; font-weight: 800; color: var(--muted); }
.cam-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: 0.25; } }

.an-steps { list-style: none; display: flex; flex-direction: column; gap: 7px; margin-bottom: 12px; }
.an-steps li { display: flex; align-items: center; gap: 9px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.an-steps li i {
  width: 17px; height: 17px; border-radius: 50%; flex: 0 0 17px;
  border: 2px solid var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center;
  font-style: normal; font-size: 10px; color: #04140b;
  transition: all 0.25s;
}
.an-steps li.spin i { border-color: var(--green); border-top-color: transparent; animation: rot 0.7s linear infinite; }
.an-steps li.ok { color: var(--text); }
.an-steps li.ok i { background: var(--green); border-color: var(--green); }
.an-steps li.ok i::before { content: "✓"; font-weight: 900; }
@keyframes rot { to { transform: rotate(360deg); } }

.an-results { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.an-results li {
  display: flex; align-items: center; gap: 10px;
  background: rgba(47, 217, 126, 0.08);
  border: 1px solid rgba(47, 217, 126, 0.35);
  border-radius: 12px; padding: 8px 12px;
  animation: slidein 0.35s ease;
}
@keyframes slidein { from { opacity: 0; transform: translateY(8px); } }
.an-results .sw { width: 26px; height: 26px; border-radius: 8px; flex: 0 0 26px; }
.an-results .nm { font-size: 13px; font-weight: 800; }
.an-results .macros { margin-left: auto; display: flex; gap: 7px; font-size: 11px; font-weight: 800; }
.an-results .kcal { color: var(--text); }
.an-results .m-p { color: var(--blue-soft); }
.an-results .m-c { color: var(--amber-soft); }
.an-results .m-f { color: #ff9d9d; }

.an-total {
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line);
  font-size: 13px; font-weight: 700; color: var(--muted);
  display: flex; align-items: center; gap: 6px;
}
.an-total strong { color: var(--text); font-size: 16px; }
.an-badge {
  margin-left: auto; font-size: 11px; font-weight: 900; color: #05130c;
  background: var(--green); border-radius: 999px; padding: 4px 10px;
}

/* ============================================================
   MOVE — rep HUD
   ============================================================ */
#move-hud { position: fixed; inset: 0; z-index: 30; pointer-events: none; opacity: 0; transition: opacity 0.5s; }
#move-hud.show { opacity: 1; }

.vision {
  top: 84px; right: 4vw;
  padding: 10px 12px 12px;
}
.vision-head {
  display: flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--blue-soft); margin-bottom: 8px;
}
.rec { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: blink 1s infinite; }
.vision-track { margin-left: 12px; color: var(--green); font-size: 10px; }
#vision-canvas {
  display: block; border-radius: 10px;
  background: rgba(10, 22, 40, 0.9);
  border: 1px solid var(--line);
}

.rep-panel {
  right: 4vw; top: 50%; transform: translateY(-50%);
  width: 200px; padding: 18px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.rep-count { display: flex; align-items: baseline; gap: 6px; }
.rep-count strong { font-size: 46px; font-weight: 900; color: var(--blue-soft); line-height: 1; }
.rep-count span { font-size: 13px; font-weight: 800; color: var(--muted); }

.depth-meter {
  position: relative; width: 26px; height: 150px;
  background: rgba(148, 184, 230, 0.12);
  border: 1px solid var(--line); border-radius: 999px;
  overflow: hidden;
}
.depth-zone {
  position: absolute; left: 0; right: 0;
  top: 62%; height: 33%;
  background: rgba(47, 217, 126, 0.30);
  border-top: 2px dashed var(--green);
  border-bottom: 2px dashed rgba(47,217,126,.5);
}
.depth-zone.hit { background: rgba(47, 217, 126, 0.65); }
.depth-fill {
  position: absolute; left: 4px; right: 4px; top: 4px;
  height: 12px; border-radius: 999px;
  background: var(--blue-soft);
  box-shadow: 0 0 12px rgba(76, 141, 255, 0.8);
  transition: none;
}
.depth-label {
  position: absolute; bottom: -22px; left: 50%; transform: translateX(-50%);
  font-size: 10px; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}

.rep-hint { font-size: 12px; font-weight: 800; color: var(--muted); text-align: center; min-height: 16px; margin-top: 8px; }
.rep-hint.good { color: var(--green); }
.rep-hint.warn { color: var(--amber); }

.btn-hold {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%);
  pointer-events: auto;
  padding: 20px 44px; border-radius: 999px;
  font-size: 15px; font-weight: 900; letter-spacing: 0.18em;
  color: #fff; background: rgba(37, 84, 170, 0.75);
  border: 2.5px solid var(--blue-soft);
  box-shadow: 0 10px 34px rgba(21, 60, 130, 0.55);
  backdrop-filter: blur(6px);
  user-select: none; -webkit-user-select: none;
  touch-action: none;
}
.btn-hold:active, .btn-hold.pressed { background: rgba(58, 118, 224, 0.95); transform: translateX(-50%) scale(0.96); }
#move-hud .app-card, #move-hud .btn-hold { pointer-events: auto; }

/* ============================================================
   Session summary + centered cards
   ============================================================ */
.center-card {
  left: 50%; top: 50%; transform: translate(-50%, -50%) scale(1);
  width: min(400px, 88vw);
  padding: 28px;
  text-align: center;
  z-index: 45;
  animation: cardin 0.45s cubic-bezier(0.2, 1.4, 0.4, 1);
}
@keyframes cardin { from { opacity: 0; transform: translate(-50%, -46%) scale(0.9); } }

.big-check {
  width: 64px; height: 64px; margin: 0 auto 10px;
  border-radius: 50%; background: var(--blue-soft); color: #06213f;
  font-size: 34px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
}
#session-card h3 { font-size: 28px; font-weight: 900; margin-bottom: 16px; }

.sess-stats { display: flex; gap: 12px; margin-bottom: 16px; }
.sess-stat {
  flex: 1; background: rgba(76, 141, 255, 0.08);
  border: 1px solid rgba(76, 141, 255, 0.3);
  border-radius: var(--r-md); padding: 12px;
  display: flex; flex-direction: column; gap: 4px;
}
.sess-stat span { font-size: 11.5px; font-weight: 800; color: var(--muted); }
.sess-stat strong { font-size: 26px; font-weight: 900; }

.sess-feedback { list-style: none; text-align: left; margin-bottom: 18px; display: flex; flex-direction: column; gap: 10px; }
.sess-feedback li { display: flex; gap: 10px; align-items: flex-start; }
.sess-feedback i {
  flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--blue); color: #061a35; font-style: normal;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 900; margin-top: 1px;
}
.sess-feedback strong { display: block; font-size: 13.5px; }
.sess-feedback span { font-size: 12px; color: var(--muted); font-weight: 600; line-height: 1.4; }

.btn-primary {
  width: 100%; padding: 15px; border: none; border-radius: 999px;
  font-size: 15.5px; font-weight: 900; letter-spacing: 0.02em;
  background: var(--green); color: #04140b;
  transition: transform 0.15s;
}
.btn-primary:hover { transform: scale(1.03); }
.btn-primary.btn-blue { background: var(--blue-soft); color: #06213f; }

/* ============================================================
   BALANCE — to-do card
   ============================================================ */
#todo-card {
  right: 4vw; top: 50%; transform: translateY(-50%);
  width: min(300px, 36vw); padding: 18px 20px;
  opacity: 0; transition: opacity 0.5s, transform 0.5s;
}
#todo-card.show { opacity: 1; }
#todo-card:not(.show) { transform: translateY(-50%) translateX(24px); pointer-events: none; }

.todo-list { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.todo-list li {
  display: flex; align-items: center; gap: 11px;
  font-size: 14px; font-weight: 800;
  border: 1.6px dashed rgba(245, 176, 64, 0.45);
  border-radius: 12px; padding: 10px 13px;
  transition: all 0.3s;
}
.todo-list li i {
  width: 20px; height: 20px; flex: 0 0 20px; border-radius: 7px;
  border: 2px solid var(--amber);
  display: inline-flex; align-items: center; justify-content: center;
  font-style: normal; font-size: 12px; color: #1d1303; font-weight: 900;
  transition: all 0.25s;
}
.todo-list li.done { border-style: solid; border-color: rgba(47, 217, 126, 0.5); background: rgba(47, 217, 126, 0.09); }
.todo-list li.done i { background: var(--green); border-color: var(--green); }
.todo-list li.done i::before { content: "✓"; }
.todo-list li.done { text-decoration: line-through; text-decoration-color: rgba(255,255,255,0.5); text-decoration-thickness: 2px; }

.todo-done {
  margin-top: 12px; padding: 10px; border-radius: 12px;
  background: rgba(245, 176, 64, 0.12); border: 1px solid rgba(245, 176, 64, 0.4);
  color: var(--amber-soft); font-size: 13px; font-weight: 900; text-align: center;
  animation: slidein 0.35s ease;
}

/* ============================================================
   OBJECTIVE BAR + TOASTS + FLASH
   ============================================================ */
#objective {
  position: fixed; bottom: max(22px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  z-index: 40;
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  box-shadow: var(--shadow); backdrop-filter: blur(10px);
  padding: 11px 22px;
  font-size: 13.5px; font-weight: 800;
  white-space: nowrap;
  transition: opacity 0.4s;
}
#objective.nudge { animation: nudge 0.5s ease; }
@keyframes nudge { 30% { transform: translateX(-50%) scale(1.07); } }
#objective .link-skip { color: var(--muted); font-size: 12px; }

#toasts {
  position: fixed; bottom: 92px; left: 50%; transform: translateX(-50%);
  z-index: 55; display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--card-solid); border: 1px solid var(--line-strong);
  border-left: 4px solid var(--green);
  border-radius: 14px; padding: 11px 20px;
  font-size: 13.5px; font-weight: 800;
  box-shadow: var(--shadow);
  animation: toastin 0.35s cubic-bezier(0.2, 1.4, 0.4, 1);
  transition: opacity 0.4s, transform 0.4s;
}
.toast.out { opacity: 0; transform: translateY(-10px); }
.toast.t-blue { border-left-color: var(--blue); }
.toast.t-amber { border-left-color: var(--amber); }
.toast.t-red { border-left-color: var(--red); }
@keyframes toastin { from { opacity: 0; transform: translateY(14px) scale(0.94); } }

#flash {
  position: fixed; inset: 0; z-index: 58; background: #fff;
  opacity: 0; pointer-events: none;
}
#flash.go { animation: flashgo 0.45s ease-out; }
@keyframes flashgo { 0% { opacity: 0.95; } 100% { opacity: 0; } }

/* ============================================================
   FINALE
   ============================================================ */
#finale {
  position: fixed; inset: 0; z-index: 48;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(5, 12, 26, 0) 0%, rgba(5, 12, 26, 0.55) 34%, rgba(5, 11, 22, 0.94) 78%);
  opacity: 0; transition: opacity 0.8s ease;
}
#finale.show { opacity: 1; }

.finale-inner {
  min-height: 100%;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 120px 6vw 26px;
  gap: 34px;
}

.finale-grid {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 40px; align-items: center;
  max-width: 1060px; margin: 0 auto; width: 100%;
}

.finale-copy h2 {
  font-size: clamp(30px, 4.6vw, 52px);
  font-weight: 900; line-height: 1.05; letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.finale-copy .lead { font-size: 16px; font-weight: 600; color: var(--muted); line-height: 1.6; margin-bottom: 24px; max-width: 460px; }

.store-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; }
.btn-store {
  display: flex; align-items: center; gap: 11px;
  background: #0d1726; border: 1.5px solid var(--line-strong);
  border-radius: 16px; padding: 11px 20px 11px 15px;
  color: var(--text); text-decoration: none;
  font-size: 17px; font-weight: 900; line-height: 1.1;
  transition: transform 0.15s, border-color 0.2s;
}
.btn-store:hover { transform: translateY(-2px); border-color: var(--green); }
.btn-store small { display: block; font-size: 10.5px; font-weight: 700; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.st-ic {
  width: 30px; height: 30px; border-radius: 8px; flex: 0 0 30px;
  background: linear-gradient(145deg, #fefefe, #b8c6da);
  -webkit-mask: radial-gradient(circle at 35% 30%, transparent 4px, #000 4.5px);
  clip-path: path("M22.7 15.9c0-3 2.5-4.5 2.6-4.6-1.4-2.1-3.6-2.4-4.4-2.4-1.9-.2-3.7 1.1-4.6 1.1-1 0-2.4-1.1-4-1.1-2 0-3.9 1.2-5 3-2.1 3.7-.5 9.2 1.5 12.2 1 1.5 2.2 3.1 3.8 3 1.5-.1 2.1-1 4-1s2.4 1 4 .9c1.7 0 2.7-1.5 3.7-3 1.2-1.7 1.6-3.4 1.7-3.5-.1 0-3.3-1.3-3.3-4.6zM19.6 6.9c.8-1 1.4-2.4 1.2-3.9-1.2.1-2.7.8-3.5 1.9-.8.9-1.5 2.4-1.3 3.8 1.4.1 2.8-.7 3.6-1.8z");
}
.st-ic.play {
  clip-path: path("M4 3.5v23l12-11.5L4 3.5zm14 9.6l-3.2 3 3.2 3 4.8-2.7c1-.6 1-1.9 0-2.5L18 13.1zM6.5 2.2l11.4 10.8 2.9-2.7L6.5 2.2zm0 25.6l14.3-8.1-2.9-2.7L6.5 27.8z");
  background: linear-gradient(135deg, #4cd7ff 0%, #2fd97e 48%, #f5b040 100%);
}

.recap-row { display: flex; gap: 12px; flex-wrap: wrap; }
.recap {
  border-radius: var(--r-md); padding: 10px 16px;
  border: 1.6px dashed var(--line-strong);
  display: flex; flex-direction: column; gap: 1px;
  font-size: 12px; font-weight: 700; color: var(--muted);
}
.recap strong { font-size: 13.5px; font-weight: 900; }
.recap-fuel { border-color: rgba(47, 217, 126, 0.5); } .recap-fuel strong { color: var(--green); }
.recap-move { border-color: rgba(76, 141, 255, 0.5); } .recap-move strong { color: var(--blue-soft); }
.recap-balance { border-color: rgba(245, 176, 64, 0.5); } .recap-balance strong { color: var(--amber); }

/* --- phone mockup --- */
.finale-phone { display: flex; justify-content: center; }
.phone {
  width: min(270px, 66vw);
  aspect-ratio: 9 / 18.6;
  background: #05080e;
  border: 3px solid #202b3c;
  border-radius: 38px;
  padding: 10px;
  position: relative;
  box-shadow: 0 30px 80px rgba(2, 8, 18, 0.75);
  transform: rotate(3deg);
  animation: phonefloat 5s ease-in-out infinite;
}
@keyframes phonefloat { 50% { transform: rotate(3deg) translateY(-10px); } }
.phone-notch {
  position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  width: 84px; height: 18px; border-radius: 999px; background: #05080e; z-index: 2;
}
.phone-screen {
  width: 100%; height: 100%;
  background: #070d16;
  border-radius: 28px;
  padding: 34px 11px 10px;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.ph-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 0 4px 12px; }
.ph-head h4 { font-size: 21px; font-weight: 900; }
.ph-head p { font-size: 9.5px; color: var(--muted); font-weight: 700; }
.ph-avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--green); display: block; }
.ph-cols { flex: 1; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.ph-col {
  background: #0b1422; border: 1px solid var(--line); border-radius: 12px;
  padding: 6px 5px; display: flex; flex-direction: column; gap: 5px;
}
.ph-chip {
  font-size: 7.6px; font-weight: 800; text-align: center;
  border-radius: 8px; padding: 5px 3px; line-height: 1.35;
}
.ph-chip.dash { border: 1.2px dashed; background: transparent; }
.ph-chip.dash.green { border-color: rgba(47, 217, 126, 0.55); color: var(--green-soft); }
.ph-chip.dash.blue { border-color: rgba(76, 141, 255, 0.6); color: var(--blue-soft); }
.ph-chip.dash.amber { border-color: rgba(245, 176, 64, 0.6); color: var(--amber-soft); }
.ph-chip.solid { color: #04140b; }
.ph-chip.solid.green { background: var(--green); }
.ph-chip.solid.blue { background: var(--blue); color: #eaf2ff; }
.ph-chip.solid.amber { background: var(--amber); color: #241503; }
.ph-meta { margin-top: auto; text-align: center; display: flex; flex-direction: column; gap: 1px; padding-bottom: 3px; }
.ph-meta strong { font-size: 10.5px; font-weight: 900; }
.ph-meta span { font-size: 8px; font-weight: 800; color: var(--text); }
.ph-meta em { font-style: normal; font-size: 7px; color: var(--muted); font-weight: 700; }
.c-green { color: var(--green); } .c-blue { color: var(--blue-soft); } .c-amber { color: var(--amber); }
.ph-nav {
  display: flex; justify-content: space-around; align-items: center;
  background: #0b1422; border: 1px solid var(--line); border-radius: 999px;
  margin-top: 7px; padding: 6px 8px; font-size: 10px;
}
.ph-plus {
  width: 24px; height: 24px; border-radius: 50%; background: var(--green);
  color: #04140b; font-weight: 900; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center;
}

.finale-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  max-width: 1060px; margin: 0 auto; width: 100%;
  padding-top: 18px; border-top: 1px solid var(--line);
  font-size: 12px; font-weight: 700; color: var(--muted);
}
.finale-foot .link-skip { color: var(--muted); }

/* ============================================================
   NOSCRIPT + DEBUG
   ============================================================ */
.noscript {
  position: fixed; inset: 0; z-index: 100; background: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 40px; gap: 14px;
}
.noscript h1 { font-size: 56px; font-weight: 900; color: var(--green); }
.noscript p { max-width: 520px; color: var(--muted); font-weight: 600; line-height: 1.6; }

#debug {
  position: fixed; left: 12px; bottom: 12px; z-index: 90;
  background: rgba(0, 0, 0, 0.72); color: #7dffb8;
  font: 11px/1.5 Consolas, monospace;
  padding: 8px 12px; border-radius: 8px; white-space: pre;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .panel {
    top: auto; bottom: 86px; left: 3vw; right: 3vw; transform: none;
    width: auto; padding: 18px 18px 14px;
  }
  .panel:not(.show) { transform: translateY(16px); }
  .panel h2 { font-size: 21px; margin-bottom: 8px; }
  .panel .lead { font-size: 12.5px; margin-bottom: 8px; }
  .feature-list { display: none; }
  .challenge-chip { padding: 8px 12px; font-size: 11.5px; }

  #analysis-card, #todo-card {
    top: 74px; right: 3vw; left: auto; transform: none;
    width: min(280px, 62vw);
    padding: 12px 14px;
  }
  #analysis-card:not(.show), #todo-card:not(.show) { transform: translateY(-12px); }
  .an-steps { display: none; }

  .vision { display: none; }
  .rep-panel { right: 3vw; top: 74px; transform: none; width: 150px; padding: 12px; }
  .rep-count strong { font-size: 32px; }
  .depth-meter { height: 100px; }
  .btn-hold { bottom: 265px; padding: 17px 34px; font-size: 13px; }

  #rail { right: 8px; gap: 11px; }
  .rail-dot span { display: none; }

  .finale-grid { grid-template-columns: 1fr; gap: 26px; }
  .finale-phone { order: -1; }
  .phone { width: min(210px, 52vw); }
  .finale-inner { padding: 90px 6vw 20px; }
  #objective { font-size: 12px; padding: 9px 16px; max-width: 92vw; white-space: normal; text-align: center; }
}

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