/* ============================================================================
   site/home/widgets.css — Walkie real-widget component library (Wave 1).
   Faithful web re-creations of the app's own UI, ported from public/*.css:
   hud.css (Notch Pill), styles.css (main window), selector.css, preview.css,
   annotate.css. Every class is prefixed `wk-`; every root carries `.wk`, which
   owns the token set, so nothing here leaks into (or inherits from) the page.
   Dark is the default (app dark tokens). Light: add `.wk-light`, or the widget
   follows `:root[data-theme="light"]` on site pages (home has no attribute, so
   the home stays dark). `.wk-dark` pins dark regardless.
   ============================================================================ */

.wk {
  --wk-ground: #111315;
  --wk-panel: #191C1F;
  --wk-hair: rgba(255, 255, 255, .10);
  --wk-ivory: #EDEAE3;
  --wk-slate: #8B9299;
  --wk-brass: #C9A96E;
  --wk-teal: #4FB8AE;
  --wk-violet: #8C7AE6;
  --wk-sky: #5B9BD5;
  --wk-oxide: #D9694A;
  --wk-green: #34D399;
  --wk-amber: #F5B84B;
  --wk-red: #E1604A;
  --wk-glass: rgba(25, 28, 31, .55);
  --wk-glass-strong: rgba(25, 28, 31, .80);
  --wk-glass-hair: rgba(255, 255, 255, .06);
  --wk-glass-shadow: rgba(0, 0, 0, .35);
  --wk-grad: linear-gradient(90deg, #4FB8AE 0%, #34D399 100%);
  --wk-grad-site: linear-gradient(92deg, #4FB8AE 0%, #34D399 100%);
  --wk-radius: 6px;
  --wk-font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Segoe UI', sans-serif;
  --wk-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --wk-hud-font: 'Avenir Next', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  /* motion tokens (match site tokens.css + app curves) */
  --wk-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --wk-ease-strong: cubic-bezier(0.23, 1, 0.32, 1);
  --wk-ease-drawer: cubic-bezier(.32, .72, 0, 1);
  --wk-ease-pop: cubic-bezier(.34, 1.56, .64, 1);
  box-sizing: border-box;
  font-family: var(--wk-font);
  color: var(--wk-ivory);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
  line-height: normal;
  text-align: left;
}
.wk *, .wk *::before, .wk *::after { box-sizing: border-box; }
.wk [hidden] { display: none !important; }
.wk button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: default; }

.wk.wk-light,
:root[data-theme="light"] .wk:not(.wk-dark) {
  --wk-ground: #F4F4F2;
  --wk-panel: #FFFFFF;
  --wk-hair: rgba(23, 24, 26, .12);
  --wk-ivory: #17181A;
  --wk-slate: #6B6E70;
  --wk-brass: #A9803F;
  --wk-teal: #2E8F86;
  --wk-violet: #6152C4;
  --wk-sky: #3A78B0;
  --wk-oxide: #A8492F;
  --wk-glass: rgba(255, 255, 255, .55);
  --wk-glass-strong: rgba(255, 255, 255, .82);
  --wk-glass-hair: rgba(23, 24, 26, .05);
  --wk-glass-shadow: rgba(23, 24, 26, .10);
}

/* scale-to-fit host: reserves the widget's aspect ratio (no CLS), inner box is
   laid out at its native px size and scaled with a transform (WK.fit). */
.wk-fit { position: relative; width: 100%; overflow: hidden; }
.wk-fit > .wk-fit-inner { position: absolute; top: 0; left: 0; transform-origin: 0 0; }

/* ============================================================================
   1 · NOTCH PILL — public/hud.css, 1:1
   ============================================================================ */
.wk-hud {
  position: relative;
  width: 236px;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--wk-hud-font);
  color: var(--wk-ivory);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 160ms var(--wk-ease-strong), transform 160ms var(--wk-ease-strong);
}
.wk-hud.is-shown { opacity: 1; transform: translateY(0); transition-duration: 200ms; }
.wk-pill {
  position: relative;
  width: 236px;
  height: 40px;
  border-radius: 20px;
  background: var(--wk-glass);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  backdrop-filter: blur(24px) saturate(1.5);
  box-shadow: 0 16px 34px -14px var(--wk-glass-shadow);
  overflow: hidden;
  flex: 0 0 auto;
}
.wk-pill::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--wk-grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: .55;
  pointer-events: none;
}
.wk-pill-row {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  transition: opacity 140ms ease;
}
.wk-pill-rec { position: relative; flex: 0 0 auto; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; }
.wk-pill-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #4FB8AE, #34D399, #4FB8AE);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px));
  opacity: .4;
}
.wk-hud.is-recording .wk-pill-ring { animation: wk-pill-breathe 2.4s ease-in-out infinite; }
@keyframes wk-pill-breathe { 0%, 100% { opacity: .35; transform: scale(.92); } 50% { opacity: .85; transform: scale(1.05); } }
.wk-pill-dot {
  position: relative;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--wk-red);
  box-shadow: 0 0 6px rgba(225, 96, 74, .65);
  transition: background 160ms ease, box-shadow 160ms ease;
}
.wk-pill.is-drawing .wk-pill-dot {
  background: var(--wk-green);
  box-shadow: 0 0 6px rgba(52, 211, 153, .65);
  animation: wk-pill-draw 1.8s ease-in-out infinite;
}
@keyframes wk-pill-draw { 0%, 100% { opacity: .55; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.15); } }
.wk-pill-timer {
  flex: 0 0 auto;
  font-family: var(--wk-mono);
  font-size: 14px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
  color: var(--wk-ivory);
  line-height: 1;
}
.wk-pill-meterslot { flex: 1 1 auto; min-width: 28px; display: flex; align-items: center; }
.wk-pill-meter { display: flex; align-items: flex-end; gap: 2px; height: 20px; }
.wk-pill-bar {
  width: 3px; height: 20px;
  border-radius: 1.5px;
  background: var(--wk-teal);
  transform: scaleY(.2);
  transform-origin: bottom;
  transition: transform 90ms ease-out;
}
.wk-chip {
  flex: 0 0 auto;
  font-size: 9px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  padding: 2px 6px; border-radius: 3px;
  border: 1px solid var(--wk-hair); color: var(--wk-slate); background: var(--wk-glass);
}
.wk-chip-silent {
  max-width: 118px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-transform: none; letter-spacing: normal; font-size: 8px;
  color: var(--wk-red); border-color: var(--wk-red); background: rgba(225, 96, 74, .14);
  animation: wk-chip-silent 2s ease-in-out infinite;
}
@keyframes wk-chip-silent { 0%, 100% { opacity: .8; transform: scale(1); } 50% { opacity: 1; transform: scale(1.05); } }
.wk-pill-stop {
  position: relative; flex: 0 0 auto;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; line-height: 1;
  border-radius: 8px;
  border: 1px solid var(--wk-red) !important;
  color: var(--wk-red) !important;
  background: transparent;
  transition: background 140ms ease, opacity 140ms ease, transform 100ms ease-out;
}
.wk-pill-stop.is-pressed { transform: scale(.97); background: rgba(225, 96, 74, .18); }
.wk-pill-stop.is-over { background: rgba(225, 96, 74, .22); transform: scale(1.12); }
.wk-pill-stop:disabled, .wk-pill-stop.is-disabled { opacity: .4; }
.wk-pill-ctx { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.wk-pill-fill {
  position: absolute; inset: 0;
  background: var(--wk-grad);
  transform: scaleX(0); transform-origin: left;
  transition: transform 220ms ease;
}
.wk-pill-fill::before, .wk-pill-fill::after { content: ''; position: absolute; inset: 0; opacity: 0; transition: opacity 220ms ease; }
.wk-pill-fill::before { background: var(--wk-amber); }
.wk-pill-fill::after { background: var(--wk-red); }
.wk-pill-ctx[data-zone="amber"] .wk-pill-fill::before { opacity: 1; }
.wk-pill-ctx[data-zone="red"] .wk-pill-fill::after { opacity: 1; }
.wk-pill-ctx.is-flashing { animation: wk-pill-flash 700ms ease-out; }
@keyframes wk-pill-flash {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .65); }
  60% { box-shadow: 0 0 10px 3px rgba(52, 211, 153, .45); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}
