/* claude-share browser client — Mesh Glass Noir.
   One slim header strip owns all administration (no sidebar); the terminal keeps
   its full width like the real Claude CLI. Palette discipline: controls are quiet
   monochrome glass chips (1px rings, no fills). Color only where it carries
   meaning — per-user identity dots, amber = needs attention, red ring = destructive.
   Per-user colors come from the brain and are applied inline via --c. */

:root {
  --bg: #06070b;
  --glass: rgba(10, 12, 18, 0.55);
  --glass-2: rgba(13, 15, 23, 0.55);
  --inset: rgba(0, 0, 0, 0.4);
  --ring: rgba(255, 255, 255, 0.11);
  --ring-soft: rgba(255, 255, 255, 0.07);
  --text: #e8ecf4;
  --text-dim: #aab0c4;
  --text-faint: #7d829a;
  --amber: #e8a33d;
  --amber-hi: #ffd9a0;
  --blue: #7fb2e0;
  --green: #7fe0b2;
  --red: #f0a8a8;
  --red-ring: rgba(240, 140, 140, 0.28);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --spring: cubic-bezier(0.2, 0.9, 0.25, 1.1);
}

* {
  box-sizing: border-box;
}

/* The hidden attribute must always win, even over an element we give an explicit
   display (flex/grid) below — otherwise a `hidden` panel would still render. */
