.live-camera-dialog {
  --camera-accent:#d3b9ed;
  color:#f5f0f7; color-scheme:dark; box-sizing:border-box;
  width:min(600px,calc(100vw - 28px)); max-width:none; max-height:min(91dvh,850px);
  overflow:auto; overscroll-behavior:contain; padding:0;
  border:1px solid #68566c; border-radius:24px;
  background:#1b1720; box-shadow:0 24px 100px #07040ec9;
}
.live-camera-dialog[data-theme=rose] {--camera-accent:#efa8bb}
.live-camera-dialog::backdrop {background:#0a0713bf;backdrop-filter:blur(7px)}
.tapo-shell {box-sizing:border-box;padding:24px;background:radial-gradient(ellipse at 93% 2%,#61466040,transparent 56%);min-width:0}
.tapo-head {display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin:0 0 18px}
.tapo-head h2 {margin:4px 0 0;color:#faf4fa;line-height:1.15;font-weight:520;letter-spacing:-.045em;font-size:clamp(1.6rem,4vw,2rem)}
.tapo-head .eyebrow {margin:0;color:var(--camera-accent);letter-spacing:.13em}
.tapo-location {margin:6px 0 0;color:#d3c9d6;font-size:.86rem;line-height:1.45}
.tapo-close,.tapo-expand,.tapo-button,.tapo-switch button,.tapo-list-item,.tapo-text {
  appearance:none;display:inline-flex;justify-content:center;align-items:center;gap:8px;min-height:42px;
  font:inherit;color:inherit;cursor:pointer;touch-action:manipulation;border-radius:12px;
}
.tapo-close {width:42px;height:42px;flex:none;border:1px solid #ffffff23;background:#ffffff08}
.tapo-close svg {width:18px;height:18px}
.tapo-picture {position:relative;display:grid;place-items:center;isolation:isolate;aspect-ratio:16/9;margin:0;border:1px solid #ffffff20;border-radius:17px;overflow:hidden;background:#0c0b0e}
.tapo-photo {position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#050507}
.tapo-picture [hidden] {display:none!important}
.tapo-live {position:absolute;top:11px;left:12px;display:flex;align-items:center;gap:6px;line-height:1;background:#18131ec9;padding:6px 9px;border:1px solid #ffffff32;border-radius:20px;color:#f1f1ef;font-size:.71rem}
.tapo-live i {width:6px;height:6px;border-radius:50%;background:#87dfbb}
.tapo-state {padding:12px;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;gap:8px}
.tapo-state p {max-width:32ch;margin:0;color:#d9cfda;font-size:.89rem;line-height:1.4}
.tapo-state-icon {width:38px;height:38px;border:1px solid #ffffff22;background:#ffffff06;border-radius:50%;display:grid;place-items:center;color:var(--camera-accent)}
.tapo-waiting {animation:tapo-pulse 1.65s ease-in-out infinite alternate}
@keyframes tapo-pulse {to{opacity:.45}}
@media(prefers-reduced-motion:reduce){.tapo-waiting{animation:none}}
.tapo-controls {display:flex;justify-content:space-between;align-items:center;gap:9px;margin-top:14px;flex-wrap:wrap}
.tapo-switch {display:flex;align-items:center;border:1px solid #ffffff22;border-radius:14px;padding:3px;gap:3px;background:#110f16}
.tapo-switch button {min-height:36px;font-size:.83rem;padding:6px 12px;border:0;border-radius:10px;color:#d6cbda;background:transparent}
.tapo-switch button[aria-pressed=true] {color:#fff8fd;background:#47354e;box-shadow:0 1px 4px #03020777}
.tapo-expand,.tapo-button {padding:8px 13px;line-height:1.3;font-size:.85rem;border:1px solid #ffffff28;background:#ffffff08}
.tapo-expand {color:var(--camera-accent)}
.tapo-settings-link {margin-top:5px;text-align:right}
.tapo-text {color:var(--camera-accent);padding:6px 1px;background:transparent;border:0;font-size:.83rem}
.tapo-note {font-size:.91rem;line-height:1.55;color:#d0c7d5;margin:3px 0 15px}
.tapo-note strong {font-weight:575;color:#ece4f0}
.tapo-form {display:grid;gap:13px}
.tapo-form label {display:grid;gap:6px;font-size:.87rem;color:#e3dce8}
.tapo-form input,.tapo-form select {display:block;box-sizing:border-box;min-height:45px;width:100%;padding:10px 12px;border:1px solid #ffffff29;border-radius:10px;color:#f3eef5;background:#151218;font:inherit;font-size:1rem}
.tapo-form small {font-size:.8rem;line-height:1.45;color:#c9becd}
.tapo-form-actions {display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-top:6px}
.tapo-primary {color:#231c26;background:var(--camera-accent);border-color:transparent;font-weight:580}
.tapo-feedback {margin:11px 0 0;color:#e2c9dd;font-size:.85rem}
.tapo-feedback:empty {display:none}
.tapo-list {display:grid;gap:8px}
.tapo-list-item {width:100%;padding:11px 13px;justify-content:space-between;text-align:left;line-height:1.25;border:1px solid #ffffff25;border-radius:12px;background:#ffffff06}
.tapo-list-item small {display:block;margin-top:3px;color:#bdb1c3;font-size:.77rem}
.live-camera-dialog button:focus-visible,.tapo-form :is(input,select):focus-visible {outline:2px solid var(--camera-accent);outline-offset:2px}
.live-camera-dialog button:disabled {opacity:.55;cursor:wait}
.live-camera-dialog[data-expanded=true] {width:100vw;height:100dvh;max-height:none;margin:0;border:0;border-radius:0}
.live-camera-dialog[data-expanded=true] .tapo-shell,.tapo-shell:fullscreen {
  display:flex;flex-direction:column;width:100%;height:100%;overflow:auto;
  padding:max(12px,env(safe-area-inset-top)) max(14px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left));background:#0d0b12;
}
.live-camera-dialog[data-expanded=true] .tapo-picture {flex:1 1 auto;min-height:120px;aspect-ratio:auto}
.live-camera-dialog[data-expanded=true] .tapo-settings-link {display:none}
.live-camera-dialog[data-expanded=true] .tapo-head {margin-bottom:10px}
@media(max-width:460px) {
  .tapo-shell {padding:17px}
  .tapo-expand {padding:8px}
  .tapo-switch button {padding:6px 9px}
  .tapo-controls {gap:6px}
  .tapo-state {gap:5px}
  .tapo-state-icon {width:32px;height:32px}
  .live-camera-dialog {max-height:94dvh}
}