.wk-pill-saved {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; letter-spacing: .02em;
  color: var(--wk-green);
  opacity: 0; transform: scale(.98);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}
.wk-pill.is-saved .wk-pill-row { opacity: 0; }
.wk-pill.is-saved .wk-pill-saved { opacity: 1; transform: scale(1); }
.wk-pill.is-marked { animation: wk-pill-mark 700ms var(--wk-ease-strong); }
@keyframes wk-pill-mark {
  0% { box-shadow: inset 0 0 0 0 transparent, 0 16px 34px -14px var(--wk-glass-shadow); }
  16% { box-shadow: inset 0 0 0 2px var(--wk-green), 0 16px 34px -14px var(--wk-glass-shadow); }
  100% { box-shadow: inset 0 0 0 0 transparent, 0 16px 34px -14px var(--wk-glass-shadow); }
}
.wk-pill.is-marked .wk-pill-ring { animation: wk-pill-markdot 700ms var(--wk-ease-strong); }
@keyframes wk-pill-markdot { 0% { transform: scale(1); } 22% { transform: scale(1.35); } 100% { transform: scale(1); } }
/* proximity "get out of the way" */
.wk-pill, .wk-pill::before, .wk-pill-rec, .wk-pill-timer, .wk-pill-meterslot, .wk-pill-ctx, .wk-hud-capwrap {
  transition-property: opacity, background, box-shadow, transform;
  transition-duration: 160ms;
  transition-timing-function: var(--wk-ease-strong);
}
.wk-hud.is-near .wk-pill { background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; transform: translateY(-2px); }
.wk-hud.is-near .wk-pill::before { opacity: 0; }
.wk-hud.is-near .wk-pill-rec, .wk-hud.is-near .wk-pill-timer, .wk-hud.is-near .wk-pill-meterslot, .wk-hud.is-near .wk-pill-ctx { opacity: .16; }
.wk-hud.is-near .wk-hud-capwrap { opacity: 0; }
.wk-hud.is-near .wk-pill-stop { background: var(--wk-glass-strong); transform: scale(1.08); }
/* coach caption below the pill */
.wk-hud-capwrap { margin-top: 10px; width: 236px; display: flex; justify-content: center; min-height: 23px; }
.wk-hud-msg {
  font-size: 11px; font-weight: 500;
  color: color-mix(in srgb, var(--wk-ivory) 85%, transparent);
  background: var(--wk-glass);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  backdrop-filter: blur(24px) saturate(1.5);
  border: 1px solid var(--wk-hair);
  border-radius: 10px;
  padding: 4px 10px;
  max-width: 280px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0; transform: translateY(-2px);
  transition: opacity 180ms ease, transform 180ms ease;
}
.wk-hud-msg.is-visible { opacity: 1; transform: translateY(0); }
.wk-hud-msg.is-visible.is-swapping { opacity: 0; transform: translateY(-2px); transition-duration: 120ms; }
.wk-hud-msg.is-tip { transition-duration: 300ms; }

