/* Phone layouts keep the desktop typography, glass and controls at real size. */
.mobile-demo-nav { display: none; }

@media (max-width: 760px) {
  html { -webkit-text-size-adjust: 100%; scroll-padding-top: 20px; }
  body { min-height: 100svh; }
  .topbar, main, .footer { width: calc(100% - 32px); }
  .topbar {
    height: auto; min-height: 0; padding: 18px 0 12px;
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px;
    align-items: center;
  }
  .site-version-switch {
    position: static; inset: auto; transform: none;
    grid-column: 1 / -1; justify-self: center;
    min-height: 48px; padding: 4px;
  }
  .site-version-switch a { min-height: 40px; min-width: 80px; }
  .topbar > .brand { grid-row: 1; grid-column: 1; font-size: 15px; }
  .topbar:has(> .brand) .site-version-switch { grid-row: 1; grid-column: 2; }
  .topbar > .nav {
    grid-column: 1 / -1; margin-left: 0; width: 100%; gap: 4px;
    padding: 5px; justify-content: space-between; flex-wrap: nowrap;
    box-shadow: 0 8px 28px rgba(0,0,0,.12);
  }
  .nav > a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 12px; font-size: 14px; }
  .theme-toggle { flex: 0 0 54px; min-height: 36px; }
  .hero {
    min-height: 0; padding: 28px 0 40px; gap: 28px;
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-copy { width: 100%; min-width: 0; text-align: center; justify-self: stretch; }
  .hero-copy h1 { font-size: clamp(42px, 10vw, 60px); line-height: 1.05; margin: 0 0 18px; max-width: none; }
  .hero-short { font-size: 16px; line-height: 1.65; max-width: 34ch; margin: 0 auto 24px; }
  .hero-actions { display: grid; grid-template-columns: minmax(0,1fr); gap: 10px; max-width: 420px; margin: 0 auto; }
  .hero-actions > a { width: 100%; min-height: 52px; border-radius: 16px; padding: 12px 16px; text-wrap: balance; }
  .hero-media { min-height: 0; min-width: 0; width: 100%; gap: 14px; }
  .desktop-glass {
    width: 100%; max-width: 560px; height: clamp(320px, 86vw, 360px);
    min-height: 0; aspect-ratio: auto; transform: none; border-radius: 28px;
    box-shadow: 0 20px 55px rgba(0,0,0,.22);
  }
  .desktop-glass::before { inset: 12px; border-radius: 20px; }
  .expanded-island[data-mode="compact"] { width: min(330px, calc(100% - 24px)); }
  .expanded-island[data-mode="expanded"] { width: calc(100% - 24px); max-width: 500px; height: 280px; border-radius: 26px; }
  .expanded-island[data-mode="expanded"].has-volume { height: 310px; }
  .island-page { padding: 22px 16px; }
  .player-row { gap: 10px; }
  .big-cover { width: 54px; height: 54px; flex: 0 0 54px; border-radius: 14px; }
  .track-copy strong { font-size: 17px; }
  .track-copy span { font-size: 13px; }
  .pause-mark { display: none; }
  .waveform { flex-shrink: 0; gap: 3px; }
  .waveform i { width: 3px; }
  .timeline { margin-top: 24px; gap: 8px; font-size: 11px; }
  .timeline-track { height: 8px; min-width: 0; }
  .controls { margin-top: 20px; gap: 2px; }
  .controls button { width: 44px; height: 48px; flex: 0 0 44px; }
  .play span { height: 32px; width: 8px; }
  .share-toast { left: 14px; right: 14px; bottom: 20px; padding: 10px 12px; border-radius: 18px; font-size: 13px; }
  .volume-drawer { left: 18px; right: 18px; bottom: 24px; min-width: 0; }
  .calendar-page { grid-template-columns: minmax(0,.62fr) minmax(0,1fr); gap: 12px; }
  .calendar-left strong, .calendar-grid > strong { font-size: 10px; letter-spacing: 0; }
  .calendar-left span { font-size: 46px; margin-bottom: 20px; }
  .calendar-left p { font-size: 12px; }
  .days { font-size: 11px; gap: 9px 0; }
  .weekdays { font-size: 10px; }
  .page-dots { right: 7px; }
  .setting-row { min-height: 54px; padding: 10px; gap: 8px; border-radius: 14px; }
  .setting-row b { font-size: 13px; }
  .setting-row small { font-size: 11px; }
  .switch { width: 44px; }
  .switch.is-on::after { transform: translateX(16px); }
  .mobile-demo-nav { display: flex; width: 100%; max-width: 560px; gap: 6px; padding: 5px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
  .mobile-demo-nav button { flex: 1; min-width: 0; min-height: 44px; padding: 8px 4px; border: 0; border-radius: 13px; font: inherit; font-size: 12px; font-weight: 650; color: var(--muted); background: transparent; cursor: pointer; }
  .mobile-demo-nav button[aria-pressed="true"] { background: var(--glass); color: var(--text); }
  .account-layout, .auth-panel, .auth-forms-window, .verify-card { min-width: 0; width: 100%; }
  .auth-panel, .verify-card { padding: 24px 18px; border-radius: 24px; }
  .auth-form input, .verify-form input, textarea, select { font-size: 16px; min-width: 0; max-width: 100%; }
  .auth-tabs button, .auth-submit { min-height: 48px; }
  .account-section .section-head h2, .faq-hero h1, h2 { font-size: clamp(28px, 8vw, 38px); line-height: 1.15; overflow-wrap: anywhere; }
  .section-head p, .faq-hero p { font-size: 16px; line-height: 1.65; }
  .feature-grid, .security-grid, .faq-grid, .legal-links { grid-template-columns: minmax(0,1fr); }
  .cabinet-grid { grid-template-columns: minmax(0,1fr); }
  .cabinet-panel { padding: 20px 16px; }
  .version-row { gap: 12px; flex-wrap: wrap; padding: 14px; }
  .version-row > div { min-width: 0; overflow-wrap: anywhere; }
  .footer { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 24px 0 max(24px, env(safe-area-inset-bottom)); font-size: 13px; }
  .footer > div { display: flex; flex-wrap: wrap; gap: 12px; }
  a, button, input { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
  :focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .waveform i { animation: none; }
  .expanded-island, .island-pages, .island-page { transition-duration: .01ms; }
}