[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  /* the mesh: three soft radial washes over near-black */
  background:
    radial-gradient(700px 420px at 80% -20%, rgba(64, 110, 255, 0.26), transparent 55%),
    radial-gradient(600px 500px at -10% 40%, rgba(150, 70, 255, 0.16), transparent 55%),
    radial-gradient(700px 500px at 60% 130%, rgba(232, 163, 61, 0.13), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.screen {
  min-height: 100vh;
}

.brand-text {
  font-family: var(--mono);
  font-weight: 700;
  background: linear-gradient(90deg, #e8a33d, #7fb2e0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ── glass chips: THE control. quiet, monochrome, 1px ring ─────────────────── */
.ctrl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: inherit;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  color: #c9cede;
  background: rgba(255, 255, 255, 0.045);
  border: none;
  border-radius: 999px;
  padding: 4px 12px;
  box-shadow: 0 0 0 1px var(--ring);
  cursor: pointer;
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.15s var(--spring);
}
.ctrl:hover {
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
}
.ctrl:active {
  transform: scale(0.96);
}
.ctrl:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.ctrl .ico {
  opacity: 0.75;
  font-size: 12px;
}
.ctrl.end {
  color: var(--red);
  box-shadow: 0 0 0 1px var(--red-ring);
}
.ctrl.end:hover {
  background: rgba(240, 140, 140, 0.08);
  box-shadow: 0 0 0 1px rgba(240, 140, 140, 0.5);
}
.ctrl.tiny {
  font-size: 11px;
  padding: 3px 11px;
}
.ctrl.active {
  color: var(--amber-hi);
  box-shadow: 0 0 0 1px rgba(232, 163, 61, 0.45);
}

/* generic buttons (join screen, banners) share the chip language */
.btn {
  font: inherit;
  font-weight: 600;
  color: #c9cede;
  background: rgba(255, 255, 255, 0.045);
  border: none;
  border-radius: 10px;
  padding: 0.55rem 0.9rem;
  box-shadow: 0 0 0 1px var(--ring);
  cursor: pointer;
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.15s var(--spring);
}
.btn:hover {
  background: rgba(255, 255, 255, 0.09);
}
.btn:active {
  transform: scale(0.97);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn.primary {
  color: var(--amber-hi);
  background: rgba(232, 163, 61, 0.16);
  box-shadow: 0 0 0 1px rgba(232, 163, 61, 0.55);
}
.btn.primary:hover {
  background: rgba(232, 163, 61, 0.26);
}
.btn.block {
  display: block;
  width: 100%;
}
.btn.tiny {
  padding: 0.28rem 0.55rem;
  font-size: 0.8rem;
  border-radius: 8px;
}

/* ── join screen ─────────────────────────────────────────────────────────── */
#join {
  display: grid;
  place-items: center;
  padding: 2rem;
}
.join-card {
  width: min(420px, 100%);
  background: var(--glass-2);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 14px;
  padding: 2rem 1.75rem;
  box-shadow: 0 0 0 1px var(--ring-soft), 0 24px 60px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.join-card .brand {
  font-size: 1.25rem;
}
.tagline {
  color: var(--text-dim);
  margin: 0.35rem 0 1.75rem;
}
.field {
  display: block;
  margin-bottom: 1rem;
}
.field-label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin-bottom: 0.4rem;
}
.room-code {
  font-family: var(--mono);
  font-size: 1.1rem;
  color: var(--amber-hi);
  background: var(--inset);
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
  box-shadow: inset 0 0 0 1px rgba(232, 163, 61, 0.3);
}
.text-input {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--inset);
  border: none;
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.text-input:focus {
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(232, 163, 61, 0.55), 0 0 16px rgba(232, 163, 61, 0.12);
}
#knock-btn {
  margin-top: 0.5rem;
}
.join-status {
  min-height: 1.2rem;
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  color: var(--text-dim);
}
.join-status.error {
  color: #ff9a9d;
}
.waiting {
  text-align: center;
  padding: 1rem 0 0.25rem;
  color: var(--text-dim);
}
.spinner {
  width: 34px;
  height: 34px;
  margin: 0.5rem auto 1rem;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--amber);
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── live layout ─────────────────────────────────────────────────────────── */
.live {
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-height: 0;
}

/* ── the header strip: everything administrative lives here ────────────────── */
.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  background: var(--glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
  position: relative;
  z-index: 20;
  flex: 0 0 auto;
}
.topbar .brand-text {
  font-size: 13px;
}
.sep {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.1);
}
.room b {
  color: var(--text);
  font-weight: 600;
}
.top-spacer {
  flex: 1;
}

/* the roster: an avatar cluster — colored identity dots with initials */
.avatars {
  display: flex;
  align-items: center;
  margin-left: 2px;
}
.av {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 9.5px;
  font-weight: 800;
  color: #0a0d16;
  margin-left: -5px;
  border: none;
  padding: 0;
  font-family: var(--mono);
  background: var(--c, #9aa4b2);
  box-shadow: 0 0 0 2px #0b0d13, 0 0 10px -2px var(--c, transparent);
  cursor: pointer;
  transition: transform 0.15s var(--spring);
}
.av:hover {
  transform: translateY(-1px) scale(1.12);
  z-index: 2;
}
.av:active {
  transform: scale(0.95);
}

/* a live knock: the ONE loud thing on screen — amber ring, inline admit/deny */
.knocks {
  display: flex;
  align-items: center;
  gap: 8px;
}
.knock-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px 4px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--amber-hi);
  background: rgba(232, 163, 61, 0.08);
  box-shadow: 0 0 0 1px rgba(232, 163, 61, 0.45), 0 0 16px rgba(232, 163, 61, 0.18);
  animation: knock-in 0.35s var(--spring);
  white-space: nowrap;
}
@keyframes knock-in {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.95);
  }
}
.knock-chip .kname {
  font-weight: 700;
}
.knock-chip .kmeta {
  font-weight: 400;
  color: rgba(255, 217, 160, 0.6);
  font-size: 10.5px;
}
.kbtn {
  font: inherit;
  font-family: var(--mono);
  padding: 3px 10px;
  border: none;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.15s var(--spring);
}
.kbtn:active {
  transform: scale(0.94);
}
.kbtn.yes {
  background: rgba(232, 163, 61, 0.16);
  color: var(--amber-hi);
  box-shadow: 0 0 0 1px rgba(232, 163, 61, 0.55);
}
.kbtn.yes:hover {
  background: rgba(232, 163, 61, 0.28);
}
.kbtn.no {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.kbtn.no:hover {
  background: rgba(255, 255, 255, 0.1);
}

.host-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.end-confirm {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--red);
  white-space: nowrap;
  animation: knock-in 0.25s var(--spring);
}

