/* ==========================================================================
   R2.4 REAL-WORLD SCENARIOS (#scenarios)
   Quick Step-Away Moments (Minutes) vs. Extended Deep-Work Sessions (Hours)
   ========================================================================== */

#scenarios.ch-chapter .gest-stack-wrap {
  gap: clamp(14px, 1.9vh, 22px);
}

#scenarios .intro.is-gestures-intro {
  max-width: min(1220px, 100%);
}

/* ---------- Dual-Rhythm Track Deck ---------- */
.scenes-deck {
  width: 100%;
  margin-top: clamp(10px, 1.4vh, 16px);
}

.scenes-tracks {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 12px 16px;
}

.scenes-track {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 18px 12px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .036), rgba(255, 255, 255, .016));
  border: 1px solid rgba(210, 228, 248, .11);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
  transition: border-color .24s ease, background .24s ease, box-shadow .24s ease;
}

.scenes-track[data-rhythm="quick"].is-lit {
  border-color: rgba(255, 186, 112, .36);
  background: linear-gradient(180deg, rgba(255, 182, 108, .065), rgba(88, 219, 236, .025));
  box-shadow: inset 0 1px 0 rgba(255, 224, 186, .18), 0 10px 28px rgba(0, 0, 0, .24);
}

.scenes-track[data-rhythm="deep"].is-lit {
  border-color: rgba(115, 180, 255, .4);
  background: linear-gradient(180deg, rgba(108, 174, 255, .075), rgba(112, 234, 176, .025));
  box-shadow: inset 0 1px 0 rgba(196, 226, 255, .2), 0 10px 28px rgba(0, 0, 0, .24);
}

.scenes-track-head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 560 12px/1.2 var(--ui, -apple-system, BlinkMacSystemFont, sans-serif);
  letter-spacing: -.01em;
  color: #cfd9e6;
}

.scenes-track-head .st-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6f7d90;
  transition: background .22s ease, box-shadow .22s ease;
}

.scenes-track[data-rhythm="quick"].is-lit .st-dot {
  background: #ffba70;
  box-shadow: 0 0 9px rgba(255, 186, 112, .75);
}

.scenes-track[data-rhythm="deep"].is-lit .st-dot {
  background: #73b4ff;
  box-shadow: 0 0 9px rgba(115, 180, 255, .75);
}

.scenes-track-head b {
  font-weight: 620;
  color: #eff4fb;
}

.scenes-track-head small {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .065);
  border: 1px solid rgba(214, 230, 250, .12);
  color: #9fb0c4;
  font-size: 11px;
  font-weight: 520;
  white-space: nowrap;
}

.scenes-track .type-line {
  column-gap: clamp(14px, 1.5vw, 24px);
  row-gap: 10px;
  justify-content: center;
}

.scenes-deck .type-word .type-ink {
  font-size: clamp(16.5px, 1.38vw, 21px) !important;
}

html[lang="en-US"] .scenes-deck .type-word .type-ink {
  font-size: clamp(15px, 1.24vw, 19px) !important;
}

/* ---------- Connected Two-Place Stage ---------- */
.scenes-stage {
  width: min(1220px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 14px;
}

/* Top Spatial Context Bar */
.scenes-context-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(28, 35, 48, .78), rgba(18, 23, 32, .84));
  border: 1px solid rgba(212, 230, 252, .14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 12px 28px rgba(0, 0, 0, .26);
  backdrop-filter: blur(22px) saturate(175%);
  -webkit-backdrop-filter: blur(22px) saturate(175%);
}

.sc-place {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.sc-place.is-hand {
  justify-self: end;
  text-align: right;
  flex-direction: row-reverse;
}

.sc-place-ico {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  flex: none;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .065);
  border: 1px solid rgba(214, 232, 255, .15);
  color: #cde3ff;
}

