/* Shared phone layout: allow content to shrink instead of hiding clipped edges. */
@media (max-width: 767px) {
  #dc-root *, #dc-root *::before, #dc-root *::after { box-sizing: border-box; }
  #dc-root section [style*="min-width"] { min-width: 0 !important; max-width: 100%; flex-basis: 100% !important; }
  #dc-root section [style*="display:flex"] > div,
  #dc-root section [style*="display: flex"] > div { min-width: 0; }
  #dc-root section a { overflow-wrap: anywhere; }
  #dc-root [data-screen-label="Class List"] span { white-space: normal !important; }
  #dc-root header > div:first-child { width: calc(100% - 28px) !important; gap: 6px !important; }
  #dc-root header > div:first-child > a:first-child { gap: 7px !important; flex-shrink: 0; }
  #dc-root header > div:first-child > a:first-child svg { width: 30px; }
  #dc-root header > div:first-child > a:last-of-type {
    font-size: 12px !important; letter-spacing: .04em !important;
    padding: 12px 10px !important; flex-shrink: 0;
  }
  .hmb { flex: 0 0 44px; margin-right: 0 !important; }
  .hmp { max-height: calc(100dvh - 130px); overflow-y: auto; overscroll-behavior: contain; }
  input, textarea, select { font-size: 16px !important; max-width: 100%; box-sizing: border-box; }
  #dc-root textarea { min-height: 112px !important; resize: vertical; }
  #dc-root footer input { width: min(100%, 320px) !important; }
  #dc-root footer nav a { padding: 6px 0; }
  body:has(.hmp.on) #hanu-founders-reopen,
  body:has(.hfw-overlay) #hanu-founders-reopen { visibility: hidden; }
  #dc-root [style*="white-space: nowrap"][style*="position: fixed"],
  #dc-root [style*="white-space:nowrap"][style*="position:fixed"] { white-space: normal !important; }
  html { scroll-padding-top: 86px; }
}
@media (max-width: 360px) {
  #dc-root header > div:first-child > a:first-child svg { width: 24px; }
  #dc-root header > div:first-child > a:first-child > span > span:first-child { letter-spacing: .18em !important; }
  #dc-root header > div:first-child > a:first-child > span > span:last-child { font-size: 8px !important; letter-spacing: .16em !important; }
}