/* ============================================================================
   2 · OVERLAY CANVAS (glow, bursts, smoke trail, Signal Ink, arrow cursor)
   ============================================================================ */
.wk-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; display: block; }
.wk-overlay.is-live { pointer-events: auto; cursor: crosshair; touch-action: none; }

/* ============================================================================
   3 · FRAME MARK (burned into saved frames) + frame thumbnail
   ============================================================================ */
.wk-mark { position: absolute; overflow: visible; pointer-events: none; }
.wk-mark .wk-mark-ring, .wk-mark .wk-mark-ticks { fill: none; stroke: var(--wk-violet); stroke-width: 2.5; }
.wk-mark .wk-mark-ticks { stroke-linecap: butt; }
.wk-mark .wk-mark-path line { stroke: var(--wk-violet); stroke-width: 2; stroke-linecap: round; }
.wk-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  overflow: hidden;
  background: linear-gradient(180deg, #1a1e27, #151922);
  border: 1px solid var(--wk-hair);
}
.wk-frame-name {
  position: absolute; left: 6px; bottom: 5px;
  font-family: var(--wk-mono); font-size: 9.5px; color: var(--wk-ivory);
  background: rgba(16, 19, 24, .78); border-radius: 4px; padding: 2px 5px;
  white-space: nowrap;
}

/* ============================================================================
   4 · MAIN WINDOW (public/index.html + styles.css), 1040×700 native
   ============================================================================ */
