﻿/* ==========================================================================
   TouchTo — Activity-specific Styles
   ========================================================================== */

/* ── Gaze Cursor ── */

/* Hide native mouse cursor when custom gaze cursor is active.
   Excludes high-priority modals (camera capture, install prompt, etc.) where
   the user needs to see their cursor to click buttons — the touch-cursor's
   z-index 9999 sits below modal overlays at z 99000+. */
body.touch-cursor-active,
body.touch-cursor-active * {
  cursor: none !important;
}

/* Re-enable system cursor inside high-z-index modal overlays */
body.touch-cursor-active .heatmap-zoom-overlay,
body.touch-cursor-active .heatmap-zoom-overlay *,
body.touch-cursor-active .pwa-install-card,
body.touch-cursor-active .pwa-install-card *,
body.touch-cursor-active #pwa-update-card,
body.touch-cursor-active #pwa-update-card *,
/* Camera capture overlay (built dynamically in profile-picker.js) */
body.touch-cursor-active div[style*="z-index:99999"],
body.touch-cursor-active div[style*="z-index:99999"] *,
body.touch-cursor-active div[style*="z-index: 99999"],
body.touch-cursor-active div[style*="z-index: 99999"] * {
  cursor: auto !important;
}
body.touch-cursor-active button,
body.touch-cursor-active div[style*="z-index:99999"] button,
body.touch-cursor-active .heatmap-zoom-overlay button,
body.touch-cursor-active .pwa-install-card button {
  cursor: pointer !important;
}

.touch-cursor {
  --cursor-color: var(--c-accent, #4b698c);
  position: fixed;
  pointer-events: none;
  /* z-index above all modal overlays (PWA card 9000, camera dialog 99999, etc.) */
  z-index: 2147483647;
  left: 0;
  top: 0;
  transform: translate3d(0, 0, 0);
  will-change: transform;
  /* No transition — gaze updates are already at ~60Hz; transition causes visible lag/jitter */
}

.touch-cursor--circle {
  width: 40px;
  height: 40px;
  border: 2px solid var(--cursor-color);
  border-radius: 50%;
  opacity: 0.7;
}

.touch-cursor--circle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: var(--cursor-color);
  border-radius: 50%;
}

.touch-cursor--dot {
  width: 12px;
  height: 12px;
  background: var(--cursor-color);
  border-radius: 50%;
  opacity: 0.7;
}

.touch-cursor--crosshair {
  width: 24px;
  height: 24px;
}

.touch-cursor--crosshair::before,
.touch-cursor--crosshair::after {
  content: '';
  position: absolute;
  background: var(--cursor-color);
  opacity: 0.6;
}

.touch-cursor--crosshair::before {
  width: 2px;
  height: 100%;
  left: 50%;
  transform: translateX(-50%);
}

.touch-cursor--crosshair::after {
  width: 100%;
  height: 2px;
  top: 50%;
  transform: translateY(-50%);
}

.touch-cursor--hidden {
  display: none;
}

/* ── Dwell Progress Ring ── */

.dwell-ring {
  position: absolute;
  top: -4px;
  left: -4px;
  width: calc(100% + 8px);
  height: calc(100% + 8px);
  border-radius: 50%;
  pointer-events: none;
}

.dwell-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.dwell-ring circle {
  fill: none;
  stroke: var(--color-primary);
  stroke-width: 3;
  stroke-dasharray: 157;
  stroke-dashoffset: 157;
  transition: stroke-dashoffset linear;
}

.dwelling .dwell-ring circle {
  stroke-dashoffset: 0;
}

/* ── Activity Canvas Area ── */

.activity-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--color-bg);
}

.activity-container canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* ── Heatmap Overlay ── */

.heatmap-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
}

.heatmap-container canvas {
  width: 100%;
  height: 100%;
}

/* ── Stufe Badge Colors ── */

