:root { --bg:#f3f3f3; --panel:#fbfbfb; --line:#e3e3e3; --text:#1b1b1b; --muted:#5f5f5f; --accent:#005fb8; --accent-text:#fff; --bad:#c42b1c; --good:#0f7b0f; color-scheme: light; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg:#202020; --panel:#2b2b2b; --line:#3a3a3a; --text:#f3f3f3; --muted:#b5b5b5; --accent:#4cc2ff; --accent-text:#002033; --bad:#ff99a4; --good:#6ccb5f; color-scheme: dark; } }
:root[data-theme="dark"] { --bg:#202020; --panel:#2b2b2b; --line:#3a3a3a; --text:#f3f3f3; --muted:#b5b5b5; --accent:#4cc2ff; --accent-text:#002033; --bad:#ff99a4; --good:#6ccb5f; color-scheme: dark; }
* { box-sizing: border-box; }
:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.6 "Segoe UI Variable Text", "Segoe UI", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif; }
.top, main { max-width: 860px; margin: 0 auto; padding: 0 20px; }
.top { padding-top: 36px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 12px; }
.logo { width: 28px; height: 28px; border-radius: 7px; background: linear-gradient(135deg, var(--accent), #7f5af0); }
h1 { font-size: 26px; margin: 0; font-weight: 600; }
.beta { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--accent); color: var(--accent); }
.lead { color: var(--muted); margin: 10px 0 0; max-width: 64ch; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 20px; margin: 16px 0; }
h2 { font-size: 17px; margin: 0 0 14px; font-weight: 600; }
h3 { font-size: 15px; margin: 0 0 6px; }
label { display: block; margin: 0 0 12px; font-size: 14px; }
input:not([type=checkbox]):not([type=radio]), textarea { display: block; width: 100%; margin-top: 4px; padding: 7px 10px; border: 1px solid var(--line); border-bottom-color: var(--muted); border-radius: 4px; background: var(--bg); color: var(--text); font: inherit; }
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
textarea { resize: vertical; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 16px; }
.req { color: var(--bad); font-weight: 600; }
.hint { color: var(--muted); font-size: 13px; margin: 4px 0 10px; }
.error { color: var(--bad); min-height: 1.4em; margin: 6px 0; }
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.tier { position: relative; border: 1px solid var(--line); border-radius: 8px; padding: 14px 14px 14px 40px; cursor: pointer; margin: 0; background: var(--bg); }
.tier input { position: absolute; left: 14px; top: 17px; accent-color: var(--accent); }
.tier:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.tier-name { font-weight: 600; display: block; }
.price { display: block; color: var(--accent); font-weight: 600; margin: 2px 0 6px; }
.tier-note { display: block; color: var(--muted); font-size: 13px; }
.switches { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 0; padding: 10px 14px; }
legend { color: var(--muted); font-size: 13px; padding: 0 4px; }
.switch { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.switch input { accent-color: var(--accent); width: 16px; height: 16px; }
.sub { margin-top: 16px; }
details summary { cursor: pointer; font-weight: 600; margin-bottom: 8px; }
.promos { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; }
.promos input { margin-top: 0 !important; }
button { font: inherit; font-weight: 600; padding: 9px 22px; border-radius: 4px; border: 1px solid transparent; background: var(--accent); color: var(--accent-text); cursor: pointer; }
button:disabled { opacity: .55; cursor: progress; }
button.secondary { background: transparent; color: var(--text); border-color: var(--line); }
.bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin: 8px 0 12px; }
#bar-fill { display: block; height: 100%; width: 0; background: var(--accent); transition: width .4s ease; }
.failed #bar-fill { background: var(--bad); }
.succeeded #bar-fill { background: var(--good); }
#job-events { padding-left: 20px; color: var(--muted); font-size: 13px; max-height: 280px; overflow: auto; }
#job-events li:last-child { color: var(--text); }
#downloads a { display: inline-block; margin: 6px 10px 6px 0; padding: 9px 18px; border-radius: 4px; background: var(--accent); color: var(--accent-text); text-decoration: none; font-weight: 600; }
code { word-break: break-all; }
@media (prefers-reduced-motion: reduce) { #bar-fill { transition: none; } }
select { display: block; width: 100%; margin-top: 4px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); color: var(--text); font: inherit; }
.table-wrap { overflow-x: auto; margin-top: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td:nth-child(4) { white-space: normal; }
button.small { padding: 3px 10px; font-size: 12px; }
pre.keys { background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 10px; user-select: all; }