.sc-place-ico svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sc-place-txt {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.sc-place-txt small {
  font: 540 11px/1.2 var(--ui, -apple-system, sans-serif);
  color: #8b9bb0;
  letter-spacing: .01em;
}

.sc-place-txt strong {
  font: 590 13px/1.28 var(--ui, -apple-system, sans-serif);
  color: #eef3fa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sc-bridge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(206, 228, 255, .18);
  white-space: nowrap;
}

.sc-bridge-dots {
  display: inline-flex;
  gap: 3.5px;
  align-items: center;
}

.sc-bridge-dots i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #7cc0ff;
  opacity: .35;
  animation: sc-pulse 1.5s ease-in-out infinite;
}

.sc-bridge-dots i:nth-child(2) { animation-delay: .22s; }
.sc-bridge-dots i:nth-child(3) { animation-delay: .44s; }
.sc-bridge-dots i:nth-child(4) { animation-delay: .66s; }

@keyframes sc-pulse {
  50% { opacity: 1; transform: scale(1.25); }
}

@media (prefers-reduced-motion: reduce) {
  .sc-bridge-dots i { animation: none; opacity: .75; }
}

.sc-rhythm-badge {
  font: 610 11.5px/1.2 var(--ui, -apple-system, sans-serif);
  color: #dbedff;
  letter-spacing: -.01em;
}

.scenes-stage[data-rhythm="quick"] .sc-rhythm-badge {
  color: #ffd8a8;
}

.scenes-stage[data-rhythm="quick"] .sc-bridge-dots i {
  background: #ffba70;
}

/* ---------- Hardware Arena ---------- */
.scenes-arena {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, .98fr);
  align-items: center;
  gap: clamp(18px, 2.6vw, 36px);
  min-height: clamp(360px, 43vh, 446px);
  padding: 6px 0;
}

/* Left Remote Mac Display (no outer box/hood — pure crisp display) */
.scenes-mac-wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  transition: transform .34s cubic-bezier(.22, 1, .36, 1);
}

@media (min-width: 1081px) {
  .scenes-arena {
    gap: 0;
  }
  .scenes-hand-wrap {
    z-index: 3;
    margin-left: -34px;
    transform: translateY(10px);
    pointer-events: none;
  }
  .scenes-stage[data-client="phone-portrait"] .sc-client-slot[data-slot="phone-portrait"],
  .scenes-stage[data-client="phone-landscape"] .sc-client-slot[data-slot="phone-landscape"],
  .scenes-stage[data-client="ipad-pro"] .sc-client-slot[data-slot="ipad-pro"],
  .scenes-stage[data-client="mac-viewer"] .sc-client-slot[data-slot="mac-viewer"] {
    pointer-events: none;
  }
  .sc-client-slot[data-slot="phone-portrait"] {
    justify-items: start;
  }
  .scenes-stage[data-client="phone-portrait"] .sc-client-slot[data-slot="phone-portrait"] > *,
  .scenes-stage[data-client="phone-landscape"] .sc-client-slot[data-slot="phone-landscape"] > *,
  .scenes-stage[data-client="ipad-pro"] .sc-client-slot[data-slot="ipad-pro"] > *,
  .scenes-stage[data-client="mac-viewer"] .sc-client-slot[data-slot="mac-viewer"] > * {
    pointer-events: auto;
    transition: transform .34s cubic-bezier(.22, 1, .36, 1);
  }
  .scenes-mac-wrap:hover {
    z-index: 6;
    transform: translateY(-4px) scale(1.006);
  }
  .scenes-hand-wrap:has(> .sc-client-slot > *:hover) {
    z-index: 6;
  }
  .sc-client-slot > *:hover {
    transform: translateY(-6px) scale(1.012);
  }
}

.scenes-mac-wrap > .ch-mac-screen {
  border-radius: 12px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, .55), 0 0 0 1px rgba(220, 236, 255, .16);
}

.sc-mac-chip {
  position: absolute;
  left: 12px;
  bottom: 56px;
  z-index: 12;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(18, 23, 32, .86);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(214, 232, 255, .2);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .14);
  font: 560 11.5px/1.2 var(--ui, -apple-system, sans-serif);
  color: #e9f1fb;
  pointer-events: none;
}

