/* ============================================================
   PATH OF LUMEN — responsive.css
   Tablet / mobile / small-screen adaptation and orientation.
   The 3D camera reserves safe areas (HUD, touch pad, notches)
   from JS; this file adapts the HTML/CSS UI layer.
   ============================================================ */

/* ---------- Touch path controls ----------
   One transparent row of chevrons, only on small or touch
   screens. Large desktop screens never show it. */
@media (max-width: 1024px), (pointer: coarse) {
  .direction-hint {
    display: flex;
  }
  /* keep toasts clear of the chevron row */
  .toast {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 78px);
  }
}

@media (max-width: 900px) {
  .panel {
    padding: 28px 24px;
  }
  .howto-grid {
    grid-template-columns: 1fr;
  }
  .hud-center {
    flex-direction: row;
  }
}

@media (max-width: 640px) {
  .hud {
    padding-left: 10px;
    padding-right: 10px;
  }
  .hud-left, .hud-right {
    gap: 8px;
  }
  .hud-center {
    flex-direction: column;
    gap: 4px;
  }
  .hud-timer {
    display: none;
  }
  .hud-btn {
    width: 42px;
    height: 42px;
  }
  .hud-level {
    padding: 9px 12px;
    font-size: 13px;
  }
  .menu-title {
    font-size: clamp(30px, 9vw, 48px);
  }
  .btn {
    min-width: 200px;
  }
  .range {
    width: 130px;
  }
  .setting-row {
    gap: 12px;
  }
  .complete-stats {
    gap: 18px;
  }
  .stat-value {
    font-size: 24px;
  }
  .direction-hint {
    gap: 25px;
    padding-bottom: 20px;
  }
}

@media (max-width: 420px) {
  .btn {
    min-width: 176px;
    font-size: 13px;
    padding: 12px 20px;
  }
  .hud-lumen {
    font-size: 12px;
  }
  .dh-btn {
    width: 44px;
    height: 44px;
  }
  .dh-btn svg {
    width: 26px;
    height: 26px;
  }
}

/* ---------- Portrait phone: hide the level pill, keep HUD slim ---------- */
@media (orientation: portrait) and (max-width: 640px) {
  .hud-level { display: none; }
}

/* ---------- Landscape-small (phone rotated): keep everything compact ---------- */
@media (orientation: landscape) and (max-height: 460px) {
  .panel {
    padding: 16px 20px;
    max-height: 86dvh;
  }
  .panel-title {
    margin-bottom: 12px;
    font-size: 22px;
  }
  .modal-buttons {
    gap: 8px;
  }
  .menu-buttons {
    gap: 8px;
  }
  .hud {
    top: 4px;
  }
  .hud-level {
    padding: 6px 10px;
    font-size: 12px;
  }
  .hud-btn {
    width: 36px;
    height: 36px;
    font-size: 15px;
  }
  .direction-hint {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
    gap: 2px;
  }
  .dh-btn {
    width: 42px;
    height: 42px;
  }
  .dh-btn svg {
    width: 24px;
    height: 24px;
  }
  .toast {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 62px);
    padding: 9px 16px;
    font-size: 13px;
  }
}
