/* ==========================================================================
   Focus v2 - board a flight, study until you land
   base.css handles tokens, reset, body, Inter font, .home-btn, .util-btns,
   .site-foot, focus-visible, touch-action, reduced-motion
   ========================================================================== */

/* The whole tool toggles visibility via the hidden attribute - make sure it
   always wins over display:flex/grid (recurring site gotcha). */
[hidden] { display: none !important; }

html, body { height: 100%; }
body {
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% -20%, rgba(138, 124, 255, 0.08), transparent 60%),
    var(--bg);
}

/* ═══ Screens ═══════════════════════════════════════════ */
.screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ═══ Shared buttons ════════════════════════════════════ */
.btn {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-pill);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.12s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn:hover { background: var(--surface-hover); }
.btn.small { padding: 8px 14px; font-size: 13px; }
.btn.primary {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.btn.primary:hover {
  background: rgba(138, 124, 255, 0.25);
  box-shadow: 0 0 14px rgba(138, 124, 255, 0.3);
}
.btn.ghost { color: var(--text); }
.btn.ghost:hover { color: var(--accent); border-color: var(--accent); }
.danger-btn { width: 100%; }
.danger-btn:hover { border-color: #ff5d7a; color: #ff7a93; }

/* ═══ Route picker ══════════════════════════════════════ */
.globe-fullscreen {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.route-float {
  position: relative;
  z-index: 2;
  margin-left: clamp(16px, 5vw, 64px);
  margin-right: auto;
  width: clamp(300px, 32vw, 390px);
  max-width: calc(100vw - 32px);
  max-height: min(calc(100dvh - 110px), 640px);
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.6dvh, 14px);
  padding: clamp(16px, 2.6dvh, 26px) clamp(16px, 2vw, 24px) clamp(14px, 2.2dvh, 22px);
  background: rgba(12, 13, 26, 0.78);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
  animation: float-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes float-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.route-title {
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.1;
}
.route-sub {
  color: var(--muted);
  font-size: 13.5px;
  margin-top: -8px;
}

.route-chips {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  min-height: 0;
  flex: 1;
  padding-right: 4px;
  scrollbar-width: thin;
}

.route-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.route-chip:hover { background: var(--surface-hover); }
.route-chip.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.chip-time {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.route-chip.active .chip-time { color: var(--accent); }

.route-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(138, 124, 255, 0.35);
  border-radius: var(--radius-md);
  background: var(--accent-soft);
}
.route-display {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
}
.route-arrow { color: var(--accent); }
.route-duration {
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.board-btn {
  width: 100%;
  padding: 14px 24px;
  background: var(--accent);
  color: #14122b;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(138, 124, 255, 0.35);
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.board-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(138, 124, 255, 0.55);
}
.board-btn:disabled { opacity: 0.35; cursor: default; box-shadow: none; }

.globe-hint {
  position: absolute;
  bottom: 56px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--muted);
  font-size: 12.5px;
  padding: 7px 14px;
  background: rgba(12, 13, 26, 0.6);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  backdrop-filter: blur(8px);
  pointer-events: none;
  white-space: nowrap;
}

/* ═══ Boarding splash ═══════════════════════════════════ */
.splash-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  animation: float-in 0.4s ease both;
}
.splash-plane {
  width: 56px;
  height: 56px;
  color: var(--accent);
  filter: drop-shadow(0 0 18px rgba(138, 124, 255, 0.5));
  animation: splash-drift 1.6s ease-in-out infinite alternate;
}
@keyframes splash-drift {
  from { transform: translateY(3px) rotate(-2deg); }
  to   { transform: translateY(-3px) rotate(2deg); }
}
.splash-label {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.splash-route { color: var(--muted); font-size: 13.5px; }

/* ═══ Cruise (3D cabin) ═════════════════════════════════ */
.cabin-3d {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.cabin-3d canvas { display: block; }

.cabin-hint {
  position: absolute;
  bottom: 56px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--muted);
  font-size: 12.5px;
  padding: 7px 14px;
  background: rgba(12, 13, 26, 0.6);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  backdrop-filter: blur(8px);
  pointer-events: none;
  white-space: nowrap;
  animation: hint-fade 5s ease 4s both;
}
@keyframes hint-fade { to { opacity: 0; } }

/* ═══ Tools overlay ═════════════════════════════════════ */
.tools-overlay {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 9, 20, 0.45);
  backdrop-filter: blur(4px);
  animation: tools-in 0.35s ease both;
}
@keyframes tools-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.tools-inner {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(10px, 1.5vw, 14px);
  align-items: stretch;
  max-width: min(960px, calc(100vw - 32px));
  max-height: calc(100dvh - 110px);
  overflow-y: auto;
  padding-top: 40px;
  scrollbar-width: thin;
}

.cabin-back-btn {
  position: absolute;
  top: 0;
  left: 0;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 4px;
  transition: color 0.15s ease;
}
.cabin-back-btn:hover { color: var(--text); }

.tool-card {
  width: clamp(236px, 28vw, 280px);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 16px;
  background: linear-gradient(160deg, rgba(20, 22, 40, 0.92), rgba(12, 13, 26, 0.92));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.tool-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 24px;
}
.tool-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.tool-icon-btn {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.tool-icon-btn:hover { color: var(--text); background: var(--surface-hover); }
.tool-icon-btn svg { width: 16px; height: 16px; }

/* Timer */
.timer-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 0 2px;
}
.timer-time {
  font-size: clamp(34px, 4.5vw, 44px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}
.timer-phase {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.timer-controls {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.timer-stats {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}
.timer-settings {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.setting-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.setting-row span { flex: 1; }
.setting-row input {
  width: 56px;
  padding: 6px 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

/* Tasks */
.task-count {
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  transition: opacity 0.45s ease, background 0.45s ease, color 0.45s ease;
}
.task-count.zero {
  opacity: 0.45;
  background: var(--surface);
  color: var(--muted);
}
.todo-form {
  display: flex;
  gap: 6px;
}
.todo-form input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}
.todo-form input::placeholder { color: var(--muted); }
.todo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  max-height: 180px;
  scrollbar-width: thin;
}
.todo-empty {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  padding: 12px 0;
}
.todo-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.todo-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.todo-item span {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.todo-item.done span {
  color: var(--muted);
  text-decoration: line-through;
}
.del-btn {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 15px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.del-btn:hover { color: #ff7a93; background: var(--surface-hover); }

/* Cabin card: rain + breaks */
.rain-control {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rain-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}
.rain-icon { width: 16px; height: 16px; color: var(--muted); }

.toggle-track {
  position: relative;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.toggle-track input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background: var(--muted);
  border-radius: 50%;
  transition: transform 0.2s ease, background 0.2s ease;
  pointer-events: none;
}
.toggle-track:has(input:checked) {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.toggle-track:has(input:checked) .toggle-thumb {
  transform: translateX(16px);
  background: var(--accent);
}

.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--line);
  outline: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.slider:disabled { opacity: 0.35; cursor: default; }
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  box-shadow: 0 0 8px rgba(138, 124, 255, 0.5);
}
.slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  box-shadow: 0 0 8px rgba(138, 124, 255, 0.5);
}

.break-buttons {
  display: flex;
  gap: 8px;
}
.break-buttons .btn { flex: 1; }

/* ═══ Complete ══════════════════════════════════════════ */
.complete-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: min(400px, calc(100vw - 32px));
  padding: clamp(24px, 4dvh, 36px) clamp(20px, 4vw, 32px) clamp(20px, 3.4dvh, 30px);
  background: linear-gradient(160deg, #141826, #101321);
  border: 1px solid rgba(138, 124, 255, 0.3);
  border-radius: var(--radius-lg);
  box-shadow: 0 0 40px rgba(138, 124, 255, 0.18);
  text-align: center;
  animation: float-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.complete-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.complete-city {
  color: var(--muted);
  font-size: 14px;
  margin-top: -10px;
}
.complete-stats {
  display: flex;
  gap: 10px;
  width: 100%;
}
.stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.stat-val {
  font-size: 1.3rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ═══ Rest break overlay ════════════════════════════════ */
.break-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 9, 20, 0.82);
  backdrop-filter: blur(12px);
}
.break-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  padding: 24px;
}
.break-title {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.break-sub { color: var(--muted); font-size: 13.5px; }
.rest-timer {
  font-size: 52px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  padding: 6px 0 4px;
}

/* ═══ Toilet HUD ════════════════════════════════════════ */
.toilet-hud {
  position: fixed;
  bottom: 64px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 900;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: rgba(12, 13, 26, 0.85);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-soft);
}
.toilet-hud-text { font-size: 13.5px; color: var(--text); }
.toilet-hud-btns { display: flex; gap: 8px; }

/* ═══ Boarding mini-game ════════════════════════════════ */
.boarding-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: min(400px, calc(100vw - 32px));
  padding: clamp(24px, 4dvh, 34px) clamp(20px, 4vw, 30px) 18px;
  background: linear-gradient(160deg, #141826, #101321);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  animation: float-in 0.4s ease both;
}

.boarding-dots { display: flex; gap: 8px; }
.bdot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
  transition: background 0.3s ease, transform 0.3s ease;
}
.bdot.active { background: var(--accent); transform: scale(1.25); }
.bdot.done { background: rgba(138, 124, 255, 0.45); }

.boarding-instruction {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
}

.boarding-scene {
  width: 100%;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.skip-link {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.15s ease;
}
.skip-link:hover { color: var(--text); }

/* Step 1: boarding pass */
.bpass {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(280px, 100%);
  padding: 14px 16px 12px;
  background: linear-gradient(150deg, #1d2138, #151831);
  border: 1px solid rgba(138, 124, 255, 0.4);
  border-radius: var(--radius-md);
  color: var(--text);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  text-align: left;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.bpass:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(138, 124, 255, 0.25); }
.bpass-top {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.bpass-route {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}
.bpass-arrow { color: var(--accent); font-size: 16px; }
.bpass-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
}
.bpass-bar {
  height: 26px;
  border-radius: 3px;
  background: repeating-linear-gradient(90deg,
    rgba(233, 233, 241, 0.85) 0 2px, transparent 2px 5px,
    rgba(233, 233, 241, 0.85) 5px 6px, transparent 6px 11px);
  opacity: 0.5;
}
.bpass.scanned::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(138, 124, 255, 0.35), transparent);
  animation: scan-sweep 0.55s ease both;
}
@keyframes scan-sweep {
  from { transform: translateY(-100%); }
  to   { transform: translateY(100%); }
}
.bpass.scanned { border-color: var(--accent); box-shadow: 0 0 18px rgba(138, 124, 255, 0.35); }

/* Step 2: seat map */
.seat-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.seat-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.seat-num {
  width: 18px;
  font-size: 10px;
  color: var(--muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.seat-aisle { width: 16px; }
.seat {
  width: 30px;
  height: 30px;
  border-radius: 7px 7px 4px 4px;
  border: 1px solid rgba(138, 124, 255, 0.45);
  background: rgba(138, 124, 255, 0.10);
  cursor: pointer;
  position: relative;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease, opacity 0.3s ease;
}
.seat:hover:not(:disabled) { border-color: var(--accent); background: rgba(138, 124, 255, 0.28); transform: translateY(-1px); }
.seat.taken {
  background: #14141f;
  border-color: rgba(255, 255, 255, 0.05);
  cursor: default;
}
.seat.taken::after {
  content: "\00d7";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.22);
  font-size: 15px;
  font-weight: 700;
}
.seat.picked {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 14px rgba(138, 124, 255, 0.6);
}
.seat.dim { opacity: 0.35; }
.seat-legend {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--muted);
}
.swatch {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  display: inline-block;
}
.swatch.free { background: rgba(138, 124, 255, 0.10); border: 1px solid rgba(138, 124, 255, 0.45); }
.swatch.taken { background: #14141f; border: 1px solid rgba(255, 255, 255, 0.05); }

/* Step 3: stow the bag */
.stow-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  width: 100%;
}
.stow-bin {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: min(220px, 90%);
  padding: 14px 10px;
  border: 2px dashed var(--line);
  border-radius: var(--radius-md);
  color: var(--muted);
  font-size: 12px;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.stow-bin svg { width: 30px; height: 30px; }
.stow-bin.hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.stow-bin.filled {
  border-style: solid;
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 16px rgba(138, 124, 255, 0.3);
}
.stow-bag {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 12px;
  cursor: grab;
  user-select: none;
  touch-action: none;
  transition: box-shadow 0.2s ease, opacity 0.4s ease;
}
.stow-bag svg { width: 30px; height: 30px; }
.stow-bag.dragging { cursor: grabbing; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5); position: relative; z-index: 5; }
.stow-bag.stowed { opacity: 0; transform: scale(0.4) translateY(-60px) !important; transition: all 0.4s ease; }

/* Step 4: buckle up */
.belt-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
  width: min(260px, 90%);
  height: 84px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.2s ease;
}
.belt-btn:hover { border-color: var(--accent); }
.belt-half {
  width: 64px;
  height: 18px;
  background: #3a3d52;
  border-radius: 4px;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.belt-half.left::after, .belt-half.right::before {
  content: "";
  display: block;
}
.belt-buckle {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 24px;
  border: 2px solid #8d92ad;
  border-radius: 4px;
  background: #4a4e66;
}
.belt-btn.buckled .belt-half.left { transform: translateX(22px); }
.belt-btn.buckled .belt-half.right { transform: translateX(-22px); }
.belt-btn.buckled { border-color: var(--accent); box-shadow: 0 0 16px rgba(138, 124, 255, 0.3); }
.belt-label {
  position: absolute;
  bottom: -24px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

/* ═══ Menu ══════════════════════════════════════════════ */
.menu-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: min(380px, calc(100vw - 32px));
  padding: clamp(28px, 5dvh, 44px) clamp(22px, 4vw, 36px) clamp(20px, 3.6dvh, 30px);
  background: linear-gradient(160deg, #141826, #101321);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  text-align: center;
  animation: float-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.menu-plane {
  width: 52px;
  height: 52px;
  color: var(--accent);
  filter: drop-shadow(0 0 14px rgba(138, 124, 255, 0.45));
}
.menu-title {
  font-size: clamp(28px, 5vw, 38px);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.1;
}
.menu-sub {
  color: var(--muted);
  font-size: 13.5px;
  margin-top: -10px;
}
.menu-card .board-btn { margin-top: 6px; }
.menu-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.menu-stats .stats-icon {
  width: 15px;
  height: 15px;
  opacity: 0.5;
  flex-shrink: 0;
}

.float-back {
  align-self: flex-start;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 0;
  margin-bottom: -6px;
  transition: color 0.15s ease;
}
.float-back:hover { color: var(--text); }

/* Menu choice cards (Travel / Stay) */
.menu-choices {
  display: flex;
  gap: 10px;
  width: 100%;
}
.choice-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 10px 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--text);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.choice-card:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(138, 124, 255, 0.18);
}
.choice-card.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.choice-icon {
  width: 26px;
  height: 26px;
  color: var(--accent);
  margin-bottom: 2px;
}
.choice-label {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.choice-desc {
  font-size: 11.5px;
  color: var(--muted);
}

.stay-title {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.stay-card .board-btn { margin-top: 2px; }

/* Passport */
.passport-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  transition: color 0.15s ease;
}
.passport-link:hover { color: var(--accent); }
.passport-icon { width: 15px; height: 15px; }

.passport-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(10px, 1.8dvh, 14px);
  width: min(640px, calc(100vw - 32px));
  max-height: min(calc(100dvh - 70px), 720px);
  padding: clamp(22px, 4dvh, 32px) clamp(18px, 3vw, 28px);
  background: linear-gradient(160deg, #141826, #101321);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  animation: float-in 0.4s ease both;
}
.passport-title {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.passport-sub {
  color: var(--muted);
  font-size: 13px;
  margin-top: -8px;
}
.passport-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(78px, 10vw, 112px), 1fr));
  gap: clamp(7px, 1.2vw, 12px);
  width: 100%;
  /* Tilted stamps poke past their cells - clip sideways, scroll only
     vertically, and hide the scrollbar (macOS overlay bars flash). */
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  padding: 6px 4px;
}
.passport-grid::-webkit-scrollbar { display: none; }
.stamp {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  aspect-ratio: 1 / 1;
  position: relative;
  border: 2px dashed var(--line);
  border-radius: 50%;
  color: var(--muted);
  opacity: 0.4;
  transform: rotate(var(--tilt, 0deg));
}
.stamp.got {
  opacity: 1;
  border-color: rgba(138, 124, 255, 0.65);
  color: var(--accent);
  box-shadow: inset 0 0 18px rgba(138, 124, 255, 0.12);
}
.stamp-code {
  font-size: clamp(13px, 1.8vw, 17px);
  font-weight: 800;
  letter-spacing: 0.08em;
}
.stamp-city {
  font-size: clamp(8.5px, 1.1vw, 10.5px);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  padding: 0 6px;
}
.stamp-count {
  position: absolute;
  top: 4px;
  right: 2px;
  font-size: 10px;
  font-weight: 700;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--radius-pill);
  padding: 1px 6px;
}

/* ═══ Stay mode scenes (no 3D - ambient gradients) ══════ */
#screenCruise.stay-mode .cabin-3d,
#screenCruise.stay-mode .cabin-hint { display: none; }
#screenCruise.stay-mode .tools-overlay {
  background: transparent;
  backdrop-filter: none;
}

#screenCruise.stay-cafe {
  background:
    radial-gradient(ellipse at 20% 110%, rgba(196, 121, 51, 0.16), transparent 55%),
    radial-gradient(ellipse at 85% -10%, rgba(255, 180, 90, 0.10), transparent 50%),
    linear-gradient(170deg, #16100c, #0b0b12 70%);
}
#screenCruise.stay-cafe.daylight-day {
  background:
    radial-gradient(ellipse at 20% 110%, rgba(214, 144, 70, 0.22), transparent 55%),
    radial-gradient(ellipse at 85% -10%, rgba(255, 205, 130, 0.16), transparent 50%),
    linear-gradient(170deg, #1d150e, #0e0d13 70%);
}
#screenCruise.stay-library {
  background:
    radial-gradient(ellipse at 80% 110%, rgba(64, 110, 96, 0.16), transparent 55%),
    radial-gradient(ellipse at 15% -10%, rgba(90, 130, 170, 0.10), transparent 50%),
    linear-gradient(170deg, #0d1310, #0b0b12 70%);
}
#screenCruise.stay-library.daylight-day {
  background:
    radial-gradient(ellipse at 80% 110%, rgba(86, 138, 120, 0.2), transparent 55%),
    radial-gradient(ellipse at 15% -10%, rgba(120, 160, 200, 0.15), transparent 50%),
    linear-gradient(170deg, #101713, #0d0e14 70%);
}

/* ═══ Mid-size screens (tablets, small laptops) ═════════ */
@media (max-width: 900px) and (min-width: 601px) {
  /* Cards wrap 2+1 - keep them off the screen edges */
  .tools-inner { max-width: calc(100vw - 24px); }
  .route-float { width: clamp(300px, 44vw, 390px); }
}

/* Short viewports (laptops with little height) */
@media (max-height: 700px) {
  .tools-inner { padding-top: 34px; }
  .tool-card { gap: 9px; padding: 14px 14px; }
  .timer-time { font-size: 32px; }
  .todo-list { max-height: 120px; }
  .menu-card { gap: 12px; }
  .menu-plane { width: 42px; height: 42px; }
}

/* ═══ Mobile ════════════════════════════════════════════ */
@media (max-width: 600px) {
  /* Route picker becomes a bottom sheet over the globe */
  #screenRoute { align-items: flex-end; }
  .route-float {
    margin: 0 auto 64px;
    width: calc(100vw - 24px);
    max-height: 58dvh;
    padding: 20px 16px 16px;
  }
  .route-title { font-size: 24px; }
  .globe-hint { display: none; }

  /* Tools stack vertically and scroll */
  .tools-overlay { align-items: flex-start; }
  .tools-inner {
    flex-direction: column;
    align-items: stretch;
    width: calc(100vw - 24px);
    max-height: none;
    height: calc(100dvh - 90px);
    margin-top: 56px;
    overflow-y: auto;
    padding-top: 34px;
    padding-bottom: 16px;
  }
  .tool-card { width: 100%; flex-shrink: 0; }
  .menu-choices { flex-direction: row; }
  .timer-time { font-size: 38px; }
  .todo-list { max-height: 150px; }
  .cabin-hint, .globe-hint { bottom: 48px; }
  .toilet-hud { width: calc(100vw - 32px); bottom: 52px; }
}


/* ═══ Background decoration scatter (site menu standard) ═ */
.focus-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.focus-bg-item {
  position: absolute;
  opacity: 0.06;
  color: var(--muted);
}
.focus-bg-item svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}
.focus-bg-item svg.solid { fill: currentColor; stroke: none; }
.screen { z-index: 1; }
