/* ---------- Bottom tab bar (tablet/phone) ---------- */
.tabbar { display: none; }

/* ---------- Modal + toast ---------- */
.overlay { position: fixed; inset: 0; background: rgba(15, 20, 30, 0.45); z-index: 60; display: grid; place-items: center; padding: 16px; }
.modal { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); width: min(520px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; }
.modal header { padding: 18px 20px 6px; }
.modal header h2 { margin: 0; font-size: 17px; }
.modal header p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.modal .body { padding: 12px 20px; display: grid; gap: 12px; }
.modal footer { padding: 12px 20px 18px; display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; z-index: 70; display: flex; flex-direction: column; gap: 8px; width: min(560px, calc(100vw - 32px)); pointer-events: none; }
.toast-item { pointer-events: auto; background: var(--ink); color: var(--surface); padding: 10px 12px 10px 16px; border-radius: 10px; font-size: 13px; font-weight: 500; box-shadow: var(--shadow-lg); }
.toast-item.error { background: var(--bad); color: #fff; }
.toast-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.toast-msg { overflow-wrap: anywhere; }
.toast-actions { display: flex; gap: 4px; flex-shrink: 0; }
.toast-btn { font: inherit; font-size: 12px; font-weight: 600; color: inherit; background: transparent; border: 1px solid currentColor; border-radius: 6px; padding: 2px 8px; cursor: pointer; opacity: 0.9; }
.toast-btn:hover { opacity: 1; }
.toast-x { border-color: transparent; }
.toast-details { margin-top: 8px; display: grid; gap: 6px; justify-items: start; }
.toast-details pre { margin: 0; max-height: 180px; overflow: auto; width: 100%; font-family: var(--mono); font-size: 11px; font-weight: 400; white-space: pre-wrap; overflow-wrap: anywhere; background: rgba(0, 0, 0, 0.18); border-radius: 6px; padding: 6px 8px; }
.feedback-bars { display: grid; }
.feedback-bar { padding: 8px 20px; font-size: 13px; font-weight: 600; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; border-bottom: 1px solid var(--rule); background: var(--warn-soft); color: var(--warn); }
.feedback-bar.bad { background: var(--bad-soft); color: var(--bad); }
.feedback-bar.info { background: var(--surface-2); color: var(--muted); font-weight: 500; }
.btn.is-pending, button.is-pending { cursor: progress; position: relative; }
.btn.is-pending::after, button.is-pending::after { content: ""; display: inline-block; width: 0.9em; height: 0.9em; margin-left: 6px; vertical-align: -0.1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: sync-spin 0.8s linear infinite; }
@media (prefers-reduced-motion: reduce) { .btn.is-pending::after, button.is-pending::after { animation: none; opacity: 0.5; } }
.skeleton { height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2), var(--rule), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { 0% { background-position: 100% 0 } 100% { background-position: -100% 0 } }
.kbd { font-family: var(--mono); font-size: 11px; border: 1px solid var(--rule-strong); border-bottom-width: 2px; border-radius: 4px; padding: 0 4px; color: var(--muted); }
.hint-line { margin-top: 10px; }
.test-hidden-hint { margin: 0 0 10px; }
.test-hidden-hint .btn { padding: 0 4px; min-height: 0; font-size: inherit; vertical-align: baseline; }
/* Skeleton placeholders (core-cache.js skeletonHtml): fixed row heights so real data lands without a jump. */
.skel .skel-panel { min-height: 96px; }
.skel-row { margin: 10px 0; }
.skel-row:first-child { margin-top: 2px; }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }
