/* Phone and small tablet layout; loaded after the main and about stylesheets. */
@media screen and (max-width: 760px) {
  body { min-height: 100svh; -webkit-text-size-adjust: 100%; }
  .logo { width: 148px; margin: 16px 20px; }
  main { padding: 20px 12px 32px; }
  .inhalt, .contact { padding: 22px 16px; border-radius: 8px; }
  h1 { font-size: 26px; }
  input, select, textarea, button { font-size: 16px; }
  .contact-form input, .contact-form select, .contact-form textarea { font-size: 16px; max-width: 100%; }
  .contact-form input:not([type="hidden"]):not([type="checkbox"]), .contact-form select { min-height: 48px; }
  .contact-form input[type="file"] { padding: 10px; overflow: hidden; }
  .contact-form input::file-selector-button { min-height: 36px; max-width: 100%; margin-right: 8px; }
  .contact-form button { width: 100%; min-height: 48px; white-space: normal; }
  .contact-form > a { padding-block: 10px; }
  header > nav { padding: 8px 12px; }
  header > nav > ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  header > nav > ul > li { min-width: 0; padding: 4px; border: 1px solid var(--border); border-radius: 6px; }
  header > nav > ul > li > a { padding: 8px; font-size: 15px; }
  header > nav > ul > li > a::after { display: none; }
  header > nav li ul, header > nav > ul > li:last-child ul {
    display: block; position: static; width: 100%; min-width: 0; max-width: none;
    margin: 0; padding: 2px; background: #f5f8fb; box-shadow: none;
  }
  header > nav li ul a, .nav-logout button { min-height: 44px; padding: 10px 8px; font-size: 14px; }
  .customer-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .customer-sidebar { position: static; padding: 8px; border-radius: 8px; }
  .customer-nav > ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .customer-nav > ul > li > a { min-height: 44px; padding: 10px; }
  .customer-heading { align-items: flex-start; gap: 12px; }
  .customer-actions { max-width: 100%; }
  .customer-actions summary { min-height: 44px; padding: 8px 12px; }
  .customer-actions ul { max-width: calc(100vw - 56px); }
  .customer-actions a { min-height: 44px; }
  .customer-action-content { padding: 14px 10px; margin-top: 20px; }
  .customer-details dd { overflow-wrap: anywhere; }
  .billing-document-list a { margin-left: 0; min-height: 44px; display: inline-flex; align-items: center; }
  .billing-document-date { width: 100%; }
  .customer-pagination { gap: 6px; }
  .customer-pagination a, .customer-pagination span { min-height: 44px; min-width: 44px; text-align: center; padding: 8px 10px; }
  .time-filter { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .time-cost-summary { padding: 12px; }
  .time-cost-summary strong { width: 100%; overflow-wrap: anywhere; }
  .time-entry-panel { padding: 12px; }
  .time-entry-panel summary { min-height: 44px; }
  .time-year-group > .time-month-groups { padding: 8px; }
  .time-month-group > .time-records-table-wrap { padding: 4px; }
  .time-group > summary { min-height: 48px; padding: 12px 10px; gap: 8px; }
  .time-records-table { table-layout: fixed; }
  .time-records-table th, .time-records-table td { padding: 10px 6px; font-size: 14px; }
  .time-records-table th:first-child { width: 88px; }
  .time-records-table th:last-child { width: 64px; }
  .time-inline-edit > summary { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; padding: 12px 8px; font-size: 14px; }
  .time-inline-edit > summary span:first-child { grid-column: 1; grid-row: 1; }
  .time-inline-edit > summary span:nth-child(2) { grid-column: 1 / -1; grid-row: 2; color: var(--muted); overflow-wrap: anywhere; }
  .time-inline-edit > summary span:last-child { grid-column: 2; grid-row: 1; white-space: nowrap; }
  .time-inline-edit .contact-form { padding: 0 8px 16px; }
  .time-inline-edit .contact-form input, .time-inline-edit .contact-form select { padding-inline: 8px; }
  .contact-errors, .contact-success { padding: 12px; }
  .legal-jump { padding: 12px; gap: 8px 16px; }
  .legal-jump a { padding-block: 6px; }
  .about-page .hero { padding: 28px 20px; }
  .about-page .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .about-page .portrait-frame { max-width: 280px; }
  footer { padding: 20px 16px max(20px, env(safe-area-inset-bottom)); }
}
@media screen and (max-width: 360px) {
  header > nav > ul, .customer-nav > ul { grid-template-columns: minmax(0, 1fr); }
  .customer-heading { flex-direction: column; }
  .customer-actions { margin-left: 0; }
  .customer-actions ul { left: 0; right: auto; }
}
