:root {
  --motion-fast: 140ms;
  --motion-normal: 240ms;
  --motion-spring: cubic-bezier(.2,.85,.25,1);
  --feedback-green: #246b5f;
  --feedback-red: #b83b36;
}
html { overscroll-behavior-y: contain; }
button { transition: background-color var(--motion-fast), color var(--motion-fast), box-shadow var(--motion-fast), transform var(--motion-fast); }
button:active:not(:disabled) { transform: scale(.96); }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 3px; }
.feedback-icon { display: inline-block; width: 20px; height: 20px; flex: 0 0 20px; background: currentColor; mask: var(--feedback-icon) center / contain no-repeat; }
.icon-refresh-cw { --feedback-icon: url('./icons/refresh-cw.svg'); }
.icon-trash-2 { --feedback-icon: url('./icons/trash-2.svg'); }
.icon-check { --feedback-icon: url('./icons/check.svg'); }
.icon-x { --feedback-icon: url('./icons/x.svg'); }
.icon-alert-circle { --feedback-icon: url('./icons/circle-alert.svg'); }
.refresh-button { width: 40px; height: 44px; padding: 10px; display: inline-grid; place-items: center; border: 0; border-radius: 4px; color: var(--text-secondary); background: transparent; cursor: pointer; }
.refresh-button:hover { background: var(--bg-hover); color: var(--feedback-green); }
.refresh-button[aria-busy='true'] .feedback-icon { animation: feedback-spin 850ms linear infinite; }
.prompt-export-button[aria-busy='true'] .feedback-icon { mask-image: url('./icons/refresh-cw.svg'); }
.menu-button, .prompt-export-button { width: 44px; height: 44px; min-width: 44px; flex: 0 0 44px; }
.app-menu { width: min(300px, calc(100vw - 24px)); padding: 8px; gap: 4px; max-height: calc(100dvh - 96px); overflow-y: auto; overscroll-behavior: contain; }
.app-menu.is-hidden { display: none; }
.app-menu .view-tab { display: flex; align-items: center; min-height: 56px; width: 100%; padding: 14px 16px; font-size: 16px; line-height: 1.5; border-radius: 4px; white-space: normal; }
.app-menu .view-tab.is-active { background: #edf5f1; color: #205a4f; font-weight: 650; }
.app-menu .auth-menu-item { margin-top: 4px; border-top: 1px solid #dfe4e0; border-radius: 0; }
.top-quick-add { min-width: 0; }
.view.is-active { animation: feedback-view-in 220ms var(--motion-spring); }
.app-menu:not(.is-hidden) { transform-origin: top right; animation: feedback-menu-in 160ms var(--motion-spring); }
dialog[open] { animation: feedback-dialog-in 260ms var(--motion-spring); }
dialog[open]::backdrop { animation: feedback-fade-in 180ms ease-out; }
.filter-button { transition: color var(--motion-fast), background-color var(--motion-fast), box-shadow var(--motion-fast), transform var(--motion-fast); }
.filter-button.is-active { box-shadow: inset 0 -2px var(--feedback-green); }
.pull-refresh-indicator { position: fixed; z-index: 45; top: 72px; left: 50%; display: inline-flex; align-items: center; gap: 9px; max-width: calc(100vw - 32px); padding: 10px 16px; border: 1px solid #d0ded7; border-radius: 6px; background: #fff; color: var(--feedback-green); box-shadow: 0 4px 14px rgb(20 50 40 / .12); transform: translate(-50%, calc(var(--pull-distance, 0px) - 24px)); pointer-events: none; }
.pull-refresh-indicator[hidden] { display: none; }
.pull-refresh-indicator .feedback-icon { transform: rotate(var(--pull-angle, 0deg)); }
.pull-refresh-indicator.is-ready { background: #eef7f2; }
.pull-refresh-indicator.is-refreshing .feedback-icon { animation: feedback-spin 850ms linear infinite; }
body.topbar-desktop-bottom .pull-refresh-indicator { top: 12px; }
.skeleton-list { width: 100%; min-height: 250px; }
.skeleton-row { display: grid; gap: 12px; padding: 18px 12px; min-height: 84px; border-bottom: 1px solid #e5e7e5; }
.skeleton-meta { display: flex; gap: 8px; }
.skeleton-line { position: relative; overflow: hidden; display: block; border-radius: 3px; height: 13px; background: #e9edea; }
.skeleton-line::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent, rgb(255 255 255 / .8), transparent); transform: translateX(-100%); animation: feedback-shimmer 1500ms linear infinite; }
.skeleton-title { width: var(--skeleton-width, 60%); height: 16px; }
.skeleton-tag { width: 64px; height: 12px; }
.splash-screen { display: block; padding: max(24px, env(safe-area-inset-top)) 20px; }
.splash-screen.is-hidden { display: none; }
.splash-preview { width: 100%; max-width: 1000px; margin: auto; }
.splash-heading { display: flex; align-items: center; gap: 16px; padding: 12px 0 30px; }
.splash-heading img { width: 40px; height: 40px; }
.splash-heading .skeleton-line { flex: 1; max-width: 320px; height: 28px; }
.swipe-row { position: relative; min-width: 0; overflow: clip; background: #fff; }
.swipe-row > .task-card { position: relative; z-index: 1; background-color: var(--bg-primary); transition: transform 260ms var(--motion-spring), background-color var(--motion-fast); }
.swipe-row > .task-card:hover { background-color: var(--bg-hover); }
.swipe-row.is-swiping > .task-card { transition: none; will-change: transform; }
.swipe-row.is-swipe-open > .task-card { transform: translateX(-88px); }
.swipe-delete-action { position: absolute; inset: 0 0 1px auto; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; width: 88px; min-height: 44px; padding: 8px; border: 0; border-radius: 0; color: #fff; background: var(--feedback-red); font-size: 13px; cursor: pointer; }
.swipe-delete-action:disabled { visibility: hidden; }
.swipe-delete-action:hover { background: #952e2b; }
.swipe-delete-action:focus-visible { outline-offset: -4px; outline-color: white; }
.toast { display: flex; align-items: center; gap: 10px; max-width: min(520px, calc(100vw - 32px)); bottom: max(20px, env(safe-area-inset-bottom)); background: #243c33; padding: 10px 10px 10px 14px; animation: feedback-toast-in 240ms var(--motion-spring); }
.toast.is-hidden { display: none; }
.toast[data-tone='error'] { background: #772f2d; }
.toast[data-tone='info'] > .feedback-icon { animation: feedback-spin 1000ms linear infinite; }
.toast-message { min-width: 0; overflow-wrap: anywhere; }
.toast-action, .toast-dismiss { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 6px 10px; color: white; border: 1px solid rgb(255 255 255 / .35); border-radius: 4px; background: transparent; cursor: pointer; }
.toast-dismiss { width: 36px; padding: 7px; border: 0; }
.toast-action:hover, .toast-dismiss:hover { background: rgb(255 255 255 / .13); }
body.topbar-desktop-bottom .toast { bottom: calc(100px + env(safe-area-inset-bottom)); }
[aria-busy='true'].task-list, [aria-busy='true'].candidate-batch-list { cursor: progress; }
@keyframes feedback-spin { to { transform: rotate(360deg); } }
@keyframes feedback-shimmer { to { transform: translateX(100%); } }
@keyframes feedback-view-in { from { opacity: .65; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes feedback-menu-in { from { opacity: 0; transform: translateY(-4px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes feedback-dialog-in { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes feedback-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes feedback-toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (max-width: 560px) {
  .refresh-button { width: 36px; padding: 8px; }
  .prompt-export-button { width: 44px; }
  .topbar { gap: 4px; }
  .top-quick-add { flex: 1 1 0%; }
  .toast { left: 16px; right: 16px; font-size: 13px; gap: 7px; }
  .toast > .feedback-icon { display: none; }
  .toast-action { padding: 6px 8px; }
  .toast-dismiss { width: 30px; padding: 5px; }
  .pull-refresh-indicator { top: 65px; }
  body.topbar-desktop-bottom:not(.topbar-mobile-bottom) .pull-refresh-indicator { top: 65px; }
  body.topbar-desktop-bottom:not(.topbar-mobile-bottom) .toast { bottom: max(20px, env(safe-area-inset-bottom)); }
  body.topbar-mobile-bottom .pull-refresh-indicator { top: 12px; }
  body.topbar-mobile-bottom .toast { bottom: calc(100px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .skeleton-line::after { display: none; }
}
