/* Tempo web app: layout telefono */
html.pwa, html.pwa body { height: 100dvh; }
html.pwa body { -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
@media (max-width: 720px) {
  html.pwa .app {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr auto;
    grid-template-areas: "top" "main" "nav";
    height: 100dvh;
  }
  html.pwa .topbar { grid-area: top; padding: calc(env(safe-area-inset-top) + 6px) 14px 6px 16px; height: auto; }
  html.pwa main { grid-area: main; overflow: auto; padding: 0 12px 12px; min-height: 0; }
  html.pwa .sidebar {
    grid-area: nav; display: flex; flex-direction: row; gap: 4px; overflow-x: auto; overflow-y: hidden;
    padding: 8px 10px calc(env(safe-area-inset-bottom) + 8px); border-top: 1px solid var(--line);
    background: rgba(10, 10, 11, 0.92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    scrollbar-width: none;
  }
  html.pwa .sidebar::-webkit-scrollbar { display: none; }
  html.pwa .side-label, html.pwa .side-input, html.pwa .side-item .del, html.pwa .side-item .live { display: none !important; }
  html.pwa .side-item {
    flex: 0 0 auto; flex-direction: column; justify-content: center; gap: 3px; width: 66px; height: 52px; padding: 0 2px;
    border-radius: 14px; position: relative;
  }
  html.pwa .side-item .lbl { display: block !important; font-size: 10px; line-height: 1.1; max-width: 62px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  html.pwa .side-item .cnt { display: block !important; position: absolute; top: 3px; right: 8px; margin: 0; font-size: 9px; min-width: 15px; height: 15px; line-height: 15px; padding: 0 4px; }
  html.pwa .side-item svg, html.pwa .side-item .ldot { flex: 0 0 auto; }
  html.pwa .brand-sub { display: none; }
  html.pwa .timer-view, html.pwa .cal-view { grid-template-columns: 1fr !important; }
  html.pwa .timer-view .side, html.pwa .cal-view .day-panel { display: none; }
  html.pwa .view-head .muted { display: none; }
  html.pwa .kpis, html.pwa .mini-kpis { grid-template-columns: 1fr 1fr !important; }
  html.pwa .board { gap: 10px; scroll-snap-type: x mandatory; }
  html.pwa .bcol { flex: 0 0 82vw !important; width: 82vw !important; scroll-snap-align: start; }
  html.pwa .ring { width: min(72vw, 300px) !important; height: min(72vw, 300px) !important; }
  html.pwa .time { font-size: min(16vw, 64px) !important; }
  html.pwa .sheet-card { width: calc(100vw - 20px); max-height: calc(100dvh - 40px); padding: 16px 14px 18px; }
  html.pwa .sheet { position: fixed; }
  html.pwa .view { min-width: 0; max-width: 100%; }
  html.pwa .list-view, html.pwa .stats-view, html.pwa .board-view { grid-template-columns: minmax(0, 1fr); }
  html.pwa input, html.pwa textarea, html.pwa select { font-size: 16px; }
}
.scan { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.85); display: grid; place-items: center; padding: 20px; }
.scan-card { position: relative; width: min(420px, 100%); text-align: center; color: var(--muted); font-size: 13px; }
.scan-card video { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 22px; background: #000; }
.scan-frame { position: absolute; top: 12%; left: 12%; width: 76%; aspect-ratio: 1; border: 2px solid rgba(255,255,255,.85); border-radius: 18px; box-shadow: 0 0 0 999px rgba(0,0,0,.25); pointer-events: none; }
.scan-card p { margin: 14px 0 12px; }
