:root {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #1c273a; background-color: #f4f8fd; font-synthesis: none; line-height: 1.6;
  --surface: #fff; --soft: #f5f8fc; --line: #dde5f0; --muted: #7b879a; --blue: #2460ee;
  --blue-soft: #ecf3ff; --teal: #248e89; --red: #e34848; --red-soft: #fff2f2; --amber: #d8871b;
  --shadow: 0 12px 32px #243e6810;
}
* { box-sizing: border-box; letter-spacing: 0; }
body { margin: 0; min-height: 100vh; background-image: linear-gradient(#61789c04 1px, transparent 1px), linear-gradient(90deg, #61789c04 1px, transparent 1px), linear-gradient(110deg, #e9efff66, transparent 48%, #e6f1ef66); background-size: 40px 40px, 40px 40px, 100% 100%; }
html[data-theme="dark"] { color: #e1e7ef; background-color: #181c23; --surface: #232832; --soft: #1c222c; --line: #394352; --muted: #a0abbc; --blue: #7aa4ff; --blue-soft: #27354c; --teal: #69c7bc; --red: #ff9696; --red-soft: #3b272e; --amber: #eab469; --shadow: 0 12px 32px #0002; }
html[data-theme="dark"] body { background-image: linear-gradient(#90a5bc06 1px, transparent 1px), linear-gradient(90deg, #90a5bc06 1px, transparent 1px); }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
a { color: var(--blue); text-decoration: none; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .46; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #8eb7ff; outline-offset: 3px; }
[hidden] { display: none !important; }
svg { width: 17px; height: 17px; flex-shrink: 0; pointer-events: none; }
.skip { position: absolute; top: -80px; left: 16px; padding: 10px; z-index: 20; background: var(--surface); }
.skip:focus { top: 8px; }
.shell { max-width: 1040px; margin: 28px auto; }
.site-header { padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.announcement { display: flex; align-items: center; gap: 12px; padding: 10px 14px; min-height: 46px; border: 1px solid #cddff8; border-radius: 6px; background: var(--blue-soft); font-size: 12px; }
.announcement .tag { display: inline-grid; place-items: center; min-width: 40px; padding: 3px 7px; background: var(--surface); color: var(--blue); border: 1px solid #d5e3ff; border-radius: 4px; font-size: 11px; flex-shrink: 0; }
.brand-row { display: flex; align-items: center; gap: 16px; padding: 18px 0 20px; }
.brand-mark { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 7px; background: #2154db; color: #fff; box-shadow: 0 8px 18px #2460ee25; font-size: 13px; font-weight: 750; flex-shrink: 0; padding: 4px; overflow-wrap: anywhere; text-align: center; }
.brand-text { min-width: 0; }
.eyebrow { margin: 0 0 2px; color: var(--teal); font-size: 11px; font-weight: 750; }
h1 { margin: 0; font-size: 32px; line-height: 1.35; font-weight: 750; overflow-wrap: anywhere; }
.brand-text .subtitle { margin: 3px 0 0; font-size: 12px; color: var(--muted); }
.preferences { display: flex; align-self: flex-start; gap: 8px; margin-left: auto; }
.icon-button { width: 40px; height: 40px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: inherit; font-size: 12px; font-weight: 650; flex-shrink: 0; }
.icon-button:hover { color: var(--blue); background: var(--soft); }
.nav-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.main-tabs { display: flex; padding: 4px; border: 1px solid var(--line); background: var(--soft); border-radius: 6px; gap: 3px; }
.main-tabs a { white-space: nowrap; overflow-wrap: anywhere; padding: 10px 18px; color: #5b6981; font-size: 13px; font-weight: 600; border-radius: 4px; border: 1px solid transparent; }
.main-tabs a[aria-current="page"] { background: var(--surface); color: var(--blue); border-color: #dbe7fc; box-shadow: 0 2px 4px #263c5310; }
html[data-theme="dark"] .main-tabs a { color: var(--muted); }
.queue { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; white-space: nowrap; }
.queue .dot { width: 8px; height: 8px; border-radius: 50%; background: #32ad86; box-shadow: 0 0 0 4px #32ad8614; margin-right: 2px; }
.queue b { font-size: 21px; color: var(--blue); line-height: 1; min-width: 22px; text-align: center; margin-left: 7px; }
.queue small { font-size: 10px; color: var(--muted); }
main { outline: none; margin-top: 20px; }
.mode-switch { display: flex; padding: 4px; width: 320px; max-width: 100%; margin: 0 auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.mode-switch button { flex: 1; height: 38px; font-size: 12px; font-weight: 650; color: var(--muted); border: 1px solid transparent; border-radius: 5px; background: transparent; }
.mode-switch button[aria-selected="true"] { color: var(--blue); border-color: #97d9ed; background: #eaf8f9; box-shadow: 0 0 0 2px #e8f0ff; }
html[data-theme="dark"] .mode-switch button[aria-selected="true"] { background: #253d47; }
.steps { display: flex; gap: 12px; margin: 0 0 16px; padding: 14px 16px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.steps li { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; font-weight: 600; min-width: 0; }
.steps li:not(:last-child) { flex: 1; }
.steps li:not(:last-child)::after { content: ''; height: 1px; min-width: 12px; flex: 1; background: var(--line); margin-left: 4px; }
.steps b { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; flex-shrink: 0; }
.steps .active { color: var(--blue); }
.steps .active b, .steps .done b { background: var(--blue-soft); border-color: #b6d1ff; color: var(--blue); }
.form-panel { background: var(--surface); padding: 28px; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.form-panel + .form-panel { margin-top: 18px; }
.field { margin-bottom: 20px; }
.field:last-child { margin-bottom: 0; }
label, .field-label { display: block; margin: 0 0 8px; font-size: 13px; font-weight: 650; }
input:not([type="checkbox"]), textarea, select { width: 100%; min-width: 0; color: inherit; border: 1px solid #cfd9e9; border-radius: 6px; background: var(--surface); padding: 12px 14px; }
input:not([type="checkbox"]) { height: 52px; font-size: 13px; }
textarea { min-height: 132px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; line-height: 1.6; }
textarea.compact { min-height: 96px; }
textarea.session-input { min-height: 172px; }
input::placeholder, textarea::placeholder { color: #99a4b7; }
input:focus, textarea:focus { border-color: #82abf5; }
.hint { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.hint.blue { color: var(--blue); font-weight: 600; }
.actions { display: flex; gap: 12px; margin-top: 22px; }
.actions > .button { flex: 1; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 48px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: inherit; padding: 10px 16px; font-size: 13px; font-weight: 600; }
.button:hover:not(:disabled) { background: var(--soft); border-color: #b8c9e5; }
.button.primary { color: white; background: #2460ee; border-color: #2460ee; box-shadow: 0 5px 12px #2460ee15; }
.button.primary:hover:not(:disabled) { background: #194fce; }
.button.danger { color: white; background: #d54444; border-color: #d54444; }
.button.small { min-height: 36px; padding: 7px 12px; font-size: 11px; }
.button.text { background: transparent; color: var(--blue); border: none; box-shadow: none; min-height: 28px; padding: 3px 0; }
.wide { width: 100%; }
.error, .info { margin: 16px 0; padding: 10px 13px; border-radius: 5px; font-size: 12px; overflow-wrap: anywhere; }
.error { background: var(--red-soft); color: var(--red); }
.info { background: var(--blue-soft); color: var(--blue); }
.check { display: flex; align-items: flex-start; gap: 9px; margin: 18px 0; font-size: 12px; color: var(--muted); font-weight: 400; }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: #2460ee; flex-shrink: 0; }
.demo-tools { display: flex; gap: 14px; align-items: center; justify-content: flex-end; margin: 10px 2px 0; font-size: 11px; color: var(--muted); }
.demo-tools select { padding: 3px 8px; width: 130px; height: 30px; font-size: 11px; }
.demo-tools button { font-size: 11px; }
.verified { display: flex; gap: 10px; align-items: center; padding: 12px 14px; margin-bottom: 22px; background: #edf9f6; color: #25896f; border: 1px solid #ccebe2; border-radius: 5px; font-size: 13px; }
html[data-theme="dark"] .verified { background: #243b34; border-color: #346f58; }
h2 { margin: 0; font-size: 19px; line-height: 1.5; }
h3 { margin: 0; font-size: 15px; line-height: 1.6; }
.result-grid { display: grid; grid-template-columns: 38% minmax(0, 1fr); gap: 18px; align-items: start; margin-top: 20px; }
.result-list, .detail-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 26px; box-shadow: var(--shadow); min-width: 0; }
.list-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.kicker { color: var(--muted); font-size: 11px; margin: 0 0 3px; }
.summary { color: var(--muted); font-size: 12px; margin: 10px 0 12px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.filter { padding: 3px 7px; border: 1px solid transparent; border-radius: 4px; font-size: 11px; color: #65728a; background: var(--soft); cursor: pointer; }
.filter[aria-pressed="true"] { border-color: #9cbaf2; color: var(--blue); background: var(--blue-soft); }
.filter b { font-weight: 750; margin-left: 4px; }
.task-list { display: flex; flex-direction: column; gap: 9px; max-height: 560px; overflow: auto; padding-right: 5px; scrollbar-width: thin; }
.task { width: 100%; text-align: left; padding: 12px 13px; border: 1px solid var(--line); border-left: 3px solid var(--amber); border-radius: 6px; background: var(--surface); color: inherit; min-width: 0; }
.task.selected { border-color: #9dc0fd; border-left-color: var(--blue); background: var(--blue-soft); }
.task.failed { border-left-color: var(--red); }
.task.completed { border-left-color: #32ab8d; }
.task.processing { border-left-color: #40b0c1; }
.task.review { border-left-color: var(--amber); }
.task.review.selected { border-color: #e9bd6d; border-left-color: var(--amber); background: #fff8e9; }
html[data-theme="dark"] .task.review.selected { background: #3e3423; }
.task .code { display: block; font-family: ui-monospace, SFMono-Regular, monospace; font-weight: 700; font-size: 12px; overflow-wrap: anywhere; }
.task-meta { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-top: 8px; font-size: 10px; color: var(--muted); }
.task-meta .account { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 150px; }
.status-text { font-weight: 600; color: var(--amber); }
.failed .status-text, .invalid .status-text { color: var(--red); }
.completed .status-text { color: #2c9e80; }
.processing .status-text { color: #249db3; }
.review .status-text { color: var(--amber); }
.plan { display: inline-flex; align-items: center; gap: 5px; border: 1px solid #bfe6e3; border-radius: 5px; padding: 3px 8px; color: var(--teal); background: #eaf9f7; font-size: 10px; font-weight: 650; }
html[data-theme="dark"] .plan { background: #233d3c; border-color: #3e6e6b; }
.status-banner { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 1px solid #b9d8fc; border-left: 3px solid var(--blue); border-radius: 6px; background: var(--blue-soft); padding: 16px; margin-bottom: 14px; }
.status-banner.failed { border-color: #f49a9a; border-left-color: var(--red); background: var(--red-soft); }
.status-banner.completed { border-color: #a9dbcc; border-left-color: #28a280; background: #f1faf7; }
html[data-theme="dark"] .status-banner.completed { background: #233b35; }
.status-banner.unused { border-color: #efd0a4; border-left-color: var(--amber); background: #fff9ee; }
html[data-theme="dark"] .status-banner.unused { background: #3e3423; }
.status-banner.review { border-color: #e9bd6d; border-left-color: var(--amber); background: #fff8e9; }
html[data-theme="dark"] .status-banner.review { background: #3e3423; }
.status-banner .hint { font-size: 11px; margin-top: 4px; }
.status-banner > span { font-size: 11px; font-weight: 650; color: var(--blue); flex-shrink: 0; }
.status-banner.failed > span { color: var(--red); }
.status-banner.completed > span { color: #299b7d; }
.status-banner.review > span { color: var(--amber); }
.detail-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; margin: 0; padding: 0 14px; background: var(--soft); border: 1px solid var(--line); border-radius: 6px; }
.detail-fields > div { padding: 13px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.detail-fields > div:last-child { border: 0; }
.detail-fields .full { grid-column: 1/-1; }
dt { color: var(--muted); font-size: 10px; margin-bottom: 5px; }
dd { font-size: 12px; margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.detail-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.detail-actions small { margin-left: auto; font-size: 9px; color: var(--muted); overflow-wrap: anywhere; max-width: 100%; }
.empty { padding: 42px 16px; text-align: center; color: var(--muted); font-size: 13px; }
.empty svg { width: 30px; height: 30px; margin-bottom: 8px; }
.batch-progress { font-size: 12px; color: var(--blue); margin: 14px 0 0; }
.new-code { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid #b9d8fc; background: var(--blue-soft); border-radius: 6px; margin: 16px 0; }
.new-code code { overflow-wrap: anywhere; min-width: 0; font-size: 15px; font-weight: 600; flex: 1; }
.receipt { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 16px; }
.receipt textarea { min-height: 72px; font-size: 11px; }
footer { display: flex; justify-content: space-between; margin: 20px 2px; font-size: 10px; color: var(--muted); }
footer a { color: var(--muted); }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 40; background: #263449; color: #fff; border-radius: 6px; padding: 12px 20px; font-size: 12px; max-width: calc(100% - 32px); box-shadow: var(--shadow); }
dialog { width: 420px; max-width: calc(100% - 32px); padding: 24px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: inherit; box-shadow: 0 20px 80px #12234233; }
dialog::backdrop { background: #172c4e55; }
dialog p { font-size: 13px; color: var(--muted); }
@media(max-width:1100px) { .shell { margin: 24px; } .main-tabs a { padding: 10px 13px; } .queue { gap: 6px; } .queue small { display: none; } }
@media(max-width:740px) {
  .shell { margin: 14px; } .site-header { padding: 16px; } .announcement { font-size: 11px; gap: 8px; padding: 9px 10px; }
  .brand-row { gap: 11px; padding: 16px 0; flex-wrap: wrap; } .brand-mark { width: 39px; height: 39px; font-size: 11px; }
  h1 { font-size: 25px; } .eyebrow { font-size: 9px; } .brand-text .subtitle { font-size: 10px; }
  .preferences { margin-left: auto; align-self: center; } .preferences .icon-button { width: 34px; height: 34px; }
  .nav-row { flex-direction: column; gap: 12px; align-items: stretch; }
  .main-tabs { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 2px; }
  .main-tabs a { white-space: normal; text-align: center; padding: 8px 3px; font-size: 11px; line-height: 1.6; display: grid; place-items: center; }
  .queue { justify-content: flex-start; padding: 9px 12px; } .queue small { display: inline; margin-left: auto; } .queue b { font-size: 18px; }
  main { margin-top: 16px; } .form-panel { padding: 20px; } .mode-switch { width: 280px; } .mode-switch button { height: 34px; }
  .steps { gap: 8px; padding: 12px; } .steps li { gap: 6px; font-size: 10px; } .steps b { width: 27px; height: 27px; font-size: 12px; }
  .steps li:not(:last-child)::after { margin-left: 0; min-width: 5px; } .result-grid { grid-template-columns: 1fr; }
  .result-list, .detail-panel { padding: 20px; } .task-list { max-height: 270px; } .actions { gap: 9px; }
  .demo-tools { flex-wrap: wrap; justify-content: flex-start; } .detail-fields { gap: 0 12px; } .status-banner h2 { font-size: 18px; } footer { margin: 18px 0; }
}
@media(max-width:420px) {
  .brand-text { flex: 1; } h1 { font-size: 22px; } .preferences { margin-left: 50px; flex: 0 0 calc(100% - 50px); } .form-panel { padding: 18px; }
  .actions { flex-wrap: wrap; } .actions > .button { flex-basis: 100%; } .steps { gap: 6px; padding: 10px; }
  .steps li { gap: 5px; } .steps b { width: 24px; height: 27px; } .steps li:not(:last-child)::after { min-width: 0; }
}
