@media (max-width: 800px) {
  html { background: #f4f7f2; }
  body { min-width: 320px; overscroll-behavior-y: none; }
  .login-shell { min-height: 100dvh; padding: max(20px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom)); }
  .login-card { width: 100%; max-width: 430px; padding: 30px 22px; border-radius: 18px; }
  .login-card h2 { margin-top: 30px; font-size: 30px; }
  .login-card input, .login-card button { min-height: 48px; font-size: 16px; }
  .app { display: block; min-height: 100dvh; }
  aside { position: fixed; inset: auto 0 0; height: calc(66px + env(safe-area-inset-bottom)); min-height: 0; padding: 7px 8px env(safe-area-inset-bottom); background: rgba(23,76,59,.98); box-shadow: 0 -8px 30px rgba(23,76,59,.14); z-index: 20; }
  aside nav { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 2px; width: 100%; overflow: visible; }
  aside nav:has(#adminNav:not(.hidden)) { grid-template-columns: repeat(6, minmax(0,1fr)); }
  nav button { min-width: 0; min-height: 52px; padding: 5px 2px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 18px; }
  nav button span { display: block; font-size: 10px; font-weight: 700; white-space: nowrap; }
  main { max-width: none; padding: max(18px, env(safe-area-inset-top)) 16px calc(92px + env(safe-area-inset-bottom)); }
  main > header { min-height: 54px; margin-bottom: 18px; align-items: flex-start; }
  main > header .eyebrow { display: block; font-size: 10px; letter-spacing: .12em; }
  main header h1 { font-family: inherit; font-size: 25px; line-height: 1.2; margin: 5px 0 0; }
  .status { display: none; }
  .mobile-user { display: flex; align-items: center; gap: 8px; color: #65766e; font-size: 12px; }
  .mobile-user button { min-height: 36px; border: 1px solid var(--line); background: #fff; color: var(--green); border-radius: 9px; padding: 0 11px; }
  .hero-card { display: block; padding: 22px; border-radius: 16px; }
  .hero-card h2 { font-family: inherit; font-size: 24px; }
  .hero-card p { margin-bottom: 0; line-height: 1.6; }
  .plant { display: none; }
  .work-card, .chat-card, .table-card, .result { border-radius: 14px; padding: 16px; margin-top: 14px; box-shadow: none; }
  textarea { min-height: 138px; font-size: 16px; }
  .suggestions { display: flex; flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; }
  .suggestions button { flex: 0 0 auto; min-height: 40px; scroll-snap-align: start; }
  .primary { width: 100%; min-height: 48px; }
  .toolbar { align-items: stretch; flex-direction: column; gap: 10px; }
  .speaking-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .speaking-options label { display: flex; flex-direction: column; gap: 6px; }
  .toolbar select { width: 100%; min-height: 44px; margin: 0; font-size: 16px; }
  .voice-status { grid-column: 1 / -1; }
  #resetChat { min-height: 42px; }
  .chat-card { padding: 12px; }
  .chat { height: calc(100dvh - 360px); min-height: 300px; padding: 4px; }
  .bubble { max-width: 88%; font-size: 15px; }
  .chat-card form { position: sticky; bottom: 0; background: #fff; }
  .chat-card input { min-width: 0; min-height: 46px; font-size: 16px; }
  .mic, .send { min-width: 46px; padding: 0 12px; }
  .split { display: block; }
  .split .result { margin-top: 14px; }
  .tall { min-height: 260px; }
  .tall-result { min-height: 180px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 15px; border-radius: 12px; }
  .stat-card b { font-family: inherit; font-size: 25px; }
  .record { grid-template-columns: 76px minmax(0,1fr); padding: 13px 0; }
  .record span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .record time { display: none; }
}

@media (min-width: 801px) { .mobile-user { display: none; } }