/* avatar click → popover (role/kick for the host, identity for everyone) */
.popover {
  position: fixed;
  z-index: 40;
  min-width: 180px;
  padding: 10px 12px;
  border-radius: 12px;
  font-family: var(--mono);
  font-size: 12px;
  background: rgba(16, 18, 27, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 0 0 1px var(--ring), 0 18px 44px rgba(0, 0, 0, 0.6);
  animation: knock-in 0.2s var(--spring);
}
.pop-name {
  font-weight: 700;
  color: var(--c, var(--text));
}
.pop-role {
  color: var(--text-faint);
  margin-left: 6px;
}
.pop-row {
  display: flex;
  gap: 6px;
  margin-top: 9px;
}
.pop-kick {
  margin-top: 9px;
  width: 100%;
  justify-content: center;
}

/* addressed notice, in the header strip — amber "needs your attention" language,
   deliberately never overlapping the terminal or the drafts */
.notice-chip {
  display: inline-flex;
  align-items: center;
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: inherit;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--amber-hi);
  background: rgba(232, 163, 61, 0.08);
  border: none;
  border-radius: 999px;
  padding: 4px 12px;
  box-shadow: 0 0 0 1px rgba(232, 163, 61, 0.45), 0 0 16px rgba(232, 163, 61, 0.18);
  cursor: pointer;
  animation: knock-in 0.3s var(--spring);
}

.dc-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1rem;
  background: rgba(90, 30, 34, 0.5);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--red-ring);
  color: #ffd9da;
  font-size: 0.85rem;
}

/* ── the terminal: full width, glass frame, gradient border ────────────────── */
.workspace {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 14px 16px 16px;
  gap: 12px;
}
#stage {
  position: relative;
  flex: 1;
  min-height: 0;
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(7, 9, 14, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 0 0 1px rgba(127, 178, 224, 0.14), 0 24px 60px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
#stage::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 15px;
  padding: 1px;
  pointer-events: none;
  z-index: 7;
  background: linear-gradient(140deg, rgba(232, 163, 61, 0.4), rgba(127, 178, 224, 0.28) 45%, transparent 75%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
}
#term {
  /* sized to the xterm's own content by script; scaled (per-axis, ≤8% stretch) to
     fill the glass, bottom-anchored so Claude's input line hugs the page bottom.
     The transform keeps its rect equal to the visual box for pointer/cursor math. */
  position: absolute;
  top: 10px;
  left: 12px;
  transform-origin: 0 0;
}
#stage.paused #term {
  filter: blur(6px) brightness(0.6);
}
/* direct-input mode: the frame glows amber — your keys are going INTO Claude */
#stage.direct {
  cursor: text;
  box-shadow: 0 0 0 1px rgba(232, 163, 61, 0.4), 0 0 22px rgba(232, 163, 61, 0.14),
    0 24px 60px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
#cursors {
  position: absolute;
  inset: 10px 12px;
  pointer-events: none;
  overflow: hidden;
  z-index: 10; /* named cursors float above the drafts too — one surface */
}
.cursor {
  position: absolute;
  top: 0;
  left: 0;
  transition: transform 0.08s linear; /* CSS interpolation ≈ 80ms — the Figma feel */
  will-change: transform;
}
.cursor svg {
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
}
.cursor-pill {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 2px 9px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  color: #0a0d18;
  white-space: nowrap;
  box-shadow: 0 0 14px -2px var(--c, rgba(0, 0, 0, 0.7));
}
.paused-card {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(6, 7, 11, 0.55);
  backdrop-filter: blur(2px);
  z-index: 6;
}
.paused-inner {
  text-align: center;
  color: var(--text);
}
.paused-icon {
  font-size: 2rem;
  margin-bottom: 0.35rem;
}
.paused-inner small {
  display: block;
  margin-top: 0.3rem;
  color: var(--text-dim);
}

