.mt-balloon{position:fixed;left:50%;bottom:calc(20px + env(safe-area-inset-bottom,0px));z-index:95;display:flex;align-items:flex-start;gap:12px;box-sizing:border-box;width:min(460px,calc(100vw - 24px));padding:14px 14px 14px 16px;border:1px solid rgba(255,255,255,.18);border-radius:20px;background:linear-gradient(135deg,rgba(255,255,255,.14),rgba(255,255,255,.05));-webkit-backdrop-filter:blur(22px) saturate(1.6);backdrop-filter:blur(22px) saturate(1.6);box-shadow:0 18px 50px rgba(0,0,0,.45),inset 0 1px 0 rgba(255,255,255,.2);color:#f4f4f5;font-family:inherit;transform:translateX(-50%);animation:mtIn .28s ease-out}
.mt-balloon::after{content:'';position:absolute;left:50%;bottom:-7px;width:14px;height:14px;border-right:1px solid rgba(255,255,255,.18);border-bottom:1px solid rgba(255,255,255,.18);border-radius:0 0 4px 0;background:rgba(40,40,46,.55);-webkit-backdrop-filter:blur(22px);backdrop-filter:blur(22px);transform:translateX(-50%) rotate(45deg)}
.mt-balloon .mt-ic{flex:none;display:grid;place-items:center;width:34px;height:34px;border:1px solid rgba(255,255,255,.2);border-radius:12px;background:rgba(255,255,255,.1)}
.mt-balloon .mt-ic svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.mt-balloon .mt-body{flex:1;min-width:0;display:grid;gap:3px}
.mt-balloon .mt-body b{font-size:.86rem;font-weight:800;letter-spacing:-.01em}
.mt-balloon .mt-body p{margin:0;font-size:.78rem;line-height:1.5;color:rgba(244,244,245,.82)}
.mt-balloon .mt-bx{flex:none;box-sizing:border-box;width:28px;height:28px;padding:0;border:1px solid rgba(255,255,255,.2);border-radius:999px;background:rgba(255,255,255,.08);color:inherit;font:inherit;font-size:1rem;line-height:1;cursor:pointer;transition:background-color .2s}
.mt-balloon .mt-bx:hover{background:rgba(255,255,255,.16)}
.mt-balloon .mt-go{justify-self:start;box-sizing:border-box;height:28px;margin-top:6px;padding:0 14px;border:1px solid rgba(255,255,255,.26);border-radius:999px;background:rgba(255,255,255,.12);color:inherit;font:inherit;font-size:.74rem;font-weight:800;cursor:pointer}
.mt-balloon .mt-go:hover{background:rgba(255,255,255,.2)}
.mt-balloon.mt-ok .mt-ic{color:#8ee2a6}
html[data-theme=light] .mt-balloon{border-color:rgba(0,0,0,.14);background:linear-gradient(135deg,rgba(255,255,255,.82),rgba(255,255,255,.55));box-shadow:0 18px 50px rgba(0,0,0,.18),inset 0 1px 0 rgba(255,255,255,.8);color:#18181b}
html[data-theme=light] .mt-balloon::after{border-color:rgba(0,0,0,.14);background:rgba(255,255,255,.7)}
html[data-theme=light] .mt-balloon .mt-ic,html[data-theme=light] .mt-balloon .mt-bx,html[data-theme=light] .mt-balloon .mt-go{border-color:rgba(0,0,0,.16);background:rgba(0,0,0,.05)}
html[data-theme=light] .mt-balloon .mt-body p{color:rgba(24,24,27,.78)}
html[data-theme=light] .mt-balloon.mt-ok .mt-ic{color:#15803d}
@keyframes mtIn{from{opacity:0;transform:translate(-50%,12px)}to{opacity:1;transform:translate(-50%,0)}}
@media (prefers-reduced-motion:reduce){.mt-balloon{animation:none}}

#mt_root{--mt-line:rgba(255,255,255,.16);--mt-sw-line:#9a9a9f;--mt-sw-knob:#cfcfd4;--mt-sw-on:#d4d4d8;--mt-sw-onknob:#1c1c1f;--mt-pill:rgba(255,255,255,.1);--mt-ok:#8ee2a6;--mt-warn:#ffcf70;
  position:relative;display:grid;gap:20px;padding:26px;border:1px solid var(--mt-line);border-radius:24px;background:linear-gradient(135deg,rgba(255,255,255,.11),rgba(255,255,255,.04));-webkit-backdrop-filter:blur(22px) saturate(1.6);backdrop-filter:blur(22px) saturate(1.6);box-shadow:0 18px 50px rgba(0,0,0,.28),inset 0 1px 0 rgba(255,255,255,.16)}
html[data-theme=light] #mt_root{--mt-line:rgba(0,0,0,.14);--mt-sw-line:#6b6b70;--mt-sw-knob:#55555a;--mt-sw-on:#3f3f46;--mt-sw-onknob:#fff;--mt-pill:rgba(0,0,0,.06);--mt-ok:#15803d;--mt-warn:#a16207;background:linear-gradient(135deg,rgba(255,255,255,.85),rgba(255,255,255,.55));box-shadow:0 18px 50px rgba(0,0,0,.1),inset 0 1px 0 rgba(255,255,255,.9)}
#mt_root .mt-top{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;flex-wrap:wrap;padding-bottom:16px;border-bottom:1px solid var(--mt-line)}
#mt_root h2{margin:0 0 4px;font-size:1.1rem;font-weight:800;letter-spacing:-.02em}
#mt_root .muted{margin:0;font-size:.85rem}
#mt_root .mt-pill{display:inline-flex;align-items:center;gap:8px;box-sizing:border-box;height:30px;padding:0 14px;border:1px solid var(--mt-line);border-radius:999px;background:var(--mt-pill);font-size:.76rem;font-weight:800;white-space:nowrap}
#mt_root .mt-pill::before{content:'';width:8px;height:8px;border-radius:50%;background:var(--mt-ok)}
#mt_root .mt-pill[data-on="1"]::before{background:var(--mt-warn)}
#mt_root .mt-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 18px;border:1px solid var(--mt-line);border-radius:18px;background:var(--mt-pill);cursor:pointer}
#mt_root .mt-txt{display:grid;gap:3px;min-width:0}
#mt_root .mt-txt b{font-size:.95rem;font-weight:800;color:inherit}
#mt_root .mt-txt small{font-size:.78rem;color:var(--z-muted)}
#mt_root .mt-sw{position:relative;flex:none;width:44px;height:22px}
#mt_root .mt-sw input{position:absolute;inset:0;z-index:2;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
#mt_root .mt-sw input:disabled{cursor:default}
#mt_root .mt-sw i{position:absolute;inset:0;box-sizing:border-box;border:1px solid var(--mt-sw-line);border-radius:999px;background:transparent;transition:background-color .2s,border-color .2s,opacity .2s}
#mt_root .mt-sw i::after{content:'';position:absolute;top:50%;left:4px;width:12px;height:12px;border-radius:50%;background:var(--mt-sw-knob);transform:translateY(-50%);transition:left .2s,width .15s,background-color .2s}
#mt_root .mt-sw:hover i::after{width:15px}
#mt_root .mt-sw input:checked+i{border-color:var(--mt-sw-on);background:var(--mt-sw-on)}
#mt_root .mt-sw input:checked+i::after{left:calc(100% - 16px);background:var(--mt-sw-onknob)}
#mt_root .mt-sw:hover input:checked+i::after{left:calc(100% - 19px)}
#mt_root .mt-sw input:disabled+i{opacity:.45}
#mt_root .mt-sw input:focus-visible+i{outline:2px solid var(--mt-sw-line);outline-offset:3px}
#mt_root .mt-list{display:grid;gap:8px;margin:0;padding:0;list-style:none}
#mt_root .mt-list li{display:flex;gap:10px;align-items:flex-start;font-size:.84rem;line-height:1.5;color:var(--z-muted)}
#mt_root .mt-list li::before{content:'';flex:none;width:6px;height:6px;margin-top:.55em;border-radius:50%;background:var(--mt-sw-line)}
#mt_root .mt-list b{color:inherit;font-weight:800}
#mt_root .mt-act{display:flex;justify-content:flex-end;gap:10px;padding-top:16px;border-top:1px solid var(--mt-line)}
#mt_root button.mt-btn{box-sizing:border-box;height:38px;padding:0 22px;border:1px solid var(--mt-line);border-radius:999px;background:var(--mt-pill);color:inherit;font-size:.82rem;font-weight:800;cursor:pointer;-webkit-backdrop-filter:blur(14px) saturate(1.5);backdrop-filter:blur(14px) saturate(1.5)}
#mt_root button.mt-btn:hover:not(:disabled){border-color:var(--mt-sw-line);background:var(--mt-line)}
#mt_root button.mt-btn.mt-pri{border-color:var(--mt-sw-on);background:var(--mt-sw-on);color:var(--mt-sw-onknob)}
#mt_root button.mt-btn.mt-pri:hover:not(:disabled){border-color:var(--mt-sw-on);background:var(--mt-sw-on);opacity:.88}
#mt_root button.mt-btn:disabled{opacity:.4;cursor:default}
#mt_root .msg:empty{display:none}
@media(max-width:560px){#mt_root{padding:18px}#mt_root .mt-act{flex-direction:column-reverse}#mt_root button.mt-btn{width:100%}}

body.mt-off{--o-bg:#0b0b0d;--o-text:#f4f4f5;--o-muted:#a1a1aa;--o-line:rgba(255,255,255,.16);--o-card:linear-gradient(135deg,rgba(255,255,255,.12),rgba(255,255,255,.04));margin:0;min-height:100vh;min-height:100dvh;display:grid;place-items:center;padding:20px;box-sizing:border-box;background:radial-gradient(900px 500px at 50% -10%,rgba(255,255,255,.1),transparent),var(--o-bg);color:var(--o-text);font-family:system-ui,-apple-system,'Segoe UI',sans-serif}
@media (prefers-color-scheme:light){body.mt-off{--o-bg:#f4f4f5;--o-text:#18181b;--o-muted:#52525b;--o-line:rgba(0,0,0,.14);--o-card:linear-gradient(135deg,rgba(255,255,255,.9),rgba(255,255,255,.6));background:radial-gradient(900px 500px at 50% -10%,rgba(0,0,0,.06),transparent),var(--o-bg)}}
.mt-off-box{display:grid;justify-items:center;gap:14px;box-sizing:border-box;width:min(480px,100%);padding:36px 28px;border:1px solid var(--o-line);border-radius:28px;background:var(--o-card);-webkit-backdrop-filter:blur(24px) saturate(1.6);backdrop-filter:blur(24px) saturate(1.6);box-shadow:0 24px 70px rgba(0,0,0,.35),inset 0 1px 0 rgba(255,255,255,.16);text-align:center}
.mt-off-logo{width:120px;height:auto}
.mt-off h1{margin:0;font-size:1.5rem;font-weight:800;letter-spacing:-.03em}
.mt-off p{margin:0;font-size:.95rem;line-height:1.6;color:var(--o-muted)}
.mt-off-btn{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;height:38px;margin-top:6px;padding:0 24px;border:1px solid var(--o-line);border-radius:999px;background:rgba(255,255,255,.08);color:var(--o-text);font-size:.82rem;font-weight:800;text-decoration:none}
.mt-off-btn:hover{background:rgba(127,127,127,.2)}

#mt_root .mt-num{cursor:default}
#mt_root .mt-num input{flex:none;box-sizing:border-box;width:120px;height:38px;padding:0 14px;border:1px solid var(--mt-line);border-radius:12px;background:transparent;color:inherit;font:inherit;font-size:.95rem;font-weight:800;text-align:right}
#mt_root .mt-num input:focus-visible{outline:2px solid var(--mt-sw-line);outline-offset:2px}
#mt_root .mt-num input:disabled{opacity:.45}
#mt_root .mt-num[hidden]{display:none}

.mt-gate{position:fixed;inset:0;z-index:200;display:grid;place-items:center;box-sizing:border-box;padding:20px;background:rgba(0,0,0,.45);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);animation:mtFade .25s ease-out}
.mt-gate-box{display:grid;justify-items:center;gap:12px;box-sizing:border-box;width:min(440px,100%);padding:32px 26px;border:1px solid rgba(255,255,255,.18);border-radius:26px;background:linear-gradient(135deg,rgba(255,255,255,.16),rgba(255,255,255,.06));-webkit-backdrop-filter:blur(24px) saturate(1.6);backdrop-filter:blur(24px) saturate(1.6);box-shadow:0 24px 70px rgba(0,0,0,.45),inset 0 1px 0 rgba(255,255,255,.2);color:#f4f4f5;font-family:inherit;text-align:center}
.mt-gate-box .mt-ic{display:grid;place-items:center;width:44px;height:44px;border:1px solid rgba(255,255,255,.2);border-radius:14px;background:rgba(255,255,255,.1)}
.mt-gate-box .mt-ic svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.mt-gate-box b{font-size:1.15rem;font-weight:800;letter-spacing:-.02em}
.mt-gate-box p{margin:0;font-size:.9rem;line-height:1.6;color:rgba(244,244,245,.82)}
.mt-gate-box a{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;height:38px;margin-top:6px;padding:0 24px;border:1px solid rgba(255,255,255,.26);border-radius:999px;background:rgba(255,255,255,.12);color:inherit;font-size:.82rem;font-weight:800;text-decoration:none}
.mt-gate-box a:hover{background:rgba(255,255,255,.2)}
html[data-theme=light] .mt-gate{background:rgba(255,255,255,.4)}
html[data-theme=light] .mt-gate-box{border-color:rgba(0,0,0,.14);background:linear-gradient(135deg,rgba(255,255,255,.9),rgba(255,255,255,.65));box-shadow:0 24px 70px rgba(0,0,0,.2),inset 0 1px 0 rgba(255,255,255,.9);color:#18181b}
html[data-theme=light] .mt-gate-box .mt-ic,html[data-theme=light] .mt-gate-box a{border-color:rgba(0,0,0,.16);background:rgba(0,0,0,.05)}
html[data-theme=light] .mt-gate-box p{color:rgba(24,24,27,.78)}
@keyframes mtFade{from{opacity:0}to{opacity:1}}
@media (prefers-reduced-motion:reduce){.mt-gate{animation:none}}