.sc-mac-chip i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px rgba(52, 211, 153, .65);
}

/* Interactive Codex Approval Banner during Coffee Run */
.sc-codex-prompt {
  position: absolute;
  right: 12px;
  bottom: 56px;
  z-index: 14;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 9px 7px 13px;
  border-radius: 14px;
  background: rgba(24, 30, 42, .92);
  backdrop-filter: blur(22px) saturate(185%);
  -webkit-backdrop-filter: blur(22px) saturate(185%);
  border: 1px solid rgba(255, 192, 118, .38);
  box-shadow: 0 14px 32px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .16);
  font: 550 12px/1.25 var(--ui, -apple-system, sans-serif);
  color: #f1f5fb;
  transition: border-color .22s ease, background .22s ease;
}

.sc-codex-prompt[hidden] {
  display: none !important;
}

.sc-codex-prompt.is-approved {
  border-color: rgba(82, 224, 164, .48);
  background: rgba(18, 36, 31, .92);
}

.sc-codex-prompt button {
  padding: 5px 11px;
  border-radius: 9px;
  background: linear-gradient(180deg, #4b8bff, #2d68e0);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .32), 0 2px 8px rgba(24, 72, 180, .4);
  color: #fff;
  font: 610 11.5px/1.2 var(--ui, -apple-system, sans-serif);
  white-space: nowrap;
  cursor: pointer;
  transition: transform .14s ease, background .2s ease;
}

.sc-codex-prompt button:hover {
  transform: translateY(-1px);
}

.sc-codex-prompt.is-approved button {
  background: rgba(52, 211, 153, .22);
  border: 1px solid rgba(82, 224, 164, .45);
  box-shadow: none;
  color: #9ef5cc;
}

/* ---------- Right Client Hardware Slots ---------- */
.scenes-hand-wrap {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 390px;
}

.sc-client-slot {
  grid-area: 1 / 1;
  width: 100%;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: translateY(8px) scale(.985);
  pointer-events: none;
  visibility: hidden;
  transition: opacity .28s ease, transform .32s cubic-bezier(.2, .85, .24, 1), visibility 0s linear .28s;
}

.scenes-stage[data-client="phone-portrait"] .sc-client-slot[data-slot="phone-portrait"],
.scenes-stage[data-client="phone-landscape"] .sc-client-slot[data-slot="phone-landscape"],
.scenes-stage[data-client="ipad-pro"] .sc-client-slot[data-slot="ipad-pro"],
.scenes-stage[data-client="mac-viewer"] .sc-client-slot[data-slot="mac-viewer"] {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  visibility: visible;
  transition-delay: 0s;
}

/* 1. Portrait iPhone Air */
.sc-client-slot[data-slot="phone-portrait"] .ch-phone {
  --pw: clamp(228px, 19.2vw, 258px);
}

/* Native Terminal inside Portrait Phone (Scene 5: Overnight — 1:1 RemoteTerminalView.swift #1D1D1D) */
.sc-ph-term {
  position: absolute;
  inset: 60px 0 20px;
  display: flex;
  flex-direction: column;
  padding: 12px 15px 12px;
  gap: 10px;
  background: #1d1d1d;
  border-top: 1px solid rgba(255, 255, 255, .1);
  border-radius: 30px 30px 0 0;
  color: #edf2f8;
}

.sc-ph-term-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sc-ph-term-top b {
  font: 650 20px/1.15 -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: -.02em;
}

.sc-ph-catchup {
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(52, 211, 153, .14);
  border: 1px solid rgba(52, 211, 153, .34);
  color: #7ef2bd;
  font: 580 11.5px/1.2 -apple-system, sans-serif;
  white-space: nowrap;
}

.sc-ph-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.sc-ph-tabs button {
  height: 32px;
  padding: 0 4px;
  border-radius: 10px;
  background: #181b22;
  border: 1px solid rgba(255, 255, 255, .09);
  color: #a4b0c0;
  font: 580 11px/1 ui-monospace, SFMono-Regular, monospace;
  white-space: nowrap;
  cursor: pointer;
}

.sc-ph-tabs button.on {
  background: rgba(64, 130, 236, .24);
  border-color: rgba(132, 188, 255, .48);
  color: #fff;
}

.sc-ph-term-out {
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: 13px 14px;
  border-radius: 16px;
  background: #12151c;
  border: 1px solid rgba(255, 255, 255, .08);
  font: 460 13px/1.56 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #dce6f4;
  white-space: pre-wrap;
  overflow: auto;
}

.sc-ph-term-out .g { color: #5eead4; }
.sc-ph-term-out .m { color: #93c5fd; }
.sc-ph-term-out .d { color: #8392a7; }

.sc-ph-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sc-ph-chips button {
  height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(208, 228, 255, .18);
  color: #dfecfc;
  font: 560 12px/1 ui-monospace, SFMono-Regular, monospace;
  cursor: pointer;
}

.sc-ph-chips button:hover {
  background: rgba(114, 180, 255, .22);
  color: #fff;
}

/* Native PiP + Chat inside Portrait Phone (Scene 3: Transit & Couch) */
.sc-ph-chat {
  position: absolute;
  inset: 56px 0 20px;
  display: flex;
  flex-direction: column;
  background: #000;
}

.sc-chat-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 18px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
}

.sc-chat-hdr b {
  font: 610 16px/1.2 -apple-system, sans-serif;
  color: #f5f6fa;
}

.sc-chat-hdr small {
  display: block;
  font: 450 12px/1.2 -apple-system, sans-serif;
  color: #8e95a2;
  margin-top: 2px;
}

.sc-chat-body {
  flex: 1;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

.sc-bub {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 18px;
  font: 440 14.5px/1.4 -apple-system, "PingFang SC", sans-serif;
}

.sc-bub.in {
  align-self: flex-start;
  background: #262629;
  color: #f2f2f7;
  border-bottom-left-radius: 6px;
}

.sc-bub.out {
  align-self: flex-end;
  background: #0a84ff;
  color: #fff;
  border-bottom-right-radius: 6px;
}

.sc-pip-float {
  position: absolute;
  right: 14px;
  bottom: 72px;
  width: 224px;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  overflow: hidden;
  background: #10151f;
  border: 1.2px solid rgba(224, 238, 255, .36);
  box-shadow: 0 18px 38px rgba(0, 0, 0, .68), inset 0 1px 0 rgba(255, 255, 255, .22);
  cursor: grab;
  touch-action: none;
  z-index: 15;
  transition: left .24s ease, right .24s ease, top .24s ease, bottom .24s ease, transform .2s ease;
}

.sc-pip-float:active {
  cursor: grabbing;
  transform: scale(1.03);
}

.sc-pip-float .ch-mac-screen {
  position: absolute;
  inset: 0;
  border-radius: 0;
}

.sc-pip-tag {
  position: absolute;
  left: 7px;
  bottom: 6px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(14, 18, 26, .86);
  border: 1px solid rgba(255, 255, 255, .18);
  font: 580 10.5px/1.1 -apple-system, sans-serif;
  color: #eef4fc;
}

.sc-pip-tag i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #30d158;
}

.sc-chat-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 12px;
}

.sc-chat-form input {
  flex: 1;
  height: 36px;
  padding: 0 13px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .18);
  background: #18191d;
  color: #fff;
  font: 440 14px/1 -apple-system, sans-serif;
  outline: none;
}

.sc-chat-form button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #0a84ff;
  color: #fff;
  font: 700 15px/1 -apple-system, sans-serif;
  display: grid;
  place-items: center;
}

