/* FFCLUB Cloud Sentry Web UI (/sentry) — Harmonized Portal Desktop & Mobile Responsive Stylesheet */

/* Minimal Portal Navigation & /account Device Row Hooks */
#nav-sentry[aria-current="page"] {
  color: var(--orange, #ec712b);
  font-weight: 600;
}

@media (max-width: 480px) {
  .site-header {
    padding-inline: 10px;
    gap: 6px;
  }
  .site-header .brand {
    font-size: 14.5px;
    gap: 5px;
  }
  .site-header .brand img {
    width: 22px;
    height: 22px;
  }
  .site-header nav {
    gap: 7px;
  }
  .site-header nav > a:not(.button) {
    font-size: 11.5px;
  }
  .site-header .button-small {
    padding: 5px 8px;
    font-size: 11px;
    min-height: 30px;
  }
}

.account-device-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.account-sentry-link {
  border-color: #d6dfd0;
  color: #2d4b2d;
  background: #f5f8f2;
}

.account-sentry-link:hover {
  background: #e9f1e4;
  border-color: #b7c8ae;
}

/* Hidden SVG Sprite (CSP-safe: zero inline style=) */
.sentry-svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
}

/* Isolate /sentry full-height workspace shell without touching other portal pages */
body.sentry-page {
  margin: 0;
  background: #f8f7f3;
  color: #252723;
  height: 100dvh;
  min-height: 640px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body.sentry-page > .site-header,
body.sentry-page > .site-footer,
body.sentry-page > #story-guide,
body.sentry-page > #mobile-chapter-bar {
  display: none !important;
}

body.sentry-page > #main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.sentry-view {
  --s-bg: #f8f7f3;
  --s-surface: #ffffff;
  --s-subtle: #f2f1eb;
  --s-ink: #252723;
  --s-muted: #777b72;
  --s-line: #e6e5de;
  --s-orange: #ec712b;
  --s-blue: #1d63d8;
  --s-blue-stage: #4c8dff;
  --s-switch-off: #8995a5;
  --s-stage-ground: #0c1017;
  --s-stage-panel: #131924;
  --s-stage-raised: #1b2433;
  --s-stage-line: rgba(255, 255, 255, 0.08);
  --s-stage-ink: #f2f5f9;
  --s-stage-muted: #8c98a8;

  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--s-bg);
  color: var(--s-ink);
  -webkit-font-smoothing: antialiased;
}

.sentry-root {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}

:where(.sentry-view button) {
  font: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
  padding: 0;
}

.sentry-view button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.sentry-view button:focus-visible,
.sentry-view a:focus-visible,
.sentry-view select:focus-visible,
.sentry-view input:focus-visible {
  outline: 2px solid var(--s-blue);
  outline-offset: 2px;
}

/* Geometric SVG Icon Utilities */
.s-ico {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  display: inline-block;
}

.s-ico-13 { width: 13px; height: 13px; }
.s-ico-14 { width: 14px; height: 14px; }
.s-ico-15 { width: 15px; height: 15px; }
.s-ico-18 { width: 18px; height: 18px; }
.s-ico-20 { width: 20px; height: 20px; }

/* =========================================================================
   Authentic FFCLUB Pill Switch (Exact 48x28 Track + 24x24 White Thumb)
   ========================================================================= */
.ff-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 48px;
  height: 28px;
  border-radius: 14px;
  background: var(--s-switch-off) !important;
  padding: 2px !important;
  flex-shrink: 0;
  transition: background-color 0.16s ease;
}

.ff-switch.on {
  background: var(--s-blue) !important;
}

.ff-switch-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  transform: translateX(0);
  transition: transform 0.16s ease;
  pointer-events: none;
}

.ff-switch.on .ff-switch-thumb {
  transform: translateX(20px);
}

/* =========================================================================
   Harmonized FFCLUB Portal Header (Desktop)
   ========================================================================= */
.sentry-header {
  height: 72px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--s-bg);
  border-bottom: 1px solid var(--s-line);
  flex-shrink: 0;
}

.sentry-header-left {
  display: flex;
  align-items: center;
  gap: 36px;
  min-width: 0;
}

.sentry-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
  font-size: 21px;
  letter-spacing: -0.6px;
  color: var(--s-ink);
  white-space: nowrap;
  flex-shrink: 0;
}

.sentry-brand img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: block;
}

.sentry-brand-club {
  margin-left: 2px;
  font-size: 0.84em;
  letter-spacing: -0.6px;
}

.sentry-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  color: #5b5f57;
}

.sentry-nav a {
  position: relative;
  height: 72px;
  display: inline-flex;
  align-items: center;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.14s ease;
}

.sentry-nav a:hover {
  color: var(--s-orange);
}

.sentry-nav a.is-current {
  color: var(--s-ink);
  font-weight: 650;
}

.sentry-nav a.is-current::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--s-orange);
  border-radius: 2px;
}

.sentry-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.sentry-vehicle-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border-radius: 99px;
  background: var(--s-surface);
  border: 1px solid var(--s-line);
  font-size: 12.5px;
  color: #454941;
  font-weight: 500;
  max-width: 460px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

.sentry-vehicle-select {
  border: 0;
  background: transparent;
  color: var(--s-ink);
  font: inherit;
  font-weight: 600;
  padding-right: 4px;
  cursor: pointer;
  max-width: 150px;
  flex-shrink: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sentry-vehicle-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sentry-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2f9458;
  flex-shrink: 0;
}

.sentry-status-dot.resting {
  background: #687d96;
}

.sentry-settings-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px !important;
  border-radius: 8px;
  border: 1px solid #dcded5 !important;
  background: #ffffff !important;
  color: #333d30;
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.sentry-settings-btn:hover {
  background: #f0f1e9 !important;
}

.sentry-settings-btn.active {
  background: #292e27 !important;
  border-color: #292e27 !important;
  color: #ffffff;
}

.sentry-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f9eade;
  color: var(--s-orange);
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 650;
  flex-shrink: 0;
}

/* Mobile Backbar (only shown <= 860px when inside Event Player) */
.sentry-mobile-backbar {
  display: none;
}

/* Calm Non-Blocking Entitlement Grace Banner */
.sentry-grace-banner {
  background: #fff8ed;
  border-bottom: 1px solid #f0dcb8;
  color: #7d5216;
  padding: 9px 28px;
  font-size: 12.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}

.sentry-grace-banner a {
  color: #9e4b10;
  font-weight: 650;
  white-space: nowrap;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* =========================================================================
   Auth / Empty / Error Centered State Cards
   ========================================================================= */
.sentry-empty-shell {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 28px 20px;
}

.sentry-state-card {
  width: min(460px, 100%);
  background: var(--s-surface);
  border: 1px solid var(--s-line);
  border-radius: 18px;
  padding: 32px 30px;
  box-shadow: 0 10px 32px rgba(37, 39, 35, 0.04);
  text-align: center;
}

.sentry-state-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #f4f3ec;
  color: var(--s-ink);
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
}

.sentry-state-card h1 {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.3px;
}

.sentry-state-card p {
  margin: 0 0 22px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--s-muted);
}

.sentry-state-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sentry-state-actions .button {
  min-height: 42px;
  padding: 10px 20px;
  gap: 10px;
}

.sentry-state-note {
  margin-top: 18px !important;
  margin-bottom: 0 !important;
  font-size: 12px !important;
  color: #8c9085 !important;
}

/* =========================================================================
   Main Desktop Workspace (Left Sidebar + Right Cinema Stage + Drawer)
   ========================================================================= */
.sentry-workspace {
  flex: 1;
  min-height: 0;
  padding: 18px 28px 20px;
  display: flex;
  gap: 18px;
  background: var(--s-bg);
  position: relative;
  overflow: hidden;
}

.sentry-workspace.with-drawer {
  padding-right: 0;
  padding-top: 0;
  padding-bottom: 0;
  padding-left: 24px;
  align-items: stretch;
}

