/* followroom components — every value is a token */
body { margin: 0; font-family: var(--font-sans); background: var(--surface-000); color: var(--ink); font-size: 14px; line-height: 22px; }
.fr-pad { padding: var(--space-4); }
.fr-row { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.fr-stack { display: flex; flex-direction: column; gap: var(--space-2); }
.fr-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fr-icon { flex: none; display: block; }

/* focus: 2px signal ring with a 2px page-colour gap */
.fr-btn:focus-visible, .fr-qrcard-refresh:focus-visible, .fr-toast-action:focus-visible, .fr-toast-close:focus-visible, .fr-screenswitch-opt:focus-visible, .fr-sort-handle:focus-visible, .fr-inline-show:focus-visible, .fr-inline-editing:focus-within, .fr-answer:focus-visible, .fr-entry-input:focus-visible, .fr-control:focus-within, .fr-pin-box:focus-visible, .fr-check-input:focus-visible + .fr-check-mark, .fr-toggle:focus-visible, .fr-card:focus-visible, .fr-session:focus-visible, .fr-video:focus-visible, .fr-search:focus-within, .fr-range:focus-visible {
  outline: none; box-shadow: 0 0 0 2px var(--surface-000), 0 0 0 4px var(--signal);
}

/* Button */
.fr-btn { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); font: inherit; font-weight: 600; font-size: 14px;
  height: 36px; padding: 0 var(--space-4); border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--surface-100); color: var(--ink); cursor: pointer; }
.fr-btn:hover:not(:disabled) { border-color: var(--ink-muted); }
.fr-btn:disabled { cursor: not-allowed; opacity: .45; }
.fr-btn-lg { height: 48px; padding: 0 var(--space-6); font-size: 16px; }
.fr-btn-block { display: flex; width: 100%; }
.fr-btn-primary { background: var(--signal); border-color: var(--signal); color: var(--on-signal); }
.fr-btn-primary:hover:not(:disabled) { border-color: var(--ink); }
.fr-btn-quiet { background: transparent; border-color: transparent; }
.fr-btn-quiet:hover:not(:disabled) { background: var(--surface-100); border-color: var(--line); }
.fr-btn-danger { background: transparent; border-color: var(--line); color: var(--danger); }
.fr-btn-danger:hover:not(:disabled) { border-color: var(--danger); }
.fr-btn-destructive { background: var(--danger); border-color: var(--danger); color: var(--on-signal); }
.fr-btn-destructive:hover:not(:disabled) { border-color: var(--ink); }
.fr-btn:has(> .fr-icon:only-child) { width: 36px; padding: 0; }

/* LiveIndicator */
.fr-live { display: inline-flex; align-items: center; gap: var(--space-2); font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); white-space: nowrap; }
.fr-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-muted); flex: none; }
.fr-live-live .fr-live-label { color: var(--signal); }
.fr-live-live .fr-live-dot { background: var(--signal); box-shadow: 0 0 0 3px var(--signal-soft); }
.fr-live-waiting .fr-live-label, .fr-live-paused .fr-live-label, .fr-live-hidden .fr-live-label, .fr-live-blackout .fr-live-label { color: var(--amber); }
.fr-live-waiting .fr-live-dot, .fr-live-paused .fr-live-dot, .fr-live-hidden .fr-live-dot { background: var(--amber); }
.fr-live-blackout .fr-live-dot { background: transparent; border: 1.5px solid var(--amber); width: 6px; height: 6px; border-radius: var(--radius-sm); }
.fr-live-paused .fr-live-dot, .fr-live-hidden .fr-live-dot { border-radius: var(--radius-sm); }
.fr-live-ended .fr-live-dot { background: transparent; border: 1.5px solid var(--ink-muted); width: 5px; height: 5px; }
.fr-live-count { color: var(--ink); padding-left: var(--space-2); border-left: 1px solid var(--line); }
@media (prefers-reduced-motion: no-preference) {
  .fr-live-live .fr-live-dot { animation: fr-pulse 2s ease-in-out infinite; }
  @keyframes fr-pulse { 50% { box-shadow: 0 0 0 5px var(--signal-soft); } }
}

/* JoinCode */
.fr-join { display: inline-flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); padding: var(--space-6);
  background: var(--surface-100); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.fr-join p { margin: 0; }
.fr-join-lead { color: var(--ink-muted); font-size: 16px; line-height: 24px; }
.fr-join-url { font-family: var(--font-mono); font-size: 16px; line-height: 24px; color: var(--ink); }
.fr-join-code { font-family: var(--font-mono); font-weight: 500; font-size: 48px; line-height: 56px; letter-spacing: .08em; color: var(--signal); }
.fr-join-foot { padding-top: var(--space-2); }
.fr-join-stage { padding: calc(var(--space-6) * 2); gap: var(--space-4); }
.fr-join-stage .fr-join-lead { font-size: 36px; line-height: 48px; }
.fr-join-stage .fr-join-url { font-size: 36px; line-height: 48px; }
.fr-join-stage .fr-join-code { font-size: 96px; line-height: 104px; }
.fr-join-stage .fr-live { font-size: 16px; line-height: 24px; }
.fr-join-stage .fr-live-dot { width: 12px; height: 12px; }

/* CodeEntry */
.fr-entry { display: flex; flex-direction: column; gap: var(--space-2); max-width: 360px; }
.fr-entry-label { font-weight: 600; font-size: 16px; line-height: 24px; }
.fr-entry-input { font-family: var(--font-mono); font-weight: 500; font-size: 32px; line-height: 40px; letter-spacing: .3em; text-align: center; text-transform: uppercase;
  height: 64px; padding: 0 var(--space-4); border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--surface-100); color: var(--ink); margin-bottom: var(--space-2); }
.fr-entry-input::placeholder { color: var(--ink-muted); opacity: .5; }
.fr-entry-input:hover { border-color: var(--ink-muted); }
.fr-entry-error .fr-entry-input { border-color: var(--danger); }
.fr-entry-msg { margin: calc(var(--space-2) * -1) 0 var(--space-2); color: var(--danger); font-size: 14px; }

/* AnswerOption */
.fr-answer { display: flex; align-items: center; gap: var(--space-4); width: 100%; min-height: 56px; padding: var(--space-2) var(--space-4) var(--space-2) var(--space-2);
  font: inherit; font-size: 16px; line-height: 24px; text-align: left; color: var(--ink); background: var(--surface-100);
  border: 1px solid var(--line); border-radius: var(--radius-md); cursor: pointer; }
.fr-answer:hover:not(:disabled) { border-color: var(--ink-muted); }
.fr-answer-letter { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-sm);
  font-family: var(--font-mono); font-weight: 500; font-size: 16px; background: var(--surface-000); color: var(--ink); border: 1px solid var(--line); }
.fr-answer-text { flex: 1; }
.fr-answer-result { font-family: var(--font-mono); color: var(--ink-muted); }
.fr-answer-mark { color: var(--signal); }
.fr-answer-selected { border-color: var(--signal); box-shadow: inset 0 0 0 1px var(--signal); }
.fr-answer-selected .fr-answer-letter { background: var(--signal); border-color: var(--signal); color: var(--on-signal); }
.fr-answer-correct { background: var(--signal-soft); border-color: var(--signal); cursor: default; }
.fr-answer-correct .fr-answer-letter { background: var(--signal); border-color: var(--signal); color: var(--on-signal); }
.fr-answer-correct .fr-answer-result { color: var(--signal); }
.fr-answer-other { cursor: default; color: var(--ink-muted); }
.fr-answer-disabled { cursor: not-allowed; opacity: .45; }
.fr-answer-stage { min-height: 112px; gap: var(--space-6); padding: var(--space-4) var(--space-6) var(--space-4) var(--space-4); font-size: 36px; line-height: 48px; }
.fr-answer-stage .fr-answer-letter { width: 80px; height: 80px; font-size: 36px; }
.fr-answer-stage .fr-icon { width: 32px; height: 32px; }

/* PresenterControls */
.fr-controls { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); padding: var(--space-2) var(--space-4);
  background: var(--surface-100); border: 1px solid var(--line); border-radius: var(--radius-md); }
.fr-controls-nav { display: flex; align-items: center; gap: var(--space-2); margin: 0 auto; }
.fr-controls-count { font-family: var(--font-mono); font-size: 13px; line-height: 20px; color: var(--ink-muted); min-width: 56px; text-align: center; }
.fr-controls-extra { display: flex; align-items: center; gap: var(--space-2); }

/* Shared: tags and thumbnails */
.fr-tag { display: inline-block; font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  padding: 0 var(--space-1); border-radius: var(--radius-sm); background: var(--surface-100); color: var(--ink-muted); border: 1px solid var(--line); white-space: nowrap; }
.fr-tag-signal { background: var(--signal-soft); color: var(--signal); border-color: transparent; }
/* no image: the brand's dot grid on the page colour */
.fr-thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--radius-sm); overflow: hidden;
  background-color: var(--surface-000); background-image: radial-gradient(var(--line) 1.5px, transparent 1.6px); background-size: var(--space-4) var(--space-4); background-position: center;
  border: 1px solid var(--line); }
.fr-thumb[style*="url("] { background-size: cover; }
.fr-btn.fr-on { color: var(--signal); background: var(--signal-soft); }

