/* Splash Screen */
.splash {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(
    circle at 50% 40%,
    #0f0f0f 0%,
    #050505 50%,
    #000 100%
  );
  transition:
    opacity 0.5s ease-out,
    visibility 0.5s ease-out;
}

.splash.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
  padding: 2rem;
}

.splash-icon {
  width: 120px;
  height: 120px;
  border-radius: 28px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.05) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  animation: pulse 2s ease-in-out infinite;
}

.splash-icon svg {
  width: 64px;
  height: 64px;
}

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

.splash-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
  color: #fff;
}

.splash-subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.splash-loader {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-top: 1rem;
}

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

:root {
  color-scheme: dark;
  --bg-primary: #050505;
  --bg-device: #0a0a0a;
  --card-bg: #121212;
  --card-border: rgba(255, 255, 255, 0.08);
  --muted: rgba(255, 255, 255, 0.6);
  --muted-strong: rgba(255, 255, 255, 0.85);
  --surface-highlight: rgba(255, 255, 255, 0.03);
  --accent: #ffffff;
  --accent-glow: rgba(255, 255, 255, 0.2);
  --shadow-soft: 0 20px 50px rgba(0, 0, 0, 0.6);
  font-size: 16px;
  --font-size-xs: 0.65rem;
  --font-size-sm: 0.75rem;
  --font-size-base: 0.875rem;
  --font-size-lg: 1rem;
  --font-size-xl: 1.125rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.6;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

body {
  margin: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(
    circle at 30% 20%,
    #0f0f0f 0%,
    #050505 50%,
    #000 100%
  );
  font-family:
    "Space Grotesk",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  color: #fff;
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overscroll-behavior: none;
  touch-action: manipulation;
}

.device-shell {
  background: var(--bg-device);
  border-radius: var(--radius-xl);
  width: min(440px, 100%);
  height: calc(100vh - 2rem);
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* PWA standalone mode - go full screen */
@media all and (display-mode: standalone) {
  body {
    background: var(--bg-device);
  }
  .device-shell {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
    border: none;
    box-shadow: none;
  }
}

.hero {
  padding: var(--space-md) var(--space-lg);
  padding-top: calc(var(--space-md) + env(safe-area-inset-top, 0px));
  border-bottom: 1px solid var(--card-border);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02) 0%,
    transparent 100%
  );
  flex-shrink: 0;
  position: relative;
}

.hero-intro {
  text-align: center;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

.hero-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.hero-icon svg {
  width: 24px;
  height: 24px;
}

.hero h1 {
  font-size: var(--font-size-base);
  margin: 0;
  letter-spacing: 0.1em;
  font-weight: 600;
  line-height: var(--line-height-tight);
  text-transform: uppercase;
  color: #fff;
}

.hero-meta {
  display: flex;
  justify-content: center;
  gap: var(--space-xl);
  text-align: center;
  padding-top: var(--space-xs);
}

/* Menu Button */
.menu-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  padding: var(--space-sm);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  position: relative;
  z-index: 10;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.menu-btn:hover,
.menu-btn:focus {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* Menu Overlay */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Profile Menu */
.profile-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 300px;
  max-width: 85vw;
  background: linear-gradient(180deg, #1a1a1a 0%, #0a0a0a 100%);
  z-index: 1001;
  transform: translateX(100%);
  transition: transform var(--transition-normal);
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-menu.active {
  transform: translateX(0);
}

.menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  padding-top: calc(var(--space-lg) + env(safe-area-inset-top, 0px));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-profile {
  flex: 1;
}

.menu-header .profile-armour {
  font-size: var(--font-size-xl);
  font-weight: 600;
  color: #fff;
  font-family: monospace;
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}

.menu-header .profile-team-badge {
  font-size: var(--font-size-sm);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.menu-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  padding: var(--space-xs);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-close:hover {
  color: #fff;
}

.menu-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-lg);
}

/* Profile Card */
.profile-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
}

.profile-avatar {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  color: rgba(255, 255, 255, 0.7);
}

.profile-info {
  flex: 1;
}

.profile-armour {
  font-size: var(--font-size-base);
  font-weight: 600;
  color: #fff;
  font-family: monospace;
  letter-spacing: 0.02em;
  margin-bottom: 2px;
}

.profile-team-badge {
  font-size: var(--font-size-xs);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Submission Status */
.submission-status {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
}

.status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 180, 50, 0.8);
  box-shadow: 0 0 8px rgba(255, 180, 50, 0.4);
}