.sentry-workspace.with-drawer .sentry-sidebar,
.sentry-workspace.with-drawer .sentry-stage-wrap {
  margin-top: 18px;
  margin-bottom: 20px;
}

/* Left Sidebar Card */
.sentry-sidebar {
  width: 372px;
  flex-shrink: 0;
  background: var(--s-surface);
  border: 1px solid var(--s-line);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 28px rgba(37, 39, 35, 0.03);
  min-height: 0;
}

.sentry-workspace.with-drawer .sentry-sidebar {
  width: 344px;
}

.sentry-mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 11px;
  background: var(--s-subtle);
  flex-shrink: 0;
}

.sentry-mode-switch button {
  height: 34px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 550;
  color: #6c7067;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.sentry-mode-switch button.active {
  background: #ffffff;
  color: var(--s-ink);
  font-weight: 650;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.sentry-date-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 13px;
  padding: 0 2px;
  flex-shrink: 0;
}

.sentry-date-stepper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 650;
  color: var(--s-ink);
  font-variant-numeric: tabular-nums;
}

.sentry-date-nav-btn {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: #6c7067;
  background: var(--s-subtle);
}

.sentry-date-nav-btn:hover:not(:disabled) {
  background: #e7e6de;
  color: var(--s-ink);
}

.sentry-date-summary {
  font-size: 12px;
  color: var(--s-muted);
  font-variant-numeric: tabular-nums;
}

.sentry-filter-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #efeee8;
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.sentry-filter-pills::-webkit-scrollbar {
  display: none;
}

.sentry-filter-pill {
  height: 30px;
  padding: 0 11px !important;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 550;
  color: #63685e;
  background: #f5f4ef !important;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.sentry-filter-pill:hover {
  background: #eae9e1 !important;
}

.sentry-filter-pill.active {
  background: #292e27 !important;
  color: #ffffff;
}

/* Mobile-only timeline resting preview & reserve cards hidden on desktop */
.sentry-mobile-tl-preview,
.sentry-mobile-reserve-card {
  display: none;
}

/* Event Cards List */
.sentry-event-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
  padding-right: 2px;
}

.sentry-event-card {
  width: 100%;
  flex-shrink: 0;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px !important;
  border-radius: 13px;
  background: #faf9f6 !important;
  border: 1px solid transparent !important;
  transition: background-color 0.14s ease, border-color 0.14s ease;
}

.sentry-event-card:hover {
  background: #f3f2ec !important;
}

.sentry-event-card.selected {
  background: #f2f6fd !important;
  border-color: #d5e3fa !important;
}

.sentry-event-thumb {
  position: relative;
  width: 136px;
  height: 85px;
  border-radius: 9px;
  overflow: hidden;
  flex-shrink: 0;
  background: #10151e;
}

.sentry-event-thumb canvas,
.sentry-event-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sentry-thumb-img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 200% !important;
  height: 200% !important;
  max-width: none !important;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.14s ease;
}

.sentry-thumb-img.is-loaded {
  opacity: 1;
}

.sentry-thumb-img.cam-0 { left: 0; top: 0; }
.sentry-thumb-img.cam-1 { left: -100%; top: 0; }
.sentry-thumb-img.cam-2 { left: 0; top: -100%; }
.sentry-thumb-img.cam-3 { left: -100%; top: -100%; }

.sentry-thumb-canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: block;
}

.sentry-event-thumb-placeholder {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #5b697d;
  background: #121822;
}

.sentry-event-thumb-cam {
  position: absolute;
  z-index: 3;
  left: 6px;
  bottom: 6px;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(10, 14, 20, 0.76);
  color: #f2f5f9;
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.3;
}

.sentry-event-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sentry-event-meta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.sentry-event-time {
  font-size: 12px;
  font-weight: 600;
  color: #5c6158;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.sentry-event-tags {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
}

.calm-tag {
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.35;
}

.calm-tag.priority {
  background: #fdece8;
  color: #ad3c2b;
}

.calm-tag.stay {
  background: #eaf1fc;
  color: #2457a6;
}

.calm-tag.passby {
  background: #eff0ea;
  color: #62675d;
}

.calm-tag.starred {
  background: #fef4e3;
  color: #9e6214;
}

.sentry-event-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 650;
  color: #1f221e;
  line-height: 1.38;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.sentry-event-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11.5px;
  color: #84887e;
}

.sentry-event-chev {
  display: none;
  color: #a9ada3;
}

.sentry-list-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 16px;
  color: var(--s-muted);
  gap: 10px;
}

.sentry-list-empty strong {
  font-size: 14px;
  color: var(--s-ink);
  font-weight: 600;
}

.sentry-list-empty span {
  font-size: 12px;
  line-height: 1.6;
}

.sentry-jump-day-btn {
  margin-top: 4px;
  height: 32px;
  padding: 0 14px !important;
  border-radius: 8px;
  border: 1px solid #dcded5 !important;
  background: #ffffff !important;
  color: var(--s-ink);
  font-size: 12px;
  font-weight: 550;
}

.sentry-sidebar-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #efeee8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  color: #878b80;
  flex-shrink: 0;
}

/* Timeline Sidebar List */
.sentry-timeline-note {
  margin-top: 12px;
  padding: 9px 12px;
  border-radius: 10px;
  background: #f5f4ef;
  font-size: 12px;
  color: #62675d;
  line-height: 1.5;
  flex-shrink: 0;
}

.sentry-timeline-feed {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 2px;
}

.tl-item {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 11px !important;
  border-radius: 11px;
  background: #faf9f6 !important;
  border: 1px solid transparent !important;
}

.tl-item:hover {
  background: #f3f2ec !important;
}

.tl-item.selected {
  background: #f1f6fd !important;
  border-color: #d2e2fb !important;
}

.tl-time {
  width: 42px;
  font-size: 12.5px;
  font-weight: 650;
  color: #4f544b;
  font-variant-numeric: tabular-nums;
  padding-top: 1px;
  flex-shrink: 0;
}

.tl-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  background: #9aa195;
  flex-shrink: 0;
}