/* SearchField */
.fr-search { display: flex; align-items: center; gap: var(--space-2); height: 40px; padding: 0 var(--space-4); max-width: 360px;
  border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-100); color: var(--ink-muted); }
.fr-search:hover { border-color: var(--ink-muted); }
.fr-search-input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 14px; color: var(--ink); }
.fr-search-input::placeholder { color: var(--ink-muted); }

/* LibraryCard */
.fr-card { box-sizing: border-box; display: flex; flex-direction: column; gap: var(--space-2); width: 100%; padding: var(--space-2); text-align: left; font: inherit; color: var(--ink);
  background: var(--surface-100); border: 1px solid var(--line); border-radius: var(--radius-md); cursor: pointer; }
.fr-card:hover { border-color: var(--ink-muted); }
.fr-card-selected { border-color: var(--signal); box-shadow: inset 0 0 0 1px var(--signal); }
.fr-card-thumb .fr-tag { position: absolute; left: var(--space-2); top: var(--space-2); }
.fr-card-body { display: flex; flex-direction: column; gap: var(--space-1); padding: 0 var(--space-2) var(--space-2); }
.fr-card-title { font-weight: 600; font-size: 16px; line-height: 24px; }
.fr-card-desc { color: var(--ink-muted); font-size: 14px; line-height: 22px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fr-card-meta { font-family: var(--font-mono); font-size: 12px; line-height: 18px; color: var(--ink-muted); }
.fr-library { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-4); }

/* SessionList */
.fr-sessions { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-1); }
.fr-session { display: flex; align-items: center; gap: var(--space-4); width: 100%; min-height: 56px; padding: var(--space-2) var(--space-4) var(--space-2) var(--space-2);
  text-align: left; font: inherit; color: var(--ink); background: transparent; border: 1px solid transparent; border-radius: var(--radius-md); cursor: pointer; }
.fr-session:hover { background: var(--surface-100); border-color: var(--line); }
.fr-session-selected, .fr-session-selected:hover { background: var(--surface-100); border-color: var(--signal); }
.fr-session-num { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  font-family: var(--font-mono); font-weight: 500; font-size: 13px; color: var(--ink-muted); }
.fr-session-done .fr-session-num { color: var(--signal); }
.fr-session-selected .fr-session-num { background: var(--signal); border-color: var(--signal); color: var(--on-signal); }
.fr-session-body { flex: 1; display: flex; flex-direction: column; }
.fr-session-title { font-weight: 600; font-size: 14px; line-height: 22px; }
.fr-session-meta { font-family: var(--font-mono); font-size: 12px; line-height: 18px; color: var(--ink-muted); }

/* VideoItem */
.fr-video { display: flex; align-items: center; gap: var(--space-4); width: 100%; padding: var(--space-2); text-align: left; font: inherit; color: var(--ink);
  background: transparent; border: 1px solid transparent; border-radius: var(--radius-md); cursor: pointer; }
.fr-video:hover { background: var(--surface-100); border-color: var(--line); }
.fr-video-playing, .fr-video-playing:hover { background: var(--surface-100); border-color: var(--signal); }
.fr-video-thumb { flex: none; width: 128px; }
.fr-video-dur { position: absolute; right: var(--space-1); bottom: var(--space-1); padding: 0 var(--space-1); border-radius: var(--radius-sm);
  font-family: var(--font-mono); font-size: 11px; line-height: 16px; background: var(--surface-000); color: var(--ink); }
.fr-video-bar { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--signal); }
.fr-video-play { position: absolute; inset: 0; display: grid; place-items: center; color: var(--signal); }
.fr-video-play .fr-icon { width: 24px; height: 24px; }
.fr-video-body { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.fr-video-title { font-weight: 600; font-size: 14px; line-height: 22px; }
.fr-video-idx { font-family: var(--font-mono); font-weight: 500; color: var(--ink-muted); }
.fr-video-meta { font-size: 12px; line-height: 18px; color: var(--ink-muted); }
.fr-video-watched .fr-video-title { color: var(--ink-muted); }
.fr-video-done { color: var(--signal); padding-right: var(--space-2); }

/* MediaControls */
.fr-media { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-4); background: var(--surface-100); border: 1px solid var(--line); border-radius: var(--radius-md); }
.fr-media-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
.fr-media-title { font-weight: 600; font-size: 16px; line-height: 24px; }
.fr-media-scrub { display: flex; align-items: center; gap: var(--space-4); }
.fr-media-time { font-family: var(--font-mono); font-size: 13px; line-height: 20px; color: var(--ink-muted); min-width: 48px; }
.fr-media-time:last-child { text-align: right; }
.fr-media-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4); }
.fr-media-group { display: flex; align-items: center; gap: var(--space-2); }
.fr-media .fr-media-play.fr-btn-lg { width: 56px; height: 56px; padding: 0; }
.fr-media-play .fr-icon { width: 24px; height: 24px; }
.fr-range { -webkit-appearance: none; appearance: none; flex: 1; height: 24px; margin: 0; background: transparent; cursor: pointer; border-radius: var(--radius-sm); }
.fr-range::-webkit-slider-runnable-track { height: 4px; border-radius: var(--radius-sm); background: linear-gradient(to right, var(--signal) var(--fr-pct, 0%), var(--line) var(--fr-pct, 0%)); }
.fr-range::-moz-range-track { height: 4px; border-radius: var(--radius-sm); background: var(--line); }
.fr-range::-moz-range-progress { height: 4px; border-radius: var(--radius-sm); background: var(--signal); }
.fr-range::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 50%; background: var(--ink); border: 0; }
.fr-range::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--ink); border: 0; }
.fr-range-vol { flex: none; width: 96px; }

/* ---------- Brand ---------- */
.fr-logo { display: block; flex: none; }
.fr-logo-seat { fill: var(--ink-muted); }
.fr-logo-live { fill: var(--signal); }
.fr-logo-word { fill: var(--ink); }
.fr-appicon { display: block; flex: none; }

/* ---------- Website ---------- */
a.fr-btn { text-decoration: none; }
.fr-container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--space-6); box-sizing: border-box; }
.fr-eyebrow { margin: 0 0 var(--space-4); font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--signal); }
.fr-lead { margin: 0; font-size: 20px; line-height: 32px; color: var(--ink-muted); max-width: var(--measure); }
.fr-h2 { margin: 0; font-size: 32px; line-height: 40px; font-weight: 600; letter-spacing: -0.02em; }
.fr-h3 { margin: 0; font-size: 22px; line-height: 30px; font-weight: 600; letter-spacing: -0.01em; }
.fr-textlink { display: inline-flex; align-items: center; gap: var(--space-1); color: var(--signal); font-weight: 600; text-decoration: none; }
.fr-textlink:hover { text-decoration: underline; text-underline-offset: 3px; }
.fr-textlink:focus-visible, .fr-site-link:focus-visible, .fr-site-brand:focus-visible, .fr-site-footer a:focus-visible { outline: none; border-radius: var(--radius-sm); box-shadow: 0 0 0 2px var(--surface-000), 0 0 0 4px var(--signal); }
.fr-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); font-size: 15px; line-height: 24px; }
.fr-checks li { display: flex; gap: var(--space-2); align-items: flex-start; }
.fr-checks .fr-icon { color: var(--signal); margin-top: 4px; }

/* SiteHeader */
.fr-site-header { position: sticky; top: 0; z-index: 10; background: var(--surface-000); border-bottom: 1px solid var(--line); }
.fr-site-header-bar { display: flex; align-items: center; gap: var(--space-8); height: 64px; }
.fr-site-brand { display: flex; color: inherit; }
.fr-site-nav { display: none; gap: var(--space-6); flex: 1; }
.fr-site-link { color: var(--ink-muted); text-decoration: none; font-size: 15px; font-weight: 600; line-height: 24px; }
.fr-site-link:hover, .fr-site-link[aria-current="page"] { color: var(--ink); }
.fr-site-actions { display: none; gap: var(--space-2); margin-left: auto; }
.fr-site-menu { margin-left: auto; }
.fr-site-drawer { display: flex; flex-direction: column; gap: var(--space-4); padding-top: var(--space-4); padding-bottom: var(--space-6); border-top: 1px solid var(--line); }
.fr-site-drawer .fr-site-link { font-size: 17px; }
@media (min-width: 960px) {
  .fr-site-nav, .fr-site-actions { display: flex; }
  .fr-site-menu, .fr-site-drawer { display: none; }
}

/* Hero */
.fr-hero { padding: var(--space-16) 0; }
.fr-hero-inner { display: grid; gap: var(--space-12); align-items: center; }
.fr-hero-title { margin: 0 0 var(--space-6); font-size: 40px; line-height: 44px; font-weight: 600; letter-spacing: -0.03em; max-width: 14em; }
.fr-hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-8); }
.fr-hero-note { margin: var(--space-4) 0 0; font-size: 14px; line-height: 22px; color: var(--ink-muted); }
.fr-hero-aside { display: flex; justify-content: center; }
@media (min-width: 640px) { .fr-hero-title { font-size: 64px; line-height: 68px; } .fr-h2 { font-size: 40px; line-height: 48px; } }
@media (min-width: 960px) {
  .fr-hero { padding: var(--space-24) 0; }
  .fr-hero-split .fr-hero-inner { grid-template-columns: 7fr 5fr; }
}

