/* Flow Booth — shared press / busy / progress / buffering styles (pairs with js/busy.js). */
button, [role="button"], a.btn, a.button, input[type="submit"], input[type="button"] {
  transition: transform .08s ease, filter .12s ease, box-shadow .12s ease, opacity .15s ease;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
button:not(:disabled):active, [role="button"]:active, a.btn:active, a.button:active,
input[type="submit"]:not(:disabled):active, input[type="button"]:not(:disabled):active,
.fb-pressed:not(:disabled) { transform: scale(.96); filter: brightness(1.18); box-shadow: inset 0 0 0 999px rgba(255,255,255,.06); }
button:disabled { cursor: not-allowed; }
/* busy: locked + spinner, keeps its width so nothing jumps */
.fb-rel { position: relative; }
.fb-busy { pointer-events: none; cursor: progress !important; opacity: .92; }
.fb-busy > * { visibility: hidden; }
.fb-busy::after, .fb-loading::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 1.05em; height: 1.05em; margin: -.525em 0 0 -.525em;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: fb-spin .7s linear infinite;
}
.fb-busy { color: inherit; }
.fb-busy:not(:has(> *)), .fb-loading:not(:has(> *)) { color: transparent !important; }
/* text-only buttons: a ring that reads on gold and on dark buttons */
.fb-busy:not(:has(> *))::after, .fb-loading:not(:has(> *))::after { border-color: rgba(0,0,0,.35); border-top-color: #fff; }
.fb-loading::after { width: .9em; height: .9em; margin: -.45em 0 0 -.45em; }
@keyframes fb-spin { to { transform: rotate(360deg); } }
.fb-spin { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--gold, #f7b500); border-right-color: transparent; border-radius: 50%; animation: fb-spin .7s linear infinite; flex: none; }
.fb-spin.lg { width: 34px; height: 34px; border-width: 3px; }
/* transfers panel */
.fb-xfer { position: fixed; z-index: 2147483000; left: 50%; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom, 0px) + var(--fb-dock-h, 0px)); width: min(420px, calc(100vw - 20px)); display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.fb-task { pointer-events: auto; background: rgba(14,14,14,.96); color: #eee; border: 1px solid rgba(247,181,0,.45); border-radius: 12px; padding: 10px 12px; box-shadow: 0 10px 30px rgba(0,0,0,.45); font: 13px/1.35 system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }
.fb-task-h { display: flex; align-items: center; gap: 8px; }
.fb-task-l { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.fb-task-p { font-variant-numeric: tabular-nums; color: var(--gold, #f7b500); font-weight: 800; }
.fb-bar { height: 6px; margin-top: 8px; border-radius: 99px; background: rgba(255,255,255,.12); overflow: hidden; }
.fb-bar i { display: block; height: 100%; width: 0; background: var(--gold, #f7b500); border-radius: inherit; transition: width .2s ease; }
.fb-task.indet .fb-bar i { width: 35% !important; animation: fb-indet 1.1s ease-in-out infinite; }
@keyframes fb-indet { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }
.fb-task-m { margin-top: 6px; color: #bbb; min-height: 1em; }
.fb-task.ok { border-color: rgba(70,200,120,.6); } .fb-task.ok .fb-spin { animation: none; border-color: #46c878; }
.fb-task.err { border-color: #e01016; } .fb-task.err .fb-spin { animation: none; border-color: #e01016; } .fb-task.err .fb-task-m { color: #ffb4b4; } .fb-task.err .fb-bar i { background: #e01016; }
.fb-task-acts { display: flex; gap: 8px; margin-top: 8px; }
.fb-task-acts button { appearance: none; border: 1px solid rgba(255,255,255,.25); background: transparent; color: #eee; border-radius: 999px; padding: 6px 14px; font: inherit; font-weight: 700; cursor: pointer; min-height: 34px; }
.fb-task-acts .fb-task-retry { background: var(--gold, #f7b500); border-color: var(--gold, #f7b500); color: #111; }
/* inline task (inside a tool card) */
.fb-inline .fb-task { box-shadow: none; background: rgba(255,255,255,.04); margin: 10px 0; }
/* media buffering */
.fb-buffering { position: fixed; z-index: 2147482000; transform: translate(-50%, -50%); width: 54px; height: 54px; border-radius: 50%; background: rgba(0,0,0,.55); display: grid; place-items: center; pointer-events: none; }
.fb-buffering[hidden] { display: none; }
.fb-buffer-pill { position: fixed; z-index: 2147482500; top: calc(10px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: rgba(14,14,14,.94); color: #eee; border: 1px solid rgba(247,181,0,.45); font: 600 13px system-ui, sans-serif; pointer-events: none; }
.fb-buffer-pill[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .fb-spin, .fb-busy::after, .fb-loading::after, .fb-task.indet .fb-bar i { animation-duration: 2.4s; } button:active, .fb-pressed { transform: none; } }