.tl-dot.priority { background: #dc5341; }
.tl-dot.stay { background: #2d6cdf; }
.tl-dot.sleep { background: #687d96; }

.tl-body {
  flex: 1;
  min-width: 0;
}

.tl-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.tl-title {
  font-size: 12.5px;
  font-weight: 600;
  color: #222520;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tl-desc {
  margin-top: 3px;
  font-size: 11.5px;
  color: #7d8277;
  line-height: 1.4;
}

.tl-folded-break {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 11px;
  border-radius: 9px;
  border: 1px dashed #dcded4;
  background: #fcfcf9;
  color: #7c8176;
  font-size: 11.5px;
}

/* =========================================================================
   Quiet Dark Cinema Stage (Right Column on Desktop, Drill-Down on Mobile)
   ========================================================================= */
.sentry-stage-wrap {
  flex: 1;
  min-width: 0;
  min-height: 0;
  background: var(--s-stage-ground);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  color: var(--s-stage-ink);
  box-shadow: 0 14px 36px rgba(12, 16, 23, 0.12);
  overflow: hidden;
  position: relative;
}

.sentry-view .stage-topbar {
  min-height: 56px;
  margin-bottom: 0;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--s-stage-line);
  flex-shrink: 0;
  flex-wrap: wrap;
}

.stage-clip-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 180px;
}

.stage-focus-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(76, 141, 255, 0.16);
  border: 1px solid rgba(76, 141, 255, 0.34);
  color: #9ec0ff;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.stage-clip-title time {
  font-size: 13px;
  color: var(--s-stage-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.stage-clip-title strong {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--s-stage-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stage-mobile-head {
  display: none;
}

.cam-seg {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: var(--s-stage-panel);
  flex-shrink: 0;
}

.cam-seg button {
  height: 30px;
  padding: 0 11px !important;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 550;
  color: var(--s-stage-muted);
  white-space: nowrap;
}

.cam-seg button:hover {
  color: var(--s-stage-ink);
}

.cam-seg button.active {
  background: var(--s-blue-stage) !important;
  color: #ffffff;
  font-weight: 600;
}

.stage-tools {
  display: flex;
  align-items: center;
  gap: 7px;
  position: relative;
  flex-shrink: 0;
}

.stage-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 11px !important;
  border-radius: 8px;
  background: var(--s-stage-panel) !important;
  color: #d6dfeb;
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
}

.stage-tool-btn:hover {
  background: var(--s-stage-raised) !important;
}

.stage-tool-btn.active {
  background: rgba(76, 141, 255, 0.18) !important;
  color: #8bb6ff;
}

.stage-tool-btn.starred {
  background: rgba(245, 178, 64, 0.16) !important;
  color: #f6c467;
}

.resting-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 99px;
  background: #17202e;
  color: #b4c2d6;
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
}

/* Central 4-Way WebGL Canvas Area */
.stage-canvas-area {
  flex: 1;
  min-height: 0;
  padding: 14px 20px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.sentry-stage-box {
  position: relative;
  width: 100%;
  height: 100%;
  max-height: 624px;
  border-radius: 12px;
  overflow: hidden;
  background: #070a0f;
  user-select: none;
  touch-action: none;
}

.sentry-webgl-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.sentry-hidden-video {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.sentry-pane-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.sentry-pane-overlay.stage-mode-hero {
  grid-template-columns: 73.8% 1fr;
  grid-template-rows: repeat(3, 1fr);
}

.sentry-pane-overlay.stage-mode-hero .sentry-pane-slot.is-main {
  grid-column: 1;
  grid-row: 1 / -1;
}

.sentry-pane-overlay.stage-mode-quad {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.sentry-pane-overlay.stage-mode-single {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
}

.sentry-pane-overlay.stage-mode-single .sentry-pane-slot:not(.is-main) {
  display: none;
}

.sentry-pane-slot {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  pointer-events: auto;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.sentry-pane-slot.is-main {
  cursor: grab;
  border-color: rgba(255, 255, 255, 0.08);
}

.sentry-pane-slot.is-main.is-dragging {
  cursor: grabbing;
}

.sentry-pane-slot:not(.is-main):hover {
  border-color: rgba(76, 141, 255, 0.55);
}

.pane-label {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(8, 11, 16, 0.64);
  backdrop-filter: blur(6px);
  color: #f2f5f9;
  font-size: 11.5px;
  font-weight: 550;
  pointer-events: none;
}

.sentry-pane-slot:not(.is-main) .pane-label {
  left: 7px;
  top: 7px;
  padding: 2px 7px;
  font-size: 10.5px;
}

.sentry-zoom-chip {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(12, 16, 23, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e4ecf7;
  font-size: 11.5px;
  font-weight: 550;
  pointer-events: auto;
  cursor: pointer;
}

.sentry-stage-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  background: rgba(12, 16, 23, 0.88);
  color: var(--s-stage-muted);
  gap: 10px;
  z-index: 3;
}

.sentry-stage-placeholder strong {
  color: var(--s-stage-ink);
  font-size: 15px;
  font-weight: 600;
}

.sentry-stage-placeholder span {
  font-size: 12.5px;
  max-width: 380px;
  line-height: 1.6;
}

.sentry-unlock-btn {
  margin-top: 6px;
  height: 38px;
  padding: 0 18px !important;
  border-radius: 10px;
  background: var(--s-blue-stage) !important;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

/* Optical Dewarp Popover */
.optical-popover {
  position: absolute;
  top: 54px;
  right: 20px;
  width: 288px;
  background: #141b27;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.45);
  z-index: 20;
  color: var(--s-stage-ink);
}

.optical-pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.optical-pop-head strong {
  font-size: 13.5px;
  font-weight: 600;
}

.optical-reset-btn {
  font-size: 11.5px;
  color: #8bb6ff;
  padding: 2px 6px !important;
}

.optical-mode-seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 3px;
  border-radius: 9px;
  background: #0d121b;
  margin-bottom: 12px;
}

.optical-mode-seg button {
  height: 30px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 550;
  color: var(--s-stage-muted);
}

.optical-mode-seg button.active {
  background: var(--s-blue-stage) !important;
  color: #ffffff;
}

.optical-slider-row {
  margin-top: 10px;
}

.optical-slider-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #c2cede;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}

.optical-slider-row input[type="range"] {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  accent-color: #4c8dff;
}

/* Scrubber & Transport Controls (explicitly isolated from gallery.css .stage-controls) */
.sentry-view .stage-controls {
  width: 100%;
  margin: 0;
  padding: 4px 20px 18px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 10px;
  flex-shrink: 0;
}

.scrubber-wrap {
  position: relative;
  width: 100%;
  padding: 22px 0 10px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.scrubber-cue {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  line-height: 1.3;
  color: #f29b91;
  font-weight: 550;
  white-space: nowrap;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}

.scrubber-cue.is-align-left {
  transform: translateX(0);
}

.scrubber-cue.is-align-right {
  transform: translateX(-100%);
}

.scrubber-track {
  position: relative;
  width: 100%;
  height: 6px;
  border-radius: 99px;
  background: #1e2736;
  transition: height 0.12s ease;
}

.scrubber-wrap:hover .scrubber-track,
.scrubber-wrap.is-scrubbing .scrubber-track {
  height: 8px;
}

.scrubber-buffered {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  border-radius: 99px;
  background: rgba(154, 178, 212, 0.24);
  pointer-events: none;
  z-index: 1;
}

.scrubber-fill {
  position: relative;
  z-index: 2;
  width: 0%;
  height: 100%;
  border-radius: 99px;
  background: var(--s-blue-stage);
  pointer-events: none;
}

.scrubber-markers {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.scrubber-marker-span {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 99px;
  background: rgba(240, 106, 91, 0.42);
  pointer-events: none;
}

.scrubber-event-dot {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 0%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #f06a5b;
  box-shadow: 0 0 0 2px rgba(12, 16, 23, 0.72);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.scrubber-thumb {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 0%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.48), 0 0 0 2px rgba(76, 141, 255, 0.35);
  transform: translate(-50%, -50%);
  transition: transform 0.12s ease;
  pointer-events: none;
}

.scrubber-wrap:hover .scrubber-thumb,
.scrubber-wrap.is-scrubbing .scrubber-thumb {
  transform: translate(-50%, -50%) scale(1.22);
}

.stream-quality-seg {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 8px;
  background: var(--s-stage-panel);
  border: 1px solid var(--s-stage-line);
}

.stream-quality-seg button {
  height: 26px;
  padding: 0 9px !important;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 550;
  color: var(--s-stage-muted);
  white-space: nowrap;
}

.stream-quality-seg button.active {
  background: var(--s-blue-stage) !important;
  color: #ffffff;
  font-weight: 600;
}

.transport-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.transport-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.play-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--s-blue-stage) !important;
  color: #ffffff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.step-btn {
  height: 34px;
  padding: 0 10px !important;
  border-radius: 8px;
  background: var(--s-stage-panel) !important;
  color: #cfd8e5;
  font-size: 12.5px;
  font-weight: 550;
  white-space: nowrap;
}

.step-btn:hover {
  background: var(--s-stage-raised) !important;
}

.time-readout {
  margin-left: 2px;
  font-size: 13px;
  color: #dce4f0;
  font-variant-numeric: tabular-nums;
  font-weight: 550;
  white-space: nowrap;
}

.time-readout span {
  color: var(--s-stage-muted);
}

.transport-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stream-state {
  font-size: 12.5px;
  color: var(--s-stage-muted);
  white-space: nowrap;
}

.stream-state strong {
  color: #dce4f0;
  font-weight: 550;
}

.hd-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 15px !important;
  border-radius: 9px;
  background: rgba(76, 141, 255, 0.18) !important;
  color: #8eb8ff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.hd-btn:hover:not(:disabled) {
  background: rgba(76, 141, 255, 0.28) !important;
}

.hd-btn.is-primary {
  background: var(--s-blue-stage) !important;
  color: #ffffff;
}

.hd-btn.is-queued {
  background: rgba(76, 141, 255, 0.14) !important;
  color: #a8c7ff;
}

.hd-btn.is-ready {
  background: rgba(47, 148, 88, 0.22) !important;
  color: #82dfa8;
}

.mobile-dewarp-btn {
  display: none;
}

.mobile-action-card {
  display: none;
}

/* Full-Day Ribbon & Resting CTA Bar (Timeline Mode) */
.day-ribbon-wrap {
  padding: 4px 20px 10px;
  flex-shrink: 0;
}

.day-ribbon-labels {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: var(--s-stage-muted);
  margin-bottom: 7px;
  font-variant-numeric: tabular-nums;
}

.day-ribbon-bar {
  height: 10px;
  border-radius: 99px;
  background: #18202d;
  display: flex;
  align-items: center;
  padding: 0 6px;
  gap: 5px;
}

.ribbon-seg {
  height: 4px;
  border-radius: 99px;
  background: #2b3648;
  flex: 1;
}

.ribbon-seg.folded {
  background: repeating-linear-gradient(
    90deg,
    #263040 0,
    #263040 5px,
    transparent 5px,
    transparent 9px
  );
}

.ribbon-node {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #687d96;
}

.ribbon-node.impact { background: #ef6b5b; }
.ribbon-node.loiter { background: #3b82f6; }
.ribbon-node.passing { background: #8996a8; }

.ribbon-node.active {
  width: 11px;
  height: 11px;
  background: var(--s-blue-stage);
  box-shadow: 0 0 0 3px rgba(76, 141, 255, 0.25);
}

.resting-cta-bar {
  margin: 4px 20px 18px;
  padding: 15px 18px;
  border-radius: 14px;
  background: var(--s-stage-panel);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}

.resting-cta-copy strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--s-stage-ink);
}

.resting-cta-copy p {
  margin: 5px 0 0;
  font-size: 12px;
  color: var(--s-stage-muted);
  line-height: 1.5;
}

.resting-reserve-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px !important;
  border-radius: 10px;
  background: var(--s-blue-stage) !important;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.resting-reserve-btn.is-queued {
  background: rgba(76, 141, 255, 0.22) !important;
  color: #9ec0ff;
}

/* =========================================================================
   Cloud Settings Drawer (Right Panel on Desktop, Bottom Sheet on Mobile)
   ========================================================================= */
.sentry-drawer-backdrop {
  display: none;
}

.sentry-settings-drawer {
  width: 404px;
  flex-shrink: 0;
  background: #ffffff;
  border-left: 1px solid var(--s-line);
  box-shadow: -10px 0 30px rgba(32, 35, 30, 0.05);
  display: flex;
  flex-direction: column;
  padding: 20px 24px;
  overflow-y: auto;
  z-index: 30;
}

.sentry-settings-drawer[hidden] {
  display: none !important;
}

.sheet-grabber {
  display: none;
}

.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid #efeee8;
  flex-shrink: 0;
}

.drawer-header h2 {
  margin: 0;
  font-size: 18.5px;
  font-weight: 650;
  letter-spacing: -0.3px;
  color: var(--s-ink);
}

.drawer-header p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--s-muted);
}

.drawer-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--s-subtle) !important;
  color: #5b5f57;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.drawer-section {
  margin-top: 18px;
  flex-shrink: 0;
}

