:root {
  --bg: #0b0d0f;
  --panel: #121a24;
  --panel-soft: #172337;
  --line: #29394b;
  --line-strong: #3b526e;
  --text: #f1f4f4;
  --muted: #8c999e;
  --faint: #5b676d;
  --lime: #c7f36b;
  --lime-dark: #1d2710;
  --coral: #ff8b71;
  --rose: #ff4f9a;
  --rose-soft: #ff9ac7;
  --blue: #8ecaff;
  --stage: #080a0c;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; background: #07162b; overflow-x: hidden; }
body { min-width: 320px; }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }

.app-shell { width: min(1480px, 100%); margin: 0 auto; padding: 24px 34px 18px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-bottom: 24px; }
.brand-lockup { display: flex; align-items: center; gap: 13px; }
.brand-mark { width: 34px; height: 34px; flex: 0 0 34px; display: block; overflow: hidden; border-radius: 50%; box-shadow: 0 0 14px rgba(80, 196, 255, .22); }
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: cover; }
.brand-lockup h1, .panel-heading h2, .preview-toolbar h2, .watch-header h2 { margin: 0; letter-spacing: 0; font-weight: 650; }
.brand-lockup .wuyou-name { font-size: 23px; line-height: 1.1; }
.wuyou-name {
  color: #f8fcff;
  background: linear-gradient(110deg, #ffffff 0%, #b9edff 38%, #71ceff 60%, var(--rose-soft) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 18px rgba(82, 196, 255, .22), 8px 0 22px rgba(255, 79, 154, .12);
}
.eyebrow, .section-kicker { margin: 0 0 6px; color: var(--lime); font-size: 10px; font-weight: 750; letter-spacing: 1.5px; }
.connection-pill, .viewer-state { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); border: 1px solid var(--line); background: #101416; padding: 8px 11px; font-size: 12px; }
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); display: inline-block; }
.is-connected .pulse-dot { background: var(--lime); box-shadow: 0 0 0 4px rgba(199, 243, 107, .08); }
.is-connecting .pulse-dot { background: var(--blue); animation: blink 1s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .35; } }

.mode-switch { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.mode-button { border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); display: inline-flex; align-items: center; gap: 9px; padding: 0 16px 13px 2px; margin-right: 28px; cursor: pointer; font-size: 13px; }
.mode-button.is-active { color: var(--text); border-bottom-color: var(--lime); }
.mode-index { width: 22px; height: 22px; display: inline-grid; place-items: center; border: 1px solid var(--line-strong); font-size: 11px; color: var(--lime); }

