.home, .map-screen, .street-screen, .profile-screen {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.page-intro { min-width: 0; }
.page-intro p:last-child { color: var(--muted); margin-top: 4px; }

.hero { padding: 0; overflow: hidden; }
.hero-photo { width: 100%; height: clamp(180px, 42vw, 320px); object-fit: cover; object-position: center 40%; }
.hero-copy { padding: 14px; display: grid; gap: 8px; }
.hero-actions, .setting-actions, .modal-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-actions .btn { flex: 1 1 140px; }

.home-grid, .stat-grid, .world-teasers, .picture-row, .info-list {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.home-grid { grid-template-columns: minmax(0, 1fr); }

.daily-head, .section-head, .world-head, .profile-hero, .switch-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.daily-head > div, .section-head, .world-head > div, .profile-hero > div { min-width: 0; }
.mini-art { width: 64px; height: 64px; object-fit: cover; border-radius: 16px; flex: 0 0 auto; }
.fact { font-size: 1.05rem; }

.steps, .how-list { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.steps li, .how-list li { display: flex; gap: 10px; min-width: 0; }
.step-index {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-family: var(--display);
}

.teaser, .node, .ride-card, .info-card, .badge {
  min-width: 0;
  text-align: left;
  border-radius: 18px;
  background: #141820;
  border: 2px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  padding: 10px;
}

.teaser { display: flex; gap: 10px; align-items: center; width: 100%; }
.teaser-swatch { width: 14px; align-self: stretch; border-radius: 8px; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.25); }
.teaser-copy { display: grid; min-width: 0; }
.teaser-copy em { color: var(--muted); font-style: normal; font-size: 0.85rem; }
.teaser.shut { opacity: 0.72; }

.world-card { display: grid; gap: 10px; border-color: var(--world, var(--line)); }
.world-meter { text-align: right; }
.world-meter strong { display: block; font-family: var(--display); font-size: 1.4rem; color: var(--secondary); }
.nodes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.node { display: grid; gap: 4px; }
.node-index { color: var(--secondary); }
.node-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.node.shut { opacity: 0.66; }
.sheet-facts { margin: 8px 0 0; padding-left: 18px; }
.lock-note { color: var(--accent); margin-top: 8px; }

.street-screen .tabs { margin-bottom: 0; }
.info-card .summary { margin: 4px 0; }
.picture-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.picture-row figure { margin: 0; min-width: 0; }
.picture-row img { width: 100%; height: 88px; object-fit: cover; border-radius: 14px; background: #10141c; }
.picture-row figcaption {
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lab { display: grid; gap: 8px; }
.lab-slider { display: grid; gap: 6px; }
.lab-slider input { width: 100%; accent-color: var(--secondary); }
.lab-readout strong { font-family: var(--display); font-size: 2rem; color: var(--secondary); }

.quiz-card, .quiz-score { display: grid; gap: 10px; }
.quiz-options { display: grid; gap: 8px; }
.quiz-option {
  text-align: left;
  padding: 0.8rem;
  border-radius: 14px;
  background: #121722;
  border: 2px solid rgba(255, 255, 255, 0.08);
}
.quiz-option.right { border-color: var(--success); }
.quiz-option.wrong { border-color: var(--danger); }
.quiz-why { color: var(--highlight); min-height: 1.2em; }

.profile-mascot { width: 96px; height: 96px; object-fit: cover; border-radius: 24px; flex: 0 0 auto; }
.name-input {
  width: 100%;
  border: 0;
  border-bottom: 2px solid var(--secondary);
  background: transparent;
  font-family: var(--display);
  font-size: 1.6rem;
  padding: 0.2rem 0;
}
.rank-bar { height: 10px; border-radius: 999px; background: #0e1117; overflow: hidden; margin-top: 8px; }
.rank-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--secondary)); }
.stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat { display: grid; gap: 4px; }
.stat span { color: var(--muted); font-size: 0.8rem; }
.stat strong { font-family: var(--display); font-size: 1.35rem; }
.garage, .badge-grid { display: grid; gap: 8px; }
.ride-card { width: 100%; display: grid; }
.ride-card.on { border-color: var(--secondary); }
.ride-card.shut { opacity: 0.6; }
.badge { display: flex; gap: 8px; align-items: flex-start; }
.badge .ico { color: var(--metal); flex: 0 0 auto; }
.badge.owned { border-color: var(--secondary); }
.badge.owned .ico { color: var(--secondary); }
.badge p, .ride-card span { color: var(--muted); }
.settings { display: grid; gap: 10px; }
.switch-row { padding: 4px 0; }
.rank-ladder { color: var(--muted); font-size: 0.82rem; }

.level-sheet { display: grid; gap: 8px; }
.result-body { display: grid; gap: 10px; }
.result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.result-grid div { background: rgba(0, 0, 0, 0.22); border-radius: 12px; padding: 8px; }
.result-grid span { display: block; color: var(--muted); font-size: 0.75rem; }
.score-pop { font-size: 1.2rem; color: var(--highlight); }
.modal-win { border-color: var(--secondary); }
.modal-fail { border-color: var(--danger); }

@media (min-width: 720px) {
  .home-grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }
  .nodes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .garage { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .badge-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 350px) {
  .picture-row { grid-template-columns: minmax(0, 1fr); }
  .nodes { grid-template-columns: minmax(0, 1fr); }
  .stat-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-photo { height: 150px; }
}
