/* E:mergence landing shell — navigation, palette, loader, prompts.
   Engine-agnostic. Owner's system: black / greys / white, colour only as a
   deliberate splash (the reactor's cyan and amber). 5–8 px radii, no pills,
   no glow, no glass. */

.em-shell {
  --em-canvas: #090a0b;
  --em-surface: #101214;
  --em-line: #303338;
  --em-text: #eeeeef;
  --em-muted: #a4a6aa;
  --em-dim: #5d6066;
  --em-cyan: #3fe0c8;
  --em-amber: #f5a623;
  --em-sans: Arial, "Helvetica Neue", Helvetica, system-ui, sans-serif;
  --em-mono: ui-monospace, "SF Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace;
  --em-edge: 28px;              /* distance of corner controls from the edges */
  --em-dial: 60px;              /* reactor dial size */
  --em-fan-r: 140px;            /* radius of the dial's fan */
  --em-fan-step: 28px;          /* vertical pitch of fan labels */
  --em-fan-gap: 22px;           /* leader elbow to label */
  --em-z-ui: 10;
  --em-z-prompt: 15;
  --em-z-palette: 20;
  --em-z-loader: 30;
  position: fixed;
  inset: 0;
  pointer-events: none;         /* the film underneath keeps the pointer */
  color: var(--em-text);
  font: 14px/1.4 var(--em-sans);
  -webkit-font-smoothing: antialiased;
  z-index: var(--em-z-ui);
}
.em-shell *, .em-shell *::before, .em-shell *::after { box-sizing: border-box; }
.em-shell :where(button) {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.em-shell :focus { outline: none; }
.em-shell :focus-visible {
  outline: 1px solid var(--em-text);
  outline-offset: 3px;
  border-radius: 4px;
}
.em-mono {
  font-family: var(--em-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---------- brand mark, top-left (not a header) ---------- */
.em-brand {
  position: absolute;
  top: var(--em-edge);
  left: var(--em-edge);
  pointer-events: auto;
  color: var(--em-text);
  text-decoration: none;
  font-family: var(--em-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  padding: 10px 0;
}

/* ---------- chapter rail, right edge ---------- */
.em-rail {
  position: absolute;
  right: var(--em-edge);
  top: 50%;
  transform: translateY(-50%);
  pointer-events: auto;
}
.em-rail ol {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  border-left: 1px solid var(--em-line);
}
.em-rail li { margin: 0; }
.em-rail-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 36px;
  padding: 6px 0 6px 0;
  margin-left: -1px;            /* tick sits on the line */
  color: var(--em-muted);
  font-family: var(--em-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  text-align: left;
  transition: color 0.2s;
}
.em-rail-item:hover { color: var(--em-text); }
.em-rail-item[aria-current="true"] { color: var(--em-text); }
.em-tick {
  display: block;
  width: 10px;
  height: 1px;
  background: var(--em-dim);
  flex: none;
  transition: width 0.25s, background-color 0.25s;
}
.em-rail-item:hover .em-tick { background: var(--em-muted); }
.em-rail-item[aria-current="true"] .em-tick { width: 22px; background: var(--em-text); }
.em-rail-num { color: inherit; opacity: 0.8; }
.em-rail-cursor {
  position: absolute;
  left: -3px;
  top: 0;
  width: 5px;
  height: 5px;
  margin-top: -2px;
  border-radius: 50%;
  background: var(--em-text);
  transition: top 0.25s linear;
}

/* ---------- Charles reactor dial, bottom-left ---------- */
.em-dial-wrap {
  position: absolute;
  left: var(--em-edge);
  bottom: var(--em-edge);
  width: var(--em-dial);
  height: var(--em-dial);
  pointer-events: auto;
}
.em-dial {
  position: relative;
  display: block;
  width: var(--em-dial);
  height: var(--em-dial);
  border-radius: 50%;
}
.em-dial:focus-visible { outline-offset: 6px; border-radius: 50%; }
.em-dial-host { display: block; width: 100%; height: 100%; }
.em-dial-host .charles-ring-svg { width: 100%; height: 100%; }
.em-dial-hint {
  position: absolute;
  left: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%);
  color: var(--em-muted);
  font-family: var(--em-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.em-dial-wrap:hover .em-dial-hint,
.em-dial:focus-visible + .em-dial-hint { opacity: 1; }
.em-dial-wrap[data-open="true"] .em-dial-hint { opacity: 0; }

/* The fan: hairline leaders and labels radiating from the dial. */
.em-fan {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
}
.em-fan[hidden] { display: none; }
.em-fan-lines {
  position: absolute;
  left: 0;
  top: 0;
  /* A zero-sized SVG suppresses its leaders in Chromium, even with overflow. */
  width: 1px;
  height: 1px;
  overflow: visible;
  pointer-events: none;
}
.em-fan-lines path {
  fill: none;
  stroke: var(--em-dim);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.em-fan-lines path[data-active="true"] { stroke: var(--em-text); }
.em-fan-item {
  position: absolute;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  margin-left: -8px;
  color: var(--em-muted);
  font-family: var(--em-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  border-radius: 4px;
  opacity: 0;
  animation: em-fan-in 0.22s ease-out forwards;
  animation-delay: calc(var(--i) * 28ms);
}
.em-fan-item:hover,
.em-fan-item[aria-current="true"] { color: var(--em-text); }
.em-fan-item[data-kind="ask"] { color: var(--em-text); }
.em-fan-item[data-kind="ask"]::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--em-cyan);
}
@keyframes em-fan-in {
  from { opacity: 0; transform: translate(-4px, -50%); }
  to { opacity: 1; transform: translate(0, -50%); }
}

/* ---------- bottom-right: key hint and sound ---------- */
.em-corner-right {
  position: absolute;
  right: var(--em-edge);
  bottom: var(--em-edge);
  display: flex;
  align-items: center;
  gap: 18px;
  pointer-events: auto;
  font-family: var(--em-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--em-muted);
}
.em-key-hint { white-space: nowrap; }
.em-key-hint kbd {
  font: inherit;
  color: var(--em-text);
}
.em-sep { width: 1px; height: 16px; background: var(--em-line); }
.em-sound {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 0 2px;
  color: var(--em-muted);
  font: inherit;
  letter-spacing: inherit;
  white-space: nowrap;
}
.em-sound b { font-weight: 400; color: var(--em-text); }
.em-sound-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 1px solid var(--em-muted);
  border-radius: 50%;
  transition: background-color 0.2s, border-color 0.2s;
}
.em-sound[aria-pressed="true"] .em-sound-dot {
  background: var(--em-cyan);
  border-color: var(--em-cyan);
}

/* ---------- centre hint ("Scroll to enter") ---------- */
.em-hint {
  position: absolute;
  left: 50%;
  bottom: var(--em-edge);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--em-muted);
  font-family: var(--em-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  white-space: nowrap;
  transition: opacity 0.3s;
}
.em-hint i {
  display: block;
  width: 1px;
  height: 14px;
  background: var(--em-muted);
  animation: em-hint-pulse 2.4s ease-in-out infinite;
}
.em-hint[hidden] { display: none; }
@keyframes em-hint-pulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
}

/* ---------- reduced-motion prompt ---------- */
.em-motion {
  position: absolute;
  left: 50%;
  bottom: calc(var(--em-edge) + 44px);
  transform: translateX(-50%);
  z-index: var(--em-z-prompt);
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: calc(100vw - 32px);
  padding: 12px 14px 12px 16px;
  background: var(--em-surface);
  border: 1px solid var(--em-line);
  border-radius: 6px;
  color: var(--em-text);
  font-size: 13px;
}
.em-motion[hidden] { display: none; }
.em-motion p { margin: 0; color: var(--em-muted); }
.em-motion-actions { display: flex; gap: 8px; flex: none; }
.em-btn {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--em-line);
  border-radius: 5px;
  color: var(--em-text);
  font-size: 13px;
  white-space: nowrap;
  transition: border-color 0.2s, background-color 0.2s;
}
.em-btn:hover { border-color: var(--em-muted); }
.em-btn-primary { background: var(--em-text); color: var(--em-canvas); border-color: var(--em-text); }
.em-btn-primary:hover { background: #ffffff; }
.em-motion-close {
  width: 32px;
  height: 32px;
  color: var(--em-muted);
  border-radius: 5px;
  font-size: 18px;
  line-height: 1;
}
.em-motion-close:hover { color: var(--em-text); }

/* ---------- palette ---------- */
.em-palette-backdrop {
  position: absolute;
  inset: 0;
  z-index: var(--em-z-palette);
  pointer-events: auto;
  background: rgba(9, 10, 11, 0.55);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 16vh 16px 16px;
}
.em-palette-backdrop[hidden] { display: none; }
.em-palette {
  width: min(680px, 100%);
  background: var(--em-surface);
  border: 1px solid var(--em-line);
  border-radius: 6px;
  overflow: hidden;
  animation: em-palette-in 0.18s ease-out;
}
@keyframes em-palette-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}
.em-palette-top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 10px 10px 14px;
  border-bottom: 1px solid var(--em-line);
}
.em-palette-reactor {
  flex: none;
  width: 48px;
  height: 48px;
  display: block;
}
.em-palette-reactor .charles-ring-svg { width: 100%; height: 100%; }
.em-palette-input {
  flex: 1;
  min-width: 0;
  height: 44px;
  background: transparent;
  border: 0;
  color: var(--em-text);
  font: 20px/1.2 var(--em-sans);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.em-palette-input::placeholder { color: var(--em-muted); opacity: 1; }
.em-shell .em-palette-input:focus,
.em-shell .em-palette-input:focus-visible { outline: none; }
.em-palette-input::selection { background: rgba(238, 238, 239, 0.22); color: var(--em-text); }
.em-palette-input::-webkit-search-decoration,
.em-palette-input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.em-mic {
  flex: none;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--em-line);
  border-radius: 6px;
  color: var(--em-muted);
  transition: color 0.2s, border-color 0.2s;
}
.em-mic:hover { color: var(--em-text); border-color: var(--em-muted); }
.em-mic[hidden] { display: none; }
.em-mic svg { width: 18px; height: 18px; display: block; }
.em-mic[data-listening="true"] { color: var(--em-cyan); border-color: var(--em-cyan); }
.em-palette-list {
  list-style: none;
  margin: 0;
  padding: 6px 0;
  max-height: min(52vh, 420px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.em-palette-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-height: 44px;
  padding: 10px 14px;
  cursor: pointer;
  color: var(--em-text);
  border-left: 2px solid transparent;
}
.em-palette-row[aria-selected="true"] {
  background: rgba(255, 255, 255, 0.05);
  border-left-color: var(--em-text);
}
.em-palette-row b { font-weight: 400; font-size: 17px; white-space: nowrap; }
.em-palette-row span {
  color: var(--em-muted);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.em-palette-row span::before { content: "–"; margin-right: 10px; }
.em-palette-row kbd {
  margin-left: auto;
  flex: none;
  color: var(--em-muted);
  font-family: var(--em-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  opacity: 0;
  align-self: center;
}
.em-palette-row[aria-selected="true"] kbd { opacity: 1; }
.em-palette-row[data-kind="ask"] b::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--em-cyan);
  vertical-align: middle;
}
.em-palette-row[data-kind="ask"] span::before { content: ""; margin: 0; }
.em-palette-row[data-kind="ask"] span { white-space: normal; }
.em-palette-empty {
  padding: 14px;
  color: var(--em-muted);
}
.em-palette-foot {
  display: flex;
  gap: 18px;
  padding: 10px 14px;
  border-top: 1px solid var(--em-line);
  color: var(--em-muted);
  font-family: var(--em-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
}
.em-palette-foot .em-status { margin-left: auto; color: var(--em-text); }

/* ---------- loader ---------- */
.em-loader {
  position: absolute;
  inset: 0;
  z-index: var(--em-z-loader);
  pointer-events: auto;
  background: var(--em-canvas);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  transition: opacity 0.5s ease;
}
.em-loader[data-done="true"] { opacity: 0; pointer-events: none; }
.em-loader[hidden] { display: none; }
.em-loader-brand {
  color: var(--em-text);
  font-family: var(--em-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
}
.em-loader-bar {
  width: min(240px, 60vw);
  height: 1px;
  background: var(--em-line);
  position: relative;
}
.em-loader-bar i {
  position: absolute;
  left: 0;
  top: -1px;
  height: 3px;
  width: 0;
  background: var(--em-text);
  transition: width 0.15s linear;
}
.em-loader-pct {
  color: var(--em-muted);
  font-family: var(--em-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  font-variant-numeric: tabular-nums;
}

/* ---------- semantic mirror and live region ---------- */
.em-sr,
.em-live {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
/* A mirror link that receives keyboard focus becomes visible at the bottom. */
.em-sr a:focus-visible {
  position: fixed;
  left: 50%;
  bottom: calc(var(--em-edge) + 44px);
  transform: translateX(-50%);
  width: auto;
  height: auto;
  margin: 0;
  padding: 8px 12px;
  clip: auto;
  clip-path: none;
  overflow: visible;
  background: var(--em-surface);
  border: 1px solid var(--em-line);
  border-radius: 5px;
  color: var(--em-text);
  z-index: var(--em-z-prompt);
  outline-offset: 2px;
}

/* ---------- motion ---------- */
/* The canonical reactor stylesheet freezes under prefers-reduced-motion. When
   the visitor has chosen to play the film, restore the reactor's own idle
   timings (spec 1.1.1: 46 s / 70 s / 3.2 s) so it is never silently frozen. */
@media (prefers-reduced-motion: reduce) {
  html[data-motion="play"] .em-shell .charles-ring-svg .chr-spin-slow { animation: chr-rot 46s linear infinite !important; }
  html[data-motion="play"] .em-shell .charles-ring-svg .chr-spin-rev { animation: chr-rot 70s linear infinite reverse !important; }
  html[data-motion="play"] .em-shell .charles-ring-svg .chr-core { animation: chr-breathe 3.2s ease-in-out infinite !important; }
  html[data-motion="play"] .em-shell .charles-ring-svg[data-state="thinking"] .chr-arc-orange { animation: chr-rot 2.8s linear infinite !important; }
  html[data-motion="play"] .em-shell .charles-ring-svg[data-state="listening"] .chr-spin-slow { animation-duration: 20s !important; }
  html[data-motion="play"] .em-shell .charles-ring-svg[data-state="thinking"] .chr-spin-slow { animation-duration: 12s !important; }
  html[data-motion="play"] .em-shell .charles-ring-svg[data-paused] * { animation-play-state: paused !important; }
  html:not([data-motion="play"]) .em-hint i,
  html:not([data-motion="play"]) .em-fan-item,
  html:not([data-motion="play"]) .em-palette { animation: none; opacity: 1; }
}
html[data-motion="still"] .em-hint i { animation: none; }

/* ---------- phones and touch ---------- */
@media (max-width: 720px) {
  .em-shell {
    --em-edge: 16px;
    --em-dial: 56px;
    --em-fan-r: 244px;
    --em-fan-step: 44px;
    --em-fan-gap: 14px;
  }
  .em-brand { padding: 12px 0; }
  .em-rail { right: 12px; }
  .em-rail ol { border-left: 0; border-right: 1px solid var(--em-line); }
  .em-rail-item { justify-content: flex-end; gap: 10px; min-height: 44px; margin-left: 0; margin-right: -1px; }
  .em-rail-item .em-tick { order: 3; }
  .em-rail-cursor { left: auto; right: -3px; }
  .em-rail-item:not([aria-current="true"]) .em-rail-num,
  .em-rail-item:not([aria-current="true"]) .em-rail-label { display: none; }
  .em-rail-item:not([aria-current="true"]) { padding-right: 0; }
  .em-rail-item[aria-current="true"] .em-tick { width: 16px; }
  .em-fan-item { min-height: 44px; }
  .em-shell[data-dial-open="true"] .em-hint,
  .em-shell[data-dial-open="true"] .em-corner-right,
  .em-shell[data-dial-open="true"] .em-rail { opacity: 0; pointer-events: none; transition: opacity 0.2s; }
  .em-key-hint, .em-sep { display: none; }
  .em-sound { min-height: 44px; }
  .em-hint { bottom: calc(var(--em-edge) + 4px); }
  .em-palette-backdrop { padding: 12px 12px 12px; align-items: flex-start; }
  .em-palette-input { font-size: 17px; }
  .em-palette-row b { font-size: 16px; }
  .em-palette-list { max-height: min(60vh, 480px); }
  .em-motion {
    bottom: calc(var(--em-edge) + 72px);
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    width: calc(100vw - 32px);
    padding: 14px;
  }
  .em-motion-actions { justify-content: flex-end; }
  .em-motion-close { position: absolute; top: 6px; right: 6px; }
  .em-motion p { padding-right: 36px; }
  .em-dial-hint { display: none; }
}
@media (hover: none) {
  .em-dial-hint { display: none; }
}

/* The head and slash palette are the landing's complete site header. The
   canonical reactor SVG/animation remains untouched; only its host grows 25%. */
.em-shell { --em-dial: 75px; }
.em-dial-wrap { left: max(var(--em-edge), env(safe-area-inset-left)); bottom: max(var(--em-edge), env(safe-area-inset-bottom)); }
.em-key-hint { min-height: 44px; }
.em-palette-backdrop { padding-top: max(5vh, env(safe-area-inset-top)); padding-bottom: max(16px, env(safe-area-inset-bottom)); }
.em-palette { width: min(960px, 100%); max-height: calc(100dvh - 10vh); display: flex; flex-direction: column; }
.em-palette-top, .em-palette-foot, .em-account-status { flex: none; }
.em-palette-close { flex: none; width: 44px; height: 44px; border: 1px solid var(--em-line) !important; border-radius: 5px; font-size: 24px !important; color: var(--em-muted) !important; }
.em-palette-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 12px; min-height: 0; max-height: none; padding: 20px 12px; }
.em-palette-list[data-filtered="true"] { display: block; }
.em-palette-group { min-width: 0; }
.em-palette-heading { color: var(--em-muted); font: 11px/1.4 var(--em-mono); letter-spacing: .1em; text-transform: uppercase; margin: 0 14px 10px; }
.em-palette-family { color: var(--em-muted); padding: 12px 14px 2px; font-size: 14px; }
.em-palette-row { align-items: center; gap: 8px; min-height: 44px; padding: 10px 12px; }
.em-palette-row b { font-size: 16px; white-space: normal; overflow-wrap: anywhere; }
.em-palette-row span { display: none; }
.em-palette-row[data-child="true"] { margin-left: 16px; border-left: 1px solid var(--em-dim); }
.em-palette-list[data-filtered="true"] .em-palette-group + .em-palette-group { margin-top: 18px; }
.em-palette-list[data-filtered="true"] .em-palette-row span { display: inline; }
.em-account-status { padding: 0 16px; font-size: 13px; color: var(--em-muted); }
.em-account-status:not(:empty) { padding-block: 10px; border-bottom: 1px solid var(--em-line); }
.em-palette-foot { flex-wrap: wrap; gap: 8px 16px; font-size: 10px; }
@media (max-width: 720px) {
  .em-shell { --em-dial: 70px; }
  .em-palette-backdrop { padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
  .em-palette { max-height: calc(100dvh - 24px); }
  .em-palette-top { gap: 6px; padding: 8px; }
  .em-palette-reactor { width: 36px; height: 36px; }
  .em-palette-input { font-size: 16px; }
  .em-palette-list { display: block; padding: 16px 8px; }
  .em-palette-group + .em-palette-group { margin-top: 20px; }
  .em-palette-row b { font-size: 16px; }
  .em-palette-foot { padding: 10px; }
  .em-palette-foot .em-status { margin-left: 0; flex-basis: 100%; }
}
.em-announcement { position: absolute; top: calc(var(--em-edge) + 48px); left: max(var(--em-edge), env(safe-area-inset-left)); right: max(var(--em-edge), env(safe-area-inset-right)); width: fit-content; max-width: calc(100% - 2 * var(--em-edge)); display: flex; align-items: center; gap: 12px; padding: 6px 12px; background: var(--em-surface); border: 1px solid var(--em-line); border-radius: 5px; font-size: 12px; pointer-events: auto; }
.em-announcement[hidden], .em-announcement a[hidden] { display: none; }
.em-announcement-message { color: var(--em-muted); overflow-wrap: anywhere; }
.em-announcement a { color: var(--em-text); min-height: 44px; display: flex; align-items: center; white-space: nowrap; }
.em-announcement[data-mode="auto"] { visibility: hidden; opacity: 0; pointer-events: none; transition: opacity .2s, visibility .2s; }
.em-announcement[data-mode="auto"][data-expanded="true"] { visibility: visible; opacity: 1; pointer-events: auto; }
@media (max-width: 720px) { .em-announcement { gap: 8px; flex-wrap: wrap; } }
@media (prefers-reduced-motion: reduce) { .em-announcement { transition: none; } }
.em-palette-input[hidden], .em-menu-title[hidden] { display: none; }
.em-menu-title { flex: 1; min-width: 0; font-size: 20px; }
.em-palette-backdrop[data-menu="rising"] .em-palette-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 720px) { .em-menu-title { font-size: 17px; } }

.em-entry-kind { color: var(--em-muted); font: 10px/1.2 var(--em-mono); margin-left: auto; flex: none; }
.em-search-all { width: 44px; height: 44px; flex: none; border: 1px solid var(--em-line) !important; border-radius: 5px; font: 18px var(--em-mono) !important; }
.em-search-all[hidden] { display: none; }
@media (max-width: 720px) {
  .em-corner-right { gap: 12px; }
  .em-key-hint { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; font-size: 0; border: 1px solid var(--em-line) !important; border-radius: 5px; }
  .em-key-hint kbd { font-size: 18px; }
  .em-hint { bottom: calc(var(--em-edge) + 84px); }
}
/* Keep the mobile scroll cue between the head and search, clear of captions. */
@media (max-width: 720px) {
  .em-hint { left: calc(var(--em-edge) + var(--em-dial) + 12px); bottom: calc(var(--em-edge) + 4px); transform: none; align-items: flex-start; font-size: 9px; letter-spacing: .06em; }
}
@media (max-width: 380px) { .em-hint { display: none; } }

/* Runtime Rising roster keeps the original fan's labels and leader lines. */
.em-fan-item:has(.em-fan-parent) { flex-direction: column; align-items: flex-start; justify-content: center; }
.em-fan-parent { font-size: 8px; letter-spacing: .04em; color: var(--em-muted); }
/* The phone's low film captions occupy the same space as the open arc. */
@media (max-width: 720px) {
  body:has(.em-shell[data-dial-open="true"]) .seg { visibility: hidden; }
}
