/* Compact navigation and touch targets for the owner interface. */
@media (max-width: 760px) {
  .shell {
    width: min(100% - 24px, 1180px);
    padding-top: max(12px, env(safe-area-inset-top));
    padding-bottom: max(32px, env(safe-area-inset-bottom));
  }
  .topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
  }
  .topbar h1 { font-size: clamp(1.18rem, 5vw, 1.5rem); }
  .account-name, .account-chevron { display: none; }
  .account-button { padding: 2px; border: 0; }
  .account-avatar { width: 34px; height: 34px; }
  .account-menu { min-width: 184px; }
  .viewer-head-actions { gap: 4px; }
  #viewerDownloadButton { min-height: 44px; padding: 6px 9px; font-size: .74rem; }
  .viewer-download-menu a { min-height: 44px; display: flex; align-items: center; }
  .usage-label { display: none; }
  .album-manage-toggle { display: none !important; }
  .album-manage-panel { margin-top: 6px; }

  .auth-layout { grid-template-columns: minmax(0, 1fr); min-width: 0; gap: 24px; }
  .hero, .auth-card { width: 100%; min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
  .auth-card { order: -1; grid-template-columns: minmax(0, 1fr); padding: 22px; gap: 12px; }
  .hero p, .auth-card p { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
  .auth-card h2 { font-size: clamp(1.35rem, 5.5vw, 1.65rem); }
  .auth-mark { width: 48px; height: 48px; margin-bottom: 0; }
  .auth-help { padding-top: 12px; }
  .hero h2 { font-size: clamp(1.7rem, 7vw, 2.4rem); }
  .hero p:last-child { font-size: .95rem; }
  .auth-features { margin-top: 12px; }

  #uploadDialog, #shareDialog, #shareManagerDialog {
    width: calc(100% - 20px);
    max-width: 560px;
    max-height: calc(100dvh - 20px);
    overflow: hidden;
  }
  #uploadDialog .dialog-body,
  #shareDialog .dialog-body,
  #shareManagerDialog .dialog-body {
    max-height: calc(100dvh - 22px);
    overflow-y: auto;
    padding: 20px;
    gap: 14px;
  }
  #uploadDialog input,
  #uploadDialog select,
  #shareDialog select,
  #shareDialog button,
  #shareManagerDialog button { min-height: 44px; }
  .dialog-head h2 { font-size: 1.2rem; }
  .dialog-head .icon-button { min-width: 44px; min-height: 44px; }

  .timeline { min-width: 0; min-height: 44px; }
  .timeline-row { min-width: 0; }
  .viewer-head > div { min-width: 0; }
  .viewer-head h2, .viewer-head p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

@media (max-width: 380px) {
  .topbar .eyebrow { font-size: .65rem; }
  .album-row .nav-button { max-width: 125px; }
  .library-head-actions button { padding-inline: 8px; }
}

@media (pointer: coarse) {
  button, select, input[type="search"] { min-height: 44px; }
}

:where(button, input, select, a, .asset-card):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 760px) {
  body.selection-mode .shell { padding-bottom: 150px; }
  .batch-bar {
    left: 8px;
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    transform: none;
    padding: 6px 6px 6px 10px;
    justify-content: space-between;
    gap: 4px;
  }
  .batch-count { font-size: .74rem; padding-right: 4px; }
  .batch-actions { gap: 0; margin-left: auto; }
  .batch-bar button { padding: 5px 7px; font-size: .7rem; }
  .batch-bar .batch-cancel { padding: 6px; }
  .toast { left: 8px; right: 8px; bottom: max(76px, calc(env(safe-area-inset-bottom) + 68px)); transform: none; max-width: none; }
  #albumPickerDialog, #confirmDialog { width: calc(100% - 20px); max-height: calc(100dvh - 20px); }
  #albumPickerDialog .dialog-body, #confirmDialog .dialog-body { padding: 20px; max-height: calc(100dvh - 22px); overflow-y: auto; }
  #albumPickerDialog button, #confirmDialog button { min-height: 44px; }
}
@media (max-width: 760px) {
  .viewer-head .viewer-head-actions { min-width: auto; flex: 0 0 auto; }
  #viewerDownloadButton { flex: 0 0 auto; min-width: 52px; white-space: nowrap; }
}