.drawer-section-title {
  font-size: 12px;
  font-weight: 650;
  color: var(--s-muted);
  margin-bottom: 8px;
}

.drawer-card {
  background: #faf9f6;
  border: 1px solid #ecebe4;
  border-radius: 14px;
  padding: 2px 16px;
}

.drawer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid #efeee8;
}

.drawer-row:last-child {
  border-bottom: 0;
}

.drawer-row-stack {
  display: block;
}

.drawer-row-copy {
  flex: 1;
  min-width: 0;
}

.drawer-row-copy strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: #222520;
}

.drawer-row-copy span {
  display: block;
  margin-top: 3px;
  font-size: 11.8px;
  color: #7c8076;
  line-height: 1.45;
}

.drawer-row-val {
  font-size: 12.5px;
  font-weight: 600;
  color: #3d423a;
  white-space: nowrap;
}

.drawer-link-btn {
  font-size: 12px;
  font-weight: 600;
  color: var(--s-blue);
  margin-top: 6px;
  display: inline-block;
}

.web-seg-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 10px;
  padding: 4px;
  border-radius: 10px;
  background: #efeee8;
}

.web-seg-pills button {
  height: 34px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 550;
  color: #5d6258;
}

.web-seg-pills button.active {
  background: #ffffff !important;
  color: var(--s-blue);
  font-weight: 650;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.drawer-footer-note {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #efeee8;
  font-size: 11.8px;
  color: #8a8e83;
  line-height: 1.6;
}

.drawer-footer-links {
  margin-top: 10px;
  display: flex;
  gap: 14px;
  font-size: 12px;
  font-weight: 550;
  color: var(--s-ink);
}

/* =========================================================================
   Vehicle Sync Pairing Card (Drawer Warm Alabaster + Stage Dark Cinema + Mobile)
   ========================================================================= */
.pair-card {
  padding: 14px 16px !important;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pair-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.pair-head-copy {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.pair-head-copy strong {
  display: block;
  font-size: 13.5px;
  font-weight: 650;
  color: #222520;
}

.pair-head-copy span {
  display: block;
  margin-top: 3px;
  font-size: 11.8px;
  color: #7c8076;
  line-height: 1.5;
}

.pair-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  background: #ecebe4;
  color: #64685e;
}

.pair-status-badge.is-linked {
  background: #e6f4ec;
  color: #227244;
}

.pair-target-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 9px;
  background: #f2f1eb;
  border: 1px solid #e4e3da;
  font-size: 12px;
  color: #5b5f57;
}

.pair-target-pill strong {
  color: var(--s-ink);
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pair-code-box {
  background: #ffffff;
  border: 1px solid #e4e3da;
  border-radius: 12px;
  padding: 14px 14px 12px;
  text-align: center;
}

.pair-code-box.is-expired .pair-code-digits {
  opacity: 0.42;
  text-decoration: line-through;
}

.pair-code-digits {
  font-size: 30px;
  font-weight: 750;
  letter-spacing: 0.14em;
  color: var(--s-ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.pair-code-timer {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--s-blue);
  font-variant-numeric: tabular-nums;
}

.pair-code-box.is-expired .pair-code-timer {
  color: #b33f32;
}

.pair-code-tip {
  margin: 8px 0 0 !important;
  font-size: 11.8px !important;
  color: #6d7268 !important;
  line-height: 1.55 !important;
}

.pair-error-note {
  margin: 0 !important;
  font-size: 12px !important;
  color: #b33f32 !important;
  text-align: left;
  line-height: 1.45;
}

.pair-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pair-primary-btn {
  flex: 1 1 auto;
  min-height: 38px;
  padding: 0 16px !important;
  border-radius: 9px;
  background: var(--s-blue) !important;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  transition: opacity 0.14s ease, background-color 0.14s ease;
}

.pair-primary-btn:hover:not(:disabled) {
  background: #1754bc !important;
}

.pair-revoke-btn {
  min-height: 38px;
  padding: 0 13px !important;
  border-radius: 9px;
  border: 1px solid #e6c6c1 !important;
  background: #fff7f6 !important;
  color: #b33f32;
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  transition: background-color 0.14s ease;
}

.pair-revoke-btn:hover:not(:disabled) {
  background: #fdece9 !important;
}

/* Stage Empty-State Pairing Guide (Dark Cinema Theme) */
.pair-stage-guide {
  width: min(440px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.pair-stage-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: rgba(76, 141, 255, 0.14);
  color: #8bb6ff;
  display: grid;
  place-items: center;
}

.pair-stage-title {
  color: var(--s-stage-ink) !important;
  font-size: 16px !important;
  font-weight: 650 !important;
}

.pair-stage-desc {
  margin: 0 !important;
  font-size: 12.6px !important;
  color: var(--s-stage-muted) !important;
  line-height: 1.6 !important;
  max-width: 400px;
}

.pair-stage-card {
  width: 100%;
  margin-top: 6px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--s-stage-panel);
  border: 1px solid var(--s-stage-line);
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.pair-stage-card .pair-head-copy strong {
  color: var(--s-stage-ink);
}

.pair-stage-card .pair-head-copy span {
  color: var(--s-stage-muted);
  max-width: none;
}

.pair-stage-card .pair-status-badge {
  background: rgba(255, 255, 255, 0.08);
  color: #c2cede;
}

.pair-stage-card .pair-status-badge.is-linked {
  background: rgba(47, 148, 88, 0.22);
  color: #82dfa8;
}

.pair-stage-card .pair-target-pill {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: #9ba8ba;
}

.pair-stage-card .pair-target-pill strong {
  color: var(--s-stage-ink);
}

.pair-stage-card .pair-code-box {
  background: #0d131d;
  border-color: rgba(255, 255, 255, 0.1);
}

.pair-stage-card .pair-code-digits {
  color: #ffffff;
  font-size: 32px;
}

.pair-stage-card .pair-code-timer {
  color: #8bb6ff;
}

.pair-stage-card .pair-code-box.is-expired .pair-code-timer {
  color: #f49b90;
}

.pair-stage-card .pair-code-tip {
  color: #9ba8ba !important;
}

.pair-stage-card .pair-error-note {
  color: #f49b90 !important;
}

.pair-stage-card .pair-primary-btn {
  background: var(--s-blue-stage) !important;
  color: #ffffff;
}

.pair-stage-card .pair-primary-btn:hover:not(:disabled) {
  background: #3d7ef2 !important;
}

.pair-stage-card .pair-revoke-btn {
  background: rgba(240, 106, 91, 0.14) !important;
  border-color: rgba(240, 106, 91, 0.34) !important;
  color: #f49b90;
}

.pair-stage-card .pair-revoke-btn:hover:not(:disabled) {
  background: rgba(240, 106, 91, 0.22) !important;
}

/* Mobile-only empty-state pairing card (hidden on desktop where right stage shows it) */
.sentry-empty-pair-mobile {
  display: none;
  width: 100%;
  margin-top: 8px;
  background: #ffffff;
  border: 1px solid var(--s-line);
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(37, 39, 35, 0.03);
}

/* Mid-width desktop: overlay drawer smoothly so player doesn't collapse */
@media (max-width: 1320px) and (min-width: 861px) {
  .sentry-workspace.with-drawer {
    padding: 18px 28px 20px;
  }

  .sentry-workspace.with-drawer .sentry-sidebar,
  .sentry-workspace.with-drawer .sentry-stage-wrap {
    margin-top: 0;
    margin-bottom: 0;
  }

  .sentry-drawer-backdrop.open {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(37, 39, 35, 0.22);
    z-index: 29;
  }

  .sentry-settings-drawer {
    position: fixed;
    top: 72px;
    right: 0;
    bottom: 0;
    z-index: 30;
  }
}

/* =========================================================================
   Privacy Password Modal & Quiet Toast
   ========================================================================= */
.sentry-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 24, 28, 0.45);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 60;
}

.sentry-modal {
  width: min(410px, 100%);
  background: #ffffff;
  border: 1px solid var(--s-line);
  border-radius: 18px;
  padding: 24px 24px 22px;
  box-shadow: 0 24px 56px rgba(12, 16, 23, 0.22);
  color: var(--s-ink);
}

.sentry-modal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.sentry-modal-head h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 650;
}

.sentry-modal-desc {
  margin: 0 0 16px;
  font-size: 12.8px;
  color: var(--s-muted);
  line-height: 1.6;
}

.sentry-modal-field {
  margin-bottom: 12px;
}

.sentry-modal-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
}