/* 2. Genuine Apple DeviceKit Landscape iPhone Air (Scene 2: Hotel & Beach — 1:1 air-shell-landscape.webp 943×451) */
.sc-land-phone {
  position: relative;
  isolation: isolate;
  width: min(100%, 516px);
  aspect-ratio: 943 / 451;
  background: url("assets/air-shell-landscape.webp") center / 100% 100% no-repeat;
  filter: drop-shadow(0 28px 54px rgba(0, 0, 0, .64));
}

.sc-land-screen {
  position: absolute;
  inset: 3.4368% 1.6437%;
  width: auto;
  height: auto;
  border-radius: 0;
  overflow: hidden;
  background: linear-gradient(90deg, rgba(10, 15, 26, .68) 0%, rgba(10, 15, 26, .28) 12%, rgba(10, 15, 26, .28) 88%, rgba(10, 15, 26, .68) 100%), #0d1320 url("assets/sequoia-desktop.webp") center / cover no-repeat;
  -webkit-mask: url("assets/air-display-landscape.svg") center / 100% 100% no-repeat;
  mask: url("assets/air-display-landscape.svg") center / 100% 100% no-repeat;
  z-index: 2;
  display: grid;
  place-items: center;
}

.sc-land-island {
  position: absolute;
  left: 1.35%;
  top: 50%;
  width: 4.12%;
  height: 30.2%;
  transform: translateY(-50%);
  border-radius: 999px;
  background: #000;
  box-shadow: none;
  z-index: 8;
  pointer-events: none;
}

