:root{color-scheme:dark; font:16px/1.5 system-ui,sans-serif;background:#111925;color:#eaf0f7;--card:#1b2736;--line:#334357;--muted:#b2c2d7;--accent:#9cf4d5}*{box-sizing:border-box}body{margin:0}header,main{max-width:1080px;margin:auto;padding:1.3rem clamp(1rem,4vw,2.5rem)}header{display:flex;align-items:center;gap:.85rem;border-bottom:1px solid var(--line)}header img{width:48px;height:48px;border-radius:13px}header span,p{color:var(--muted)}h1,h2,p{margin:0}h1{font-size:clamp(1.3rem,4vw,1.8rem)}h2{font-size:1.1rem}section,aside,dialog{background:var(--card);border:1px solid var(--line);border-radius:15px;padding:1rem}#panel{display:grid;grid-template-columns:minmax(170px,235px) minmax(0,1fr);gap:1rem}#details{display:grid;gap:1rem}aside{align-self:start}nav,form{display:grid;gap:.6rem;margin-top:.75rem}nav button{text-align:left}nav button[aria-current=true]{border-color:var(--accent);color:var(--accent)}label{display:grid;gap:.22rem;color:var(--muted)}button,input,select{font:inherit;color:inherit;background:#101a28;border:1px solid var(--line);border-radius:9px;padding:.53rem .75rem;min-height:42px}button{cursor:pointer;font-weight:620}button:hover{border-color:#93a9bc}button:disabled{opacity:.42;cursor:default}.primary{background:var(--accent);border-color:var(--accent);color:#142823}.danger{color:#ffc3bc;margin-top:.75rem}.row,.actions,.inline{display:flex;gap:.55rem;align-items:center;flex-wrap:wrap}.row{justify-content:space-between}.actions{margin-top:.65rem}.inline{align-items:stretch}.inline input{min-width:0;flex:1 1 7rem}#login,dialog{max-width:420px;width:100%;margin-inline:auto}#notice{margin-top:1rem;white-space:pre-wrap}#notice[data-error=true]{color:#ffc3bc}[hidden]{display:none!important}dialog::backdrop{background:#0b1420a8}dialog{width:min(92vw,420px)}@media(max-width:640px){#panel{grid-template-columns:1fr}nav{display:flex;flex-wrap:wrap}}

#screen-view { position:relative; margin-top:.75rem; }
.screen-toolbar { display:flex; flex-wrap:wrap; justify-content:center; gap:.4rem; padding-bottom:.45rem; }
.screen-surface { position:relative; display:grid; place-items:center; min-width:0; min-height:0; }
#screen { display:block; max-width:100%; max-height:min(63vh,690px); width:auto; height:auto; border-radius:8px;
    background:#0a121c; object-fit:contain; touch-action:none; user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; }
body.screen-open { overflow:hidden; overscroll-behavior:none; }
#screen-view.fullscreen { position:fixed; z-index:10; inset:var(--screen-top, 0px) auto auto var(--screen-left, 0px);
    width:var(--screen-width, 100%); height:var(--screen-height, 100dvh); margin:0; display:grid;
    overflow:hidden; overscroll-behavior:none; background:#05080c;
    padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
#screen-view.fullscreen:fullscreen { inset:0; width:100%; height:100%; }
.fullscreen .screen-toolbar { display:none; }
.fullscreen .screen-surface { overflow:hidden; }
.fullscreen #screen { position:absolute; inset:0; width:100%; height:100%; max-height:none;
    border-radius:0; background:transparent; }
#screen-minimize { position:absolute; right:calc(var(--picture-margin-x, 0px) + .25rem);
    bottom:calc(var(--picture-margin-y, 0px) + .25rem); display:grid; place-items:center;
    width:42px; height:42px; padding:0; border:0; background:transparent; }
#screen-minimize::before { content:""; grid-area:1/1; width:30px; height:30px; border-radius:8px;
    background:#101a28e8; border:1px solid #8999ae; }
#screen-minimize::after { content:""; grid-area:1/1; width:12px; height:2px; border-radius:1px; background:currentColor; }
#touch-status { position:absolute; left:50%; bottom:1rem; transform:translateX(-50%); max-width:90%;
    width:max-content; padding:.3rem .6rem; border-radius:.35rem; background:#101a28; color:#ffc3bc; pointer-events:none; }

.proxy-choice { display:flex; align-items:center; gap:.55rem; cursor:pointer; }
.proxy-choice input { width:1.15em; min-height:0; height:1.15em; accent-color:var(--accent); }
.proxy-info a { color:var(--accent); }