.sentry-modal-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #4f544b;
  margin: 10px 0 14px;
  cursor: pointer;
}

.sentry-modal-check input {
  width: 16px;
  height: 16px;
  padding: 0;
  margin: 0;
  accent-color: var(--s-blue);
}

.sentry-modal-error {
  margin: 0 0 12px;
  font-size: 12.5px;
  color: #b33f32;
  min-height: 0;
}

.sentry-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.sentry-modal-cancel {
  height: 38px;
  padding: 0 15px !important;
  border-radius: 9px;
  border: 1px solid #dcded5 !important;
  background: #ffffff !important;
  color: #333d30;
  font-size: 13px;
  font-weight: 550;
}

.sentry-modal-submit {
  height: 38px;
  padding: 0 18px !important;
  border-radius: 9px;
  background: var(--s-blue) !important;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
}

.sentry-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: #1f2530;
  color: #f4f7fb;
  padding: 10px 18px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 550;
  box-shadow: 0 10px 28px rgba(12, 16, 23, 0.25);
  z-index: 70;
  max-width: calc(100vw - 32px);
  text-align: center;
}

/* =========================================================================
   Mobile Browser Responsive Layout (<= 860px, Matches mobile.html 100%)
   ========================================================================= */
@media (max-width: 860px) {
  body.sentry-page {
    height: auto;
    min-height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .sentry-header {
    height: 52px;
    padding: 0 14px;
    gap: 8px;
    position: sticky;
    top: 0;
    z-index: 25;
  }

  .sentry-header-left {
    gap: 10px;
  }

  .sentry-brand {
    font-size: 16px;
    gap: 7px;
  }

  .sentry-brand img {
    width: 26px;
    height: 26px;
  }

  .sentry-nav,
  .sentry-avatar {
    display: none;
  }

  .sentry-vehicle-pill {
    height: 29px;
    padding: 0 9px;
    font-size: 11px;
    gap: 6px;
    max-width: 210px;
  }

  .sentry-settings-btn {
    width: 32px;
    height: 32px;
    padding: 0 !important;
    justify-content: center;
  }

  .sentry-settings-btn span {
    display: none;
  }

  /* Mobile Event Player Backbar */
  .sentry-root.mobile-player-open .sentry-header {
    display: none;
  }

  .sentry-root.mobile-player-open .sentry-mobile-backbar {
    display: grid;
    grid-template-columns: 76px 1fr 78px;
    align-items: center;
    height: 50px;
    padding: 0 14px;
    background: var(--s-bg);
    border-bottom: 1px solid var(--s-line);
    position: sticky;
    top: 0;
    z-index: 25;
  }

  .m-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--s-ink);
    justify-self: start;
  }

  .m-back-title {
    text-align: center;
    font-size: 13.5px;
    font-weight: 650;
    color: var(--s-ink);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .m-star-btn {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 30px;
    padding: 0 10px !important;
    border-radius: 8px;
    background: #ffffff !important;
    border: 1px solid #dcded5 !important;
    color: #5b5f57;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
  }

  .m-star-btn.starred {
    background: #fef4e3 !important;
    border-color: #f2dcaf !important;
    color: #9e6214;
  }

  .sentry-grace-banner {
    padding: 8px 14px;
    font-size: 12px;
  }

  /* Single-column mobile workspace */
  .sentry-workspace,
  .sentry-workspace.with-drawer {
    padding: 12px 14px 20px;
    flex-direction: column;
    overflow: visible;
    gap: 12px;
  }

  .sentry-workspace.with-drawer .sentry-sidebar,
  .sentry-workspace.with-drawer .sentry-stage-wrap {
    margin: 0;
  }

  /* Default mobile view: show sidebar (event list OR timeline), hide desktop stage */
  .sentry-sidebar,
  .sentry-workspace.with-drawer .sentry-sidebar {
    width: 100%;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    border-radius: 0;
  }

  .sentry-mode-switch {
    background: #eeede7;
    border-radius: 10px;
    padding: 3.5px;
  }

  .sentry-mode-switch button {
    height: 32px;
    font-size: 13px;
  }

  .sentry-date-bar {
    margin-top: 10px;
  }

  .sentry-filter-pills {
    margin-top: 10px;
    padding-bottom: 2px;
    border-bottom: 0;
  }

  .sentry-filter-pill {
    background: #ffffff !important;
    border: 1px solid var(--s-line) !important;
  }

  .sentry-filter-pill.active {
    background: #292e27 !important;
    border-color: #292e27 !important;
    color: #ffffff;
  }

  .sentry-event-list {
    overflow: visible;
    margin-top: 10px;
    gap: 10px;
  }

  .sentry-event-card {
    background: #ffffff !important;
    border: 1px solid var(--s-line) !important;
    border-radius: 14px;
    padding: 11px !important;
    box-shadow: 0 3px 12px rgba(37, 39, 35, 0.025);
  }

  .sentry-event-card.selected {
    background: #f3f7fe !important;
    border-color: #cfe0fb !important;
  }

  .sentry-event-chev {
    display: inline-block;
  }

  .sentry-sidebar-footer {
    margin-top: 14px;
    padding: 10px 2px 2px;
    border-top: 1px solid #e9e8e0;
  }

  .sentry-stage-wrap {
    display: none;
  }

  .sentry-empty-pair-mobile {
    display: flex;
  }

  /* Mobile Timeline Resting Preview + Feed Card + Reserve Card */
  .sentry-root.mode-timeline:not(.mobile-player-open) .sentry-timeline-note {
    display: none;
  }

  .sentry-root.mode-timeline:not(.mobile-player-open) .sentry-mobile-tl-preview {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    background: var(--s-stage-ground);
    border-radius: 14px;
    padding: 9px 10px 10px;
    color: var(--s-stage-ink);
    box-shadow: 0 10px 24px rgba(12, 16, 23, 0.11);
  }

  .m-mini-stage-box {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 9px;
    overflow: hidden;
    background: #070a0f;
  }

  .sentry-root.mode-timeline:not(.mobile-player-open) .sentry-timeline-feed {
    background: #ffffff;
    border: 1px solid var(--s-line);
    border-radius: 14px;
    padding: 10px;
    box-shadow: 0 3px 12px rgba(37, 39, 35, 0.025);
    overflow: visible;
  }

  .sentry-root.mode-timeline:not(.mobile-player-open) .sentry-mobile-reserve-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    background: #ffffff;
    border: 1px solid var(--s-line);
    border-radius: 14px;
    padding: 11px 12px;
    box-shadow: 0 4px 16px rgba(37, 39, 35, 0.03);
  }

  .m-reserve-copy {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.8px;
    color: #6c7067;
    line-height: 1.4;
  }

  .m-reserve-btn {
    width: 100%;
    height: 41px;
    border-radius: 10px;
    background: var(--s-blue) !important;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
  }

  .m-reserve-btn.is-queued {
    background: #e9f1fe !important;
    color: var(--s-blue);
  }

  /* Mobile Event Player Open State */
  .sentry-root.mobile-player-open .sentry-sidebar {
    display: none;
  }

  .sentry-root.mobile-player-open .sentry-stage-wrap {
    display: flex;
    border-radius: 16px;
    overflow: visible;
    background: transparent;
    box-shadow: none;
    gap: 11px;
  }

  .sentry-root.mobile-player-open .stage-cinema-shell {
    background: var(--s-stage-ground);
    border-radius: 16px;
    padding: 10px 10px 12px;
    box-shadow: 0 12px 28px rgba(12, 16, 23, 0.13);
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
  }

  .sentry-root.mobile-player-open .stage-topbar {
    display: none;
  }

  .sentry-root.mobile-player-open .stage-mobile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 2px;
  }

  .stage-mobile-head strong {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--s-stage-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .m-cinema-badge {
    padding: 2px 7px;
    border-radius: 5px;
    background: rgba(240, 106, 91, 0.18);
    color: #f49b90;
    font-size: 10.5px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .m-cinema-badge.stay {
    background: rgba(76, 141, 255, 0.2);
    color: #9ec0ff;
  }

  .m-cinema-badge.passby {
    background: rgba(255, 255, 255, 0.1);
    color: #c2ccd9;
  }

  .sentry-root.mobile-player-open .stage-canvas-area {
    padding: 0;
    display: block;
  }

  /* Mobile 4:3 main + 3 horizontal 4:3 sub-cams below */
  .sentry-root.mobile-player-open .sentry-stage-box {
    height: auto;
    max-height: none;
    border-radius: 10px;
  }

  .sentry-root.mobile-player-open .sentry-pane-overlay {
    position: relative;
    gap: 7px;
  }

  .sentry-root.mobile-player-open .sentry-pane-overlay.stage-mode-hero {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
  }

  .sentry-root.mobile-player-open .sentry-pane-overlay.stage-mode-hero .sentry-pane-slot.is-main {
    grid-column: 1 / -1;
    grid-row: 1;
    aspect-ratio: 4 / 3;
  }

  .sentry-root.mobile-player-open .sentry-pane-overlay.stage-mode-hero .sentry-pane-slot:not(.is-main) {
    aspect-ratio: 4 / 3;
    border-radius: 8px;
  }

  .sentry-root.mobile-player-open .sentry-pane-overlay.stage-mode-quad .sentry-pane-slot,
  .sentry-root.mobile-player-open .sentry-pane-overlay.stage-mode-single .sentry-pane-slot {
    aspect-ratio: 4 / 3;
  }

  .sentry-root.mobile-player-open .stage-controls {
    width: 100%;
    margin: 0;
    padding: 2px 2px 0;
    gap: 8px;
    align-items: stretch;
  }

  .sentry-root.mobile-player-open .scrubber-wrap {
    padding: 22px 0 12px;
  }

  .sentry-root.mobile-player-open .scrubber-thumb {
    width: 16px;
    height: 16px;
  }

  .sentry-root.mobile-player-open .stage-mobile-head {
    flex-wrap: wrap;
  }

  .sentry-root.mobile-player-open .transport-right,
  .sentry-root.mobile-player-open .step-frame-btn {
    display: none;
  }

  .sentry-root.mobile-player-open .transport-left {
    width: 100%;
    justify-content: space-between;
    gap: 6px;
  }

  .sentry-root.mobile-player-open .play-btn {
    width: 34px;
    height: 34px;
  }

  .sentry-root.mobile-player-open .step-btn {
    height: 32px;
    padding: 0 9px !important;
    font-size: 12px;
  }

  .sentry-root.mobile-player-open .mobile-dewarp-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 32px;
    padding: 0 10px !important;
    border-radius: 8px;
    background: rgba(76, 141, 255, 0.18) !important;
    color: #8bb6ff;
    font-size: 12px;
    font-weight: 600;
    margin-left: auto;
  }

  .sentry-root.mobile-player-open .mobile-action-card {
    display: flex;
    flex-direction: column;
    gap: 9px;
    background: #ffffff;
    border: 1px solid var(--s-line);
    border-radius: 16px;
    padding: 13px 14px 12px;
    color: var(--s-ink);
    box-shadow: 0 6px 20px rgba(37, 39, 35, 0.03);
  }

  .m-stream-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12.2px;
    color: var(--s-muted);
  }

  .m-stream-row strong {
    color: var(--s-ink);
    font-weight: 650;
  }

  .m-primary-btn {
    width: 100%;
    height: 42px;
    border-radius: 10px;
    background: var(--s-blue) !important;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 13.5px;
    font-weight: 600;
  }

  .m-primary-btn.is-queued {
    background: #e9f1fe !important;
    color: var(--s-blue);
  }

  .m-primary-btn.is-ready {
    background: #237a46 !important;
    color: #ffffff;
  }

  .m-outline-btn {
    width: 100%;
    height: 38px;
    border-radius: 10px;
    background: #faf9f6 !important;
    border: 1px solid #dcded5 !important;
    color: var(--s-ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 550;
  }

  .m-action-note {
    text-align: center;
    font-size: 11.2px;
    color: var(--s-muted);
  }

  .optical-popover {
    position: fixed;
    left: 14px;
    right: 14px;
    top: auto;
    bottom: 16px;
    width: auto;
    z-index: 50;
  }

  /* Bottom Slide-Up Settings Sheet on Mobile */
  .sentry-drawer-backdrop.open {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(37, 39, 35, 0.28);
    z-index: 40;
  }

  .sentry-settings-drawer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    width: 100%;
    max-height: 88dvh;
    border-left: 0;
    border-radius: 22px 22px 0 0;
    padding: 10px 16px 20px;
    box-shadow: 0 -10px 32px rgba(32, 35, 30, 0.16);
    z-index: 45;
  }

  .sheet-grabber {
    display: block;
    width: 36px;
    height: 4px;
    border-radius: 99px;
    background: #dcdbd3;
    margin: 0 auto 10px;
    flex-shrink: 0;
  }
}