.sc-land-desk {
  position: relative;
  height: 100%;
  aspect-ratio: 16 / 10;
  max-width: calc(100% - 64px);
  overflow: hidden;
  cursor: crosshair;
  box-shadow: 0 0 28px rgba(0, 0, 0, .42);
}

.sc-land-desk > .ch-mac-screen {
  width: 100%;
  height: 100%;
  border-radius: 0;
}

.sc-land-tl {
  position: absolute;
  left: 6.2%;
  top: 10px;
  z-index: 9;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sc-land-disc {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(28, 33, 43, .76);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, .22);
  color: #f2f6fc;
}

.sc-land-disc svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sc-land-vc {
  display: inline-flex;
  padding: 2px;
  border-radius: 999px;
  background: rgba(24, 28, 38, .8);
  border: 1px solid rgba(255, 255, 255, .2);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.sc-land-vc span {
  padding: 3px 8px;
  border-radius: 999px;
  font: 580 10px/1.1 var(--ui, -apple-system, sans-serif);
  color: #9aa7b8;
}

.sc-land-vc span.on {
  background: linear-gradient(180deg, #4b79c4, #325898);
  color: #fff;
}

.sc-land-rail {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9;
  display: grid;
  gap: 5px;
  padding: 5px 4px;
  border-radius: 999px;
  background: rgba(34, 40, 52, .76);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, .22);
}

.sc-land-rail i {
  width: 23px;
  height: 23px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #eef3fb;
}

.sc-land-rail i.on {
  background: rgba(82, 138, 226, .48);
  box-shadow: inset 0 0 0 1px rgba(182, 218, 255, .6);
}

.sc-land-rail svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sc-beach-pull {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(18, 30, 44, .9);
  backdrop-filter: blur(20px) saturate(185%);
  -webkit-backdrop-filter: blur(20px) saturate(185%);
  border: 1px solid rgba(114, 218, 255, .44);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .18);
  color: #dff4ff;
  font: 590 11px/1.2 var(--ui, -apple-system, sans-serif);
  white-space: nowrap;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
}

.sc-beach-pull:hover {
  background: rgba(32, 56, 82, .94);
  border-color: rgba(146, 230, 255, .7);
}

.sc-beach-pull.is-done {
  border-color: rgba(82, 224, 164, .55);
  color: #a4f7cf;
}

/* 3. Genuine Apple DeviceKit 13-inch iPad Pro M4 (Scene 4: All-Day Café Workstation — 1840×1410) */
.sc-ipad-frame {
  position: relative;
  isolation: isolate;
  width: min(100%, 508px);
  aspect-ratio: 184 / 141;
  padding: 0;
  border-radius: 0;
  background: url("assets/ipad-pro13-shell-landscape.webp") center / 100% 100% no-repeat;
  box-shadow: none;
  filter: drop-shadow(0 30px 64px rgba(0, 0, 0, .68)) drop-shadow(0 6px 18px rgba(0, 0, 0, .46));
}

