/* FaceWin web app — Web 3.0, the owner's mockup: a deep navy-purple night, glass cards with a thin
   light edge, a purple device card, green unlocks, violet locks, blue "Win". Dark only (the mockup).
   Sizes are the mockup's, measured at 390 px wide; they hold from 375 to 430 px. */
:root {
  --blue: #3d6dff; --blue-dk: #2f56e0; --indigo: #4f46e5; --green: #22c55e; --green-hi: #4ade80; --violet: #8b5cf6;
  --lilac: #a78bfa; --purple: #7c5cff; --purple-dk: #5a3df0; --red: #ef4444; --coral: #f97066; --amber: #f59e0b;
  /* the accent the older rules call teal (buttons, links, switches): purple now */
  --teal: #7c5cff; --teal-dk: #5a3df0;
  --bg: #0e1020; --card: rgba(31, 35, 64, .72); --card-solid: #1b1f38; --card-2: rgba(44, 48, 86, .7);
  --text: #ffffff; --muted: #b3b1c9; --dim: #8f8daa; --line: rgba(255, 255, 255, .08);
  --glass: rgba(27, 30, 55, .84); --ring: rgba(255, 255, 255, .1); --edge: rgba(160, 140, 255, .22);
  --safe-t: env(safe-area-inset-top); --safe-b: env(safe-area-inset-bottom);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", Inter, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; }
body { overscroll-behavior-y: none; overflow-x: hidden; }
/* the night sky behind every screen: a faint violet glow at the top, deep navy below (fixed, so it never scrolls) */
body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(90% 38% at 18% 0%, rgba(74, 62, 160, .28), transparent 70%),
    radial-gradient(70% 30% at 100% 22%, rgba(88, 46, 170, .18), transparent 70%),
    linear-gradient(180deg, #11122a 0%, #0e1022 45%, #0c0f1e 100%); }
h1 { font-size: 28px; margin: 12px 0 6px; font-weight: 800; letter-spacing: -0.02em; }
h1.big { font-size: 31px; line-height: 1.12; margin-bottom: 20px; }
h2 { font-size: 17px; margin: 0; font-weight: 700; }
h3 { margin: 0; }
p { margin: 4px 0; line-height: 1.4; }
button { font-family: inherit; }
.muted { color: var(--muted); } .small { font-size: 13px; } .center-text { text-align: center; }
.white { color: #fff; } .white-dim { color: rgba(255,255,255,.85); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg { display: block; }

.view { display: none; min-height: 100%; padding-top: var(--safe-t); padding-bottom: var(--safe-b);
  animation: fadein .35s ease; }
.view.active { display: flex; flex-direction: column; }
.view.center { align-items: center; justify-content: center; text-align: center; padding-left: 28px; padding-right: 28px; }
.view.pad { padding-left: 24px; padding-right: 24px; padding-bottom: calc(24px + var(--safe-b)); }
.pad-x { padding: 0 13px; }
.spacer { flex: 1; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.gradient { background: radial-gradient(80% 60% at 20% 10%, rgba(120, 110, 230, .55), transparent 65%),
  linear-gradient(160deg, #3d3290 0%, #2a1f66 50%, #1c1450 100%); }
.dark { background: #000; color: #fff; }

/* buttons: purple, glass edged (the mockup's "Add Device" / segmented pill) */
.btn { width: 100%; border: 1px solid rgba(190, 170, 255, .4); border-radius: 16px; padding: 15px; font-size: 16.5px; font-weight: 700;
  background: linear-gradient(180deg, #7f62ff 0%, #5b3ef0 100%); color: #fff; margin-top: 10px;
  box-shadow: 0 8px 22px rgba(108, 76, 255, .32), inset 0 1px 0 rgba(255,255,255,.22); cursor: pointer; }
.btn:active { transform: scale(.98); }
.btn-white { background: #fff; color: #4c2fd6; border-color: transparent; box-shadow: none; max-width: 420px; margin-top: 28px; }
.btn-ghost { background: transparent; color: var(--muted); border-color: transparent; box-shadow: none; }
.btn-soft { background: rgba(124, 92, 255, .16); color: #c9bbff; border-color: rgba(167, 139, 250, .3); box-shadow: none; }
.btn-deny { background: rgba(239, 68, 68, .14); color: #ff8b8b; border-color: rgba(248, 113, 113, .32); box-shadow: none; }
.btn:disabled { opacity: .55; }
.link, .link-white { background: none; border: 0; font-size: 17px; color: var(--lilac); padding: 8px 4px; cursor: pointer; }
.link-white { color: #fff; }
.icon-btn { position: relative; flex: none; background: rgba(32, 34, 58, .92); border: 1px solid rgba(255, 255, 255, .13); border-radius: 50%;
  width: 35px; height: 35px; padding: 0; display: grid; place-items: center; color: #f4f3fb; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 4px 12px rgba(0,0,0,.25); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn:active { transform: scale(.95); }

.hero-icon img { width: 92px; height: 92px; border-radius: 22px; box-shadow: 0 10px 30px rgba(60, 30, 160, .45); }
.steps { text-align: left; margin: 22px auto; padding-left: 22px; max-width: 320px; font-size: 17px; line-height: 2; }
.share-ico { display: inline-block; border: 2px solid var(--lilac); color: var(--lilac); border-radius: 6px;
  width: 22px; height: 22px; line-height: 16px; text-align: center; font-weight: 800; }

/* app lock */
.pulse { padding: 26px; border-radius: 50%; background: rgba(255,255,255,.12); animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { padding: 34px; background: rgba(255,255,255,.18); } }
.lock-disc { width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center; font-size: 50px;
  background: linear-gradient(160deg, rgba(255,255,255,.95), rgba(225,218,255,.9)); box-shadow: 0 14px 40px rgba(40, 10, 120, .45); }

/* onboarding */
.hero-rings { width: 168px; height: 168px; margin: 0 auto; border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 92, 255, .32), rgba(61, 109, 255, .12) 70%); display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px var(--edge); }
.hero-core { width: 108px; height: 108px; border-radius: 50%; display: grid; place-items: center; font-size: 46px;
  background: linear-gradient(160deg, #7f62ff, #4b2fd8); box-shadow: 0 12px 34px rgba(108, 76, 255, .45); }
.feature { display: flex; gap: 14px; margin-bottom: 16px; }
.feature p { color: var(--muted); font-size: 15px; }
.f-ico { flex: none; width: 44px; height: 44px; border-radius: 13px; background: linear-gradient(180deg, #4a3d92, #362c72);
  border: 1px solid rgba(170, 150, 255, .3); display: grid; place-items: center; font-size: 20px; }

/* scanner */
#v-scan { position: fixed; inset: 0; }
#scan-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; left: 50%; top: 46%; width: 72vw; height: 72vw; max-width: 340px; max-height: 340px;
  transform: translate(-50%, -50%); border: 3px solid var(--lilac); border-radius: 28px;
  box-shadow: 0 0 0 100vmax rgba(8, 8, 24, .62), 0 0 24px rgba(167, 139, 250, .6); }
.scan-top { position: absolute; top: calc(8px + var(--safe-t)); left: 0; right: 0; display: flex;
  justify-content: space-between; align-items: center; padding: 0 12px; font-weight: 700; }
.scan-hint { position: absolute; left: 24px; right: 24px; bottom: calc(48px + var(--safe-b)); text-align: center; color: #fff; font-size: 16px; }

/* ---------- Home ---------- */
.appbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 8px; }
.appbar .title { font-size: 34px; margin: 6px 0; }
/* the header: the Face ID tile, FaceWin (Win in blue), the subtitle, the bell and the gear */
.home-bar { padding: 9px 22px 0 23px; gap: 10px; }
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-glyph { flex: none; width: 38px; height: 36px; border-radius: 11px; color: #94a6ff;
  background: linear-gradient(160deg, #3c3a7c 0%, #27254f 100%); border: 1px solid rgba(150, 140, 255, .24);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 6px 16px rgba(0,0,0,.3); display: grid; place-items: center; }
.brand-glyph svg { width: 23px; height: 23px; }
.brand-text { min-width: 0; }
.home-bar .title { font-size: 21px; margin: 0; line-height: 1.08; letter-spacing: -0.01em; font-weight: 800; }
.home-bar .title .accent { color: var(--blue); }
.subtitle { margin: 2px 0 0; font-size: 11px; color: #c5c3d8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: .01em; }
.bar-btns { display: flex; gap: 13px; flex: none; }
.bell-dot { position: absolute; top: 3px; right: 4px; width: 6px; height: 6px; border-radius: 50%; background: #a374ff;
  box-shadow: 0 0 0 1.5px #1a1b30, 0 0 6px rgba(163, 116, 255, .8); }
.tab-pane { display: flex; flex-direction: column; }

/* the device card: purple glass, a light edge, a soft glow sweeping across its lower right */
.hero { position: relative; margin-top: 10px; border-radius: 22px; padding: 14px 15px 14px 17px; overflow: hidden; isolation: isolate;
  background: radial-gradient(75% 85% at 0% 0%, rgba(118, 108, 228, .62), transparent 62%),
    radial-gradient(55% 70% at 100% 88%, rgba(128, 52, 232, .7), transparent 72%),
    linear-gradient(162deg, #3a3189 0%, #2a2068 46%, #2a1763 100%);
  border: 1.5px solid rgba(168, 140, 255, .55);
  box-shadow: 0 18px 44px rgba(52, 20, 140, .38), inset 0 1px 0 rgba(255,255,255,.14); }
.hero::after { content: ''; position: absolute; z-index: -1; pointer-events: none; left: 52%; top: 70%; width: 110%; height: 120%;
  border-radius: 50%; border-top: 2px solid rgba(190, 130, 255, .5); transform: rotate(-14deg); transform-origin: 0 0; filter: blur(1px);
  box-shadow: 0 -8px 26px rgba(160, 90, 255, .32), inset 0 14px 30px rgba(150, 80, 255, .25); }
.hero.unlocked { background: radial-gradient(75% 85% at 0% 0%, rgba(108, 118, 232, .6), transparent 62%),
    radial-gradient(55% 70% at 100% 88%, rgba(70, 90, 232, .55), transparent 72%),
    linear-gradient(162deg, #33338c 0%, #262470 46%, #22205f 100%); }
.status { display: flex; align-items: center; color: #fff; position: relative; min-width: 0; padding-right: 0; }
.status.tappable { cursor: pointer; }
.status.tappable:active { opacity: .92; }
.status:focus-visible { outline: 2px solid rgba(255,255,255,.7); outline-offset: 4px; border-radius: 14px; }
.st-art-col { flex: none; width: 92px; display: flex; flex-direction: column; align-items: center; }
.st-art { width: 92px; }
.st-fam { max-width: 100%; margin-top: 2px; font-size: 10px; font-weight: 600; color: rgba(236, 232, 255, .78); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; letter-spacing: .02em; text-align: center; }
.lap-art svg { width: 100%; height: auto; filter: drop-shadow(0 6px 9px rgba(104, 70, 255, .42)); }
.lap-img { display: block; width: 100%; height: auto; object-fit: contain; }
.st-info { flex: 1; min-width: 0; margin-left: 12px; padding: 0 0 0 14px; border-left: 1px solid rgba(255, 255, 255, .14); }
.status-top { display: flex; align-items: center; gap: 7px; padding-right: 34px; font-weight: 700; font-size: 13.5px; letter-spacing: .01em; }
.st-lap-ico svg { width: 15px; height: 15px; color: #ecebff; }
#st-laptop { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-line { display: flex; align-items: center; gap: 0; margin-top: 5px; min-width: 0; }
.st-place { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-size: 11.5px; color: #e9e7f8; }
.st-place::before { content: ''; flex: none; width: 1px; height: 11px; margin: 0 8px 0 9px; background: rgba(255,255,255,.22); }
.st-place svg { flex: none; width: 13px; height: 13px; }
.st-place span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip { flex: none; background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.16); border-radius: 20px;
  padding: 1px 9px; font-size: 11.5px; font-weight: 600; line-height: 1.2;
  letter-spacing: 0; text-transform: none; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; cursor: default; }
/* live connection state: a dot like the Android app */
.chip.online::before, .chip.busy::before, .chip.offline::before { content: ''; width: 7px; height: 7px; border-radius: 50%; flex: none; }
.chip.online { background: rgba(34, 197, 94, .17); border-color: rgba(74, 222, 128, .34); color: #e3ffec; padding-left: 7px; }
.chip.online::before { background: var(--green-hi); box-shadow: 0 0 6px rgba(74, 222, 128, .9); }
.chip.busy { background: rgba(245, 158, 11, .16); border-color: rgba(251, 191, 36, .32); padding-left: 7px; }
.chip.busy::before { background: var(--amber); }
.chip.offline { background: rgba(148, 163, 184, .14); border-color: rgba(148, 163, 184, .3); color: #dfe3ea; padding-left: 7px; }
.chip.offline::before { background: #94a3b8; }
.status-main { display: flex; align-items: center; gap: 11px; margin-top: 10px; }
.st-icon { flex: none; width: 43px; height: 43px; border-radius: 12px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(160deg, rgba(150, 132, 236, .55), rgba(110, 90, 200, .45));
  border: 1px solid rgba(214, 200, 255, .32); box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 6px 16px rgba(30, 10, 90, .3); }
.st-icon > svg { width: 22px; height: 22px; stroke-width: 2.1; }
.hero.unlocked .st-icon { background: linear-gradient(160deg, rgba(74, 222, 128, .35), rgba(34, 160, 90, .3)); border-color: rgba(134, 239, 172, .4); }
.st-text { min-width: 0; flex: 1; }
.st-title { font-size: 26px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.02; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-sub { opacity: .92; }
.st-line2 { margin-top: 4px; font-size: 11.5px; line-height: 1.3; color: rgba(240, 236, 255, .86); }
.st-reason:empty + .st-ago .st-dotsep { display: none; }
.st-dotsep { margin: 0 4px; }
.st-ago { white-space: nowrap; }
.st-cam { display: none; }
/* the ⋯ pill at the card's top right (Devices) */
.more-btn { display: grid; place-items: center; width: 26px; height: 17px; padding: 0; border-radius: 999px; border: 0;
  background: rgba(255,255,255,.13); color: #fff; cursor: pointer; }
.more-btn svg { width: 15px; height: 15px; }
.hero-more { position: absolute; top: 13px; right: 14px; }
/* Unlock Laptop (green) and Lock (glass), side by side; Lock alone takes the row */
.hero-btns { display: flex; gap: 10px; margin-top: 16px; }
.hero.no-btns .hero-btns { display: none; }
.hero-btns .btn { margin: 0; height: 37px; padding: 0 10px; border-radius: 12px; min-width: 0; white-space: nowrap; }
.unlocknow-btn { flex: 2.85 1 0; display: flex; align-items: center; justify-content: center; gap: 9px; font-size: 17.5px; font-weight: 700;
  letter-spacing: .005em; color: #fff; text-shadow: 0 1px 1px rgba(0, 80, 20, .35);
  background: linear-gradient(180deg, #57e066 0%, #34c24c 50%, #1f9e3a 100%); border: 1px solid #22c55e;
  box-shadow: 0 7px 20px rgba(34, 197, 94, .36), inset 0 1px 0 rgba(220, 255, 220, .5); }
.unlocknow-btn::before { content: ''; flex: none; width: 19px; height: 19px; background: center / contain no-repeat
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2.5'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 7.5-2'/%3E%3Ccircle cx='12' cy='16' r='1' fill='white'/%3E%3C/svg%3E"); }
.btn-stop { background: var(--red); border-color: rgba(255, 140, 140, .4); box-shadow: none; }
.softlock-btn { flex: 1 1 0; font-size: 14.5px; font-weight: 600; background: rgba(124, 92, 255, .22); color: #fff;
  border: 1px solid rgba(160, 140, 255, .45); }   /* 1.3.28: FaceWin's own lock screen */
.locknow-btn { flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 14.5px; font-weight: 600;
  color: #fff; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 6px 16px rgba(20, 6, 70, .25); }
.locknow-btn::before { content: ''; flex: none; width: 17px; height: 17px; background: center / contain no-repeat
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2.5'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3Ccircle cx='12' cy='16' r='1' fill='white'/%3E%3C/svg%3E"); }
.locknow-msg { margin: 9px 2px 0; color: rgba(236, 232, 255, .8); }
/* Find My Laptop (Web 3.2, 1.3.26): Home's button, then the page - the owner's mockup, our own drawing */
.find-btn { width: 100%; margin: 10px 0 0; height: 37px; border-radius: 12px; font-size: 14.5px; font-weight: 600; color: #fff;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .2); }
.find-btn[hidden] { display: none; }
.find-view { --fv-edge: rgba(150, 120, 255, .38); --fv-card: rgba(28, 30, 62, .78);
  background: radial-gradient(120% 50% at 50% -8%, rgba(110, 72, 255, .30), transparent 62%),
    radial-gradient(90% 40% at 100% 108%, rgba(124, 92, 255, .30), transparent 70%), linear-gradient(180deg, #0f0f2a, #0b0d1f 60%, #0a0c1c); }
.find-more-wrap { position: relative; }
.find-menu { position: absolute; right: 0; top: 52px; z-index: 1001; min-width: 230px; max-width: 280px; padding: 6px; border-radius: 14px;
  background: #1d1f3d; border: 1px solid var(--fv-edge); box-shadow: 0 18px 40px rgba(0, 0, 0, .5); }
.find-menu button { display: block; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; text-align: left;
  color: #fff; background: transparent; font-size: 15px; cursor: pointer; }
.find-menu button:hover, .find-menu button:active { background: rgba(124, 92, 255, .18); }
/* 3.2.1: the page is exactly one screen (100dvh, no scroll); the map takes what is left */
.find-view.active { height: 100vh; height: 100dvh; overflow: hidden; }
.find-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 10px; padding: 10px 12px 8px; }
.find-float { position: absolute; top: 10px; z-index: 1000; }
.find-float.left { left: 10px; }
.find-float.right { right: 10px; }
button.find-float, .find-float-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  cursor: pointer; padding: 0; background: rgba(22, 23, 48, .82); border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
button.find-float svg, .find-float-btn svg { width: 20px; height: 20px; }
button.find-float:focus-visible, .find-float-btn:focus-visible { outline: 2px solid var(--lilac); outline-offset: 2px; }
.find-menu-note { margin: 4px 6px 6px; padding-top: 8px; border-top: 1px solid rgba(255, 255, 255, .1); color: var(--muted);
  font-size: 12.5px; line-height: 1.35; }
.find-map-card { position: relative; flex: 1 1 auto; min-height: 180px; border-radius: 22px; overflow: hidden; background: #12142a;
  border: 1.5px solid var(--fv-edge); box-shadow: 0 0 0 1px rgba(124, 92, 255, .12), 0 14px 34px rgba(8, 6, 30, .55); }
.find-map { position: absolute; inset: 0; background: #12142a; }
.find-map .leaflet-container, .find-map.leaflet-container { background: #12142a; font: 12px/1.3 inherit; }
/* a dark map from the normal OpenStreetMap tiles: the tile layer only, never the pins */
.find-map .leaflet-tile-pane { filter: invert(1) grayscale(1) brightness(.6) contrast(1.15) sepia(.4) hue-rotate(205deg) saturate(1.7); }
.find-map .leaflet-control-zoom { border: 0; border-radius: 12px; overflow: hidden; box-shadow: 0 6px 18px rgba(0, 0, 0, .45); margin: 62px 0 0 10px; }
.find-map .leaflet-control-zoom a { width: 44px; height: 44px; line-height: 42px; font-size: 22px; font-weight: 500; color: #fff;
  background: rgba(30, 32, 62, .92); border-bottom: 1px solid rgba(255, 255, 255, .1); }
.find-map .leaflet-control-zoom a:hover { background: rgba(60, 50, 120, .95); }
.find-map .leaflet-control-zoom a.leaflet-disabled { color: rgba(255, 255, 255, .35); background: rgba(30, 32, 62, .92); }
.find-map .leaflet-control-attribution { background: rgba(14, 15, 34, .72); color: #c9c6e6; border-radius: 8px 0 0 0; padding: 1px 6px; }
.find-map .leaflet-control-attribution a { color: #b9a6ff; }
.find-map.stale .leaflet-tile-pane { filter: invert(1) grayscale(1) brightness(.5) contrast(1.05); }
.find-map.stale .fm-pin, .find-map.stale .fm-acc { filter: grayscale(1); opacity: .65; }
.find-map.stale .fm-pin .halo, .find-map.stale .fm-pin .head::after { animation: none; }
.find-map-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  color: var(--muted); font-size: 14px; pointer-events: none; }
.find-map-empty svg { width: 30px; height: 30px; color: #8d7cff; }
/* the laptop pin: a round purple badge with a laptop, centred on the point, inside a soft pulsing circle
   of at least 110 px (the real accuracy circle stays subtle behind it) */
.fm-pin-wrap { background: none; border: 0; }
.fm-pin { position: relative; width: 110px; height: 110px; }
.fm-pin .halo { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid rgba(160, 136, 255, .6);
  background: radial-gradient(circle, rgba(124, 92, 255, .34) 0%, rgba(124, 92, 255, .2) 55%, rgba(124, 92, 255, .1) 100%);
  animation: fm-breathe 3s ease-in-out infinite; }
.fm-pin .head { position: absolute; left: 30px; top: 30px; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; background: radial-gradient(circle at 35% 30%, #9a7dff, #6142f0 70%); border: 3px solid #f2eeff;
  box-shadow: 0 6px 18px rgba(80, 50, 220, .6); }
.fm-pin .head svg { width: 25px; height: 25px; }
.fm-pin .tip { position: absolute; left: 49px; top: 77px; width: 12px; height: 10px; background: #f2eeff;
  clip-path: polygon(0 0, 100% 0, 50% 100%); }
.fm-pin .head::after { content: ''; position: absolute; inset: -3px; border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(140, 112, 255, .55); animation: fm-ping 2.2s ease-out infinite; }
@keyframes fm-ping { 0% { box-shadow: 0 0 0 0 rgba(140, 112, 255, .55); } 100% { box-shadow: 0 0 0 22px rgba(140, 112, 255, 0); } }
@keyframes fm-breathe { 0%, 100% { opacity: .75; transform: scale(.96); } 50% { opacity: 1; transform: scale(1); } }
.fm-acc { fill-opacity: .07; stroke-opacity: .35; }
.fm-pin .home-tag { position: absolute; left: 66px; top: 18px; display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px 3px 6px; border-radius: 10px; font-size: 12px; font-weight: 700; color: #fff; white-space: nowrap;
  background: rgba(22, 22, 48, .9); border: 1px solid rgba(165, 139, 255, .55); }
.fm-pin .home-tag svg { width: 14px; height: 14px; color: #a58bff; }
.fm-home-wrap { background: none; border: 0; }
.fm-home { display: flex; flex-direction: column; align-items: center; gap: 2px; color: #a58bff; }
.fm-home svg { width: 26px; height: 26px; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .6)); }
.fm-home span { font-size: 13px; font-weight: 700; color: #fff; padding: 3px 10px; border-radius: 10px; background: rgba(22, 22, 48, .82);
  border: 1px solid rgba(255, 255, 255, .1); }
.fm-home i { width: 9px; height: 9px; border-radius: 50%; background: #8f7bff; box-shadow: 0 0 8px #8f7bff; }
/* the device card */
.find-card { flex: none; padding: 12px 14px; border-radius: 20px; background: var(--fv-card); border: 1px solid rgba(160, 140, 255, .22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 10px 26px rgba(6, 4, 24, .4); }
.find-dev { display: flex; gap: 14px; align-items: center; }
.find-art { flex: none; width: 72px; padding: 8px; border-radius: 16px; background: rgba(10, 12, 32, .6); border: 1px solid rgba(255, 255, 255, .1); }
.find-art img, .find-art .lap-img { width: 100%; height: auto; display: block; border-radius: 6px; }
.find-dev-main { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.find-label { font-size: 17px; font-weight: 800; letter-spacing: .01em; word-break: break-all; line-height: 1.2; }
.find-pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px 5px 10px; border-radius: 999px; font-size: 14px; font-weight: 600;
  color: #d9ffe6; background: rgba(34, 197, 94, .16); border: 1px solid rgba(74, 222, 128, .45); }
.find-pill::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: #34d36e; box-shadow: 0 0 8px #34d36e; }
.find-pill:empty { display: none; }
.find-pill.stale { color: #cfcde0; background: rgba(150, 150, 170, .14); border-color: rgba(190, 190, 210, .3); }
.find-pill.stale::before { background: #9a98b3; box-shadow: none; }
.find-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; font-size: 14.5px; }
.find-stat { display: inline-flex; align-items: center; gap: 6px; }
.find-stat svg { width: 18px; height: 18px; }
.find-stat .bolt { width: 15px; height: 15px; color: #4ade80; }
.find-chg { color: var(--muted); }
.bat { position: relative; width: 26px; height: 13px; border: 2px solid #e8e6f5; border-radius: 4px; }
.bat::after { content: ''; position: absolute; right: -5px; top: 2.5px; width: 3px; height: 4px; border-radius: 0 2px 2px 0; background: #e8e6f5; }
.bat i { position: absolute; left: 1px; top: 1px; bottom: 1px; border-radius: 1.5px; background: #34d36e; }
.bat.low i { background: var(--amber); }
.bat.crit i { background: var(--red); }
.find-rows { display: grid; grid-template-columns: 1fr 1fr .9fr; margin-top: 10px; padding-top: 9px; border-top: 1px solid rgba(255, 255, 255, .1); }
.find-row { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 2px 8px; font-size: 13px; color: #e7e5f5; }
.find-row:first-child { padding-left: 0; }
.find-row + .find-row { border-left: 1px solid rgba(255, 255, 255, .12); }
.find-row svg { flex: none; width: 20px; height: 20px; color: #a58bff; }
.find-row span { min-width: 0; line-height: 1.25; }
#find-coords { font-variant-numeric: tabular-nums; font-size: 11.5px; }
#find-coords span { display: block; white-space: nowrap; }
.find-card.stale .find-label, .find-card.stale .find-rows, .find-card.stale .find-art { opacity: .55; filter: grayscale(.8); }
/* the three buttons */
.find-actions { flex: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.find-act { min-height: 72px; padding: 8px 6px; border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; color: #fff; font-size: 15.5px; font-weight: 700; line-height: 1.15; text-align: center; text-decoration: none; cursor: pointer;
  background: rgba(30, 32, 64, .8); border: 1px solid rgba(160, 140, 255, .3); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05); }
.find-act svg { width: 26px; height: 26px; }
.find-act.primary { background: linear-gradient(180deg, #8a6bff, #5d3ff0); border-color: rgba(200, 185, 255, .55);
  box-shadow: 0 10px 26px rgba(108, 76, 255, .45), inset 0 1px 0 rgba(255, 255, 255, .25); }
.find-act:disabled, .find-act[aria-disabled="true"] { opacity: .45; cursor: default; box-shadow: none; }
.find-act:not(:disabled):active { transform: scale(.98); }
.find-act.ringing { border-color: rgba(248, 113, 113, .6); background: rgba(70, 24, 48, .7); }
.find-act.ringing .spk .w1, .find-act.ringing .spk .w2 { animation: fm-wave 1.1s ease-in-out infinite; }
.find-act.ringing .spk .w2 { animation-delay: .25s; }
@keyframes fm-wave { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.find-act.busy svg { animation: fm-spin 1s linear infinite; }
@keyframes fm-spin { to { transform: rotate(360deg); } }
/* the status pill and the note */
.find-status { position: absolute; left: 12px; right: 12px; bottom: 30px; z-index: 1000; display: flex; align-items: center; gap: 9px;
  min-height: 40px; padding: 8px 14px; border-radius: 20px; font-size: 14px; font-weight: 600; line-height: 1.3;
  background: rgba(20, 21, 46, .9); border: 1px solid rgba(160, 140, 255, .3); box-shadow: 0 8px 22px rgba(0, 0, 0, .45);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.find-status-ico { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; }
.find-status-ico svg { width: 14px; height: 14px; }
.find-status.ok .find-status-ico { background: #22c55e; color: #fff; }
.find-status.busy .find-status-ico { background: #7c5cff; color: #fff; }
.find-status.warn .find-status-ico { background: var(--amber); color: #1a1205; }
.find-status.info .find-status-ico { background: rgba(255, 255, 255, .16); color: #fff; }
.find-note { flex: none; display: flex; gap: 6px; align-items: center; justify-content: center; margin: 0; color: var(--dim); font-size: 12px; white-space: nowrap; }
.find-note svg { flex: none; width: 14px; height: 14px; }
@media (max-width: 400px) {
  .find-chg { display: none; }
}
/* short screens shrink instead of scrolling (the touch targets stay at least 44 px) */
@media (max-height: 760px) {
  .find-act { min-height: 62px; font-size: 14.5px; gap: 4px; }
  .find-act svg { width: 23px; height: 23px; }
  .find-art { width: 62px; padding: 6px; }
}
@media (max-height: 640px) {
  .find-body { gap: 7px; padding: 7px 10px 6px; }
  .find-card { padding: 9px 11px; }
  .find-label { font-size: 15.5px; }
  .find-pill { font-size: 12.5px; padding: 3px 10px 3px 8px; }
  .find-stats { font-size: 13px; }
  .find-rows { margin-top: 7px; padding-top: 6px; }
  .find-row { font-size: 12px; }
  .find-row svg { width: 17px; height: 17px; }
  .find-act { min-height: 52px; gap: 2px; padding: 6px 4px; font-size: 12.5px; white-space: nowrap; }
  .find-act svg { width: 18px; height: 18px; }
  .find-art { width: 52px; }
  .find-note { display: none; }
}
@media (max-width: 380px) {
  .find-act { font-size: 13.5px; }
  .find-row { padding: 2px 5px; gap: 4px; font-size: 12px; }
  .find-row svg { width: 16px; height: 16px; }
  #find-coords { font-size: 10.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .fm-pin .halo, .fm-pin .head::after, .find-act.ringing .spk .w1, .find-act.ringing .spk .w2, .find-act.busy svg { animation: none; }
}
/* Play sound (1.3.25): the button, the laptop volume slider, Stop while it rings */
.ring-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.ring-row[hidden] { display: none; }
.ring-row .btn { width: auto; margin: 0; height: 37px; padding: 0 12px; border-radius: 12px; min-width: 0; white-space: nowrap; }
.ring-btn { flex: none; font-size: 14.5px; font-weight: 600; color: #fff; background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .2); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 6px 16px rgba(20, 6, 70, .25); }
.ring-vol { flex: 1 1 auto; display: flex; align-items: center; gap: 7px; min-width: 0; color: rgba(236, 232, 255, .85); font-size: 13px; }
.ring-vol input { flex: 1 1 auto; min-width: 0; accent-color: #a78bfa; }
.ring-vol-text { flex: none; width: 3.2em; text-align: right; font-variant-numeric: tabular-nums; }
.ring-stop { flex: none; font-size: 14.5px; font-weight: 600; }

/* the two quick tiles */
.status-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 13px 5px 0; }
.qt { display: flex; align-items: center; gap: 10px; min-width: 0; height: 51px; padding: 0 9px 0 10px; border-radius: 15px;
  background: linear-gradient(180deg, rgba(42, 45, 84, .88), rgba(29, 32, 62, .88)); border: 1px solid rgba(150, 140, 255, .2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 8px 20px rgba(0,0,0,.22); color: #fff; text-align: left; font: inherit; cursor: pointer; }
.qt:active { filter: brightness(1.12); }
.qt-ico { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(170deg, #5b4ba6, #43387f); border: 1px solid rgba(178, 160, 255, .35); box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }
.qt-ico svg { width: 18px; height: 18px; }
.qt-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.qt-text b { font-size: 14.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qt-text small { margin-top: 1px; font-size: 11.5px; color: #cdcbe0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Recent Activity and its timeline: times at the left, glowing dots on a line, glass rows */
.tl-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 18px 8px; }
.tl-title { font-size: 16.5px; font-weight: 700; letter-spacing: -0.005em; }
.all-link { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 4px 0; color: #9e7dff;
  font-size: 12.5px; font-weight: 650; cursor: pointer; }
.all-link svg { width: 12px; height: 12px; }
.filter { position: relative; display: inline-flex; align-items: center; }
.filter select { -webkit-appearance: none; appearance: none; border: 1px solid rgba(255,255,255,.14); border-radius: 999px; padding: 8px 30px 8px 14px;
  background: rgba(30, 33, 60, .85); color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.filter::after { content: ''; position: absolute; right: 13px; top: 50%; width: 6px; height: 6px; margin-top: -5px;
  border-right: 2px solid #e8e6f6; border-bottom: 2px solid #e8e6f6; transform: rotate(45deg); pointer-events: none; }
.timeline { padding: 0 20px 6px 27px; }
#timeline > .day:first-child { display: none; }   /* Home: the newest day goes without saying */
.day { margin: 12px 0 8px 82px; font-weight: 700; color: var(--dim); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.ev { display: flex; align-items: center; gap: 12px; padding: 12px; margin-bottom: 7px; width: 100%;
  border: 0; text-align: left; color: var(--text); font: inherit; }
.ev.card { position: relative; display: grid; grid-template-columns: 34px 14px minmax(0, 1fr); align-items: center; gap: 0;
  padding: 0; background: transparent; border: 0; border-radius: 0; cursor: pointer; }
.ev.card::before { content: ''; position: absolute; left: 40px; top: -7px; bottom: -7px; width: 2px; background: rgba(170, 168, 200, .3); }
.ev.card:first-of-type::before { top: 50%; }
.ev.card:last-of-type::before { bottom: 50%; }
.ev:active .ev-main { transform: scale(.99); }
.ev-when { font-size: 12px; font-weight: 600; color: #c6c4da; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ev-dot { position: relative; z-index: 1; justify-self: center; width: 8px; height: 8px; border-radius: 50%;
  filter: brightness(1.28) saturate(1.15); box-shadow: 0 0 0 2.5px #10122a, 0 0 9px rgba(170, 140, 255, .55); }
.ev-main { display: flex; align-items: center; gap: 11px; min-width: 0; min-height: 39px; margin-left: 7px; padding: 3px 10px 3px 11px;
  background: linear-gradient(180deg, rgba(34, 38, 68, .82), rgba(26, 29, 54, .82)); border-radius: 12px; border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
.ev-ico { flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-size: 18px; }
.ev-ico svg { width: 18px; height: 18px; }
.ev-body { flex: 1; min-width: 0; padding: 0; }
.ev-title { font-weight: 700; font-size: 13.5px; line-height: 1.18; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-sub { color: #c6c4d9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11.5px; line-height: 1.25; margin-top: 1px; }
.ev-time { color: var(--muted); font-size: 12px; }
.ev-when .ev-time { font-size: inherit; color: inherit; }
.ev-face { flex: none; display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 700; color: #93f7b4;
  background: rgba(34, 197, 94, .2); border: 1px solid rgba(74, 222, 128, .22); padding: 2px 9px; border-radius: 999px; }
.ev-thumb { width: 50px; height: 34px; border-radius: 7px; object-fit: cover; flex: none; background: #2a2e4c;
  border: 1px solid rgba(255,255,255,.25); }
/* the main card has its own cell (an auto-placed item would be pushed to a new row by the
   thumbnail's placement on iOS); the thumbnail sits over the card's right end */
.ev.card > .ev-main { grid-column: 3; grid-row: 1; }
.ev.card > .ev-thumb { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); }
.ev.has-thumb .ev-main { padding-right: 66px; }
.ev.has-thumb .ev-face { display: none; }
.tl-none { margin: 10px 24px; }
.empty { display: none; text-align: center; padding: 32px 36px; }
.empty.show { display: block; }
.empty-ico { width: 54px; height: 54px; margin: 0 auto 10px; border-radius: 16px; display: grid; place-items: center; color: #b9a8ff;
  background: rgba(124, 92, 255, .14); border: 1px solid rgba(167, 139, 250, .25); }
.empty-ico svg { width: 28px; height: 28px; }
/* room for the tab bar under everything on Home */
#v-home { padding-bottom: calc(76px + var(--safe-b)); }

/* the tab bar: a glass capsule, the current tab a lit purple pill */
.tabbar { position: fixed; left: 15px; right: 15px; bottom: calc(6px + var(--safe-b)); z-index: 4; display: flex; padding: 6px 10px;
  height: 56px; border-radius: 28px; background: rgba(27, 30, 54, .86); border: 1px solid rgba(255, 255, 255, .11);
  box-shadow: 0 14px 34px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.06);
  -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2); }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 0 4px; margin: 0 6px;
  border: 1px solid transparent; border-radius: 22px; background: transparent; color: #e7e6f2; font: inherit; font-size: 11.5px;
  font-weight: 600; cursor: pointer; }
.tab svg { width: 18px; height: 18px; }
.tab.on { color: #bfaaff; background: linear-gradient(180deg, #4c3f9a 0%, #392d7a 100%); border-color: rgba(178, 160, 255, .38);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 6px 18px rgba(80, 50, 200, .35); }
.tab.on svg { color: #ffffff; }

/* ---------- Activity and Devices ---------- */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px 0 18px; }
.page-title { display: flex; align-items: center; gap: 10px; font-size: 25px; font-weight: 750; letter-spacing: -0.01em; min-width: 0; }
.page-ico { flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: #c9b8ff;
  background: linear-gradient(170deg, #3f3480, #2e2763); border: 1px solid rgba(178, 160, 255, .28); }
.page-ico svg { width: 18px; height: 18px; }
.pill-filter select { height: 34px; padding: 0 30px 0 33px; font-size: 13.5px; }
.filter-ico { position: absolute; left: 12px; top: 50%; width: 15px; height: 15px; margin-top: -7.5px; color: #e8e6f6; pointer-events: none; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 14px; padding: 3px; border-radius: 999px;
  background: rgba(30, 33, 60, .8); border: 1px solid rgba(255, 255, 255, .1); }
.seg-b { height: 34px; border: 0; border-radius: 999px; background: transparent; color: #e4e2f2; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.seg-b.on { color: #fff; font-weight: 650; background: linear-gradient(180deg, #8166ff 0%, #5c3ff0 100%);
  box-shadow: 0 6px 18px rgba(108, 76, 255, .45), inset 0 1px 0 rgba(255,255,255,.25); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.stat { display: flex; align-items: center; gap: 8px; min-width: 0; height: 58px; padding: 0 9px; border-radius: 15px; border: 1px solid; }
.stat-ico { flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; }
.stat-ico svg { width: 19px; height: 19px; }
.stat-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.stat-text b { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat-text small { font-size: 11.5px; color: #d0cee2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-unl { background: linear-gradient(180deg, rgba(34, 197, 94, .16), rgba(34, 197, 94, .08)); border-color: rgba(74, 222, 128, .28); }
.stat-unl .stat-ico { color: #6ff19a; background: rgba(34, 197, 94, .2); }
.stat-lock { background: linear-gradient(180deg, rgba(139, 92, 246, .22), rgba(139, 92, 246, .1)); border-color: rgba(167, 139, 250, .32); }
.stat-lock .stat-ico { color: #c9a8ff; background: rgba(139, 92, 246, .24); }
.stat-snap { background: linear-gradient(180deg, rgba(61, 109, 255, .2), rgba(61, 109, 255, .09)); border-color: rgba(110, 150, 255, .32); }
.stat-snap .stat-ico { color: #94b4ff; background: rgba(61, 109, 255, .22); }
.timeline-days { padding-top: 2px; }
.day.day-full { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 18px 0 10px 0;
  font-size: 15px; color: #fff; text-transform: none; letter-spacing: 0; }
.day-full .day-name { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.day-full .day-name::before { content: ''; flex: none; width: 16px; height: 16px; background: center / contain no-repeat
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c9c6de' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='5' width='17' height='15.5' rx='2.5'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4'/%3E%3C/svg%3E"); }
.day-full .day-n { flex: none; font-size: 12.5px; font-weight: 600; color: #c9c7dc; }
.older-link { display: block; margin: 6px auto 0; border: 0; background: none; color: #a88bff; font: inherit; font-size: 13.5px; font-weight: 650; padding: 8px; cursor: pointer; }
.note-card { display: flex; align-items: center; gap: 11px; margin-top: 14px; padding: 11px 12px; border-radius: 15px;
  background: linear-gradient(180deg, rgba(40, 42, 80, .8), rgba(30, 32, 62, .8)); border: 1px solid rgba(150, 140, 255, .18); }
.note-card p { flex: 1; margin: 0; font-size: 12.5px; line-height: 1.4; color: #e5e3f3; }
.info-ico { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #d6ccff;
  background: rgba(124, 92, 255, .2); border: 1px solid rgba(167, 139, 250, .25); }
.info-ico svg { width: 18px; height: 18px; }
.note-x { flex: none; width: 30px; height: 30px; border: 0; background: none; color: #cfcde2; display: grid; place-items: center; padding: 0; cursor: pointer; }
.note-x svg { width: 16px; height: 16px; }
.add-pill { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 15px 0 12px; border-radius: 999px;
  border: 1px solid rgba(196, 178, 255, .5); color: #fff; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  background: linear-gradient(180deg, #8065ff 0%, #5a3df0 100%); box-shadow: 0 6px 18px rgba(108, 76, 255, .45), inset 0 1px 0 rgba(255,255,255,.25); }
.add-pill svg { width: 15px; height: 15px; }
.dev-card { position: relative; margin-top: 16px; padding: 14px 13px 13px; border-radius: 20px;
  background: radial-gradient(70% 80% at 0% 0%, rgba(100, 96, 210, .32), transparent 65%),
    radial-gradient(60% 70% at 100% 100%, rgba(120, 60, 220, .3), transparent 70%),
    linear-gradient(170deg, rgba(42, 42, 92, .92), rgba(30, 30, 66, .92));
  border: 1.5px solid rgba(160, 140, 255, .38); box-shadow: 0 16px 36px rgba(20, 10, 70, .35), inset 0 1px 0 rgba(255,255,255,.08); }
.dev-top { display: flex; align-items: center; gap: 12px; }
.dev-art-col { flex: none; width: 104px; display: flex; flex-direction: column; align-items: center; }
.dev-art { width: 104px; }
.dev-text { flex: 1; min-width: 0; padding-right: 26px; }
.dev-text b { display: block; font-size: 16.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: .005em; }
.dev-text .st-line { margin-top: 6px; }
.dev-sync-line { display: flex; align-items: center; gap: 6px; margin: 7px 0 0; font-size: 12px; color: #d4d2e6; }
.dev-sync-line svg { flex: none; width: 13px; height: 13px; }
.dev-sync-line span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dev-more { position: absolute; top: 12px; right: 12px; width: 28px; height: 28px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.1); }
.dev-chip { color: #fff; }
.dev-btns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: 13px; }
.dev-act { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; height: 64px; min-width: 0;
  border-radius: 14px; border: 1px solid; color: #fff; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
.dev-act svg { width: 22px; height: 22px; }
.dev-act span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; padding: 0 4px; }
.dev-act:active { filter: brightness(1.15); }
.act-cam { background: linear-gradient(180deg, rgba(61, 109, 255, .3), rgba(61, 109, 255, .16)); border-color: rgba(110, 150, 255, .42); }
.act-cam svg { color: #8fb0ff; }
.act-set { background: linear-gradient(180deg, rgba(139, 92, 246, .26), rgba(139, 92, 246, .13)); border-color: rgba(167, 139, 250, .36); }
.act-set svg { color: #c9a8ff; }
.act-unpair { color: #ff9a9a; background: linear-gradient(180deg, rgba(239, 68, 68, .28), rgba(239, 68, 68, .14)); border-color: rgba(248, 113, 113, .42); }
.act-unpair svg { color: #ff8a8a; }
.dev-note { margin-top: 12px; }
.lap-switch { flex: none; display: grid; place-items: center; width: 20px; height: 20px; margin-left: -2px; padding: 0; border: 0;
  border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; cursor: pointer; }
.lap-switch svg { width: 13px; height: 13px; }
.dev-others { margin-top: 18px; }
.dev-others-head { display: flex; align-items: center; justify-content: space-between; margin: 0 2px 10px; }
.dev-others-head h3 { font-size: 17px; font-weight: 750; }
.dev-others-n { min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px; display: grid; place-items: center; font-size: 13px;
  font-weight: 700; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.12); }
.dev-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin-bottom: 9px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(38, 40, 78, .82), rgba(28, 30, 60, .82)); border-color: rgba(150, 140, 255, .2); }
.dev-row-art { flex: none; width: 70px; }
.dev-row-text { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.dev-row-text b { font-size: 15px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dev-row-text small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dev-info { margin: 12px 0 8px; padding: 12px 14px 2px; border-radius: 18px;
  background: linear-gradient(180deg, rgba(38, 38, 82, .82), rgba(28, 30, 62, .82)); border: 1px solid rgba(150, 140, 255, .2); }
.di-head { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 750; margin-bottom: 4px; }
.di-head svg { width: 17px; height: 17px; color: #e4e2f5; }
.di-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid rgba(255, 255, 255, .07); font-size: 13.5px; }
.di-head + .di-row { border-top: 0; }
.di-row > svg { flex: none; width: 18px; height: 18px; color: #d8d6ea; }
.di-k { flex: none; color: #dcdaee; }
.di-v { flex: 1; min-width: 0; text-align: right; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- other screens: the same night theme ---------- */
.sheet { background: transparent; }
.sheet .appbar { padding: 10px 14px 8px; }
.sheet .appbar h2 { font-size: 17px; font-weight: 750; }
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 22px; gap: 0; border: 1px solid var(--edge); }
.gallery figure { flex: none; width: 100%; margin: 0; scroll-snap-align: center; position: relative; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.gallery figcaption { position: absolute; left: 12px; bottom: 12px; background: rgba(14, 12, 40, .66); color: #fff;
  padding: 6px 12px; border-radius: 20px; font-size: 14px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.dots { display: flex; justify-content: center; gap: 8px; margin: 10px 0 16px; }
.dots i { width: 8px; height: 8px; border-radius: 8px; background: rgba(255,255,255,.2); transition: width .25s; }
.dots i.on { width: 22px; background: var(--purple); }
.info { padding: 4px 0; margin-bottom: 12px; }
.info-row { display: flex; gap: 14px; padding: 12px 16px; align-items: center; border-top: 1px solid var(--line); }
.info-row:first-child { border-top: 0; }
.info-row .k { color: var(--muted); font-size: 13px; }
.info-row .v { font-size: 15.5px; font-weight: 500; }

/* settings */
.row-card { display: flex; gap: 14px; align-items: center; padding: 14px 16px; margin-bottom: 14px;
  background: linear-gradient(170deg, rgba(58, 49, 137, .7), rgba(42, 32, 104, .7)); border-color: rgba(168, 140, 255, .4); }
.avatar { flex: none; width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-size: 22px;
  background: linear-gradient(160deg, rgba(150, 132, 236, .55), rgba(110, 90, 200, .45)); border: 1px solid rgba(214, 200, 255, .3); }
.list { margin-bottom: 14px; overflow: hidden; }
.list-item { display: flex; gap: 12px; align-items: center; width: 100%; background: none; border: 0;
  border-bottom: 1px solid var(--line); padding: 15px 16px; font-size: 15.5px; color: var(--text); text-align: left; font-family: inherit; }
.list-item:last-child { border-bottom: 0; }
button.list-item { cursor: pointer; }
.list-item.danger { color: #ff8b8b; font-weight: 600; }

.section-title { margin: 20px 8px 8px; font-size: 12.5px; font-weight: 700; color: var(--dim);
  text-transform: uppercase; letter-spacing: .06em; }
.note { margin: -6px 8px 12px; }
.list-item.toggle { cursor: pointer; }
.li-ico { flex: none; }
.li-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.li-text small { font-size: 12.5px; line-height: 1.3; }
.switch { -webkit-appearance: none; appearance: none; flex: none; position: relative; width: 51px; height: 31px;
  margin: 0; border-radius: 31px; background: rgba(255,255,255,.16); transition: background .2s; cursor: pointer; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.25); transition: transform .2s; }
.switch:checked { background: linear-gradient(180deg, #8166ff, #5c3ff0); }
.switch:checked::after { transform: translateX(20px); }
.switch:disabled { opacity: .5; cursor: default; }

/* pairing code fields, install */
.code-field { width: 100%; margin-top: 10px; padding: 14px; border-radius: 14px; border: 1px solid rgba(255,255,255,.14);
  background: rgba(30, 33, 60, .85); color: var(--text); font: 14px ui-monospace, Menlo, Consolas, monospace; }
.copy-box { width: 100%; max-width: 420px; margin-bottom: 12px; }
.paste-box { margin-top: 4px; }
/* intruder watch: a stranger's face at the laptop while Windows is locked */
.intruder-card { margin: 12px 0 0; padding: 0; overflow: hidden; background: rgba(239,68,68,.12); color: var(--text);
  border: 1.5px solid rgba(248, 113, 113, .7); }
.intr-photo { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #000; }
.intr-body { padding: 12px 16px 14px; }
.intr-body b { display: block; font-size: 17px; color: #ff9a9a; }
.intr-body p { margin: 4px 0 0; color: var(--muted); }
.intr-btns { display: flex; gap: 10px; margin-top: 12px; }
.intr-btns .btn { flex: 1; margin: 0; padding: 11px; font-size: 15px; border-radius: 13px; box-shadow: none; }
.intr-btns .btn:first-child { background: var(--red); border-color: rgba(255, 150, 150, .4); }
#btn-d-cam { margin: 14px 0; background: var(--red); border-color: rgba(255, 150, 150, .4); box-shadow: none; }
.push-banner { margin-top: 12px; padding: 13px 15px; background: rgba(239,68,68,.12); border-color: rgba(248, 113, 113, .35); color: #ffb0b0; }
.push-banner .btn { margin-top: 10px; padding: 11px; font-size: 15px; border-radius: 13px; box-shadow: none; background: var(--red); border-color: rgba(255, 150, 150, .4); }
/* opened at an old address: how to move to facewin.app */
.moved-banner { margin: 12px 0; padding: 14px 16px; text-align: left; background: rgba(245,158,11,.13); border-color: rgba(251, 191, 36, .3);
  color: var(--text); font-size: 15px; line-height: 1.4; }
.moved-banner .btn { display: block; text-align: center; text-decoration: none; margin-top: 10px; padding: 12px;
  font-size: 15px; border-radius: 13px; box-shadow: none; }
.moved-steps { margin: 12px 0 0; padding-left: 20px; font-size: 14px; }
.moved-steps li { margin: 4px 0; }
.view.center .moved-banner { width: 100%; max-width: 420px; }
.install-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-top: 12px; }
.install-card .ic-text { flex: 1; min-width: 0; }
.install-card .btn { width: auto; margin: 0; padding: 9px 16px; font-size: 15px; border-radius: 13px; box-shadow: none; }
.install-card .link { color: var(--muted); }
.spin { width: 30px; height: 30px; margin: 18px auto 0; border: 3px solid rgba(255,255,255,.14); border-top-color: var(--lilac);
  border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* approve */
.ap-photo { display: block; width: 100%; max-width: 420px; margin: 0 auto 10px; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: 22px; background: #1d2040; border: 1px solid var(--edge); }
.ap-timer { margin: 10px 0 4px; text-align: center; font-size: 26px; font-weight: 800; color: #c4b2ff;
  font-variant-numeric: tabular-nums; }
#btn-approve { background: linear-gradient(180deg, #57e066 0%, #34c24c 50%, #1f9e3a 100%); border-color: #22c55e;
  box-shadow: 0 8px 22px rgba(34, 197, 94, .34), inset 0 1px 0 rgba(220, 255, 220, .45); }
.approver-code { padding: 14px 16px 16px; border-top: 1px solid var(--line); }
.list-item:has(+ .approver-code) { border-bottom: 0; }
.approver-code.fresh { background: rgba(124, 92, 255, .12); }
.approver-trouble { padding: 12px 16px 16px; border-top: 1px solid var(--line); background: rgba(239,68,68,.08); }
.approver-trouble p { color: #ff9a9a; }
.approver-trouble .btn { margin-top: 10px; padding: 12px; font-size: 15px; border-radius: 13px; }
.list-item:has(+ .approver-trouble) { border-bottom: 0; }
.code6 { font-size: 26px; font-weight: 800; letter-spacing: .06em; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* live camera: full screen, the video fitted (never cropped) */
#v-cam { position: fixed; inset: 0; background: #000; color: #fff; padding-bottom: 0; z-index: 5; }
.cam-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; }
.cam-bar h2 { flex: 1; min-width: 0; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cam-left { min-width: 72px; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.cam-stage { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; container-type: size; overflow: hidden; }
/* centred, so mirror and quarter turns (set by app.js: translate, rotate, scaleX) keep the picture in the stage */
#cam-video, .cam-still { position: absolute; top: 50%; left: 50%; width: 100%; height: 100%; object-fit: contain; background: #000;
  transform: translate(-50%,-50%); }
.cam-stage.q #cam-video, .cam-stage.q .cam-still { width: 100cqh; height: 100cqw; }   /* a quarter turn: the sides swap */
.cam-stage.dim #cam-video { opacity: .45; }   /* the picture is paused: nothing is arriving */
.cam-left.amber { color: #fbbf24; }
/* the end card, over the stage */
.cam-card { position: relative; z-index: 2; max-width: 440px; max-height: 100%; overflow: auto; margin: 0 20px; padding: 18px 18px 12px; border-radius: 18px;
  background: rgba(17,24,39,.92); text-align: center; }
.cam-card-text { font-size: 16px; line-height: 1.4; overflow-wrap: anywhere; }
.cam-card-more { margin-top: 8px; color: rgba(255,255,255,.72); }
.cam-code { margin-top: 10px; border: 0; background: none; color: rgba(255,255,255,.6); font-size: 12px; padding: 6px 8px;
  font-variant-numeric: tabular-nums; }
/* the tools pill over the bottom of the picture, the speed line above it */
.cam-tools { position: absolute; z-index: 3; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; gap: 4px;
  padding: 6px; border-radius: 999px; background: rgba(17,24,39,.72); }
.cam-tool { border: 0; background: none; color: #fff; min-width: 44px; height: 44px; border-radius: 22px; display: grid;
  place-items: center; font-size: 14px; font-weight: 650; padding: 0 10px; }
.cam-tool svg { width: 22px; height: 22px; }
.cam-tool:active { background: rgba(255,255,255,.18); }
.cam-speed { position: absolute; z-index: 3; left: 50%; top: 10px; transform: translateX(-50%); margin: 0; padding: 4px 10px;
  border-radius: 999px; background: rgba(17,24,39,.72); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cam-want { font: inherit; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: inherit; }
.cam-spin { position: relative; margin: 0; border-color: rgba(255,255,255,.25); border-top-color: #fff; }
.cam-tap { position: relative; border: 0; border-radius: 24px; padding: 14px 22px; font-size: 17px; font-weight: 650;
  background: rgba(255,255,255,.92); color: #111; }
.cam-panel { padding: 10px 20px calc(16px + var(--safe-b)); }
/* 1.3.27: the quality picker over the picture */
.cam-q-menu { position: absolute; z-index: 6; right: 12px; bottom: 74px; min-width: 150px; padding: 6px; border-radius: 14px;
  background: rgba(17, 18, 40, .95); border: 1px solid rgba(160, 140, 255, .35); box-shadow: 0 12px 30px rgba(0, 0, 0, .5); }
.cam-q-menu button { display: block; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; text-align: left;
  font-size: 15px; color: #fff; background: transparent; }
.cam-q-menu button[aria-checked="true"] { background: rgba(124, 92, 255, .3); font-weight: 700; }
.cam-q-menu button:disabled { color: rgba(255, 255, 255, .35); }
.cam-q-note { margin: 4px 8px 4px; font-size: 12px; color: rgba(255, 255, 255, .65); max-width: 200px; }
/* 1.3.27: turned sideways, the live picture fills the screen; the controls float over it (no scroll) */
@media (orientation: landscape) and (max-height: 540px) {
  #v-cam { overflow: hidden; }
  #v-cam .cam-stage { position: absolute; inset: 0; }
  #v-cam .cam-bar { position: absolute; z-index: 4; top: 0; left: 0; right: 0;
    padding: max(6px, var(--safe-t)) calc(12px + env(safe-area-inset-right)) 6px calc(12px + env(safe-area-inset-left));
    background: linear-gradient(180deg, rgba(5, 6, 15, .75), rgba(5, 6, 15, 0)); }
  #v-cam .cam-panel { position: absolute; z-index: 4; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 10px;
    padding: 6px calc(12px + env(safe-area-inset-right)) calc(6px + var(--safe-b)) calc(12px + env(safe-area-inset-left));
    background: linear-gradient(0deg, rgba(5, 6, 15, .8), rgba(5, 6, 15, 0)); }
  #v-cam .cam-panel .btn { width: auto; margin: 0; padding: 10px 18px; min-height: 44px; font-size: 15px; }
  #v-cam .cam-msg { flex: 1; min-height: 0; margin: 0; text-align: left; font-size: 14px; }
  #v-cam .cam-state, #v-cam .cam-note { display: none; }
  #v-cam .cam-tools { bottom: calc(62px + var(--safe-b)); }
  #v-cam .cam-q-menu { bottom: calc(120px + var(--safe-b)); }
}
/* 1.3.28: the laptop's screen under the camera - the stage and the pane share the height (no scroll);
   a tap makes one of them the big one */
.cam-screen { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden;
  background: #000; border-top: 1px solid rgba(255,255,255,.14); }
.cam-screen-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.cam-screen-msg { position: relative; z-index: 2; margin: 0 16px; padding: 8px 12px; border-radius: 12px; text-align: center;
  font-size: 14px; background: rgba(24, 22, 54, .86); }
#v-cam.screen-on.screen-big .cam-stage { flex: .45; }
#v-cam.screen-on.screen-big .cam-screen { flex: 1.55; }
.cam-x { display: flex; gap: 10px; margin-top: 8px; }
.cam-x .btn { flex: 1 1 0; margin: 0; min-height: 44px; padding: 10px 12px; font-size: 15px; }
.cam-talk { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: none; }
.cam-talk:active { background: #7c5cff; }
@media (orientation: landscape) and (max-height: 540px) {
  #v-cam.screen-on .cam-stage { right: 50%; }
  #v-cam.screen-on .cam-screen { position: absolute; top: 0; bottom: 0; left: 50%; right: 0; }
  #v-cam .cam-x { margin-top: 0; }
  #v-cam .cam-x .btn { flex: none; }
  #v-cam #cam-x-msg { display: none; }
}
.cam-msg { min-height: 1.4em; text-align: center; font-size: 16px; overflow-wrap: anywhere; }
.cam-state { min-height: 1.2em; text-align: center; color: rgba(255,255,255,.72); }
.cam-note { text-align: center; color: rgba(255,255,255,.55); margin-top: 10px; }
/* Web 3.0: the camera screen's chrome in the night theme (the picture rules above are unchanged) */
#v-cam { background: #05060f; }
.cam-bar { padding: 8px 12px; background: linear-gradient(180deg, rgba(20, 18, 46, .9), rgba(20, 18, 46, 0)); }
.cam-panel { background: linear-gradient(180deg, rgba(14, 16, 34, 0), rgba(14, 16, 34, .96) 22%); }
.cam-panel .btn { border-radius: 15px; }
.cam-tools { background: rgba(24, 22, 54, .78); border: 1px solid rgba(255,255,255,.12); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.cam-speed { background: rgba(24, 22, 54, .78); }
.cam-card { background: rgba(24, 24, 56, .94); border: 1px solid var(--edge); }

.toast { position: fixed; left: 16px; right: 16px; bottom: calc(24px + var(--safe-b)); background: rgba(36, 34, 72, .96); color: #fff;
  padding: 14px 16px; border-radius: 15px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,.4); z-index: 9;
  border: 1px solid var(--edge); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
#v-home.active ~ .toast { bottom: calc(74px + var(--safe-b)); }   /* above the tab bar */

/* small phones (iPhone SE, 375 x 667): a little tighter so the card and the buttons keep one line */
@media (max-width: 379px) {
  .home-bar { padding-left: 18px; padding-right: 18px; }
  .pad-x { padding: 0 11px; }
  .hero { padding: 15px 12px 13px 14px; }
  .st-art-col, .st-art { width: 84px; }
  .st-info { margin-left: 10px; padding-left: 11px; }
  .unlocknow-btn { font-size: 16.5px; gap: 7px; }
  .timeline { padding-left: 22px; padding-right: 16px; }
  .page-head { padding-left: 16px; padding-right: 16px; }
  .page-title { font-size: 23px; }
  .stat { padding: 0 7px; gap: 6px; }
  .stat-ico { width: 28px; height: 28px; }
  .dev-art-col, .dev-art { width: 92px; }
}
/* large phones (430 wide): the same layout, a touch roomier */
@media (min-width: 420px) {
  .home-bar { padding-left: 24px; padding-right: 24px; }
  .pad-x { padding: 0 15px; }
  .st-art-col, .st-art { width: 100px; }
}