/* Section */
.fr-section { padding: var(--space-16) 0; border-top: 1px solid var(--line); }
.fr-section-raised { background: var(--surface-100); }
.fr-section-head { margin-bottom: var(--space-12); max-width: var(--measure); }
.fr-section-head .fr-lead { margin-top: var(--space-4); }
.fr-section-center .fr-section-head { margin-left: auto; margin-right: auto; text-align: center; }
.fr-section-center .fr-section-head .fr-lead { margin-left: auto; margin-right: auto; }
@media (min-width: 960px) { .fr-section { padding: var(--space-24) 0; } }
.fr-grid-3 { display: grid; gap: var(--space-8); }
@media (min-width: 960px) { .fr-grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* AppTile */
.fr-apptile { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-6); background: var(--surface-100); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.fr-section-raised .fr-apptile { background: var(--surface-000); }
.fr-apptile-tag { margin: calc(var(--space-2) * -1) 0 0; color: var(--ink-muted); font-size: 17px; line-height: 28px; }
.fr-apptile .fr-checks { flex: 1; }

/* Steps */
.fr-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-8); counter-reset: none; }
@media (min-width: 960px) { .fr-steps { grid-template-columns: repeat(3, 1fr); } }
.fr-step { display: flex; flex-direction: column; gap: var(--space-2); padding-top: var(--space-4); border-top: 2px solid var(--line); }
.fr-step:first-child { border-top-color: var(--signal); }
.fr-step-num { font-family: var(--font-mono); font-size: 13px; line-height: 20px; font-weight: 500; color: var(--signal); margin-bottom: var(--space-2); }
.fr-step-text { margin: 0; color: var(--ink-muted); font-size: 17px; line-height: 28px; }
.fr-step-aside { margin-top: var(--space-4); }

/* PricingCard */
.fr-price { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-6); background: var(--surface-100); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.fr-price-featured { border-color: var(--signal); box-shadow: inset 0 0 0 1px var(--signal); }
.fr-price-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.fr-price-desc { margin: 0; color: var(--ink-muted); font-size: 15px; line-height: 24px; min-height: 48px; }
.fr-price-amount { margin: 0 0 var(--space-2); }
.fr-price-num { font-size: 40px; line-height: 48px; font-weight: 600; letter-spacing: -0.02em; }
.fr-price-per { color: var(--ink-muted); font-size: 15px; }
.fr-price .fr-checks { padding-top: var(--space-4); border-top: 1px solid var(--line); }
.fr-price-note { margin: 0; font-size: 13px; line-height: 20px; color: var(--ink-muted); }

/* SiteFooter */
.fr-site-footer { padding: var(--space-16) 0 var(--space-8); border-top: 1px solid var(--line); background: var(--surface-000); font-size: 15px; line-height: 24px; }
.fr-footer-grid { display: grid; gap: var(--space-8); grid-template-columns: repeat(2, 1fr); }
.fr-footer-brand { grid-column: 1 / -1; display: flex; flex-direction: column; gap: var(--space-4); max-width: 320px; }
.fr-footer-brand p { margin: 0; color: var(--ink-muted); }
.fr-footer-join a { font-family: var(--font-mono); color: var(--ink); }
.fr-footer-title { margin: 0 0 var(--space-4); font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); }
.fr-footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.fr-footer-col a { color: var(--ink); text-decoration: none; }
.fr-footer-col a:hover { color: var(--signal); }
.fr-footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-4); margin-top: var(--space-12); padding-top: var(--space-6); border-top: 1px solid var(--line); color: var(--ink-muted); font-size: 13px; }
@media (min-width: 960px) { .fr-footer-grid { grid-template-columns: 2fr repeat(3, 1fr); } .fr-footer-brand { grid-column: auto; } }

/* Coming soon */
.fr-tag-soon { margin-left: var(--space-2); vertical-align: 2px; }
.fr-apptile-top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-2); }
.fr-apptile-top .fr-tag-soon { margin-left: 0; }
.fr-apptile-soon { background: transparent; border-style: dashed; }
.fr-section-raised .fr-apptile-soon { background: transparent; }
.fr-apptile-soon .fr-checks .fr-icon { color: var(--ink-muted); }
.fr-textlink-quiet { color: var(--ink); }
.fr-grid-4 { display: grid; gap: var(--space-6); }
@media (min-width: 640px) { .fr-grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .fr-grid-4 { grid-template-columns: repeat(4, 1fr); } }

/* SyncIndicator — eight seats in a ring; seat 1 is at 12 o'clock, then clockwise */
.fr-sync { display: inline-flex; align-items: center; gap: var(--space-2); vertical-align: middle; }
.fr-sync-ring { display: block; flex: none; }
.fr-sync-base { fill: var(--ink-muted); opacity: .45; }
.fr-sync-on { fill: var(--signal); transition: opacity .4s ease; }
.fr-sync-label { font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); }
/* indeterminate, reduced motion: one lit seat, no movement */
.fr-sync:not(.fr-sync-static) .fr-sync-seat:first-child .fr-sync-base { fill: var(--signal); opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .fr-sync:not(.fr-sync-static) .fr-sync-seat:first-child .fr-sync-base { fill: var(--ink-muted); opacity: .45; }
  /* determinate: the seat being worked on breathes */
  .fr-sync-next .fr-sync-base { animation: fr-sync-breathe 1.2s ease-in-out infinite; }
  @keyframes fr-sync-breathe { 50% { fill: var(--signal); opacity: .7; } }
  /* orbit: one green seat travels round, with a short fading trail */
  .fr-sync-orbit .fr-sync-base { animation: fr-sync-orbit 1.2s linear infinite; }
  @keyframes fr-sync-orbit { 0%, 10% { fill: var(--signal); opacity: 1; } 30%, 100% { fill: var(--ink-muted); opacity: .45; } }
  .fr-sync-orbit .fr-sync-seat:nth-child(1) .fr-sync-base { animation-delay: -1.20s; }
  .fr-sync-orbit .fr-sync-seat:nth-child(2) .fr-sync-base { animation-delay: -1.05s; }
  .fr-sync-orbit .fr-sync-seat:nth-child(3) .fr-sync-base { animation-delay: -0.90s; }
  .fr-sync-orbit .fr-sync-seat:nth-child(4) .fr-sync-base { animation-delay: -0.75s; }
  .fr-sync-orbit .fr-sync-seat:nth-child(5) .fr-sync-base { animation-delay: -0.60s; }
  .fr-sync-orbit .fr-sync-seat:nth-child(6) .fr-sync-base { animation-delay: -0.45s; }
  .fr-sync-orbit .fr-sync-seat:nth-child(7) .fr-sync-base { animation-delay: -0.30s; }
  .fr-sync-orbit .fr-sync-seat:nth-child(8) .fr-sync-base { animation-delay: -0.15s; }
  /* fill / drain with no progress: a looping demo of the same motion */
  .fr-sync-fill:not(.fr-sync-static) .fr-sync-base, .fr-sync-drain:not(.fr-sync-static) .fr-sync-base { animation-duration: 2.4s; animation-iteration-count: infinite; animation-timing-function: ease-out; }
  .fr-sync-fill:not(.fr-sync-static) .fr-sync-seat:nth-child(1) .fr-sync-base { animation-name: fr-sync-fill-1; }
  @keyframes fr-sync-fill-1 { 0%, 4% { fill: var(--ink-muted); opacity: .45; } 7%, 80% { fill: var(--signal); opacity: 1; } 90%, 100% { fill: var(--ink-muted); opacity: .45; } }
  .fr-sync-fill:not(.fr-sync-static) .fr-sync-seat:nth-child(2) .fr-sync-base { animation-name: fr-sync-fill-2; }
  @keyframes fr-sync-fill-2 { 0%, 12% { fill: var(--ink-muted); opacity: .45; } 15%, 80% { fill: var(--signal); opacity: 1; } 90%, 100% { fill: var(--ink-muted); opacity: .45; } }
  .fr-sync-fill:not(.fr-sync-static) .fr-sync-seat:nth-child(3) .fr-sync-base { animation-name: fr-sync-fill-3; }
  @keyframes fr-sync-fill-3 { 0%, 20% { fill: var(--ink-muted); opacity: .45; } 23%, 80% { fill: var(--signal); opacity: 1; } 90%, 100% { fill: var(--ink-muted); opacity: .45; } }
  .fr-sync-fill:not(.fr-sync-static) .fr-sync-seat:nth-child(4) .fr-sync-base { animation-name: fr-sync-fill-4; }
  @keyframes fr-sync-fill-4 { 0%, 28% { fill: var(--ink-muted); opacity: .45; } 31%, 80% { fill: var(--signal); opacity: 1; } 90%, 100% { fill: var(--ink-muted); opacity: .45; } }
  .fr-sync-fill:not(.fr-sync-static) .fr-sync-seat:nth-child(5) .fr-sync-base { animation-name: fr-sync-fill-5; }
  @keyframes fr-sync-fill-5 { 0%, 36% { fill: var(--ink-muted); opacity: .45; } 39%, 80% { fill: var(--signal); opacity: 1; } 90%, 100% { fill: var(--ink-muted); opacity: .45; } }
  .fr-sync-fill:not(.fr-sync-static) .fr-sync-seat:nth-child(6) .fr-sync-base { animation-name: fr-sync-fill-6; }
  @keyframes fr-sync-fill-6 { 0%, 44% { fill: var(--ink-muted); opacity: .45; } 47%, 80% { fill: var(--signal); opacity: 1; } 90%, 100% { fill: var(--ink-muted); opacity: .45; } }
  .fr-sync-fill:not(.fr-sync-static) .fr-sync-seat:nth-child(7) .fr-sync-base { animation-name: fr-sync-fill-7; }
  @keyframes fr-sync-fill-7 { 0%, 52% { fill: var(--ink-muted); opacity: .45; } 55%, 80% { fill: var(--signal); opacity: 1; } 90%, 100% { fill: var(--ink-muted); opacity: .45; } }
  .fr-sync-fill:not(.fr-sync-static) .fr-sync-seat:nth-child(8) .fr-sync-base { animation-name: fr-sync-fill-8; }
  @keyframes fr-sync-fill-8 { 0%, 60% { fill: var(--ink-muted); opacity: .45; } 63%, 80% { fill: var(--signal); opacity: 1; } 90%, 100% { fill: var(--ink-muted); opacity: .45; } }
  .fr-sync-drain:not(.fr-sync-static) .fr-sync-seat:nth-child(1) .fr-sync-base { animation-name: fr-sync-drain-1; }
  @keyframes fr-sync-drain-1 { 0%, 14% { fill: var(--signal); opacity: 1; } 17%, 88% { fill: var(--ink-muted); opacity: .45; } 98%, 100% { fill: var(--signal); opacity: 1; } }
  .fr-sync-drain:not(.fr-sync-static) .fr-sync-seat:nth-child(2) .fr-sync-base { animation-name: fr-sync-drain-2; }
  @keyframes fr-sync-drain-2 { 0%, 22% { fill: var(--signal); opacity: 1; } 25%, 88% { fill: var(--ink-muted); opacity: .45; } 98%, 100% { fill: var(--signal); opacity: 1; } }
  .fr-sync-drain:not(.fr-sync-static) .fr-sync-seat:nth-child(3) .fr-sync-base { animation-name: fr-sync-drain-3; }
  @keyframes fr-sync-drain-3 { 0%, 30% { fill: var(--signal); opacity: 1; } 33%, 88% { fill: var(--ink-muted); opacity: .45; } 98%, 100% { fill: var(--signal); opacity: 1; } }
  .fr-sync-drain:not(.fr-sync-static) .fr-sync-seat:nth-child(4) .fr-sync-base { animation-name: fr-sync-drain-4; }
  @keyframes fr-sync-drain-4 { 0%, 38% { fill: var(--signal); opacity: 1; } 41%, 88% { fill: var(--ink-muted); opacity: .45; } 98%, 100% { fill: var(--signal); opacity: 1; } }
  .fr-sync-drain:not(.fr-sync-static) .fr-sync-seat:nth-child(5) .fr-sync-base { animation-name: fr-sync-drain-5; }
  @keyframes fr-sync-drain-5 { 0%, 46% { fill: var(--signal); opacity: 1; } 49%, 88% { fill: var(--ink-muted); opacity: .45; } 98%, 100% { fill: var(--signal); opacity: 1; } }
  .fr-sync-drain:not(.fr-sync-static) .fr-sync-seat:nth-child(6) .fr-sync-base { animation-name: fr-sync-drain-6; }
  @keyframes fr-sync-drain-6 { 0%, 54% { fill: var(--signal); opacity: 1; } 57%, 88% { fill: var(--ink-muted); opacity: .45; } 98%, 100% { fill: var(--signal); opacity: 1; } }
  .fr-sync-drain:not(.fr-sync-static) .fr-sync-seat:nth-child(7) .fr-sync-base { animation-name: fr-sync-drain-7; }
  @keyframes fr-sync-drain-7 { 0%, 62% { fill: var(--signal); opacity: 1; } 65%, 88% { fill: var(--ink-muted); opacity: .45; } 98%, 100% { fill: var(--signal); opacity: 1; } }
  .fr-sync-drain:not(.fr-sync-static) .fr-sync-seat:nth-child(8) .fr-sync-base { animation-name: fr-sync-drain-8; }
  @keyframes fr-sync-drain-8 { 0%, 70% { fill: var(--signal); opacity: 1; } 73%, 88% { fill: var(--ink-muted); opacity: .45; } 98%, 100% { fill: var(--signal); opacity: 1; } }
}