@media (min-width: 861px) {
  .stage-cinema-shell {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
}

/* =========================================================================
   Pull-Original UX Upgrade & Real-Time Live View (Strictly Scoped to .sentry-view)
   ========================================================================= */
.sentry-view [hidden] {
  display: none !important;
}

@keyframes sentry-spin {
  to { transform: rotate(360deg); }
}

@keyframes sentry-live-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.55);
    opacity: 1;
  }
  55% {
    box-shadow: 0 0 0 6px rgba(46, 204, 113, 0);
    opacity: 0.85;
  }
}

@keyframes sentry-indeterminate {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(350%); }
}

.sentry-view .s-ico-spin {
  animation: sentry-spin 1.1s linear infinite;
}

/* Top Bar: Live View Entry Button + Safe Pill Width */
.sentry-view .sentry-vehicle-pill {
  max-width: 360px;
}

.sentry-view .sentry-live-entry-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 13px !important;
  border-radius: 99px;
  border: 1px solid #cce6d6 !important;
  background: #effaf3 !important;
  color: #196b3d;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}

.sentry-view .sentry-live-entry-btn:hover {
  background: #e1f5e8 !important;
  border-color: #a8d9bc !important;
}

.sentry-view .sentry-live-entry-btn .live-dot-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #23a55a;
  flex-shrink: 0;
}

