/* Punch Feedback: the edge tab, the recording sheet and the list page. Built on the app's colour
   tokens (--accent, --card, --line, --soft, --ink, --muted, --shadow), with fallbacks so it can move
   into another app as it is. Loaded after style.css. */
:root { --fb-sage: #3c7a54; --fb-scrim: rgba(34, 24, 16, .38); }
@media (prefers-color-scheme: dark) { :root { --fb-sage: #79b58f; --fb-scrim: rgba(0, 0, 0, .55); } }

/* The tab on the right edge, at thumb height. */
.fb-tab { position: fixed; right: 0; top: 56%; width: 32px; height: 64px; padding: 0 0 0 4px; border: 0; border-radius: 14px 0 0 14px;
  background: var(--accent, #d9480f); color: #fff; display: grid; place-items: center; box-shadow: -4px 6px 14px -6px var(--shadow, rgba(0,0,0,.3));
  z-index: 5; transition: transform .25s ease; animation: fb-peek 1.4s ease .8s 1; }
.fb-tab.tucked { transform: translateX(22px); }  /* tucked away while the page scrolls, so it never sits on what you read */
.fb-tab::before { content: ""; position: absolute; left: 6px; top: 16px; bottom: 16px; width: 2px; border-radius: 2px; background: currentColor; opacity: .35; }
.fb-tab[hidden] { display: none; }
.fb-dot { position: absolute; top: -4px; left: -4px; width: 12px; height: 12px; border-radius: 50%; background: var(--fb-sage); border: 2px solid var(--bg, #fff); }
.fb-dot[hidden] { display: none; }
@keyframes fb-peek { 0%, 70%, 100% { transform: translateX(0); } 35% { transform: translateX(-8px); } }

/* The sheet. */
.fb-scrim { position: fixed; inset: 0; background: var(--fb-scrim); opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 7; }
.fb-scrim.on { opacity: 1; pointer-events: auto; }
.fb-sheet { position: fixed; left: 0; right: 0; bottom: 0; max-width: 720px; margin: 0 auto; max-height: 88vh; max-height: 88dvh; overflow-y: auto;
  background: var(--card, #fff); border-top: 1px solid var(--line, #ddd); border-radius: 22px 22px 0 0;
  padding: 10px 18px calc(22px + env(safe-area-inset-bottom)); transform: translateY(105%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); z-index: 8; }
.fb-sheet.on { transform: none; }
.fb-handle { width: 38px; height: 5px; border-radius: 3px; background: var(--line, #ddd); margin: 0 auto 12px; }
.fb-sheet h3 { font-size: 1.15rem; margin: 4px 0 2px; }
.fb-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.fb-where { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; color: var(--muted, #777); min-width: 0; }
.fb-link { font-size: .85rem; color: var(--muted, #777); text-decoration: underline; text-underline-offset: 3px; }
.fb-rec { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 0 12px; }
.fb-big { position: relative; width: 112px; height: 112px; padding: 0; border-radius: 50%; box-shadow: 0 14px 30px -12px var(--accent, #d9480f); }
.fb-big:disabled { opacity: .55; }
.fb-big.live::before, .fb-big.live::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--accent, #d9480f); animation: fb-ring 1.8s ease-out infinite; }
.fb-big.live::after { animation-delay: .9s; }
@keyframes fb-ring { from { transform: scale(1); opacity: .7; } to { transform: scale(1.55); opacity: 0; } }
.fb-timer { font: 600 1.9rem/1 Fraunces, Georgia, serif; font-variant-numeric: tabular-nums; }
.fb-wave { display: flex; align-items: center; gap: 3px; height: 42px; }
.fb-wave i { width: 4px; height: 6px; border-radius: 2px; background: var(--accent, #d9480f); opacity: .75; transition: height .09s linear; }
.fb-hint { text-align: center; margin: 0; }
.fb-center { text-align: center; margin: 6px 0 0; }
.fb-skel { height: 76px; border-radius: 14px; margin-top: 10px; }
.fb-empty { padding: 18px 0 8px; }
.fb-empty p { margin: 0 0 6px; }
.fb-type { min-height: 120px; }
.fb-actions { display: grid; gap: 8px; margin-top: 16px; }
.fb-actions .chip, .fb-actions .quiet { justify-self: center; }
.fb-small { font-size: .82rem; margin: 2px 0 0; }
.fb-draft { position: relative; border: 1px solid var(--line, #ddd); border-radius: 14px; padding: 12px 40px 6px 12px; margin-top: 10px; background: var(--bg, #fafafa); }
.fb-draft .fb-ttl { font-weight: 600; margin: 8px 0 4px; padding: 6px 8px; border-color: transparent; background: transparent; }
.fb-draft .fb-det { min-height: 0; resize: none; margin: 0 0 6px; padding: 6px 8px; font-size: .88rem; color: var(--muted, #777); border-color: transparent; background: transparent; }
.fb-draft .fb-ttl:focus, .fb-draft .fb-det:focus { border-color: var(--line, #ddd); background: var(--card, #fff); color: var(--ink, #222); }
.fb-x { position: absolute; top: 6px; right: 4px; padding: 6px; color: var(--muted, #777); }
.fb-said { margin-top: 12px; font-size: .88rem; }
.fb-said summary { color: var(--muted, #777); cursor: pointer; }
.fb-quote { margin: 8px 0 0; padding: 8px 12px; border-left: 3px solid var(--line, #ddd); color: var(--muted, #777); font-style: italic; font-size: .88rem; white-space: pre-wrap; }

/* Labels: Fix, Change, New. */
.fb-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fb-kind { display: inline-flex; align-items: center; padding: 3px 9px; border: 0; border-radius: 999px; box-shadow: none; font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.fb-kind.fix { background: color-mix(in srgb, var(--accent, #d9480f) 16%, transparent); color: var(--accent, #d9480f); }
.fb-kind.change { background: color-mix(in srgb, var(--wood, #9a6434) 20%, transparent); color: var(--wood, #9a6434); }
.fb-kind.new { background: color-mix(in srgb, var(--fb-sage) 18%, transparent); color: var(--fb-sage); }
@media (prefers-color-scheme: dark) { .fb-kind.change { color: #c8925a; } }
button.fb-kind { padding: 4px 10px; }
.fb-more button.fb-kind { opacity: .55; }
.fb-more button.fb-kind.on { opacity: 1; outline: 2px solid currentColor; outline-offset: 1px; }
.fb-badge { font-size: .72rem; font-weight: 700; color: var(--accent, #d9480f); }

/* The list page. */
.fb-sub { margin: -6px 0 4px; }
.fb-list { padding: 4px 14px; }
.fb-item { display: flex; gap: 10px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line, #ddd); }
.fb-item:first-child { border-top: 0; }
.fb-circle { width: 28px; height: 28px; flex: none; padding: 0; margin-top: 1px; border-radius: 50%; border: 2px solid var(--muted, #777); background: transparent; color: transparent; box-shadow: none; }
.fb-circle:hover { color: var(--muted, #777); }
.fb-circle.done { background: var(--fb-sage); border-color: var(--fb-sage); color: #fff; }
.fb-circle.dropped { border-color: var(--line, #ddd); color: var(--muted, #777); }
.fb-grow { flex: 1; min-width: 0; }
.fb-open { display: block; width: 100%; padding: 0; margin: 0 0 4px; border-radius: 0; background: none; color: inherit; box-shadow: none; text-align: left; font-weight: 600; }
.fb-open:active { transform: none; }
.fb-title { font-weight: 600; line-height: 1.3; }
.is-done .fb-title { color: var(--muted, #777); font-weight: 500; }
.is-dropped .fb-title { color: var(--muted, #777); font-weight: 500; text-decoration: line-through; }
.fb-more { display: grid; gap: 8px; margin-top: 10px; }
.fb-more input, .fb-more textarea { margin: 0; }
.fb-more textarea { min-height: 64px; }
.fb-more .row { margin: 0; }
.fb-audio { width: 100%; height: 40px; }
.fb-check { padding: 14px; }
.fb-check .fb-title { margin-bottom: 6px; }
.fb-check .row { margin-top: 12px; }
.fb-built { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; font-weight: 600; color: var(--fb-sage); }
.fb-ask { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0 14px; }
.fb-ask .mark { flex: none; }
.fb-ask .bubble { max-width: none; margin-top: 4px; }
.fb-answers { margin-top: 8px; }
.fb-other { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.fb-other input { margin: 0; }
.fb-group { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted, #777); margin: 14px 0 6px; }
@media (prefers-reduced-motion: reduce) { .fb-tab, .fb-big.live::before, .fb-big.live::after { animation: none; } .fb-sheet, .fb-scrim, .fb-wave i { transition: none; } }
