[hidden]{display:none!important}
*{box-sizing:border-box}
html,body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;background:#f6f6f7;color:#18181b;-webkit-text-size-adjust:100%}
header{display:flex;align-items:center;gap:10px;padding:calc(14px + env(safe-area-inset-top)) 18px 14px;background:#fff;border-bottom:1px solid #eee}
header h1{font-size:20px;margin:0;font-weight:700}
header img{border-radius:8px}
main{max-width:560px;margin:0 auto;padding:20px 18px calc(30px + env(safe-area-inset-bottom))}
h2{font-size:22px;margin:8px 0 16px}
.lbl{display:block;font-weight:600;margin-bottom:8px;font-size:15px;color:#3f3f46}
.row{display:flex;gap:8px}
input[type=url],input[type=password],input[type=text]{flex:1;width:100%;font-size:17px;padding:14px 14px;border:1.5px solid #d4d4d8;border-radius:12px;background:#fff;outline:none;min-width:0}
input:focus{border-color:#e52d27}
button,.big{font:inherit;cursor:pointer;border:0}
.big{display:block;width:100%;margin-top:14px;padding:18px;font-size:19px;font-weight:700;color:#fff;background:#e52d27;border-radius:14px;text-align:center;text-decoration:none;box-shadow:0 2px 8px rgba(229,45,39,.25)}
.big:disabled{opacity:.55}
.big.save{background:#16a34a;box-shadow:0 2px 8px rgba(22,163,74,.25)}
.ghost{padding:0 16px;border-radius:12px;background:#fff;border:1.5px solid #d4d4d8;font-weight:600;color:#3f3f46}
#status{margin-top:22px;background:#fff;border-radius:14px;padding:16px;border:1px solid #eee}
.title{font-weight:600;margin:0 0 10px;word-break:break-word}
.bar{height:12px;background:#eee;border-radius:99px;overflow:hidden}
#fill{height:100%;width:0;background:#e52d27;transition:width .4s}
#fill.indet{width:35%!important;animation:ind 1.2s infinite ease-in-out}
@keyframes ind{0%{margin-left:-35%}100%{margin-left:100%}}
.state{margin:10px 0 0;color:#52525b;font-size:15px}
.err{color:#dc2626;font-size:15px;margin:10px 0 0}
.help{margin-top:26px;background:#fff;border-radius:14px;padding:12px 16px;border:1px solid #eee;font-size:15px;line-height:1.45}
.help summary{font-weight:600;cursor:pointer}
.foot{text-align:center;font-size:14px;color:#71717a;margin-top:22px}
a{color:#e52d27}
ol.steps{padding-left:22px;line-height:1.55}
ol.steps li{margin-bottom:10px}
code,.tok{font-family:ui-monospace,Menlo,monospace;background:#f1f1f3;padding:2px 6px;border-radius:6px;word-break:break-all}
.tok{display:block;padding:12px;margin:10px 0;font-size:15px;user-select:all}
.card{background:#fff;border-radius:14px;padding:16px;border:1px solid #eee;margin-bottom:18px}
.card h3{margin:0 0 10px;font-size:18px}

.dl-link{color:#2563eb;font-weight:600;text-decoration:underline;margin-left:4px}

.fmt{display:flex;gap:8px;margin:12px 0 4px}
.fmt label{flex:1;cursor:pointer}
.fmt input{position:absolute;opacity:0;pointer-events:none}
.fmt span{display:block;text-align:center;padding:10px 6px;border:2px solid #ddd;border-radius:12px;font-weight:600;font-size:16px;background:#fff;color:#333}
.fmt small{font-weight:400;color:#777;font-size:13px}
.fmt input:checked+span{border-color:#e52d27;background:#fff1f0;color:#c41d17}
.fmt input:focus-visible+span{outline:2px solid #e52d27;outline-offset:2px}

.acts{display:flex;gap:8px;margin-top:10px;flex-wrap:wrap}
.act{flex:1;min-width:120px;height:44px;border-radius:12px;background:#2563eb;color:#fff;font-weight:600;font-size:16px}
.act:active{opacity:.85}
.player{display:block;width:100%;margin-top:10px;border-radius:10px}
