/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #2563eb;
  --primary-light: #3b82f6;
  --primary-dark: #1d4ed8;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --ch1-color: #3b82f6;
  --ch2-color: #10b981;
  --ch3-color: #8b5cf6;
  --ch4-color: #f59e0b;
  --ch5-color: #ef4444;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
  --transition: 0.3s ease;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', 'Noto Sans JP', sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.modal {
  background: #fff;
  border-radius: var(--radius);
  max-width: 480px;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}

.modal-small {
  max-width: 360px;
}

.modal-header {
  padding: 20px 24px 0;
}

.modal-header h2 {
  font-size: 1.25rem;
  color: var(--gray-900);
}

.modal-body {
  padding: 16px 24px;
  overflow-y: auto;
  flex: 1;
  font-size: 0.875rem;
  color: var(--gray-600);
  line-height: 1.7;
}

.modal-body h3 {
  font-size: 0.9rem;
  color: var(--gray-800);
  margin-top: 16px;
  margin-bottom: 4px;
}

.modal-body p {
  margin-bottom: 8px;
}

.modal-footer {
  padding: 16px 24px 20px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* ===== Buttons ===== */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  touch-action: manipulation;
  user-select: none;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
}

.btn-primary:active:not(:disabled) {
  transform: scale(0.97);
}

.btn-secondary {
  background: var(--gray-200);
  color: var(--gray-700);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--gray-300);
}

.btn-back {
  background: transparent;
  color: var(--gray-500);
  padding: 12px 16px;
}

.btn-back:hover:not(:disabled) {
  color: var(--gray-700);
}

.btn-skip {
  background: transparent;
  color: var(--warning);
  font-size: 0.875rem;
  padding: 12px 16px;
}

.btn-submit {
  background: var(--success);
  color: #fff;
  width: 100%;
  padding: 16px;
  font-size: 1.1rem;
}

.btn-submit:hover:not(:disabled) {
  filter: brightness(0.95);
}

/* ===== Loading ===== */
.loading-screen {
  position: fixed;
  inset: 0;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 900;
  flex-direction: column;
}

.loading-content {
  text-align: center;
  padding: 24px;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 20px;
}

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

.loading-text {
  color: var(--gray-600);
  margin-bottom: 16px;
}

.loading-progress {
  width: 200px;
  height: 4px;
  background: var(--gray-200);
  border-radius: 2px;
  margin: 0 auto;
  overflow: hidden;
}

.loading-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  width: 0%;
  transition: width 0.1s linear;
}

/* ===== App Layout ===== */
.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.hidden {
  display: none !important;
}

/* ===== Header ===== */
.app-header {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 100;
  padding: 12px 16px 8px;
  border-bottom: 1px solid var(--gray-100);
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  user-select: none;
}

.progress-text {
  font-size: 0.8rem;
  color: var(--gray-400);
  font-weight: 500;
}

.progress-bar-container {
  position: relative;
}

.progress-bar {
  height: 6px;
  background: var(--gray-100);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  width: 0%;
  transition: width 0.4s ease, background-color 0.3s ease;
}

.chapter-indicators {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  padding: 0 2px;
}

.chapter-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gray-200);
  transition: background var(--transition);
}

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

.chapter-dot.completed {
  background: var(--success);
}

.chapter-label {
  font-size: 0.75rem;
  color: var(--gray-400);
  margin-top: 4px;
  text-align: center;
}

/* ===== Question Area ===== */
.question-area {
  flex: 1;
  padding: 24px 16px;
  overflow-y: auto;
}

.question-card {
  animation: fadeIn 0.3s ease;
}

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

.question-number {
  font-size: 0.8rem;
  color: var(--gray-400);
  margin-bottom: 4px;
}

.question-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 20px;
  line-height: 1.6;
}

.question-hint {
  font-size: 0.8rem;
  color: var(--gray-400);
  margin-bottom: 16px;
}

/* ===== Input Types ===== */

/* Radio / Select */
.options-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.option-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border: 2px solid var(--gray-200);
  border-radius: 10px;
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
}

.option-item:hover {
  border-color: var(--primary-light);
  background: rgba(37,99,235,0.03);
}

.option-item.selected {
  border-color: var(--primary);
  background: rgba(37,99,235,0.06);
}

.option-item input[type="radio"],
.option-item input[type="checkbox"] {
  display: none;
}

