:root { color-scheme: light; --canvas:#e1e5ee; --panel:#f9fafc; --ink:#19191e; --muted:#51596b; --line:#e3e7ec; --hover:#eceef5; --active:#19191e; --active-ink:#fff; --shell:#c5cbd3; }
:root[data-theme='dark'] { color-scheme:dark; --canvas:#101217; --panel:#282c36; --ink:#eff1f7; --muted:#bec5d4; --line:#2c2c2c; --hover:#1b1e26; --active:#eff1f7; --active-ink:#101217; --shell:#303030; }
* { box-sizing:border-box; }
body { margin:0; height:100dvh; display:grid; grid-template-rows:auto auto minmax(0,1fr) auto; overflow:hidden; background:var(--canvas); color:var(--ink); font:14px/1.4 'Inter',sans-serif; }
button,a { -webkit-tap-highlight-color:transparent; }
button { font:inherit; color:inherit; cursor:pointer; }
a { color:inherit; text-decoration:none; }
button:focus-visible,a:focus-visible { outline:2px solid #8794a6; outline-offset:3px; }
button:disabled { opacity:.35; cursor:default; }
button, a { touch-action:manipulation; }
svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; flex-shrink:0; }
.preview-header { display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:20px; padding:16px 24px; background:var(--panel); border-bottom:1px solid var(--line); }
.preview-brand { display:flex; align-items:center; gap:12px; width:fit-content; }
.preview-brand > span:first-child { font-size:24px; font-weight:800; font-style:italic; letter-spacing:-3px; width:34px; }
.preview-brand > span:last-child { font-weight:600; font-size:15px; }
.preview-brand small { display:block; margin-top:2px; color:var(--muted); font-size:12px; font-weight:400; }
.device-tabs { display:flex; padding:4px; gap:3px; border-radius:28px; background:var(--canvas); }
.device-tabs button { display:flex; align-items:center; justify-content:center; gap:8px; min-height:38px; padding:8px 14px; border:0; border-radius:24px; background:transparent; color:var(--muted); font-size:13px; }
.device-tabs button:hover:where(:not(html[data-hover-disabled] *)) { color:var(--ink); }
.device-tabs button[aria-pressed='true'] { background:var(--active); color:var(--active-ink); box-shadow:0 2px 7px #0000000a; }
.preview-actions { justify-self:end; display:flex; align-items:center; gap:8px; }
.round-button { display:inline-flex; align-items:center; justify-content:center; width:36px; height:36px; padding:0; border:0; border-radius:50%; background:transparent; color:var(--muted); }
.round-button:hover:where(:not(html[data-hover-disabled] *)):not(:disabled) { color:var(--ink); background:var(--hover); }
.preview-back { display:flex; align-items:center; gap:10px; margin-left:6px; padding:9px 13px; border:1px solid var(--line); border-radius:24px; font-size:13px; }
.preview-back:hover:where(:not(html[data-hover-disabled] *)) { background:var(--hover); }
.preview-back span { font-size:18px; }
.preview-options { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px 18px; padding:12px 24px; }
.size-presets { display:flex; gap:6px; flex-wrap:wrap; }
.size-presets button { padding:7px 11px; min-height:32px; border:1px solid transparent; border-radius:18px; background:transparent; color:var(--muted); font-size:12px; font-variant-numeric:tabular-nums; }
.size-presets button:hover:where(:not(html[data-hover-disabled] *)) { background:var(--panel); color:var(--ink); }
.size-presets button[aria-pressed='true'] { background:var(--panel); color:var(--ink); border-color:var(--line); }
.screen-info { display:flex; align-items:center; gap:10px; font-size:12px; color:var(--muted); font-variant-numeric:tabular-nums; }
.screen-info .round-button { background:var(--panel); }
.preview-stage { min-width:0; min-height:0; overflow:auto; display:grid; padding:24px; background-image:radial-gradient(#88888824 .8px,transparent .8px); background-size:18px 18px; }
.preview-viewport { position:relative; flex-shrink:0; margin:auto; }
.device-shell { position:absolute; left:0; top:0; transform-origin:top left; background:var(--panel); border:9px solid var(--shell); overflow:hidden; box-shadow:0 20px 60px #00000014,0 2px 8px #00000010; }
.device-shell iframe { display:block; width:100%; height:100%; border:0; border-radius:inherit; background:var(--panel); }
.preview-footer { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; padding:14px 24px; background:var(--panel); border-top:1px solid var(--line); }
.preview-notice { display:flex; align-items:center; gap:7px; color:var(--muted); font-size:12px; }
.preview-notice i { width:5px; height:5px; border-radius:50%; background:#f18b41; }
.zoom-controls { display:flex; align-items:center; padding:3px; gap:3px; border:1px solid var(--line); border-radius:24px; }
.zoom-controls button { min-width:30px; height:30px; padding:5px 10px; border:0; border-radius:20px; background:transparent; font-size:12px; color:var(--muted); }
.zoom-controls button:hover:where(:not(html[data-hover-disabled] *)):not(:disabled) { background:var(--hover); color:var(--ink); }
.zoom-controls button[aria-pressed='true'] { color:var(--ink); background:var(--hover); }
#zoom-label { min-width:39px; text-align:center; font-size:12px; font-variant-numeric:tabular-nums; }
#zoom-out,#zoom-in { font-size:19px; width:30px; padding:0; }
.zoom-divider { height:16px; width:1px; background:var(--line); margin:0 5px; }
.preview-footer-hint { font-size:12px; color:var(--muted); }
@media(max-width:1200px) { .preview-footer-hint { display:none; } }
@media(max-width:900px) { .preview-header { grid-template-columns:1fr auto; gap:12px; padding:12px 16px; }.device-tabs { grid-column:1 / -1; grid-row:2; justify-self:center; }.preview-actions { grid-column:2; grid-row:1; }.preview-options { padding:10px 16px; }.preview-footer { padding:12px 16px; justify-content:center; }.preview-notice { display:none; } }
@media(max-width:450px) { .preview-brand > span:last-child { font-size:14px; }.preview-back { font-size:0; padding:6px 12px; margin:0; }.preview-back span { font-size:20px; }.preview-actions { gap:2px; }.device-tabs button { padding:8px 12px; }.preview-options { justify-content:center; gap:5px; }.screen-info { gap:7px; }.size-presets { gap:2px; }.size-presets button { padding:6px 8px; }.preview-stage { padding:20px; } }
@media(prefers-reduced-motion:no-preference) { button,a { transition:background-color 140ms ease,color 140ms ease,border-color 140ms ease; } }

html[data-input-mode='pointer'] :focus-visible { outline:none !important; }
html[data-input-mode='keyboard'] :focus-visible { outline:1px solid currentColor; outline-offset:2px; }
.round-button, .preview-actions .round-button { width:48px; height:48px; display:inline-flex; align-items:center; justify-content:center; }
.preview-screen-tabs { display:flex; align-items:center; gap:3px; padding:4px; border-radius:24px; background:var(--panel); }
.preview-screen-tabs button { border:0; border-radius:20px; background:transparent; min-height:34px; padding:7px 12px; font-size:12px; color:var(--muted); }
.preview-screen-tabs button:hover:where(:not(html[data-hover-disabled] *)) { background:var(--hover); color:var(--ink); }
.preview-screen-tabs button[aria-pressed='true'] { background:var(--active); color:var(--active-ink); }

/* Code-drawn iPhone and iPad shells. Chrome never covers the live iframe. */
.device-shell { overflow:visible; background:#141518; border-color:#18191c; outline:1px solid #666970; box-shadow:0 30px 75px #00000024,0 5px 15px #00000020,inset 0 0 0 1px #777a80; }
.device-screen { position:relative; width:100%; height:100%; overflow:hidden; border-radius:var(--screen-radius,24px); background:var(--device-screen-bg,var(--canvas)); }
.device-screen iframe { position:absolute; display:block; border:0; border-radius:0; }
.device-status { position:absolute; inset:0 0 auto; height:59px; display:flex; align-items:center; justify-content:space-between; padding:0 25px; color:var(--ink); font-size:15px; font-weight:600; line-height:1; pointer-events:none; }
.device-status-icons { display:flex; align-items:center; gap:5px; }
.device-status-icons > svg:first-child { width:40px; height:15px; }
.device-status-icons > svg:last-child { width:25px; height:15px; }
.device-island { position:absolute; z-index:2; left:50%; top:11px; transform:translateX(-50%); width:124px; height:35px; border-radius:22px; background:#050507; pointer-events:none; }
.device-island > i { position:absolute; right:10px; top:13px; width:8px; height:8px; border-radius:50%; background:radial-gradient(circle at 35% 35%,#3b4c71 0,#141c30 35%,#080b12 75%); box-shadow:0 0 0 2px #0d1019; opacity:.7; }
.device-home-indicator { position:absolute; bottom:9px; left:50%; width:126px; height:5px; transform:translateX(-50%); border-radius:4px; background:var(--ink); pointer-events:none; }
.device-button { position:absolute; display:block; width:3px; border:1px solid #45474d; background:linear-gradient(90deg,#2d2f34,#777b82,#25272b); border-radius:3px; pointer-events:none; }
.device-action-button { left:-13px; top:94px; height:25px; }
.device-volume-up { left:-13px; top:141px; height:48px; }
.device-volume-down { left:-13px; top:201px; height:48px; }
.device-power-button { right:-13px; top:158px; height:72px; }
.device-camera-button { right:-13px; bottom:190px; height:36px; }
.device-camera { display:none; }
.device-shell[data-device='tablet'] .device-status { height:24px; padding-inline:16px; font-size:10px; }
.device-shell[data-device='tablet'] .device-status-icons { transform:scale(.75); transform-origin:right center; }
.device-shell[data-device='tablet'] .device-island { display:none; }
.device-shell[data-device='tablet'] .device-home-indicator { bottom:6px; width:132px; height:4px; }
.device-shell[data-device='tablet'] .device-camera { display:block; position:absolute; right:-12px; top:50%; width:6px; height:6px; border-radius:50%; background:#07090e; box-shadow:inset 0 0 0 1px #3c4351; pointer-events:none; }
.device-shell[data-device='tablet'] .device-action-button,.device-shell[data-device='tablet'] .device-camera-button { display:none; }
.device-shell[data-device='tablet'] .device-volume-up { left:auto; right:34px; top:-21px; width:40px; height:3px; }
.device-shell[data-device='tablet'] .device-volume-down { left:auto; right:86px; top:-21px; width:40px; height:3px; }
.device-shell[data-device='tablet'] .device-power-button { top:28px; right:-21px; height:40px; }
.device-shell[data-device='phone'][data-landscape='true'] .device-status { display:none; }
.device-shell[data-device='phone'][data-landscape='true'] .device-island { left:11px; top:50%; width:35px; height:124px; transform:translateY(-50%); }
.device-shell[data-device='phone'][data-landscape='true'] .device-island > i { right:13px; top:10px; }
.device-shell[data-device='phone'][data-landscape='true'] .device-action-button { left:94px; top:auto; bottom:-13px; width:25px; height:3px; }
.device-shell[data-device='phone'][data-landscape='true'] .device-volume-up { left:141px; top:auto; bottom:-13px; width:48px; height:3px; }
.device-shell[data-device='phone'][data-landscape='true'] .device-volume-down { left:201px; top:auto; bottom:-13px; width:48px; height:3px; }
.device-shell[data-device='phone'][data-landscape='true'] .device-power-button { right:auto; left:158px; top:-13px; width:72px; height:3px; }
.device-shell[data-device='phone'][data-landscape='true'] .device-camera-button { right:190px; bottom:auto; top:-13px; width:36px; height:3px; }
.device-shell[data-device='tablet'][data-landscape='true'] .device-camera { top:-12px; left:50%; right:auto; }
.device-shell[data-device='desktop'] .device-status,.device-shell[data-device='desktop'] .device-island,.device-shell[data-device='desktop'] .device-home-indicator,.device-shell[data-device='desktop'] .device-button,.device-shell[data-device='desktop'] .device-camera { display:none; }
.screen-info > strong { font-weight:500; color:var(--ink); }
@media(max-width:450px) { .screen-info > strong { font-size:11px; }.screen-info { flex-wrap:wrap; justify-content:center; } }
/* Frosted system chrome fades into the live screen instead of hard color bands. */
.device-screen iframe { z-index:0; }
.device-status { z-index:3; isolation:isolate; }
.device-status::before { content:''; position:absolute; inset:0 0 -12px; z-index:-1; background:linear-gradient(to bottom,color-mix(in srgb,var(--device-screen-bg,var(--canvas)) 60%,transparent),color-mix(in srgb,var(--device-screen-bg,var(--canvas)) 45%,transparent)); -webkit-backdrop-filter:blur(14px) saturate(1.15); backdrop-filter:blur(14px) saturate(1.15); -webkit-mask-image:linear-gradient(#000 0%,#000 calc(100% - 12px),transparent 100%); mask-image:linear-gradient(#000 0%,#000 calc(100% - 12px),transparent 100%); }
.device-island { z-index:4; }
.device-home-indicator { z-index:3; isolation:isolate; }
.device-home-indicator::before { content:''; position:absolute; z-index:-1; top:-36px; bottom:-10px; left:50%; width:var(--screen-width,100vw); transform:translateX(-50%); background:linear-gradient(to bottom,color-mix(in srgb,var(--device-screen-bg,var(--canvas)) 60%,transparent),color-mix(in srgb,var(--device-screen-bg,var(--canvas)) 45%,transparent)); -webkit-backdrop-filter:blur(14px) saturate(1.15); backdrop-filter:blur(14px) saturate(1.15); -webkit-mask-image:linear-gradient(transparent,#000 16px,#000); mask-image:linear-gradient(transparent,#000 16px,#000); pointer-events:none; }
.device-shell[data-device='tablet'] .device-status::before { bottom:-8px; }
.device-shell[data-device='tablet'] .device-home-indicator::before { top:-24px; bottom:-8px; }
.device-shell[data-device='phone'][data-landscape='true'] .device-home-indicator::before { top:-20px; }
@media(max-width:380px) {
 .preview-header { padding-inline:12px; gap:8px; }
 .preview-brand { gap:8px; }
 .preview-brand > span:first-child { width:28px; }
 .preview-brand > span:last-child { font-size:13px; }
 .device-tabs button > svg { display:none; }
}

/* The home indicator floats directly over the app, without a bottom panel. */
.device-home-indicator::before { content:none; display:none; }
/* Feather the edge of system glass instead of ending its blur abruptly. */
.device-status::before { bottom:-18px; -webkit-mask-image:linear-gradient(to bottom,#000 0%,#000 35%,rgba(0,0,0,.75) 55%,rgba(0,0,0,.25) 80%,transparent 100%); mask-image:linear-gradient(to bottom,#000 0%,#000 35%,rgba(0,0,0,.75) 55%,rgba(0,0,0,.25) 80%,transparent 100%); }
.device-shell[data-device='tablet'] .device-status::before { bottom:-14px; }

/* Android screen keeps its own camera, status bar and gesture area. */
.device-shell[data-device='android'] .device-status { height:32px; padding-inline:22px; font-size:12px; }
.device-shell[data-device='android'] .device-status-icons { gap:3px; }
.device-shell[data-device='android'] .device-status-icons > svg:first-child { width:34px; height:13px; }
.device-shell[data-device='android'] .device-status-icons > svg:last-child { width:22px; height:13px; }
.device-shell[data-device='android'] .device-island { left:50%; top:10px; width:12px; height:12px; border-radius:50%; transform:translateX(-50%); background:#08090a; }
.device-shell[data-device='android'] .device-island > i { display:none; }
.device-shell[data-device='android'] :is(.device-action-button,.device-camera-button,.device-camera) { display:none; }
.device-shell[data-device='android'] .device-volume-up { left:auto; right:-12px; top:210px; height:72px; }
.device-shell[data-device='android'] .device-volume-down { display:none; }
.device-shell[data-device='android'] .device-power-button { right:-12px; top:133px; height:44px; }
.device-shell[data-device='android'] .device-home-indicator { width:96px; height:4px; bottom:8px; }
.device-shell[data-device='android'][data-landscape='true'] .device-island { display:none; }
.device-tabs { max-width:100%; }
@media(max-width:450px) {
 .device-tabs { width:100%; justify-content:center; }
 .device-tabs button { flex:1; min-width:0; padding-inline:8px; gap:5px; font-size:12px; }
 .device-tabs button > svg { display:none; }
}
.preview-brand > .preview-brand-symbol { display:flex; align-items:center; justify-content:center; width:34px; color:#2D81FF; }
html[data-theme="dark"] img[src^="/assets/app/icon.svg"] { filter:grayscale(1) invert(.94) brightness(1.12); }
.preview-brand-symbol > :is(svg,img) { width:32px; height:32px; fill:currentColor; stroke:none; }
