/* Kissan Talo — Liquid Glass. One app, two layouts: .L-phone and .L-pad */
*{box-sizing:border-box}
[hidden]{display:none!important}
html{background:#0d0a0c}
html,body{margin:0;height:100%;color:#fff;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{background:transparent}
#app{height:100%}
body{font-family:-apple-system,"SF Pro Display","SF Pro Text",system-ui,"Segoe UI",Roboto,sans-serif;letter-spacing:-.01em;-webkit-tap-highlight-color:transparent;overscroll-behavior:none}
button,input,select{font:inherit;color:inherit}
button{cursor:pointer;-webkit-user-select:none;user-select:none;touch-action:manipulation}
button:disabled,input:disabled{cursor:not-allowed;opacity:.5}
:focus-visible{outline:2px solid #fff;outline-offset:3px}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* ---------- background: the live room, blurred ---------- */
.bg{position:fixed;left:0;right:0;top:-12vh;bottom:-18vh;z-index:-2;overflow:hidden;pointer-events:none;transition:opacity .6s}
.bg-canvas{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;filter:blur(22px) saturate(1.5) brightness(.8);transform:scale(1.12)}
.bg.off .bg-canvas{filter:blur(22px) saturate(.4) brightness(.4)}
.veil{position:fixed;left:0;right:0;top:-12vh;bottom:-18vh;z-index:-1;pointer-events:none;background:linear-gradient(180deg,rgba(0,0,0,.28) 0%,rgba(0,0,0,.05) 35%,rgba(0,0,0,.4) 100%)}
.room-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;pointer-events:none;-webkit-user-drag:none;user-select:none}
.room-img.layer{mix-blend-mode:plus-lighter;transition:opacity .35s ease,filter .35s ease}
.no-plus .room-img.layer{mix-blend-mode:screen}
.offline .room-img.base{filter:grayscale(.7) brightness(.7)}

/* ---------- glass ---------- */
.glass{border:1px solid rgba(255,255,255,.2);background:linear-gradient(150deg,rgba(255,255,255,.17),rgba(255,255,255,.05));-webkit-backdrop-filter:blur(26px) saturate(170%);backdrop-filter:blur(26px) saturate(170%);box-shadow:inset 0 1px 0 rgba(255,255,255,.3),0 10px 30px rgba(0,0,0,.28)}
.glass-btn{border:1px solid rgba(255,255,255,.22);background:linear-gradient(145deg,rgba(255,255,255,.22),rgba(255,255,255,.06));-webkit-backdrop-filter:blur(20px) saturate(170%);backdrop-filter:blur(20px) saturate(170%);box-shadow:inset 0 1px 0 rgba(255,255,255,.35),0 6px 20px rgba(0,0,0,.3);color:#fff}
.icon-btn{width:46px;height:46px;border-radius:50%;display:grid;place-items:center;flex:none;padding:0}
.icon-btn svg{width:20px;height:20px}
.solid-btn{border:0;background:rgba(255,255,255,.93);color:#0a0a0c;font-weight:700;border-radius:999px;min-height:50px;padding:0 22px;box-shadow:0 6px 20px rgba(0,0,0,.3)}
.ghost-btn{border:1px solid rgba(255,255,255,.25);background:rgba(255,255,255,.12);color:#fff;font-weight:600;border-radius:999px;min-height:46px;padding:0 18px}
.danger-btn{border:1px solid rgba(255,150,150,.4);background:rgba(255,90,90,.15);color:#ffd0d0;font-weight:600;border-radius:999px;min-height:46px;padding:0 18px}
.muted{color:rgba(255,255,255,.72)}
.small{font-size:13px}
.dot{width:7px;height:7px;border-radius:50%;display:inline-block;flex:none}
.dot.ok{background:#6ee7a0;box-shadow:0 0 8px #6ee7a0}
.dot.bad{background:#ff7a7a;box-shadow:0 0 8px #ff7a7a}
.dot.wait{background:#ffd38a;box-shadow:0 0 8px #ffd38a}

/* ---------- segmented ---------- */
.seg{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:4px;padding:4px;border-radius:999px}
.seg button{min-height:42px;border:0;border-radius:999px;background:transparent;color:#fff;font-weight:600;font-size:15px;padding:0 12px}
.seg button[aria-pressed=true]{background:linear-gradient(145deg,rgba(255,255,255,.42),rgba(255,255,255,.18));box-shadow:inset 0 1px 0 rgba(255,255,255,.55),0 4px 14px rgba(0,0,0,.25)}
.seg.dark{background:rgba(0,0,0,.25);border:1px solid rgba(255,255,255,.14)}

/* ---------- sliders ---------- */
.rng{-webkit-appearance:none;appearance:none;width:100%;height:8px;border-radius:999px;outline:none;margin:0;background:rgba(255,255,255,.18);cursor:pointer;touch-action:pan-y}
.rng::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:26px;height:26px;border-radius:50%;background:#fff;border:0;box-shadow:0 2px 8px rgba(0,0,0,.45)}
.rng::-moz-range-thumb{width:24px;height:24px;border-radius:50%;background:#fff;border:0}
.rng.big{height:14px;box-shadow:inset 0 1px 2px rgba(0,0,0,.35)}
.rng.big::-webkit-slider-thumb{width:30px;height:30px}
.rng.kelvin{background:linear-gradient(90deg,#ff9a3c,#ffd9a8 40%,#f4f6ff 70%,#b7d3ff)}
.rng.hue{background:linear-gradient(90deg,#ff3b3b,#ffb13b,#f5ff3b,#3bff6b,#3bf5ff,#3b6bff,#b13bff,#ff3bb1,#ff3b3b)}

/* ---------- power button ---------- */
.pwr{width:48px;height:48px;border-radius:50%;display:grid;place-items:center;flex:none;padding:0;border:1px solid rgba(255,255,255,.25);background:rgba(255,255,255,.14);color:#fff;transition:background .2s,box-shadow .2s}
.pwr svg{width:21px;height:21px}
.pwr.lit{color:#111214;border-color:rgba(255,255,255,.6)}

/* ---------- photo ---------- */
.photo{position:relative;overflow:hidden;isolation:isolate;border:1px solid rgba(255,255,255,.25);box-shadow:0 14px 40px rgba(0,0,0,.45),inset 0 1px 0 rgba(255,255,255,.3);background:#07090d}
/* Safari doesn't always clip blended layers to rounded corners, so the room images get their own masked clip box */
.ph-clip{position:absolute;inset:0;border-radius:inherit;overflow:hidden;isolation:isolate;-webkit-mask-image:-webkit-radial-gradient(white,black);transform:translateZ(0)}
.spot{position:absolute;width:44px;height:44px;margin:-22px 0 0 -22px;border:0;background:transparent;padding:0;display:grid;place-items:center}
.spot i{width:18px;height:18px;border-radius:50%;border:1px solid rgba(255,255,255,.75);background:rgba(255,255,255,.18);transition:background .25s,box-shadow .25s}

/* ---------- banner + toast ---------- */
.banner{border-radius:20px;padding:13px 16px;font-size:14px;line-height:1.45;border:1px solid rgba(255,150,150,.4);background:linear-gradient(145deg,rgba(255,90,90,.3),rgba(255,90,90,.1));-webkit-backdrop-filter:blur(22px);backdrop-filter:blur(22px)}
.toast{position:fixed;left:50%;bottom:calc(24px + env(safe-area-inset-bottom));transform:translate(-50%,20px);opacity:0;pointer-events:none;z-index:50;max-width:min(520px,calc(100vw - 32px));padding:12px 18px;border-radius:999px;font-size:14px;transition:opacity .25s,transform .25s;text-align:center}
.toast.show{opacity:1;transform:translate(-50%,0)}
.toast.bad{border-color:rgba(255,150,150,.5)}

/* =========================================================
   PHONE LAYOUT (the whole page scrolls, like any iPhone app)
   ========================================================= */
.L-phone .scroll{min-height:100%;padding:calc(16px + env(safe-area-inset-top)) 16px calc(28px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:16px;max-width:560px;margin:0 auto}
.L-phone .scroll>*{flex-shrink:0}
.p-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:0 4px}
.p-titles{display:flex;flex-direction:column;gap:4px;min-width:0}
.p-date{font-size:14px;color:rgba(255,255,255,.72)}
.p-titles h1{margin:0;font-size:32px;font-weight:700;letter-spacing:-.03em;line-height:1.1}
.p-status{display:flex;align-items:baseline;gap:7px;font-size:13px;line-height:1.4;color:rgba(255,255,255,.78)}
.p-status .dot{transform:translateY(-1px)}
.p-rooms button{min-height:44px;font-size:15px}
.p-photo{width:100%;aspect-ratio:4/3;border-radius:28px}
.p-photo .shade{position:absolute;inset:0;border-radius:inherit;background:linear-gradient(180deg,rgba(0,0,0,0) 60%,rgba(0,0,0,.5) 100%);pointer-events:none}
.p-photo .spot i{width:14px;height:14px}
.scenebar{position:absolute;left:10px;right:10px;bottom:10px;padding:4px;border-radius:999px;overflow:hidden;border:1px solid rgba(255,255,255,.24);background:rgba(20,20,24,.32);-webkit-backdrop-filter:blur(26px) saturate(180%);backdrop-filter:blur(26px) saturate(180%);box-shadow:inset 0 1px 0 rgba(255,255,255,.25)}
.sb-track{display:flex;gap:2px;overflow-x:auto;scrollbar-width:none;border-radius:999px;-webkit-overflow-scrolling:touch;--fl:0px;--fr:0px;-webkit-mask-image:linear-gradient(90deg,transparent 0,#000 var(--fl),#000 calc(100% - var(--fr)),transparent 100%);mask-image:linear-gradient(90deg,transparent 0,#000 var(--fl),#000 calc(100% - var(--fr)),transparent 100%)}
.sb-track::-webkit-scrollbar{display:none}
.sb-track.more-r{--fr:36px}
.sb-track.more-l{--fl:36px}
.scenebar button{flex:1 0 auto;min-height:44px;padding:0 16px;border-radius:999px;border:0;background:transparent;color:#fff;font-size:14px;font-weight:600;white-space:nowrap}
.scenebar button[aria-pressed=true]{background:rgba(255,255,255,.92);color:#0a0a0c}
.card-head{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:14px 18px 8px;min-height:44px}
.card-head b{font-size:17px;font-weight:700;letter-spacing:-.01em}
.card-head span{font-size:13px;color:rgba(255,255,255,.7)}
.link-btn{border:0;background:transparent;color:rgba(255,255,255,.82);font-weight:600;font-size:14px;min-height:36px;padding:0 4px}
.list{border-radius:28px;overflow:hidden}
.row{padding:12px 12px 12px 16px;border-top:1px solid rgba(255,255,255,.1);display:flex;flex-direction:column;gap:6px}
.row-top{display:flex;align-items:center;gap:12px}
.row .pwr{width:44px;height:44px}
.row .pwr svg{width:19px;height:19px}
.row-main{flex:1;min-width:0;min-height:44px;border:0;background:transparent;color:#fff;text-align:left;padding:0;display:flex;align-items:center;gap:8px}
.row-name{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.row-name b{font-size:16px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.row-name small{font-size:13px;color:rgba(255,255,255,.65)}
.row-val{font-size:16px;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap}
.chev{width:14px;height:14px;opacity:.45;flex:none}
.row .rng{width:calc(100% - 60px);margin:2px 0 4px 56px}
.row.dim{opacity:.6}
.alloff{display:flex;align-items:center;justify-content:center;gap:10px;min-height:54px;padding:0 22px;border-radius:999px;color:#fff;font-size:16px;font-weight:600}
.alloff svg{width:18px;height:18px}

/* =========================================================
   iPAD LAYOUT (fixed to the screen: nothing moves when you rotate)
   ========================================================= */
.L-pad .wall{position:fixed;inset:0;display:flex;flex-direction:column;gap:18px;padding:calc(20px + env(safe-area-inset-top)) calc(24px + env(safe-area-inset-right)) calc(20px + env(safe-area-inset-bottom)) calc(24px + env(safe-area-inset-left));overflow:hidden}
.w-top{display:flex;align-items:center;justify-content:space-between;gap:16px;flex:none}
.w-clock{display:flex;flex-direction:column;gap:4px}
.w-clock b{font-size:60px;font-weight:300;letter-spacing:-.045em;line-height:.95;font-variant-numeric:tabular-nums}
.w-clock span{font-size:15px;color:rgba(255,255,255,.75)}
.w-actions{display:flex;align-items:center;gap:12px}
.w-chip{display:flex;align-items:center;gap:12px;padding:10px 20px 10px 16px;border-radius:999px;min-height:56px}
.w-chip span{display:flex;flex-direction:column;gap:1px}
.w-chip b{font-size:17px;font-weight:700}
.w-chip small{font-size:12px;color:rgba(255,255,255,.72)}
.w-actions .alloff{min-height:56px}
.w-actions .icon-btn{width:56px;height:56px}
.w-body{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) 400px;gap:20px}
.w-stage{display:flex;flex-direction:column;gap:14px;min-height:0;min-width:0}
.w-rooms{flex:none}
.w-rooms button{min-height:46px;font-size:16px}
.w-photo{flex:1;min-height:0;border-radius:30px}
.w-photo .spot{width:56px;height:56px;margin:-28px 0 0 -28px}
.w-photo .spot i{width:22px;height:22px}
.w-photo .banner{position:absolute;left:18px;right:18px;bottom:18px;font-size:15px}
.w-side{display:flex;flex-direction:column;gap:16px;min-height:0;min-width:0}
.w-scenes{flex:none;border-radius:26px}
.scene-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:2px 14px 14px}
.scene-grid button{min-height:52px;border-radius:16px;border:1px solid rgba(255,255,255,.16);background:rgba(255,255,255,.08);color:#fff;font-size:15px;font-weight:600;padding:0 8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.scene-grid button[aria-pressed=true]{background:rgba(255,255,255,.93);color:#0a0a0c;border-color:transparent}
.w-lights{flex:0 1 auto;min-height:0;display:flex;flex-direction:column;border-radius:26px}
.w-rows{flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch}
/* iPad held upright: photo on top, scenes and lights side by side underneath */
.pad-portrait .w-body{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr)}
.pad-portrait .w-photo{flex:none;aspect-ratio:16/9}
.pad-portrait .w-side{flex-direction:row}
.pad-portrait .w-scenes{width:42%;align-self:flex-start}
.pad-portrait .w-lights{flex:1}
.pad-portrait .w-clock b{font-size:52px}

/* ---------- full pages (settings, scenes) ---------- */
.page{height:100%;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:calc(18px + env(safe-area-inset-top)) 16px calc(32px + env(safe-area-inset-bottom))}
.page-in{max-width:620px;margin:0 auto;display:flex;flex-direction:column;gap:18px}
.page-head{display:flex;align-items:center;gap:10px;min-height:52px}
.page-head h1{margin:0;font-size:28px;font-weight:700;letter-spacing:-.03em;flex:1;min-width:0}
.page-head .icon-btn{width:44px;height:44px}
.group-label{font-size:13px;font-weight:600;color:rgba(255,255,255,.65);padding:0 6px;text-transform:uppercase;letter-spacing:.02em}
.panel{border-radius:26px;overflow:hidden}
.prow{width:100%;min-height:60px;display:flex;align-items:center;gap:14px;padding:10px 16px;border:0;border-top:1px solid rgba(255,255,255,.12);background:transparent;color:#fff;text-align:left}
.panel>.prow:first-child,.panel>:first-child .prow{border-top:0}
.prow .t{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.prow .t b{font-size:16px;font-weight:600}
.prow .t small{font-size:13px;color:rgba(255,255,255,.7)}
.prow .v{font-size:15px;font-weight:600;text-align:right}
.fact{display:flex;justify-content:space-between;gap:12px;padding:13px 18px;border-top:1px solid rgba(255,255,255,.12);font-size:15px}
.fact:first-child{border-top:0}
.fact span:last-child{font-weight:600;text-align:right;overflow-wrap:anywhere}
.note{margin:0 6px;font-size:13px;line-height:1.5;color:rgba(255,255,255,.72)}
.field{display:flex;flex-direction:column;gap:8px;font-size:13px;font-weight:600;color:rgba(255,255,255,.75)}
.input{height:52px;border-radius:18px;border:1px solid rgba(255,255,255,.25);background:rgba(0,0,0,.25);color:#fff;font-size:17px;font-weight:600;padding:0 16px;outline:none;width:100%}
.input:focus{border-color:rgba(255,255,255,.6)}
.card{border-radius:26px;padding:16px;display:flex;flex-direction:column;gap:14px}
.switch{width:60px;height:44px;flex:none;border:0;background:transparent;padding:0;display:grid;place-items:center}
.switch span{width:52px;height:32px;border-radius:999px;background:rgba(255,255,255,.18);border:1px solid rgba(255,255,255,.25);display:flex;align-items:center;padding:3px;transition:background .2s}
.switch span i{width:26px;height:26px;border-radius:50%;background:#fff;box-shadow:0 2px 6px rgba(0,0,0,.35);transition:transform .2s}
.switch[aria-checked=true] span{background:rgba(110,231,160,.85)}
.switch[aria-checked=true] span i{transform:translateX(18px)}
.bigcode{font-size:44px;font-weight:700;letter-spacing:.18em;font-variant-numeric:tabular-nums;text-align:center}
.strip{display:flex;gap:6px}
.strip span{flex:1;height:8px;border-radius:999px}
.days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}
.days button{height:44px;border-radius:50%;border:1px solid rgba(255,255,255,.2);background:rgba(0,0,0,.2);font-weight:700;font-size:14px;padding:0}
.days button[aria-pressed=true]{background:rgba(255,255,255,.92);color:#0a0a0c}
.opts{display:flex;flex-direction:column;gap:6px}
.opt{min-height:50px;display:flex;align-items:center;gap:12px;padding:0 14px;border-radius:16px;border:1px solid rgba(255,255,255,.14);background:rgba(0,0,0,.15);font-size:15px;font-weight:600;text-align:left}
.opt i{width:20px;height:20px;border-radius:50%;border:2px solid #fff;display:grid;place-items:center;flex:none}
.opt[aria-pressed=true]{background:rgba(255,255,255,.22);border-color:rgba(255,255,255,.55)}
.opt[aria-pressed=true] i::after{content:"";width:10px;height:10px;border-radius:50%;background:#fff}
.tri{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:2px;padding:3px;border-radius:999px;background:rgba(0,0,0,.25);border:1px solid rgba(255,255,255,.14)}
.tri button{min-width:50px;min-height:40px;padding:0 6px;border:0;border-radius:999px;background:transparent;font-size:13px;font-weight:600}
.tri button[aria-pressed=true]{background:rgba(255,255,255,.35)}
.tones{display:flex;gap:6px;flex-wrap:wrap}
.tones button{width:44px;height:44px;border:0;background:transparent;padding:0;display:grid;place-items:center}
.tones button i{width:30px;height:30px;border-radius:50%;border:2px solid rgba(255,255,255,.2);box-shadow:inset 0 1px 0 rgba(255,255,255,.5)}
.tones button[aria-pressed=true] i{border-color:#fff}
.offsets{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px}
.offsets button{min-height:44px;border-radius:14px;border:1px solid rgba(255,255,255,.18);background:rgba(0,0,0,.2);font-size:13px;font-weight:600}
.offsets button[aria-pressed=true]{background:rgba(255,255,255,.35)}
.sticky-foot{position:sticky;bottom:calc(8px + env(safe-area-inset-bottom));display:flex;gap:8px;padding:10px;border-radius:30px;z-index:3}
.sticky-foot button{flex:1}

/* ---------- details sheet ---------- */
.sheet-bg{position:fixed;inset:0;z-index:20;background:rgba(0,0,0,.35);display:flex;flex-direction:column;justify-content:flex-end}
.sheet-bg>.closer{flex:1;border:0;background:transparent}
.sheet{margin:0 8px calc(8px + env(safe-area-inset-bottom));border-radius:36px;padding:18px 20px 22px;display:flex;flex-direction:column;gap:16px;max-height:88vh;overflow-y:auto;border:1px solid rgba(255,255,255,.25);background:linear-gradient(160deg,rgba(60,62,70,.55),rgba(20,22,28,.6));-webkit-backdrop-filter:blur(40px) saturate(180%);backdrop-filter:blur(40px) saturate(180%);box-shadow:inset 0 1px 0 rgba(255,255,255,.35),0 -10px 60px rgba(0,0,0,.5)}
.L-pad .sheet-bg{flex-direction:row;justify-content:flex-end;padding:16px}
.L-pad .sheet{width:440px;margin:0;max-height:none;border-radius:38px;padding:28px 26px}
.grab{width:38px;height:5px;border-radius:999px;background:rgba(255,255,255,.4);align-self:center}
.L-pad .grab{display:none}
.sh-top{display:flex;align-items:center;gap:14px}
.sh-top .pwr{width:56px;height:56px}
.sh-name{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.sh-name b{font-size:22px;font-weight:700;letter-spacing:-.02em}
.sh-val{font-size:24px;font-weight:700;font-variant-numeric:tabular-nums}
.swatches{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:6px}
.L-pad .swatches{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.swatches button{aspect-ratio:1/1;min-height:36px;border-radius:50%;border:2px solid rgba(255,255,255,.25);box-shadow:inset 0 1px 0 rgba(255,255,255,.5),0 3px 10px rgba(0,0,0,.3);padding:0}
.swatches button[aria-pressed=true]{border-color:#fff}
.sh-note{margin:0;font-size:13px;line-height:1.45;color:rgba(255,255,255,.82);background:rgba(0,0,0,.22);border:1px solid rgba(255,255,255,.12);border-radius:18px;padding:12px 14px}
.k-labels{display:flex;justify-content:space-between}

/* ---------- pairing ---------- */
.pair{min-height:100%;display:flex;flex-direction:column;justify-content:center;padding:28px 22px;gap:22px;max-width:460px;margin:0 auto}
.pair h1{margin:0;font-size:30px;font-weight:700;letter-spacing:-.03em;text-align:center}
.pair p{margin:0;text-align:center;line-height:1.5;color:rgba(255,255,255,.8)}
.code-in{height:64px;border-radius:18px;border:1px solid rgba(255,255,255,.28);background:rgba(0,0,0,.25);color:#fff;font-size:32px;font-weight:600;letter-spacing:.5em;text-align:center;padding:0 0 0 .5em;outline:none;width:100%}


@media (prefers-reduced-motion:reduce){*{transition:none!important}}

/* =========================================================
   CAMERAS
   ========================================================= */
.cdot{width:8px;height:8px;border-radius:50%;display:inline-block;flex:none;background:rgba(255,255,255,.45)}
.cdot.live{background:#ff5a5f;box-shadow:0 0 10px #ff5a5f;animation:cpulse 2s ease-in-out infinite}
.cdot.wait{background:#ffd38a;box-shadow:0 0 8px #ffd38a}
.cdot.bad{background:#ff7a7a}
@keyframes cpulse{50%{opacity:.45}}
.cst.live{color:#ff9a9d}.cst.wait{color:#ffd38a}.cst.bad{color:#ffb4b4}
.cam-head-r{display:flex;align-items:center;gap:4px}
.cam-card .card-head{padding-right:8px}
.cam-grid{display:grid;grid-template-columns:1fr;gap:10px;padding:4px 12px 12px}
.cam-grid:has(> :nth-child(2)){grid-template-columns:1fr 1fr}
.cam-open{display:block;border:0;padding:0;background:transparent;color:#fff;text-align:left;border-radius:20px}
.cam-feed{position:relative;aspect-ratio:4/3;border-radius:20px;overflow:hidden;background:rgba(0,0,0,.45);border:1px solid rgba(255,255,255,.14);-webkit-mask-image:-webkit-radial-gradient(white,black)}
.cam-img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#000}
.cam-empty{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;color:rgba(255,255,255,.55)}
.cam-empty svg{width:28px;height:28px}
.cam-empty small{font-size:13px}
.cam-tag{position:absolute;left:10px;top:10px;display:flex;align-items:center;gap:7px;padding:5px 11px 5px 9px;border-radius:999px;font-size:12px;font-weight:600;background:rgba(0,0,0,.42);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}
.cam-chip{border:1px solid rgba(255,255,255,.2);color:#fff;text-align:left;cursor:pointer}
.cam-ic svg{width:22px;height:22px;display:block}
/* full-screen viewer (phone and iPad) */
.cam-view{position:fixed;inset:0;z-index:40;background:rgba(6,5,7,.86);-webkit-backdrop-filter:blur(24px);backdrop-filter:blur(24px);display:flex;padding:calc(14px + env(safe-area-inset-top)) 14px calc(18px + env(safe-area-inset-bottom))}
.cam-view-in{flex:1;display:flex;flex-direction:column;gap:14px;min-height:0;max-width:1400px;margin:0 auto;width:100%}
.cv-head{display:flex;align-items:center;gap:12px;padding:0 4px}
.cv-head b{font-size:22px;font-weight:700;flex:1}
.cv-head .cam-head-r{font-size:14px;color:rgba(255,255,255,.75)}
.cv-grid{flex:1;min-height:0;display:grid;gap:12px;align-content:center}
.cv-grid.n2,.cv-grid.n3,.cv-grid.n4{grid-template-columns:1fr 1fr}
.cam-feed.big{border-radius:24px;max-height:100%;background:#000}
.cv-grid.n1{display:flex;align-items:center;justify-content:center}
.cv-grid.n1 .cam-feed.big{width:min(100%,calc((100vh - 150px) * 4 / 3));width:min(100%,calc((100dvh - 150px) * 4 / 3))}
.cv-note{margin:0 auto;max-width:520px;text-align:center;font-size:14px;line-height:1.5;color:rgba(255,255,255,.7)}
.L-phone .cam-view .cv-grid{grid-template-columns:1fr}
/* settings */
.steps{margin:6px 0 4px;padding-left:20px;display:flex;flex-direction:column;gap:8px;font-size:15px;line-height:1.45}
.mono{font-family:ui-monospace,Menlo,monospace;font-size:13px;word-break:break-all;color:#fff;background:rgba(255,255,255,.1);padding:2px 6px;border-radius:6px}
/* the camera phone itself: dark, calm, low power */
.L-cam{background:#000}
.L-cam .bg,.L-cam .veil{display:none}
.camphone{min-height:100vh;display:flex;flex-direction:column;justify-content:center;gap:26px;padding:calc(24px + env(safe-area-inset-top)) 26px calc(150px + env(safe-area-inset-bottom));max-width:460px;margin:0 auto;color:rgba(255,255,255,.8)}
.cp-top{display:flex;flex-direction:column;gap:4px}
.cp-top span{font-size:13px;color:rgba(255,255,255,.5)}
.cp-top b{font-size:28px;font-weight:700;color:#fff;letter-spacing:-.02em}
.cp-state{display:grid;grid-template-columns:auto 1fr;column-gap:12px;row-gap:4px;align-items:center}
.cp-state .cdot{width:12px;height:12px}
.cp-state b{font-size:18px;color:#fff}
.cp-state small{grid-column:2;font-size:14px;color:rgba(255,255,255,.6);line-height:1.4}
.cp-actions{display:flex;flex-direction:column;gap:10px}
.cp-tip{margin:0;font-size:13px;line-height:1.5;color:rgba(255,255,255,.45)}
.cam-preview{display:none}
.L-cam.cam-running .cam-preview{display:block;position:fixed;left:50%;bottom:calc(20px + env(safe-area-inset-bottom));transform:translateX(-50%);width:160px;height:120px;object-fit:contain;border-radius:16px;opacity:.55;border:1px solid rgba(255,255,255,.2);background:#000}

/* ---------- live view inside the room photo ---------- */
.ph-live{position:absolute;inset:0;z-index:2;border:0;padding:0;margin:0;color:#fff;border-radius:inherit;overflow:hidden;background:rgba(10,8,10,.55);-webkit-backdrop-filter:blur(22px) saturate(120%);backdrop-filter:blur(22px) saturate(120%);-webkit-mask-image:-webkit-radial-gradient(white,black);animation:livein .35s ease both;cursor:zoom-in}
@keyframes livein{from{opacity:0}to{opacity:1}}
.ph-live .cam-img{background:transparent}
.ph-live .cam-empty{gap:10px;text-align:center;padding:0 30px;line-height:1.45;color:rgba(255,255,255,.8)}
.ph-live .cam-empty b{color:#fff}
.photo.is-live .spot{visibility:hidden}
.photo.is-live .shade{z-index:3}
.ph-live .cam-tag{z-index:4}
.ph-expand{position:absolute;right:12px;top:56px;width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:rgba(0,0,0,.42);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}
.ph-expand svg{width:16px;height:16px}
.spin{width:26px;height:26px;border-radius:50%;border:2.5px solid rgba(255,255,255,.25);border-top-color:#fff;animation:spin 1s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.ph-mode{position:absolute;right:10px;top:10px;z-index:5;display:flex;gap:2px;padding:3px;border-radius:999px;border:1px solid rgba(255,255,255,.24);background:rgba(20,20,24,.38);-webkit-backdrop-filter:blur(22px) saturate(170%);backdrop-filter:blur(22px) saturate(170%)}
.ph-mode button{min-height:34px;padding:0 13px;border:0;border-radius:999px;background:transparent;color:#fff;font-size:13px;font-weight:600;display:flex;align-items:center;gap:6px}
.ph-mode button[aria-pressed=true]{background:rgba(255,255,255,.92);color:#0a0a0c}
.ph-mode .cdot{width:7px;height:7px}
.ph-mode .cdot.off{background:rgba(255,255,255,.55)}
.ph-mode button[aria-pressed=true] .cdot.off{background:rgba(0,0,0,.35)}
.ph-cams{position:absolute;left:10px;right:10px;top:56px;z-index:5;display:flex;gap:6px;overflow-x:auto;scrollbar-width:none}
.ph-cams button{flex:none;min-height:30px;padding:0 12px;border-radius:999px;border:1px solid rgba(255,255,255,.24);background:rgba(0,0,0,.4);color:#fff;font-size:12px;font-weight:600}
.ph-cams button[aria-pressed=true]{background:rgba(255,255,255,.9);color:#000}
.p-photo .ph-expand{top:auto;bottom:74px}
.w-photo .ph-mode{right:16px;top:16px}
.w-photo .ph-mode button{min-height:40px;padding:0 16px;font-size:14px}
.w-photo .ph-live .cam-tag{left:16px;top:18px;font-size:13px}
.w-photo .ph-expand{right:16px;top:auto;bottom:16px;width:42px;height:42px}
.photo.is-live .scenebar{z-index:5}
/* viewer: one / all */
.cv-seg{flex:none;padding:3px;border-radius:999px}
.cv-seg button{min-height:36px;padding:0 14px;display:flex;align-items:center;gap:7px;font-size:14px}
.cv-seg svg{width:16px;height:16px}
.cam-feed.tap{display:block;width:100%;padding:0;color:#fff;cursor:pointer;text-align:left}
.cv-grid.n2 .cam-feed.big,.cv-grid.n3 .cam-feed.big,.cv-grid.n4 .cam-feed.big{width:100%}
.L-pad .cv-grid.n2,.L-pad .cv-grid.n3,.L-pad .cv-grid.n4{max-width:min(100%,calc((100vh - 150px) * 8 / 3 + 12px));margin:0 auto;width:100%}
.L-phone .cv-head b{font-size:19px}
.L-phone .cv-seg button span{display:none}

/* ---------- away from home ---------- */
.dot.away{background:#8ec5ff;box-shadow:0 0 8px #8ec5ff}
.pwr.sending{position:relative}
.pwr.sending::after{content:"";position:absolute;inset:-4px;border-radius:50%;border:2px solid transparent;border-top-color:rgba(255,255,255,.85);animation:spin .9s linear infinite}
.check{display:flex;align-items:center;gap:10px;font-size:15px;color:rgba(255,255,255,.85)}
.check input{width:20px;height:20px;accent-color:#fff}
.row-btns{display:flex;gap:8px;flex:none}
.row-btns .ghost-btn,.row-btns .danger-btn{min-height:38px;padding:0 14px;font-size:14px}
.signin .si-brand{text-align:center;display:flex;flex-direction:column;gap:8px}
.signin .si-brand h1{margin:0}
.signin .si-brand p{margin:0;color:rgba(255,255,255,.75);line-height:1.5}
.cam-tag{max-width:calc(100% - 190px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cam-view .cam-tag,.cv-grid .cam-tag{max-width:calc(100% - 20px)}
.L-phone .prow:has(.row-btns){flex-wrap:wrap}
.L-phone .row-btns{width:100%}
.L-phone .row-btns button{flex:1}
.dot.off{background:rgba(255,255,255,.45)}
.inline-link{color:#fff;font-weight:700;text-decoration:underline;text-underline-offset:3px}
.cam-paused{gap:14px}
.small-btn{min-height:40px;padding:0 18px;font-size:14px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer}
.ph-live:not(button){cursor:default}