/* ── floating drafts: small glass windows INSIDE the terminal surface ──────── */
.overlays {
  position: absolute;
  inset: 0;
  pointer-events: none; /* the terminal stays clickable between drafts */
  z-index: 8;
  transition: opacity 200ms ease-out;
}
/* /pause hides EVERYTHING the mirror promised to hide — drafts and cursors go
   with it (they float above the pause scrim otherwise, still editable). */
#stage.paused .overlays,
#stage.paused #cursors {
  opacity: 0;
  pointer-events: none !important;
}
.fdraft {
  position: absolute;
  pointer-events: auto;
  min-width: 220px;
  max-width: 85%;
  border-radius: 12px;
  padding: 8px 14px 9px;
  background: rgba(13, 15, 23, 0.86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 0 0 1px var(--ring), 0 18px 44px rgba(0, 0, 0, 0.6);
}
/* Entrance runs ONLY on a box that just appeared (.anim-in from the renderer) —
   drafts fully re-render per keystroke, and replaying it would strobe. */
.fdraft.anim-in {
  animation: draft-in 180ms ease-out;
}
@keyframes draft-in {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
}
/* home-position drafts translate; give them their own entrance so the transform
   in the keyframe never fights the translateX(-50%) placement */
.fdraft.home.anim-in {
  animation: draft-in-home 180ms ease-out;
}
@keyframes draft-in-home {
  from {
    opacity: 0;
    transform: translateX(-50%) scale(0.97);
  }
}
/* border-beam (github.com/Jakubantalik/border-beam, CSS-native rendition): a
   bright stroke travelling the border ring. Runs only on the box being edited —
   amber for your own focus, the editor's identity color for someone else's. */
@property --beam {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
.fdraft::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 13px;
  padding: 1.5px;
  pointer-events: none;
  background: conic-gradient(
    from var(--beam),
    transparent 0deg,
    var(--beam-c, rgba(232, 163, 61, 0.95)) 42deg,
    transparent 90deg
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 200ms ease-out;
  /* the negative delay phases the beam by wall-clock (set per render), so the
     per-keystroke rebuild never resets it to angle zero */
  animation: beam-spin 1.96s linear infinite;
  animation-delay: var(--beam-delay, 0ms);
}
@keyframes beam-spin {
  to {
    --beam: 360deg;
  }
}
.fdraft.focused::before,
.fdraft.edited::before {
  opacity: 1;
}
.fdraft.edited::before {
  --beam-c: var(--ec, rgba(232, 163, 61, 0.95));
}
.fdraft.focused {
  box-shadow: 0 0 0 1px rgba(232, 163, 61, 0.35), 0 0 22px rgba(232, 163, 61, 0.12),
    0 18px 44px rgba(0, 0, 0, 0.6);
}
/* someone else's caret is in it → ring in THEIR color */
.fdraft.edited {
  box-shadow: 0 0 0 1px var(--ec, var(--ring)), 0 0 18px -6px var(--ec, transparent),
    0 18px 44px rgba(0, 0, 0, 0.6);
}
/* home position: pinned above Claude's input line, stacking upward */
.fdraft.home {
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(88px + var(--stack, 0) * 56px);
  width: 62%;
}
.fbar {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-faint);
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.fbar:active {
  cursor: grabbing;
}
.fbar .grip {
  letter-spacing: 1px;
  opacity: 0.6;
}
.fbar .author-pill {
  font-weight: 700;
  color: var(--c, var(--text));
}
.fbar .draft-x {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-faint);
  background: rgba(255, 255, 255, 0.05);
  padding: 0 8px;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}
.fbar .draft-x {
  margin-left: auto;
  border: none;
  cursor: pointer;
  transition: box-shadow 0.15s ease, color 0.15s ease;
}
.fbar .draft-x:hover {
  color: var(--red);
  box-shadow: 0 0 0 1px var(--red-ring);
}
.draft-body {
  font-family: var(--mono);
  font-size: 0.9rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 1.5rem;
  color: var(--text);
  cursor: text;
}
.draft-body::selection,
.draft-body *::selection {
  background: rgba(232, 163, 61, 0.35);
}
.fdraft .rsz {
  position: absolute;
  right: 4px;
  bottom: 2px;
  color: var(--text-faint);
  font-size: 10px;
  opacity: 0.5;
  cursor: nwse-resize;
  user-select: none;
  -webkit-user-select: none;
}
.caret {
  display: inline-block;
  width: 2.5px;
  height: 1.05em;
  margin: 0 -1px;
  vertical-align: text-bottom;
  background: var(--c, var(--amber));
  box-shadow: 0 0 8px var(--c, var(--amber));
  border-radius: 1px;
  animation: caret-blink 1.1s steps(1) infinite;
}
.caret.self {
  width: 3px;
}
@keyframes caret-blink {
  50% {
    opacity: 0.25;
  }
}

/* ── header chips: claude state, my role, the queue ─────────────────────────── */
.chip.claude {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
}
.chip.claude::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}
.chip.claude.idle {
  color: var(--green);
}
.chip.claude.busy {
  color: var(--amber-hi);
}
.chip.claude.ask {
  color: var(--red);
}
.my-role {
  color: var(--text-faint);
  font-size: 11px;
}
.my-role b {
  color: var(--c, var(--text-dim));
  font-weight: 700;
}
.ctrl.qchip {
  color: var(--amber-hi);
  box-shadow: 0 0 0 1px rgba(232, 163, 61, 0.45);
}
.queue-pop {
  min-width: 340px;
  max-width: 480px;
}
.queue-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin-bottom: 6px;
}
.queue-chip {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  box-shadow: 0 0 0 1px var(--ring-soft);
  margin-bottom: 5px;
  font-size: 0.85rem;
}
.queue-n {
  font-family: var(--mono);
  color: var(--text-faint);
  font-size: 0.75rem;
}
.queue-who {
  font-weight: 700;
  color: var(--c, var(--text));
}
.queue-text {
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.queue-act {
  display: flex;
  gap: 5px;
}

/* the key catcher (unchanged: invisible, focused by script) */
.composer {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
  overflow: hidden;
  resize: none;
  pointer-events: none;
}

/* respect users who asked for calm */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── narrow screens: the strip wraps; the mirror stays full width ──────────── */
@media (max-width: 720px) {
  .topbar {
    flex-wrap: wrap;
    row-gap: 6px;
  }
  .workspace {
    padding: 10px;
  }
}

/* Claude's real cursor in the mirror is the "you type HERE" indicator — but the
   mirror never holds browser focus, so xterm draws it as a hollow outline. Force
   it filled and blinking, like the terminal it mirrors. */
#term .xterm-cursor.xterm-cursor-block,
#term .xterm-cursor.xterm-cursor-outline {
  background-color: rgba(232, 163, 61, 0.9) !important;
  outline: none !important;
  animation: caret-blink 1.1s steps(1) infinite;
}

/* ── removed panel: the host kicked you — the mirror is gone, full stop ────── */
#removed {
  display: grid;
  place-items: center;
  padding: 2rem;
}
.removed-card {
  width: min(420px, 100%);
  text-align: center;
  background: var(--glass-2);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 14px;
  padding: 2.5rem 2rem;
  box-shadow: 0 0 0 1px var(--red-ring), 0 24px 60px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: removed-in 220ms ease-out;
}
@keyframes removed-in {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
}
.removed-icon {
  font-size: 2rem;
  color: var(--red);
  margin-bottom: 0.5rem;
}
.removed-card h1 {
  font-size: 1.1rem;
  margin: 0 0 0.4rem;
  letter-spacing: -0.01em;
}
.removed-card p {
  margin: 0;
  color: var(--text-dim);
}

/* header-anchored popovers grow from where they came (spatial consistency) */
.popover,
.queue-pop {
  transform-origin: top;
}
#cursors {
  transition: opacity 200ms ease-out;
}