.submission-status.completed .status-indicator {
  background: rgba(80, 200, 120, 0.8);
  box-shadow: 0 0 8px rgba(80, 200, 120, 0.4);
}

.status-title {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: #fff;
}

.status-subtitle {
  font-size: var(--font-size-xs);
  color: var(--muted);
}

/* Section Blocks */
.profile-menu .section-block {
  margin-bottom: var(--space-lg);
}

.section-title {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 var(--space-sm);
  font-weight: 500;
}

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

.stat-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  text-align: center;
}

.stat-value {
  font-size: var(--font-size-xl);
  font-weight: 600;
  color: #fff;
}

.stat-label {
  font-size: var(--font-size-xs);
  color: var(--muted);
  margin-top: var(--space-xs);
}

.month-label {
  font-weight: 400;
  opacity: 0.6;
}

/* Radar Chart */
.radar-chart-container {
  display: flex;
  justify-content: center;
  padding: var(--space-md) 0;
}

#radar-chart {
  max-width: 100%;
}

.radar-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xs) var(--space-md);
  margin-top: var(--space-sm);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--font-size-xs);
  color: var(--muted);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Settings List */
.settings-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.settings-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.03);
  border: none;
  color: #fff;
  font-size: var(--font-size-sm);
  cursor: pointer;
  transition: background var(--transition-fast);
  text-align: left;
  width: 100%;
}

.settings-row:hover {
  background: rgba(255, 255, 255, 0.06);
}

.settings-icon {
  color: rgba(255, 255, 255, 0.5);
  flex-shrink: 0;
}

.settings-label {
  flex: 1;
}

.settings-value {
  font-size: var(--font-size-xs);
  color: var(--muted);
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
}

.settings-value.active {
  background: rgba(80, 200, 120, 0.15);
  color: rgba(80, 200, 120, 1);
}

.settings-chevron {
  color: rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
}

/* Notification Toggle Row */
.notif-toggle-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 0 12px 0;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.notif-toggle-row svg {
  color: var(--muted);
  flex-shrink: 0;
}

.notif-toggle-label {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
}

.notif-toggle-status {
  font-size: 10px;
  color: var(--muted);
  margin-left: auto;
  margin-right: 4px;
}

.notif-toggle-btn {
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: 22px;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.25s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.notif-toggle-btn.active {
  background: #34d399;
}

.notif-toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.25s ease;
  pointer-events: none;
}

.notif-toggle-btn.active .notif-toggle-knob {
  transform: translateX(18px);
}

