/* Tapclave demo stage: a room with a monitor and a phone on a stand.
   Everything inside #scene is laid out on a fixed 1920 × 1080 canvas and
   scaled to fit the window; #world inside it is the "camera". */
:root {
  --brand: #ff4d6d;
  --ink: #f4f4f6;
  --muted: #9a9aa5;
  --ease: cubic-bezier(.22, 1, .36, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #07070a; color: var(--ink); overflow: hidden;
  font: 14px/1.4 "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; }

#viewport { position: fixed; inset: 0; overflow: hidden; background: radial-gradient(120% 90% at 40% 20%, #15151c 0%, #08080b 60%, #050507 100%); }
#scene { position: absolute; left: 50%; top: 50%; width: 1920px; height: 1080px; transform-origin: 0 0; }
#world { position: absolute; inset: 0; transform-origin: 0 0; }

/* ---------- Room ---------- */
.room, .wall, .desk, .room { inset: -400px; }
.wall { inset: 0; background:
  radial-gradient(900px 520px at 46% 38%, rgba(255, 77, 109, .07), transparent 70%),
  radial-gradient(1200px 700px at 50% 30%, #1a1a22 0%, #101016 55%, #0a0a0e 100%); }
.desk { left: 0; right: 0; top: 1270px; bottom: 0;
  background: linear-gradient(180deg, #24201d 0%, #191614 18%, #110f0e 100%);
  box-shadow: 0 -1px 0 rgba(255, 255, 255, .06), 0 -40px 80px -20px rgba(0, 0, 0, .6) inset; }
.desk::before { content: ""; position: absolute; inset: 0; opacity: .5;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.012) 0 2px, transparent 2px 9px); }

/* ---------- Monitor ---------- */
.monitor { position: absolute; left: 96px; top: 66px; width: 1260px; }
.bezel { position: relative; padding: 12px; border-radius: 18px; background: linear-gradient(180deg, #1c1c21, #0e0e11);
  box-shadow: 0 0 0 1px rgba(255,255,255,.06) inset, 0 40px 90px -30px rgba(0,0,0,.85), 0 0 120px -40px rgba(120, 140, 255, .25); }
.screen { position: relative; width: 1236px; height: 695.25px; overflow: hidden; border-radius: 6px; background: #000; }
.neck { width: 150px; height: 120px; margin: -2px auto 0; background: linear-gradient(90deg, #121216, #23232a 50%, #121216);
  clip-path: polygon(14% 0, 86% 0, 100% 100%, 0 100%); }
.foot { width: 420px; height: 22px; margin: -2px auto 0; border-radius: 10px 10px 16px 16px; background: linear-gradient(180deg, #2a2a31, #121216);
  box-shadow: 0 18px 30px -10px rgba(0,0,0,.8); }

/* ---------- The PC desktop (1920 × 1080, scaled into the screen) ---------- */
.desktop { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform: scale(.64375); transform-origin: 0 0; overflow: hidden;
  font: 15px/1.4 "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif; }
.wallpaper { position: absolute; inset: 0; background:
  radial-gradient(900px 600px at 78% 70%, rgba(255, 77, 109, .38), transparent 70%),
  radial-gradient(1000px 700px at 18% 20%, rgba(80, 90, 255, .35), transparent 70%),
  linear-gradient(135deg, #0d0f1f, #1a0f22 55%, #0b0b12); }
.desktop.minimized .win { transform: translateY(70px) scale(.92); opacity: 0; pointer-events: none; }

.win { position: absolute; border-radius: 12px; overflow: hidden; background: #111; box-shadow: 0 30px 70px -20px rgba(0,0,0,.75), 0 0 0 1px rgba(255,255,255,.08);
  transition: transform .45s var(--ease), opacity .3s ease, left .55s var(--ease), top .55s var(--ease), width .55s var(--ease), height .55s var(--ease), border-radius .55s; }
.win.opening { transform: scale(.94); opacity: 0; }
.win iframe { display: block; width: 100%; height: 100%; border: 0; background: #000; }
.win-controls { position: absolute; top: 0; right: 0; height: 40px; display: flex; z-index: 3; }
.win-controls span { width: 46px; display: grid; place-items: center; color: #a1a1aa; font-size: 13px; }
.win-controls .close:hover { background: #c42b1c; color: #fff; }
.desktop:has(.win.full) .taskbar { transform: translateY(100%); opacity: 0; }
.taskbar { transition: transform .5s var(--ease), opacity .3s; }
.win.full { left: 0 !important; top: 0 !important; width: 1920px !important; height: 1080px !important; border-radius: 0; z-index: 900 !important; }

/* Browser */
.browser { background: #1f1f23; }
.browser .win-bar { position: relative; height: 42px; background: #19191c; display: flex; align-items: flex-end; padding-left: 8px; }
.tabs { display: flex; align-items: flex-end; gap: 2px; height: 100%; }
.tab { height: 34px; padding: 0 16px; display: flex; align-items: center; gap: 9px; border-radius: 10px 10px 0 0; color: #a1a1aa; font-size: 13px; max-width: 300px; white-space: nowrap; overflow: hidden; }
.tab.active { background: #2a2a2f; color: #eee; }
.fav { width: 14px; height: 14px; border-radius: 4px; background: #555; flex: none; }
.fav.red { background: #ef4444; }
.newtab { color: #888; padding: 0 12px 8px; }
.omnibox { height: 44px; background: #2a2a2f; display: flex; align-items: center; gap: 14px; padding: 0 14px; border-bottom: 1px solid #000; }
.nav { color: #8a8a92; letter-spacing: 6px; }
.url { flex: 1; height: 32px; border-radius: 16px; background: #1b1b1f; display: flex; align-items: center; gap: 8px; padding: 0 14px; color: #cfcfd4; font-size: 14px; }
.lock { font-size: 11px; opacity: .6; }
.page { position: absolute; top: 86px; left: 0; right: 0; bottom: 0; background: #0f0f10; padding: 22px 26px; display: grid; grid-template-columns: 880px 1fr; grid-template-rows: auto 1fr; gap: 16px 22px; overflow: hidden; }
.player { position: relative; width: 880px; height: 495px; border-radius: 14px; overflow: hidden; background: #000; transition: all .55s var(--ease); }
.player canvas { width: 100%; height: 100%; display: block; }
.player-ui { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 16px 10px; background: linear-gradient(transparent, rgba(0,0,0,.72)); transition: opacity .4s; }
.player.idle .player-ui { opacity: 0; }
.scrub { position: relative; height: 4px; border-radius: 2px; background: rgba(255,255,255,.25); margin-bottom: 10px; }
.scrub-buf { position: absolute; left: 0; top: 0; bottom: 0; width: 62%; border-radius: 2px; background: rgba(255,255,255,.3); }
.scrub-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 2px; background: #ef4444; }
.scrub-fill i { position: absolute; right: -6px; top: -4px; width: 12px; height: 12px; border-radius: 50%; background: #ef4444; }
.pbar { display: flex; align-items: center; gap: 16px; color: #fff; font-size: 15px; }
.pbtn { min-width: 22px; text-align: center; }
.ptime { font-variant-numeric: tabular-nums; font-size: 13px; opacity: .9; }
.pchip { font-size: 12px; font-weight: 600; padding: 2px 7px; border-radius: 5px; border: 1px solid rgba(255,255,255,.5); }
.pchip.on { background: #fff; color: #000; }
.grow { flex: 1; }
.captions { position: absolute; left: 50%; bottom: 74px; transform: translateX(-50%); padding: 4px 10px; background: rgba(0,0,0,.75); color: #fff; font-size: 20px; border-radius: 4px; white-space: nowrap; opacity: 0; transition: opacity .25s; }
.captions.on { opacity: 1; }
.player-flash { position: absolute; left: 50%; top: 50%; width: 96px; height: 96px; margin: -48px; border-radius: 50%; background: rgba(0,0,0,.55); display: grid; place-items: center; font-size: 30px; color: #fff; opacity: 0; transform: scale(.8); }
.player-flash.go { animation: pflash .7s var(--ease); }
.player-flash.wide { width: auto; height: auto; padding: 14px 22px; margin: 0; transform: translate(-50%, -50%); border-radius: 30px; font-size: 18px; font-weight: 600; }
.player-flash.wide.go { animation: pflash-wide .9s var(--ease); }
@keyframes pflash { 0% { opacity: 0; transform: scale(.7); } 25% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.25); } }
@keyframes pflash-wide { 0% { opacity: 0; } 20% { opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0; } }
.watch-meta h2 { margin: 0 0 6px; font-size: 20px; font-weight: 650; color: #f1f1f1; }
.watch-meta p { margin: 0; color: #9a9aa2; font-size: 14px; }
.upnext { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-direction: column; gap: 12px; }
.rec { display: flex; gap: 12px; color: #e8e8ea; font-size: 14px; }
.rec i { width: 150px; height: 84px; flex: none; border-radius: 9px; background: linear-gradient(135deg, hsl(var(--h) 60% 40%), hsl(calc(var(--h) + 40) 60% 18%)); }
.rec p { margin: 2px 0 0; }
.rec small { color: #8d8d95; }
/* Fullscreen video */
.win.full .page { top: 0; padding: 0; display: block; background: #000; }
.win.full .player { width: 1920px; height: 1080px; border-radius: 0; }
.win.full .win-bar, .win.full .omnibox, .win.full .watch-meta, .win.full .upnext { display: none; }
.win.full .captions { bottom: 120px; font-size: 30px; }

/* Inkwell (design app) */
.inkwell { background: #2b2b2f; color: #ddd; }
.inkwell .win-bar { position: relative; height: 40px; background: #232327; display: flex; align-items: center; padding-left: 10px; gap: 20px; }
.ink-menu { display: flex; gap: 16px; align-items: center; font-size: 13px; color: #cfcfd4; }
.ink-logo { width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; background: #2b1a05; color: #ff9a00; font-size: 12px; border: 1px solid #ff9a00; }
.ink-title { position: absolute; left: 50%; transform: translateX(-50%); font-size: 13px; color: #9a9aa2; }
.ink-options { height: 38px; background: #2f2f34; border-bottom: 1px solid #1c1c1f; display: flex; align-items: center; gap: 16px; padding: 0 14px; font-size: 13px; }
.ink-options .sep { width: 1px; height: 18px; background: #45454b; }
.ink-options .muted { color: #8a8a92; }
.sw { display: inline-block; width: 16px; height: 16px; border-radius: 3px; vertical-align: -3px; margin-left: 4px; border: 1px solid #555; }
#ink-toolname { font-weight: 600; color: #fff; min-width: 90px; }
.ink-body { position: absolute; top: 78px; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 56px 1fr 250px; }
.ink-tools { background: #323237; display: flex; flex-direction: column; align-items: center; gap: 4px; padding-top: 10px; }
.ink-tools span { width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center; font-size: 19px; color: #d4d4d8; transition: background .25s, color .25s, transform .25s var(--ease); }
.ink-tools span.on { background: #4a4a52; color: #fff; box-shadow: inset 0 0 0 1px #6a6a74; }
.ink-tools span.pulse { animation: toolpulse .5s var(--ease); }
@keyframes toolpulse { 40% { transform: scale(1.18); } }
.ink-tools hr { width: 28px; border: 0; border-top: 1px solid #4a4a50; margin: 6px 0; }
.ink-fillstroke { position: relative; width: 36px; height: 36px; margin-top: 8px; }
.ink-fillstroke b, .ink-fillstroke em { position: absolute; width: 22px; height: 22px; border-radius: 3px; }
.ink-fillstroke b { left: 0; top: 0; background: #ff7a59; z-index: 1; border: 1px solid #222; }
.ink-fillstroke em { right: 0; bottom: 0; border: 4px solid #1d1b2f; background: #323237; }
.ink-canvas { position: relative; background: #3a3a40; overflow: hidden; display: grid; place-items: center; }
.artboard-wrap { transition: transform .7s var(--ease); box-shadow: 0 20px 50px -18px rgba(0,0,0,.6); }
#artboard { display: block; background: #fff6ec; }
#artboard .draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: drawpath 1.1s var(--ease) forwards; }
@keyframes drawpath { to { stroke-dashoffset: 0; } }
#artboard .pop { transform-box: fill-box; transform-origin: center; animation: popin .6s var(--ease) both; }
@keyframes popin { from { transform: scale(0); } }
#artboard .grow-rect { transform-box: fill-box; transform-origin: 0 0; animation: growrect .65s var(--ease) both; }
@keyframes growrect { from { transform: scale(0); } }
#artboard .gone { transition: opacity .35s, transform .35s; opacity: 0; transform: scale(.9); transform-box: fill-box; transform-origin: center; }
#artboard .sel { fill: none; stroke: #2f80ff; stroke-width: 1.5; stroke-dasharray: none; pointer-events: none; }
#artboard .anchor { fill: #fff; stroke: #2f80ff; stroke-width: 1.5; }
.ink-panel { background: #2f2f34; border-left: 1px solid #1c1c1f; padding: 10px 14px; font-size: 13px; overflow: hidden; }
.ink-panel h4 { margin: 4px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: #9a9aa2; font-weight: 600; }
#ink-layers { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column-reverse; gap: 2px; }
#ink-layers li { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 6px; color: #d4d4d8; animation: layerin .4s var(--ease); }
#ink-layers li.new { background: rgba(47, 128, 255, .22); }
#ink-layers li i { width: 14px; height: 14px; border-radius: 3px; flex: none; }
@keyframes layerin { from { opacity: 0; transform: translateX(10px); } }
.props { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; color: #9a9aa2; }
.props b { color: #e4e4e7; font-weight: 500; margin-left: 6px; }

/* Taskbar */
.taskbar { position: absolute; left: 0; right: 0; bottom: 0; height: 56px; z-index: 950; display: flex; align-items: center; justify-content: center;
  background: rgba(20, 20, 26, .78); backdrop-filter: blur(30px) saturate(150%); border-top: 1px solid rgba(255,255,255,.07); }
.tb-center { display: flex; align-items: center; gap: 6px; }
.tb-start { width: 40px; height: 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 10px; }
.tb-start i { background: linear-gradient(135deg, #5aa9ff, #2f6bff); border-radius: 2px; }
.tb-search { width: 210px; height: 36px; border-radius: 18px; background: rgba(255,255,255,.08); color: #a1a1aa; display: flex; align-items: center; padding: 0 16px; margin: 0 8px; font-size: 14px; }
.tb-app { position: relative; width: 46px; height: 46px; border: 0; border-radius: 8px; background: transparent; display: grid; place-items: center; cursor: pointer; transition: background .2s; }
.tb-app:hover, .tb-app.active { background: rgba(255,255,255,.09); }
.tb-app::after { content: ""; position: absolute; bottom: 2px; left: 50%; width: 6px; height: 3px; margin-left: -3px; border-radius: 2px; background: #9a9aa2; transition: width .3s var(--ease), margin .3s var(--ease), background .3s; }
.tb-app.active::after { width: 18px; margin-left: -9px; background: #7fb2ff; }
.tb-app img { width: 28px; height: 28px; }
.tb-ico { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 700; }
.tb-ico.red { background: #ef4444; color: #fff; font-size: 11px; }
.tb-ico.ink { background: #2b1a05; color: #ff9a00; border: 1px solid #ff9a00; }
.tb-tray { position: absolute; right: 14px; display: flex; align-items: center; gap: 14px; color: #ddd; font-size: 13px; }
.tb-tray img { width: 20px; height: 20px; }
.tb-clock { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
.tb-clock b { font-weight: 500; }
.tb-clock small { font-size: 12px; color: #c4c4ca; }

/* Volume flyout, toast, notices, flash, lock */
.osd { position: absolute; left: 50%; bottom: 76px; z-index: 960; display: flex; align-items: center; gap: 16px; width: 330px; padding: 16px 22px; margin-left: -165px;
  border-radius: 14px; background: rgba(32, 32, 38, .9); backdrop-filter: blur(30px); box-shadow: 0 20px 40px -14px rgba(0,0,0,.7), inset 0 0 0 1px rgba(255,255,255,.08);
  opacity: 0; transform: translateY(16px); transition: opacity .3s, transform .45s var(--ease); font-size: 18px; }
.osd.show { opacity: 1; transform: none; }
.osd-bar { flex: 1; height: 6px; border-radius: 3px; background: rgba(255,255,255,.18); overflow: hidden; }
.osd-bar i { display: block; height: 100%; width: 60%; background: #7fb2ff; border-radius: 3px; transition: width .12s linear; }
.osd b { width: 34px; text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; font-size: 17px; }
.pc-toast { position: absolute; left: 50%; bottom: 84px; z-index: 961; padding: 12px 20px; border-radius: 12px; background: rgba(32, 32, 38, .92); backdrop-filter: blur(24px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); color: #eee; font-size: 16px; transform: translate(-50%, 16px); opacity: 0; transition: opacity .3s, transform .45s var(--ease); white-space: nowrap; }
.pc-toast.show { opacity: 1; transform: translate(-50%, 0); }
.notices { position: absolute; right: 16px; bottom: 72px; z-index: 970; width: 400px; display: flex; flex-direction: column; gap: 10px; }
.card { position: relative; display: flex; gap: 13px; padding: 14px 16px 14px 14px; border-radius: 18px; background: rgba(24, 25, 32, .9); color: #f4f4f6;
  backdrop-filter: blur(24px) saturate(160%); box-shadow: 0 14px 34px -12px rgba(0,0,0,.55), inset 0 0 0 1px rgba(255,255,255,.09);
  transform: translateX(115%) scale(.96); opacity: 0; transition: transform .55s cubic-bezier(.2,1.2,.3,1), opacity .35s ease; font-size: 15px; }
.card.in { transform: none; opacity: 1; }
.card.out { transform: translateX(30%) scale(.97); opacity: 0; transition: transform .35s ease-in, opacity .3s ease-in; }
.card::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 3px; border-radius: 2px; background: var(--accent, #fff); opacity: .9; }
.card .icon { width: 40px; height: 40px; border-radius: 11px; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 17px; color: #fff; }
.card .meta { font-size: 13px; opacity: .6; }
.card .meta b { font-weight: 600; }
.card .title { font-weight: 650; }
.card .text { opacity: .8; }
.card .bar { position: absolute; left: 16px; right: 16px; bottom: 6px; height: 2px; border-radius: 1px; background: var(--accent, #fff); opacity: .35; transform-origin: left; }
.flash { position: absolute; inset: 0; z-index: 990; background: #fff; opacity: 0; pointer-events: none; }
.flash.go { animation: shot .5s ease-out; }
@keyframes shot { 0% { opacity: .85; } 100% { opacity: 0; } }
.lock { position: absolute; inset: 0; z-index: 995; display: flex; flex-direction: column; align-items: center; padding-top: 220px; color: #fff;
  background: radial-gradient(900px 600px at 70% 70%, rgba(255,77,109,.35), transparent 70%), linear-gradient(135deg, #0d0f1f, #1a0f22);
  backdrop-filter: blur(30px); opacity: 0; pointer-events: none; transition: opacity .6s; }
.lock.show { opacity: 1; pointer-events: auto; }
.lock b { font-size: 150px; font-weight: 600; line-height: 1; }
.lock span { font-size: 26px; margin-top: 14px; }
.lock small { margin-top: auto; margin-bottom: 120px; font-size: 16px; opacity: .7; }

.cursor { position: absolute; left: 0; top: 0; z-index: 999; width: 40px; height: 40px; background-size: 40px 40px !important; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 26'><path d='M4 2 L4 21 L9 16.5 L12.6 24 L16 22.4 L12.5 15.2 L19 15 Z' fill='white' stroke='black' stroke-width='1.4' stroke-linejoin='round'/></svg>") no-repeat; }
.cursor.show { opacity: 1; }
.cursor { filter: drop-shadow(0 3px 6px rgba(0,0,0,.6)); }
.cursor.press { transform: scale(.86); }

/* ---------- Phone on its stand ---------- */
.rig { position: absolute; left: 1600px; top: 760px; width: 0; height: 0; transition: left 1.15s var(--ease), top 1.15s var(--ease); z-index: 5; }
.phone { position: absolute; left: -440px; top: -213px; width: 880px; height: 426px; border-radius: 56px; padding: 18px;
  background: #141418; box-shadow: 0 0 0 2px #2a2b31 inset, 0 40px 70px -30px rgba(0,0,0,.85);
  transform: perspective(1600px) rotateX(var(--rx, 8deg)) rotateY(var(--ry, 0deg)) rotateZ(var(--rz, 0deg)) scale(var(--s, .5));
  transition: transform 1.15s var(--ease); }
.phone-screen { position: relative; width: 844px; height: 390px; border-radius: 42px; overflow: hidden; background: #000; }
.phone-screen iframe { display: block; width: 844px; height: 390px; border: 0; background: #000; }
.punch { position: absolute; left: 30px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: #050506; box-shadow: 0 0 0 2px #15161a; z-index: 3; }
.ripples { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.ripples i { position: absolute; width: 70px; height: 70px; margin: -35px; border-radius: 50%; background: rgba(255,255,255,.35); animation: ripple .55s ease-out forwards; }
@keyframes ripple { from { transform: scale(.3); opacity: .9; } to { transform: scale(1.4); opacity: 0; } }
.focus-pill { position: absolute; left: 50%; top: -158px; transform: translate(-50%, 10px); padding: 7px 14px; border-radius: 20px; background: rgba(30,30,38,.9); font-size: 15px; color: #ddd;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); opacity: 0; transition: opacity .4s, transform .5s var(--ease); white-space: nowrap; }
.focus-pill.show { opacity: 1; transform: translate(-50%, 0); }

.stand { position: absolute; left: 1390px; top: 858px; width: 420px; height: 90px; z-index: 6; pointer-events: none; }
.stand i { position: absolute; left: 50%; display: block; transform: translateX(-50%); }
.stand .ledge { top: 0; width: 420px; height: 16px; border-radius: 8px; background: linear-gradient(180deg, #2a2a31, #17171b); box-shadow: 0 6px 14px -6px rgba(0,0,0,.8); }
.stand .neck { top: 14px; width: 54px; height: 58px; background: linear-gradient(90deg, #121216, #22222a 50%, #121216); clip-path: polygon(18% 0, 82% 0, 100% 100%, 0 100%); z-index: -1; }
.stand .foot { top: 70px; width: 230px; height: 14px; border-radius: 8px 8px 12px 12px; background: linear-gradient(180deg, #2a2a31, #121216); box-shadow: 0 14px 24px -10px rgba(0,0,0,.8); }
.phone-shadow { position: absolute; left: 1440px; top: 930px; width: 320px; height: 40px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0,0,0,.6), transparent); z-index: 3; }

/* The phone's camera, while scanning the pairing code */
.camview { position: absolute; inset: 0; z-index: 4; background: #0b0b0e; opacity: 0; pointer-events: none; transition: opacity .35s; overflow: hidden; }
.camview.show { opacity: 1; }
.cam-feed { position: absolute; inset: -30px; display: grid; place-items: center; background: radial-gradient(500px 300px at 50% 50%, #23232b, #0b0b0e); animation: shake 2.4s ease-in-out infinite; filter: blur(5px); transition: filter .5s; }
.camview.sharp .cam-feed { filter: none; }
.cam-card { padding: 14px; border-radius: 14px; background: #fff; box-shadow: 0 0 60px rgba(255,255,255,.12); transform: scale(.85); transition: transform .9s var(--ease); }
.camview.sharp .cam-card { transform: scale(1); }
.cam-card img { display: block; width: 230px; height: 230px; }
@keyframes shake { 0%,100% { transform: translate(0,0) rotate(0); } 30% { transform: translate(6px,-4px) rotate(.6deg); } 60% { transform: translate(-5px,3px) rotate(-.5deg); } }
.cam-frame { position: absolute; left: 50%; top: 50%; width: 290px; height: 290px; margin: -145px; transition: transform .4s var(--ease); }
.cam-frame i { position: absolute; width: 46px; height: 46px; border: 5px solid #fff; transition: border-color .3s; }
.cam-frame i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; border-radius: 16px 0 0 0; }
.cam-frame i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; border-radius: 0 16px 0 0; }
.cam-frame i:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 16px; }
.cam-frame i:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; border-radius: 0 0 16px 0; }
.camview.found .cam-frame { transform: scale(.9); }
.camview.found .cam-frame i { border-color: #34d399; }
.cam-line { position: absolute; left: 50%; top: 50%; width: 260px; height: 3px; margin-left: -130px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--brand), transparent);
  box-shadow: 0 0 18px var(--brand); animation: scanline 1.6s ease-in-out infinite; }
.camview.found .cam-line { opacity: 0; }
@keyframes scanline { 0%,100% { transform: translateY(-125px); } 50% { transform: translateY(125px); } }
.cam-hint { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); padding: 7px 16px; border-radius: 18px; background: rgba(0,0,0,.6); font-size: 16px; white-space: nowrap; }

/* ---------- Visitor guide ---------- */
.guide { position: fixed; left: 20px; bottom: 20px; z-index: 50; width: min(380px, calc(100vw - 40px)); padding: 16px 18px; border-radius: 18px;
  background: rgba(16, 16, 20, .82); backdrop-filter: blur(20px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 20px 50px -20px rgba(0,0,0,.8);
  transition: opacity .4s, transform .5s var(--ease); }
.guide-head { display: flex; align-items: center; gap: 9px; font-size: 15px; }
.guide-head img { width: 22px; height: 22px; }
.guide-head span { margin-left: auto; font-size: 12px; color: var(--muted); padding: 3px 9px; border-radius: 10px; background: rgba(255,255,255,.06); }
.guide p { margin: 10px 0 14px; color: #c9c9d0; }
.guide p b { color: #fff; font-weight: 600; }
.guide-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.g-btn { border: 0; cursor: pointer; padding: 8px 14px; border-radius: 10px; background: var(--brand); color: #fff; font-weight: 600; font-size: 13px; transition: opacity .2s, transform .2s; }
.g-btn:disabled { opacity: .35; cursor: default; }
.g-btn:not(:disabled):active { transform: scale(.97); }
.g-seg { display: inline-flex; padding: 3px; border-radius: 10px; background: rgba(255,255,255,.06); }
.g-seg button { border: 0; background: none; cursor: pointer; padding: 5px 11px; border-radius: 7px; font-size: 13px; color: var(--muted); }
.g-seg button.on { background: rgba(255,255,255,.12); color: #fff; }
body.tour .guide { display: none; }
@media (max-width: 640px) {
  .guide { left: 10px; right: 10px; bottom: 10px; width: auto; padding: 12px 14px; }
  .guide p { margin: 6px 0 10px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { #world, .rig, .phone { transition-duration: .01s; } }

/* ---------- Window manager: focus, minimise, maximise, close, move ---------- */
.screen, .screen * { cursor: none !important; }
.win { transform-origin: 50% 100%; }
.win.focused { box-shadow: 0 40px 90px -24px rgba(0,0,0,.85), 0 0 0 1px rgba(255,255,255,.12); }
.win:not(.focused) .win-bar, .win:not(.focused) .omnibox { filter: saturate(.7) brightness(.85); }
.win.moving { transition: none !important; }
.win.min { transform: translateY(520px) scale(.18); opacity: 0; pointer-events: none; transition: transform .5s cubic-bezier(.5,0,.75,0), opacity .4s .1s; }
.win.closed { transform: scale(.94); opacity: 0; pointer-events: none; transition: transform .25s ease-in, opacity .2s; }
.win.max { left: 0 !important; top: 0 !important; width: 1920px !important; height: 1024px !important; border-radius: 0; }
.win.max.focused { box-shadow: none; }
.win-controls span { transition: background .15s, color .15s; }
.win-controls span:hover { background: rgba(255,255,255,.08); color: #fff; }
.tb-app.closed::after { opacity: 0; }
.tb-app:active { transform: scale(.92); }
.tb-app { transition: background .2s, transform .15s; }
#pp-icon, #vol-icon, .pchip, .pbtn, .scrub, .tab, .ink-tools span { pointer-events: auto; }
.scrub { height: 6px; }
.tab:not(.active):hover { background: rgba(255,255,255,.05); color: #ddd; }
.ink-tools span:hover { background: #45454c; }
/* The inbox behind the browser's Mail tab */
.mail-page { position: absolute; top: 86px; left: 0; right: 0; bottom: 0; display: none; grid-template-columns: 220px 1fr; background: #121214; color: #e8e8ea; font-size: 15px; }
.on-mail .mail-page { display: grid; }
.on-mail .page:not(.mail-page) { display: none; }
.mail-page aside { padding: 22px; display: flex; flex-direction: column; gap: 6px; border-right: 1px solid #222; }
.mail-page aside b { font-size: 20px; margin-bottom: 12px; }
.mail-page aside span { padding: 8px 12px; border-radius: 8px; color: #a1a1aa; }
.mail-page aside span.on { background: rgba(59,130,246,.18); color: #cfe0ff; }
.mail-page ul { list-style: none; margin: 0; padding: 12px 0; }
.mail-page li { display: grid; grid-template-columns: 180px 1fr auto; gap: 16px; padding: 14px 26px; border-bottom: 1px solid #1d1d20; }
.mail-page li:hover { background: #18181b; }
.mail-page li span { color: #a1a1aa; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-page time { color: #8a8a92; font-size: 13px; }