.option-radio {
  width: 20px;
  height: 20px;
  border: 2px solid var(--gray-300);
  border-radius: 50%;
  margin-right: 12px;
  flex-shrink: 0;
  position: relative;
  transition: all var(--transition);
}

.option-item.selected .option-radio {
  border-color: var(--primary);
}

.option-item.selected .option-radio::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 10px;
  height: 10px;
  background: var(--primary);
  border-radius: 50%;
}

.option-check {
  width: 20px;
  height: 20px;
  border: 2px solid var(--gray-300);
  border-radius: 4px;
  margin-right: 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.option-item.selected .option-check {
  border-color: var(--primary);
  background: var(--primary);
}

.option-item.selected .option-check::after {
  content: '';
  width: 6px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-top: -2px;
}

.option-label {
  font-size: 0.95rem;
  color: var(--gray-700);
  flex: 1;
}

/* Text Input */
.text-input-wrapper {
  position: relative;
}

.text-input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--gray-200);
  border-radius: 10px;
  font-size: 1rem;
  color: var(--gray-800);
  background: #fff;
  outline: none;
  transition: border-color var(--transition);
}

.text-input:focus {
  border-color: var(--primary);
}

.text-input-unit {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 0.9rem;
}

textarea.text-input {
  min-height: 100px;
  resize: vertical;
}

/* Number Input */
.number-input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--gray-200);
  border-radius: 10px;
  font-size: 1.2rem;
  color: var(--gray-800);
  background: #fff;
  outline: none;
  transition: border-color var(--transition);
  -moz-appearance: textfield;
}

.number-input::-webkit-inner-spin-button,
.number-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
}

.number-input:focus {
  border-color: var(--primary);
}

/* Date Input */
.date-input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--gray-200);
  border-radius: 10px;
  font-size: 1rem;
  color: var(--gray-800);
  background: #fff;
  outline: none;
  transition: border-color var(--transition);
}

.date-input:focus {
  border-color: var(--primary);
}

/* Slider */
.slider-container {
  padding: 8px 0;
}

.slider-label-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  font-size: 0.8rem;
  color: var(--gray-400);
}

.slider-value {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}

.slider-input {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--gray-200);
  border-radius: 3px;
  outline: none;
}

.slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(37,99,235,0.3);
}

.slider-input::-moz-range-thumb {
  width: 28px;
  height: 28px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(37,99,235,0.3);
}

/* Slider for guilt test (multiple) */
.slider-group {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.slider-item {
  background: var(--gray-50);
  padding: 16px;
  border-radius: 10px;
}

.slider-item-label {
  font-size: 0.9rem;
  color: var(--gray-700);
  margin-bottom: 12px;
  line-height: 1.5;
}

/* Drag & Drop */
.drag-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.drag-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: #fff;
  border: 2px solid var(--gray-200);
  border-radius: 10px;
  cursor: grab;
  user-select: none;
  transition: all 0.15s ease;
  touch-action: none;
}

.drag-item:active {
  cursor: grabbing;
}

.drag-item.dragging {
  opacity: 0.5;
  border-color: var(--primary);
  background: rgba(37,99,235,0.05);
}

.drag-item.drag-over {
  border-color: var(--primary-light);
  transform: translateY(2px);
}

.drag-handle {
  color: var(--gray-300);
  margin-right: 12px;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.drag-number {
  width: 24px;
  height: 24px;
  background: var(--gray-100);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-500);
  margin-right: 10px;
  flex-shrink: 0;
}

.drag-text {
  font-size: 0.95rem;
  color: var(--gray-700);
}

/* Timer Hold */
.timer-hold-container {
  text-align: center;
  padding: 24px 0;
}

.timer-display {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 24px;
  font-variant-numeric: tabular-nums;
}

.timer-hold-btn {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid var(--primary);
  background: rgba(37,99,235,0.1);
  color: var(--primary);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  touch-action: manipulation;
  user-select: none;
}

.timer-hold-btn:active,
.timer-hold-btn.holding {
  background: var(--primary);
  color: #fff;
  transform: scale(1.05);
}

.timer-instruction {
  color: var(--gray-400);
  font-size: 0.85rem;
  margin-top: 16px;
}

/* Quick Click */
.quick-click-container {
  text-align: center;
}

.quick-click-countdown {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--danger);
  margin-bottom: 16px;
  font-variant-numeric: tabular-nums;
}