/* Menu Footer */
.menu-footer {
  padding: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.field-label {
  display: block;
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: var(--space-sm);
}

.team-selector {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.team-option {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.team-option:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

.team-option.selected {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

.selected-team {
  font-size: var(--font-size-sm);
  color: var(--muted);
  text-align: center;
}

.menu-team-display {
  font-size: var(--font-size-lg);
  color: #fff;
}

.logout-btn {
  width: 100%;
  padding: var(--space-md);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.logout-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

/* Auth Screen */
.auth-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 40%, #0f0f0f 0%, #050505 50%, #000 100%);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}

.auth-screen.hidden {
  display: none;
}

.device-shell.hidden {
  display: none;
}

/* Questionnaire Completed Screen */
.questionnaire-completed {
  position: absolute;
  top: 72px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
  z-index: 5;
}

.questionnaire-completed.hidden {
  display: none;
}

.completed-content {
  text-align: center;
  max-width: 320px;
}

.completed-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 100px;
  background: rgba(80, 200, 120, 0.1);
  border-radius: 50%;
  margin-bottom: var(--space-lg);
  color: #50c878;
}

.completed-title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  margin: 0 0 var(--space-sm);
}

.completed-subtitle {
  font-size: var(--font-size-base);
  color: var(--muted);
  margin: 0 0 var(--space-xl);
}

.completed-info {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
}

.info-item {
  display: flex;
  justify-content: space-between;
  padding: var(--space-sm) 0;
}

.info-item:not(:last-child) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

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

.info-value {
  font-size: var(--font-size-sm);
  font-weight: 500;
}

.completed-note {
  font-size: var(--font-size-xs);
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

.auth-container {
  width: 100%;
  max-width: 360px;
}

.auth-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.auth-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-bottom: var(--space-sm);
}

.auth-title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: #fff;
  margin: 0;
  letter-spacing: 0.05em;
}

.auth-form {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.auth-form.hidden {
  display: none;
}

.form-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: #fff;
  margin: 0 0 var(--space-lg);
  text-align: center;
}

.form-field {
  margin-bottom: var(--space-md);
}

.form-field label {
  display: block;
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: var(--space-xs);
}

.form-field input {
  width: 100%;
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: var(--font-size-base);
  font-family: inherit;
  transition: all var(--transition-fast);
}

.form-field input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
}

.form-field input::placeholder {
  color: var(--muted);
}

.field-hint {
  font-size: var(--font-size-xs);
  color: var(--muted);
  margin: var(--space-xs) 0 0;
}

.armour-display {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: #fff;
  font-family: monospace;
  letter-spacing: 0.05em;
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  text-align: center;
}

.auth-team-selector {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-xs);
}