.badge-stufe-1 { background: var(--color-stufe-1); }
.badge-stufe-2 { background: var(--color-stufe-2); }
.badge-stufe-3 { background: var(--color-stufe-3); }
.badge-stufe-4 { background: var(--color-stufe-4); }
.badge-stufe-5 { background: var(--color-stufe-5); }
.badge-stufe-6 { background: var(--color-stufe-6); }
.badge-stufe-7 { background: var(--color-stufe-7); }

/* ── Category Colors ── */

.cat-sensorisch  { color: var(--color-cat-sensorisch); }
.cat-zielspiele  { color: var(--color-cat-zielspiele); }
.cat-tracking    { color: var(--color-cat-tracking); }
.cat-spiele      { color: var(--color-cat-spiele); }
.cat-kreativ     { color: var(--color-cat-kreativ); }
.cat-entspannung { color: var(--color-cat-entspannung); }
.cat-teilhabe    { color: var(--color-cat-teilhabe); }

/* ── Onboarding ── */

.screen-onboarding {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px);
  padding: var(--space-8);
  text-align: center;
}

.onboarding-steps {
  width: 100%;
  max-width: 480px;
  position: relative;
}

.onboarding-step {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.onboarding-step--active {
  display: flex;
  animation: onb-fadeIn 300ms ease forwards;
}

.onboarding-step--exit {
  display: flex;
  animation: onb-fadeOut 200ms ease forwards;
}

@keyframes onb-fadeIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes onb-fadeOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(-20px); }
}

.onboarding-dots {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
  align-items: center;
  margin-top: var(--space-6);
}

.onboarding-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-border);
  transition: background var(--transition-fast);
}

.onboarding-dot--active {
  background: var(--color-primary);
}

.onboarding-dots__label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-left: var(--space-2);
}

.onboarding-howto {
  display: flex;
  gap: var(--space-6);
  margin: var(--space-6) 0;
  flex-wrap: wrap;
  justify-content: center;
}

.onboarding-howto__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  max-width: 160px;
}

.onboarding-howto__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-primary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
}

.onboarding-howto__text {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.onboarding-form {
  width: 100%;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin: var(--space-4) 0;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-label {
  font-weight: var(--font-medium);
  font-size: var(--text-sm);
}

.form-input {
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  min-height: 48px;
  transition: border-color var(--transition-fast);
}

.form-input:focus {
  border-color: var(--color-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(75, 105, 140, 0.1);
}

.form-input--error {
  border-color: var(--color-error);
  animation: shake 300ms ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.btn-group {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.btn--outline {
  padding: var(--space-3) var(--space-5);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  font-size: var(--text-base);
  font-weight: var(--font-medium);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 48px;
  min-width: 48px;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.btn--outline:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-bg);
}

.btn--outline.btn--active {
  border-color: var(--color-primary);
  background: var(--color-primary-bg);
  color: var(--color-primary-dark);
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border: none;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-sm);
  font-weight: var(--font-bold);
  font-size: var(--text-base);
  cursor: pointer;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  transition: background var(--transition-fast);
}

.btn--primary:hover {
  background: var(--color-primary-light);
}

.btn--large {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-lg);
  min-height: 56px;
  margin-top: var(--space-4);
}

.theme-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-block;
}

.onboarding {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--space-8);
  text-align: center;
}

.onboarding__illustration {
  width: 100%;
  max-width: 320px;
  margin-bottom: var(--space-6);
  border-radius: var(--radius-lg);
}

.onboarding__headline {
  font-family: var(--font-headline);
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  margin-bottom: var(--space-3);
}

.onboarding__text {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  max-width: 400px;
  margin-bottom: var(--space-8);
}

.onboarding__steps {
  display: flex;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
  justify-content: center;
}

.onboarding__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  max-width: 140px;
}

.onboarding__step-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-primary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
}

.onboarding__dots {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.onboarding__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-border);
}

.onboarding__dot.active {
  background: var(--color-primary);
}

/* ── Result Screen ── */

.result-screen {
  text-align: center;
  padding: var(--space-8) var(--space-4);
}

.result-screen__emoji {
  font-size: 48px;
  margin-bottom: var(--space-4);
}

.result-screen__title {
  font-family: var(--font-headline);
  font-size: var(--text-3xl);
  margin-bottom: var(--space-4);
}

