:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  background: #080c11;
  color: #e1e9ed;
  --muted: #84949e;
  --border: #ffffff0d;
  --accent: #a1f0d1;
  --ease: cubic-bezier(.2, .75, .25, 1);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 52px 20px;
  isolation: isolate;
  background: radial-gradient(ellipse at 50% 0, #25374326, transparent 60%), radial-gradient(ellipse at 50% 100%, #0d231f35, transparent 65%);
}
body::before, body::after { content: ""; position: fixed; pointer-events: none; z-index: -1; }
body::before {
  inset: 0;
  background: radial-gradient(ellipse at 42% 43%, #4da78c14 0, transparent 39%), radial-gradient(ellipse at 69% 68%, #4476a30c 0, transparent 33%);
  animation: atmosphere 11s ease-in-out infinite alternate;
}
body::after {
  inset: 0;
  background-image: linear-gradient(#a3cfdf05 1px, transparent 1px), linear-gradient(90deg, #a3cfdf05 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, #0009, transparent 72%);
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .35; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
[hidden] { display: none !important; }
::selection { color: #d3ffed; background: #5ab58c48; }
.panel {
  position: relative;
  width: min(500px, 100%);
  padding: 33px 34px 27px;
  border: 1px solid #a8c2cb20;
  border-radius: 22px;
  background: radial-gradient(ellipse at 50% 0, #ffffff04, transparent 65%), linear-gradient(145deg, #141d26 0%, #10171f 45%, #10191f 100%);
  box-shadow: 0 36px 100px #0006, 0 5px 18px #0003, inset 0 1px #ffffff05;
  animation: arrive .85s var(--ease) both;
}
.panel::before { content: ""; pointer-events: none; position: absolute; top: -1px; left: 20%; right: 20%; height: 1px; background: linear-gradient(90deg, transparent, #bcf2df7a, transparent); box-shadow: 0 0 20px 1px #79e4bd0a; }
.panel::after { content: ""; position: absolute; bottom: 12px; left: calc(50% - 15px); width: 30px; height: 2px; border-radius: 10px; background: #a1f0d11c; }
header, .state-head, .dialog-heading, .dialog-actions { display: flex; align-items: center; justify-content: space-between; }
header { padding-bottom: 25px; border-bottom: 1px solid var(--border); }
.brand { display: inline-flex; align-items: center; gap: 13px; color: #eaf0f2; text-decoration: none; font-size: 21px; font-weight: 580; letter-spacing: -.65px; }
.brand-icon { position: relative; display: grid; place-items: center; width: 41px; height: 44px; border: 1px solid #b0f4db36; border-radius: 12px; background: linear-gradient(140deg, #8ed5b91d, #5cb3a008); box-shadow: inset 0 1px #d9fff00c, 0 0 24px #91d4b907; color: #b2efda; font-size: 23px; font-weight: 650; letter-spacing: -1px; transition: box-shadow .4s ease, border-color .4s ease; }
.brand:hover .brand-icon { border-color: #b0f4db6b; box-shadow: 0 0 25px #91d4b915; }
.brand small { display: block; margin-top: 5px; color: #7b9a9b; font-family: ui-monospace, SFMono-Regular, monospace; font-size: 8px; font-weight: 450; letter-spacing: 2.8px; }
.notice { position: relative; margin-top: 22px; padding: 13px 15px; border: 1px solid #ddba742b; border-radius: 9px; background: #d6aa5310; color: #cbbb98; font-size: 12px; line-height: 1.85; animation: reveal .4s var(--ease) both; }
.notice strong { color: inherit; font-weight: 650; }
.notice.error { border-color: #db8f7d33; background: #bd6b5810; color: #dcaa9c; }
.notice.good { border-color: #86d5ae2b; background: #63bf9810; color: #a0cdb6; }
.device { margin-top: 20px; text-align: center; }
.device-visual { position: relative; display: grid; place-items: center; height: 189px; perspective: 600px; }
.device-visual::before { content: ""; position: absolute; width: 212px; height: 212px; border-radius: 50%; background: radial-gradient(circle, #8aded41a, #64bca50b 40%, transparent 68%); animation: aura 6s ease-in-out infinite; }
.device-visual::after { content: ""; position: absolute; width: 188px; height: 1px; background: linear-gradient(90deg, #a6e6d52a 0 4px, transparent 4px calc(100% - 4px), #a6e6d52a calc(100% - 4px)); }
.device-orbit { position: absolute; width: 151px; height: 151px; border: 1px solid #a4decf12; border-radius: 50%; background: radial-gradient(circle at 40% 30%, #9bdbcf08, #77b4a903 70%); box-shadow: inset 0 0 22px #7ac9b803; }
.device-orbit::before { content: ""; position: absolute; inset: -13px; border: 1px dashed #98c5c51c; border-radius: 50%; animation: orbit 100s linear infinite; }
.device-orbit::after { content: ""; position: absolute; inset: -1px; border: 1px solid transparent; border-top-color: #b6f7df55; border-right-color: #b6f7df19; border-radius: 50%; transform: rotate(-40deg); animation: orbit 24s linear infinite; }
.device-picture { position: relative; z-index: 1; height: 143px; overflow: visible; filter: drop-shadow(0 14px 10px #0006) drop-shadow(0 0 12px #86c7bd0b); animation: levitate 6s ease-in-out infinite; }
.device-visual:hover .device-orbit::after { border-top-color: #c2ffe8aa; }
.device-visual:hover .device-picture { filter: drop-shadow(0 16px 12px #0007) drop-shadow(0 0 15px #86c7bd26); }
.device h1 { margin: 2px 0 11px; font-size: 25px; font-weight: 520; letter-spacing: -.8px; }
.badge { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border: 1px solid #a3b5be12; border-radius: 99px; font-size: 10px; font-weight: 450; letter-spacing: .15px; }
.badge i { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.neutral { color: #83969d; background: #a8b8c007; }
.success { color: #9ddcbe; background: #8ed1ac0a; border-color: #8ed1ac23; }
.badge.success i { animation: led-breathe 3s ease-in-out infinite; }
.details { margin: 29px 0 0; font-size: 11px; text-align: left; }
.details > div { display: flex; align-items: baseline; justify-content: space-between; gap: 22px; padding: 12px 0; border-top: 1px solid var(--border); }
.details > div:last-child { border-bottom: 1px solid var(--border); }
.details dt { flex-shrink: 0; color: #7e929e; font-size: 9px; font-weight: 500; letter-spacing: 1.25px; text-transform: uppercase; }
.details dd { margin: 0; min-width: 0; color: #b6c6cc; text-align: right; overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; font-weight: 400; font-variant-numeric: tabular-nums; line-height: 1.8; letter-spacing: -.2px; }
.state-display { position: relative; margin-top: 23px; padding: 11px 0 6px; text-align: center; animation: reveal .5s var(--ease) both; }
.state-value { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 4px; }
.state-value strong { color: #879eaa; font-size: 30px; font-weight: 480; letter-spacing: -.8px; }
.state-symbol { display: grid; place-items: center; width: 29px; height: 29px; border: 1px solid #a9c5cd36; border-radius: 50%; color: #87a8ae; font-size: 15px; }
.state-display.on strong, .state-display.ok strong { color: #b8f1d7; text-shadow: 0 0 30px #8de7bf15; }
.state-display.ok strong { font-size: 32px; font-weight: 500; letter-spacing: 1.5px; }
.state-display.on .state-symbol, .state-display.ok .state-symbol { color: #abefc9; border-color: #99e7b95c; background: #85dbab0c; box-shadow: 0 0 18px #85dbab0a; }
.state-display.ok .state-symbol { animation: success-breathe 4s ease-in-out infinite; }
.state-display.off strong { color: #b7ccdb; }
.state-display.off .state-symbol { color: #9db9cd; border-color: #91b1cc44; background: #91b1cc08; }
.state-display.pending strong { color: #d7c092; }
.state-display.pending .state-symbol { color: #d4b87e; border-color: #d4b87e44; background: #d4b87e08; }
.state-display:is(.on, .off) { position: absolute; top: var(--mode-top, 40px); right: var(--panel-side, 34px); margin: 0; padding: 8px 10px; border: 1px solid #a3c7cf20; border-radius: 7px; background: #a3c7cf05; }
.state-display:is(.on, .off) .state-value { gap: 7px; margin: 0; }
.state-display:is(.on, .off) strong { font-family: ui-monospace, SFMono-Regular, monospace; font-size: 10px; font-weight: 500; line-height: 14px; letter-spacing: .15px; text-shadow: none; }
.state-display:is(.on, .off) .state-symbol { width: 4px; height: 4px; border: 0; background: currentColor; font-size: 0; box-shadow: 0 0 8px currentColor; }
.state-display.on { border-color: #99e7b928; background: #85dbab08; }
.state-display.on .state-symbol { animation: led-breathe 3s ease-in-out infinite; }
body.busy .state-display { opacity: .55; transition: opacity .3s ease; }
body.busy .device-orbit::after { animation-duration: 5s; }
body.busy .device-visual::before { animation-duration: 2.5s; }
.progress { margin-top: 24px; }
.bar { height: 3px; border-radius: 99px; background: #9eb8c012; overflow: hidden; }
.bar span { display: block; position: relative; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #457d72, #b4edce); box-shadow: 0 0 14px #a3e7c93b; transition: width .5s var(--ease); }
.bar span::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, #edfff55c, transparent); transform: translateX(-100%); }
body.busy .bar span::after { animation: flow 2.8s ease-in-out infinite; }
.bar span.failed { background: #b97d70; box-shadow: none; }
.progress #cancel { display: block; margin: 10px 0 0 auto; }
.actions { display: flex; flex-direction: column; gap: 9px; margin-top: 25px; }
.actions:empty { margin-top: 0; }
.actions .text-button { align-self: center; padding: 7px 0; }
.switch-actions { display: flex; gap: 10px; }
.switch-actions button { flex: 1; }
.button { position: relative; display: inline-flex; justify-content: center; align-items: center; width: 100%; min-height: 45px; overflow: hidden; padding: 12px 18px; border: 1px solid transparent; border-radius: 9px; font-size: 12px; font-weight: 600; letter-spacing: .15px; transition: transform .25s var(--ease), background .25s ease, border-color .25s ease, box-shadow .3s ease; }
.button::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg, transparent 20%, #ffffff12 50%, transparent 80%); transform: translateX(-130%); transition: transform .8s var(--ease); }
.button:not(:disabled):hover::before { transform: translateX(130%); }
.button:not(:disabled):hover { transform: translateY(-1px); }
.button:not(:disabled):active { transform: translateY(1px); transition-duration: .1s; }
.primary { color: #122b25; border-color: #c5f8df7a; background: linear-gradient(135deg, #bbefd9, #94d7c1); box-shadow: 0 1px 0 #edfff326 inset, 0 4px 16px #8de1bb08; }
.primary::after { content: ""; position: absolute; right: 20px; width: 5px; height: 5px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: rotate(45deg); opacity: .55; transition: right .25s var(--ease); }
.primary:not(:disabled):hover { border-color: #d6ffed; box-shadow: 0 0 26px #8de1bb13, 0 6px 14px #0002; }
.primary:not(:disabled):hover::after { right: 17px; }
.secondary { color: #a2b7bf; border-color: #a3c7cf20; background: #a3c7cf05; }
.secondary:not(:disabled):hover { border-color: #a3c7cf44; background: #a3c7cf0b; }
.enable { color: #b2e6cd; border-color: #a0e5c62e; background: #85cdaa0b; }
.enable:not(:disabled):hover { background: #85cdaa17; border-color: #a0e5c65c; box-shadow: 0 0 20px #85cdaa08; }
.danger { color: #d7a99c; border-color: #d7a3932e; background: #cb89760b; }
.danger:not(:disabled):hover { background: #cb897617; border-color: #d7a3935c; }
.text-button { width: auto; padding: 0; border: 0; background: none; color: #839da5; font-size: 11px; transition: color .2s ease; }
.text-button:hover:not(:disabled) { color: #b8e1d4; }
.danger-text { color: #c58d7f; }
dialog { width: min(420px, calc(100% - 32px)); padding: 29px; color: #dce5e9; border: 1px solid #a8c2cb2b; border-radius: 18px; background: linear-gradient(145deg, #19232c, #111a22); box-shadow: 0 30px 100px #0008; }
dialog[open] { animation: reveal .25s var(--ease) both; }
dialog::backdrop { background: #03080d9e; backdrop-filter: blur(8px); }
dialog h2 { margin: 15px 0 11px; font-size: 22px; font-weight: 520; letter-spacing: -.6px; }
dialog p { margin: 0; color: #9cabb4; font-size: 12px; line-height: 1.85; }
.eyebrow { color: #c29a8b; font-family: ui-monospace, SFMono-Regular, monospace; font-size: 9px; letter-spacing: 2px; }
.icon-button { padding: 2px; border: 0; background: none; color: #8fa4ac; font-size: 22px; line-height: 1; transition: color .2s ease; }
.icon-button:hover { color: #edf6f8; }
#erase-field { margin-top: 23px; }
#erase-field label { display: block; color: #b0aba6; font-size: 11px; line-height: 1.8; }
#erase-field label strong { color: #d3b7a9; font-family: ui-monospace, SFMono-Regular, monospace; font-size: 10px; letter-spacing: 1px; }
#erase-field input { width: 100%; margin-top: 10px; padding: 12px 14px; border: 1px solid #c49e8c36; border-radius: 8px; background: #080f165c; color: #e1c5b6; font-family: ui-monospace, SFMono-Regular, monospace; font-size: 12px; letter-spacing: 1.5px; transition: border-color .25s ease, box-shadow .25s ease; }
#erase-field input::placeholder { color: #68767a; }
#erase-field input:focus { outline: none; border-color: #c49e8c77; box-shadow: 0 0 0 3px #c49e8c09; }
.dialog-actions { gap: 10px; margin-top: 24px; }
.dialog-actions .button { width: auto; min-width: 95px; }
@keyframes atmosphere { from { opacity: .65; transform: translate3d(-2%, -1%, 0); } to { opacity: 1; transform: translate3d(2%, 1%, 0); } }
@keyframes arrive { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes reveal { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes aura { 0%, 100% { opacity: .5; transform: scale(.94); } 50% { opacity: 1; transform: scale(1.05); } }
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes levitate { 0%, 100% { transform: translateY(0) rotate(-8deg); } 50% { transform: translateY(-5px) rotate(-6deg); } }
@keyframes led-breathe { 0%, 100% { opacity: .6; box-shadow: 0 0 0 0 #9ddcbe00; } 50% { opacity: 1; box-shadow: 0 0 0 4px #9ddcbe09, 0 0 9px #9ddcbe30; } }
@keyframes success-breathe { 0%, 100% { box-shadow: 0 0 0 0 #85dbab00; } 50% { box-shadow: 0 0 0 5px #85dbab05, 0 0 20px #85dbab12; } }
@keyframes flow { to { transform: translateX(100%); } }
@media (max-width: 520px) {
  body { padding: 24px 16px; }
  .panel { padding: 27px 24px 24px; border-radius: 18px; --mode-top: 34px; --panel-side: 24px; }
  header { padding-bottom: 22px; }
  .brand { font-size: 20px; }
  .device-visual { height: 173px; }
  .device-picture { height: 132px; }
  .device-orbit { width: 137px; height: 137px; }
  .device-visual::after { width: 174px; }
  .details > div { gap: 15px; padding: 11px 0; }
  .details dd { font-size: 9px; line-height: 1.9; }
  .notice { padding: 11px 12px; font-size: 11px; }
  .state-display.ok strong { font-size: 29px; }
}
@media (max-height: 760px) and (min-width: 521px) {
  body { padding-top: 24px; padding-bottom: 24px; }
  .panel { padding-top: 26px; --mode-top: 33px; }
  .device-visual { height: 157px; }
  .device-orbit { width: 126px; height: 126px; }
  .device-picture { height: 122px; }
  .details { margin-top: 22px; }
}
@media (max-width: 380px) {
  .panel { padding: 24px 20px; --mode-top: 28px; --panel-side: 20px; }
  .brand { gap: 9px; font-size: 17px; }
  .brand-icon { width: 34px; height: 37px; font-size: 20px; }
  .brand small { font-size: 7px; letter-spacing: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .device-picture { transform: rotate(-8deg); }
}