.sentry-view .sentry-live-entry-btn.is-online .live-dot-indicator {
  animation: sentry-live-pulse 2s ease-in-out infinite;
}

.sentry-view .sentry-live-entry-btn.is-live-active {
  background: #1b8046 !important;
  border-color: #1b8046 !important;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(27, 128, 70, 0.24);
}

.sentry-view .sentry-live-entry-btn.is-live-active .live-dot-indicator {
  background: #8ff5b7;
  animation: sentry-live-pulse 1.5s ease-in-out infinite;
}

.sentry-view .sentry-live-entry-btn.is-offline {
  border-color: #e2e1da !important;
  background: #f5f4ef !important;
  color: #7c8176;
}

.sentry-view .sentry-live-entry-btn.is-offline:hover {
  background: #ecebe4 !important;
  border-color: #d6d5cc !important;
}

.sentry-view .sentry-live-entry-btn.is-offline .live-dot-indicator {
  background: #9aa3ad;
  animation: none;
}

/* Sidebar Event Cards: 2K 原片 Badge, ★ Badge, Active Pull Pill & Bottom Progress Bar */
.sentry-view .sentry-event-card {
  position: relative;
  overflow: hidden;
}

.sentry-view .sentry-event-card.is-pulling {
  border-color: #cde0fb !important;
}

.sentry-view .sentry-event-sub-left {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  flex-wrap: wrap;
}

.sentry-view .sentry-event-dur {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.sentry-view .sentry-event-hint {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sentry-view .calm-tag.starred-star {
  padding: 2px 6px;
  background: #fef4e3;
  color: #c2780a;
  font-size: 11px;
  line-height: 1.25;
}

.sentry-view .calm-tag.orig-ready {
  background: #e6f5ec;
  color: #1d6f40;
}

.sentry-view .calm-tag.pull-active {
  background: #e7f0ff;
  color: #1c5ed6;
  font-variant-numeric: tabular-nums;
}

.sentry-view .calm-tag.pull-failed {
  background: #fdece8;
  color: #b13a2a;
}

.sentry-view .sentry-card-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(29, 99, 216, 0.14);
  overflow: hidden;
  pointer-events: none;
}

.sentry-view .sentry-card-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 0 99px 99px 0;
  background: linear-gradient(90deg, #2b75f5, #5ca0ff);
  transition: width 0.35s ease;
}

.sentry-view .sentry-card-progress-fill.is-indeterminate {
  width: 34% !important;
  border-radius: 99px;
  animation: sentry-indeterminate 1.45s ease-in-out infinite;
}

/* Pull-Original Action Buttons: Inline Progress Fill + Secondary Full + Cancel */
.sentry-view .transport-right {
  flex-wrap: wrap;
  gap: 8px;
}

.sentry-view .hd-btn {
  position: relative;
  overflow: hidden;
}

.sentry-view .hd-btn .pull-btn-content,
.sentry-view .m-primary-btn .pull-btn-content {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-variant-numeric: tabular-nums;
}

.sentry-view .pull-btn-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 1;
  width: 0%;
  background: linear-gradient(90deg, rgba(76, 141, 255, 0.44), rgba(112, 169, 255, 0.62));
  transition: width 0.35s ease;
  pointer-events: none;
}

.sentry-view .pull-btn-fill.is-indeterminate {
  width: 32% !important;
  animation: sentry-indeterminate 1.5s ease-in-out infinite;
}

.sentry-view .hd-btn.is-pulling {
  background: rgba(76, 141, 255, 0.16) !important;
  color: #dceaff;
  opacity: 1;
  cursor: default;
}

.sentry-view .hd-btn.is-failed {
  background: rgba(240, 106, 91, 0.2) !important;
  color: #ffb2a7;
}

.sentry-view .hd-btn.is-failed:hover:not(:disabled) {
  background: rgba(240, 106, 91, 0.3) !important;
}

.sentry-view .hd-secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 12px !important;
  border-radius: 9px;
  background: var(--s-stage-panel) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #c7d4e6;
  font-size: 12.5px;
  font-weight: 550;
  white-space: nowrap;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.sentry-view .hd-secondary-btn:hover:not(:disabled) {
  background: var(--s-stage-raised) !important;
  color: #ffffff;
}

.sentry-view .hd-cancel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 11px !important;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08) !important;
  color: #b7c4d6;
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
}

.sentry-view .hd-cancel-btn:hover:not(:disabled) {
  background: rgba(240, 106, 91, 0.2) !important;
  color: #ffb4a9;
}

/* Mobile Action Card Pull Upgrades */
.sentry-view .m-quality-seg {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 8px;
  background: #f0efe8;
}

.sentry-view .m-quality-seg button {
  height: 24px;
  padding: 0 8px !important;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 550;
  color: #63685e;
  white-space: nowrap;
}