.quick-click-sentence {
  font-size: 1.2rem;
  line-height: 2;
  margin-bottom: 16px;
}

.quick-click-word {
  display: inline-block;
  padding: 4px 12px;
  margin: 4px;
  border: 2px solid var(--gray-200);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-weight: 600;
}

.quick-click-word:hover {
  border-color: var(--primary-light);
}

.quick-click-word.clicked {
  border-color: var(--primary);
  background: rgba(37,99,235,0.1);
  color: var(--primary);
}

.quick-click-instruction {
  font-size: 0.85rem;
  color: var(--gray-400);
}

/* Multi-step */
.multi-step-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.multi-step-item {
  padding: 16px;
  background: var(--gray-50);
  border-radius: 10px;
}

.multi-step-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 10px;
}

/* Timed Text */
.timed-text-container {
  position: relative;
}

.timer-countdown {
  position: absolute;
  top: -28px;
  right: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--warning);
  font-variant-numeric: tabular-nums;
}

.timer-countdown.urgent {
  color: var(--danger);
  animation: pulse 0.5s infinite alternate;
}

@keyframes pulse {
  from { opacity: 1; }
  to { opacity: 0.5; }
}

/* Prefecture select */
.prefecture-select {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--gray-200);
  border-radius: 10px;
  font-size: 1rem;
  color: var(--gray-800);
  background: #fff;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
  cursor: pointer;
}

.prefecture-select:focus {
  border-color: var(--primary);
}

/* ===== Footer ===== */
.app-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-top: 1px solid var(--gray-100);
  background: #fff;
  position: sticky;
  bottom: 0;
}

.btn-next {
  margin-left: auto;
  min-width: 100px;
}

/* ===== Ad Placeholder ===== */
.ad-placeholder {
  background: var(--gray-100);
  border: 1px dashed var(--gray-300);
  padding: 24px;
  text-align: center;
  color: var(--gray-400);
  font-size: 0.8rem;
  margin: 0 16px 16px;
  border-radius: 8px;
}

/* ===== Skip Button (Trap 4) ===== */
.skip-all-banner {
  position: fixed;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--warning);
  color: #fff;
  padding: 12px 24px;
  border-radius: 24px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(245,158,11,0.4);
  z-index: 200;
  animation: slideUp 0.5s ease;
  white-space: nowrap;
}

@keyframes slideUp {
  from { transform: translateX(-50%) translateY(100px); }
  to { transform: translateX(-50%) translateY(0); }
}

/* ===== SVG for Q22 展開図 ===== */
.svg-container {
  text-align: center;
  margin: 16px 0;
  padding: 16px;
  background: var(--gray-50);
  border-radius: 10px;
}

.svg-container svg {
  max-width: 100%;
  height: auto;
}

/* ===== Result Page ===== */
.result-page {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px 24px;
  min-height: 100dvh;
  background: #fff;
}

.result-header {
  text-align: center;
  padding: 32px 0 16px;
}

.result-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gray-900);
}

.result-subtitle {
  font-size: 0.85rem;
  color: var(--gray-400);
  margin-top: 4px;
}

/* Total Deviation */
.result-total {
  text-align: center;
  margin-bottom: 32px;
}

.total-deviation-card {
  background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-700) 100%);
  color: #fff;
  border-radius: 16px;
  padding: 32px 24px;
}

.total-label {
  font-size: 0.85rem;
  opacity: 0.7;
  margin-bottom: 8px;
}

.total-value {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 8px;
}

.total-rank {
  font-size: 0.9rem;
  opacity: 0.6;
}

.total-feedback {
  font-size: 0.85rem;
  color: var(--gray-600);
  line-height: 1.7;
  margin-top: 16px;
  text-align: left;
  padding: 0 4px;
}