.wk-win {
  position: relative;
  width: 1040px; height: 700px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--wk-ground);
  box-shadow: 0 0 0 1px var(--wk-hair), 0 40px 90px -30px rgba(0, 0, 0, .65);
  font-size: 14px;
}
.wk-win-aura { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.wk-win-blob { position: absolute; border-radius: 50%; filter: blur(70px); animation-play-state: paused; }
.wk-win.is-live .wk-win-blob { animation-play-state: running; }
.wk-win-blob.a { width: 624px; height: 624px; top: -146px; left: -83px; background: radial-gradient(circle at center, rgba(140, 122, 230, .50), transparent 62%); animation: wk-drift-a 32s ease-in-out infinite alternate; }
.wk-win-blob.b { width: 572px; height: 572px; bottom: -166px; right: -104px; background: radial-gradient(circle at center, rgba(79, 184, 174, .45), transparent 60%); animation: wk-drift-b 40s ease-in-out infinite alternate; }
.wk-win-blob.c { width: 437px; height: 437px; top: 210px; right: 125px; background: radial-gradient(circle at center, rgba(217, 105, 74, .32), transparent 65%); animation: wk-drift-c 45s ease-in-out infinite alternate; }
.wk-win-blob.a, .wk-win-blob.b, .wk-win-blob.c { animation-play-state: paused; }
.wk-win.is-live .wk-win-blob.a, .wk-win.is-live .wk-win-blob.b, .wk-win.is-live .wk-win-blob.c { animation-play-state: running; }
@keyframes wk-drift-a { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(146px, 70px, 0) scale(1.12); } }
@keyframes wk-drift-b { from { transform: translate3d(0, 0, 0) scale(1.08); } to { transform: translate3d(-125px, -56px, 0) scale(1); } }
@keyframes wk-drift-c { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(-83px, 84px, 0) scale(1.1); } }
.wk-win-lights { position: absolute; top: 18px; left: 18px; display: flex; gap: 8px; z-index: 3; }
.wk-win-lights i { width: 12px; height: 12px; border-radius: 50%; background: rgba(255, 255, 255, .16); box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .25); }
.wk-win-shell { position: relative; z-index: 1; height: 100%; display: flex; }
.wk-rail { flex: 0 0 200px; display: flex; flex-direction: column; gap: 28px; padding: 44px 20px 20px; }
.wk-brand {
  position: relative; display: inline-flex; align-items: center; align-self: flex-start;
  font-size: 15px; font-weight: 600; letter-spacing: -0.02em; color: var(--wk-ivory); padding: 6px 9px;
}
.wk-brand-text { line-height: 1; background: linear-gradient(90deg, var(--wk-teal), var(--wk-green)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.wk-brand-c { position: absolute; width: 7px; height: 7px; border: 1.5px solid currentColor; opacity: .85; }
.wk-brand-c.tl { top: 0; left: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 4px; }
.wk-brand-c.tr { top: 0; right: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 4px; }
.wk-brand-c.br { bottom: 0; right: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 4px; }
.wk-brand-c.bl { bottom: 0; left: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 4px; }
.wk-brand-dot { display: inline-block; width: 5px; height: 5px; margin-left: 5px; border-radius: 50%; background: var(--wk-violet); box-shadow: 0 0 6px 1px var(--wk-violet); }
.wk-railnav { display: flex; flex-direction: column; gap: 4px; list-style: none; margin: 0; padding: 0; }
.wk-raillink {
  display: flex; align-items: center;
  padding: 9px 10px; border-radius: var(--wk-radius);
  font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  color: var(--wk-slate) !important;
  transition: background 140ms ease, color 140ms ease, transform 100ms ease-out;
}
.wk-raillink.is-active { color: var(--wk-ivory) !important; background: var(--wk-glass-strong); box-shadow: inset 0 1px 0 var(--wk-glass-hair); }
.wk-content { flex: 1; min-width: 0; padding: 44px 40px 28px; overflow: hidden; }
.wk-view { display: none; flex-direction: column; gap: 22px; max-width: 640px; transition: opacity 140ms var(--wk-ease-strong), transform 140ms var(--wk-ease-strong); }
.wk-view.is-active { display: flex; }
.wk-view.is-entering { opacity: 0; transform: translateY(4px); }
.wk-view-title { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; color: var(--wk-ivory); }
.wk-view-sub { margin: -12px 0 0; font-size: 13px; color: var(--wk-slate); line-height: 1.4; }
.wk-card {
  position: relative;
  background: var(--wk-glass);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid var(--wk-hair);
  border-radius: var(--wk-radius);
  box-shadow: inset 0 1px 0 var(--wk-glass-hair), 0 8px 20px -10px var(--wk-glass-shadow);
  padding: 20px;
}
.wk-card.is-strong { background: var(--wk-glass-strong); }
.wk-actrow { display: flex; align-items: stretch; gap: 12px; }
.wk-pbtn {
  flex: 1 1 auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 20px 16px;
  border-radius: var(--wk-radius);
  border: 1px solid var(--wk-hair) !important;
  background: var(--wk-teal) !important;
  color: var(--wk-ground) !important;
  transition: transform 140ms var(--wk-ease-drawer), opacity 140ms var(--wk-ease-drawer), background 140ms ease;
}
.wk-pbtn.is-pressed { transform: scale(.98); }
.wk-pbtn.is-hover { transform: translateY(-1px); }
.wk-pbtn-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--wk-ground); }
.wk-pbtn[data-state="recording"] { background: var(--wk-red) !important; }
.wk-pbtn[data-state="recording"] .wk-pbtn-dot { animation: wk-recdot 1.1s ease-in-out infinite; }
@keyframes wk-recdot { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.8); } }
.wk-pbtn-label { font-size: 15px; font-weight: 700; }
.wk-pbtn-hint { font-size: 11px; font-weight: 500; opacity: .75; }
.wk-actcol { display: flex; flex-direction: column; gap: 8px; flex: 0 0 190px; }
.wk-sbtn {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 14px; border-radius: var(--wk-radius);
  border: 1px solid var(--wk-hair) !important;
  background: var(--wk-glass-strong) !important;
  color: var(--wk-ivory) !important;
  font-weight: 600; font-size: 13px;
  transition: transform 120ms var(--wk-ease-drawer), border-color 140ms ease, color 140ms ease;
}
.wk-sbtn.is-pressed { transform: scale(.97); }
.wk-sbtn.is-flash { color: var(--wk-green) !important; border-color: var(--wk-green) !important; }
.wk-rbtn {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 14px; border-radius: var(--wk-radius);
  border: 1px solid transparent; color: var(--wk-slate) !important; font-size: 12px;
  transition: color 140ms ease, transform 120ms var(--wk-ease-drawer);
}
.wk-rbtn > span:first-child { white-space: nowrap; }
.wk-rbtn.is-pressed { transform: scale(.97); }
.wk-rbtn.is-flash { color: var(--wk-green) !important; }
.wk-shint { font-size: 11px; color: var(--wk-slate); font-weight: 500; }
.wk-sbtn.is-flash .wk-shint { color: inherit; }
.wk-field { display: flex; flex-direction: column; gap: 6px; }
.wk-field-label { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--wk-slate); }
.wk-input { border: 1px solid var(--wk-hair); background: var(--wk-glass); color: var(--wk-slate); font-size: 13px; padding: 10px 12px; border-radius: var(--wk-radius); }
/* library */
.wk-reclist { display: flex; flex-direction: column; gap: 8px; list-style: none; margin: 0; padding: 0; }
.wk-recrow { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: var(--wk-radius); transition: background 140ms ease; }
.wk-recrow.is-hover { background: var(--wk-glass); }
.wk-rectop { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wk-recmain { min-width: 0; }
.wk-recname { font-size: 13px; font-weight: 500; color: var(--wk-ivory); }
.wk-recmeta { font-size: 11px; color: var(--wk-slate); margin-top: 2px; }
.wk-copybtn {
  background: var(--wk-glass-strong) !important; color: var(--wk-ivory) !important;
  border: 1px solid var(--wk-hair) !important; border-radius: var(--wk-radius);
  padding: 7px 14px !important; font-size: 12px; font-weight: 600; white-space: nowrap;
  transition: border-color 140ms ease, color 140ms ease, transform 100ms ease-out;
}
.wk-copybtn.is-pressed { transform: scale(.98); }
.wk-copybtn.is-copied { border-color: var(--wk-teal) !important; color: var(--wk-teal) !important; }
.wk-rechint { font-size: 11px; color: var(--wk-slate); }
.wk-recrow.is-new { animation: wk-rowglow 2s ease-out 1; }
@keyframes wk-rowglow {
  0% { box-shadow: 0 0 0 2px var(--wk-teal), 0 0 24px 4px var(--wk-teal); background: var(--wk-glass); }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.wk-recrow.is-entering { opacity: 0; transform: translateY(6px); }
.wk-recrow { transition: background 140ms ease, opacity 260ms var(--wk-ease-strong), transform 260ms var(--wk-ease-strong); }

/* ============================================================================
   5 · REGION SELECTOR (public/selector.css)
   ============================================================================ */
.wk-sel { position: relative; overflow: hidden; background: #101318; font-family: var(--wk-font); }
.wk-sel-desk { position: absolute; inset: 0; }
.wk-sel-panel {
  position: absolute; z-index: 5; display: none; pointer-events: none;
  background-color: rgba(13, 16, 21, .62);
  background-image: radial-gradient(circle, rgba(79, 184, 174, .045), rgba(79, 184, 174, 0) 62%);
  background-size: 160% 160%;
  animation: wk-sel-drift 8s ease-in-out infinite;
}
.wk-sel.has-selection .wk-sel-panel { display: block; }
.wk-sel.is-dimmed .wk-sel-full { display: block; }
.wk-sel-full { position: absolute; inset: 0; z-index: 4; display: none; background: rgba(13, 16, 21, .62); }
@keyframes wk-sel-drift { 0%, 100% { background-position: 22% 32%; } 50% { background-position: 78% 68%; } }
.wk-sel-box { position: absolute; z-index: 7; display: none; pointer-events: none; border: 1px solid transparent; border-image: linear-gradient(90deg, #4FB8AE, #34D399) 1; }
.wk-sel.has-selection .wk-sel-box { display: block; }
.wk-sel-br { position: absolute; width: 18px; height: 18px; filter: drop-shadow(0 0 4px rgba(240, 238, 230, .55)); }
.wk-sel-br.snap { animation: wk-sel-snap .15s ease-in-out; }
@keyframes wk-sel-snap { 0% { transform: translate(0, 0); } 50% { transform: translate(var(--dx), var(--dy)); } 100% { transform: translate(0, 0); } }
.wk-sel-br.tl { top: -2px; left: -2px; border-top: 2px solid #F0EEE6; border-left: 2px solid #F0EEE6; --dx: 4px; --dy: 4px; }
.wk-sel-br.tr { top: -2px; right: -2px; border-top: 2px solid #F0EEE6; border-right: 2px solid #F0EEE6; --dx: -4px; --dy: 4px; }
.wk-sel-br.bl { bottom: -2px; left: -2px; border-bottom: 2px solid #F0EEE6; border-left: 2px solid #F0EEE6; --dx: 4px; --dy: -4px; }
.wk-sel-br.br { bottom: -2px; right: -2px; border-bottom: 2px solid #F0EEE6; border-right: 2px solid #F0EEE6; --dx: -4px; --dy: -4px; }
.wk-sel-readout {
  position: absolute; z-index: 9; display: none; pointer-events: none;
  background: rgba(16, 19, 24, .72);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  backdrop-filter: blur(10px) saturate(140%);
  border: 1px solid rgba(240, 238, 230, .14);
  color: #F0EEE6;
  font: 12px/1 var(--wk-mono);
  padding: 6px 10px; border-radius: 8px; white-space: nowrap; letter-spacing: .02em;
}
.wk-sel.has-selection .wk-sel-readout { display: block; }
.wk-sel-readout b { color: #34D399; font-weight: 600; }
.wk-sel-caption { position: absolute; top: 22px; left: 50%; transform: translateX(-50%); z-index: 20; pointer-events: none; color: rgba(240, 238, 230, .45); font-size: 11px; letter-spacing: .02em; white-space: nowrap; }
.wk-sel-ring { position: absolute; z-index: 6; border-radius: 50%; border: 2px solid #4FB8AE; transform: translate(-50%, -50%) scale(.15); opacity: .85; pointer-events: none; }
.wk-sel-ring.pulse { animation: wk-sel-ring .6s ease-out forwards; }
@keyframes wk-sel-ring { 0% { transform: translate(-50%, -50%) scale(.12); opacity: .9; border-color: #4FB8AE; } 100% { transform: translate(-50%, -50%) scale(1); opacity: 0; border-color: #34D399; } }

/* ============================================================================
   6 · SCREENSHOT PREVIEW CARD (public/preview.css) — 340×280
   ============================================================================ */
.wk-prevhost { position: relative; width: 340px; height: 280px; overflow: hidden; }
.wk-prev {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; gap: 8px; padding: 12px;
  background: rgba(16, 19, 24, .86);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .35);
  transform: translateX(100%); opacity: 0;
  transition: transform 200ms var(--wk-ease-strong), opacity 200ms var(--wk-ease-strong);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, sans-serif;
}
.wk-prev::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(135deg, #4FB8AE, #34D399);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.wk-prev.in { transform: translateX(0); opacity: 1; }
.wk-prev-x { position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(0, 0, 0, .35); color: #F0EEE6; font-size: 14px; line-height: 1; opacity: .55; z-index: 2; }
.wk-prev-img { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; background: #000; border-radius: 6px; overflow: hidden; position: relative; }
.wk-prev-l1 { color: #F0EEE6; font-size: 12px; line-height: 1.3; }
.wk-prev-l2 { color: rgba(240, 238, 230, .6); font-size: 11px; line-height: 1.3; }
.wk-prev-l2:empty { display: none; }
.wk-prev-hint { color: rgba(240, 238, 230, .5); font-size: 10px; line-height: 1.3; letter-spacing: .01em; }

/* ============================================================================
   7 · ANNOTATE EDITOR + TOOLBOX (public/annotate.css)
   ============================================================================ */
.wk-annot {
  position: relative; overflow: hidden;
  background: #111315; border-radius: 10px;
  --wk-aglass: rgba(16, 19, 24, .86);
  --wk-aglass-soft: rgba(255, 255, 255, .06);
  user-select: none;
}
.wk-annot-top {
  position: absolute; top: 0; left: 0; right: 0; height: 44px; z-index: 20;
  display: flex; align-items: center; gap: 12px; padding: 0 12px;
  background: var(--wk-aglass);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.wk-annot-info { display: flex; align-items: baseline; gap: 8px; min-width: 0; flex: 1 1 auto; }
.wk-annot-name { font-size: 12px; color: var(--wk-ivory); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-annot-dims, .wk-annot-zoom { font-family: var(--wk-mono); font-size: 11px; color: var(--wk-slate); white-space: nowrap; }
.wk-iconbtn { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 7px; font-size: 14px; color: var(--wk-slate) !important; border: 1px solid transparent; }
.wk-save { display: flex; align-items: center; gap: 6px; padding: 6px 12px !important; border-radius: 7px; background: var(--wk-teal) !important; color: var(--wk-ground) !important; font-size: 12px; font-weight: 700; transition: transform 140ms var(--wk-ease-strong); }
.wk-save.is-pressed { transform: scale(.97); }
.wk-kbd { font-family: var(--wk-mono); font-size: 10px; padding: 1px 4px; border-radius: 3px; background: rgba(0, 0, 0, .18); color: var(--wk-ground); opacity: .85; }
.wk-annot-stage { position: absolute; top: 44px; left: 0; right: 0; bottom: 92px; display: flex; align-items: center; justify-content: center; padding: 16px; }
.wk-annot-img { position: relative; width: 100%; height: 100%; border-radius: 4px; overflow: hidden; box-shadow: 0 8px 28px rgba(0, 0, 0, .35); }
.wk-pins { position: absolute; inset: 0; pointer-events: none; }
.wk-pin {
  position: absolute; width: 26px; height: 26px; margin-left: -13px; margin-top: -13px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--pin-color, var(--wk-oxide)); color: #14161a;
  font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .4), 0 0 0 2px rgba(255, 255, 255, .18);
  transform: scale(0);
  animation: wk-pin-pop 260ms cubic-bezier(.34, 1.56, .64, 1) forwards;
}
@keyframes wk-pin-pop { 0% { transform: scale(0); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }
.wk-toolbox {
  position: absolute; bottom: 20px; left: 50%; z-index: 20;
  display: flex; align-items: center; gap: 8px; padding: 8px;
  background: rgba(16, 19, 24, .86);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .35);
  transform: translate(-50%, 0);
}
.wk-toolbox::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(90deg, var(--wk-teal), var(--wk-green));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.wk-toolbox.is-entering { animation: wk-toolbox-in 260ms 60ms var(--wk-ease-strong) both; }
@keyframes wk-toolbox-in { from { transform: translate(-50%, 24px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.wk-toolbox.is-static { position: relative; left: auto; bottom: auto; transform: none; display: inline-flex; }
.wk-toolbox.is-static.is-entering { animation-name: wk-toolbox-in-static; }
@keyframes wk-toolbox-in-static { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.wk-tgroup { display: flex; align-items: center; gap: 3px; }
.wk-tdiv { width: 1px; height: 22px; background: var(--wk-hair); margin: 0 2px; }
.wk-tool {
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border-radius: 7px; font-size: 15px; color: var(--wk-slate) !important;
  transition: background 160ms ease, color 160ms ease, transform 120ms cubic-bezier(.34, 1.56, .64, 1), box-shadow 160ms ease;
}
.wk-tool.is-active { color: #0d1014 !important; background: linear-gradient(135deg, var(--wk-teal), var(--wk-green)) !important; box-shadow: 0 2px 10px rgba(79, 184, 174, .35); transform: scale(1.04); }
.wk-tool.is-pressed { transform: scale(.9); }
.wk-swatches { display: flex; align-items: center; gap: 6px; padding: 0 2px; }
.wk-swatch { width: 18px; height: 18px; border-radius: 50%; border: 2px solid transparent !important; transition: transform 120ms cubic-bezier(.34, 1.56, .64, 1), border-color 140ms ease; }
.wk-swatch.is-active { border-color: var(--wk-ivory) !important; transform: scale(1.15); }

/* ============================================================================
   8 · BUNDLE VISUALS — REVIEW.md / transcript.md doc, bundle folder
   ============================================================================ */
.wk-doc {
  position: relative;
  background: rgba(12, 14, 18, .88);
  border: 1px solid var(--wk-hair);
  border-radius: 10px;
  overflow: hidden;
  font-family: var(--wk-mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--wk-slate);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .6);
}
.wk-doc-tab { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-bottom: 1px solid var(--wk-hair); background: rgba(255, 255, 255, .02); }
.wk-doc-tab b { color: var(--wk-teal); font-weight: 500; font-size: 12px; }
.wk-doc-tab span { color: var(--wk-slate); font-size: 11px; margin-left: auto; }
.wk-doc-body { padding: 14px 16px 16px; }
.wk-ln { white-space: pre-wrap; word-break: break-word; min-height: 1.6em; }
.wk-ln.h1 { color: var(--wk-ivory); font-weight: 700; }
.wk-ln.h2 { color: var(--wk-ivory); font-weight: 600; margin-top: .4em; }
.wk-ln .k { color: var(--wk-ivory); font-weight: 600; }
.wk-ln .ts { color: var(--wk-teal); }
.wk-ln .ref { color: var(--wk-violet); }
.wk-ln .tok { color: var(--wk-green); font-weight: 700; }
.wk-ln.tbl { color: var(--wk-slate); white-space: pre; overflow: hidden; text-overflow: ellipsis; }
.wk-ln.tbl.hd { color: var(--wk-ivory); }
.wk-ln.is-hl { background: rgba(140, 122, 230, .14); box-shadow: inset 2px 0 0 var(--wk-violet); }
.wk-doc .wk-ln { transition: opacity 240ms var(--wk-ease-strong), transform 240ms var(--wk-ease-strong), background 200ms ease; }
.wk-doc .wk-ln.is-pending { opacity: 0; transform: translateY(4px); }
.wk-bundle { font-family: var(--wk-font); font-size: 13px; color: var(--wk-ivory); background: rgba(16, 19, 24, .86); border: 1px solid var(--wk-hair); border-radius: 10px; overflow: hidden; }
.wk-bundle-path { font-family: var(--wk-mono); font-size: 11.5px; color: var(--wk-slate); padding: 10px 14px; border-bottom: 1px solid var(--wk-hair); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-bundle-path b { color: var(--wk-ivory); font-weight: 500; }
.wk-bundle-list { list-style: none; margin: 0; padding: 6px 0; }
.wk-bf { display: flex; align-items: center; gap: 10px; padding: 6px 14px; transition: opacity 260ms var(--wk-ease-strong), transform 260ms var(--wk-ease-strong); }
.wk-bf.is-pending { opacity: 0; transform: translateX(-6px); }
.wk-bf-ic { width: 16px; height: 18px; flex: 0 0 auto; border-radius: 2px; position: relative; background: rgba(240, 238, 230, .1); }
.wk-bf-ic::after { content: ''; position: absolute; top: 0; right: 0; width: 5px; height: 5px; background: rgba(12, 14, 18, .9); border-bottom-left-radius: 2px; }
.wk-bf.md .wk-bf-ic { background: rgba(79, 184, 174, .35); }
.wk-bf.json .wk-bf-ic { background: rgba(245, 184, 75, .30); }
.wk-bf.dir .wk-bf-ic { background: rgba(91, 155, 213, .40); border-radius: 3px; height: 13px; }
.wk-bf.dir .wk-bf-ic::after { display: none; }
.wk-bf.img .wk-bf-ic { background: rgba(140, 122, 230, .40); }
.wk-bf.vid .wk-bf-ic { background: rgba(240, 238, 230, .12); }
.wk-bf-name { font-family: var(--wk-mono); font-size: 12px; flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-bf-note { font-size: 11px; color: var(--wk-slate); white-space: nowrap; }
.wk-bf.is-indent { padding-left: 38px; }
.wk-bf.is-muted { opacity: .38; }
.wk-bf.is-muted .wk-bf-name { text-decoration: line-through; text-decoration-color: rgba(240, 238, 230, .45); }
.wk-bf.is-pending { opacity: 0; }
.wk-bf.is-hl { background: rgba(79, 184, 174, .10); }

/* ============================================================================
   9 · TOKEN METER + COUNTER
   ============================================================================ */
.wk-meter { font-family: var(--wk-font); }
.wk-meter-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 7px; font-size: 13px; font-weight: 600; color: var(--wk-slate); }
.wk-meter-val { font-family: var(--wk-mono); font-weight: 700; color: var(--wk-ivory); white-space: nowrap; font-variant-numeric: tabular-nums; }
.wk-meter-track { position: relative; height: 15px; border-radius: 4px; background: rgba(240, 238, 230, .08); border: 1px solid var(--wk-hair); overflow: hidden; }
.wk-meter-fill { position: absolute; inset: 0; border-radius: 3px; transform: scaleX(0); transform-origin: left; background: var(--wk-grad-site); }
.wk-meter.is-red .wk-meter-fill { background: linear-gradient(90deg, #E1604A, #c74534); }
.wk-meter.is-violet .wk-meter-fill { background: var(--wk-violet); }
.wk-meter-cap { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 10.5px; color: var(--wk-slate); letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
.wk-meter.is-tall .wk-meter-track { height: 32px; border-radius: 6px; }
.wk-count { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

/* ============================================================================
   10 · TRAY MENU (electron/modules/tray.mjs)
   ============================================================================ */
.wk-tray { display: inline-flex; flex-direction: column; align-items: flex-end; font-family: var(--wk-font); }
.wk-tray-bar { display: flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: 5px; }
.wk-tray-bar.is-open { background: rgba(255, 255, 255, .16); }
.wk-tray-icon { width: 18px; height: 18px; color: var(--wk-ivory); }
.wk-tray.is-recording .wk-tray-icon .w { stroke: var(--wk-red); }
.wk-tray-menu {
  margin-top: 4px; min-width: 268px; padding: 5px;
  background: rgba(40, 42, 46, .72);
  -webkit-backdrop-filter: blur(30px) saturate(1.6);
  backdrop-filter: blur(30px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, .12); border-radius: 10px;
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .55);
  transform-origin: top right;
  transition: opacity 160ms var(--wk-ease-strong), transform 160ms var(--wk-ease-strong);
}
.wk-tray-menu.is-closed { opacity: 0; transform: scale(.97) translateY(-4px); }
.wk-tray-item { display: flex; justify-content: space-between; gap: 18px; padding: 4px 10px; border-radius: 5px; font-size: 13px; color: #EDEAE3; white-space: nowrap; }
.wk-tray-item.is-hl { background: rgba(79, 184, 174, .85); color: #0d1014; }
.wk-tray-item .acc { color: rgba(237, 234, 227, .5); }
.wk-tray-item.is-hl .acc { color: rgba(13, 16, 20, .7); }
.wk-tray-sep { height: 1px; margin: 5px 10px; background: rgba(255, 255, 255, .12); }

/* kinetic type helpers (WK.type) */
.wk-char, .wk-word { display: inline-block; }
.wk-flap { transform-origin: 50% 50%; backface-visibility: hidden; }

/* ============================================================================
   Reduced motion — designed still states, never a broken widget. JS-driven
   widgets render their end state (see widgets.js); CSS loops stop here.
   ============================================================================ */
@media (prefers-reduced-motion: reduce) {
  .wk-hud, .wk-hud.is-shown { transform: none; transition: opacity 180ms ease; }
  .wk-hud.is-recording .wk-pill-ring { animation: none; opacity: .7; }
  .wk-pill.is-drawing .wk-pill-dot { animation: none; opacity: .9; }
  .wk-chip-silent { animation: none; opacity: 1; }
  .wk-pill-ctx.is-flashing { animation: none; box-shadow: 0 0 6px 2px rgba(52, 211, 153, .5); }
  .wk-pill.is-marked, .wk-pill.is-marked .wk-pill-ring { animation: none; }
  .wk-pill.is-marked { box-shadow: inset 0 0 0 2px var(--wk-green); }
  .wk-hud.is-near .wk-pill, .wk-hud.is-near .wk-pill-stop { transform: none; }
  .wk-win-blob { animation: none !important; }
  .wk-pbtn[data-state="recording"] .wk-pbtn-dot { animation: none; opacity: .85; }
  .wk-pbtn, .wk-sbtn, .wk-rbtn { transform: none !important; }
  .wk-recrow.is-new { animation: none; box-shadow: 0 0 0 1px var(--wk-teal); }
  .wk-sel-panel { animation: none; }
  .wk-sel-ring.pulse { animation: none; opacity: 0; }
  .wk-prev { transition: opacity 120ms ease; transform: none; }
  .wk-prev:not(.in) { opacity: 0; }
  .wk-pin { animation: none; transform: scale(1); }
  .wk-toolbox.is-entering { animation: none; }
  .wk-tool.is-active, .wk-swatch.is-active { transform: none; }
  .wk-doc .wk-ln, .wk-bf { transition: opacity 120ms ease; transform: none !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .wk-pill, .wk-hud-msg, .wk-card { background: var(--wk-panel); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