/* ---------- Form controls ---------- */
.fr-field { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.fr-field-label { font-size: 14px; line-height: 22px; font-weight: 600; color: var(--ink); }
.fr-field-opt { margin-left: var(--space-2); font-weight: 400; font-size: 13px; color: var(--ink-muted); }
.fr-field-help { margin: 0; font-size: 13px; line-height: 20px; color: var(--ink-muted); max-width: 60ch; }
.fr-field-msg { margin: 0; display: flex; gap: var(--space-1); align-items: flex-start; font-size: 13px; line-height: 20px; color: var(--danger); }
.fr-field-msg .fr-icon { margin-top: 2px; }
.fr-field-msg + .fr-field-help { display: none; }

/* the box every text-like control sits in */
.fr-control { position: relative; display: flex; align-items: center; gap: var(--space-2); height: 40px; padding: 0 var(--space-4); box-sizing: border-box;
  background: var(--surface-100); border: 1px solid var(--line); border-radius: var(--radius-md); color: var(--ink); }
.fr-control-lg { height: 48px; }
.fr-control:hover { border-color: var(--ink-muted); }
.fr-control-invalid, .fr-control-invalid:hover { border-color: var(--danger); }
.fr-control-disabled { opacity: .45; pointer-events: none; }
.fr-control-input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; padding: 0; background: transparent; color: inherit; font: inherit; font-size: 14px; }
.fr-control-lg .fr-control-input { font-size: 16px; }
.fr-control-input::placeholder { color: var(--ink-muted); opacity: .8; }
.fr-control-affix { flex: none; font-family: var(--font-mono); font-size: 13px; color: var(--ink-muted); white-space: nowrap; }
.fr-control-count { flex: none; font-family: var(--font-mono); font-size: 11px; color: var(--ink-muted); }
/* number */
.fr-control-number { padding: 0 2px; gap: 0; width: 184px; }
.fr-control-number .fr-control-input { text-align: center; font-family: var(--font-mono); font-size: 15px; }
.fr-control-unit { padding-right: var(--space-2); }
.fr-control-step { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--ink); cursor: pointer; }
.fr-control-lg .fr-control-step { width: 42px; height: 42px; }
.fr-control-step:hover:not(:disabled) { background: var(--surface-000); }
.fr-control-step:disabled { color: var(--ink-muted); opacity: .5; cursor: not-allowed; }
/* select */
.fr-control-select { padding: 0; }
.fr-control-select .fr-control-input { -webkit-appearance: none; appearance: none; padding: 0 40px 0 var(--space-4); cursor: pointer; }
.fr-control-select .fr-control-input option { background: var(--surface-100); color: var(--ink); }
.fr-control-chevron { position: absolute; right: var(--space-4); top: 50%; transform: translateY(-50%); color: var(--ink-muted); pointer-events: none; }
/* PIN */
.fr-pin { display: inline-flex; align-items: center; gap: var(--space-2); }
.fr-pin-box { width: 48px; height: 56px; box-sizing: border-box; text-align: center; padding: 0; font-family: var(--font-mono); font-weight: 500; font-size: 24px; color: var(--ink);
  background: var(--surface-100); border: 1px solid var(--line); border-radius: var(--radius-md); outline: 0; caret-color: var(--signal); }
.fr-pin-box:hover { border-color: var(--ink-muted); }
.fr-pin-invalid .fr-pin-box { border-color: var(--danger); }
.fr-pin-box:disabled { opacity: .45; }
.fr-pin-reveal { margin-left: var(--space-1); }
/* checkbox */
.fr-check, .fr-toggle-row { display: flex; gap: var(--space-4); align-items: flex-start; }
.fr-check-box { position: relative; flex: none; width: 20px; height: 20px; margin-top: 1px; }
.fr-check-input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.fr-check-mark { display: grid; place-items: center; width: 20px; height: 20px; box-sizing: border-box; border: 1.5px solid var(--ink-muted); border-radius: var(--radius-sm); color: transparent; pointer-events: none; }
.fr-check-input:hover + .fr-check-mark { border-color: var(--ink); }
.fr-check-input:checked + .fr-check-mark { background: var(--signal); border-color: var(--signal); color: var(--on-signal); }
.fr-check-mark .fr-icon { width: 14px; height: 14px; stroke-width: 2; }
.fr-check-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.fr-check-label { font-size: 14px; line-height: 22px; font-weight: 600; color: var(--ink); cursor: pointer; }
.fr-check-desc { font-size: 13px; line-height: 20px; color: var(--ink-muted); }
.fr-check-disabled { opacity: .45; }
.fr-check-disabled * { cursor: not-allowed; }
/* toggle — square-cornered, like the rest of the system */
.fr-toggle-row { align-items: center; }
.fr-toggle { flex: none; display: inline-flex; align-items: center; gap: var(--space-2); padding: 0; border: 0; background: transparent; cursor: pointer; font: inherit; color: var(--ink-muted); }
.fr-toggle-knob { position: relative; width: 40px; height: 24px; box-sizing: border-box; border: 1.5px solid var(--ink-muted); border-radius: var(--radius-md); background: transparent; transition: background-color .15s ease, border-color .15s ease; }
.fr-toggle-knob::after { content: ""; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: var(--radius-sm); background: var(--ink-muted); transition: transform .15s ease, background-color .15s ease; }
.fr-toggle-on .fr-toggle-knob { background: var(--signal); border-color: var(--signal); }
.fr-toggle-on .fr-toggle-knob::after { transform: translateX(16px); background: var(--on-signal); }
.fr-toggle-state { order: -1; min-width: 24px; text-align: right; font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }
.fr-toggle-on .fr-toggle-state { color: var(--signal); }
.fr-toggle:disabled { cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) { .fr-toggle-knob, .fr-toggle-knob::after { transition: none; } }
/* settings layout helpers */
.fr-form { display: flex; flex-direction: column; gap: var(--space-6); }
.fr-form-group { display: flex; flex-direction: column; gap: var(--space-4); padding-top: var(--space-6); border-top: 1px solid var(--line); }
.fr-form-title { margin: 0; font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); }

