:root { --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px); }
html, body { overscroll-behavior-y: none; }
body { padding-top: var(--safe-top); padding-bottom: var(--safe-bottom); }
.pwa-backup-reminder { position: fixed; z-index: 99999; left: 12px; right: 12px; bottom: calc(12px + var(--safe-bottom)); background: #fff7d6; color: #5c4300; border: 1px solid #e0b429; border-radius: 14px; box-shadow: 0 8px 30px rgba(0,0,0,.18); padding: 14px; font-family: -apple-system,BlinkMacSystemFont,"Noto Sans TC",sans-serif; }
.pwa-backup-reminder strong { display:block; font-size:16px; margin-bottom:4px; }
.pwa-backup-reminder p { margin:0 0 12px; font-size:14px; line-height:1.45; }
.pwa-backup-actions { display:flex; gap:8px; flex-wrap:wrap; }
.pwa-backup-actions button { min-height:42px; border-radius:10px; padding:8px 14px; font-size:15px; font-weight:600; border:1px solid #9b7a00; background:white; color:#5c4300; }
.pwa-backup-actions button:first-child { background:#16324f; color:white; border-color:#16324f; }
.pwa-offline-badge { position:fixed; z-index:99998; top:calc(8px + var(--safe-top)); left:50%; transform:translateX(-50%); background:#6b1d1d; color:#fff; padding:7px 12px; border-radius:999px; font-size:13px; font-weight:600; box-shadow:0 4px 14px rgba(0,0,0,.22); }
@media (max-width: 680px) {
  .header { position: sticky; top:0; z-index:20; padding-top:10px !important; }
  .header-actions { width:100%; gap:8px; }
  .header-actions .btn { flex:1; justify-content:center; min-height:46px; }
  .toolbar { position: sticky; top:106px; z-index:15; background:var(--color-bg, #f5f7fa); }
  .search-box input { font-size:16px !important; }
  input, textarea, select { font-size:16px !important; }
}