.auth-team-option {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.auth-team-option:hover {
  background: rgba(255, 255, 255, 0.1);
}

.auth-team-option.selected {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

.selected-team-label {
  font-size: var(--font-size-sm);
  color: var(--muted);
  text-align: center;
}

.auth-error {
  color: #ff6b6b;
  font-size: var(--font-size-sm);
  text-align: center;
  min-height: 1.5em;
  margin-bottom: var(--space-sm);
}

.auth-btn {
  width: 100%;
  margin-top: var(--space-sm);
}

.auth-switch {
  text-align: center;
  font-size: var(--font-size-sm);
  color: var(--muted);
  margin: var(--space-md) 0 0;
}

.auth-switch button {
  background: none;
  border: none;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  font-size: inherit;
}

.meta-label {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: var(--font-size-xs);
  color: var(--muted);
  margin: 0 0 var(--space-xs);
  font-weight: 600;
}

.meta-value {
  margin: 0;
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.questionnaire {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--space-lg);
  padding-bottom: calc(var(--space-lg) + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: none;
  contain: layout style;
}

.questionnaire::-webkit-scrollbar {
  width: 6px;
}

.questionnaire::-webkit-scrollbar-track {
  background: transparent;
}

.questionnaire::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
}

.questionnaire::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

.section-block {
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  background: var(--card-bg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  transition: all var(--transition-base);
}

.section-block:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.section-block header {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.section-block h2 {
  margin: 0;
  font-size: var(--font-size-2xl);
  font-weight: 700;
  line-height: var(--line-height-tight);
  letter-spacing: -0.02em;
}

.section-block p {
  margin: 0;
  color: var(--muted);
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
}

.question-card {
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 0;
  background: var(--surface-highlight);
  display: flex;
  flex-direction: column;
  transition: all var(--transition-base);
  overflow: hidden;
}

.question-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
}

.question-card h3 {
  margin: 0;
  font-size: var(--font-size-xl);
  line-height: var(--line-height-normal);
  font-weight: 600;
  padding: var(--space-lg) var(--space-lg) var(--space-sm);
  color: #fff;
}

.question-hint {
  margin: 0;
  font-size: var(--font-size-base);
  color: var(--muted);
  line-height: var(--line-height-relaxed);
  padding: 0 var(--space-lg) var(--space-lg);
}

.scale-options,
.frequency-options {
  display: flex;
  width: 100%;
  gap: 0;
}

.scale-options label,
.frequency-options label {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  padding: var(--space-xl) var(--space-sm);
  background: transparent;
  text-align: center;
  font-size: var(--font-size-base);
  line-height: var(--line-height-tight);
  color: var(--muted);
  transition: all var(--transition-fast);
  position: relative;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  min-height: 110px;
  -webkit-user-select: none;
  user-select: none;
}

.scale-options label:last-child,
.frequency-options label:last-child {
  border-right: none;
}

.scale-options label:hover,
.frequency-options label:hover {
  background: rgba(255, 255, 255, 0.04);
}

.scale-options input,
.frequency-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.scale-options label span,
.frequency-options label span {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  width: 100%;
}

.scale-options input:checked + span,
.frequency-options input:checked + span {
  background: #fff;
  color: #000;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.scale-options label:has(input:checked),
.frequency-options label:has(input:checked) {
  background: transparent;
}

.scale-options label span strong {
  font-size: var(--font-size-4xl);
  display: block;
  font-weight: 700;
}

.frequency-options label span strong {
  display: none;
}

.scale-options label span small,
.frequency-options label span small {
  font-size: var(--font-size-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0.9;
}

.numeric-control {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  padding: 0 var(--space-lg) var(--space-lg);
}

.value-display {
  font-size: var(--font-size-base);
  color: var(--muted-strong);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  font-weight: 600;
}

.numeric-control input[type="range"] {
  width: 100%;
  height: 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.numeric-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all var(--transition-fast);
}

.numeric-control input[type="range"]::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  border: none;
  transition: all var(--transition-fast);
}

.numeric-control input[type="range"]:hover::-webkit-slider-thumb {
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.numeric-control input[type="range"]:hover::-moz-range-thumb {
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.slider-untouched input[type="range"] {
  opacity: 0.4;
}

.slider-untouched .value-display strong {
  color: var(--text-muted);
}

.action-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(10, 10, 10, 0.98) 20%,
    rgba(10, 10, 10, 0.98) 100%
  );
  padding: var(--space-md) var(--space-lg) var(--space-lg);
  padding-bottom: calc(var(--space-lg) + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
  will-change: transform;
  contain: layout style;
}

.action-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.action-title {
  margin: 0;
  font-size: var(--font-size-base);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.action-caption {
  margin: 0;
  font-size: var(--font-size-xs);
  color: var(--muted);
  line-height: var(--line-height-relaxed);
}

.progress-pill {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--font-size-xs);
  color: var(--muted);
}

.progress-percent {
  font-weight: 700;
  font-size: var(--font-size-lg);
  color: #fff;
  letter-spacing: -0.02em;
}

.progress-label {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.progress-track {
  height: 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
  position: relative;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    #ffffff 0%,
    rgba(255, 255, 255, 0.85) 100%
  );
  transition: width var(--transition-slow);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
  position: relative;
}

.progress-fill::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 40px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.3) 100%
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0%,
  100% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
}

.primary-btn {
  border: none;
  border-radius: var(--radius-full);
  padding: var(--space-md) var(--space-xl);
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  background: linear-gradient(135deg, #ffffff 0%, #e8e8e8 100%);
  color: #000;
  cursor: pointer;
  font-weight: 700;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
  touch-action: manipulation;
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
}

.primary-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.2);
}

.primary-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.action-bar .action-title,
.action-bar .action-caption,
.action-bar .primary-btn {
  display: none;
}

.action-bar.action-bar--complete .action-title,
.action-bar.action-bar--complete .action-caption,
.action-bar.action-bar--complete .primary-btn {
  display: block;
}

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

@media (max-width: 480px) {
  .device-shell {
    border-radius: 0;
    height: 100vh;
    height: 100dvh;
    width: 100%;
  }

  .hero h1 {
    font-size: var(--font-size-lg);
  }

  .scale-options label span strong {
    font-size: var(--font-size-3xl);
  }
}

/* iOS-specific fixes */
@supports (-webkit-touch-callout: none) {
  .splash {
    height: -webkit-fill-available;
  }
  
  body {
    height: -webkit-fill-available;
  }
  
  .device-shell {
    height: -webkit-fill-available;
  }
}