/* ---------- Shared-screen states ---------- */
/* StageScreen fills its box at 16:9 and scales with it: every size is in container units (1cqw = 1% of the width, 19.2px on a 1920 screen) */
.fr-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; container-type: inline-size; overflow: hidden; box-sizing: border-box;
  display: flex; flex-direction: column; justify-content: space-between; padding: 3.75cqw 4.2cqw; background: var(--surface-000); color: var(--ink); font-family: var(--font-sans); }
.fr-stage p, .fr-stage h1 { margin: 0; }
.fr-stage-top { display: flex; align-items: center; justify-content: space-between; }
.fr-stage-top .fr-logo { height: 1.7cqw; width: auto; }
.fr-stage-top .fr-live { font-size: 1.05cqw; line-height: 1.5cqw; gap: .6cqw; }
.fr-stage-top .fr-live-dot { width: .65cqw; height: .65cqw; }
.fr-stage-top .fr-live-count { padding-left: .6cqw; }
.fr-stage-title { font-size: 3.75cqw; line-height: 1.06; font-weight: 600; letter-spacing: -0.02em; }
.fr-stage-msg { font-size: 1.9cqw; line-height: 1.33; color: var(--ink-muted); max-width: 40ch; }
.fr-stage-eyebrow { font-family: var(--font-mono); font-size: 1.05cqw; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--signal); margin-bottom: 1.25cqw !important; }
.fr-stage-split { display: grid; grid-template-columns: 1fr auto; gap: 4cqw; align-items: center; }
.fr-stage-copy { display: flex; flex-direction: column; gap: 1.25cqw; }
.fr-stage-joinbox { display: flex; flex-direction: column; gap: .6cqw; padding: 2.5cqw 3cqw; background: var(--surface-100); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.fr-stage-joinlead { font-size: 1.9cqw; color: var(--ink-muted); }
.fr-stage-joinurl { font-family: var(--font-mono); font-size: 1.9cqw; }
.fr-stage-joincode { font-family: var(--font-mono); font-weight: 500; font-size: 5cqw; line-height: 1.1; letter-spacing: .08em; color: var(--signal); }
.fr-stage-center { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1.6cqw; }
.fr-stage-center .fr-stage-msg { margin: 0 auto; }
.fr-stage-mark { width: 4.2cqw; height: 4.2cqw; margin-bottom: .8cqw; }
.fr-stage-foot { display: flex; justify-content: flex-end; min-height: 2cqw; }
.fr-stage-join { display: flex; gap: 1cqw; align-items: baseline; font-family: var(--font-mono); font-size: 1.9cqw; color: var(--ink-muted); }
.fr-stage-join-code { color: var(--ink); font-weight: 500; letter-spacing: .08em; }
.fr-stage-hidden .fr-stage-title { color: var(--ink); }
.fr-stage-ended .fr-logo-live { fill: var(--ink-muted); }
.fr-stage-ended .fr-stage-mark .fr-logo-live { fill: var(--ink-muted); }
/* blackout: true black in both themes, nothing on it, no cursor */
.fr-stage-blackout { background: #000; cursor: none; padding: 0; }

/* ScreenSwitch */
.fr-screenswitch { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-4); background: var(--surface-100); border: 1px solid var(--line); border-radius: var(--radius-md); }
.fr-screenswitch-off { border-color: var(--amber); }
.fr-screenswitch-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
.fr-screenswitch-title { font-weight: 600; font-size: 14px; line-height: 22px; }
.fr-screenswitch-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 2px; background: var(--surface-000); border: 1px solid var(--line); border-radius: var(--radius-md); }
.fr-screenswitch-opt { display: flex; align-items: center; justify-content: center; gap: var(--space-2); height: 44px; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--ink-muted); cursor: pointer; }
.fr-screenswitch-opt:hover:not(.fr-screenswitch-on) { color: var(--ink); background: var(--surface-100); }
.fr-screenswitch-on { color: var(--ink); background: var(--surface-100); border-color: var(--line); }
.fr-screenswitch-on.fr-screenswitch-live { color: var(--on-signal); background: var(--signal); border-color: var(--signal); }
.fr-screenswitch-on.fr-screenswitch-hidden, .fr-screenswitch-on.fr-screenswitch-blackout { color: var(--amber); border-color: var(--amber); }
.fr-screenswitch-says { margin: 0; font-size: 13px; line-height: 20px; color: var(--ink-muted); }
.fr-kbd { font-family: var(--font-mono); font-size: 10px; line-height: 14px; padding: 0 4px; border: 1px solid currentColor; border-radius: var(--radius-sm); opacity: .7; }

/* LibraryCard problem states and the add card */
.fr-card-problem { cursor: default; border-style: dashed; border-color: var(--amber); }
.fr-card-problem:hover { border-color: var(--amber); }
.fr-card-thumb-problem { background-image: none; display: grid; place-items: center; }
.fr-card-problem-icon { color: var(--amber); }
.fr-card-problem-icon .fr-icon { width: 28px; height: 28px; }
.fr-card-problem .fr-card-title { color: var(--ink-muted); }
.fr-card-issue { font-size: 13px; line-height: 20px; color: var(--ink); }
.fr-tag-warn { color: var(--amber); border-color: var(--amber); background: transparent; }
.fr-card-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }
.fr-card-add { border-style: dashed; background: transparent; }
.fr-card-add:hover { border-color: var(--signal); }
.fr-card-add:hover .fr-card-add-plus { background: var(--signal); color: var(--on-signal); border-color: var(--signal); }
.fr-card-add-thumb { display: grid; place-items: center; background-color: transparent; }
.fr-card-add-plus { display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--radius-md); border: 1.5px solid var(--ink-muted); color: var(--ink); background: var(--surface-100); transition: background-color .15s ease, color .15s ease; }
.fr-card-add-plus .fr-icon { width: 20px; height: 20px; }
.fr-card-add-over { border-color: var(--signal); border-style: solid; background: var(--signal-soft); }
.fr-card-add-over .fr-card-add-plus { background: var(--signal); color: var(--on-signal); border-color: var(--signal); }
.fr-card-add-over .fr-card-title { color: var(--signal); }
.fr-library > .fr-card { min-width: 0; }
.fr-card-actions .fr-btn { max-width: 100%; }
.fr-card-actions .fr-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Editing ---------- */
/* SortableList */
.fr-sort-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.fr-sort-row { position: relative; display: flex; align-items: center; gap: var(--space-2); }
.fr-sort-handle { flex: none; display: grid; place-items: center; width: 28px; height: 44px; padding: 0; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--ink-muted); cursor: grab; touch-action: none; }
.fr-sort-handle:hover { color: var(--ink); background: var(--surface-100); }
.fr-sort-dragging, .fr-sort-dragging * { cursor: grabbing !important; user-select: none; }
.fr-sort-num { flex: none; width: 24px; font-family: var(--font-mono); font-size: 13px; color: var(--ink-muted); text-align: right; }
.fr-sort-body { flex: 1; min-width: 0; }
.fr-sort-lifted { opacity: .45; }
.fr-sort-lifted .fr-sort-body > * { border-style: dashed; }
.fr-sort-grabbed .fr-sort-handle { color: var(--on-signal); background: var(--signal); }
.fr-sort-grabbed .fr-sort-body > * { border-color: var(--signal); box-shadow: inset 0 0 0 1px var(--signal); }
.fr-sort-drop-before::before, .fr-sort-endline { content: ""; display: block; height: 2px; background: var(--signal); border-radius: var(--radius-sm); }
.fr-sort-drop-before::before { position: absolute; left: 0; right: 0; top: -5px; }
.fr-sort-endline { list-style: none; margin-top: -3px; }

/* InlineEdit */
.fr-inline { display: inline-flex; align-items: center; min-width: 0; max-width: 100%; vertical-align: middle; }
.fr-inline-show { display: inline-flex; align-items: center; gap: var(--space-2); min-width: 0; max-width: calc(100% + 12px); margin: -2px -6px; padding: 2px 6px; border: 1px solid transparent; border-radius: var(--radius-sm);
  background: transparent; font: inherit; color: inherit; text-align: left; cursor: text; }
