/* Palmview */
:root {
  --bg: #16171a; --panel: #1f2125; --panel-2: #26292e; --raised: #2c3036; --line: #33363c; --line-hover: #4a4f57;
  --text: #e8eaed; --text-2: #b4b9bf; --muted: #8f959c; --accent: #19c3b1; --accent-bg: rgba(25,195,177,.14); --on-accent: #04302b;
  --canvas: #121315; --dot: #232529; --ring: #3a3d42; --shadow: 0 20px 50px rgba(0,0,0,.5); --pop-shadow: 0 12px 32px rgba(0,0,0,.45);
  --warn: #f5b84b; --danger: #ff6b6b; --primary: #e8eaed; --on-primary: #16171a;
  --radius: 8px; --sys: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #ffffff; --panel: #ffffff; --panel-2: #f6f7f9; --raised: #ffffff; --line: #e3e5e8; --line-hover: #c3c8ce;
  --text: #1c1f23; --text-2: #4b525b; --muted: #6b727b; --accent: #0b7a6f; --accent-bg: rgba(11,122,111,.10); --on-accent: #ffffff;
  --canvas: #eef0f2; --dot: #d9dce0; --ring: #c9cdd3; --shadow: 0 16px 40px rgba(20,24,31,.16); --pop-shadow: 0 12px 32px rgba(20,24,31,.16);
  --warn: #a15c00; --danger: #c62828; --primary: #1c1f23; --on-primary: #ffffff;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 13px/1.4 var(--sys); overflow: hidden; }
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { display: block; }
.ph { flex: none; }
button:focus-visible, select:focus-visible, input:focus-visible, .segmented button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Buttons ---------- */
.icon-btn { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: var(--radius); background: transparent; color: var(--text-2); }
.icon-btn:hover { background: var(--panel-2); color: var(--text); }
.btn-quiet { height: 32px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius); background: transparent; color: var(--text-2); }
.btn-quiet:hover { border-color: var(--line-hover); color: var(--text); }
.btn-primary { height: 32px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 14px; border: 0; border-radius: var(--radius); background: var(--primary); color: var(--on-primary); font-weight: 600; }
.btn-primary:hover { opacity: .9; }
.btn-primary.wide { width: 100%; height: 36px; margin-top: 4px; }
.btn-link { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 6px 0 2px; color: var(--accent); font-size: 12px; }
.segmented { display: flex; padding: 2px; gap: 2px; border-radius: var(--radius); background: var(--panel-2); border: 1px solid var(--line); }
.segmented button { flex: 1; min-height: 26px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 8px; border: 0; border-radius: 6px; background: transparent; color: var(--text-2); font-size: 12px; white-space: nowrap; }
.segmented button.on { background: var(--raised); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.18); font-weight: 600; }
.segmented.big button { min-height: 28px; padding: 0 12px; font-size: 13px; }
.pill { height: 26px; padding: 0 10px; border-radius: 13px; border: 1px solid var(--line); background: transparent; color: var(--text-2); font-size: 12px; }
.pill.on { border-color: var(--accent); background: var(--accent-bg); color: var(--accent); font-weight: 600; }

/* ---------- Top bar ---------- */
.topbar { height: 52px; display: flex; align-items: center; gap: 10px; padding: 0 12px; background: var(--panel); border-bottom: 1px solid var(--line); }
.nav-btns { display: flex; gap: 2px; }
.url-form { flex: 1; min-width: 160px; }
.url-form input { width: 100%; height: 34px; padding: 0 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); outline: none; }
.url-form input:focus { border-color: var(--accent); background: var(--bg); }

