/* ============================================================================
   MOBILE — APP-LIKE EXPERIENCE (max-width: 860px)
   Bottom navigation bar, floating upload button, bottom sheets, touch-first.
   ========================================================================== */

/* ---------------- bottom navigation (app-like) ---------------- */
.mobile-tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 95;
  display: flex; align-items: stretch; justify-content: space-around;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  box-shadow: 0 -10px 30px rgba(14,116,144,.1);
}
.mobile-tabbar button {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 4px; border-radius: 12px; font-size: 10px; font-weight: 700;
  color: var(--muted); transition: .2s; position: relative;
}
.mobile-tabbar button .t-ic { font-size: 20px; line-height: 1; }
.mobile-tabbar button.active { color: var(--brand); }
.mobile-tabbar button.active .t-ic { transform: translateY(-1px) scale(1.1); }
.mobile-tabbar button .t-badge {
  position: absolute; top: 3px; right: calc(50% - 22px); min-width: 16px; height: 16px;
  background: var(--grad-danger); color: #fff; border-radius: 99px; font-size: 9.5px;
  display: grid; place-items: center; padding: 0 4px;
}

/* ---------------- floating upload button ---------------- */
.fab {
  position: fixed; z-index: 94; right: 18px; bottom: calc(78px + env(safe-area-inset-bottom));
  width: 58px; height: 58px; border-radius: 50%; background: var(--grad-main); color: #fff;
  font-size: 24px; display: grid; place-items: center;
  box-shadow: 0 12px 30px rgba(14,165,233,.45);
  transition: .25s cubic-bezier(.2,.9,.3,1.3);
}
.fab:active { transform: scale(.88); }
.fab:hover { transform: translateY(-3px); }
.fab.show-upload { transform: rotate(45deg); }
.fab.show-upload:hover { transform: rotate(45deg) translateY(-3px); }
.fab-menu {
  position: fixed; z-index: 94; right: 18px; bottom: calc(146px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 10px; align-items: flex-end;
  opacity: 0; pointer-events: none; transform: translateY(14px); transition: .25s cubic-bezier(.2,.9,.3,1.2);
}
.fab-menu.open { opacity: 1; pointer-events: auto; transform: none; }
.fab-item {
  display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 11px 16px; font-size: 13.5px; font-weight: 700; color: var(--ink);
  box-shadow: var(--shadow); transition: .18s;
}
.fab-item:active { transform: scale(.96); }
.fab-item .fi-ic { font-size: 19px; }

/* ---------------- bottom sheet ---------------- */
.sheet {
  position: fixed; z-index: 210; left: 0; right: 0; bottom: 0;
  background: var(--card); border-radius: 24px 24px 0 0; padding: 12px 18px calc(20px + env(safe-area-inset-bottom));
  box-shadow: 0 -20px 60px rgba(0,0,0,.3);
  transform: translateY(110%); transition: transform .32s cubic-bezier(.2,.9,.3,1.1);
  max-height: 82vh; overflow-y: auto;
}
.sheet.show { transform: none; }
.sheet .sheet-grip {
  width: 44px; height: 5px; border-radius: 99px; background: var(--line-2); margin: 2px auto 14px;
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.sheet-head h3 { font-size: 17px; font-weight: 900; }
.sheet-actions { display: flex; flex-direction: column; gap: 4px; }
.sheet-action {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 13px 12px; border-radius: 13px;
  font-size: 14.5px; font-weight: 600; color: var(--ink-2); transition: .15s; text-align: left;
}
.sheet-action:active { background: var(--grad-soft); }
.sheet-action .sa-ic { width: 38px; height: 38px; border-radius: 11px; background: var(--grad-soft); display: grid; place-items: center; font-size: 17px; }
.sheet-action.danger { color: var(--danger); }
.sheet-action.danger .sa-ic { background: rgba(220,38,38,.1); }

/* ---------------- drive on mobile ---------------- */
.drive { padding-bottom: 120px; }
.file-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 11px; }
.file-card { padding: 13px 12px; }
.file-card .fc-ic { font-size: 30px; }
.file-card .fc-menu, .file-card .fc-star { opacity: 1; }
.file-card .fc-star { font-size: 18px; }
.drive-head { gap: 10px; }
.drive-head h2 { font-size: 19px; }
.toolbar { padding: 9px; gap: 8px; }
.search-box { min-width: 0; }
.list-row { padding: 12px; }
.list-row .lr-meta { display: none; }
.select-bar { padding: 9px 11px; }
.select-bar .btn { padding: 8px 11px; font-size: 11.5px; }

/* ---------------- modal becomes sheet ---------------- */
.modal {
  left: 0; right: 0; top: auto; bottom: 0; width: 100%; max-height: 90vh;
  transform: translateY(110%); border-radius: 22px 22px 0 0; transition: transform .32s cubic-bezier(.2,.9,.3,1.1);
}
.modal.show { transform: none; }
.modal-backdrop.show { opacity: 1; }

/* ---------------- uploads ---------------- */
.upload-panel { left: 10px; right: 10px; bottom: calc(84px + env(safe-area-inset-bottom)); width: auto; }
.up-list { max-height: 34vh; }

/* ---------------- misc ---------------- */
.storage-card.mobile-storage { display: block; margin-bottom: 14px; }
.navbar { padding-top: env(safe-area-inset-top); }
.hero-metrics { gap: 22px; }
.toast-stack { bottom: calc(84px + env(safe-area-inset-bottom)); }
.footer { padding-bottom: 110px; }
.auth-wrap { padding-top: 36px; }
