/* Shell — stage switcher, journey strip, presenter rail. Dark chrome so the screens pop. */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: #0e1013;
  color: #e8eaed;
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  padding: 10px 18px;
  border-bottom: 1px solid #23262b;
}
.brand { font-size: 13px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.brand span { color: #8b93a0; font-weight: 400; }

.journey { display: flex; align-items: center; flex-wrap: nowrap; gap: 2px 0; flex: 1; justify-content: center; min-width: 0; }
.j-seg .short { display: none; }
@media (max-width: 1280px) {
  .brand span { display: none; }
  .j-seg .full { display: none; }
  .j-seg .short { display: inline; }
  .keys { display: none; }
}
@media (max-width: 980px) {
  .brand { display: none; }
  .live-pill { display: none; }
}
.j-seg {
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; color: #8b93a0;
  cursor: pointer; user-select: none;
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
}
.j-seg:hover { color: #cfd6e0; }
.j-seg.active { color: #fff; background: #1d2127; }
.j-seg .n {
  width: 17px; height: 17px; border-radius: 50%;
  border: 1.5px solid currentColor;
  display: flex; align-items: center; justify-content: center;
  font-size: 9.5px; font-weight: 700;
}
.j-arrow { color: #3a3f46; font-size: 11px; padding: 0 2px; }
.j-arrow.pulse { color: #55c0a7; animation: apulse 1s ease infinite; }
@keyframes apulse { 50% { opacity: .35; } }

.top-actions { display: flex; align-items: center; gap: 10px; }
.live-pill {
  font-size: 10px; font-weight: 700; letter-spacing: .08em;
  padding: 3px 10px; border-radius: 10px;
  border: 1px solid #3a3f46; color: #6f767e;
}
.live-pill.on { border-color: #2f9e5b; color: #2f9e5b; }
.icon-btn {
  background: #1d2127; border: 1px solid #2c3037; color: #cfd6e0;
  font-size: 11.5px; border-radius: 6px; padding: 5px 12px; cursor: pointer;
}
.icon-btn:hover { background: #262b32; }

.stage-area { flex: 1; min-height: 0; position: relative; }
.stage-area iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
  background: #0e1013;
}
.stage-area iframe.visible { opacity: 1; pointer-events: auto; }

.bottombar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 18px;
  border-top: 1px solid #23262b;
  font-size: 11.5px;
  color: #8b93a0;
}
.stage-title { color: #cfd6e0; font-weight: 600; }
.keys { margin-left: auto; display: flex; gap: 10px; white-space: nowrap; }
.keys b {
  color: #cfd6e0; font-weight: 600;
  background: #1d2127; border: 1px solid #2c3037; border-radius: 4px;
  padding: 1px 6px; font-size: 10.5px;
}

/* Presenter rail */
.rail {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 360px;
  background: #14171b;
  border-left: 1px solid #23262b;
  transform: translateX(100%);
  transition: transform .25s ease;
  z-index: 40;
  display: flex;
  flex-direction: column;
}
.rail.open { transform: none; }
.rail-head {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px;
  font-size: 13px; font-weight: 700;
}
.rail-head .x { cursor: pointer; color: #8b93a0; }
.rail-body { flex: 1; overflow-y: auto; padding: 0 16px 16px; font-size: 12.5px; line-height: 1.6; }
.rail-body h4 { margin: 16px 0 6px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: #8b93a0; }
.rail-body p { margin: 0 0 8px; color: #cfd6e0; }
.rail-body .say { border-left: 3px solid #55c0a7; padding-left: 10px; color: #e8eaed; font-style: italic; }
.rail-foot {
  flex-shrink: 0;
  border-top: 1px solid #23262b;
  padding: 10px 16px 14px;
  font-size: 10.5px;
  color: #8b93a0;
  line-height: 1.7;
}
.rail-foot .prov-chip { font-size: 9px; }
.prov-chip {
  display: inline-block;
  font-size: 9.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 1.5px 7px; border-radius: 3px; border: 1px solid currentColor; margin-right: 4px;
}
.prov-chip.real { color: #2f9e5b; }
.prov-chip.corpus { color: #4c8fd6; }
.prov-chip.scripted { color: #8a8f98; }