/* ---------- Layout ---------- */
.main { display: flex; height: calc(100% - 52px - 28px); }
.canvas { flex: 1; overflow: auto; position: relative; background: var(--canvas) radial-gradient(var(--dot) 1px, transparent 1px) 0 0 / 20px 20px; }
.groups { min-height: 100%; padding: 24px 32px 40px; display: flex; flex-direction: column; gap: 40px; justify-content: center; align-items: center; }
body[data-view="single"] .groups { justify-content: center; align-items: center; }
.group { display: flex; flex-wrap: wrap; gap: 32px; align-items: center; justify-content: center; }
body[data-view="single"] .group { justify-content: center; }
.group[hidden] { display: none; }
body[data-view="single"] .only-compare { display: none !important; }
.add-card { align-self: center; width: 120px; height: 200px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 1.5px dashed var(--line-hover); border-radius: 20px; background: transparent; color: var(--text-2); }
.add-card:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Settings panel ---------- */
.panel { width: 264px; flex: none; overflow-y: auto; padding: 16px; background: var(--panel); border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.pn-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.pn-title { font-size: 15px; font-weight: 600; }
.pn-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.pn-label { display: block; margin: 10px 0 4px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .02em; }
.panel select { width: 100%; height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-2); }
.pn-note { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.pn-warn { margin: 8px 0 0; display: flex; gap: 6px; padding: 8px; border-radius: var(--radius); background: var(--accent-bg); color: var(--text-2); font-size: 11px; }
.pn-divider { height: 1px; background: var(--line); margin: 12px 0 4px; }
.pn-toggle { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; padding: 6px 0; cursor: pointer; }
.pn-toggle input { margin: 0; transform: translateY(2px); }
.pn-hint { flex-basis: 100%; padding-left: 20px; color: var(--muted); font-size: 11px; }
.pn-info { display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.pn-info div { display: flex; justify-content: space-between; gap: 8px; }
.pn-info span { color: var(--muted); }
.pn-info b { font-weight: 500; font-variant-numeric: tabular-nums; }
.pn-info .pn-ua { flex-direction: column; }
.pn-info code { font-size: 10.5px; line-height: 1.45; color: var(--text-2); word-break: break-all; user-select: all; }

/* ---------- Popovers ---------- */
.popover { position: fixed; z-index: 100; min-width: 240px; padding: 12px; border-radius: 12px; background: var(--raised); border: 1px solid var(--line); box-shadow: var(--pop-shadow); }
.popover[hidden] { display: none; }
.picker { width: 320px; display: flex; flex-direction: column; gap: 8px; max-height: min(560px, calc(100vh - 80px)); }
.pk-title { font-weight: 600; }
.picker input[type=search] { height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-2); outline: none; }
.picker input[type=search]:focus { border-color: var(--accent); }
.pk-brands { display: flex; gap: 4px; flex-wrap: wrap; }
.pk-list { overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.pk-group { margin: 8px 6px 4px; color: var(--muted); font-size: 11px; font-weight: 600; }
.pk-row { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 8px; border: 0; border-radius: 6px; background: transparent; text-align: left; }
.pk-row:hover { background: var(--panel-2); }
.pk-row.on { background: var(--accent-bg); color: var(--accent); font-weight: 600; }
.pk-row small { color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 400; }
.pk-row em { font-style: normal; font-size: 10px; padding: 1px 5px; border-radius: 4px; background: var(--panel-2); color: var(--muted); margin-left: 4px; }
.pk-empty { color: var(--muted); padding: 8px; margin: 0; }
.pk-browsers { display: flex; align-items: center; gap: 6px; padding-top: 8px; border-top: 1px solid var(--line); }
.pk-browsers span { color: var(--muted); font-size: 11px; font-weight: 600; margin-right: 4px; }
.capture { width: 280px; }
.capture fieldset { border: 0; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.capture legend { color: var(--muted); font-size: 11px; font-weight: 600; margin-bottom: 4px; padding: 0; }
.capture label { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.capture label:has(input:disabled) { opacity: .45; }

/* ---------- Modal ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: rgba(0,0,0,.45); }
.modal { width: min(640px, calc(100vw - 32px)); padding: 20px; border-radius: 14px; background: var(--raised); border: 1px solid var(--line); box-shadow: var(--pop-shadow); }
.modal-head { display: flex; justify-content: space-between; align-items: center; }
.modal h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 16px; }
.modal p { color: var(--text-2); }
.cal-stage { height: 360px; display: grid; place-items: center; overflow: hidden; border-radius: 10px; background: var(--panel-2); }
.cal-card { position: relative; border: 2px solid var(--accent); border-radius: 12px; background: var(--accent-bg); display: grid; place-items: center; color: var(--accent); font-weight: 600; }
.modal input[type=range] { width: 100%; margin: 14px 0; }
.modal-foot { display: flex; align-items: center; gap: 8px; }
.cal-readout { margin-right: auto; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Device card ---------- */
.card { flex: none; }
.card-head { display: flex; align-items: center; gap: 2px; margin-bottom: 4px; }
.card-head .spacer { flex: 1; }
.card-head .icon-btn { width: 28px; height: 28px; }
body[data-view="compare"] .card-head .icon-btn { width: 24px; height: 24px; }
body[data-view="compare"] .chip { min-width: 0; flex: 0 1 auto; }
.chip { max-width: 100%; height: 30px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px 0 8px; border: 1px solid var(--line); border-radius: 15px; background: var(--panel); color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; }
.chip:hover { border-color: var(--line-hover); }
.chip .chip-label { overflow: hidden; text-overflow: ellipsis; }
.chip .ph:last-child { color: var(--muted); }
.card.is-active .chip { border-color: var(--accent); }
body[data-view="compare"]:not([data-count="1"]) .card.is-active .bezel { outline: 2px solid var(--accent); outline-offset: 6px; }
.meta { margin: 0 0 10px 4px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Status bar ---------- */
.statusbar { height: 28px; display: flex; align-items: center; gap: 18px; padding: 0 14px; background: var(--panel); border-top: 1px solid var(--line); color: var(--text-2); font-size: 12px; white-space: nowrap; overflow: hidden; }
.statusbar .s-note { margin-left: auto; color: var(--muted); }
.statusbar .s-warn.is-warn { color: var(--warn); font-weight: 600; }

/* ---------- Capture mode: only the device being captured is visible ---------- */
body.capturing { cursor: progress; }
body.capturing .topbar, body.capturing .panel, body.capturing .statusbar, body.capturing .card:not(.capture-target),
body.capturing .card-head, body.capturing .meta, body.capturing .add-card, body.capturing .popover { visibility: hidden; }
body.capturing .canvas { background: var(--canvas); }
body.capturing .page-state { display: none; }
body.capturing .bezel { box-shadow: none; outline: 0 !important; }

/* ---------- Device frame ---------- */
.device-outer { position: relative; }
.bezel { position: absolute; top: 0; left: 0; transform-origin: 0 0; background: #0c0c0d; box-shadow: 0 0 0 2px var(--ring), var(--shadow); }
.screen { position: relative; overflow: hidden; background: #fff; display: flex; flex-direction: column; color: #000; font-family: var(--sys); }
.screen iframe { display: block; border: 0; flex: none; background: #fff; }
.seg { flex: none; position: relative; }

/* Bezels per style */
.bezel.island  { padding: 14px; border-radius: 62px; }
.bezel.island .screen { border-radius: 48px; }
.bezel.punch   { padding: 12px; border-radius: 46px; }
.bezel.punch .screen { border-radius: 34px; }
.bezel.home    { padding: 72px 18px; border-radius: 56px; }
.bezel.home .homebtn { position: absolute; left: 50%; bottom: 12px; width: 50px; height: 50px; margin-left: -25px; border-radius: 50%; border: 3px solid #2b2d31; }
.bezel.home .speaker { position: absolute; left: 50%; top: 32px; width: 64px; height: 6px; margin-left: -32px; border-radius: 3px; background: #2b2d31; }
.bezel.tablet  { padding: 22px; border-radius: 40px; }
.bezel.tablet .screen { border-radius: 18px; }
.bezel.desktop { padding: 0; border-radius: 10px; background: transparent; box-shadow: 0 0 0 1px var(--ring), var(--shadow); }
.bezel.desktop .screen { border-radius: 10px; }
.bezel.landscape.island { border-radius: 62px; }

/* ---------- iOS status bar ---------- */
.ios-status { display: flex; align-items: center; justify-content: space-between; padding: 0 30px 0 44px; font-weight: 600; font-size: 17px; letter-spacing: -.2px; background: #fff; }
.ios-status.small { padding: 0 8px; font-size: 12px; }
.ios-status.small .time { position: absolute; left: 50%; transform: translateX(-50%); }
.ios-status.ipad { padding: 0 22px; font-size: 13px; }
.ios-status .icons { display: flex; gap: 6px; align-items: center; }
.island-pill { position: absolute; top: 11px; left: 50%; width: 124px; height: 36px; margin-left: -62px; background: #000; border-radius: 20px; z-index: 2; }

/* ---------- Safari iPhone bottom bar ---------- */
.safari-bottom { background: #f4f4f6; border-top: .5px solid #d1d1d6; display: flex; flex-direction: column; }
.safari-pill { margin: 8px 12px 0; height: 44px; border-radius: 13px; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.12); display: flex; align-items: center; padding: 0 14px; font-size: 16px; }
.safari-pill .aa { font-weight: 600; font-size: 15px; width: 28px; }
.safari-pill .host { flex: 1; text-align: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 0 6px; }
.safari-tools { height: 44px; display: flex; align-items: center; justify-content: space-around; color: #007aff; margin-top: 2px; }
.home-ind { position: absolute; left: 50%; bottom: 8px; width: 134px; height: 5px; margin-left: -67px; border-radius: 3px; background: #000; }

/* Safari iPhone landscape top bar */
.safari-top-land { background: #f4f4f6; border-bottom: .5px solid #d1d1d6; display: flex; align-items: center; gap: 18px; padding: 0 60px; color: #007aff; }
.safari-top-land .safari-pill { flex: 1; margin: 0; height: 36px; color: #000; }

/* ---------- Safari iPad top bar ---------- */
.ipad-bar { background: #f4f4f6; border-bottom: .5px solid #d1d1d6; display: flex; align-items: center; gap: 18px; padding: 0 20px; color: #007aff; }
.ipad-bar .safari-pill { flex: 1; max-width: 460px; margin: 0 auto; height: 36px; color: #000; }

/* ---------- Android ---------- */
.and-status { display: flex; align-items: center; justify-content: space-between; padding: 0 22px; font-size: 14px; background: #fff; }
.and-status .icons { display: flex; gap: 6px; align-items: center; }
.punch-hole { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #000; }
.chrome-bar { background: #fff; display: flex; align-items: center; gap: 12px; padding: 0 12px 0 14px; color: #444746; }
.chrome-omni { flex: 1; height: 40px; border-radius: 20px; background: #eef0f3; display: flex; align-items: center; gap: 10px; padding: 0 14px; color: #1f1f1f; font-size: 15px; min-width: 0; }
.chrome-omni .host, .chrome-omni .fullurl { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; min-width: 0; flex: 1 1 auto; }
/* Real Chrome keeps the address on one line and clips the end without an ellipsis */
.chrome-omni .fullurl { text-overflow: clip; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); }
.crios-addr .host, .s26-url .host, .safari-pill .host, .crios-mini .host { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; min-width: 0; }
.crios-addr, .s26-url { min-width: 0; max-width: 100%; }
.tab-count { width: 20px; height: 20px; border: 2px solid #444746; border-radius: 4px; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.and-nav { background: #fff; }
.and-nav .gesture { position: absolute; left: 50%; top: 50%; width: 108px; height: 4px; margin: -2px 0 0 -54px; border-radius: 2px; background: #1f1f1f; }
.chrome-tabs { background: #dfe3e8; display: flex; align-items: flex-end; padding: 0 10px; }
.chrome-tab { height: 32px; width: 220px; background: #fff; border-radius: 10px 10px 0 0; display: flex; align-items: center; padding: 0 12px; font-size: 12px; gap: 8px; overflow: hidden; white-space: nowrap; }
.chrome-tab .title { flex: 1; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Desktop window ---------- */
.win-tabs { background: #dfe3e8; display: flex; align-items: flex-end; padding: 0 10px 0 12px; gap: 14px; }
.win-tabs .lights { display: flex; gap: 8px; align-self: center; }
.win-tabs .lights i { width: 12px; height: 12px; border-radius: 50%; display: block; }
.win-tabs .chrome-tab { margin-left: 8px; }
.win-addr { background: #fff; display: flex; align-items: center; gap: 14px; padding: 0 12px; color: #5f6368; border-bottom: 1px solid #dadce0; }
.win-addr .chrome-omni { height: 30px; font-size: 13px; border-radius: 15px; background: #f1f3f4; }

/* Clickable browser buttons */
[data-act] { cursor: pointer; display: grid; place-items: center; }
[data-act]:hover { opacity: .6; }
svg { display: block; }


/* ---------- Page overlays: progress, skeleton, error ---------- */
.overlay { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.page-state { position: absolute; left: 0; right: 0; z-index: 4; pointer-events: none; overflow: hidden; }
.page-state .progress { position: absolute; top: 0; left: 0; height: 3px; width: 35%; background: var(--accent); opacity: 0; }
.card[data-status="loading"] .progress, .card[data-status="ready"] .progress { opacity: 1; animation: devsim-progress 1.1s ease-in-out infinite; }
@keyframes devsim-progress { 0% { left: -35%; } 100% { left: 100%; } }
.page-state .skeleton { position: absolute; inset: 3px 0 0; background: #fff; padding: 24px 20px; display: none; flex-direction: column; gap: 14px; }
.card[data-status="loading"] .page-state.show-skeleton .skeleton { display: flex; }
.skeleton i { display: block; height: 14px; border-radius: 7px; background: linear-gradient(90deg, #eceef1 0%, #f6f7f9 50%, #eceef1 100%) 0 0 / 200% 100%; animation: devsim-shimmer 1.2s linear infinite; }
.skeleton i:nth-child(1) { height: 120px; border-radius: 10px; }
.skeleton i:nth-child(2) { width: 80%; } .skeleton i:nth-child(3) { width: 60%; } .skeleton i:nth-child(4) { width: 70%; }
@keyframes devsim-shimmer { to { background-position: -200% 0; } }
.page-state .error { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; background: #f6f7f9; color: #202124; text-align: center; pointer-events: auto; font: 15px/1.45 var(--sys); }
.card[data-status="error"] .page-state .error { display: flex; }
.error svg { color: #80868b; }
.error b { font-size: 18px; }
.error p { margin: 0; max-width: 320px; color: #5f6368; }
.error code { font-size: 12px; color: #80868b; }
.error .actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.error button { height: 36px; padding: 0 16px; border-radius: 18px; border: 1px solid #dadce0; background: #fff; color: #1a73e8; cursor: pointer; font-weight: 600; }
.error button:first-child { background: #1a73e8; border-color: #1a73e8; color: #fff; }
@media (prefers-reduced-motion: reduce) { .progress, .skeleton i { animation: none !important; } }

/* ---------- Security indicators ---------- */
.safari-pill .addr { flex: 1; display: flex; justify-content: center; align-items: center; min-width: 0; padding: 0 6px; }
.safari-pill .addr .host { flex: 0 1 auto; padding: 0; }
.safari-pill .sec { display: flex; align-items: center; gap: 4px; color: #8e8e93; white-space: nowrap; }
.safari-pill .sec .dash { margin: 0 4px; }
.chrome-omni .sec { display: flex; align-items: center; gap: 6px; flex: none; color: #444746; }
.chrome-omni .sec.insecure { color: #b3261e; }
.win-addr .chrome-omni .sec.insecure span { font-size: 13px; }
.chrome-omni .sec .divider { width: 1px; height: 16px; background: #c4c7c5; margin-left: 4px; }

/* ---------- Collapsing bars ---------- */
.seg-top, .seg-bot { flex: none; position: relative; overflow: hidden; transition: height .32s cubic-bezier(.2,.8,.2,1); }
.screen iframe { transition: height .32s cubic-bezier(.2,.8,.2,1); }
.page-state { transition: top .32s cubic-bezier(.2,.8,.2,1), height .32s cubic-bezier(.2,.8,.2,1); }
.screen.no-anim .seg-top, .screen.no-anim .seg-bot, .screen.no-anim iframe, .screen.no-anim .page-state { transition: none; }
/* Android Chrome: the address bar slides up under the status bar */
.seg-top .and-status { z-index: 2; }
.seg-top .chrome-bar { z-index: 1; transition: transform .32s cubic-bezier(.2,.8,.2,1); }
.screen.bars-min .seg-top .chrome-bar { transform: translateY(-100%); }

/* ---------- iOS 26 Safari (Compact, Liquid Glass) ---------- */
.s26-status { background: var(--tint-top, #fff); color: #000; padding: 0 34px 0 50px; }
.tint-top-dark .s26-status { color: #fff; }
.s26-fade { position: absolute; left: 0; right: 0; top: 0; height: 40px; opacity: 0; pointer-events: none; z-index: 1;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--tint-top, #fff) 81%, transparent), transparent); transition: opacity .2s; }
.is-ios26.is-scrolled .s26-fade { opacity: 1; }
.is-ios26 .island-pill { top: 11px; width: 125px; height: 37px; margin-left: -62.5px; }
.s26-bottom { background: var(--tint-bot, #fff); }
.seg-bot > .s26-bottom { height: 100% !important; } /* follow the collapsing container */
.s26-row { position: absolute; left: 12px; right: 12px; bottom: 38px; height: 48px; display: flex; align-items: center; gap: 10px;
  transition: opacity .25s, transform .32s cubic-bezier(.2,.8,.2,1); transform-origin: 50% 100%; }
.s26-btn { width: 48px; height: 48px; flex: none; border-radius: 50%; display: grid; place-items: center; }
.s26-url { flex: 1; height: 48px; border-radius: 24px; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 16px; font-weight: 500; min-width: 0; }
.s26-url .host, .s26-pill .host { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.s26-btn, .s26-url, .s26-pill {
  background: rgba(255,255,255,.78); color: #000; -webkit-backdrop-filter: blur(14px) saturate(180%); backdrop-filter: blur(14px) saturate(180%);
  border: .5px solid rgba(0,0,0,.08); box-shadow: 0 4px 18px rgba(0,0,0,.12); }
.tint-bot-dark .s26-btn, .tint-bot-dark .s26-url, .tint-bot-dark .s26-pill { background: rgba(44,44,46,.78); color: #fff; border-color: rgba(255,255,255,.12); }
.s26-pill { position: absolute; left: 50%; bottom: 15px; height: 32px; max-width: 70%; padding: 0 18.5px; border-radius: 16px; transform: translateX(-50%) scale(.9);
  display: flex; align-items: center; gap: 5px; font-size: 15px; font-weight: 600; letter-spacing: -.2px; opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .32s cubic-bezier(.2,.8,.2,1); }
.s26-url .sec, .s26-pill .sec { display: flex; color: #8e8e93; }
.bars-min .s26-row { opacity: 0; transform: scale(.6) translateY(24px); pointer-events: none; }
.bars-min .s26-pill { opacity: 1; transform: translateX(-50%) scale(1); pointer-events: auto; }
@media (prefers-reduced-motion: reduce) {
  .seg-top, .seg-bot, .screen iframe, .page-state, .s26-row, .s26-pill, .seg-top .chrome-bar { transition: none !important; }
}


/* ---------- Notch iPhones (16e, 17e) ---------- */
.bezel.notch { padding: 14px; border-radius: 58px; }
.bezel.notch .screen { border-radius: 44px; }
.notch-cut { position: absolute; top: 0; left: 50%; width: 162px; height: 32px; margin-left: -81px; background: #000; border-radius: 0 0 20px 20px; z-index: 2; }

/* ---------- iOS 26 Safari: Bottom layout ---------- */
.s26b-bottom { background: #f4f4f6; border-top: .5px solid #d1d1d6; }
.seg-bot > .s26b-bottom, .seg-bot > .s26-bottom { height: 100% !important; }
.s26b-full { position: absolute; left: 0; right: 0; bottom: 34px; transition: opacity .25s; }
.s26b-full .safari-pill { margin-top: 0; }
.s26b-mini { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; opacity: 0; transition: opacity .25s; }
.bars-min .s26b-full { opacity: 0; pointer-events: none; }
.bars-min .s26b-mini { opacity: 1; cursor: pointer; }
.bars-min .s26b-bottom { background: rgba(244,244,246,.92); }

/* ---------- iOS 26 Safari: Top layout ---------- */
.s26t-top { background: #f4f4f6; border-bottom: .5px solid #d1d1d6; transition: height .32s cubic-bezier(.2,.8,.2,1); }
.s26t-full { position: absolute; left: 12px; right: 12px; top: 8px; transition: opacity .25s; }
.s26t-full .safari-pill { margin: 0; height: 44px; }
.s26t-mini { position: absolute; left: 0; right: 0; top: 10px; text-align: center; font-size: 13px; font-weight: 600; opacity: 0; transition: opacity .25s; }
.bars-min .s26t-top { height: 44px !important; }
.bars-min .s26t-full { opacity: 0; pointer-events: none; }
.bars-min .s26t-mini { opacity: 1; cursor: pointer; }
.s26t-bottom { background: #f4f4f6; border-top: .5px solid #d1d1d6; display: flex; flex-direction: column; }
.s26t-bottom .safari-tools { margin-top: 4px; }

/* ---------- Chrome on iPhone (estimated geometry) ---------- */
.crios-status { background: #fff; }
.crios-top { background: #fff; transition: height .32s cubic-bezier(.2,.8,.2,1); }
.crios-omni { position: absolute; left: 12px; right: 12px; top: 6px; height: 44px; border-radius: 22px; background: #eef0f3; display: flex; align-items: center; justify-content: center; transition: opacity .25s; }
.crios-addr { display: flex; align-items: center; gap: 6px; font-size: 16px; color: #1f1f1f; }
.crios-addr .sec { display: flex; color: #b3261e; }
.crios-mini { position: absolute; left: 0; right: 0; top: 2px; text-align: center; font-size: 13px; color: #444; opacity: 0; transition: opacity .25s; }
.bars-min .crios-omni { opacity: 0; pointer-events: none; }
.bars-min .crios-mini { opacity: 1; cursor: pointer; }
.bars-min .seg-top .crios-top { height: 24px !important; }
.crios-bottom { background: #fff; border-top: .5px solid #e0e0e0; }
.seg-bot > .crios-bottom { position: absolute; left: 0; right: 0; top: 0; }
.crios-tools { height: 49px; display: flex; align-items: center; justify-content: space-around; color: #444746; }
.crios-tools .tab-count { border-color: #444746; }

/* ---------- See-through bars (visual option) ---------- */
.screen.see-through .seg-bot { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; }
.screen.see-through .s26-bottom, .screen.see-through .s26b-bottom { background: transparent; border-top: 0; }
.screen.see-through.bars-min .s26b-bottom { background: transparent; }

/* ---------- Desktop hardware frames (generic, no logos) ---------- */
.bezel.hw-laptop, .bezel.hw-monitor { background: transparent; box-shadow: none; border-radius: 0; }
.hw { position: absolute; inset: 0; pointer-events: none; }
.bezel .screen { z-index: 1; }
.hw .lid { position: absolute; background: #0b0b0c; border-radius: 26px 26px 10px 10px; box-shadow: inset 0 0 0 2px #2b2c30, var(--shadow); }
.hw .base { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 3px 3px 22px 22px / 3px 3px 14px 14px;
  background: linear-gradient(#e6e7e9 0%, #c9cbce 55%, #9fa2a7 100%); box-shadow: var(--shadow); }
.hw .base .thumb { position: absolute; top: 0; left: 50%; width: 13%; height: 42%; transform: translateX(-50%); border-radius: 0 0 14px 14px; background: linear-gradient(#a9acb1, #c4c6c9); }
.bezel.hw-laptop .screen { border-radius: 12px 12px 2px 2px; }
.hw-monitor .lid { border-radius: 16px; background: #1a1b1e; }
.hw .neck { position: absolute; left: 50%; background: linear-gradient(90deg, #a7aaae, #d9dbdd 45%, #b5b8bc); border-radius: 0 0 6px 6px; }
.hw .foot { position: absolute; left: 50%; bottom: 0; border-radius: 10px 10px 6px 6px; background: linear-gradient(#dcdee0, #a9acb0); box-shadow: var(--shadow); }
.bezel.hw-monitor .screen { border-radius: 4px; }
body.capturing .hw .lid, body.capturing .hw .base, body.capturing .hw .foot { box-shadow: none; }
body.capturing .hw .lid { box-shadow: inset 0 0 0 2px #2b2c30; }

/* macOS menu bar (+ camera notch on MacBooks) */
.mac-menubar { display: flex; align-items: center; justify-content: space-between; padding: 0 14px; background: #e9e9eb; color: #1d1d1f; font-size: 13px; }
.mac-menubar.notched { background: #111; color: #f2f2f2; }
.mac-menubar .mb-left, .mac-menubar .mb-right { display: flex; align-items: center; gap: 18px; }
.mac-menubar .mb-dot { width: 13px; height: 13px; border-radius: 50%; background: currentColor; opacity: .85; }
.mac-notch { position: absolute; top: 0; left: 50%; width: 196px; height: 32px; margin-left: -98px; background: #0b0b0c; border-radius: 0 0 14px 14px; z-index: 2; }

/* Windows: window buttons on the right, taskbar at the bottom */
.win-tabs.is-windows { padding-left: 8px; }
.win-tabs .spacer { flex: 1; }
.win-ctl { display: flex; align-self: stretch; margin-right: -10px; }
.win-ctl i { width: 46px; display: grid; place-items: center; font-style: normal; font-size: 13px; color: #333; }
.win-taskbar { display: flex; align-items: center; justify-content: center; background: #e8edf3; border-top: 1px solid #d0d6de; }
.win-taskbar .tb-icons { display: flex; gap: 10px; }
.win-taskbar .tb-icons i { width: 28px; height: 28px; border-radius: 6px; background: #c5cdd8; }
.win-taskbar .tb-icons i.on { background: #4f8ae0; }
.win-taskbar .tb-clock { position: absolute; right: 14px; text-align: right; font-size: 11px; line-height: 1.3; color: #222; }
[hidden] { display: none !important; }
body[data-view="compare"] .card.is-active .bezel.hw-laptop, body[data-view="compare"] .card.is-active .bezel.hw-monitor { outline: 0; }
body[data-view="compare"] .card.is-active .hw .lid { outline: 2px solid var(--accent); outline-offset: 6px; }

/* ---------- Free / Pro ---------- */
body.is-pro .only-free, body.is-pro .pro-tag, body.is-pro .pro-note { display: none !important; }
.pro-tag { margin-left: auto; padding: 1px 6px; border-radius: 4px; background: var(--accent-bg); color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: .03em; }
.pro-note { color: var(--muted); font-size: 11px; }
#btn-pro { color: var(--accent); border-color: var(--accent); font-weight: 600; }
#btn-pro:hover { background: var(--accent); color: var(--on-accent); }
.inc-hint { margin: 2px 0 0 24px; color: var(--muted); font-size: 11px; }
.pn-plan { display: flex; flex-direction: column; gap: 8px; }
.pn-plan > div { display: flex; flex-direction: column; gap: 2px; }
.pn-plan span { color: var(--muted); font-size: 11px; }
.upgrade-card { width: min(440px, calc(100vw - 32px)); }
.up-reason { margin: 4px 0 12px; font-weight: 600; color: var(--text); }
.up-list { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.up-list li { display: flex; gap: 10px; align-items: center; }
.up-list .ph { color: var(--accent); }
.up-price { padding: 10px 12px; border-radius: var(--radius); background: var(--panel-2); margin-bottom: 14px; color: var(--text-2); }
.up-price b { color: var(--text); font-size: 16px; }
.review-toast { position: fixed; right: 16px; bottom: 44px; z-index: 150; width: 320px; padding: 14px; border-radius: 12px; background: var(--raised); border: 1px solid var(--line); box-shadow: var(--pop-shadow); }
.review-toast p { margin: 0 0 10px; color: var(--text-2); }
.review-toast b { color: var(--text); }
.review-toast div { display: flex; justify-content: flex-end; gap: 8px; }

input[type=radio], input[type=checkbox] { accent-color: var(--accent); }

/* Panel toggle */
#btn-panel.on { color: var(--accent); }

/* Safari 26 Compact, matched to an iPhone 17 Pro on iOS 26 (Nov 2026): back | page menu, address, reload | tabs */
.s26-row { left: 34px; right: 35px; bottom: 34px; height: 47px; gap: 9px; }
.s26-btn { width: 47px; height: 47px; }
.s26-url { height: 47px; border-radius: 24px; justify-content: space-between; padding: 0 12px; }
.s26-menu, .s26-reload { display: flex; flex: none; opacity: .85; }
.s26-mid { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 6px; }
.s26-reload svg:last-child { display: none; }
.card[data-status="loading"] .s26-reload svg:first-child { display: none; }
.card[data-status="loading"] .s26-reload svg:last-child { display: block; }

/* Chrome on iPhone, address bar at the bottom (measured: omnibox card 61pt + toolbar 78pt) */
.seg-bot > .crb { height: 100% !important; }
.crb { position: relative; overflow: hidden; background: linear-gradient(#efeff1, #e9e7ea); color: #1f1f1f; }
.crb-card { position: absolute; left: 0; right: 0; top: 0; height: 61px; background: #fff; border-radius: 16px; display: flex; align-items: center; padding: 0 12px 0 16px; gap: 14px; transition: opacity .25s; }
.crb-card > [data-act] { display: flex; width: 26px; justify-content: center; }
.crb-omni { flex: 1; height: 45px; border-radius: 23px; background: #ebedf0; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 12px 0 44px; font-size: 16px; min-width: 0; }
.crb-omni .host { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; margin-right: auto; margin-left: auto; }
.crb-omni .sec { display: flex; color: #b3261e; }
.crb-share { display: flex; flex: none; color: #444746; }
.crb-more { display: flex; color: #444746; }
.crb-tools { position: absolute; left: 0; right: 0; top: 61px; height: 78px; display: grid; grid-template-columns: repeat(3, 1fr); padding-top: 16px; transition: opacity .25s; }
.crb-tools > span { display: flex; flex-direction: column; align-items: center; gap: 6px; color: #1f1f1f; }
.crb-tools em { font-style: normal; font-size: 13px; }
.crb-tools .tab-count { width: 22px; height: 22px; border-color: #1f1f1f; }
.crb-mini { position: absolute; left: 0; right: 0; top: 4px; line-height: 20px; text-align: center; font-size: 16px; color: #1f1f1f; opacity: 0; transition: opacity .25s; }
.bars-min .crb { background: #fff; box-shadow: inset 0 .5px 0 #d6d6d8; }
.bars-min .crb-card, .bars-min .crb-tools { opacity: 0; pointer-events: none; }
.bars-min .crb-mini { opacity: 1; cursor: pointer; }

/* ---------- Quick rail (shown when the panel is hidden) ---------- */
.rail { width: 52px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 0; background: var(--panel); border-left: 1px solid var(--line); }
.rail .icon-btn { width: 36px; height: 36px; }
.rail .icon-btn.on { color: var(--accent); }
.rail-sep { width: 24px; height: 1px; background: var(--line); margin: 6px 0; }
.rail-zoom { flex-direction: column; height: 44px !important; gap: 1px; }
.rail-zoom em { font-style: normal; font-size: 9px; line-height: 1; color: var(--muted); }
.pn-head-btns { display: flex; gap: 4px; align-items: center; }
#capture-studio { margin-top: 6px; justify-content: center; width: 100%; }

/* ---------- Mockup studio ---------- */
.studio { position: fixed; inset: 0; z-index: 300; display: flex; background: var(--bg); }
.st-stage { flex: 1; min-width: 0; display: grid; place-items: center; overflow: hidden;
  background-color: var(--panel-2); background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 18px 18px; }
.st-frame { position: relative; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 12px 40px rgba(0,0,0,.12); border-radius: 4px; overflow: hidden; }
.st-frame.checker { background: repeating-conic-gradient(#e4e6ea 0% 25%, #f6f7f9 0% 50%) 0 0 / 20px 20px; }
.st-preview { display: block; width: 100%; height: 100%; }
.st-side { width: 300px; flex: none; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 6px; background: var(--panel); border-left: 1px solid var(--line); }
.st-head { display: flex; align-items: center; justify-content: space-between; }
.st-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; }
.st-head h2 svg { color: var(--accent); }
.st-sub { margin: 0 0 6px; color: var(--muted); font-size: 12px; }
.st-angles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.st-angles button { height: 34px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-2); color: var(--text-2); font-size: 12px; }
.st-angles button:hover { border-color: var(--line-hover); color: var(--text); }
.st-angles button.on { border-color: var(--accent); background: var(--accent-bg); color: var(--text); font-weight: 600; }
.st-fine summary { cursor: pointer; color: var(--text-2); font-size: 12px; margin: 4px 0; }
.st-range { display: grid; grid-template-columns: 74px 1fr 40px; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); }
.st-range input { width: 100%; accent-color: var(--accent); }
.st-range output { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.st-seg button { font-size: 12px; }
.st-swatches { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.st-swatches .sw { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); padding: 0; }
.st-swatches .sw.on { outline: 2px solid var(--accent); outline-offset: 2px; }
.sw-transparent { background: repeating-conic-gradient(#d9dce1 0% 25%, #fff 0% 50%) 0 0 / 10px 10px; }
.sw-white { background: #fff; } .sw-light { background: #eef0f3; } .sw-dark { background: #121316; }
.sw-teal { background: linear-gradient(135deg, #19c3b1, #0b7a6f); }
/* Custom colour: a colour wheel, with the picked colour in the middle once chosen */
.st-swatches .sw-custom { --c: #ffffff; background: radial-gradient(circle, var(--c) 0 34%, #fff 35% 44%, transparent 45%), conic-gradient(#f44, #fd3, #4d4, #3cf, #36f, #c3f, #f44); border-color: transparent; }
.st-color { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.st-foot { margin-top: auto; padding-top: 12px; }

/* Live studio: the real device over the studio stage */
.studio-live .bezel { outline: 0 !important; box-shadow: none !important; }
.studio-live .page-state { pointer-events: none; }
.st-glare { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 20; mix-blend-mode: screen;
  background: linear-gradient(140deg, rgba(255,255,255,.2) 0%, rgba(255,255,255,.07) 30%, rgba(255,255,255,0) 55%); }
body.capturing .studio, body.capturing .st-glare { visibility: hidden; }
.st-live { display: flex; gap: 6px; align-items: flex-start; margin: 0 0 6px; padding: 8px 10px; border-radius: var(--radius); background: var(--accent-bg); color: var(--text-2); font-size: 12px; }
.st-live svg { flex: none; color: var(--accent); margin-top: 1px; }
.st-preview { pointer-events: none; }

/* Studio: surfaces, sizes, position */
.st-stage { cursor: grab; touch-action: none; }
.st-stage.dragging { cursor: grabbing; }
.st-surfaces { margin-top: 6px; }
.sw-surf[data-bg="wood"] { background: repeating-linear-gradient(8deg, #c49c70 0 3px, #ad8457 3px 5px, #bf9566 5px 9px); }
.sw-surf[data-bg="marble"] { background: linear-gradient(125deg, transparent 40%, #a9abaf 44%, transparent 47%), linear-gradient(35deg, transparent 60%, #c6c8cc 62%, transparent 64%), #eeeeec; }
.sw-surf[data-bg="concrete"] { background: radial-gradient(circle at 30% 30%, #b9b9ba, #9c9c9e); }
.sw-surf[data-bg="linen"] { background: repeating-linear-gradient(0deg, #e6ddc9 0 1px, #d9cfb9 1px 2px), #e2d8c3; }
.st-swatches .sw-image { display: grid; place-items: center; color: var(--text-2); background: var(--panel-2); }
.st-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.st-grid button { height: 30px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-2); color: var(--text-2); font-size: 12px; }
.st-grid button:hover { border-color: var(--line-hover); color: var(--text); }
.st-grid button.on { border-color: var(--accent); background: var(--accent-bg); color: var(--text); font-weight: 600; }
.st-custom { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; color: var(--text-2); }
.st-custom input { width: 72px; height: 28px; padding: 0 6px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-2); color: var(--text); }
.st-res { display: grid; grid-template-columns: 74px 1fr; align-items: center; gap: 8px; margin-top: 8px; }
.st-res .pn-label { margin: 0; }

/* Top-bar Mockup button: teal so the studio is easy to find */
.btn-studio { height: 32px; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; border-radius: var(--radius); border: 1px solid var(--accent); background: var(--accent-bg); color: var(--text); font-weight: 600; }
.btn-studio svg { color: var(--accent); }
.btn-studio:hover { background: var(--accent); color: var(--on-accent); }
.btn-studio:hover svg { color: var(--on-accent); }
.btn-studio .pro-tag { margin-left: 2px; }
body.capturing .btn-studio { visibility: hidden; }

/* Brand mark */
.brand { display: inline-flex; align-items: center; gap: 8px; margin-right: 6px; color: var(--text); font-weight: 700; font-size: 15px; letter-spacing: -.01em; text-decoration: none; flex: none; }
.brand img { border-radius: 6px; display: block; }
@media (max-width: 1100px) { .brand span { display: none; } }
body.capturing .brand { visibility: hidden; }