.workspace { display: grid; grid-template-columns: minmax(260px, 310px) minmax(0, 1fr); gap: 24px; align-items: stretch; }
.control-rail, .preview-column, .watch-panel { background: var(--panel); border: 1px solid var(--line); }
.control-rail { padding: 20px; display: flex; flex-direction: column; min-height: 630px; }
.panel-heading, .preview-toolbar, .watch-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.panel-heading h2, .watch-header h2 { font-size: 19px; }
.state-badge { color: var(--muted); border: 1px solid var(--line); font-size: 10px; padding: 5px 7px; }
.state-badge.is-live { color: var(--lime); border-color: #51652a; }
.state-badge.is-paused { color: #ffbe70; border-color: #6b4d2b; }
.control-block { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 20px; }
.block-label-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.block-label { display: block; color: var(--text); font-size: 12px; font-weight: 650; }
.tiny-status { color: var(--faint); font-size: 11px; text-align: right; transition: color .2s ease; }
.tiny-status.is-live { color: var(--lime); }
.primary-action, .secondary-action, .danger-action, .ghost-action, .icon-button { border: 1px solid var(--line-strong); cursor: pointer; transition: border-color .2s, background .2s, color .2s, transform .2s; }
.primary-action:hover, .secondary-action:hover, .ghost-action:hover, .icon-button:hover { border-color: var(--lime); }
.primary-action:active, .secondary-action:active, .danger-action:active, .ghost-action:active, .icon-button:active { transform: translateY(1px); }
.primary-action { width: 100%; min-height: 42px; display: flex; align-items: center; justify-content: center; gap: 9px; background: var(--lime); color: #11160b; border-color: var(--lime); font-size: 13px; font-weight: 750; }
.start-recognition-action { width: 100%; min-height: 40px; display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 10px; border: 1px solid #506a38; background: #1a2a18; color: #d9f5a5; font-size: 12px; font-weight: 700; cursor: pointer; transition: border-color .2s, background .2s, color .2s, opacity .2s; }
.start-recognition-action:hover:not(:disabled) { border-color: var(--lime); background: #243a1d; color: #efffd2; }
.start-recognition-action:disabled { opacity: .52; cursor: not-allowed; }
.performance-block { margin-top: 10px; padding: 10px 12px; border: 1px solid rgba(143, 190, 151, .24); background: rgba(14, 28, 24, .55); }
.performance-metrics { margin-top: 7px; color: #cfe9b3; font: 11px/1.4 "SFMono-Regular", Consolas, monospace; }
.performance-delivery { margin-top: 4px; color: #91b39d; font: 10px/1.35 "SFMono-Regular", Consolas, monospace; }
.performance-block.is-good { border-color: rgba(143, 210, 92, .62); background: rgba(30, 54, 24, .62); }
.performance-block.is-good .tiny-status, .performance-block.is-good .performance-metrics, .performance-block.is-good .performance-delivery { color: #b8ef72; }
.performance-block.is-warn { border-color: rgba(245, 190, 77, .68); background: rgba(61, 48, 22, .62); }
.performance-block.is-warn .tiny-status, .performance-block.is-warn .performance-metrics, .performance-block.is-warn .performance-delivery { color: #ffd780; }
.performance-block.is-bad { border-color: rgba(255, 104, 92, .72); background: rgba(64, 28, 27, .62); }
.performance-block.is-bad .tiny-status, .performance-block.is-bad .performance-metrics, .performance-block.is-bad .performance-delivery { color: #ffaaa1; }
.performance-block.is-idle { border-color: rgba(91, 103, 109, .38); background: rgba(13, 21, 24, .62); }
.performance-block.is-idle .tiny-status, .performance-block.is-idle .performance-metrics, .performance-block.is-idle .performance-delivery { color: #839096; }
.multi-window-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 9px; }
.multi-window-toolbar[hidden], .multi-window-players[hidden] { display: none; }
.multi-window-status { color: var(--muted); font: 10px/1 "SFMono-Regular", Consolas, monospace; }
.multi-window-add { min-height: 30px; padding: 0 9px; border: 1px solid #3b5965; border-radius: 3px; background: #14252d; color: #b8c9ce; font-size: 10px; cursor: pointer; }
.multi-window-add:hover:not(:disabled) { border-color: var(--lime); color: var(--lime); }
.multi-window-add:disabled { opacity: .45; cursor: not-allowed; }
.multi-window-players { display: grid; gap: 7px; margin-top: 10px; }
.multi-player-item { min-width: 0; padding: 8px; border: 1px solid #293c43; border-radius: 4px; background: rgba(8, 18, 22, .72); }
.multi-player-item.is-active { border-color: #799e43; box-shadow: inset 0 0 0 1px rgba(199, 243, 107, .12); }
.multi-player-item.is-status-good { border-color: rgba(143, 210, 92, .62); }
.multi-player-item.is-status-warn { border-color: rgba(245, 190, 77, .68); }
.multi-player-item.is-status-bad { border-color: rgba(255, 104, 92, .72); }
.multi-player-item.is-status-idle { border-color: rgba(91, 103, 109, .46); }
.multi-player-head { display: flex; align-items: center; gap: 6px; }
.multi-player-select { min-width: 0; flex: 1 1 auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0; border: 0; background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.multi-player-select strong { font-size: 11px; font-weight: 650; }
.multi-player-select span { color: var(--muted); font: 10px/1 "SFMono-Regular", Consolas, monospace; white-space: nowrap; }
.multi-player-item.is-status-good .multi-player-select span { color: #b8ef72; }
.multi-player-item.is-status-warn .multi-player-select span { color: #ffd780; }
.multi-player-item.is-status-bad .multi-player-select span { color: #ffaaa1; }
.multi-player-close { width: 23px; height: 23px; flex: 0 0 23px; border: 1px solid #435057; border-radius: 3px; background: transparent; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; }
.multi-player-close:hover { border-color: var(--coral); color: var(--coral); }
.multi-player-summary { overflow: hidden; margin-top: 5px; color: var(--faint); font: 9px/1.35 "SFMono-Regular", Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.multi-player-diagnostics { margin-top: 3px; color: #8fa5aa; font: 8px/1.45 "SFMono-Regular", Consolas, monospace; overflow-wrap: anywhere; }
.multi-player-tile-strip { gap: 2px; margin-top: 6px; }
.multi-player-tile-strip .tile-card { min-width: 0; }
.multi-player-source-pool { position: absolute; width: 1px; height: 1px; overflow: hidden; pointer-events: none; opacity: 0; }
.secondary-action, .danger-action { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 13px; background: #1a2023; color: var(--text); font-size: 12px; font-weight: 650; }
.danger-action { color: var(--coral); }
.danger-action:hover { border-color: var(--coral); background: #251917; }
.ghost-action { background: transparent; color: var(--muted); min-height: 35px; padding: 0 10px; display: inline-flex; align-items: center; gap: 7px; font-size: 11px; }
.icon-button { width: 29px; height: 29px; display: grid; place-items: center; padding: 0; background: transparent; color: var(--muted); font-size: 16px; }
.button-icon { font-size: 15px; line-height: 1; }
.microcopy, .rail-note { color: var(--muted); font-size: 11px; line-height: 1.55; margin: 10px 0 0; }
.game-profile-block { margin-top: 18px; padding-top: 16px; }
.game-profile-select { width: 100%; min-height: 40px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 3px; background: #0c151b; color: var(--text); font-size: 12px; cursor: pointer; }
.game-profile-select:hover, .game-profile-select:focus { border-color: var(--lime); outline: 0; }
.game-profile-select option { background: #0c151b; color: var(--text); }
.room-code-box { border: 1px solid var(--line-strong); background: #0c1012; padding: 18px 12px; font: 800 34px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: 1.5px; color: var(--lime); text-align: center; }
.activation-settings-block { margin-top: 16px; padding-top: 16px; }
.settings-field { display: grid; grid-template-columns: 58px minmax(0, 1fr); align-items: center; gap: 8px; min-height: 34px; margin-top: 8px; color: var(--muted); font-size: 10px; }
.settings-field small { color: var(--faint); font-size: 9px; }
.settings-field input { width: 100%; min-width: 0; height: 33px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 3px; background: #0c151b; color: var(--text); font: 600 11px/1 "SFMono-Regular", Consolas, monospace; }
.settings-field input:focus { border-color: var(--lime); outline: 0; box-shadow: 0 0 0 2px rgba(199, 243, 107, .12); }
.settings-code-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.settings-code-row input { flex: 1 1 auto; }
.settings-random-button { flex: 0 0 auto; height: 33px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 3px; background: rgba(26, 45, 51, .8); color: var(--cyan); font-size: 10px; font-weight: 650; cursor: pointer; }
.settings-random-button:hover { border-color: var(--cyan); color: #e7fbff; background: rgba(31, 61, 69, .9); }
.activation-generate-button { width: 100%; margin-top: 10px; }
.settings-save-button { width: 100%; min-height: 35px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; margin-top: 10px; padding: 0 10px; border: 1px solid #506a38; border-radius: 3px; background: #1a2a18; color: #d9f5a5; font-size: 11px; font-weight: 650; cursor: pointer; }
.settings-save-button:hover { border-color: var(--lime); background: #243a1d; }
.activation-settings-block .microcopy { margin-top: 8px; color: var(--faint); font-size: 10px; }
.metrics-block { display: grid; gap: 12px; }
.metric-row { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; font-size: 11px; color: var(--muted); }
.metric-row strong { color: var(--text); font: 600 11px/1.2 "SFMono-Regular", Consolas, monospace; white-space: nowrap; }
.rail-actions { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: auto; padding-top: 24px; }
.rail-note { border-left: 2px solid var(--lime); padding-left: 9px; }

.preview-column { padding: 20px; min-width: 0; }
.preview-toolbar { align-items: center; margin-bottom: 16px; }
.preview-toolbar h2 { font-size: 16px; }
.viewer-presence-status { display: flex; align-items: center; gap: 8px; min-height: 34px; margin: -4px 0 14px; padding: 0 11px; border: 1px solid var(--line); background: #0d171b; color: var(--muted); font-size: 11px; }
.viewer-presence-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--faint); }
.viewer-presence-status.is-waiting .viewer-presence-dot { background: var(--faint); }
.viewer-presence-status.is-connecting { color: var(--blue); border-color: #31566b; }
.viewer-presence-status.is-connecting .viewer-presence-dot { background: var(--blue); box-shadow: 0 0 0 4px rgba(93, 196, 255, .08); animation: blink 1s ease-in-out infinite; }
.viewer-presence-status.is-activated { color: #d7e6a8; border-color: #53652e; }
.viewer-presence-status.is-activated .viewer-presence-dot { background: var(--lime); box-shadow: 0 0 0 4px rgba(199, 243, 107, .08); }
.viewer-presence-status.is-connected { color: var(--lime); border-color: #51652a; }
.viewer-presence-status.is-connected .viewer-presence-dot { background: var(--lime); box-shadow: 0 0 0 4px rgba(199, 243, 107, .12); }
.viewer-presence-status.is-disconnected { color: #ffbe70; border-color: #6b4d2b; }
.viewer-presence-status.is-disconnected .viewer-presence-dot { background: #ffbe70; }
.viewer-sequence-status { display: flex; align-items: center; gap: 7px; min-height: 27px; margin: -8px 0 12px; padding: 0 11px; border: 1px solid var(--line); background: #0b1418; color: var(--faint); font: 10px/1 "SFMono-Regular", Consolas, monospace; }
.viewer-sequence-dot { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: var(--faint); }
.viewer-sequence-status.is-waiting { color: var(--blue); border-color: #31566b; }
.viewer-sequence-status.is-waiting .viewer-sequence-dot { background: var(--blue); animation: blink 1s ease-in-out infinite; }
.viewer-sequence-status.is-live { color: var(--lime); border-color: #51652a; }
.viewer-sequence-status.is-live .viewer-sequence-dot { background: var(--lime); box-shadow: 0 0 0 4px rgba(199, 243, 107, .12); }
.viewer-sequence-status.is-bad { color: #ffaaa1; border-color: #6b302e; }
.viewer-sequence-status.is-bad .viewer-sequence-dot { background: #ff6b5d; }
.viewer-sequence-status.is-idle { color: var(--faint); }
.preview-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; min-height: 380px; background: var(--stage); border: 1px solid var(--line); overflow: hidden; display: grid; place-items: center; }
.preview-stage video, .preview-stage img { width: 100%; height: 100%; object-fit: contain; display: none; }
.preview-stage.has-source video:not([hidden]), .preview-stage.has-source img:not([hidden]) { display: block; }
.preview-stage.has-source .empty-state { display: none; }
.empty-state, .viewer-empty { display: grid; place-items: center; align-content: center; gap: 7px; color: var(--muted); text-align: center; }
.empty-state strong, .viewer-empty strong { color: var(--text); font-size: 14px; }
.empty-state span, .viewer-empty span { font-size: 11px; }
.empty-glyph { width: 44px; height: 44px; display: grid; place-items: center; color: var(--lime); border: 1px solid #43502d; font-size: 22px; margin-bottom: 8px; }
.selection-overlay { position: absolute; border: 2px solid var(--lime); background: rgba(199, 243, 107, .09); box-shadow: 0 0 0 9999px rgba(0,0,0,.58); cursor: move; touch-action: none; }
.selection-tag { position: absolute; top: -29px; left: -2px; display: inline-flex; align-items: center; gap: 6px; background: var(--lime); color: #11160b; font-size: 10px; font-weight: 750; padding: 6px 8px; white-space: nowrap; }
.selection-dot { width: 5px; height: 5px; border-radius: 50%; background: #11160b; }
.resize-handle { position: absolute; width: 15px; height: 15px; background: var(--lime); border: 2px solid #11160b; padding: 0; }
.resize-handle.nw { left: -8px; top: -8px; cursor: nwse-resize; }
.resize-handle.ne { right: -8px; top: -8px; cursor: nesw-resize; }
.resize-handle.sw { left: -8px; bottom: -8px; cursor: nesw-resize; }
.resize-handle.se { right: -8px; bottom: -8px; cursor: nwse-resize; }
.crop-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.crop-fields label { display: grid; gap: 5px; min-width: 0; color: var(--muted); font: 10px/1 "SFMono-Regular", Consolas, monospace; }
.crop-fields input { width: 100%; min-width: 0; box-sizing: border-box; height: 34px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 3px; background: #10191b; color: var(--text); font: 600 12px/1 "SFMono-Regular", Consolas, monospace; }
.crop-fields input:focus { border-color: var(--lime); outline: 0; box-shadow: 0 0 0 2px rgba(199, 243, 107, .12); }
.crop-fields input:disabled { opacity: .5; cursor: not-allowed; }
.stage-footer { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 11px; color: var(--muted); font-size: 10px; }
.stage-footer span { display: inline-flex; align-items: center; gap: 6px; }
.legend-swatch { width: 8px; height: 8px; display: inline-block; border: 1px solid var(--line-strong); }
.legend-swatch.selected { background: var(--lime); border-color: var(--lime); }
.legend-swatch.hidden-area { background: #293034; }
.stage-size { margin-left: auto; color: var(--faint); font-family: monospace; }
.stage-footer #tileDetectionMetric.is-detected { color: var(--lime); }

/* The left rail is a compact status summary. The complete hand stays in the
   central multi-player preview so there is one visual source of truth. */
.recognition-overview { display: grid; gap: 0; margin-top: 18px; border-top: 1px solid var(--line); }
.recognition-card { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(96px, auto); grid-template-rows: auto auto; column-gap: 12px; min-width: 0; min-height: 49px; padding: 8px 0; border-bottom: 1px solid rgba(41, 57, 75, .78); }
.recognition-card[hidden] { display: none; }
.recognition-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; color: var(--muted); font: 9px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: .5px; }
.recognition-card-top b { color: var(--faint); font-weight: 500; white-space: nowrap; }
.recognition-card-label { min-width: 0; overflow: hidden; margin-top: 5px; color: var(--faint); font: 9px/1.2 "SFMono-Regular", Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.recognition-card > strong { grid-column: 2; grid-row: 1 / span 2; align-self: center; min-width: 0; overflow: hidden; color: var(--text); font-size: 12px; font-weight: 650; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.recognition-card.is-verified .recognition-card-top b { color: var(--lime); }
.recognition-card.is-scanning .recognition-card-top b { color: #ffd780; }
.recognition-card-wide .recognition-tile-strip { display: none !important; }
.recognition-card-wide .recognition-card-label { margin-top: 5px; }
.recognition-card-wide > strong { color: #d8f5b1; }

.sender-floating-preview { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.sender-floating-preview-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 11px; }
.sender-floating-preview-head .section-kicker { margin-bottom: 5px; }
.sender-floating-preview-head h3 { margin: 0; color: var(--text); font-size: 15px; font-weight: 650; }
.sender-floating-preview-status { flex: 0 0 auto; padding-top: 2px; color: var(--muted); font: 10px/1 "SFMono-Regular", Consolas, monospace; }
.sender-floating-preview-status.is-live { color: var(--lime); }
.sender-floating-preview-stage { position: relative; width: 100%; min-height: 148px; display: grid; place-items: center; overflow: hidden; background: #0b1214; border: 1px solid #202020; }
.sender-floating-preview-stage.has-image { border-color: #303030; box-shadow: none; }
.sender-floating-preview-stage img { display: block; width: 100%; max-height: 260px; object-fit: contain; object-position: center; }
.sender-floating-preview-empty { display: flex; align-items: center; gap: 8px; color: var(--muted); font: 10px/1 "SFMono-Regular", Consolas, monospace; }
.sender-floating-preview-meta { position: absolute; left: 9px; bottom: 7px; color: var(--faint); font: 8px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: .7px; }

/* A and B use the same compact card surface. Only the image source differs
   by mode: A reads the latest crop locally, B receives that exact frame. */
.shared-card-preview { position: relative; width: 100%; }
.shared-card-preview-surface { width: 100%; padding: 14px 15px 13px; background: rgba(9, 21, 28, .96); border: 1px solid #29414c; border-radius: 7px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 10px 24px rgba(0, 0, 0, .2); }
.shared-card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; color: var(--text); font-size: 14px; }
.shared-card-header strong { font-weight: 650; }
.shared-card-close { width: 26px; height: 26px; display: grid; place-items: center; padding: 0; border: 1px solid #38515e; border-radius: 5px; background: #111e25; color: #a4b3b8; font-size: 17px; line-height: 1; cursor: pointer; }
.shared-card-close:hover { border-color: var(--lime); color: var(--lime); }
.shared-card-info-row { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 9px; min-height: 22px; color: var(--muted); font: 10px/1.4 "SFMono-Regular", Consolas, monospace; }
.shared-card-info-row strong { overflow: hidden; color: var(--text); font-size: 11px; font-weight: 600; letter-spacing: .2px; text-overflow: ellipsis; white-space: nowrap; }
.shared-card-image { width: 100%; min-height: 118px; display: grid; place-items: center; margin-top: 11px; padding: 8px; overflow: hidden; background: #080d10; border: 1px solid #263a43; border-radius: 5px; }
.shared-card-image-element { display: block; width: 100%; height: auto; max-width: 100%; max-height: min(34vh, 360px); object-fit: contain; object-position: center; image-rendering: auto; }
.shared-card-action { width: 100%; min-height: 35px; margin-top: 11px; padding: 0 12px; border: 1px solid #3b5965; border-radius: 5px; background: #14252d; color: #b8c9ce; font-size: 10px; cursor: pointer; }
.shared-card-action:hover { border-color: var(--lime); color: var(--lime); }
.sender-card-preview .shared-card-preview-surface { padding: 10px 11px 9px; background: #10171a; border-color: #303c40; }
.sender-card-preview .shared-card-header { margin-bottom: 7px; font-size: 12px; }
.sender-card-preview .shared-card-close { width: 23px; height: 23px; font-size: 15px; }
.sender-card-preview .shared-card-info-row { grid-template-columns: 56px minmax(0, 1fr); gap: 6px; min-height: 18px; font-size: 9px; }
.sender-card-preview .shared-card-info-row strong { font-size: 10px; }
.sender-card-preview .shared-card-action { min-height: 29px; margin-top: 8px; font-size: 9px; }
.sender-card-reopen { display: flex; justify-content: flex-end; margin-top: 8px; }
.sender-card-reopen-button { width: 34px; height: 30px; padding: 0; border: 1px solid #38484d; border-radius: 5px; background: #10171a; color: var(--muted); cursor: pointer; }
.sender-card-reopen-button:hover { border-color: var(--lime); color: var(--lime); }
.sender-multi-player-preview { width: 100%; }
.sender-multi-player-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; width: 100%; }
.sender-multi-player-card { min-width: 0; min-height: 142px; padding: 8px; overflow: hidden; border: 1px solid #2a4148; border-radius: 5px; background: rgba(7, 18, 23, .84); }
.sender-multi-player-card.is-active { border-color: #82a94a; box-shadow: inset 0 0 0 1px rgba(199, 243, 107, .16); }
.sender-multi-player-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 5px; color: var(--text); }
.sender-multi-player-head strong { color: #d8f5ff; font-size: 11px; font-weight: 700; }
.sender-multi-player-head span { overflow: hidden; color: var(--muted); font: 9px/1 "SFMono-Regular", Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.sender-multi-player-head span.is-live { color: var(--lime); }
.sender-multi-player-head span.is-good { color: var(--lime); }
.sender-multi-player-head span.is-warn { color: #ffd780; }
.sender-multi-player-head span.is-bad { color: #ffaaa1; }
.sender-multi-player-source { overflow: hidden; min-height: 14px; margin-bottom: 6px; color: #6d8b95; font: 8px/1.35 "SFMono-Regular", Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.sender-multi-player-count { min-height: 23px; display: flex; align-items: center; color: #a8c5ae; font: 9px/1 "SFMono-Regular", Consolas, monospace; }
.sender-multi-player-tile-strip { min-height: 82px; align-items: start; gap: 2px; }
.sender-multi-player-tile-strip { display: grid; }
.sender-multi-player-tile-strip.poker-card-strip { grid-template-columns: repeat(var(--poker-count, 1), minmax(0, 1fr)); }
.sender-multi-player-tile-strip .tile-card { min-width: 0; width: 100%; border-radius: 2px; box-shadow: 0 1px 0 #7d817d; }
.sender-multi-player-empty { display: grid; min-height: 28px; place-items: center; color: #59727d; font: 9px/1.4 "SFMono-Regular", Consolas, monospace; border: 1px dashed #29434c; border-radius: 3px; }

@media (max-width: 840px) {
  .sender-multi-player-grid { gap: 6px; }
  .sender-multi-player-card { padding: 6px; }
  .sender-multi-player-source { font-size: 7px; }
}

/* Desktop A-side preview of the mobile viewer's floating card. */
.sender-preview-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 304px); gap: 18px; align-items: start; }
.sender-live-column { min-width: 0; }
.mobile-viewer-preview { min-width: 0; padding: 12px 12px 14px; background: #0d151a; border: 1px solid #29414c; border-radius: 8px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 12px 26px rgba(0, 0, 0, .18); }
.mobile-viewer-preview-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.mobile-viewer-preview-head .section-kicker { margin-bottom: 4px; font-size: 9px; }
.mobile-viewer-preview-head h3 { margin: 0; color: var(--text); font-size: 14px; }
.mobile-viewer-preview-head > span { flex: 0 0 auto; padding-top: 3px; color: var(--muted); font: 9px/1 "SFMono-Regular", Consolas, monospace; }
.mobile-viewer-preview-head > span.is-live { color: var(--lime); }
.mobile-device-shell { position: relative; width: min(100%, 280px); margin: 0 auto; padding: 9px; background: #05090d; border: 1px solid #3a4f5a; border-radius: 27px; box-shadow: 0 15px 28px rgba(0, 0, 0, .42), inset 0 0 0 1px rgba(255, 255, 255, .04); }
.mobile-device-camera { position: absolute; z-index: 5; top: 15px; left: 50%; width: 66px; height: 15px; transform: translateX(-50%); border-radius: 0 0 10px 10px; background: #05090d; box-shadow: 0 1px 0 rgba(255, 255, 255, .06); }
.mobile-device-camera::after { content: ""; position: absolute; top: 5px; left: 50%; width: 5px; height: 5px; transform: translateX(-50%); border-radius: 50%; background: #28485e; box-shadow: 0 0 5px #327da7; }
.mobile-viewer-screen { position: relative; min-height: 486px; padding: 22px 9px 9px; overflow: hidden; background: linear-gradient(180deg, #061426 0%, #040b17 100%); border: 1px solid #183650; border-radius: 20px; }
.mobile-viewer-topbar { display: flex; align-items: center; justify-content: space-between; gap: 7px; color: #a9d9ef; font: 8px/1 "SFMono-Regular", Consolas, monospace; }
.mobile-viewer-brand { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.mobile-viewer-brand strong { color: #f3fbff; font-size: 11px; white-space: nowrap; }
.mobile-brand-mark { display: block; width: 16px; height: 16px; flex: 0 0 16px; overflow: hidden; border-radius: 50%; box-shadow: 0 0 9px rgba(84, 202, 255, .5); }
.mobile-brand-mark img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mobile-viewer-topbar > span { padding: 4px 6px; border: 1px solid #27527a; color: #71c9eb; font-size: 7px; }
.mobile-viewer-stage { position: relative; height: 365px; margin-top: 9px; overflow: hidden; background: #061325; border: 1px solid #245b91; border-radius: 5px; box-shadow: inset 0 0 28px rgba(22, 104, 180, .12); }
.mobile-viewer-stage.is-card-open { box-shadow: inset 0 0 40px rgba(22, 104, 180, .2); }
.mobile-stage-grid { position: absolute; inset: 0; opacity: .5; background-image: linear-gradient(rgba(64, 157, 226, .065) 1px, transparent 1px), linear-gradient(90deg, rgba(64, 157, 226, .065) 1px, transparent 1px); background-size: 22px 22px; mask-image: radial-gradient(ellipse at center, #000 0%, transparent 75%); }
.mobile-stage-caption { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); color: #4d89ba; font: 7px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: 1px; white-space: nowrap; }
.mobile-viewer-bubble { position: absolute; right: 14px; bottom: 14px; z-index: 4; width: 43px; height: 43px; padding: 0; border: 1px solid #6ec9ff; border-radius: 50%; background: #06192e; color: #fff; box-shadow: 0 7px 16px rgba(0, 0, 0, .48), 0 0 16px rgba(43, 163, 240, .42); cursor: pointer; overflow: visible; -webkit-appearance: none; appearance: none; -webkit-tap-highlight-color: transparent; }
.mobile-viewer-bubble:focus, .mobile-viewer-bubble:active { outline: none; background: #06192e; }
.mobile-bubble-logo { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.mobile-viewer-bubble > span { position: absolute; inset: -5px; border: 1px solid rgba(102, 202, 255, .35); border-radius: 50%; animation: ring 2.2s ease-out infinite; }
.mobile-overlay-card { position: absolute; left: 50%; top: 50%; z-index: 3; width: min(72%, 190px); padding: 8px 7px 6px; transform: translate(-50%, -50%); overflow: hidden; background: linear-gradient(145deg, rgba(11, 48, 91, .97), rgba(5, 23, 49, .98)); border: 1px solid rgba(92, 190, 255, .68); border-radius: 7px; box-shadow: 0 12px 25px rgba(0, 0, 0, .52), inset 0 1px 0 rgba(185, 230, 255, .13); }
.mobile-overlay-card[hidden] { display: none; }
.mobile-overlay-header { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 7px; color: #fff; font-size: 11px; }
.mobile-overlay-header button { width: 21px; height: 21px; padding: 0; border: 1px solid rgba(133, 198, 239, .42); border-radius: 4px; background: rgba(28, 90, 147, .35); color: #c9eaff; font-size: 14px; line-height: 1; cursor: pointer; }
.mobile-player-tabs { display: flex; gap: 4px; margin: 0 0 7px; overflow-x: auto; scrollbar-width: thin; }
.mobile-player-tab { flex: 1 0 auto; min-width: 0; min-height: 23px; padding: 0 6px; border: 1px solid #2b5d82; border-radius: 3px; background: rgba(4, 24, 47, .72); color: #78a4c5; font: 7px/1 "SFMono-Regular", Consolas, monospace; cursor: pointer; }
.mobile-player-tab.is-selected { border-color: #73d9ff; background: rgba(21, 79, 121, .8); color: #e4f9ff; box-shadow: 0 0 10px rgba(77, 190, 244, .16); }
.mobile-player-tab.is-good { color: #b8ef72; }
.mobile-player-tab.is-warn { color: #ffd780; }
.mobile-player-tab.is-bad { color: #ffaaa1; }
.mobile-player-tab.is-selected.is-good { color: #efffd2; }
.mobile-info-row { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 5px; min-height: 17px; color: #6f9ac1; font: 7px/1.3 "SFMono-Regular", Consolas, monospace; }
.mobile-info-row strong { overflow: hidden; color: #d8efff; font-size: 8px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.mobile-info-row strong.is-live { color: #65e5ff; }
.mobile-tile-reading { grid-template-columns: repeat(13, minmax(0, 1fr)) 5px minmax(0, 1fr); gap: 2px; min-height: 55px; margin-top: 7px; padding: 5px 3px 4px; background: rgba(3, 16, 34, .68); border: 1px solid rgba(73, 154, 216, .48); border-radius: 4px; }
.mobile-tile-reading.recognition-tile-strip { grid-template-columns: repeat(13, minmax(0, 1fr)) 5px minmax(0, 1fr); gap: 1px; overflow-x: auto; scrollbar-width: thin; }
.mobile-tile-reading.poker-card-strip { grid-template-columns: repeat(var(--poker-count, 1), minmax(0, 1fr)); overflow: hidden; }
.mobile-tile-reading[data-tile-count="4"],
.mobile-tile-reading.recognition-tile-strip[data-tile-count="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mobile-tile-reading .tile-card { height: auto; aspect-ratio: 121 / 186; border-radius: 2px; box-shadow: 0 1px 0 #7d817d; }
.mobile-tile-reading .tile-card:nth-child(14) { grid-column: 15; }
.mobile-tile-reading.poker-card-strip .tile-card { min-width: 0; width: 100%; flex: none; grid-column: auto; }
.mobile-card-action { width: 100%; min-height: 25px; margin-top: 7px; padding: 0 5px; border: 1px solid #3b5965; border-radius: 4px; background: #14252d; color: #b8c9ce; font-size: 7px; cursor: pointer; }
.mobile-viewer-empty { position: absolute; left: 50%; bottom: 17px; z-index: 2; transform: translateX(-50%); padding: 6px 8px; color: #79a8cf; background: rgba(4, 19, 38, .75); border: 1px solid rgba(72, 148, 211, .32); border-radius: 4px; font: 7px/1 "SFMono-Regular", Consolas, monospace; white-space: nowrap; }
.mobile-viewer-bottom { display: flex; justify-content: space-between; gap: 6px; margin-top: 8px; color: #6c9fc1; font: 7px/1 "SFMono-Regular", Consolas, monospace; }
.mobile-viewer-note { margin: 10px 2px 0; color: var(--muted); font-size: 9px; line-height: 1.45; }

#sendPanel[data-tile-count="4"] .sender-preview-layout { grid-template-columns: minmax(0, 400px) minmax(220px, 278px); gap: 14px; }
#sendPanel[data-tile-count="4"] .sender-live-column { width: 100%; max-width: 400px; justify-self: center; }
#sendPanel[data-tile-count="4"] .preview-stage { max-width: 400px; }
#sendPanel[data-tile-count="4"] .stage-footer,
#sendPanel[data-tile-count="4"] .crop-fields,
#sendPanel[data-tile-count="4"] .sender-card-preview,
#sendPanel[data-tile-count="4"] .sender-floating-preview { max-width: 400px; }
#sendPanel[data-tile-count="4"] .preview-toolbar h2 { font-size: 15px; }
#sendPanel[data-tile-count="4"] .mobile-device-shell { width: min(100%, 250px); }

.watch-panel { padding: 22px; background: #071426; border-color: #1d4778; }
.watch-panel.is-preview { min-height: calc(100vh - 150px); padding: 28px; background: radial-gradient(circle at 50% 0%, rgba(24, 100, 184, .22), transparent 42%), linear-gradient(145deg, #071a34 0%, #061122 60%, #040b16 100%); border-color: #22528b; border-radius: 12px; box-shadow: inset 0 1px 0 rgba(180, 222, 255, .08), 0 18px 46px rgba(0, 0, 0, .26); }
.watch-panel.is-preview .watch-header { margin-bottom: 24px; }
.watch-panel.is-preview .watch-header h2 { font-size: 24px; letter-spacing: .2px; }
.watch-header { align-items: center; margin-bottom: 16px; }
.viewer-brand { display: flex; align-items: center; gap: 13px; }
.viewer-emblem { width: 34px; height: 34px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; padding: 7px; border: 1px solid #4c9be2; transform: rotate(45deg); box-shadow: 0 0 18px rgba(62, 162, 245, .28); }
.viewer-emblem span { background: #65c5ff; box-shadow: 0 0 8px rgba(101, 197, 255, .65); }
.viewer-emblem span:nth-child(2) { opacity: .62; }
.viewer-emblem span:nth-child(3) { opacity: .3; }
.viewer-brand .wuyou-name { font-size: 23px; line-height: 1.1; }
.viewer-state { color: #8bb8e0; border-color: #27517f; background: rgba(6, 22, 43, .7); padding: 8px 12px; font-family: "SFMono-Regular", Consolas, monospace; letter-spacing: .5px; }
.viewer-state.is-connected { color: #a8e9ff; border-color: #2389bb; }
.viewer-state.is-connecting { color: #70caff; border-color: #2c6ba7; }
.viewer-state .pulse-dot { background: #4c749a; }
.viewer-state.is-connected .pulse-dot { background: #53e0ff; box-shadow: 0 0 0 4px rgba(83, 224, 255, .1), 0 0 13px rgba(83, 224, 255, .85); }
.watch-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: stretch; min-width: 0; }
.viewer-stage { position: relative; min-width: 0; min-height: 420px; aspect-ratio: 16 / 9; background: #061325; border: 1px solid #245b91; border-radius: 10px; overflow: hidden; display: grid; place-items: center; box-shadow: inset 0 0 44px rgba(22, 104, 180, .1), 0 16px 36px rgba(0, 0, 0, .28); }
.viewer-stage.is-expanded { box-shadow: inset 0 0 60px rgba(22, 104, 180, .2), 0 18px 42px rgba(0, 0, 0, .38); }
.viewer-stage::before { content: ""; position: absolute; inset: 14px; z-index: 0; border: 1px solid rgba(80, 167, 235, .14); pointer-events: none; }
.viewer-stage video { width: 100%; height: 100%; object-fit: contain; display: none; }
.viewer-stage.has-video video { display: block; }
.stage-grid { position: absolute; inset: 0; z-index: 0; opacity: .55; background-image: linear-gradient(rgba(64, 157, 226, .065) 1px, transparent 1px), linear-gradient(90deg, rgba(64, 157, 226, .065) 1px, transparent 1px); background-size: 34px 34px; mask-image: radial-gradient(ellipse at center, #000 0%, transparent 73%); }
.stage-grid::after { content: ""; position: absolute; inset: 50% 0 auto; height: 1px; background: linear-gradient(90deg, transparent, rgba(79, 180, 255, .38), transparent); box-shadow: 0 0 16px rgba(79, 180, 255, .5); animation: scan 3.4s ease-in-out infinite; }
@keyframes scan { 0%, 100% { transform: translateY(-145px); opacity: .25; } 50% { transform: translateY(145px); opacity: .8; } }
.stage-orbit { position: absolute; z-index: 0; width: 220px; height: 220px; border: 1px solid rgba(57, 164, 235, .18); border-radius: 50%; transform: rotate(-28deg) scaleX(1.8); }
.orbit-one { animation: orbit 10s linear infinite; }
.orbit-two { width: 340px; height: 340px; border-color: rgba(57, 164, 235, .1); transform: rotate(42deg) scaleX(1.8); animation: orbit 15s linear infinite reverse; }
@keyframes orbit { to { transform: rotate(332deg) scaleX(1.8); } }
.stage-caption { position: absolute; z-index: 1; top: 25px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; color: #4d89ba; font: 9px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: 1.6px; white-space: nowrap; }
.caption-line { width: 26px; height: 1px; background: #2a618f; }
.viewer-floating-bubble { position: absolute; right: 26px; bottom: 26px; z-index: 4; width: 78px; height: 78px; padding: 0; border: 1px solid #6ec9ff; border-radius: 50%; background: #06192e; color: #fff; box-shadow: 0 10px 26px rgba(0, 0, 0, .48), 0 0 0 6px rgba(42, 139, 222, .12), 0 0 28px rgba(43, 163, 240, .42); cursor: pointer; transition: transform .2s, box-shadow .2s; overflow: visible; -webkit-appearance: none; appearance: none; -webkit-tap-highlight-color: transparent; }
.viewer-floating-bubble:focus, .viewer-floating-bubble:active { outline: none; background: #06192e; }
.bubble-logo { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.viewer-floating-bubble:hover { transform: scale(1.04); box-shadow: 0 12px 28px rgba(0, 0, 0, .5), 0 0 0 8px rgba(42, 139, 222, .14), 0 0 34px rgba(43, 163, 240, .6); }
.bubble-glyph { position: relative; z-index: 2; display: block; font-size: 24px; font-weight: 800; text-shadow: 0 1px 8px rgba(0, 0, 0, .38); }
.bubble-ring { position: absolute; inset: -7px; border: 1px solid rgba(102, 202, 255, .35); border-radius: 50%; animation: ring 2.2s ease-out infinite; }
@keyframes ring { 0% { opacity: .7; transform: scale(.88); } 70%, 100% { opacity: 0; transform: scale(1.18); } }
.viewer-overlay-card { position: absolute; left: 50%; top: 50%; z-index: 3; width: min(89%, 450px); min-height: 280px; max-height: calc(100% - 24px); padding: 18px 19px 15px; transform: translate(-50%, -50%); overflow: hidden; background: linear-gradient(145deg, rgba(11, 48, 91, .97), rgba(5, 23, 49, .98)); border: 1px solid rgba(92, 190, 255, .68); border-radius: 9px; box-shadow: 0 18px 44px rgba(0, 0, 0, .52), inset 0 1px 0 rgba(185, 230, 255, .13), 0 0 28px rgba(30, 132, 218, .15); }
.overlay-card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #fff; font-size: 18px; margin-bottom: 17px; }
.overlay-title { display: flex; align-items: center; gap: 9px; }
.live-beacon { width: 7px; height: 7px; background: #53e0ff; border-radius: 50%; box-shadow: 0 0 0 4px rgba(83, 224, 255, .1), 0 0 12px #53e0ff; }
.overlay-close { width: 27px; height: 27px; display: grid; place-items: center; padding: 0; border: 1px solid rgba(133, 198, 239, .42); border-radius: 5px; background: rgba(28, 90, 147, .35); color: #c9eaff; font-size: 17px; line-height: 1; cursor: pointer; }
.overlay-close:hover { border-color: #72d0ff; background: rgba(28, 116, 190, .5); }
.overlay-info-row { display: grid; grid-template-columns: 63px auto 1fr; align-items: center; gap: 9px; color: #6f9ac1; font: 10px/1.5 "SFMono-Regular", Consolas, monospace; letter-spacing: 1px; }
.overlay-info-row strong { color: #d8efff; font-size: 12px; font-weight: 650; letter-spacing: .8px; }
.overlay-info-row i { height: 1px; background: linear-gradient(90deg, rgba(54, 126, 183, .45), transparent); }
.overlay-online { color: #65e5ff !important; }
.overlay-card-footer { display: flex; align-items: center; gap: 9px; padding-top: 10px; color: #73a7d0; font: 9px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: .7px; }
.overlay-card-footer > span:first-child { color: #66e4ff; }
.footer-signal { width: 36px; height: 8px; margin-left: auto; background: repeating-linear-gradient(90deg, #3c9cda 0 2px, transparent 2px 5px); opacity: .65; }
.viewer-empty { position: absolute; left: 50%; bottom: 25px; z-index: 2; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; color: #79a8cf; background: rgba(4, 19, 38, .75); border: 1px solid rgba(72, 148, 211, .32); border-radius: 5px; padding: 9px 13px; font: 10px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: .8px; white-space: nowrap; }
.empty-lock { color: #55c7fa; font-size: 14px; }
.viewer-stage.has-tile .viewer-empty, .viewer-stage.has-video .viewer-empty { display: none; }
.viewer-rail { display: flex; flex-direction: column; min-width: 0; padding: 20px; background: linear-gradient(160deg, rgba(13, 48, 86, .9), rgba(6, 23, 47, .94)); border: 1px solid #25598a; border-radius: 9px; box-shadow: inset 0 1px 0 rgba(161, 220, 255, .08); }
.viewer-rail-head { display: flex; align-items: center; gap: 11px; color: #e0f3ff; }
.viewer-rail-head strong, .viewer-rail-head span { display: block; }
.viewer-rail-head strong { font-size: 14px; }
.viewer-rail-head div span { margin-top: 4px; color: #719ac0; font: 10px/1 "SFMono-Regular", Consolas, monospace; }
.rail-orb { width: 10px; height: 10px; background: #50cfff; border-radius: 50%; box-shadow: 0 0 0 5px rgba(80, 207, 255, .09), 0 0 15px #50cfff; }
.viewer-rail .control-block { border-color: #1f4c78; }
.viewer-rail .control-block:first-child { border-top: 0; padding-top: 0; margin-top: 28px; }
.viewer-rail .block-label { color: #a9d2f1; font: 10px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: 1px; }
.join-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 10px; }
.room-input { width: 100%; min-height: 44px; border: 1px solid #316b9c; border-radius: 5px; background: rgba(3, 17, 35, .72); color: #dff5ff; padding: 0 12px; font: 650 14px/1 "SFMono-Regular", Consolas, monospace; text-transform: uppercase; letter-spacing: 1px; box-shadow: inset 0 0 12px rgba(37, 121, 191, .12); }
.room-input:focus { border-color: #5ecbff; box-shadow: 0 0 0 2px rgba(56, 175, 239, .12), inset 0 0 14px rgba(37, 121, 191, .18); }
.room-input::placeholder { color: #52799d; text-transform: none; font: 10px/1 inherit; letter-spacing: 1px; }
.join-button { width: auto; min-height: 44px; padding: 0 16px; border-radius: 5px; background: linear-gradient(180deg, #4bcaff, #1978c4); color: #031426; border-color: #72d8ff; box-shadow: 0 0 16px rgba(50, 177, 239, .18); }
.join-button:hover { background: linear-gradient(180deg, #72d9ff, #2993de); border-color: #a5eaff; }
.full-width { width: 100%; margin-top: auto; }
.signal-list { display: grid; gap: 1px; margin-top: 28px; border-top: 1px solid #1f4c78; border-bottom: 1px solid #1f4c78; }
.signal-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; color: #6f99bf; font: 10px/1 "SFMono-Regular", Consolas, monospace; }
.signal-item + .signal-item { border-top: 1px solid rgba(31, 76, 120, .5); }
.signal-item strong { color: #c7e5fa; font-weight: 550; }
.watch-rail .secondary-action, .viewer-rail .secondary-action { border-color: #2d5e8e; background: rgba(13, 48, 85, .6); color: #99bedf; border-radius: 5px; min-height: 40px; }
.viewer-rail .secondary-action:hover { border-color: #53c7ff; color: #dbf4ff; }
.viewer-enable-action { margin-top: 14px; min-height: 42px; }
.viewer-bottom-bar .viewer-enable-action { display: none; }
.viewer-enable-action.is-enabled { background: #173c2d; border-color: #7be39b; color: #c9ffda; }
.viewer-overlay-status { position: absolute; top: 22px; right: 22px; background: rgba(4, 22, 44, .84); border: 1px solid #3f8ac2; border-radius: 4px; color: #69ccff; padding: 8px 10px; font: 10px/1 "SFMono-Regular", Consolas, monospace; z-index: 2; }
.tile-reading { position: relative; z-index: 1; width: 100%; min-height: 112px; display: grid; align-items: center; justify-content: stretch; padding: 13px 10px 25px; margin-top: 14px; overflow: hidden; background: rgba(3, 16, 34, .68); border: 1px solid rgba(73, 154, 216, .48); border-radius: 5px; box-shadow: inset 0 0 18px rgba(31, 115, 181, .1); }
.tile-reading-image { display: block; width: 100%; height: auto; max-width: 100%; max-height: min(48vh, 520px); object-fit: contain; object-position: center; border-radius: 3px; image-rendering: auto; }
.tile-reading-empty { display: flex; align-items: center; gap: 8px; color: #6092bb; font: 11px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: .5px; }
.empty-scan { width: 8px; height: 8px; border: 1px solid #52cafa; border-radius: 50%; box-shadow: 0 0 0 3px rgba(82, 202, 250, .1), 0 0 10px #52cafa; animation: blink 1.3s ease-in-out infinite; }
.tile-reading-meta { position: absolute; left: 12px; bottom: 7px; color: #6b9bc2; font: 9px/1.2 "SFMono-Regular", Consolas, monospace; }
.tile-card { flex: 0 0 62px; width: auto; height: auto; min-height: 0; aspect-ratio: 121 / 186; display: flex; align-items: center; justify-content: center; overflow: hidden; box-sizing: border-box; background: #f4f1e7; border: 1px solid #b8b7ae; border-radius: 4px; color: #222a2d; box-shadow: 0 3px 0 #7d817d, 0 0 13px rgba(73, 183, 255, .12); font-size: 24px; font-weight: 750; }
.tile-card img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; background: #f4f1e7; border-radius: 3px; }
.tile-card-back { width: auto; height: 86%; max-width: 86%; aspect-ratio: 121 / 186; display: block; border: 1px solid #b9b4a4; border-radius: 3px; background: repeating-linear-gradient(135deg, #faf8ee 0 4px, #e4e0d2 4px 6px); box-shadow: inset 0 0 0 2px #f1eee3, inset 0 0 0 4px #c7c1b2; }
.tile-card.is-empty { background: #ece8dc; box-shadow: 0 3px 0 #7d817d, 0 0 13px rgba(73, 183, 255, .08); }
.tile-card.is-wan { color: #b22726; }
.tile-card.is-tong { color: #1c65a5; }
.tile-card.is-tiao { color: #28763b; }
.tile-card.is-honor { color: #24292d; }
.tile-card.is-unknown { color: #7a8083; font-size: 18px; }

.recognition-tile-strip { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 6px; width: 100%; min-width: 0; }
.recognition-tile-strip[data-tile-count="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.recognition-tile-strip .tile-card { min-width: 0; width: 100%; height: auto; align-self: start; flex: none; }
.recognition-card-wide .recognition-tile-strip { gap: 3px; margin-top: 7px; }
.recognition-card-wide .recognition-tile-strip,
.sender-card-tile-strip { grid-template-columns: repeat(13, minmax(0, 1fr)) 8px minmax(0, 1fr); }
.recognition-card-wide .recognition-tile-strip[data-tile-count="4"],
.sender-card-tile-strip[data-tile-count="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.recognition-card-wide .recognition-tile-strip .tile-card:nth-child(14),
.sender-card-tile-strip .tile-card:nth-child(14) { grid-column: 15; }
.recognition-card-wide .recognition-tile-strip[data-tile-count="4"] .tile-card:nth-child(14),
.sender-card-tile-strip[data-tile-count="4"] .tile-card:nth-child(14) { grid-column: auto; }
.recognition-card-wide .recognition-tile-strip .tile-card { height: auto; aspect-ratio: 121 / 186; border-radius: 2px; box-shadow: 0 1px 0 #7d817d; }
.sender-card-tile-strip { gap: 3px; margin-top: 8px; }
.sender-card-tile-strip .tile-card { height: auto; aspect-ratio: 121 / 186; border-radius: 2px; box-shadow: 0 1px 0 #7d817d; }

/* Poker hands use one row sized to the actual received card count. */
#sendPanel .recognition-tile-strip.poker-card-strip,
#sendPanel .recognition-card-wide .recognition-tile-strip.poker-card-strip,
#sendPanel .sender-card-tile-strip.poker-card-strip,
#sendPanel .mobile-tile-reading.poker-card-strip {
  display: grid;
  grid-template-columns: repeat(var(--poker-count, 1), minmax(0, 1fr));
  align-items: flex-start;
  gap: 2px;
  overflow: hidden;
  overflow-y: hidden;
}
#sendPanel .recognition-tile-strip.poker-card-strip .tile-card,
#sendPanel .recognition-card-wide .recognition-tile-strip.poker-card-strip .tile-card,
#sendPanel .sender-card-tile-strip.poker-card-strip .tile-card,
#sendPanel .mobile-tile-reading.poker-card-strip .tile-card {
  flex: none;
  min-width: 0;
  width: 100%;
  grid-column: auto;
}
.app-footer { display: flex; justify-content: flex-end; align-items: center; gap: 9px; color: #466b8e; font: 9px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: .6px; padding-top: 13px; }
.author-credit { display: flex; justify-content: center; align-items: center; gap: 7px; margin-top: 22px; color: #a4c6dd; font: 15px/1.4 "SFMono-Regular", Consolas, monospace; letter-spacing: .6px; text-align: center; }
.author-credit strong { color: #b5efff; font-size: 16px; font-weight: 700; letter-spacing: .8px; text-shadow: 0 0 12px rgba(74, 198, 246, .34); }

.success-modal { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 22px; }
.success-backdrop { position: absolute; inset: 0; background: rgba(1, 8, 18, .78); backdrop-filter: blur(9px); }
.success-dialog { position: relative; width: min(100%, 360px); padding: 31px 25px 25px; overflow: hidden; text-align: center; background: linear-gradient(145deg, rgba(11, 48, 91, .98), rgba(4, 18, 38, .99)); border: 1px solid rgba(100, 211, 255, .78); border-radius: 10px; box-shadow: 0 24px 80px rgba(0, 0, 0, .62), 0 0 42px rgba(36, 158, 232, .22), inset 0 1px 0 rgba(209, 242, 255, .16); animation: success-in .45s cubic-bezier(.2,.8,.2,1) both; }
.success-dialog::before { content: ""; position: absolute; inset: 9px; border: 1px solid rgba(92, 198, 250, .16); pointer-events: none; }
.success-dialog::after { content: ""; position: absolute; left: -20%; right: -20%; top: 48%; height: 1px; background: #74ddff; box-shadow: 0 0 20px 3px rgba(79, 201, 255, .38); opacity: .5; animation: success-scan 3.2s ease-in-out infinite; pointer-events: none; }
@keyframes success-in { from { opacity: 0; transform: scale(.86) translateY(14px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes success-scan { from { transform: translateY(-80px); opacity: 0; } 25%, 75% { opacity: .55; } to { transform: translateY(80px); opacity: 0; } }
.success-mark { position: relative; z-index: 1; width: 76px; height: 76px; display: grid; place-items: center; margin: 0 auto 21px; border-radius: 50%; background: #06192e; box-shadow: 0 0 0 9px rgba(73, 190, 244, .06), 0 0 30px rgba(55, 188, 242, .35); overflow: hidden; }
.success-logo { display: block; width: 100%; height: 100%; object-fit: cover; }
.success-dialog .screen-index, .success-dialog h2, .success-dialog p, .success-session, .success-button { position: relative; z-index: 1; }
.success-dialog h2 { margin: 14px 0 9px; color: #f4fcff; font-size: 29px; letter-spacing: 1px; }
.success-dialog p { margin: 0 auto; color: #8db7d7; font-size: 12px; line-height: 1.7; }
.success-session { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 21px; padding: 12px 14px; border: 1px solid rgba(77, 164, 215, .5); background: rgba(2, 15, 31, .5); color: #6d9fc2; font: 10px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: 1px; }
.success-session strong { color: #c9f2ff; font-size: 16px; letter-spacing: 1.5px; }
.success-button { width: 100%; height: 50px; display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 14px; border: 1px solid #7be1ff; background: linear-gradient(110deg, #55d2ff, #1d7ac2); color: #03192d; font-weight: 800; cursor: pointer; box-shadow: 0 9px 24px rgba(20, 144, 218, .26); transition: filter .2s, transform .2s; }
.success-button:hover { filter: brightness(1.12); transform: translateY(-1px); }
.success-button b { font-size: 18px; font-weight: 400; }
.native-window-picker { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 20px; background: rgba(3, 9, 12, .76); backdrop-filter: blur(5px); }
.native-window-picker-dialog { width: min(100%, 440px); max-height: min(82vh, 620px); display: flex; flex-direction: column; padding: 20px; border: 1px solid #405661; background: #111a1e; box-shadow: 0 24px 70px rgba(0, 0, 0, .55); }
.native-window-picker-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.native-window-picker-header h2 { margin: 7px 0 0; color: var(--text); font-size: 18px; font-weight: 650; }
.native-window-picker-close { width: 32px; height: 32px; flex: 0 0 32px; border: 1px solid var(--line-strong); background: transparent; color: var(--muted); font-size: 20px; cursor: pointer; }
.native-window-picker-close:hover { border-color: var(--coral); color: var(--coral); }
.native-window-picker-hint { margin: 14px 0 10px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.native-window-picker-list { display: grid; gap: 7px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.native-window-choice { min-width: 0; min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 11px; border: 1px solid #2e454d; background: #0c1518; text-align: left; cursor: pointer; }
.native-window-choice:hover, .native-window-choice:focus-visible { border-color: var(--lime); background: #14211d; }
.native-window-choice-copy { min-width: 0; display: grid; gap: 5px; }
.native-window-choice-copy strong { overflow-wrap: anywhere; color: var(--text); font-size: 12px; font-weight: 600; }
.native-window-choice-copy small { color: var(--muted); font: 10px/1 "SFMono-Regular", Consolas, monospace; }
.native-window-choice-arrow { color: var(--lime); font-size: 16px; }
.native-window-picker-footer { display: flex; justify-content: flex-end; padding-top: 12px; }
.native-window-picker-cancel { min-height: 34px; padding: 0 13px; border: 1px solid var(--line-strong); background: transparent; color: var(--muted); font-size: 11px; cursor: pointer; }
.native-window-picker-cancel:hover { border-color: var(--text); color: var(--text); }
.footer-separator { color: #24496c; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 15px); padding: 10px 13px; background: var(--text); color: #101315; font-size: 12px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 20; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
[hidden] { display: none !important; }

/* Mobile viewer product flow */
.watch-panel.is-preview {
  width: min(100%, 520px);
  min-height: 100svh;
  margin: 0 auto;
  padding: 26px 22px 20px;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 50% 20%, rgba(43, 160, 235, .13), transparent 31%),
    linear-gradient(180deg, #061426 0%, #040b17 100%);
  box-shadow: none;
  overflow: hidden;
}
.app-shell:has(> #watchPanel:not([hidden])) { width: 100%; max-width: none; padding: 0; }
.app-shell:has(> #watchPanel:not([hidden])) > .topbar { display: none; }
.app-shell:has(> #watchPanel:not([hidden])) > .watch-panel { display: block; }
.viewer-shell-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.viewer-shell-top .viewer-brand { gap: 12px; }
.viewer-shell-top .viewer-emblem { position: relative; width: 64px; height: 64px; flex: 0 0 64px; padding: 0; border: 1px solid rgba(92, 202, 255, .42); border-radius: 50%; transform: none; background: radial-gradient(circle, rgba(122, 68, 184, .28), rgba(18, 23, 58, .82) 58%, rgba(3, 13, 28, .95) 75%); box-shadow: 0 0 26px rgba(54, 183, 244, .3), inset 0 0 18px rgba(147, 78, 211, .24); }
.viewer-shell-top .viewer-emblem-c { display: block; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.viewer-shell-top .viewer-emblem-c::before, .viewer-shell-top .viewer-emblem-c::after { display: none; }
.viewer-emblem-c img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; filter: drop-shadow(0 0 14px rgba(87, 206, 255, .38)); }
.viewer-emblem-c text { paint-order: stroke; stroke: rgba(105, 216, 255, .5); stroke-width: .8px; }
.viewer-emblem::before { content: ""; position: absolute; inset: 6px; border: 1px solid rgba(110, 213, 255, .76); border-radius: 50%; box-shadow: 0 0 15px rgba(63, 200, 255, .42), inset 0 0 12px rgba(63, 200, 255, .22); }
.viewer-emblem::after { content: ""; position: absolute; left: 23px; bottom: 0; width: 1px; height: 12px; background: #54c8f5; transform: rotate(32deg); box-shadow: 0 0 8px #54c8f5; }
.viewer-emblem span { position: absolute; z-index: 1; left: 14px; top: 3px; width: 18px; height: 23px; border: 1px solid #8ee6ff; border-radius: 52% 48% 45% 45%; background: radial-gradient(ellipse at 50% 68%, #030812 0 46%, #18254a 63%, #9856c5 100%); box-shadow: 0 0 10px rgba(84, 201, 244, .62), inset 0 0 8px rgba(174, 88, 232, .26); transform-origin: 9px 21px; }
.viewer-emblem span:nth-child(1) { transform: rotate(0deg); }
.viewer-emblem span:nth-child(2) { transform: rotate(72deg); }
.viewer-emblem span:nth-child(3) { transform: rotate(144deg); }
.viewer-emblem span:nth-child(4) { transform: rotate(216deg); }
.viewer-emblem span:nth-child(5) { transform: rotate(288deg); }
.viewer-emblem b { position: absolute; z-index: 2; left: 20px; top: 20px; width: 8px; height: 8px; border: 1px solid #e0fbff; border-radius: 50%; background: #9aeaff; box-shadow: 0 0 0 3px rgba(106, 220, 255, .13), 0 0 14px 4px #62d8ff; }
.viewer-shell-top .viewer-brand h2 { margin: 0; font-size: 21px; letter-spacing: 0; }
.viewer-wordmark { display: grid; gap: 4px; }
.viewer-wordmark > span { color: #67cfff; font: 700 8px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: 2.5px; text-shadow: 0 0 12px rgba(65, 202, 255, .45); }
.viewer-wordmark .wuyou-name { font-size: 24px; text-shadow: 0 0 22px rgba(88, 205, 255, .35), 9px 0 24px rgba(255, 79, 154, .18); }
.flow-screen { min-height: calc(100svh - 92px); display: flex; flex-direction: column; position: relative; animation: screen-in .55s ease both; }
@keyframes screen-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.screen-index { color: #55c5fa; font: 700 9px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: 2px; }
.activation-screen { justify-content: center; padding: 0 8px 34px; isolation: isolate; }
.activation-screen::before { content: ""; position: absolute; inset: -20px -28px; z-index: -2; pointer-events: none; background: radial-gradient(ellipse at 50% 34%, rgba(42, 163, 240, .12), transparent 31%), radial-gradient(ellipse at 50% 78%, rgba(178, 45, 255, .08), transparent 36%); }
.activation-screen::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .18; background: repeating-linear-gradient(0deg, transparent 0 5px, rgba(102, 204, 255, .08) 6px, transparent 7px 12px); mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent); animation: screen-scan 8s linear infinite; }
@keyframes screen-scan { from { transform: translateY(-16px); } to { transform: translateY(16px); } }
.activation-visual { position: relative; width: min(56vw, 260px); height: min(56vw, 260px); min-width: 190px; min-height: 190px; max-width: 260px; max-height: 260px; margin: 0 auto 24px; display: grid; place-items: center; }
.activation-grid { position: absolute; inset: 13%; opacity: .7; background-image: linear-gradient(rgba(67, 181, 245, .17) 1px, transparent 1px), linear-gradient(90deg, rgba(67, 181, 245, .17) 1px, transparent 1px); background-size: 23px 23px; mask-image: radial-gradient(circle, #000, transparent 72%); animation: grid-drift 12s linear infinite; }
@keyframes grid-drift { to { background-position: 23px 23px; } }
.activation-orbit { position: absolute; inset: 8%; border: 1px solid rgba(79, 197, 250, .28); border-radius: 50%; transform: rotate(32deg) scaleX(.48); box-shadow: 0 0 22px rgba(43, 170, 237, .08); animation: activation-orbit 8s linear infinite; }
.activation-orbit-b { inset: 1%; transform: rotate(-32deg) scaleX(.48); border-color: rgba(102, 220, 255, .13); animation-duration: 11s; animation-direction: reverse; }
@keyframes activation-orbit { to { transform: rotate(392deg) scaleX(.48); } }
.activation-core { position: relative; width: 104px; height: 104px; display: grid; place-items: center; border: 1px solid #59cafa; transform: rotate(45deg); box-shadow: 0 0 0 11px rgba(53, 171, 232, .05), 0 0 35px rgba(42, 167, 236, .3), inset 0 0 25px rgba(62, 185, 245, .12); animation: core-glow 2.8s ease-in-out infinite; }
@keyframes core-glow { 50% { box-shadow: 0 0 0 17px rgba(53, 171, 232, .03), 0 0 60px rgba(42, 167, 236, .55), inset 0 0 34px rgba(62, 185, 245, .2); } }
.activation-core::before, .activation-core::after { content: ""; position: absolute; background: #55c8fb; }
.activation-core::before { width: 1px; height: 154px; opacity: .32; }
.activation-core::after { width: 154px; height: 1px; opacity: .32; }
.activation-core span { width: 42px; height: 42px; border: 1px solid #a0e6ff; box-shadow: 0 0 20px rgba(80, 206, 255, .7); }
.activation-core i { position: absolute; width: 8px; height: 8px; background: #b5efff; box-shadow: 0 0 16px 4px rgba(70, 202, 255, .7); }
.activation-copy { text-align: center; }
.activation-copy h3, .device-heading h3, .room-hero h3 { margin: 12px 0 8px; color: #f5fbff; font-size: 31px; letter-spacing: 0; line-height: 1.1; }
.activation-copy h3 { margin-top: 0; }
.activation-copy p, .device-heading p, .room-hero p { margin: 0; color: #6d99bd; font-size: 12px; }
.activation-form { width: min(100%, 360px); margin: 7px auto 0; }
.activation-form label, .room-entry label { display: block; margin-bottom: 9px; color: #a5cce8; font: 700 10px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: 1.5px; }
.activation-input-wrap { height: 58px; display: flex; align-items: center; gap: 11px; padding: 0 15px; background: rgba(4, 22, 43, .78); border: 1px solid #3c8ec4; box-shadow: inset 0 0 20px rgba(27, 114, 174, .16), 0 0 0 1px rgba(78, 193, 255, .05), 0 0 22px rgba(27, 114, 174, .12); transition: .25s ease; }
.activation-input-wrap:focus-within { border-color: #66d4ff; box-shadow: 0 0 0 3px rgba(70, 188, 239, .1), inset 0 0 20px rgba(27, 114, 174, .14); }
.input-prefix, .room-input-shell > span { color: #4b9aca; font: 700 10px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: 1px; }
.activation-input-wrap input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: #e8f9ff; font: 700 17px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: 2px; }
.activation-input-wrap input::placeholder { color: #386787; }
.input-caret { width: 1px; height: 19px; background: #66d5ff; animation: blink 1s steps(2) infinite; }
.activation-button, .room-enter-button { width: 100%; height: 54px; display: flex; align-items: center; justify-content: center; gap: 15px; margin-top: 13px; border: 1px solid #7ee4ff; background: linear-gradient(110deg, #5cdbff, #2585d2 62%, #8d3eea); color: #02162a; font-weight: 800; cursor: pointer; box-shadow: 0 8px 22px rgba(22, 131, 202, .2), 0 0 28px rgba(50, 167, 239, .18); transition: .2s ease; }
.activation-button b, .room-enter-button b { font-size: 18px; font-weight: 400; }
.activation-button:hover, .room-enter-button:hover { filter: brightness(1.12); transform: translateY(-1px); }
.activation-button.is-processing { opacity: .7; pointer-events: none; }
.activation-state, .room-state { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 15px; color: #628daf; font: 10px/1 "SFMono-Regular", Consolas, monospace; }
.a-auth-gate { min-height: min(720px, calc(100vh - 126px)); justify-content: center; padding: 28px 8px 40px; }
.a-auth-gate .activation-visual { margin-bottom: 18px; }
.a-auth-gate .activation-copy { margin-bottom: 18px; }
.a-auth-gate .activation-copy h3 { margin-bottom: 9px; }
.a-login-form { width: min(100%, 360px); margin: 0 auto; }
.a-login-field { display: flex; align-items: center; gap: 12px; min-height: 54px; margin-top: 10px; padding: 0 15px; background: rgba(4, 22, 43, .68); border: 1px solid rgba(60, 142, 196, .72); box-shadow: inset 0 0 20px rgba(27, 114, 174, .12), 0 0 20px rgba(27, 114, 174, .08); }
.a-login-field:focus-within { border-color: #66d4ff; box-shadow: 0 0 0 3px rgba(70, 188, 239, .1), inset 0 0 20px rgba(27, 114, 174, .14); }
.a-login-field span { flex: 0 0 78px; color: #70a8ce; font: 700 9px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: 1.4px; }
.a-login-field input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: #e8f9ff; font: 700 15px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: 1px; }
.a-login-field input::placeholder { color: #386787; font-weight: 500; }
.a-login-form .activation-button { margin-top: 14px; }
.a-account-block { border-color: rgba(71, 190, 231, .34); background: rgba(5, 25, 46, .44); }
.a-account-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 27px; }
.a-account-row strong { color: #c8efff; font: 700 14px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: .4px; }
.a-account-row .icon-button { width: 27px; height: 27px; }
.a-account-block .microcopy { margin-top: 8px; color: #83bbda; }
.state-dot { width: 6px; height: 6px; border-radius: 50%; background: #49708f; }
.state-dot.is-live { background: #57ddff; box-shadow: 0 0 11px #57ddff; }
.state-dot.is-warn { background: #ffb967; box-shadow: 0 0 8px rgba(255, 185, 103, .6); }
.screen-footnote { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 42px; color: #2e658d; font: 9px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: 2px; }
.footline { width: 34px; height: 1px; background: #27587b; }
.device-screen { padding: 42px 8px 20px; }
.device-heading { position: relative; text-align: center; }
.phase-ribbon { width: min(100%, 360px); display: flex; align-items: center; gap: 7px; margin: 19px auto 0; color: #3d7094; font: 8px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: 1.2px; }
.phase-ribbon i { flex: 1; height: 1px; background: #173b5b; }
.phase-node { position: relative; min-width: 42px; color: #416f8e; transition: color .25s, text-shadow .25s; }
.phase-node::before { content: ""; display: block; width: 5px; height: 5px; margin: 0 auto 5px; border: 1px solid #326080; background: #0a2139; transform: rotate(45deg); transition: background .25s, border-color .25s, box-shadow .25s; }
.phase-node.is-done { color: #67b5d8; }
.phase-node.is-done::before { border-color: #57c9ed; background: #57c9ed; box-shadow: 0 0 9px rgba(87, 201, 237, .55); }
.phase-node.is-active { color: #c5f4ff; text-shadow: 0 0 10px rgba(91, 215, 255, .65); }
.phase-node.is-active::before { border-color: #a4edff; background: #54d4ff; box-shadow: 0 0 0 4px rgba(84, 212, 255, .1), 0 0 14px rgba(84, 212, 255, .85); animation: blink 1s ease-in-out infinite; }
.device-heading h3 { font-size: 27px; }
.device-console { position: relative; width: min(100%, 380px); min-height: 280px; display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 16px; margin: 25px auto 25px; padding: 31px 20px 20px; border: 1px solid rgba(60, 143, 194, .45); background: rgba(4, 22, 43, .54); box-shadow: inset 0 0 30px rgba(23, 103, 165, .1), 0 0 25px rgba(27, 135, 210, .08); overflow: hidden; }
.device-console::before { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(80, 181, 234, .12); pointer-events: none; }
.device-console-tag { position: absolute; z-index: 2; top: 11px; left: 20px; display: inline-flex; align-items: center; gap: 6px; color: #5797bd; font: 8px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: 1.2px; }
.tag-pulse { width: 5px; height: 5px; border-radius: 50%; background: #62d8ff; box-shadow: 0 0 9px #62d8ff; animation: blink 1.4s ease-in-out infinite; }
.device-visual { position: relative; height: 220px; display: grid; place-items: center; }
.device-scan-ring { position: absolute; width: 190px; height: 190px; border: 1px solid rgba(78, 202, 253, .35); border-radius: 50%; transform: scaleY(.47) rotate(-18deg); animation: ring-spin 7s linear infinite; }
.device-scan-ring.ring-b { width: 150px; height: 150px; transform: scaleY(.47) rotate(55deg); border-color: rgba(125, 225, 255, .17); animation-duration: 5s; animation-direction: reverse; }
@keyframes ring-spin { to { transform: scaleY(.47) rotate(342deg); } }
.phone-outline { position: relative; z-index: 1; width: 90px; height: 166px; border: 2px solid #66d4ff; border-radius: 15px; box-shadow: 0 0 20px rgba(65, 193, 244, .28), inset 0 0 16px rgba(57, 176, 233, .1); }
.phone-camera { position: absolute; top: 8px; left: 50%; width: 25px; height: 3px; transform: translateX(-50%); border-radius: 4px; background: #4c9fd0; }
.phone-screen { position: absolute; inset: 24px 8px 18px; display: grid; align-content: center; gap: 9px; padding: 15px 9px; border: 1px solid rgba(86, 201, 248, .55); background: linear-gradient(135deg, rgba(53, 182, 235, .22), rgba(12, 45, 82, .15)); }
.phone-screen span { height: 2px; background: #5dcfff; box-shadow: 0 0 8px #5dcfff; }
.phone-screen span:nth-child(2) { width: 70%; }.phone-screen span:nth-child(3) { width: 46%; }
.phone-port { position: absolute; bottom: 6px; left: 50%; width: 22px; height: 3px; transform: translateX(-50%); background: #4c9fd0; border-radius: 3px; }
.scan-beam { position: absolute; z-index: 2; width: 150px; height: 1px; background: #95eaff; box-shadow: 0 0 12px 2px #42c7fc; animation: beam 2.4s ease-in-out infinite; }
@keyframes beam { 0%, 100% { transform: translateY(-75px); opacity: 0; } 18%, 82% { opacity: .85; } 50% { transform: translateY(75px); } }
.device-data { position: relative; z-index: 1; display: grid; gap: 14px; }
.data-row { display: grid; gap: 4px; }.data-row span { color: #478bb5; font: 9px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: 1.1px; }.data-row strong { min-width: 0; overflow: hidden; color: #c9ecff; font: 600 11px/1.2 "SFMono-Regular", Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.setup-progress-head { width: min(100%, 380px); display: flex; align-items: baseline; justify-content: space-between; margin: 0 auto 9px; color: #6a9ac0; font: 10px/1 "SFMono-Regular", Consolas, monospace; }.setup-progress-head strong { color: #71dcff; font-size: 18px; font-weight: 500; }
.setup-progress { width: min(100%, 380px); height: 3px; margin: 0 auto; background: #123450; overflow: hidden; }.setup-progress span { display: block; width: 0; height: 100%; background: #58d2ff; box-shadow: 0 0 12px #58d2ff; transition: width .5s ease; }
.setup-log { width: min(100%, 380px); min-height: 112px; margin: 22px auto 0; padding: 10px 0; border-top: 1px solid #173c5d; border-bottom: 1px solid #173c5d; overflow: hidden; }.setup-log div { display: grid; grid-template-columns: 1.15fr 1fr 26px; gap: 6px; padding: 5px 0; color: #5282a4; font: 9px/1 "SFMono-Regular", Consolas, monospace; }.setup-log div strong { color: #b9e5f8; font-weight: 500; }.setup-log div b { color: #5dd5ff; font-weight: 500; text-align: right; }.setup-log > span { color: #4c7898; font: 10px/1 "SFMono-Regular", Consolas, monospace; }
.core-console { position: relative; width: min(100%, 380px); min-height: 430px; margin: 22px auto 22px; padding: 14px; border: 1px solid rgba(95, 205, 255, .66); background: rgba(3, 16, 35, .84); box-shadow: inset 0 0 35px rgba(26, 120, 190, .13), 0 0 26px rgba(26, 135, 212, .12); overflow: hidden; }
.core-console::before, .core-console::after { content: ""; position: absolute; pointer-events: none; }
.core-console::before { inset: 8px; border: 1px solid rgba(94, 205, 255, .13); }
.core-console::after { left: 0; right: 0; top: 50%; height: 1px; background: rgba(85, 202, 255, .12); box-shadow: 0 0 16px rgba(85, 202, 255, .22); animation: core-scan 3.2s ease-in-out infinite; }
@keyframes core-scan { 0%, 100% { transform: translateY(-175px); opacity: .18; } 50% { transform: translateY(175px); opacity: .8; } }
.core-console-head { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 2px 12px; color: #589bc3; font: 9px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: 1.3px; border-bottom: 1px solid rgba(55, 132, 181, .35); }
.core-console-head b { color: #73e1ff; font-weight: 500; letter-spacing: 1px; }
.core-console:not(.is-loading) .core-console-head b { color: #9dffb5; }
.core-signal-strip { position: relative; z-index: 2; display: flex; align-items: center; gap: 7px; min-height: 22px; color: #477e9f; font: 7px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: 1px; border-bottom: 1px solid rgba(55, 132, 181, .22); }
.core-signal-strip span:nth-of-type(2) { color: #70c7e7; }
.core-signal-strip span:last-of-type { margin-left: auto; color: #60d6f7; }
.core-signal-strip i { width: 3px; height: 3px; border-radius: 50%; background: #4fcfff; box-shadow: 0 0 7px #4fcfff; animation: blink 1.1s ease-in-out infinite; }
.core-visual { position: relative; z-index: 1; height: 207px; display: grid; place-items: center; overflow: hidden; }
.core-grid { position: absolute; inset: 9%; opacity: .48; background-image: linear-gradient(rgba(64, 180, 239, .13) 1px, transparent 1px), linear-gradient(90deg, rgba(64, 180, 239, .13) 1px, transparent 1px); background-size: 20px 20px; mask-image: radial-gradient(circle, #000 0%, transparent 70%); }
.core-orbit { position: absolute; width: 190px; height: 190px; border: 1px solid rgba(88, 203, 255, .34); border-radius: 50%; transform: scaleY(.35) rotate(22deg); box-shadow: 0 0 24px rgba(50, 175, 240, .12); animation: core-orbit 7s linear infinite; }
.core-orbit-b { width: 154px; height: 154px; transform: scaleY(.35) rotate(-34deg); border-color: rgba(159, 233, 255, .27); animation-duration: 4.8s; animation-direction: reverse; }
@keyframes core-orbit { to { transform: scaleY(.35) rotate(382deg); } }
.core-node { position: relative; z-index: 2; width: 92px; height: 92px; display: grid; place-items: center; border: 1px solid #7ce1ff; transform: rotate(45deg); background: rgba(6, 46, 78, .62); box-shadow: 0 0 0 8px rgba(66, 191, 246, .06), 0 0 30px rgba(50, 177, 239, .36), inset 0 0 25px rgba(53, 185, 241, .18); animation: node-pulse 1.8s ease-in-out infinite; }
.core-node::before, .core-node::after { content: ""; position: absolute; background: #6edbff; opacity: .42; }
.core-node::before { width: 1px; height: 142px; }.core-node::after { width: 142px; height: 1px; }
.core-node span { transform: rotate(-45deg); color: #e5faff; font: 700 17px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: 1px; text-shadow: 0 0 12px #58d5ff; }
.core-node i { position: absolute; width: 8px; height: 8px; transform: rotate(-45deg); background: #ddfaff; box-shadow: 0 0 0 5px rgba(73, 210, 255, .1), 0 0 17px 4px #4fcfff; }
@keyframes node-pulse { 50% { box-shadow: 0 0 0 14px rgba(66, 191, 246, .03), 0 0 45px rgba(50, 177, 239, .55), inset 0 0 25px rgba(53, 185, 241, .24); } }
.core-ray { position: absolute; z-index: 1; width: 100px; height: 1px; background: linear-gradient(90deg, transparent, #6cdfff, transparent); transform-origin: center; opacity: .55; animation: ray-pulse 1.6s ease-in-out infinite; }
.ray-a { transform: rotate(0deg) translateX(98px); }.ray-b { transform: rotate(120deg) translateX(98px); animation-delay: .32s; }.ray-c { transform: rotate(240deg) translateX(98px); animation-delay: .64s; }
@keyframes ray-pulse { 50% { opacity: 1; width: 145px; box-shadow: 0 0 11px #5fd8ff; } }
.core-scan-line { position: absolute; z-index: 3; width: 170px; height: 1px; background: #d2f8ff; box-shadow: 0 0 13px 2px #4ccaff; animation: core-beam 2.1s ease-in-out infinite; }
@keyframes core-beam { 0%, 100% { transform: translateY(-73px); opacity: 0; } 18%, 82% { opacity: .9; } 50% { transform: translateY(73px); } }
.core-command-list { position: relative; z-index: 2; display: grid; gap: 5px; }
.core-command { display: grid; grid-template-columns: 86px minmax(0, 1fr) 42px; align-items: center; gap: 6px; min-height: 31px; padding: 0 7px; border: 1px solid rgba(44, 103, 144, .32); background: rgba(7, 32, 57, .62); color: #4b86a9; font: 8px/1 "SFMono-Regular", Consolas, monospace; transition: border-color .25s, background .25s, color .25s, box-shadow .25s; }
.core-command strong { min-width: 0; overflow: hidden; color: #8dbbd5; font-size: 9px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.core-command b { color: #4d85a6; font-weight: 500; text-align: right; }
.core-command.is-active { border-color: rgba(88, 209, 255, .7); background: rgba(11, 67, 103, .72); color: #89e4ff; box-shadow: inset 2px 0 #5ed8ff, 0 0 14px rgba(46, 165, 226, .12); }
.core-command.is-active strong { color: #e1f9ff; }.core-command.is-active b { color: #71e3ff; }
.core-log-line { display: grid; grid-template-columns: 86px minmax(0, 1fr) 48px; gap: 6px; padding: 5px 0; color: #4c85a5; font: 9px/1 "SFMono-Regular", Consolas, monospace; animation: log-in .35s ease both; }
.core-log-line strong { min-width: 0; overflow: hidden; color: #bde9fa; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }.core-log-line b { color: #63d8ff; font-weight: 500; text-align: right; }
@keyframes log-in { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: translateX(0); } }
.room-screen { justify-content: center; padding: 30px 8px 42px; }.room-hero { position: relative; text-align: center; }.room-hero h3 { font-size: 31px; }.room-symbol { position: relative; z-index: 1; width: 82px; height: 82px; display: grid; place-items: center; margin: 0 auto 23px; border: 1px solid #61d2ff; transform: rotate(45deg); color: #a5ebff; font-size: 37px; box-shadow: 0 0 0 10px rgba(60, 182, 238, .05), 0 0 30px rgba(41, 166, 234, .32); }.room-symbol::first-letter { transform: rotate(-45deg); }.room-bloom { position: absolute; left: 50%; top: 5px; width: 170px; height: 170px; transform: translateX(-50%); border-radius: 50%; background: rgba(41, 161, 230, .13); filter: blur(35px); }
.room-entry { width: min(100%, 360px); margin: 42px auto 0; }.room-input-shell { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 15px; background: rgba(4, 22, 43, .72); border: 1px solid #2e6e9e; }.room-input-shell:focus-within { border-color: #67d5ff; box-shadow: 0 0 0 3px rgba(70, 188, 239, .1); }.room-input { min-width: 0; flex: 1; height: 100%; border: 0; outline: 0; border-radius: 0; background: transparent; color: #e8f9ff; padding: 0; font: 700 18px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: 2px; }.room-input::placeholder { color: #376886; font-size: 14px; }.room-enter-button { margin-top: 14px; }.room-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: min(100%, 360px); margin: auto auto 0; color: #416e8d; font: 9px/1 "SFMono-Regular", Consolas, monospace; }.room-signal { display: flex; align-items: end; gap: 3px; height: 10px; }.room-signal i { display: block; width: 3px; background: #4cc8f4; }.room-signal i:nth-child(1) { height: 3px; }.room-signal i:nth-child(2) { height: 6px; }.room-signal i:nth-child(3) { height: 8px; }.room-signal i:nth-child(4) { height: 10px; }
.viewer-screen { padding: 30px 0 10px; min-height: calc(100svh - 92px); }.viewer-screen .watch-header { margin-bottom: 15px; }.viewer-title h3 { margin: 7px 0 0; color: #f5fbff; font-size: 22px; }.viewer-exit { width: 32px; height: 32px; border: 1px solid #28587d; background: rgba(8, 36, 64, .65); color: #8db9d8; font-size: 21px; cursor: pointer; }.viewer-screen .viewer-stage { width: 100%; min-height: 0; aspect-ratio: 1 / 1.08; border-radius: 5px; border-color: #245b91; box-shadow: inset 0 0 44px rgba(22, 104, 180, .1), 0 16px 36px rgba(0, 0, 0, .28); }.viewer-screen .viewer-overlay-card { width: min(92%, 360px); min-height: 245px; }.viewer-screen .tile-card { flex-basis: 44px; height: auto; aspect-ratio: 121 / 186; font-size: 20px; }.viewer-bottom-bar { display: none !important; }
.app-footer { display: none; }


@media (max-width: 420px) {
  .watch-panel.is-preview { padding-left: 17px; padding-right: 17px; }
  .viewer-shell-top .viewer-emblem { width: 35px; height: 35px; padding: 7px; flex-basis: 35px; }.viewer-shell-top .viewer-emblem-c { width: 54px; height: 54px; flex-basis: 54px; padding: 0; }.viewer-shell-top .viewer-brand h2 { font-size: 19px; }
  .activation-copy h3, .room-hero h3 { font-size: 28px; }.device-heading h3 { font-size: 24px; }
  .device-console { grid-template-columns: 1fr; min-height: 462px; gap: 0; padding-top: 31px; }.device-visual { height: 220px; }.device-data { grid-template-columns: 1fr 1fr; gap: 14px 12px; padding: 0 8px; }.device-console-tag { left: 16px; }.core-console { min-height: 430px; padding: 12px; }.core-visual { height: 188px; }.core-command { grid-template-columns: 77px minmax(0, 1fr) 38px; }.core-log-line { grid-template-columns: 75px minmax(0, 1fr) 42px; }
  .viewer-bottom-bar { grid-template-columns: repeat(4, minmax(0, 1fr)); }.viewer-bottom-bar .viewer-enable-action { grid-column: 1 / -1; width: 100%; justify-content: center; }
}

@media (max-width: 940px) {
  .app-shell { padding: 18px 18px 14px; }
  .workspace, .watch-grid { grid-template-columns: 1fr; }
  .control-rail { min-height: 0; }
  .rail-actions { margin-top: 22px; }
  .viewer-rail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 285px); gap: 18px; align-items: end; }
  .viewer-rail .metrics-block { border-top: 0; padding-top: 0; margin-top: 0; }
  .viewer-rail .full-width { grid-column: 1 / -1; margin-top: 0; }
  .viewer-stage { min-height: 360px; }
  .watch-panel.is-preview .watch-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .app-shell { width: 100%; padding: 14px 12px 12px; }
  .topbar { align-items: flex-start; gap: 12px; padding-bottom: 16px; }
  .brand-lockup { min-width: 0; }
  .brand-lockup h1 { font-size: 19px; }
  .connection-pill { margin-top: 2px; }
  .preview-stage { min-height: 245px; }
  .viewer-stage { width: 100%; height: clamp(205px, 56vw, 245px); min-height: 0; aspect-ratio: auto; }
  .watch-panel.is-preview { width: 100%; min-height: 0; padding: 14px; border-radius: 9px; }
  .watch-panel.is-preview .watch-header h2 { font-size: 19px; }
  .viewer-floating-bubble { right: 16px; bottom: 16px; width: 64px; height: 64px; }
  .viewer-rail { display: flex; }
  .stage-footer { gap: 10px; }
  .stage-size { width: 100%; margin-left: 0; }
  .sender-floating-preview { margin-top: 20px; padding-top: 15px; }
  .sender-floating-preview-stage { min-height: 118px; }
  .sender-floating-preview-stage img { max-height: 220px; }
  .viewer-overlay-card { width: calc(100% - 16px); min-height: 0; max-height: calc(100% - 12px); padding: 10px 11px 9px; }
  .overlay-card-header { margin-bottom: 7px; font-size: 15px; }
  .overlay-close { width: 24px; height: 24px; font-size: 15px; }
  .overlay-info-row { grid-template-columns: 51px auto 1fr; gap: 6px; font-size: 8px; }
  .overlay-info-row strong { font-size: 10px; }
  .tile-reading { min-height: 72px; padding: 7px 5px 17px; margin-top: 8px; }
  .tile-reading-image { max-height: 34vh; }
  .tile-card { flex-basis: 31px; height: auto; aspect-ratio: 121 / 186; font-size: 15px; }
  .tile-reading-meta { left: 7px; bottom: 4px; font-size: 7px; }
  .overlay-card-footer { gap: 6px; padding-top: 6px; font-size: 7px; }
  .footer-signal { width: 25px; height: 6px; }
}

/* Keep the real B-side floating card compact on phone-sized screens. */
.viewer-screen .viewer-overlay-card { width: min(56%, 188px); min-height: 0; padding: 8px 9px 7px; }
.viewer-screen .tile-card { flex-basis: 36px; font-size: 16px; }

/* Responsive guardrails for phones, split-screen windows, and IME resize. */
html { min-height: 100%; }
body { min-width: 0; min-height: 100%; }
.app-shell { padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
.watch-panel.is-preview { overflow-x: hidden; overflow-y: auto; overscroll-behavior-y: contain; padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); padding-bottom: max(20px, env(safe-area-inset-bottom)); }
.flow-screen { min-height: max(0px, calc(100dvh - 92px)); flex: 0 0 auto; }
.viewer-shell-top .viewer-brand, .viewer-shell-top .viewer-state { min-width: 0; }
.viewer-shell-top .viewer-brand { flex: 1 1 auto; }
.viewer-shell-top .viewer-state { flex: 0 1 auto; max-width: 100%; }
.viewer-empty { max-width: calc(100% - 24px); white-space: normal; text-align: center; }
.sender-preview-layout, #sendPanel[data-tile-count="4"] .sender-preview-layout { min-width: 0; }
.metric-row strong { min-width: 0; overflow-wrap: anywhere; }
.author-credit { flex-wrap: wrap; }

@media (max-width: 940px) {
  .sender-preview-layout, #sendPanel[data-tile-count="4"] .sender-preview-layout { grid-template-columns: minmax(0, 1fr); }
  #sendPanel[data-tile-count="4"] .sender-live-column,
  #sendPanel[data-tile-count="4"] .preview-stage,
  #sendPanel[data-tile-count="4"] .stage-footer,
  #sendPanel[data-tile-count="4"] .crop-fields,
  #sendPanel[data-tile-count="4"] .sender-card-preview,
  #sendPanel[data-tile-count="4"] .sender-floating-preview { max-width: none; }
}

@media (max-width: 600px) {
  .app-shell { padding-top: max(12px, env(safe-area-inset-top)); }
  .topbar, .panel-heading, .preview-toolbar, .watch-header, .mobile-viewer-preview-head { flex-wrap: wrap; }
  .connection-pill { margin-left: auto; }
  .mode-switch { overflow-x: auto; scrollbar-width: none; }
  .mode-switch::-webkit-scrollbar { display: none; }
  .mode-button { flex: 0 0 auto; margin-right: 18px; }
  .apk-build-actions { grid-template-columns: 1fr; }
  .settings-field { grid-template-columns: 1fr; align-items: stretch; gap: 5px; }
  .stage-footer { align-items: flex-start; }
  .stage-footer span { min-width: 0; }
  .viewer-bottom-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .viewer-bottom-bar .viewer-enable-action { grid-column: 1 / -1; width: 100%; justify-content: center; }
  .viewer-screen .viewer-stage { height: clamp(240px, 92vw, 560px); aspect-ratio: auto; }
  .viewer-screen .viewer-overlay-card { max-width: calc(100% - 16px); }
  .author-credit { font-size: 12px; gap: 3px 6px; }
  .author-credit strong { font-size: 13px; overflow-wrap: anywhere; }
}

@media (max-width: 380px) {
  .watch-panel.is-preview { padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
  .viewer-shell-top { gap: 8px; }
  .viewer-shell-top .viewer-emblem-c { width: 48px; height: 48px; flex-basis: 48px; }
  .viewer-wordmark .wuyou-name { font-size: 21px; }
  .viewer-state { padding: 7px 8px; font-size: 10px; }
  .join-row { grid-template-columns: 1fr; }
  .join-button { width: 100%; }
  .room-footer { flex-wrap: wrap; font-size: 8px; }
  .activation-input-wrap { padding-left: 11px; padding-right: 11px; gap: 8px; }
  .activation-input-wrap input { font-size: 15px; letter-spacing: 1px; }
  .screen-footnote { gap: 6px; letter-spacing: 1.4px; }
}

@media (max-height: 700px) and (orientation: portrait) {
  .activation-screen { justify-content: flex-start; padding-top: 20px; }
  .activation-visual { width: min(48vw, 200px); height: min(48vw, 200px); min-width: 156px; min-height: 156px; margin-bottom: 18px; }
  .activation-core { width: 84px; height: 84px; }
  .activation-core::before { height: 126px; }
  .activation-core::after { width: 126px; }
  .screen-footnote { margin-top: 26px; }
}

/* Confirmed B-side floating HUD: a compact hand strip at upper-left and a
   translucent live code monitor at upper-right. The hand remains driven by
   renderTileReading; these rules only define its fixed presentation. */
.viewer-screen .viewer-stage {
  background:
    radial-gradient(circle at 53% 47%, rgba(31, 164, 126, .25), transparent 46%),
    linear-gradient(145deg, #0b806c 0%, #075f5c 53%, #063e4e 100%);
  border-color: rgba(133, 235, 196, .35);
  box-shadow: inset 0 0 64px rgba(5, 37, 47, .35), 0 16px 36px rgba(0, 0, 0, .28);
}
.viewer-screen .viewer-stage::before { inset: 12px; border-color: rgba(205, 255, 229, .13); }
.viewer-screen .stage-grid {
  opacity: .36;
  background-image: linear-gradient(rgba(189, 255, 226, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(189, 255, 226, .07) 1px, transparent 1px);
  background-size: 34px 34px;
}
.viewer-screen .stage-grid::after { background: linear-gradient(90deg, transparent, rgba(177, 255, 218, .32), transparent); box-shadow: 0 0 16px rgba(122, 255, 195, .38); }
.viewer-screen .stage-orbit { border-color: rgba(175, 255, 222, .19); }
.viewer-screen .orbit-two { border-color: rgba(175, 255, 222, .11); }
.viewer-screen .stage-caption { color: rgba(213, 255, 235, .34); }
.viewer-screen .caption-line { background: rgba(190, 255, 223, .28); }

.viewer-screen .viewer-overlay-card {
  left: 14px;
  top: 14px;
  width: min(55%, 338px);
  min-height: 0;
  max-height: none;
  padding: 0;
  transform: none;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.viewer-screen .viewer-overlay-card .shared-card-preview-surface {
  position: relative;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.viewer-screen .viewer-overlay-card .shared-card-close { position: absolute; top: 7px; right: 8px; z-index: 2; width: 21px; height: 21px; border-color: rgba(183, 255, 221, .3); border-radius: 4px; background: rgba(5, 38, 41, .44); color: rgba(225, 255, 241, .74); font-size: 14px; }
.viewer-screen .viewer-overlay-card .shared-card-image.tile-reading {
  display: grid;
  min-height: 0;
  margin-top: 0;
  padding: 0;
  overflow: hidden;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.viewer-screen .viewer-overlay-card .recognition-tile-strip { grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 2px; }
.viewer-screen .viewer-players .recognition-tile-strip {
  grid-template-columns: repeat(var(--tile-count, 14), minmax(0, 1fr));
  gap: 2px;
}
.viewer-screen .viewer-players .tile-card {
  min-width: 0;
  width: 100%;
}
.viewer-screen .viewer-overlay-card .recognition-tile-strip.poker-card-strip { grid-template-columns: repeat(16, minmax(0, 1fr)); overflow: hidden; }
.viewer-screen .viewer-overlay-card .recognition-tile-strip.poker-card-strip .tile-card { min-width: 0; width: 100%; flex: none; grid-column: auto; }
.viewer-players { display: grid; gap: 8px; width: 100%; max-height: min(56vh, 460px); overflow: auto; }
.viewer-players[hidden] { display: none; }
.viewer-player-card { min-width: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
.viewer-player-card + .viewer-player-card { margin-top: 14px; padding-top: 10px; border-top: 1px solid rgba(193, 255, 227, .18); }
.viewer-player-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #eafaff; font-size: 11px; }
.viewer-player-head span { color: #a4b3b8; font: 9px/1 "SFMono-Regular", Consolas, monospace; }
.viewer-player-head span.is-live { color: var(--lime); }
.viewer-player-detail { display: block; overflow: hidden; margin-top: 4px; color: #6e9ab3; font: 8px/1.35 "SFMono-Regular", Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.viewer-player-tile-strip { gap: 2px; margin-top: 3px; }
.viewer-screen .viewer-stage.has-poker-hand .viewer-overlay-card { width: min(calc(100% - 28px), 720px); }
.viewer-screen .viewer-overlay-card .tile-card { position: relative; width: 100%; min-width: 0; flex: none; aspect-ratio: 121 / 186; border-color: rgba(177, 246, 219, .42); border-radius: 3px; background: #f4f1e7; opacity: 1; box-shadow: 0 2px 5px rgba(0, 0, 0, .18); }
.viewer-screen .viewer-overlay-card .tile-card::after { display: none; }
.viewer-screen .viewer-overlay-card .tile-card img { position: relative; z-index: 0; opacity: 1; filter: none; }
.viewer-screen .viewer-overlay-card .viewer-players .tile-card { opacity: 1; background: transparent; border-color: transparent; box-shadow: none; }
.viewer-screen .viewer-overlay-card .viewer-players .tile-card img { opacity: .62; background: #f4f1e7; }
.viewer-screen .viewer-overlay-card .tile-card.is-empty { background: rgba(216, 242, 228, .08); box-shadow: none; opacity: .42; }
.viewer-stage:not(.has-tile) .viewer-overlay-card { visibility: hidden; opacity: 0; pointer-events: none; }
.viewer-stage.has-tile .viewer-overlay-card { visibility: visible; opacity: 1; }
.viewer-launch-hint { gap: 8px; padding-right: 12px; }
.viewer-launch-hint-arrow { color: #73d9ff; font: 18px/1 Arial, sans-serif; text-shadow: 0 0 10px rgba(80, 211, 255, .55); animation: launch-hint-pulse 1.8s ease-in-out infinite; }
@keyframes launch-hint-pulse { 0%, 100% { transform: translateX(0); opacity: .58; } 50% { transform: translateX(4px); opacity: 1; } }

.viewer-process-panel {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  width: min(35%, 244px);
  padding: 10px 11px 10px;
  border: 1px solid rgba(193, 255, 227, .34);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(5, 38, 41, .36), rgba(5, 38, 41, .16));
  box-shadow: 0 15px 28px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .1), inset 0 0 0 1px rgba(170, 255, 225, .06);
  backdrop-filter: blur(9px) saturate(1.18);
  isolation: isolate;
  pointer-events: none;
}
.viewer-process-panel::before { content: ""; position: absolute; inset: 6px; z-index: 0; border: 1px solid rgba(194, 255, 229, .14); border-radius: 7px; background: linear-gradient(120deg, rgba(188, 255, 226, .07), transparent 42%, rgba(0, 17, 24, .08)); pointer-events: none; }
.viewer-process-panel::after { content: "IDLE"; position: absolute; right: 11px; bottom: -15px; color: rgba(202, 255, 232, .27); font: 8px "SFMono-Regular", Consolas, monospace; letter-spacing: 1px; }
.viewer-process-panel.is-live::after { content: "LIVE"; }
.viewer-process-head, .viewer-terminal, .viewer-process-note { position: relative; z-index: 1; }
.viewer-process-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.viewer-process-head strong { color: #effff7; font-size: 10px; line-height: 1.1; letter-spacing: 0; }
.viewer-process-status { display: inline-flex; align-items: center; gap: 5px; color: #cdfbdc; font: 7px/1.1 "SFMono-Regular", Consolas, monospace; }
.viewer-process-status i { width: 6px; height: 6px; border-radius: 50%; background: #b4f27e; box-shadow: 0 0 0 3px rgba(180, 242, 126, .12), 0 0 10px rgba(180, 242, 126, .5); animation: viewer-process-pulse 1.8s ease-in-out infinite; }
.viewer-terminal { position: relative; overflow: hidden; margin-top: 8px; padding: 7px 8px; border: 1px solid rgba(170, 255, 224, .17); border-radius: 7px; background: rgba(0, 18, 24, .18); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04); }
.viewer-terminal::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(180deg, transparent 0 12px, rgba(164, 255, 221, .035) 12px 13px); pointer-events: none; }
.viewer-terminal::after { content: ""; position: absolute; left: 0; right: 0; top: -20%; height: 26%; background: linear-gradient(180deg, transparent, rgba(119, 255, 200, .14), transparent); animation: viewer-process-scan 4.2s linear infinite; pointer-events: none; }
.viewer-terminal-bar { display: flex; align-items: center; gap: 3px; margin-bottom: 5px; color: rgba(195, 255, 229, .46); font: 7px "SFMono-Regular", Consolas, monospace; letter-spacing: .5px; }
.viewer-terminal-bar i { width: 4px; height: 4px; border-radius: 50%; background: rgba(205, 255, 232, .44); }
.viewer-terminal-bar i:first-child { background: rgba(255, 188, 137, .64); }.viewer-terminal-bar i:nth-child(2) { background: rgba(255, 238, 145, .64); }.viewer-terminal-bar i:nth-child(3) { background: rgba(157, 255, 195, .68); }
.viewer-terminal-bar span { margin-left: 3px; }
.viewer-code-line { position: relative; z-index: 1; display: flex; gap: 5px; min-height: 13px; color: #a2f4cc; font: 7px/1.7 "SFMono-Regular", Consolas, monospace; white-space: nowrap; }
.viewer-code-line .prompt { color: #78e5b0; }.viewer-code-line .dim { color: rgba(194, 255, 228, .56); }.viewer-code-line .hot { color: #e2ff9d; text-shadow: 0 0 10px rgba(190, 255, 146, .32); }
.viewer-code-cursor { display: inline-block; width: 4px; height: 9px; margin-left: 2px; vertical-align: -1px; background: #caff9e; box-shadow: 0 0 8px rgba(202, 255, 158, .66); animation: viewer-process-blink 1s steps(2, start) infinite; }
.viewer-process-note { margin: 6px 0 0; overflow: hidden; color: #8fc5b4; font: 7px "SFMono-Regular", Consolas, monospace; letter-spacing: .15px; text-overflow: ellipsis; white-space: nowrap; }
.viewer-process-panel.is-updated .viewer-code-line .hot { animation: viewer-process-flash .42s ease both; }
@keyframes viewer-process-pulse { 50% { opacity: .55; transform: scale(.82); } }
@keyframes viewer-process-scan { to { transform: translateY(480%); } }
@keyframes viewer-process-blink { 50% { opacity: 0; } }
@keyframes viewer-process-flash { 0% { opacity: .35; } 100% { opacity: 1; } }

/* The compact process panel replaces the old single-line connection toast. */
.viewer-screen .viewer-overlay-status { display: none !important; }

@media (max-width: 420px) {
  .native-window-picker { padding: 12px; }
  .native-window-picker-dialog { padding: 16px; }
  .viewer-screen .viewer-overlay-card { left: 10px; top: 10px; width: min(54%, 250px); }
  .viewer-process-panel { top: 11px; right: 10px; width: min(34%, 182px); padding: 8px 8px 8px; }
  .viewer-process-head strong { font-size: 10px; }.viewer-process-status { font-size: 7px; }
  .viewer-code-line { font-size: 6px; gap: 4px; }.viewer-terminal { padding: 6px 6px; }.viewer-process-note { font-size: 6px; }
}

/* Shared B usage help styles */



.usage-help-kicker, .usage-help-dialog h2, .usage-help-dialog p { position: relative; z-index: 1; }
.usage-help-kicker { color: #64badc; font: 9px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: 1.6px; }
.usage-help-dialog h2 { margin: 13px 0 17px; color: #f4fcff; font-size: 24px; letter-spacing: 1px; }
.usage-help-dialog p { margin: 0; color: #a9c8dc; font-size: 13px; line-height: 1.75; }
.usage-help-feature { color: #d5f4ff !important; font-weight: 650; }
.usage-help-divider { position: relative; z-index: 1; height: 1px; margin: 17px 0 15px; background: rgba(97, 184, 224, .28); }
.usage-help-warning { color: #ffcfab !important; }
.usage-help-join { margin-top: 10px !important; color: #b8e7f7 !important; }


.usage-help-button { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; gap: 10px; min-width: 132px; height: 44px; margin: 16px auto 0; padding: 0 17px; border: 1px solid rgba(83, 190, 235, .42); border-radius: 6px; background: linear-gradient(180deg, rgba(13, 50, 77, .72), rgba(4, 22, 43, .62)); box-shadow: inset 0 1px 0 rgba(141, 219, 255, .08), 0 4px 16px rgba(0, 8, 20, .18); color: #b6ddea; font-size: 12px; font-weight: 600; line-height: 1; letter-spacing: 1px; cursor: pointer; transition: border-color .2s, color .2s, box-shadow .2s; }
.usage-help-button:hover { border-color: #66d4ff; color: #e2f8ff; box-shadow: inset 0 0 15px rgba(44, 157, 205, .14), 0 0 16px rgba(31, 137, 190, .16); }
.usage-help-button:focus-visible { outline-color: #66d4ff; outline-offset: 3px; }
.usage-help-button:active { background: rgba(20, 65, 94, .75); }
.usage-help-label { font-size: 13px; font-weight: 500; line-height: 20px; letter-spacing: 1px; margin-right: -1px; }
.usage-help-icon { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; width: 16px; height: 16px; border: 1px solid currentColor; border-radius: 50%; font: 500 11px/1 Arial, sans-serif; letter-spacing: 0; }
.usage-help-modal { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 22px; background: rgba(1, 10, 22, .72); backdrop-filter: blur(3px); }
.usage-help-dialog { position: relative; width: min(100%, 360px); padding: 28px 24px 25px; border: 1px solid rgba(100, 211, 255, .62); border-radius: 8px; background: linear-gradient(145deg, rgba(9, 42, 77, .98), rgba(4, 18, 38, .99)); box-shadow: 0 24px 80px rgba(0, 0, 0, .62), 0 0 36px rgba(36, 158, 232, .18), inset 0 1px 0 rgba(209, 242, 255, .12); }
.usage-help-dialog::before { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(92, 198, 250, .12); pointer-events: none; }
.usage-help-close { position: absolute; z-index: 1; top: 11px; right: 13px; width: 25px; height: 25px; padding: 0; border: 1px solid rgba(133, 198, 239, .42); border-radius: 4px; background: rgba(28, 90, 147, .25); color: #c9eaff; font: 20px/20px Arial, sans-serif; cursor: pointer; }
.usage-help-kicker, .usage-help-dialog h2, .usage-help-dialog p { position: relative; z-index: 1; }
.usage-help-kicker { color: #64badc; font: 9px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: 1.6px; }
.usage-help-dialog h2 { margin: 13px 0 17px; color: #f4fcff; font-size: 24px; letter-spacing: 1px; }
.usage-help-dialog p { margin: 0; color: #a9c8dc; font-size: 13px; line-height: 1.75; }
.usage-help-feature { color: #d5f4ff !important; font-weight: 650; }
.usage-help-divider { position: relative; z-index: 1; height: 1px; margin: 17px 0 15px; background: rgba(97, 184, 224, .28); }
.usage-help-warning { color: #ffcfab !important; }
.usage-help-join { margin-top: 10px !important; color: #b8e7f7 !important; }
.device-screen { padding: 42px 8px 20px; }
.device-heading { position: relative; text-align: center; }
.phase-ribbon { width: min(100%, 360px); display: flex; align-items: center; gap: 7px; margin: 19px auto 0; color: #3d7094; font: 8px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: 1.2px; }
.phase-ribbon i { flex: 1; height: 1px; background: #173b5b; }
.phase-node { position: relative; min-width: 42px; color: #416f8e; transition: color .25s, text-shadow .25s; }
.phase-node::before { content: ""; display: block; width: 5px; height: 5px; margin: 0 auto 5px; border: 1px solid #326080; background: #0a2139; transform: rotate(45deg); transition: background .25s, border-color .25s, box-shadow .25s; }
.phase-node.is-done { color: #67b5d8; }
.phase-node.is-done::before { border-color: #57c9ed; background: #57c9ed; box-shadow: 0 0 9px rgba(87, 201, 237, .55); }
.phase-node.is-active { color: #c5f4ff; text-shadow: 0 0 10px rgba(91, 215, 255, .65); }
.phase-node.is-active::before { border-color: #a4edff; background: #54d4ff; box-shadow: 0 0 0 4px rgba(84, 212, 255, .1), 0 0 14px rgba(84, 212, 255, .85); animation: blink 1s ease-in-out infinite; }
.device-heading h3 { font-size: 27px; }
.device-console { position: relative; width: min(100%, 380px); min-height: 280px; display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 16px; margin: 25px auto 25px; padding: 31px 20px 20px; border: 1px solid rgba(60, 143, 194, .45); background: rgba(4, 22, 43, .54); box-shadow: inset 0 0 30px rgba(23, 103, 165, .1), 0 0 25px rgba(27, 135, 210, .08); overflow: hidden; }
.device-console::before { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(80, 181, 234, .12); pointer-events: none; }
.device-console-tag { position: absolute; z-index: 2; top: 11px; left: 20px; display: inline-flex; align-items: center; gap: 6px; color: #5797bd; font: 8px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: 1.2px; }
.tag-pulse { width: 5px; height: 5px; border-radius: 50%; background: #62d8ff; box-shadow: 0 0 9px #62d8ff; animation: blink 1.4s ease-in-out infinite; }
.device-visual { position: relative; height: 220px; display: grid; place-items: center; }
.device-scan-ring { position: absolute; width: 190px; height: 190px; border: 1px solid rgba(78, 202, 253, .35); border-radius: 50%; transform: scaleY(.47) rotate(-18deg); animation: ring-spin 7s linear infinite; }
.device-scan-ring.ring-b { width: 150px; height: 150px; transform: scaleY(.47) rotate(55deg); border-color: rgba(125, 225, 255, .17); animation-duration: 5s; animation-direction: reverse; }
@keyframes ring-spin { to { transform: scaleY(.47) rotate(342deg); } }
.phone-outline { position: relative; z-index: 1; width: 90px; height: 166px; border: 2px solid #66d4ff; border-radius: 15px; box-shadow: 0 0 20px rgba(65, 193, 244, .28), inset 0 0 16px rgba(57, 176, 233, .1); }
.phone-camera { position: absolute; top: 8px; left: 50%; width: 25px; height: 3px; transform: translateX(-50%); border-radius: 4px; background: #4c9fd0; }
.phone-screen { position: absolute; inset: 24px 8px 18px; display: grid; align-content: center; gap: 9px; padding: 15px 9px; border: 1px solid rgba(86, 201, 248, .55); background: linear-gradient(135deg, rgba(53, 182, 235, .22), rgba(12, 45, 82, .15)); }
.phone-screen span { height: 2px; background: #5dcfff; box-shadow: 0 0 8px #5dcfff; }
.phone-screen span:nth-child(2) { width: 70%; }.phone-screen span:nth-child(3) { width: 46%; }
.phone-port { position: absolute; bottom: 6px; left: 50%; width: 22px; height: 3px; transform: translateX(-50%); background: #4c9fd0; border-radius: 3px; }
.scan-beam { position: absolute; z-index: 2; width: 150px; height: 1px; background: #95eaff; box-shadow: 0 0 12px 2px #42c7fc; animation: beam 2.4s ease-in-out infinite; }
@keyframes beam { 0%, 100% { transform: translateY(-75px); opacity: 0; } 18%, 82% { opacity: .85; } 50% { transform: translateY(75px); } }
.device-data { position: relative; z-index: 1; display: grid; gap: 14px; }
.data-row { display: grid; gap: 4px; }.data-row span { color: #478bb5; font: 9px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: 1.1px; }.data-row strong { min-width: 0; overflow: hidden; color: #c9ecff; font: 600 11px/1.2 "SFMono-Regular", Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.setup-progress-head { width: min(100%, 380px); display: flex; align-items: baseline; justify-content: space-between; margin: 0 auto 9px; color: #6a9ac0; font: 10px/1 "SFMono-Regular", Consolas, monospace; }.setup-progress-head strong { color: #71dcff; font-size: 18px; font-weight: 500; }
.setup-progress { width: min(100%, 380px); height: 3px; margin: 0 auto; background: #123450; overflow: hidden; }.setup-progress span { display: block; width: 0; height: 100%; background: #58d2ff; box-shadow: 0 0 12px #58d2ff; transition: width .5s ease; }
.setup-log { width: min(100%, 380px); min-height: 112px; margin: 22px auto 0; padding: 10px 0; border-top: 1px solid #173c5d; border-bottom: 1px solid #173c5d; overflow: hidden; }.setup-log div { display: grid; grid-template-columns: 1.15fr 1fr 26px; gap: 6px; padding: 5px 0; color: #5282a4; font: 9px/1 "SFMono-Regular", Consolas, monospace; }.setup-log div strong { color: #b9e5f8; font-weight: 500; }.setup-log div b { color: #5dd5ff; font-weight: 500; text-align: right; }.setup-log > span { color: #4c7898; font: 10px/1 "SFMono-Regular", Consolas, monospace; }
.core-console { position: relative; width: min(100%, 380px); min-height: 430px; margin: 22px auto 22px; padding: 14px; border: 1px solid rgba(95, 205, 255, .66); background: rgba(3, 16, 35, .84); box-shadow: inset 0 0 35px rgba(26, 120, 190, .13), 0 0 26px rgba(26, 135, 212, .12); overflow: hidden; }
.core-console::before, .core-console::after { content: ""; position: absolute; pointer-events: none; }
.core-console::before { inset: 8px; border: 1px solid rgba(94, 205, 255, .13); }
.core-console::after { left: 0; right: 0; top: 50%; height: 1px; background: rgba(85, 202, 255, .12); box-shadow: 0 0 16px rgba(85, 202, 255, .22); animation: core-scan 3.2s ease-in-out infinite; }
@keyframes core-scan { 0%, 100% { transform: translateY(-175px); opacity: .18; } 50% { transform: translateY(175px); opacity: .8; } }
.core-console-head { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 2px 12px; color: #589bc3; font: 9px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: 1.3px; border-bottom: 1px solid rgba(55, 132, 181, .35); }
.core-console-head b { color: #73e1ff; font-weight: 500; letter-spacing: 1px; }
.core-console:not(.is-loading) .core-console-head b { color: #9dffb5; }
.core-signal-strip { position: relative; z-index: 2; display: flex; align-items: center; gap: 7px; min-height: 22px; color: #477e9f; font: 7px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: 1px; border-bottom: 1px solid rgba(55, 132, 181, .22); }
.core-signal-strip span:nth-of-type(2) { color: #70c7e7; }
.core-signal-strip span:last-of-type { margin-left: auto; color: #60d6f7; }
.core-signal-strip i { width: 3px; height: 3px; border-radius: 50%; background: #4fcfff; box-shadow: 0 0 7px #4fcfff; animation: blink 1.1s ease-in-out infinite; }
.core-visual { position: relative; z-index: 1; height: 207px; display: grid; place-items: center; overflow: hidden; }
.core-grid { position: absolute; inset: 9%; opacity: .48; background-image: linear-gradient(rgba(64, 180, 239, .13) 1px, transparent 1px), linear-gradient(90deg, rgba(64, 180, 239, .13) 1px, transparent 1px); background-size: 20px 20px; mask-image: radial-gradient(circle, #000 0%, transparent 70%); }
.core-orbit { position: absolute; width: 190px; height: 190px; border: 1px solid rgba(88, 203, 255, .34); border-radius: 50%; transform: scaleY(.35) rotate(22deg); box-shadow: 0 0 24px rgba(50, 175, 240, .12); animation: core-orbit 7s linear infinite; }
.core-orbit-b { width: 154px; height: 154px; transform: scaleY(.35) rotate(-34deg); border-color: rgba(159, 233, 255, .27); animation-duration: 4.8s; animation-direction: reverse; }
@keyframes core-orbit { to { transform: scaleY(.35) rotate(382deg); } }
.core-node { position: relative; z-index: 2; width: 92px; height: 92px; display: grid; place-items: center; border: 1px solid #7ce1ff; transform: rotate(45deg); background: rgba(6, 46, 78, .62); box-shadow: 0 0 0 8px rgba(66, 191, 246, .06), 0 0 30px rgba(50, 177, 239, .36), inset 0 0 25px rgba(53, 185, 241, .18); animation: node-pulse 1.8s ease-in-out infinite; }
.core-node::before, .core-node::after { content: ""; position: absolute; background: #6edbff; opacity: .42; }
.core-node::before { width: 1px; height: 142px; }.core-node::after { width: 142px; height: 1px; }
.core-node span { transform: rotate(-45deg); color: #e5faff; font: 700 17px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: 1px; text-shadow: 0 0 12px #58d5ff; }
.core-node i { position: absolute; width: 8px; height: 8px; transform: rotate(-45deg); background: #ddfaff; box-shadow: 0 0 0 5px rgba(73, 210, 255, .1), 0 0 17px 4px #4fcfff; }
@keyframes node-pulse { 50% { box-shadow: 0 0 0 14px rgba(66, 191, 246, .03), 0 0 45px rgba(50, 177, 239, .55), inset 0 0 25px rgba(53, 185, 241, .24); } }
.core-ray { position: absolute; z-index: 1; width: 100px; height: 1px; background: linear-gradient(90deg, transparent, #6cdfff, transparent); transform-origin: center; opacity: .55; animation: ray-pulse 1.6s ease-in-out infinite; }
.ray-a { transform: rotate(0deg) translateX(98px); }.ray-b { transform: rotate(120deg) translateX(98px); animation-delay: .32s; }.ray-c { transform: rotate(240deg) translateX(98px); animation-delay: .64s; }
@keyframes ray-pulse { 50% { opacity: 1; width: 145px; box-shadow: 0 0 11px #5fd8ff; } }
.core-scan-line { position: absolute; z-index: 3; width: 170px; height: 1px; background: #d2f8ff; box-shadow: 0 0 13px 2px #4ccaff; animation: core-beam 2.1s ease-in-out infinite; }
@keyframes core-beam { 0%, 100% { transform: translateY(-73px); opacity: 0; } 18%, 82% { opacity: .9; } 50% { transform: translateY(73px); } }
.core-command-list { position: relative; z-index: 2; display: grid; gap: 5px; }
.core-command { display: grid; grid-template-columns: 86px minmax(0, 1fr) 42px; align-items: center; gap: 6px; min-height: 31px; padding: 0 7px; border: 1px solid rgba(44, 103, 144, .32); background: rgba(7, 32, 57, .62); color: #4b86a9; font: 8px/1 "SFMono-Regular", Consolas, monospace; transition: border-color .25s, background .25s, color .25s, box-shadow .25s; }
.core-command strong { min-width: 0; overflow: hidden; color: #8dbbd5; font-size: 9px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.core-command b { color: #4d85a6; font-weight: 500; text-align: right; }
.core-command.is-active { border-color: rgba(88, 209, 255, .7); background: rgba(11, 67, 103, .72); color: #89e4ff; box-shadow: inset 2px 0 #5ed8ff, 0 0 14px rgba(46, 165, 226, .12); }
.core-command.is-active strong { color: #e1f9ff; }.core-command.is-active b { color: #71e3ff; }
.core-log-line { display: grid; grid-template-columns: 86px minmax(0, 1fr) 48px; gap: 6px; padding: 5px 0; color: #4c85a5; font: 9px/1 "SFMono-Regular", Consolas, monospace; animation: log-in .35s ease both; }
.core-log-line strong { min-width: 0; overflow: hidden; color: #bde9fa; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }.core-log-line b { color: #63d8ff; font-weight: 500; text-align: right; }
@keyframes log-in { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: translateX(0); } }
.room-screen { justify-content: center; padding: 30px 8px 42px; }.room-hero { position: relative; text-align: center; }.room-hero h3 { font-size: 31px; }.room-symbol { position: relative; z-index: 1; width: 82px; height: 82px; display: grid; place-items: center; margin: 0 auto 23px; border: 1px solid #61d2ff; transform: rotate(45deg); color: #a5ebff; font-size: 37px; box-shadow: 0 0 0 10px rgba(60, 182, 238, .05), 0 0 30px rgba(41, 166, 234, .32); }.room-symbol::first-letter { transform: rotate(-45deg); }.room-bloom { position: absolute; left: 50%; top: 5px; width: 170px; height: 170px; transform: translateX(-50%); border-radius: 50%; background: rgba(41, 161, 230, .13); filter: blur(35px); }
.room-entry { width: min(100%, 360px); margin: 42px auto 0; }.room-input-shell { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 15px; background: rgba(4, 22, 43, .72); border: 1px solid #2e6e9e; }.room-input-shell:focus-within { border-color: #67d5ff; box-shadow: 0 0 0 3px rgba(70, 188, 239, .1); }.room-input { min-width: 0; flex: 1; height: 100%; border: 0; outline: 0; border-radius: 0; background: transparent; color: #e8f9ff; padding: 0; font: 700 18px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: 2px; }.room-input::placeholder { color: #376886; font-size: 14px; }.room-enter-button { margin-top: 14px; }.room-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: min(100%, 360px); margin: auto auto 0; color: #416e8d; font: 9px/1 "SFMono-Regular", Consolas, monospace; }.room-signal { display: flex; align-items: end; gap: 3px; height: 10px; }.room-signal i { display: block; width: 3px; background: #4cc8f4; }.room-signal i:nth-child(1) { height: 3px; }.room-signal i:nth-child(2) { height: 6px; }.room-signal i:nth-child(3) { height: 8px; }.room-signal i:nth-child(4) { height: 10px; }
.viewer-screen { padding: 30px 0 10px; min-height: calc(100svh - 92px); }.viewer-screen .watch-header { margin-bottom: 15px; }.viewer-title h3 { margin: 7px 0 0; color: #f5fbff; font-size: 22px; }.viewer-exit { width: 32px; height: 32px; border: 1px solid #28587d; background: rgba(8, 36, 64, .65); color: #8db9d8; font-size: 21px; cursor: pointer; }.viewer-screen .viewer-stage { width: 100%; min-height: 0; aspect-ratio: 1 / 1.08; border-radius: 5px; border-color: #245b91; box-shadow: inset 0 0 44px rgba(22, 104, 180, .1), 0 16px 36px rgba(0, 0, 0, .28); }.viewer-screen .viewer-overlay-card { width: min(92%, 360px); min-height: 245px; }.viewer-screen .tile-card { flex-basis: 44px; height: auto; aspect-ratio: 121 / 186; font-size: 20px; }.viewer-bottom-bar { display: none !important; }
.app-footer { display: none; }




.a-login-field-pwd { position: relative; }
.a-login-field-pwd input { padding-right: 62px; }
.a-login-eye { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); border: 0; background: rgba(70,188,239,.14); color: #8ed6ff; font: 700 11px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: 1px; padding: 6px 10px; border-radius: 6px; cursor: pointer; }
.a-login-eye:hover { background: rgba(70,188,239,.26); color: #e8f9ff; }