.sentry-view .m-quality-seg button.active {
  background: #ffffff !important;
  color: var(--s-blue);
  font-weight: 650;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.sentry-view .m-primary-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.sentry-view .m-primary-btn {
  position: relative;
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

.sentry-view .m-primary-btn.is-pulling {
  background: #e6effe !important;
  color: #164eb5;
  opacity: 1;
}

.sentry-view .m-primary-btn .pull-btn-fill {
  background: linear-gradient(90deg, rgba(29, 99, 216, 0.22), rgba(76, 141, 255, 0.34));
}

.sentry-view .m-primary-btn.is-failed {
  background: #c84636 !important;
  color: #ffffff;
}

.sentry-view .m-cancel-btn {
  height: 42px;
  padding: 0 14px !important;
  border-radius: 10px;
  background: #faf9f6 !important;
  border: 1px solid #dcded5 !important;
  color: #5b5f57;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.sentry-view .m-secondary-btn {
  color: #2457a6;
  border-color: #cfe0fb !important;
  background: #f4f8ff !important;
}

/* =========================================================================
   Real-Time Live View HUD Strip, Single-Camera Overlay & Bottom Controls
   ========================================================================= */
.sentry-view .live-hud-strip {
  min-height: 56px;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--s-stage-line);
  background: linear-gradient(180deg, rgba(22, 35, 48, 0.72), rgba(12, 16, 23, 0.2));
  flex-shrink: 0;
  flex-wrap: wrap;
}

.sentry-view .live-hud-left,
.sentry-view .live-hud-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.sentry-view .live-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(35, 165, 90, 0.2);
  border: 1px solid rgba(57, 206, 120, 0.36);
  color: #8cf2b6;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.sentry-view .live-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #35d477;
  animation: sentry-live-pulse 1.8s ease-in-out infinite;
  flex-shrink: 0;
}

.sentry-view .live-pulse-dot.is-paused {
  background: #8c98a8;
  animation: none;
}

.sentry-view .live-mode-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(76, 141, 255, 0.16);
  border: 1px solid rgba(76, 141, 255, 0.3);
  color: #a9c8ff;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.sentry-view .live-fps-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
  color: #d6e0ee;
  font-size: 11.5px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.sentry-view .live-countdown-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  color: #dce5f2;
  font-size: 12px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.sentry-view .live-countdown-pill.is-warn {
  background: rgba(245, 166, 35, 0.2);
  color: #ffd07a;
}

.sentry-view .live-usage-text {
  font-size: 11.5px;
  color: var(--s-stage-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.sentry-view .live-exit-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 11px !important;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1) !important;
  color: #edf2f9;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.sentry-view .live-exit-btn:hover {
  background: rgba(240, 106, 91, 0.24) !important;
  color: #ffc2b9;
}

/* Single-Camera Fast Live Canvas Overlay Chip */
.sentry-view .live-single-chip {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 5px 4px 11px;
  border-radius: 99px;
  background: rgba(10, 15, 22, 0.82);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(76, 141, 255, 0.36);
  color: #eff4fc;
  font-size: 12px;
  font-weight: 600;
  max-width: calc(100% - 20px);
}

.sentry-view .live-single-chip-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sentry-view .live-single-back-btn {
  height: 24px;
  padding: 0 9px !important;
  border-radius: 99px;
  background: var(--s-blue-stage) !important;
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.sentry-view .live-single-back-btn:hover {
  background: #3d7ef2 !important;
}

/* Live Bottom Controls Bar */
.sentry-view .live-controls-bar {
  padding: 10px 20px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  border-top: 1px solid var(--s-stage-line);
  flex-shrink: 0;
}

.sentry-view .live-ctrl-left,
.sentry-view .live-ctrl-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sentry-view .live-mode-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 13px !important;
  border-radius: 9px;
  background: rgba(76, 141, 255, 0.2) !important;
  border: 1px solid rgba(76, 141, 255, 0.36) !important;
  color: #a9c9ff;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.sentry-view .live-mode-toggle-btn:hover:not(:disabled) {
  background: rgba(76, 141, 255, 0.3) !important;
  color: #ffffff;
}

.sentry-view .live-mode-toggle-btn.is-single {
  background: rgba(47, 148, 88, 0.22) !important;
  border-color: rgba(65, 198, 120, 0.38) !important;
  color: #93ebb8;
}

.sentry-view .live-cam-seg {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 9px;
  background: var(--s-stage-panel);
}

.sentry-view .live-cam-seg button {
  height: 28px;
  padding: 0 10px !important;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 550;
  color: var(--s-stage-muted);
  white-space: nowrap;
}

.sentry-view .live-cam-seg button:hover {
  color: var(--s-stage-ink);
}

.sentry-view .live-cam-seg button.active {
  background: var(--s-blue-stage) !important;
  color: #ffffff;
  font-weight: 600;
}

.sentry-view .live-extend-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px !important;
  border-radius: 9px;
  background: var(--s-blue-stage) !important;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.sentry-view .live-extend-btn:hover:not(:disabled) {
  background: #3d7ef2 !important;
}

.sentry-view .live-save-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 13px !important;
  border-radius: 9px;
  background: var(--s-stage-panel) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #dce5f2;
  font-size: 12.5px;
  font-weight: 550;
  white-space: nowrap;
}

.sentry-view .live-save-btn:hover:not(:disabled) {
  background: var(--s-stage-raised) !important;
  color: #ffffff;
}

/* Live Waiting Spinner & Paused Card Actions */
.sentry-view .live-wait-spinner {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2.5px solid rgba(76, 141, 255, 0.24);
  border-top-color: #5ca0ff;
  animation: sentry-spin 0.9s linear infinite;
}

.sentry-view .live-paused-actions {
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sentry-view .live-placeholder-exit-btn {
  height: 38px;
  padding: 0 16px !important;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1) !important;
  color: #dce4f0;
  font-size: 13px;
  font-weight: 550;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sentry-view .live-placeholder-exit-btn:hover {
  background: rgba(255, 255, 255, 0.16) !important;
}

/* Responsive Mobile Tweaks (<= 860px, Zero Horizontal Overflow on 390x844) */
@media (max-width: 860px) {
  .sentry-view .sentry-header-right {
    gap: 6px;
  }

  .sentry-view .sentry-vehicle-pill {
    max-width: 132px;
    padding: 0 8px;
    font-size: 10.5px;
    gap: 5px;
  }

  .sentry-view .sentry-live-entry-btn {
    height: 30px;
    padding: 0 9px !important;
    font-size: 11.5px;
    gap: 5px;
  }

  .sentry-view .sentry-live-entry-btn .live-dot-indicator {
    width: 6.5px;
    height: 6.5px;
  }

  .sentry-view .sentry-root.mode-live .sentry-stage-box {
    min-height: 248px;
  }

  .sentry-view .live-hud-strip {
    padding: 8px 10px;
    gap: 6px;
    border-radius: 10px 10px 0 0;
  }

  .sentry-view .live-hud-left,
  .sentry-view .live-hud-right {
    width: 100%;
    justify-content: space-between;
    gap: 6px;
  }

  .sentry-view .live-countdown-pill {
    font-size: 11px;
    padding: 3px 8px;
  }

  .sentry-view .live-usage-text {
    font-size: 11px;
  }

  .sentry-view .live-controls-bar {
    padding: 8px 2px 2px;
    gap: 8px;
  }

  .sentry-view .live-ctrl-left,
  .sentry-view .live-ctrl-right {
    width: 100%;
    justify-content: space-between;
    gap: 6px;
  }

  .sentry-view .live-extend-btn,
  .sentry-view .live-save-btn {
    flex: 1 1 auto;
    justify-content: center;
    padding: 0 10px !important;
    font-size: 12px;
  }

  .sentry-view .live-single-chip {
    left: 8px;
    top: 8px;
    font-size: 11px;
    padding: 3px 4px 3px 9px;
    gap: 6px;
  }

  .sentry-view .m-stream-row {
    gap: 6px;
    flex-wrap: wrap;
  }
}