/* Rank Colors */
.rank-s { color: #f59e0b; }
.rank-a { color: #10b981; }
.rank-b { color: #3b82f6; }
.rank-c { color: var(--gray-600); }
.rank-d { color: #f97316; }
.rank-e { color: #ef4444; }

.total-deviation-card .rank-s,
.total-deviation-card .rank-a,
.total-deviation-card .rank-b { color: #fbbf24; }

.rank-badge {
  display: inline-block;
  width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--gray-100);
}

.rank-badge.rank-s { background: #fef3c7; color: #d97706; }
.rank-badge.rank-a { background: #d1fae5; color: #059669; }
.rank-badge.rank-b { background: #dbeafe; color: #2563eb; }
.rank-badge.rank-c { background: var(--gray-100); color: var(--gray-600); }
.rank-badge.rank-d { background: #ffedd5; color: #ea580c; }
.rank-badge.rank-e { background: #fee2e2; color: #dc2626; }

/* Section Heading (shared) */
.section-heading {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--gray-100);
}

.result-section {
  margin-bottom: 32px;
}

/* Chart wrapper */
.chart-wrapper {
  max-width: 320px;
  margin: 0 auto;
}

/* Axis Bars */
.axis-bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.axis-bar-item {
  margin-bottom: 12px;
}

.axis-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.axis-bar-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-700);
}

.axis-bar-value {
  font-size: 0.9rem;
  font-weight: 700;
}

.axis-bar-track {
  height: 8px;
  background: var(--gray-100);
  border-radius: 4px;
  position: relative;
  overflow: visible;
}

.axis-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1s ease;
}

.axis-bar-avg {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 14px;
  background: var(--gray-400);
  border-radius: 1px;
  transform: translateX(-1px);
}

.axis-bar-rank {
  margin-top: 4px;
  text-align: right;
}

.axis-feedback {
  font-size: 0.8rem;
  color: var(--gray-500);
  line-height: 1.6;
  margin-top: 6px;
  padding: 8px 12px;
  background: var(--gray-50);
  border-radius: 8px;
}

/* MBTI Card */
.mbti-card {
  text-align: center;
  padding: 24px;
  background: var(--gray-50);
  border-radius: var(--radius);
}

.mbti-label {
  font-size: 0.8rem;
  color: var(--gray-400);
  margin-bottom: 8px;
}

.mbti-type {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 4px;
  margin-bottom: 8px;
}

.mbti-desc {
  font-size: 0.9rem;
  color: var(--gray-600);
}

/* Behavior Logs */
.behavior-logs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.log-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  background: var(--gray-50);
  border-radius: 10px;
  border-left: 3px solid var(--warning);
}

.log-bullet {
  width: 6px;
  height: 6px;
  background: var(--warning);
  border-radius: 50%;
  margin-top: 7px;
  flex-shrink: 0;
}

.log-text {
  font-size: 0.85rem;
  color: var(--gray-700);
  line-height: 1.6;
}

/* Result Actions */
.result-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
  margin-bottom: 24px;
}

.btn-lg {
  padding: 16px 24px;
  font-size: 1rem;
}

.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-700);
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-secondary:hover {
  background: var(--gray-200);
}

/* ===== Dashboard Page ===== */
.dashboard-page {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 16px 24px;
  min-height: 100dvh;
  background: #fff;
}

.dashboard-header {
  text-align: center;
  padding: 24px 0 16px;
  position: relative;
}

.dashboard-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--gray-900);
}

.dashboard-subtitle {
  font-size: 0.85rem;
  color: var(--gray-400);
  margin-top: 4px;
}

.dashboard-back {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--primary);
  text-decoration: none;
}

.dashboard-back:hover {
  text-decoration: underline;
}

.dashboard-loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-400);
}

.dashboard-loading p {
  margin-top: 16px;
  font-size: 0.9rem;
}

.dashboard-error {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-500);
}

.dashboard-error p {
  margin-bottom: 16px;
}

.dashboard-section {
  margin-bottom: 32px;
}

/* Stats Cards */
.stats-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--gray-50);
  padding: 20px 16px;
  border-radius: var(--radius);
  text-align: center;
}

.stat-card-label {
  font-size: 0.75rem;
  color: var(--gray-400);
  margin-bottom: 6px;
}

.stat-card-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-800);
}

/* Charts Grid */
.charts-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.chart-card {
  background: var(--gray-50);
  padding: 16px;
  border-radius: var(--radius);
}

.chart-card h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 12px;
}

.chart-card canvas {
  max-height: 300px;
}

.chart-card-wide {
  background: var(--gray-50);
  padding: 16px;
  border-radius: var(--radius);
}

/* ===== Responsive ===== */
@media (min-width: 481px) {
  body {
    background: var(--gray-100);
  }

  .app, .result-page, .dashboard-page {
    box-shadow: var(--shadow);
  }

  .charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}