.sc-ipad-screen {
  position: absolute;
  inset: 4.4326% 3.125% 4.078% 3.3967%;
  width: auto;
  height: auto;
  border-radius: 0;
  overflow: hidden;
  background: #05070b;
  box-shadow: none;
  -webkit-mask: url("assets/ipad-pro13-display-landscape.svg") center / 100% 100% no-repeat;
  mask: url("assets/ipad-pro13-display-landscape.svg") center / 100% 100% no-repeat;
  z-index: 2;
  display: flex;
  flex-direction: column;
}

.sc-ipad-status {
  height: 20px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 13, 19, .92);
  font: 580 9.5px/1 -apple-system, BlinkMacSystemFont, sans-serif;
  color: rgba(242, 246, 252, .82);
  flex: none;
}

.sc-ipad-canvas {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.sc-ipad-canvas > .ch-mac-screen {
  width: 100%;
  height: 100%;
  border-radius: 0;
}

.sc-ipad-kbd-pill {
  position: absolute;
  right: 10px;
  top: 8px;
  z-index: 9;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(19, 25, 36, .88);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(154, 204, 255, .32);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .45);
  font: 570 10px/1.2 var(--ui, -apple-system, sans-serif);
  color: #dcecff;
  white-space: nowrap;
}

.sc-ipad-br {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 9;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.sc-ipad-frame.is-tucked .sc-ipad-rail {
  opacity: 0;
  transform: translateX(8px) scale(.92);
  pointer-events: none;
}

.sc-ipad-rail {
  display: inline-flex;
  gap: 3px;
  padding: 3px 5px;
  border-radius: 999px;
  background: rgba(32, 38, 50, .82);
  border: 1px solid rgba(255, 255, 255, .2);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: opacity .2s ease, transform .22s ease;
}

.sc-ipad-rail span {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #eef4fc;
}

.sc-ipad-rail span.on {
  background: rgba(82, 138, 226, .48);
}

.sc-ipad-rail svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

/* 4. Native macOS RemoteMacViewerWindow (Scene 6: Multi-Mac Studio Desk — Unified .darkAqua Smoked Glass) */
.sc-viewer-win {
  position: relative;
  width: min(100%, 508px);
  border-radius: 14px;
  overflow: hidden;
  background: #14171f;
  border: 1px solid rgba(214, 232, 255, .2);
  box-shadow: 0 30px 66px rgba(0, 0, 0, .64), inset 0 1px 0 rgba(255, 255, 255, .16);
}

.sc-viewer-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: linear-gradient(180deg, rgba(38, 43, 55, .96), rgba(24, 28, 37, .98));
  border-bottom: 1px solid rgba(255, 255, 255, .09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}

.sc-viewer-dots {
  display: inline-flex;
  gap: 6px;
  flex: none;
}

.sc-viewer-dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ff5f57;
  box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .28);
}

.sc-viewer-dots i:nth-child(2) { background: #febc2e; }
.sc-viewer-dots i:nth-child(3) { background: #28c840; }

.sc-viewer-hosts {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px;
  border-radius: 8px;
  background: rgba(0, 0, 0, .28);
  border: 1px solid rgba(255, 255, 255, .09);
  margin-inline: auto;
}

.sc-viewer-hosts button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 6px;
  font: 570 11px/1 var(--ui, -apple-system, sans-serif);
  color: #aeb8c6;
  white-space: nowrap;
  cursor: pointer;
  transition: background .16s ease, color .16s ease;
}

.sc-viewer-hosts button i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #677282;
}

.sc-viewer-hosts button.on {
  background: rgba(255, 255, 255, .14);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14);
}

.sc-viewer-hosts button.on i {
  background: #34d399;
  box-shadow: 0 0 6px rgba(52, 211, 153, .7);
}

.sc-viewer-cmd {
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(116, 182, 255, .16);
  border: 1px solid rgba(144, 200, 255, .32);
  color: #d6eaff;
  font: 600 10.5px/1 var(--ui, -apple-system, sans-serif);
  white-space: nowrap;
  cursor: pointer;
}