.result-screen__metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  max-width: 400px;
  margin: var(--space-6) auto;
}

.result-screen__metric {
  padding: var(--space-3);
  background: var(--color-surface-alt);
  border-radius: var(--radius-md);
}

.result-screen__metric-value {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--color-primary-dark);
}

.result-screen__metric-label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.result-screen__actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  margin-top: var(--space-6);
  flex-wrap: wrap;
}

/* ── Settings Section ── */

.settings-section {
  margin-bottom: var(--space-6);
}

.settings-section__title {
  font-family: var(--font-headline);
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--color-border);
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) 0;
  min-height: 48px;
}

.settings-row + .settings-row {
  border-top: 1px solid var(--color-surface-alt);
}

.settings-row__label {
  font-weight: var(--font-medium);
}

.settings-row__description {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ── Theme Chooser ── */

.theme-chooser {
  display: flex;
  gap: var(--space-3);
}

.theme-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  min-width: 100px;
  min-height: 48px;
  transition: border-color var(--transition-fast);
}

.theme-option.active {
  border-color: var(--color-primary);
  background: var(--color-primary-bg);
}

.theme-option__preview {
  width: 60px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

/* ==========================================================================
   Screen-specific Styles
   ========================================================================== */

/* ── Activities Screen ── */

.screen-activities .filter-bar {
  margin-bottom: var(--space-6);
  align-items: center;
}

.screen-activities .activity-grid {
  margin-bottom: var(--space-4);
}

/* ── Activity Detail Screen ── */

.screen-activity-detail {
  max-width: 100%;
  width: 100%;
  padding: 0;
}

/* ── Activity Detail Responsive ── */

/* iPad portrait + smaller tablets: tighten spacing, keep 2-col */
@media (max-width: 1024px) {
  .detail-compact {
    grid-template-columns: minmax(220px, 300px) 1fr !important;
    gap: 14px 20px !important;
    padding: 14px 18px !important;
  }
  .detail-compact .detail-thumb {
    min-height: 220px !important;
  }
}

/* iPad portrait threshold: stack vertically — thumb on top, content below */
@media (max-width: 820px) {
  .detail-compact {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto 1fr auto !important;
    grid-template-areas:
      "thumb"
      "header"
      "settings"
      "actions" !important;
    min-height: auto !important;
    padding: 12px 14px !important;
    gap: 12px !important;
  }
  .detail-compact .detail-compact__left {
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
  }
  .detail-compact .detail-thumb {
    width: 50% !important;
    min-height: 160px !important;
    max-height: 200px !important;
    flex: 0 0 auto !important;
  }
  .detail-compact .detail-stufe-explain {
    flex: 1 !important;
    text-align: left !important;
    margin: 0 !important;
  }
  .detail-name {
    font-size: 1.6rem !important;
  }
  .detail-compact-settings {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    padding: 14px 16px !important;
  }
}

/* Phone: even tighter, action buttons full-width stacked */
@media (max-width: 480px) {
  .detail-compact {
    padding: 10px 10px !important;
  }
  .detail-compact .detail-compact__left {
    flex-direction: column !important;
  }
  .detail-compact .detail-thumb {
    width: 100% !important;
    min-height: 140px !important;
    max-height: 180px !important;
  }
  .detail-compact .detail-stufe-explain {
    text-align: center !important;
  }
  .detail-name {
    font-size: 1.35rem !important;
  }
  .detail-actions {
    flex-direction: column !important;
  }
  .detail-actions > button {
    flex: 1 1 auto !important;
    width: 100% !important;
  }
  .detail-back-btn {
    padding: 8px 12px !important;
    font-size: 13px !important;
  }
}

.detail-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  background: var(--color-surface-alt);
  position: relative;
  overflow: hidden;
  margin-bottom: var(--space-4);
}

.detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-thumb .badge {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
}

.detail-name {
  font-family: var(--font-headline);
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  color: var(--color-text);
  margin-bottom: var(--space-3);
}

.detail-description {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: var(--leading-loose);
  margin-bottom: var(--space-4);
}

.tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.detail-difficulty {
  margin-bottom: var(--space-6);
}

.detail-difficulty__label {
  display: block;
  font-weight: var(--font-bold);
  font-size: var(--text-sm);
  color: var(--color-text);
  margin-bottom: var(--space-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.detail-actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-top: var(--space-2);
}

/* ── Home Screen ── */

.screen-home {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.home-greeting {
  margin-bottom: var(--space-2);
}

.home-greeting__title {
  font-family: var(--font-headline);
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.home-greeting__subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
}

/* Continue card */

.card--continue {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-5);
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  border-color: transparent;
  cursor: pointer;
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.card--continue:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card__label {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card__activity-name {
  font-family: var(--font-headline);
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--color-text-inverse);
}

/* Recommended section */

.home-recommended .activity-grid--small {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
}

@media (min-width: 600px) {
  .home-recommended .activity-grid--small {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Home progress section */

.home-progress .stats-grid {
  grid-template-columns: repeat(3, 1fr);
}

/* ── Progress Screen ── */

.screen-progress {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-3);
}

@media (max-width: 600px) {
  .screen-progress {
    gap: var(--space-3);
    padding: 0 var(--space-2);
  }
}

.progress-stufen,
.progress-stats,
.progress-recent {
  margin-bottom: var(--space-2);
}

/* Stufe grid */

.stufe-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

@media (min-width: 480px) {
  .stufe-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .stufe-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .stufe-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stufe-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.stufe-card__number {
  font-family: var(--font-headline);
  font-size: var(--text-2xl);
  font-weight: var(--font-black);
  color: var(--color-primary);
}

.stufe-card__name {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-text);
}

.stufe-card__pct {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-align: right;
}

/* Session list */

.session-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.session-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.session-row + .session-row {
  margin-top: calc(-1px); /* collapse borders */
}

.session-row:first-child {
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.session-row:last-child {
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.session-row:only-child {
  border-radius: var(--radius-md);
}

.session-row:hover {
  background: var(--color-surface-alt);
}

.session-row__name {
  font-weight: var(--font-medium);
  color: var(--color-text);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-row__date {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.session-row__score {
  font-weight: var(--font-bold);
  color: var(--color-primary-dark);
  flex-shrink: 0;
  min-width: 48px;
  text-align: right;
}

/* ── Results Screen ── */

.screen-results {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  padding: 0 var(--space-3);
}

@media (max-width: 600px) {
  .screen-results {
    padding: 0 var(--space-2);
  }
  .results-emoji {
    font-size: 2rem !important;
  }
  .results-celebration {
    padding: var(--space-3) 0 !important;
  }
}

.results-celebration {
  padding: var(--space-6) 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

.results-emoji {
  font-size: 3rem;
  line-height: 1;
}

.results-stars {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
}

.results-star {
  font-size: var(--text-3xl);
  color: var(--color-border);
  transition: color var(--transition-base), transform var(--transition-spring);
}

.results-star--filled {
  color: #f59e0b;
}

.results-feedback {
  font-size: 1.25rem;
  font-weight: var(--font-bold);
  color: var(--color-text);
  margin-top: var(--space-2);
  line-height: 1.6;
}

.results-heatmap {
  margin: var(--space-4) 0;
}

.results-heatmap__canvas {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface-alt);
  transition: box-shadow 0.2s, transform 0.2s;
}
.results-heatmap__canvas:hover {
  box-shadow: var(--shadow-lg);
  transform: scale(1.02);
}

/* ── Heatmap Zoom Overlay ── */
.heatmap-zoom-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  /* Fully opaque so the page underneath (dark title text on light bg) never
     bleeds through unreadably behind the zoomed heatmap. */
  background: #0b1220;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
.heatmap-zoom-title {
  position: fixed;
  top: 18px;
  left: 22px;
  z-index: 5001;
  color: #fff;
  font-family: var(--font-headline, 'Merriweather', serif);
  font-size: 1.3rem;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.heatmap-zoom-canvas {
  max-width: 95vw;
  max-height: 90vh;
  border-radius: var(--radius-lg);
  border: 2px solid rgba(255, 255, 255, 0.2);
}
.heatmap-zoom-close {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  font-size: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5001;
  transition: background 0.15s;
}
.heatmap-zoom-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.results-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-6);
  padding-bottom: var(--space-4);
}

/* ── Settings Screen ── */

.screen-settings {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--space-3);
}

@media (max-width: 600px) {
  .screen-settings {
    padding: 0 var(--space-2);
  }
  .settings-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: var(--space-2) !important;
  }
}

.settings-section__body {
  display: flex;
  flex-direction: column;
}

.settings-row--column {
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-3) 0;
}

.settings-label {
  font-weight: var(--font-medium);
  font-size: var(--text-base);
  color: var(--color-text);
}

.settings-value {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
}

.settings-input {
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  min-height: 48px;
  width: 200px;
  max-width: 100%;
  transition: border-color var(--transition-fast);
}

.settings-input:focus {
  border-color: var(--color-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(75, 105, 140, 0.1);
}

.settings-slider-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
}

.settings-slider {
  -webkit-appearance: none;
  flex: 1;
  height: 6px;
  background: var(--color-border);
  border-radius: var(--radius-full);
  outline: none;
}

.settings-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-primary);
  cursor: pointer;
  border: 2px solid var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.settings-slider__value {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  min-width: 60px;
  text-align: right;
  white-space: nowrap;
}

.settings-select {
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  min-height: 48px;
  background: var(--color-surface);
  cursor: pointer;
}

.settings-select:focus {
  border-color: var(--color-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(75, 105, 140, 0.1);
}

.settings-section__body > .btn {
  margin-top: var(--space-2);
  align-self: flex-start;
}

.settings-section__body > .btn + .btn {
  margin-top: var(--space-2);
}

/* ── Info Screen ── */

.screen-info {
  max-width: 640px;
}

.info-section {
  margin-bottom: var(--space-6);
}

.info-section__title {
  font-family: var(--font-headline);
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--color-text);
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--color-border);
}

.info-section__subtitle {
  font-family: var(--font-headline);
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  color: var(--color-text);
  margin-top: var(--space-4);
  margin-bottom: var(--space-2);
}

.info-section__text {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: var(--leading-loose);
  margin-bottom: var(--space-3);
}

.info-section--version {
  text-align: center;
  padding: var(--space-6) 0;
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-4);
}