.fr-inline-show:hover:not(:disabled) { border-color: var(--line); background: var(--surface-100); }
.fr-inline-text { font-weight: 600; font-size: 14px; line-height: 22px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-inline-empty { color: var(--ink-muted); font-weight: 400; font-style: italic; }
.fr-inline-pen { flex: none; color: var(--ink-muted); opacity: 0; transition: opacity .1s; }
.fr-inline-show:hover .fr-inline-pen, .fr-inline-show:focus-visible .fr-inline-pen { opacity: 1; }
.fr-inline-editing { flex-direction: column; align-items: stretch; gap: 2px; width: 100%; }
.fr-inline-input { margin: -2px -6px; padding: 1px 5px; border: 1px solid var(--signal); border-radius: var(--radius-sm); background: var(--surface-000); color: var(--ink);
  font: inherit; font-weight: 600; font-size: 14px; line-height: 22px; outline: 0; min-width: 0; }
.fr-inline-hint { font-family: var(--font-mono); font-size: 11px; line-height: 16px; color: var(--ink-muted); }
.fr-inline-lg .fr-inline-text, .fr-inline-lg .fr-inline-input { font-size: 24px; line-height: 32px; letter-spacing: -0.01em; }
.fr-inline-disabled .fr-inline-show { cursor: default; }

/* FileRow */
.fr-file { display: flex; align-items: center; gap: var(--space-4); min-height: 56px; padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4); box-sizing: border-box;
  background: var(--surface-100); border: 1px solid var(--line); border-radius: var(--radius-md); }
.fr-file-icon { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius-sm); background: var(--surface-000); color: var(--ink-muted); }
.fr-file-icon .fr-icon { width: 18px; height: 18px; }
.fr-file-icon-warn { color: var(--amber); }
.fr-file-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fr-file-title { font-weight: 600; font-size: 14px; line-height: 22px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-file-meta { font-family: var(--font-mono); font-size: 12px; line-height: 18px; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-file-issue { font-size: 13px; line-height: 20px; color: var(--ink); }
.fr-file-actions { flex: none; display: flex; align-items: center; gap: var(--space-1); }
.fr-file-dur { font-family: var(--font-mono); font-size: 12px; color: var(--ink-muted); padding: 0 var(--space-2); }
.fr-file-missing, .fr-file-locating { border-style: dashed; border-color: var(--amber); }
.fr-file-missing .fr-inline-text, .fr-file-missing .fr-file-title { color: var(--ink-muted); }
.fr-file-uploading .fr-file-icon { background: transparent; }
.fr-file-looking { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--ink-muted); }

/* ---------- Feedback ---------- */
/* Banner: a full outline in the tone, an icon tile, text — no coloured side stripe */
.fr-banner { display: flex; gap: var(--space-4); align-items: flex-start; padding: var(--space-4); box-sizing: border-box; background: var(--surface-100); border: 1px solid var(--line); border-radius: var(--radius-md); }
.fr-banner-icon { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--radius-sm); background: var(--surface-000); color: var(--ink); }
.fr-banner-icon .fr-icon { width: 18px; height: 18px; }
.fr-banner-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding-top: 3px; }
.fr-banner-title { margin: 0; font-weight: 600; font-size: 14px; line-height: 22px; }
.fr-banner-text { font-size: 14px; line-height: 22px; color: var(--ink-muted); }
.fr-banner-text p { margin: 0; }
.fr-banner-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }
.fr-banner-close { margin: -4px -4px 0 0; }
.fr-banner-warning { border-color: var(--amber); }
.fr-banner-warning .fr-banner-icon { color: var(--amber); }
.fr-banner-error { border-color: var(--danger); }
.fr-banner-error .fr-banner-icon { color: var(--danger); }
.fr-banner-success { border-color: var(--signal); }
.fr-banner-success .fr-banner-icon { color: var(--signal); }

/* Toast */
.fr-toaster { position: fixed; z-index: 50; left: 50%; bottom: var(--space-6); transform: translateX(-50%); display: flex; flex-direction: column; gap: var(--space-2); align-items: center; width: max-content; max-width: calc(100vw - 32px); pointer-events: none; }
.fr-toaster-inline { position: absolute; }
@media (min-width: 960px) { .fr-toaster:not(.fr-toaster-inline) { left: auto; right: var(--space-6); transform: none; align-items: flex-end; } }
.fr-toast { pointer-events: auto; display: flex; align-items: center; gap: var(--space-2); min-height: 44px; max-width: 440px; padding: var(--space-1) var(--space-1) var(--space-1) var(--space-4); box-sizing: border-box;
  background: var(--ink); color: var(--surface-000); border-radius: var(--radius-md); font-size: 14px; line-height: 20px; }
@media (prefers-reduced-motion: no-preference) { .fr-toast { animation: fr-toast-in .18s ease-out; } @keyframes fr-toast-in { from { opacity: 0; transform: translateY(8px); } } }
.fr-toast-icon { flex: none; display: grid; }
.fr-toast-success .fr-toast-icon { color: var(--signal-soft); }
.fr-toast-error { background: var(--danger); color: var(--on-signal); }
.fr-toast-text { flex: 1; padding: var(--space-2) 0; }
.fr-toast-action { flex: none; height: 36px; padding: 0 var(--space-2); border: 0; border-radius: var(--radius-sm); background: transparent; color: inherit; font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.fr-toast-close { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: var(--radius-sm); background: transparent; color: inherit; opacity: .7; cursor: pointer; }
.fr-toast-action:hover, .fr-toast-close:hover { background: color-mix(in srgb, currentColor 14%, transparent); opacity: 1; }

/* ConfirmDialog */
.fr-dialog-scrim { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: var(--space-4); background: color-mix(in srgb, var(--surface-000) 78%, transparent); }
.fr-dialog-inline { position: absolute; }
.fr-dialog { width: 100%; max-width: 440px; box-sizing: border-box; display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-6);
  background: var(--surface-100); border: 1px solid var(--line); border-radius: var(--radius-lg); }
@media (prefers-reduced-motion: no-preference) { .fr-dialog { animation: fr-dialog-in .16s ease-out; } @keyframes fr-dialog-in { from { opacity: 0; transform: translateY(6px); } } }
.fr-dialog-title { margin: 0; font-size: 20px; line-height: 28px; font-weight: 600; letter-spacing: -0.01em; }
.fr-dialog-text { color: var(--ink-muted); font-size: 14px; line-height: 22px; }
.fr-dialog-text p { margin: 0 0 var(--space-2); } .fr-dialog-text p:last-child { margin: 0; }
.fr-dialog-word { font-family: var(--font-mono); color: var(--ink); letter-spacing: .06em; }
.fr-dialog-actions { display: flex; justify-content: flex-end; gap: var(--space-2); margin-top: var(--space-2); }

/* EmptyState */
.fr-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-2); margin: 0 auto; max-width: 420px; padding: var(--space-12) var(--space-6); }
.fr-empty-compact { padding: var(--space-6) var(--space-4); }
.fr-empty-art { width: 64px; height: 64px; margin-bottom: var(--space-4); }
.fr-empty-compact .fr-empty-art { width: 40px; height: 40px; margin-bottom: var(--space-2); }
.fr-empty-seat { fill: var(--ink-muted); opacity: .45; }
.fr-empty-wait { fill: none; stroke: var(--signal); stroke-width: 1; stroke-dasharray: 2 1.6; }
.fr-empty-title { margin: 0; font-size: 20px; line-height: 28px; font-weight: 600; letter-spacing: -0.01em; }
.fr-empty-compact .fr-empty-title { font-size: 16px; line-height: 24px; }
.fr-empty-text { color: var(--ink-muted); font-size: 14px; line-height: 22px; }
.fr-empty-text p { margin: 0; }
.fr-empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2); margin-top: var(--space-4); }

