:root {
  --accent:#2376cf; --ink:#18283c; --muted:#52667d; --line:#d8e2eb;
  --tint:#edf5ff; --bg:#f4f7fa; --surface:#fff;
  font-family:"PingFang SC","Microsoft YaHei",system-ui,sans-serif;
  color:var(--ink); background:var(--bg); font-size:15px; line-height:1.55;
}
* {box-sizing:border-box}
body {margin:0}
[hidden] {display:none !important}
h1,h2,h3,p {margin:0}
h1 {font-size:clamp(25px,3vw,34px);line-height:1.35;letter-spacing:-.04em}
h2 {font-size:21px;line-height:1.45}
h3 {font-size:17px}
button,input,select,textarea {font:inherit}
button,summary,select {cursor:pointer}
button {border:1px solid var(--line);background:var(--surface);color:var(--ink);border-radius:8px;padding:8px 15px}
button:hover:not(:disabled),summary:hover {color:var(--accent)}
button:disabled {opacity:.58;cursor:wait}
.primary,.primary:hover:not(:disabled) {color:#fff;background:var(--accent);border-color:var(--accent);font-weight:600}
.primary:hover:not(:disabled) {filter:brightness(.94)}
button:focus-visible,summary:focus-visible,a:focus-visible {outline:3px solid var(--accent);outline-offset:3px}
input,select,textarea {max-width:100%;min-width:0;border:1px solid #b9c9da;padding:9px 11px;border-radius:7px;color:var(--ink);background:#fff}
label {display:grid;gap:5px;color:var(--muted);font-size:14px}
small,.hint,.muted {color:var(--muted)}
a {color:var(--accent)}
.quiet {border-color:transparent;background:transparent}.small {font-size:13px}
.sidebar {position:fixed;inset:0 auto 0 0;width:190px;background:#fff;border-right:1px solid var(--line);z-index:4;padding:0 12px}
.brand {display:flex;gap:10px;align-items:center;min-height:76px;padding:0 10px}
.brand-symbol {background:var(--accent);color:white;padding:1px 7px 2px;border-radius:7px;font-weight:700}
.brand strong {font-size:17px;overflow-wrap:anywhere}
.nav-item {width:100%;border:0;text-align:left;padding:10px 14px;margin:3px 0;font-weight:500}
.nav-item.active {background:var(--tint);color:var(--accent);font-weight:650}
.sidebar-footer {position:absolute;bottom:18px;left:20px;right:18px;font-size:12px;color:var(--muted)}
.layout {margin-left:190px;min-height:100vh}
.topbar {background:var(--surface);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;min-height:58px;padding:0 28px}
.top-actions {display:flex;gap:12px;align-items:center;font-size:13px}
.crumb {color:var(--muted)}.mobile-menu {display:none}
.content {max-width:1060px;margin:0 auto;padding:clamp(22px,4vw,48px) clamp(16px,4vw,44px)}
.page-heading,.heading,.panel-head {display:flex;gap:14px;align-items:center;justify-content:space-between}
.page-heading,.heading {margin-bottom:22px}.heading p {font-size:14px;color:var(--muted)}
.delivery-heading-actions {display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}
.page-footer {font-size:12px;color:var(--muted);text-align:center}
.start-card,.panel,.guided-card,#historyDetail {background:white;border:1px solid var(--line);border-radius:14px}
.start-card {padding:clamp(24px,4vw,44px)}
.start-card h2 {font-size:clamp(23px,2.5vw,30px)}
.start-card p {color:var(--muted);margin:9px 0 23px}
.start-primary {padding:11px 28px;font-size:16px}
summary {width:fit-content;color:var(--muted);font-size:14px}
#taskForm {display:grid;gap:14px;max-width:400px;margin-top:15px}
#taskForm button {justify-self:start}.start-card #startError {color:#943b26;margin:13px 0}
.account-section {margin-top:30px}.account-section h2 {font-size:16px;margin-bottom:10px}
.account-list {border:1px solid var(--line);border-radius:10px;background:white;overflow:hidden}
.account-item {display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px}
.account-item+.account-item {border-top:1px solid var(--line)}
.account-item>div {min-width:0;overflow-wrap:anywhere}.account-item strong,.account-item span {display:block}
.account-item span {font-size:13px;color:var(--muted)}.account-item button {white-space:nowrap;font-size:13px}
.account-item .account-actions {display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;flex-shrink:0;max-width:55%}
.account-summary {display:flex;align-items:center;gap:10px}
.account-summary>div {min-width:0}
.account-history-toolbar {display:flex;align-items:center;flex-wrap:wrap;gap:8px 14px;padding:10px 18px;border-block:1px solid var(--line);background:var(--bg)}
.account-history-toolbar label {display:flex;align-items:center;gap:8px;color:var(--ink)}
.account-history-toolbar span {font-size:13px;color:var(--muted);margin-right:auto}
.account-history-toolbar button:disabled {cursor:default}
.account-history-toolbar input[type=checkbox],.account-summary input[type=checkbox] {width:17px;height:17px;flex:none;margin:0;accent-color:var(--accent);cursor:pointer}
.account-history-toolbar input:disabled,.account-summary input:disabled {cursor:default}
.notice,.content-block {margin:0 0 16px;padding:14px 18px}.notice {border-radius:8px;background:var(--tint)}
.content-block img {max-width:100%;height:auto}.content-block h2 {font-size:17px}
.table-wrap,.tabs {overflow-x:auto}.tabs {display:flex;border-bottom:1px solid var(--line);padding:5px 10px 0;gap:4px}
.tab {white-space:nowrap;border:0;border-bottom:2px solid transparent;border-radius:0;padding:12px 14px;color:var(--muted)}
.tab.active {color:var(--accent);border-color:var(--accent)}
.panel-head,.history-pages,#historyDetail {padding:16px 18px}.panel-head {gap:10px}
#historyQuery {flex:1}.history-pages {display:flex;flex-wrap:wrap;align-items:center;gap:7px;font-size:13px}.history-pages span {margin-right:auto}
#historyResult .account-list {border:0;border-radius:0}.empty {color:var(--muted);padding:22px 16px}
table {width:100%;border-collapse:collapse;text-align:left;font-size:13px}td,th {border-bottom:1px solid var(--line);padding:10px;min-width:68px}th {color:var(--muted);white-space:nowrap}.sub {display:block;font-size:12px;color:var(--muted)}
#historyDetail {margin:12px}#historyDetail details,#recordMessage:not(:empty) {margin-top:14px}#recordLinkForm {display:grid;gap:12px}
.record-detail {display:grid;grid-template-columns:100px 1fr;gap:6px 10px}.record-detail dt {color:var(--muted)}.record-detail dd {margin:0;overflow-wrap:anywhere}
#toast {display:none;position:fixed;bottom:25px;left:50%;transform:translateX(-50%);background:#26394d;color:#fff;max-width:90vw;padding:10px 16px;border-radius:9px;z-index:6}
.auth-page {min-height:100vh;display:grid;place-items:center;padding:16px}.auth-card {width:min(400px,100%);background:white;border:1px solid var(--line);padding:30px;border-radius:15px}
.auth-card .brand {min-height:54px;padding:0}.auth-card form {display:grid;gap:14px;margin:20px 0}.auth-card p {margin-top:8px;color:var(--muted)}
#guidedFlow {scroll-margin-top:18px}
@media(max-width:700px){
 .sidebar {display:none}.sidebar.show {display:block;top:58px;box-shadow:8px 0 20px #23384918}
 .layout {margin-left:0}.topbar {padding:0 12px}.mobile-menu {display:block}.crumb {display:none}
 .content {padding:24px 14px}.page-heading,.heading {margin-bottom:17px}.top-actions {gap:5px}
 .start-card {padding:23px 19px}
 .tabs {padding-left:4px}.tab {padding:11px 8px;font-size:13px}.panel-head {padding:10px}
}
.guided-card {padding:clamp(22px,4vw,40px)}
.guided-heading {display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px}
.guided-heading h2 {font-size:clamp(23px,2.5vw,30px)}
.guided-account {color:var(--muted);font-size:13px;overflow-wrap:anywhere}
.guided-detail {margin:8px 0 0;color:var(--muted);overflow-wrap:anywhere;white-space:pre-line}
.guided-error,.guided-progress {margin-top:12px;font-size:14px}
.guided-error {color:#994520;background:#fff5ec;padding:9px 13px;border-radius:7px}
.guided-progress {color:var(--accent)}
.guided-controls {border:0;min-width:0;padding:0;margin:20px 0 0}
.guided-controls:empty {display:none}.guided-controls:has(>button:first-child) {display:flex;flex-wrap:wrap;gap:8px}
.guided-qr {width:fit-content;max-width:100%;background:white;border:1px solid var(--line);border-radius:12px;padding:12px}
.guided-qr img {display:block;width:min(228px,58vw);height:auto;aspect-ratio:1;object-fit:contain}
.guided-fields {display:grid;grid-template-columns:repeat(auto-fit,minmax(132px,1fr));gap:12px;margin:5px 0 20px}
.guided-qr+button,#guidedSms+button,.guided-controls p+button {margin-top:12px}
#guidedSms {display:flex;gap:10px;align-items:end;flex-wrap:wrap}
.guided-tools {margin-top:22px;border-top:1px solid var(--line);padding-top:14px;display:flex;flex-wrap:wrap;gap:10px}
.guided-secondary {font-size:14px}.guided-tools button,.guided-footer button {border-color:transparent;background:transparent;color:var(--muted);padding:5px}
.guided-footer,.guided-stop {margin-top:12px}.guided-footer {text-align:right}.guided-stop p {margin-bottom:10px}.guided-stop button+button {margin-left:8px}
.guided-records {padding-left:1.4em}.guided-records li {padding:7px 0}.guided-records small {display:block;white-space:pre-line}
@media(max-width:700px){
 .guided-card {padding:23px 19px}.guided-fields {grid-template-columns:1fr}
 .guided-qr {margin:0 auto}.guided-heading {align-items:baseline}
}
.guided-qr {width:min(254px,100%);min-height:230px;display:grid;align-content:center;justify-items:center;gap:12px}
.guided-qr .qr-load-note {color:var(--muted);font-size:14px;text-align:center}
.guided-qr[data-image-state=failed],.guided-qr[data-image-state=slow] {background:var(--bg)}
.guided-verification {
 width:min(500px,calc(100% - 28px));max-height:calc(100% - 28px);overflow:auto;
 padding:clamp(18px,4vw,28px);border:1px solid var(--line);border-radius:12px;color:var(--ink);background:#fff;
}
.guided-verification::backdrop {background:#14253b70}
.guided-verification h2 {margin:0 0 10px;font-size:19px}
.guided-verification p {margin:8px 0;color:var(--muted)}
.guided-verification-actions {display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:18px}
.verify-official {display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:8px 13px;border-radius:7px;background:var(--accent);color:#fff;text-decoration:none}
@media(max-width:520px){.guided-verification-actions>*{width:100%}}

.huya-challenge {width:min(660px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:0;border:1px solid #d2dae6;border-radius:13px;background:#fff;color:#162b42;box-shadow:0 22px 80px #0d203d50;overflow:auto}
.huya-challenge::backdrop {background:#0c1d3399}
.huya-challenge-header {display:flex;justify-content:space-between;align-items:flex-start;gap:15px;padding:19px 22px;border-bottom:1px solid #e1e9f3}
.huya-challenge-header h2 {font-size:19px;margin:0}
.huya-challenge-header p {font-size:13px;color:#617389;line-height:1.6;margin:6px 0 0}
.huya-challenge-header button {flex-shrink:0;padding:8px 14px;background:#fff;border:1px solid #d6e0ed;border-radius:6px;cursor:pointer}
.huya-challenge-body {padding:18px 22px 20px}
.huya-challenge-surface {display:grid;place-items:center;width:100%;min-height:180px;border:1px solid #e0e8f1;border-radius:8px;background:#f4f7fb;overflow:hidden;touch-action:none;user-select:none;cursor:crosshair}
.huya-challenge-surface img {display:block;max-width:100%;width:auto;height:auto;max-height:calc(100dvh - 225px);touch-action:none;user-select:none;-webkit-user-drag:none}
.huya-challenge-surface img[hidden] {display:none}
.huya-challenge-surface p {font-size:13px;color:#60758c;padding:28px 8px;text-align:center}
.huya-challenge-error {font-size:13px;color:#a23622;margin-top:10px;line-height:1.5}
.guided-challenge-help {display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:12px 0;color:#915d17;font-size:13px}
@media(max-width:600px){.huya-challenge-header {padding:13px}.huya-challenge-header h2 {font-size:16px}.huya-challenge-body {padding:10px}.huya-challenge-surface img {max-height:calc(100dvh - 190px)}}
.cookie-entry textarea{display:block;min-height:90px;width:100%;resize:vertical;overflow-wrap:anywhere}
.cookie-entry small{line-height:1.5}
.section-heading{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:12px}
.section-heading h2{margin:0}
.multi-workspace{display:grid;grid-template-columns:minmax(0,1fr);gap:14px}
.task-pane{border:1px solid var(--line);border-radius:13px;background:white;overflow:hidden;min-width:0}
.task-pane-head{display:flex;gap:12px;justify-content:space-between;align-items:center;padding:13px 18px;background:#fafdff;border-bottom:1px solid var(--line)}
.task-pane-head>div{min-width:0;display:grid;gap:3px}
.task-pane-head strong{font-size:15px;overflow-wrap:anywhere}
.task-pane-head span,.task-pane-head small{font-size:12px;color:var(--muted);overflow-wrap:anywhere}
.task-pane-head button{flex-shrink:0}
.task-pane iframe{display:block;width:100%;height:490px;border:0;background:#fff}
.embedded-task,.embedded-task #app{background:#fff;min-height:100%;margin:0}
.embedded-task .panel-main{max-width:none;padding:16px 20px 22px}
.embedded-task .guided-card{padding:22px;border:0;box-shadow:none}
.embedded-task .guided-heading h2{font-size:23px}
.embedded-task .guided-footer{margin-top:4px}
.guided-code-dialog{width:min(388px,calc(100% - 20px));max-width:calc(100% - 20px);max-height:calc(100dvh - 24px);padding:0;border:1px solid #d2deec;border-radius:12px;box-shadow:0 18px 55px #122b4460;overflow:auto;background:#fff;color:var(--ink)}
.guided-code-dialog::backdrop{background:#17283e82}
.code-modal-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 17px;border-bottom:1px solid var(--line)}
.code-modal-head h2{font-size:17px;margin:0}
.code-modal-head button{font-size:13px}
.code-modal-body{display:grid;gap:12px;justify-items:start;padding:16px}
.code-modal-body .guided-qr{margin:auto}
.code-modal-body .guided-qr img{width:min(230px,62vw)}
.code-modal-body>p{margin:0;font-size:12px;line-height:1.6;color:var(--muted)}
.code-modal-body>.primary{width:100%}
@media(max-width:740px){.task-pane iframe{height:540px}.task-pane-head{padding:10px}.embedded-task .panel-main{padding:8px}.embedded-task .guided-card{padding:16px}.embedded-task .guided-heading h2{font-size:19px}}

.task-pane-body[hidden]{display:none!important}
.task-pane-data{grid-template-columns:minmax(120px,1fr) minmax(160px,2fr) auto;align-items:center;width:100%;display:grid!important;gap:10px!important}
.task-pane-data small{text-align:right}
.task-pane-head button{white-space:nowrap}
@media(max-width:800px){.task-pane-data{grid-template-columns:1fr!important;gap:2px!important}.task-pane-data small{text-align:left}}

@media(max-width:830px){.topbar{flex-wrap:wrap;gap:7px 10px;padding-top:8px;padding-bottom:8px}}

.guided-rewards{width:100%;display:grid;min-width:0;gap:12px}
.reward-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.reward-heading h3,#guidedOrder h3{font-size:17px;margin:0}
.reward-status{color:var(--muted);margin:0}
.reward-list{max-height:285px;overflow:auto;border:1px solid var(--line);border-radius:9px;padding:12px;scrollbar-gutter:stable}
.reward-section+section{margin-top:15px}
.reward-section h4{margin:0 0 8px;font-size:14px}
.reward-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(188px,100%),1fr));gap:8px}
.reward-item{min-width:0;display:flex;align-items:center;gap:9px;padding:9px;text-align:left}
.reward-item>span{min-width:0;display:grid;gap:3px;overflow-wrap:anywhere}
.reward-item img{width:46px;height:46px;object-fit:contain;background:var(--tint);border-radius:6px;flex:none}
.reward-item small{color:var(--muted)}
.reward-cost{color:var(--accent)}
.reward-item[aria-pressed=true],.purchase-options button[aria-pressed=true]{border-color:var(--accent);background:var(--tint)}
.reward-item:disabled{opacity:1;background:#f8fafc;cursor:default}
#guidedRedeem{display:flex;gap:10px;align-items:center;justify-content:space-between;flex-wrap:wrap}
#guidedRedeem p{margin:0}
#guidedRedeem button{margin:0}
.reward-quantity {display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.reward-quantity input {width:85px}
.reward-quantity output {font-size:13px;color:var(--muted)}
.guided-batch {display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:space-between;
  padding:10px 12px;margin-top:12px;background:var(--tint);border-radius:8px}
#guidedOrder{width:100%;min-width:0;margin:0 0 22px}
#guidedOrder+.guided-rewards{padding-top:15px;border-top:1px solid var(--line)}
.purchase-options{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0 12px}
.guided-quantity{display:grid;gap:5px}
.guided-quantity>div{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:5px}
.guided-quantity button{padding-inline:12px}
.guided-quantity button:disabled{cursor:default}
.guided-quantity input{text-align:center}