.sc-viewer-cmd[aria-pressed="false"] {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .12);
  color: #9aa6b6;
}

.sc-viewer-body {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #0d1118;
}

.sc-viewer-body > .ch-mac-screen {
  width: 100%;
  height: 100%;
  border-radius: 0;
}

/* ---------- Global Everyday Vignettes Strip ---------- */
.scenes-vignettes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.sc-vig {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 14px 16px 15px;
  border-radius: 16px;
  text-align: left;
  background: linear-gradient(180deg, rgba(255, 255, 255, .034), rgba(255, 255, 255, .016));
  border: 1px solid rgba(210, 228, 248, .1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.sc-vig:hover {
  border-color: rgba(210, 228, 248, .24);
  background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .024));
}

.sc-vig.is-on {
  border-color: rgba(132, 194, 255, .42);
  background: linear-gradient(180deg, rgba(96, 162, 248, .09), rgba(255, 255, 255, .022));
  box-shadow: inset 0 1px 0 rgba(196, 226, 255, .18), 0 8px 24px rgba(0, 0, 0, .24);
}

.scenes-stage[data-rhythm="quick"] .sc-vig.is-on {
  border-color: rgba(255, 190, 120, .42);
  background: linear-gradient(180deg, rgba(255, 178, 102, .085), rgba(255, 255, 255, .022));
}

.sc-vig-meta {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sc-vig-place {
  font: 560 11px/1.2 var(--ui, -apple-system, sans-serif);
  color: #88a4c4;
  letter-spacing: .01em;
}

.scenes-stage[data-rhythm="quick"] .sc-vig.is-on .sc-vig-place {
  color: #ffca8a;
}

.sc-vig-time {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  font: 580 10.5px/1.2 ui-monospace, SFMono-Regular, monospace;
  color: #9baab9;
  white-space: nowrap;
}

.sc-vig strong {
  font: 610 14.5px/1.3 var(--ui, -apple-system, sans-serif);
  color: #f1f5fb;
  letter-spacing: -.015em;
}

.sc-vig p {
  margin: 0;
  font: 430 13px/1.55 var(--ui, -apple-system, sans-serif);
  color: #9aa8b8;
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .scenes-arena {
    grid-template-columns: 1fr;
    justify-items: center;
    min-height: 0;
    gap: 20px;
  }
  .scenes-mac-wrap {
    max-width: 680px;
  }
  .scenes-hand-wrap {
    min-height: 0;
  }
}

@media (max-width: 860px) {
  .scenes-context-bar {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 11px 14px;
  }
  .sc-place.is-hand {
    justify-self: start;
    text-align: left;
    flex-direction: row;
  }
  .sc-bridge {
    justify-self: start;
  }
  .scenes-vignettes {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

@media (max-width: 760px) {
  .scenes-track {
    width: 100%;
    padding: 9px 12px 11px;
  }
  .scenes-track .type-line {
    flex-wrap: wrap;
    column-gap: 14px;
    row-gap: 8px;
  }
  .sc-place-txt strong {
    white-space: normal;
    font-size: 12.5px;
  }
  .sc-codex-prompt {
    left: 8px;
    right: 8px;
    bottom: 38px;
    justify-content: space-between;
    font-size: 10.5px;
    padding: 6px 8px 6px 11px;
  }
  .sc-mac-chip {
    bottom: 38px;
    top: auto;
    left: 8px;
    font-size: 10px;
    padding: 4px 9px;
  }
  .scenes-mac-wrap:has(.sc-codex-prompt:not([hidden])) .sc-mac-chip {
    bottom: auto;
    top: 26px;
    left: auto;
    right: 8px;
  }
  .sc-client-slot[data-slot="phone-portrait"] .ch-phone {
    --pw: 248px;
  }
  .sc-ipad-kbd-pill {
    display: none;
  }
  .sc-beach-pull {
    font-size: 10px;
    padding: 5px 10px;
    bottom: 8px;
  }
  .sc-viewer-hosts button {
    padding: 4px 7px;
    font-size: 10px;
  }
}
