/* Responsive layout contract. Kept separate so mobile fixes remain reviewable. */
.mobile-nav { display: none; }
.note-meta { display: flex; align-items: center; gap: 8px; }
.note-meta span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.note-actions { display: flex; align-items: center; gap: 14px; margin-top: -10px; }
.note-actions a,
.note-actions button { padding: 0; border: 0; background: none; color: var(--cyan); font: 700 11px Inter, sans-serif; text-decoration: none; cursor: pointer; }
.note-actions button { color: var(--red); }
.note-actions form { margin: 0; }
.back-link { display: inline-block; margin-bottom: 28px; color: var(--cyan); text-decoration: none; font-size: 13px; font-weight: 700; }
.note-edit-shell .panel { margin-top: 24px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; }

@media (max-width: 760px) {
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .topbar { height: 62px; padding: 0 18px; position: sticky; }
  .desktop-nav { display: none !important; }
  .brand-mark { width: 38px; height: 38px; }
  .brand b { display: block; font-size: 10px; }
  .brand strong { font-size: 19px; }

  .page { width: 100%; padding: 24px 16px 40px; }
  .auth-page { width: 100%; padding: 24px 0; overflow-x: hidden; }
  .auth-card { width: calc(100vw - 32px); max-width: 440px; min-width: 0; padding: 24px 20px; }
  .auth-card > p { overflow-wrap: anywhere; }
  .home-hero { padding: 8px 0 20px; }
  .home-hero h1 { font-size: clamp(50px, 15vw, 64px); }
  .quick-note { margin-top: 22px; padding: 20px; border-radius: 16px; }
  .quick-note .button { width: 100%; min-height: 48px; }
  .home-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
  .home-grid > .panel { margin: 0; padding: 22px 20px; }
  .panel { border-radius: 16px; }
  .section-heading { align-items: flex-start; }
  .note-edit-shell h1 { font-size: 52px; }
  .note-edit-shell .panel { padding: 20px; }
  .form-actions .button { flex: 1; padding: 0 10px; }

  .mobile-nav {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    position: fixed;
    z-index: 100;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(72px + env(safe-area-inset-bottom));
    padding: 6px 8px env(safe-area-inset-bottom);
    gap: 0;
    border-top: 1px solid #29415d;
    background: rgba(8, 21, 34, .98);
    box-shadow: 0 -12px 32px rgba(0, 0, 0, .28);
    backdrop-filter: blur(18px);
  }
  .mobile-nav a {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
  }
  .mobile-nav svg { width: 23px; height: 23px; fill: currentColor; }
  .mobile-nav a.active { color: var(--lime); }
}

@media (min-width: 761px) {
  .desktop-nav { display: flex; }
  .mobile-nav { display: none !important; }
}