.info-version__label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.info-version__number {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-weight: var(--font-bold);
}

/* FAQ */

.info-faq {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.info-faq__item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.info-faq__item + .info-faq__item {
  margin-top: calc(-1px);
}

.info-faq__item:first-child {
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.info-faq__item:last-child {
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.info-faq__item:only-child {
  border-radius: var(--radius-md);
}

.info-faq__question {
  padding: var(--space-4);
  font-weight: var(--font-bold);
  cursor: pointer;
  background: var(--color-surface);
  transition: background var(--transition-fast);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.info-faq__question::-webkit-details-marker {
  display: none;
}

.info-faq__question::after {
  content: '+';
  font-size: var(--text-xl);
  color: var(--color-text-muted);
  flex-shrink: 0;
  margin-left: var(--space-3);
  transition: transform var(--transition-fast);
}

.info-faq__item[open] .info-faq__question::after {
  content: '\2212'; /* minus sign */
}

.info-faq__question:hover {
  background: var(--color-surface-alt);
}

.info-faq__answer {
  padding: 0 var(--space-4) var(--space-4);
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: var(--leading-loose);
}

/* ── Onboarding Screen (extended) ── */

.onboarding-illustration {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--color-primary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  margin-bottom: var(--space-6);
}

.onboarding-illustration i,
.onboarding-illustration svg {
  width: 48px;
  height: 48px;
}

.onboarding-headline {
  font-family: var(--font-headline);
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  color: var(--color-text);
  margin-bottom: var(--space-3);
}

.onboarding-text {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  max-width: 420px;
  margin-bottom: var(--space-6);
  line-height: var(--leading-loose);
}