/* ---------- QR codes ---------- */
/* fixed colours: dark modules on a white tile in both themes, so every camera reads it */
.fr-qr { display: block; flex: none; }
.fr-qr-tile { fill: #ffffff; }
.fr-qr-dot, .fr-qr-eye { fill: #0b0d10; }
.fr-qr-eye-in { fill: #0a7d58; }
/* JoinCode with a QR */
.fr-join-qr { flex-direction: row; align-items: center; gap: var(--space-6); }
.fr-join-text { display: flex; flex-direction: column; gap: var(--space-2); }
.fr-join-stage.fr-join-qr { gap: calc(var(--space-6) * 2); }
.fr-join-stage.fr-join-qr .fr-join-text { gap: var(--space-4); }
.fr-join-compact.fr-join-qr { gap: var(--space-4); padding: var(--space-4); }
/* StageScreen join box with a QR */
.fr-stage-joinbox-qr { align-items: flex-start; }
.fr-stage-joinbox-qr .fr-stage-qr { width: 18cqw; height: 18cqw; margin-bottom: 1.2cqw; }
/* QRCard */
.fr-qrcard { display: flex; gap: var(--space-6); align-items: center; padding: var(--space-6); background: var(--surface-100); border: 1px solid var(--line); border-radius: var(--radius-lg); max-width: 560px; box-sizing: border-box; }
.fr-qrcard-body { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.fr-qrcard-title { margin: 0; font-size: 20px; line-height: 28px; font-weight: 600; letter-spacing: -0.01em; }
.fr-qrcard-text { margin: 0; font-size: 14px; line-height: 22px; color: var(--ink-muted); }
.fr-qrcard-alt { margin: var(--space-2) 0 0; font-size: 13px; line-height: 20px; color: var(--ink-muted); }
.fr-qrcard-mono { font-family: var(--font-mono); color: var(--ink); }
.fr-qrcard-code { letter-spacing: .08em; font-weight: 500; }
.fr-qrcard-expiry { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; margin-top: var(--space-2); font-family: var(--font-mono); font-size: 12px; color: var(--ink-muted); }
.fr-qrcard-refresh { border: 0; background: transparent; padding: 0 var(--space-1); color: var(--ink); font: inherit; font-family: var(--font-sans); font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
@media (max-width: 520px) { .fr-qrcard { flex-direction: column; align-items: flex-start; } }
.fr-docicon { display: block; flex: none; }

/* Icon */
.fr-uiicon { display: block; flex: none; }
.fr-btn:has(> .fr-uiicon:only-child) { width: 36px; padding: 0; }

/* ---------- Desktop apps ---------- */
/* AppHeader — 48px; the whole bar drags the window, its controls don't */
.fr-appheader { display: flex; align-items: center; gap: var(--space-4); height: 48px; padding: 0 var(--space-4); box-sizing: border-box; overflow: hidden;
  background: var(--surface-100); border-bottom: 1px solid var(--line);
  -webkit-app-region: drag; app-region: drag; -webkit-user-select: none; user-select: none; }
.fr-appheader button, .fr-appheader a, .fr-appheader input, .fr-appheader select { -webkit-app-region: no-drag; app-region: no-drag; }
.fr-appheader-mac { padding-left: 80px; }       /* room for the traffic lights */
.fr-appheader-windows { padding-right: 148px; } /* room for minimise, maximise, close */
/* the two ends share the spare room equally, so the modes stay centred; the end never shrinks, the context does */
.fr-appheader-id { flex: 1 1 0; display: flex; align-items: center; gap: var(--space-2); min-width: min-content; }
.fr-appheader-id .fr-applabel, .fr-appheader-app { flex: none; }
.fr-appheader-app { font-weight: 600; font-size: 14px; line-height: 20px; color: var(--ink); white-space: nowrap; }
.fr-appheader-context { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-muted); font-size: 14px; line-height: 20px;
  padding-left: var(--space-2); margin-left: var(--space-1); border-left: 1px solid var(--line); }
.fr-appheader-modes { flex: none; display: flex; gap: 2px; padding: 2px; background: var(--surface-000); border: 1px solid var(--line); border-radius: var(--radius-md); }
.fr-appheader-mode { position: relative; display: inline-flex; align-items: center; gap: var(--space-2); height: 28px; padding: 0 var(--space-4); border: 1px solid transparent; border-radius: var(--radius-sm);
  background: transparent; color: var(--ink-muted); font: inherit; font-size: 13px; font-weight: 600; line-height: 20px; white-space: nowrap; cursor: pointer; }
.fr-appheader-mode:hover:not(:disabled):not(.fr-appheader-mode-on) { color: var(--ink); background: var(--surface-100); }
.fr-appheader-mode-on { color: var(--ink); background: var(--surface-100); border-color: var(--line); cursor: default; }
.fr-appheader-mode:disabled { opacity: .45; cursor: not-allowed; }
.fr-appheader-mode:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--surface-000), 0 0 0 4px var(--signal); }
.fr-appheader-mode-live { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 2px var(--signal-soft); }
.fr-appheader-end { flex: 1 1 0; min-width: max-content; display: flex; align-items: center; justify-content: flex-end; gap: var(--space-4); }
.fr-appheader-status { display: flex; align-items: center; gap: var(--space-2); }
.fr-appheader-actions { display: flex; align-items: center; gap: var(--space-1); }
.fr-appheader-actions .fr-btn { height: 32px; }
.fr-appheader-actions .fr-btn:has(> .fr-uiicon:only-child), .fr-appheader-actions .fr-btn:has(> .fr-icon:only-child) { width: 32px; }
/* When it doesn't fit, the header steps down (the component measures itself):
   compact — chips show their icon and light;  nocontext — the context goes;  tight — modes and the session status show icons only */
.fr-appheader-compact .fr-chip:has(.fr-chip-icon) .fr-chip-text,
.fr-appheader-tight .fr-appheader-mode:has(.fr-uiicon) > span:not(.fr-appheader-mode-live),
.fr-appheader-tight .fr-appheader-end .fr-live-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fr-appheader-nocontext .fr-appheader-context { display: none; }
.fr-appheader-tight .fr-appheader-mode:has(.fr-uiicon) { padding: 0 var(--space-2); }
.fr-appheader-tight .fr-appheader-end .fr-live-count { padding-left: 0; border-left: 0; }

/* StatusChip — 28px, square corners like tags; the light on the right says the state */
.fr-chip { position: relative; flex: none; display: inline-flex; align-items: center; gap: var(--space-2); height: 28px; padding: 0 var(--space-2); box-sizing: border-box; min-width: 0;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-000); color: var(--ink); font: inherit; white-space: nowrap; }
.fr-chip-button { cursor: pointer; }
.fr-chip-button:hover { border-color: var(--ink-muted); }
.fr-chip-button:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--surface-000), 0 0 0 4px var(--signal); }
.fr-chip-icon { color: var(--ink-muted); }
.fr-chip-text { display: inline-flex; align-items: baseline; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.fr-chip-label { font-size: 12px; line-height: 16px; font-weight: 600; }
.fr-chip-detail { font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); white-space: pre; }
.fr-chip-dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-muted); }
.fr-chip-connected .fr-chip-dot { background: var(--signal); }
.fr-chip-missing { border-color: var(--amber); }
.fr-chip-missing .fr-chip-icon, .fr-chip-missing .fr-chip-detail { color: var(--amber); }
.fr-chip-missing .fr-chip-dot { background: var(--amber); border-radius: var(--radius-sm); }
.fr-chip-off { border-style: dashed; color: var(--ink-muted); }
.fr-chip-off .fr-chip-dot { background: transparent; border: 1.5px solid var(--ink-muted); width: 4px; height: 4px; }
.fr-chip-sync { flex: none; }
/* By default a chip is just the device's icon and its light; the name and detail are there for the tooltip and screen readers.
   fr-chip-labelled shows them — for lists and settings, not the header. */
.fr-chip:not(.fr-chip-labelled) .fr-chip-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fr-chip:not(.fr-chip-labelled):has(.fr-chip-icon) { gap: 6px; padding: 0 7px; }

/* ---------- Hardware surfaces ---------- */
/* DeckKey / DeckStrip — previews of what the device shows; the device itself rounds the key corners */
.fr-deckkey { display: block; flex: none; border-radius: 14%; overflow: hidden; }
.fr-deckkey svg, .fr-deckstrip svg { display: block; width: 100%; height: 100%; }
.fr-deckstrip { display: block; flex: none; overflow: hidden; }

/* RemoteKey — at least 88px tall: easy to hit with a thumb without looking */
.fr-remotegrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); }
.fr-remotekey { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 88px; padding: var(--space-2);
  box-sizing: border-box; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-100); color: var(--ink);
  font: inherit; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.fr-remotekey-wide { grid-column: span 2; }
.fr-remotekey:active:not(:disabled) { background: var(--surface-000); }
.fr-remotekey:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--surface-000), 0 0 0 4px var(--signal); }
.fr-remotekey:disabled { opacity: .45; cursor: not-allowed; }
.fr-remotekey-label { font-size: 14px; line-height: 18px; font-weight: 600; text-align: center; }
.fr-remotekey-value { font-family: var(--font-mono); font-size: 28px; line-height: 32px; font-weight: 500; }
.fr-remotekey-caption { font-family: var(--font-mono); font-size: 10px; line-height: 14px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); }
.fr-remotekey-on { background: var(--signal-soft); border-color: var(--signal); color: var(--signal); }
.fr-remotekey-on::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--signal); }
.fr-remotekey-on .fr-remotekey-caption { color: var(--signal); }
.fr-remotekey-attention { border: 2px solid var(--amber); color: var(--amber); }
.fr-remotekey-attention .fr-remotekey-caption { color: var(--amber); }
.fr-remotekey-danger { color: var(--danger); }
.fr-remotekey-danger .fr-remotekey-caption { color: var(--danger); }
.fr-remotekey-meter { position: absolute; left: 0; bottom: 0; height: 4px; width: calc(var(--fr-hold, 0) * 100%); background: var(--danger); }
.fr-remotekey-holding { border-color: var(--danger); }

/* PinPad — 3 × 4 keys, 64px tall, with the digits so far above */
.fr-pinpad { display: flex; flex-direction: column; align-items: stretch; gap: var(--space-4); width: 100%; max-width: 320px; }
.fr-pinpad-label { margin: 0; text-align: center; font-weight: 600; font-size: 16px; line-height: 24px; }
.fr-pinpad-slots { display: flex; justify-content: center; gap: var(--space-2); }
.fr-pinpad-slot { display: grid; place-items: center; width: 44px; height: 52px; box-sizing: border-box; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-100);
  font-family: var(--font-mono); font-size: 24px; line-height: 32px; font-weight: 500; color: var(--ink); }
