/* 认证外壳独立于原型样式；未完成验证时隐藏业务区域，避免未授权内容闪现。 */
html[data-portal-state="pending"] body > :not(.portal-shell),
html[data-portal-state="blocked"] body > :not(.portal-shell) { display: none !important; }
[data-portal-hidden], [hidden] { display: none !important; }
.portal-shell { font: 13px/1.5 system-ui, sans-serif; color: #dce5f0; }
.portal-bar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 10000; min-height: 30px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 4px 12px; background: #111b2b; border-top: 1px solid #344258; box-sizing: border-box; }
.portal-bar span:first-child { margin-right: auto; }
.portal-shell button, .portal-shell a, .portal-login button { padding: 4px 10px; color: #dce5f0; background: #1b2c44; border: 1px solid #48617f; border-radius: 4px; cursor: pointer; text-decoration: none; font: inherit; }
.portal-shell button:focus-visible, .portal-shell a:focus-visible, .portal-login :focus-visible { outline: 2px solid #79b8ff; outline-offset: 2px; }
.portal-shell button:disabled, .portal-login button:disabled { opacity: .55; cursor: wait; }
.portal-overlay { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; background: #0b1019; padding: 16px; box-sizing: border-box; }
.portal-card { width: min(600px, 100%); padding: 20px; border: 1px solid #344258; border-radius: 6px; background: #141e2d; box-sizing: border-box; }
.portal-card h1, .portal-card h2 { margin: 0 0 12px; font-size: 18px; }
.portal-card nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.portal-card p { overflow-wrap: anywhere; }
.portal-card pre { max-height: 45vh; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; }
dialog.portal-shell { position: fixed; color: #dce5f0; padding: 0; max-width: calc(100vw - 32px); background: transparent; border: 0; }
dialog.portal-shell::backdrop { background: #0009; }
.portal-login { margin: 0; min-height: 100vh; background: #0b1019; color: #dce5f0; font: 14px/1.5 system-ui, sans-serif; display: grid; place-items: center; padding: 16px; box-sizing: border-box; }
.portal-login main { width: min(420px, 100%); }
.portal-login label { display: block; margin: 12px 0 4px; }
.portal-login input { width: 100%; box-sizing: border-box; padding: 9px; border: 1px solid #48617f; background: #0c1522; color: #eef3fa; border-radius: 4px; font: inherit; }
.portal-login h1 { font-size: 20px; margin: 0 0 6px; }
.portal-muted { color: #adbcd0; font-size: 12px; }
.portal-error { color: #ffb6b6; }
.portal-captcha { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.portal-captcha input { flex: 1; min-width: 80px; }
.portal-captcha img { background: #fff; width: 136px; height: 48px; }
.portal-login #login-submit { width: 100%; margin-top: 12px; padding: 9px; }
@media (max-width: 600px) { .portal-bar { font-size: 12px; } .portal-bar span:first-child { flex-basis: 100%; } }


/* 时间轴按本轮确认拉长；仅覆盖胶囊子树，沿用原深色、字体及按钮。 */
.replay-capsule { left: 50%; right: auto; width: min(1000px, calc(100vw - 96px)); transform: translateX(-50%); box-sizing: border-box; }
.replay-capsule .replay-btn { flex: 0 0 36px; }
.replay-capsule .replay-main { display: flex; flex: 1 1 0; min-width: 0; flex-direction: column; }
.replay-heading, .replay-heading-meta, .replay-layer-controls { display: flex; align-items: center; }
.replay-heading { justify-content: space-between; margin-bottom: 4px; }
.replay-heading > span { font-size: 9px; color: #6b7280; }
.replay-heading-meta { gap: 8px; }
.replay-date-controls { display: flex; align-items: center; gap: 8px; min-width: 0; }
.replay-date-controls input { width: 156px; min-width: 0; padding: 0; border: 0; background: transparent; color: #94a3b8; color-scheme: dark; font: 10px/16px ui-monospace, monospace; }
.replay-date-controls button { padding: 0; border: 0; background: transparent; color: #60a5fa; font-size: 10px; line-height: 16px; cursor: pointer; }
.replay-date-controls button:disabled { display: none; }
.replay-date-controls input:focus-visible, .replay-date-controls button:focus-visible { outline: 1px solid #60a5fa; outline-offset: 2px; }
.replay-heading-meta #replay-time-label { font-size: 10px; color: #60a5fa; white-space: nowrap; }
.replay-heading-meta #replay-speed { font-size: 10px; }
.replay-layer-controls { flex: 0 0 auto; gap: 2px; padding-left: 8px; border-left: 1px solid rgba(255,255,255,.1); }
.replay-capsule .replay-scroll { width: 100%; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; scrollbar-color: #344258 transparent; }
.replay-capsule .replay-track { position: relative; width: 100%; height: 41px; }
.replay-capsule .replay-slider { position: absolute; top: 0; left: 0; width: 100%; margin: 5px 0 0; }
.replay-ticks { position: absolute; top: 14px; left: 7px; right: 7px; height: 24px; pointer-events: none; }
.replay-tick { position: absolute; top: 0; width: 1px; height: 4px; background: rgba(148,163,184,.7); }
.replay-hour-tick { height: 8px; background: #94a3b8; }
.replay-tick-label { position: absolute; top: 10px; left: 0; transform: translateX(-50%); font: 9px/12px ui-monospace, monospace; color: #94a3b8; white-space: nowrap; }
.replay-capsule #replay-start-time, .replay-capsule .replay-now { position: absolute; top: 28px; font: 9px/12px ui-monospace, monospace; color: #94a3b8; white-space: nowrap; }
.replay-capsule #replay-start-time { left: 0; }
.replay-capsule .replay-now { left: auto; right: 0; }
@media (max-width: 600px) {
  .replay-capsule { width: calc(100vw - 24px); max-width: calc(100vw - 24px); bottom: 24px; padding: 8px 12px; gap: 8px; border-radius: 20px; }
  .replay-capsule .replay-btn { flex-basis: 28px; width: 28px; height: 28px; }
  .replay-heading { flex-wrap: wrap; gap: 2px 8px; }
  .replay-date-controls { gap: 4px; }
  .replay-date-controls input { width: 146px; }
  /* 小屏横向滑动时间轴，保留全部5分钟刻度且避免刻度挤成实线。 */
  .replay-capsule .replay-track { min-width: 864px; }
}
