:root { font-family:var(--hs-font-ui); color:#171717; background:#f6f6f6; --welcome-ease:var(--hs-ease); }
* { box-sizing:border-box; }
html { -webkit-tap-highlight-color:transparent; -webkit-text-size-adjust:100%; overscroll-behavior:none; }
body { margin:0; -webkit-font-smoothing:antialiased; }
[hidden] { display:none!important; }
button,a { -webkit-touch-callout:none; touch-action:manipulation; }
button { color:inherit; font:inherit; cursor:pointer; user-select:none; -webkit-user-select:none; }
a { color:inherit; }
button:focus-visible,a:focus-visible,[tabindex]:focus-visible { outline:2px solid #246bfe; outline-offset:4px; }
.studio-bar { height:76px; padding:16px 24px; display:flex; align-items:center; justify-content:space-between; }
.toolbar { display:flex; align-items:center; gap:8px; }
.brand-chip { display:grid; place-items:center; width:44px; height:44px; }
.brand-chip img { border-radius:14px; }
.quiet { border:1px solid #ffffffb0; background:var(--hs-glass-fill); box-shadow:var(--hs-shadow-raised); border-radius:999px; min-width:44px; min-height:44px; display:grid; place-items:center; }
.quiet:active { background:#e7e7e7; }
.workspace { height:calc(100dvh - 160px); min-height:480px; padding:0 24px; }
.preview { display:grid; place-items:center; min-width:0; height:100%; }
.device-wrap { position:relative; flex:none; width:422px; height:894px; }
.phone { background:#f6f6f6; }
.onboarding { --welcome-skip-space:0px; position:absolute; inset:0; background:#f6f6f6; overflow:hidden; }
.skip { display:none; align-items:center; justify-content:center; width:max-content; min-width:44px; margin:4px auto 0; padding:12px 10px; font-size:15px; line-height:20px; min-height:44px; color:#626262; text-decoration:none; }
html[data-welcome-skip=visible] .onboarding { --welcome-skip-space:48px; }
html[data-welcome-skip=visible] .welcome-footer .skip { display:flex; }
.slide-stage { position:absolute; top:78px; left:0; right:0; bottom:calc(158px + var(--welcome-skip-space)); touch-action:pan-y pinch-zoom; outline-offset:-6px!important; }
.slide-track { display:flex; width:100%; height:100%; will-change:transform; }
.slide { flex:0 0 100%; width:100%; min-width:0; height:100%; overflow:hidden; position:relative; }
/* Match Gmail, Import assistant, and Passkey at every preview size. */
.slide h1 { margin:0; font:500 25px/1.25 var(--hs-font-ui); letter-spacing:-.48px; text-wrap:balance; outline:none; }
.body-copy { margin:0; font:400 17px/1.32 var(--hs-font-ui); color:#666; letter-spacing:-.2px; text-wrap:pretty; }
.film { position:relative; margin:0; min-width:0; min-height:0; background:var(--film-canvas,#f6f6f6); border-radius:28px; isolation:isolate; overflow:hidden; box-shadow:0 1px 2px #00000005,0 8px 22px -16px #00000028; }
.film::after { content:''; position:absolute; inset:0; z-index:2; pointer-events:none; border-radius:inherit; border:1px solid #0000000a; box-shadow:inset 0 1px 0 #ffffff99; }
/* Show the complete authored square or portrait frame. Never crop the source. */
.film video,.film-fallback { position:absolute; top:var(--film-inset-top,0px); left:var(--film-inset-inline,0px); width:calc(100% - 2 * var(--film-inset-inline,0px)); height:calc(100% - var(--film-inset-top,0px)); display:block; object-fit:contain; object-position:50% 50%; transform:none; }
.film-fallback { z-index:1; }
.film-toggle { position:absolute; z-index:3; right:6px; bottom:6px; width:44px; height:44px; display:grid; place-items:center; border:0; padding:0; border-radius:50%; color:#5c5c5c; background:transparent; }
.film-toggle::before { content:''; position:absolute; inset:7px; border-radius:50%; background:#ffffffc9; border:1px solid #ffffffb3; box-shadow:0 1px 3px #0000000c; }
.film-toggle svg { position:relative; }
.film-toggle[data-playing=true] .film-play,.film-toggle[data-playing=false] .film-pause { display:none; }
.film-toggle:disabled { display:none; }
.welcome-footer { position:absolute; z-index:5; left:50px; right:50px; bottom:38px; }
.progress-row { display:flex; align-items:center; justify-content:center; height:44px; margin-bottom:13px; }
.slide-dots { display:flex; align-items:center; gap:0; }
.slide-dots button { display:grid; place-items:center; width:18px; height:44px; padding:0; border:0; border-radius:10px; background:transparent; }
.slide-dots button[aria-current=true] { width:30px; }
.slide-dots button::after { content:''; height:5px; width:5px; border-radius:8px; background:#b9b9b9; }
.slide-dots button[aria-current=true]::after { width:22px; background:#171717; }
.slide-dots button[data-continuation=true]:not([aria-current=true])::after { width:3px; height:3px; }
.primary { position:relative; display:flex; align-items:center; justify-content:center; width:100%; max-width:300px; margin-inline:auto; height:52px; border-radius:999px; border:1px solid #171717; color:#fff; font:500 15px var(--hs-font-ui); text-decoration:none; background:var(--hs-dark-face); box-shadow:var(--hs-dark-shadow); }
.primary:active { background:var(--hs-dark-pressed); }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }

/* Editorial: an open canvas with the shared onboarding type hierarchy. */
.editorial-layout { height:100%; display:grid; grid-template-rows:minmax(0,1fr) auto; gap:25px; padding:8px 34px 12px; text-align:center; }
.editorial-layout .film { width:100%; height:100%; align-self:start; }
.editorial-copy .body-copy { margin-top:15px; }

/* Cinema: a dark viewing room gives the real launch footage the first word. */
.onboarding[data-direction=cinema] { color:#fff; background:radial-gradient(ellipse at 50% 34%,#343434 0,#171717 60%,#111); }
.screen:has([data-direction=cinema]) .phone-status { color:#fff; }
.screen:has([data-direction=cinema]) .home-indicator { background:#eee; }
[data-direction=cinema] .skip { color:#c5c5c5; }
.cinema-layout { height:100%; display:grid; grid-template-rows:minmax(0,1fr) auto; gap:25px; padding:8px 34px 12px; }
.cinema-stage { min-height:0; position:relative; display:grid; }
.cinema-stage .film { align-self:start; height:100%; box-shadow:0 12px 28px -16px #0009; }
.cinema-stage .film::after { border-color:#ffffff24; }
.cinema-copy { text-align:center; }
.cinema-copy .body-copy { color:#bfbfbf; margin-top:15px; }
[data-direction=cinema] .slide-dots button::after { background:#666; }
[data-direction=cinema] .slide-dots button[aria-current=true]::after { background:#fff; }
[data-direction=cinema] .primary { border-color:#ffffff1f; }

/* Cards: a small deck, with the film and explanation on the same object. */
.cards-layout { position:relative; height:100%; padding:10px 27px 15px; }
.story-card { position:relative; z-index:2; height:100%; display:grid; grid-template-rows:minmax(0,1fr) auto; background:linear-gradient(145deg,#fff,#fafafa); border:1px solid #fff; border-radius:34px; overflow:hidden; box-shadow:0 6px 8px -5px #00000010,0 18px 30px -16px #00000028; }
.story-card .film { margin:10px 10px 0; border-radius:24px; box-shadow:none; }
.card-copy { padding:24px 23px 29px; }
.card-copy .body-copy { margin-top:15px; }
.card-shadow { position:absolute; top:24px; left:22px; right:22px; bottom:20px; background:linear-gradient(130deg,#fff,#ebebeb); border:1px solid #fff; border-radius:34px; transform:rotate(3deg); box-shadow:0 8px 20px #00000008; }
.card-shadow-back { top:33px; transform:rotate(-3deg); background:#e9e9e9; }

/* Conversation: the same content hierarchy in a quiet message-shaped card. */
.conversation-layout { height:100%; padding:8px 28px 12px; }
.message-card { display:grid; grid-template-rows:minmax(0,1fr) auto; height:100%; min-height:0; width:100%; border:1px solid #fff; border-radius:30px 30px 30px 10px; background:linear-gradient(135deg,#fff,#f1f1f1); box-shadow:inset 0 1px 1px #fff,0 10px 25px -20px #0004; padding:9px; }
.message-card .film { border-radius:21px; box-shadow:none; }
.conversation-copy { padding:22px 14px 18px; }
.conversation-copy p { margin-top:15px; }

/* Independent layout and alignment preferences apply to every direction. */
.editorial-copy,.cinema-copy,.card-copy,.conversation-copy { text-align:center; }
html[data-welcome-align=left] :is(.editorial-copy,.cinema-copy,.card-copy,.conversation-copy) { text-align:left; }
html[data-welcome-layout=copy] :is(.editorial-layout,.cinema-layout,.story-card,.message-card) { grid-template-rows:auto minmax(0,1fr); }
html[data-welcome-layout=copy] :is(.editorial-copy,.cinema-copy,.card-copy,.conversation-copy) { grid-row:1; }
html[data-welcome-layout=copy] .story-card .film { margin:0 10px 10px; }

.proto-picker { width:max-content; }
.proto-picker-item { min-height:44px; }
#fullscreen { display:none; }
#exit-fullscreen { position:fixed; z-index:100; right:12px; top:calc(env(safe-area-inset-top,0px) + 8px); background:#ffffffd9; }
.app-preview .studio-bar,.app-preview .proto-picker { display:none!important; }
.app-preview,.app-preview body { height:100%; overflow:hidden; }
.app-preview .workspace { position:fixed; inset:0; height:100dvh!important; min-height:0; padding:0!important; }
.app-preview .preview { height:100%; }
.app-preview .device-wrap { width:100%!important; height:100%!important; }
.app-preview .phone-shell { width:100%; height:100%; transform:none!important; padding:0; border-radius:0; box-shadow:none; }
.app-preview .phone-shell .screen { inset:0; width:100%; height:100%; border-radius:0; }
.app-preview .dynamic-island,.app-preview .device-button,.app-preview .phone-status,.app-preview .home-indicator { display:none; }
.app-preview .slide-stage { top:calc(env(safe-area-inset-top,0px) + 24px); bottom:calc(env(safe-area-inset-bottom,0px) + 147px + var(--welcome-skip-space)); }
.app-preview .welcome-footer { bottom:calc(env(safe-area-inset-bottom,0px) + 30px); }
@media(max-width:700px),(pointer:coarse) { #fullscreen { display:grid; } }
@media(max-width:370px) {
  .proto-picker-item { padding-inline:10px; font-size:12px; }
}
@media(max-height:730px) {
  .app-preview .editorial-layout { gap:16px; }
  .app-preview .editorial-copy .body-copy { margin-top:10px; }
  .app-preview .cinema-layout { gap:16px; }
  .app-preview .cinema-copy .body-copy { margin-top:10px; }
  .app-preview .card-copy { padding:16px 20px 20px; }
  .app-preview .conversation-layout { padding-top:0; }
  .app-preview .conversation-copy { padding:16px 12px 14px; }
  .app-preview .conversation-copy p { margin-top:10px; }
}
@media(orientation:landscape) and (max-height:540px) {
  .app-preview .film video,.app-preview .film-fallback { object-fit:contain; }
  .app-preview .slide-stage { top:calc(env(safe-area-inset-top,0px) + 16px); bottom:calc(100px + var(--welcome-skip-space)); }
  .app-preview .welcome-footer { bottom:12px; left:24px; right:24px; display:grid; grid-template-columns:minmax(0,1fr) 220px; align-items:center; column-gap:24px; }
  .app-preview .progress-row { flex:1; margin:0; }
  .app-preview .primary { grid-column:2; grid-row:1; width:220px; height:52px; }
  .app-preview .welcome-footer .skip { grid-column:2; grid-row:2; }
  .app-preview .editorial-layout,.app-preview .cinema-layout { display:grid; grid-template-columns:1fr 1fr; grid-template-rows:1fr; gap:10px 24px; text-align:left; }
  .app-preview .editorial-layout .film { grid-column:1; grid-row:1/3; margin:0; border-radius:20px; }
  .app-preview .editorial-copy { grid-column:2; align-self:center; }
  .app-preview .cinema-stage { grid-row:1/3; }
  .app-preview .cinema-copy { grid-row:1/3; align-self:center; }
  .app-preview .story-card { grid-template-columns:1fr 1fr; grid-template-rows:1fr; }
  .app-preview .story-card .film { margin:8px; }
  .app-preview .card-copy { align-self:center; }
  .app-preview .message-card { grid-template-columns:1fr 1fr; grid-template-rows:1fr; }
  .app-preview .conversation-copy { align-self:center; }
  .app-preview .slide { overflow-y:auto; overscroll-behavior-y:contain; }
  .app-preview :is(.editorial-layout,.cinema-layout,.cards-layout,.conversation-layout) { min-height:260px; }
  html[data-welcome-layout=copy].app-preview :is(.editorial-layout,.cinema-layout,.story-card,.message-card) { grid-template-rows:1fr; }
  html[data-welcome-layout=copy].app-preview :is(.editorial-copy,.cinema-copy,.card-copy,.conversation-copy) { grid-column:1; grid-row:1; }
  html[data-welcome-layout=copy].app-preview :is(.film,.cinema-stage) { grid-column:2; grid-row:1; }
}
@media(hover:hover) and (pointer:fine) {
  .film-toggle:hover::before { background:#fff; }
  .skip:hover { color:#171717; }
  .primary:hover { background:var(--hs-dark-hover); }
  [data-direction=cinema] .skip:hover { color:#fff; }
}
@media(prefers-reduced-transparency:reduce) { .quiet { background:#fff; backdrop-filter:none; } }
@media(prefers-reduced-motion:reduce) { .slide-track { will-change:auto; } }
@media(forced-colors:active) {
  .onboarding,.onboarding[data-direction=cinema],.story-card,.message-card { color:CanvasText; background:Canvas; }
  .primary { color:ButtonText; background:ButtonFace; border-color:ButtonText; }
  .body-copy,.message-card p,.skip { color:CanvasText!important; }
  .slide-dots button::after { background:CanvasText!important; }
  .slide-dots button[aria-current=true] { outline:2px solid Highlight; }
}

/* Edge to edge: the footage reaches both sides while the copy keeps its inset. */
.edge-to-edge-layout { --copy-gap:25px; height:100%; display:grid; grid-template-rows:minmax(0,9fr) minmax(0,.5fr) auto minmax(0,.5fr); padding:8px 0 12px; }
.edge-to-edge-layout > .film { grid-row:1; width:100%; height:100%; border:0; border-radius:0; box-shadow:none; }
.edge-to-edge-layout > .film::after { display:none; }
.edge-to-edge-layout .film-toggle { right:14px; }
.edge-to-edge-copy { grid-row:3; min-width:0; padding:var(--copy-gap) 34px 0; text-align:center; }
.edge-to-edge-copy .body-copy { margin-top:15px; }
html[data-welcome-align=left] .edge-to-edge-copy { text-align:left; }
html[data-welcome-layout=copy] .edge-to-edge-layout { grid-template-rows:auto minmax(0,.5fr) minmax(0,9fr) minmax(0,.5fr); }
html[data-welcome-layout=copy] .edge-to-edge-copy { grid-row:1; padding-block:0 var(--copy-gap); }
html[data-welcome-layout=copy] .edge-to-edge-layout > .film { grid-row:3; }
@media(max-height:730px) {
  .app-preview .edge-to-edge-layout { --copy-gap:16px; }
  .app-preview .edge-to-edge-copy .body-copy { margin-top:10px; }
}
@media(orientation:landscape) and (max-height:540px) {
  /* Retain the full-width composition; the existing slide scrolls on short phones. */
  .app-preview .edge-to-edge-layout { min-height:390px; }
  .app-preview .edge-to-edge-layout > .film { min-height:190px; }
}

/* Inset compositions start below the status bar, with breathing room that
   matches their side margins. Only Edge to edge reaches behind the chrome. */
html:not([data-welcome-layout=copy]) [data-direction=edge-to-edge] .slide-stage { top:0; }
html:not([data-welcome-layout=copy]) .edge-to-edge-layout { padding-top:0; }

/* Keep the authored portrait intact. The full-bleed design needs an inner
   chrome-safe inset; bounded films already sit below the device chrome. */
.edge-to-edge-layout .film[data-scene^="launch-"] { --film-inset-inline:16px; }
html:not([data-welcome-layout=copy]) .edge-to-edge-layout .film[data-scene^="launch-"] { --film-inset-top:64px; }
html:not([data-welcome-layout=copy]).app-preview .edge-to-edge-layout .film[data-scene^="launch-"] { --film-inset-top:env(safe-area-inset-top,0px); }