.fr-pinpad-slot-next { border-color: var(--signal); box-shadow: inset 0 0 0 1px var(--signal); }
.fr-pinpad-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink); }
.fr-pinpad-error .fr-pinpad-slot { border-color: var(--danger); box-shadow: none; }
.fr-pinpad-msg, .fr-pinpad-help { margin: calc(var(--space-2) * -1) 0 0; text-align: center; font-size: 14px; line-height: 20px; }
.fr-pinpad-msg { color: var(--danger); }
.fr-pinpad-help { color: var(--ink-muted); }
.fr-pinpad-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); }
.fr-pinpad-key { height: 64px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-100); color: var(--ink);
  font-family: var(--font-mono); font-size: 26px; line-height: 32px; font-weight: 500; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.fr-pinpad-key:active:not(:disabled) { background: var(--surface-000); }
.fr-pinpad-key:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--surface-000), 0 0 0 4px var(--signal); }
.fr-pinpad-key:disabled { opacity: .45; cursor: not-allowed; }
.fr-pinpad-key-text { font-family: var(--font-sans); font-size: 14px; font-weight: 600; background: transparent; border-color: transparent; }
.fr-pinpad-key-icon { display: grid; place-items: center; background: transparent; border-color: transparent; }
@media (prefers-reduced-motion: no-preference) {
  .fr-pinpad-error .fr-pinpad-slots { animation: fr-shake .3s ease-in-out; }
  @keyframes fr-shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
}
.fr-deckkey { box-shadow: 0 0 0 1px var(--line); }

/* ThemeSwitch — a small segmented control: System · Dark · Light */
.fr-themeswitch { display: inline-flex; align-self: flex-start; width: max-content; gap: 2px; padding: 2px; background: var(--surface-000); border: 1px solid var(--line); border-radius: var(--radius-md); }
.fr-themeswitch-opt { display: inline-flex; align-items: center; gap: var(--space-2); height: 32px; padding: 0 var(--space-4); border: 1px solid transparent; border-radius: var(--radius-sm);
  background: transparent; color: var(--ink-muted); font: inherit; font-size: 13px; font-weight: 600; line-height: 20px; cursor: pointer; }
.fr-themeswitch-opt:hover:not(.fr-themeswitch-on) { color: var(--ink); background: var(--surface-100); }
.fr-themeswitch-on { color: var(--ink); background: var(--surface-100); border-color: var(--line); }
.fr-themeswitch-opt:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--surface-000), 0 0 0 4px var(--signal); }

/* ---------- Tree ---------- */
/* 32px rows, 20px per level, hairline guides down each open branch */
.fr-tree, .fr-tree-group { list-style: none; margin: 0; padding: 0; }
.fr-tree { font-size: 14px; line-height: 20px; color: var(--ink); -webkit-user-select: none; user-select: none; }
.fr-tree-group { position: relative; margin-left: 15px; padding-left: 5px; border-left: 1px solid var(--line); }
.fr-tree-item { outline: none; }
.fr-tree-row { position: relative; display: flex; align-items: center; gap: var(--space-2); min-height: 32px; padding: 0 var(--space-2) 0 0; box-sizing: border-box;
  border: 1px solid transparent; border-radius: var(--radius-sm); cursor: pointer; }
.fr-tree-row:hover { background: var(--surface-100); }
.fr-tree-item:focus-visible > .fr-tree-row { box-shadow: 0 0 0 2px var(--signal); }
.fr-tree-selected > .fr-tree-row { background: var(--surface-100); border-color: var(--line); }
.fr-tree-selected > .fr-tree-row::before { content: ""; position: absolute; left: -1px; top: 6px; bottom: 6px; width: 2px; background: var(--signal); }
.fr-tree-toggle { flex: none; display: grid; place-items: center; width: 20px; height: 20px; margin-left: 2px; border-radius: var(--radius-sm); color: var(--ink-muted); }
.fr-tree-toggle:hover { color: var(--ink); background: var(--surface-000); }
.fr-tree-toggle-none { visibility: hidden; }
.fr-tree-icon { color: var(--ink-muted); }
.fr-tree-selected > .fr-tree-row .fr-tree-icon { color: var(--ink); }
.fr-tree-letter { flex: none; display: grid; place-items: center; width: 18px; height: 18px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface-000);
  font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 500; color: var(--ink-muted); }
.fr-tree-letter-correct { background: var(--signal); border-color: var(--signal); color: var(--on-signal); }
.fr-tree-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-tree-label-empty { color: var(--ink-muted); font-style: italic; }
.fr-tree-meta { flex: none; font-family: var(--font-mono); font-size: 11px; line-height: 16px; letter-spacing: .02em; color: var(--ink-muted); }
.fr-tree-flag { flex: none; display: inline-flex; align-items: center; gap: var(--space-1); }
.fr-tree-flag-warning { color: var(--amber); }
.fr-tree-flag-done { color: var(--ink-muted); }
.fr-tree-flag-live { color: var(--signal); font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }
.fr-tree-live { width: 6px; height: 6px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 2px var(--signal-soft); }
.fr-tree-actions { flex: none; display: inline-flex; gap: 2px; opacity: 0; }
.fr-tree-row:hover .fr-tree-actions, .fr-tree-selected > .fr-tree-row .fr-tree-actions, .fr-tree-actions:focus-within { opacity: 1; }
.fr-tree-actions .fr-btn { height: 24px; }
.fr-tree-actions .fr-btn:has(> .fr-uiicon:only-child) { width: 24px; }
/* the top level reads as sections: rounds a little heavier */
.fr-tree > .fr-tree-item > .fr-tree-row .fr-tree-label { font-weight: 600; }
.fr-tree-disabled > .fr-tree-row { opacity: .45; cursor: not-allowed; }
.fr-tree-addrow { padding: 2px 0; }
.fr-tree-add { display: flex; align-items: center; gap: var(--space-2); width: 100%; height: 28px; padding: 0 var(--space-2) 0 24px; box-sizing: border-box; border: 1px dashed transparent; border-radius: var(--radius-sm);
  background: transparent; color: var(--ink-muted); font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.fr-tree-add:hover { color: var(--signal); border-color: var(--line); }
.fr-tree-add:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--signal); }
.fr-tree-dense .fr-tree-row { min-height: 28px; }
.fr-tree-dense { font-size: 13px; }
@media (prefers-reduced-motion: no-preference) { .fr-tree-toggle .fr-uiicon { transition: transform .12s; } }

/* AppLabel — the app's name tag, top left: icon, name, and the followroom wordmark */
.fr-applabel { display: inline-flex; align-items: center; gap: 10px; flex: none; min-width: 0; color: var(--ink); text-decoration: none; background: none; border: 0; padding: 0; font: inherit; border-radius: var(--radius-sm); }
a.fr-applabel, button.fr-applabel { cursor: pointer; }
a.fr-applabel:focus-visible, button.fr-applabel:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--surface-000), 0 0 0 4px var(--signal); }
.fr-applabel-text { display: flex; min-width: 0; }
.fr-applabel-name { font-weight: 600; white-space: nowrap; color: var(--ink); letter-spacing: -0.01em; }
.fr-wordmark { display: block; flex: none; fill: currentColor; }
.fr-applabel-word { color: var(--ink-muted); }
/* stacked: the app's name, with followroom set small underneath */
.fr-applabel-stacked .fr-applabel-text { flex-direction: column; align-items: flex-start; gap: 3px; }
.fr-applabel-stacked .fr-applabel-name { font-size: 15px; line-height: 16px; }
/* inline: name · rule · followroom on one line, for tight bars */
.fr-applabel-inline { gap: var(--space-2); }
.fr-applabel-inline .fr-applabel-text { align-items: center; gap: var(--space-2); }
.fr-applabel-inline .fr-applabel-name { font-size: 14px; line-height: 20px; }
.fr-applabel-rule { width: 1px; height: 14px; background: var(--line); }
.fr-appheader-context { margin-left: var(--space-2); }

/* LibraryRow — the library as a horizontal shelf: cards side by side, scrolling sideways, snapping to each card */
.fr-librow { --fr-librow-card: 240px; position: relative; min-width: 0; }
.fr-librow-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-2); min-height: 36px; }
.fr-librow-title { margin: 0; display: flex; align-items: baseline; gap: var(--space-2); font-size: 16px; line-height: 24px; font-weight: 600; color: var(--ink); }
.fr-librow-meta { font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); }
.fr-librow-tools { display: flex; align-items: center; gap: var(--space-1); }
.fr-librow-track { display: grid; grid-auto-flow: column; grid-auto-columns: var(--fr-librow-card); gap: var(--space-4); overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: 4px; padding: 4px 4px 12px; margin: -4px -4px 0; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.fr-librow-track::-webkit-scrollbar { height: 6px; }
.fr-librow-track::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.fr-librow-item { scroll-snap-align: start; min-width: 0; display: flex; }
.fr-librow-item > .fr-card { flex: 1; min-width: 0; }
/* a soft fade on the side that has more, so it's clear the row goes on */
.fr-librow-more-end .fr-librow-track { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); }
.fr-librow-more-start .fr-librow-track { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 48px), transparent); }
.fr-librow-more-start.fr-librow-more-end .fr-librow-track { -webkit-mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent); }
@media (max-width: 640px) { .fr-librow { --fr-librow-card: 72vw; } }
.fr-btn[hidden], .fr-librow-head[hidden] { display: none; }
