/* ============================================================ 基础 */
:root {
  --bg: #080a0f;
  --bg-2: #0b0e15;
  --panel: #11151e;
  --panel-2: #161b26;
  --line: #222835;
  --line-2: #1a1f2b;
  --text: #e9edf5;
  --muted: #8b95a9;
  --dim: #5d677b;
  --accent: #7c9cff;
  --accent-2: #a78bfa;
  --ok: #3ddc97;
  --err: #ff6f6f;
  --warn: #ffc46b;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --mono: "SF Mono", "JetBrains Mono", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 520px at 12% -10%, rgba(124, 156, 255, .13), transparent 60%),
    radial-gradient(760px 460px at 92% 4%, rgba(167, 139, 250, .10), transparent 62%);
  pointer-events: none;
  z-index: 0;
}

.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
code { font-family: var(--mono); font-size: 12px; color: #b9c6ff; background: rgba(124,156,255,.09); padding: 1px 5px; border-radius: 5px; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 22px; }
h2 { font-size: 15px; }

/* ============================================================ 通用控件 */
.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: .16s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn:hover { background: #1c2231; border-color: #2e3646; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.primary {
  background: linear-gradient(135deg, #6e8dff, #9b7bfa);
  border: none;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(110, 141, 255, .28);
}
.btn.primary:hover { box-shadow: 0 10px 30px rgba(110, 141, 255, .4); filter: brightness(1.05); }
.btn.block { width: 100%; padding: 12px; }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--panel-2); }
.btn.danger { color: var(--err); border-color: rgba(255, 111, 111, .3); }
.btn.danger:hover { background: rgba(255, 111, 111, .08); }
.btn.tiny, .tiny {
  font-size: 12px;
  padding: 4px 9px;
  border-radius: 7px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
}
.tiny:hover { color: var(--text); border-color: #333c4e; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field > span, .field > .row-between > span:first-child {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: .02em;
}
.row-between { display: flex; align-items: center; justify-content: space-between; }
.counter { font-size: 11px; color: var(--dim); font-family: var(--mono); }
.row { display: flex; align-items: center; }
.row.gap { gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.times { color: var(--dim); padding: 0 2px; }

input, select, textarea {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  padding: 10px 12px;
  transition: border-color .16s, box-shadow .16s;
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(124, 156, 255, .55);
  box-shadow: 0 0 0 3px rgba(124, 156, 255, .12);
}
input::placeholder, textarea::placeholder { color: #4d5668; }
textarea { resize: vertical; min-height: 96px; line-height: 1.65; }
select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b95a9' stroke-width='2.4'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
input[type=number] { font-family: var(--mono); }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  font-size: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 11px;
  cursor: pointer;
  font-family: inherit;
  transition: .15s;
}
.chip:hover { color: var(--text); border-color: rgba(124, 156, 255, .45); background: rgba(124, 156, 255, .08); }

.hint { font-size: 12px; color: var(--dim); margin: 0; }
.hint.error { color: var(--err); min-height: 18px; }
.hint.warn { color: #f0b45f; line-height: 1.65; }
.hint.ok { color: #72d6a4; line-height: 1.65; }
.banner {
  font-size: 12.5px;
  line-height: 1.6;
  padding: 9px 12px;
  border-radius: 9px;
  margin: 0 0 10px;
  border: 1px solid transparent;
}
.banner.ok { color: #72d6a4; background: rgba(64, 190, 130, .1); border-color: rgba(64, 190, 130, .28); }
.banner.bad { color: #f08a8a; background: rgba(230, 90, 90, .1); border-color: rgba(230, 90, 90, .3); }

.alert {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 11px;
  background: rgba(255, 111, 111, .08);
  border: 1px solid rgba(255, 111, 111, .26);
  color: #ffb3b3;
  font-size: 13px;
  word-break: break-word;
}

/* ============================================================ 侧栏 */
.shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 216px 1fr;
  min-height: 100vh;
}
.rail {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 22px 14px;
  border-right: 1px solid var(--line-2);
  background: rgba(11, 14, 21, .72);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 13.5px; letter-spacing: -.01em; }
.brand-text span { font-size: 10.5px; color: var(--dim); letter-spacing: .14em; text-transform: uppercase; }

.mark {
  width: 46px; height: 46px;
  border-radius: 13px;
  background: linear-gradient(135deg, #6e8dff, #9b7bfa);
  display: grid; place-items: center;
  box-shadow: 0 8px 22px rgba(110, 141, 255, .3);
  flex: none;
}
.mark span {
  width: 17px; height: 17px;
  border-radius: 50%;
  background: #fff;
  box-shadow: -9px 9px 0 -5px rgba(255, 255, 255, .6);
}
.mark.small { width: 32px; height: 32px; border-radius: 10px; }
.mark.small span { width: 12px; height: 12px; box-shadow: -6px 6px 0 -3.5px rgba(255,255,255,.6); }

nav { display: flex; flex-direction: column; gap: 3px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
  transition: .15s;
  text-align: left;
}
.nav-item svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.nav-item:hover { color: var(--text); background: rgba(255, 255, 255, .035); }
.nav-item.active {
  color: #dbe4ff;
  background: linear-gradient(100deg, rgba(124, 156, 255, .16), rgba(167, 139, 250, .07));
  border-color: rgba(124, 156, 255, .2);
}
.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.conn { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--dim); padding: 0 12px 6px; }
.conn i { width: 6px; height: 6px; border-radius: 50%; background: var(--dim); box-shadow: 0 0 0 3px rgba(255,255,255,.03); }
.conn.ok i { background: var(--ok); box-shadow: 0 0 0 3px rgba(61, 220, 151, .14); }
.conn.warn i { background: var(--warn); box-shadow: 0 0 0 3px rgba(255, 196, 107, .14); }

/* ============================================================ 主区 */
.main { padding: 30px 34px 60px; max-width: 1400px; width: 100%; }
.view { animation: fade .28s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.view-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 16px; flex-wrap: wrap; }

.panel {
  background: linear-gradient(180deg, rgba(22, 27, 38, .82), rgba(17, 21, 30, .92));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .22);
}
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.tag {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  color: var(--muted);
  border: 1px solid var(--line);
}
.tag.ok { color: #8ff0c4; background: rgba(61, 220, 151, .08); border-color: rgba(61, 220, 151, .25); }
.tag.off { color: #ffb3b3; background: rgba(255, 111, 111, .08); border-color: rgba(255, 111, 111, .22); }

/* 模式切换 */
.seg {
  display: inline-flex;
  padding: 4px;
  gap: 3px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 11px;
  margin-bottom: 18px;
}
.seg-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  padding: 7px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: .15s;
}
.seg-btn:hover { color: var(--text); }
.seg-btn.active {
  background: linear-gradient(135deg, rgba(110, 141, 255, .9), rgba(155, 123, 250, .9));
  color: #fff;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(110, 141, 255, .25);
}
.seg.small { margin: 0; }
.seg.small .seg-btn { padding: 5px 12px; font-size: 12px; }

/* 工作室布局 */
.studio {
  display: grid;
  grid-template-columns: 372px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.controls { display: flex; flex-direction: column; gap: 15px; position: sticky; top: 24px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.custom-size { padding: 12px; border: 1px dashed var(--line); border-radius: 10px; gap: 8px; }
.custom-size .row { gap: 8px; }

.drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px;
  border: 1px dashed #2a3242;
  border-radius: 11px;
  color: var(--dim);
  font-size: 12.5px;
  cursor: pointer;
  transition: .16s;
  background: rgba(255, 255, 255, .015);
}
.drop svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.drop:hover, .drop.drag { border-color: rgba(124, 156, 255, .5); color: var(--accent); background: rgba(124, 156, 255, .05); }
.ref-preview { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.ref-preview .thumb { position: relative; width: 56px; height: 56px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.ref-preview img { width: 100%; height: 100%; object-fit: cover; }
.ref-preview button {
  position: absolute; top: 2px; right: 2px;
  width: 17px; height: 17px; border-radius: 50%;
  border: none; background: rgba(0, 0, 0, .68); color: #fff;
  font-size: 11px; line-height: 1; cursor: pointer; padding: 0;
}

.btn-timer { font-family: var(--mono); font-size: 12px; opacity: .85; }

/* 结果区 */
.output { min-height: 520px; display: flex; flex-direction: column; }
.output-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; gap: 12px; }
.empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--dim);
  text-align: center;
  padding: 40px 20px;
}
.empty svg { width: 40px; height: 40px; fill: none; stroke: #3a4356; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.empty p { margin: 0; color: var(--muted); font-size: 13.5px; }
.empty span { font-size: 12px; color: var(--dim); }

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.result-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-2);
  animation: fade .3s ease;
}
.result-card .imgbox {
  position: relative;
  background:
    linear-gradient(45deg, #0d1017 25%, transparent 25%) 0 0/16px 16px,
    linear-gradient(-45deg, #0d1017 25%, transparent 25%) 0 8px/16px 16px,
    #10141d;
  display: grid;
  place-items: center;
  min-height: 180px;
}
.result-card img { max-width: 100%; max-height: 420px; display: block; object-fit: contain; }
.result-card .meta { padding: 9px 11px; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--dim); font-family: var(--mono); }
.result-card .acts { display: flex; gap: 6px; }
.icon-btn {
  display: grid; place-items: center;
  width: 26px; height: 26px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: .15s;
}
.icon-btn:hover { color: var(--text); background: rgba(255,255,255,.05); }
.icon-btn svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* 历史 */
.history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 13px;
}
.hist-card {
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
  background: var(--bg-2);
  cursor: pointer;
  transition: .18s;
  position: relative;
}
.hist-card:hover { border-color: rgba(124, 156, 255, .4); transform: translateY(-2px); box-shadow: 0 14px 30px rgba(0,0,0,.32); }
.hist-card img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block; background: #0d1017; }
.hist-card .cap {
  padding: 8px 10px;
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-top: 1px solid var(--line-2);
}
.hist-card .badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(8, 10, 15, .72);
  backdrop-filter: blur(6px);
  color: #b9c6ff;
  border: 1px solid rgba(124, 156, 255, .25);
}
.pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 26px; }

/* 设置 */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; }
.settings-grid .panel { display: flex; flex-direction: column; gap: 13px; }
.span2 { grid-column: 1 / -1; }
.kv { display: flex; gap: 30px; flex-wrap: wrap; padding: 4px 0 8px; }
.kv > div { display: flex; flex-direction: column; gap: 3px; }
.kv span { font-size: 11.5px; color: var(--dim); }
.kv b { font-size: 15px; font-weight: 600; }

.two-col { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 26px; align-items: start; }
.two-col .col { display: flex; flex-direction: column; gap: 14px; }
.note {
  padding: 14px 16px;
  border-radius: 11px;
  border: 1px solid rgba(255, 196, 107, .22);
  background: rgba(255, 196, 107, .045);
  color: #cbb287;
  font-size: 12.5px;
  line-height: 1.75;
}
.note strong { display: block; color: #e8cf9d; margin-bottom: 5px; font-size: 12.5px; }
.note code { color: #e6d3ae; background: rgba(255, 196, 107, .1); }

@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; gap: 16px; }
}

/* ============================================================ 认证页 */
.auth {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 30px 18px;
}
.auth-card {
  width: 100%;
  max-width: 452px;
  background: linear-gradient(180deg, rgba(24, 29, 41, .92), rgba(15, 19, 27, .96));
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 34px 32px 30px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: fade .3s ease;
}
.auth-card.narrow { max-width: 404px; text-align: center; }
.auth-card.narrow .hint { text-align: left; }
.auth-card .mark { margin-bottom: 2px; }
.auth-card.narrow .mark { margin: 0 auto 4px; }
.auth-card h1 { font-size: 21px; }
.auth-card .sub { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }

.qr-wrap { display: flex; flex-direction: column; gap: 12px; align-items: center; margin: 4px 0; }
.qr {
  background: #fff;
  padding: 12px;
  border-radius: 14px;
  width: 188px;
  height: 188px;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .35);
}
.qr svg { width: 100%; height: 100%; display: block; }
.locked {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 16px 18px;
  border: 1px dashed rgba(139, 149, 169, .32);
  border-radius: 14px;
  background: var(--bg-2);
  text-align: left;
  animation: fade .25s ease;
}
.locked-head { display: flex; align-items: center; gap: 9px; }
.locked-head svg { width: 19px; height: 19px; fill: none; stroke: #a9b6ff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.locked-head b { font-size: 14px; }
.locked p { margin: 0; font-size: 12.5px; line-height: 1.65; color: var(--muted); }
.locked .hint { font-size: 11.5px; line-height: 1.7; color: var(--dim); }
.locked code { font-size: 11.5px; color: #c9d4ff; }
.cmd-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(0, 0, 0, .28);
}
.cmd-row code { flex: 1; word-break: break-all; background: none; padding: 0; }
.secret-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-2);
  width: 100%;
}
.secret-box .label { flex: 0 0 100%; font-size: 11px; color: var(--dim); white-space: nowrap; }
.secret-box code { flex: 1; font-size: 11.5px; letter-spacing: .06em; background: none; padding: 0; color: #c9d4ff; word-break: break-all; }

.code-input {
  font-family: var(--mono);
  font-size: 24px;
  letter-spacing: .42em;
  text-align: center;
  padding: 12px;
  border-radius: 12px;
  font-weight: 600;
}
.auth-card.narrow .code-input { margin-top: 6px; }

.recovery { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; padding-top: 18px; border-top: 1px solid var(--line); }
.recovery-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: #cdd7ee;
}
.recovery-list span {
  padding: 7px 10px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: center;
  letter-spacing: .04em;
}

/* ============================================================ 弹窗 / Toast */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(4, 6, 10, .78);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 24px;
  animation: fade .18s ease;
}
.modal-body {
  position: relative;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.modal-close:hover { color: var(--text); background: rgba(255,255,255,.05); }
.modal-body img { max-height: 62vh; max-width: 100%; width: auto; margin: 0 auto; border-radius: 12px; display: block; background: #0a0d13; }
.modal-body .detail { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.modal-body .detail p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.65; }
.modal-body .kvs { display: flex; flex-wrap: wrap; gap: 8px; }
.modal-body .kvs span {
  font-size: 11.5px;
  font-family: var(--mono);
  color: var(--muted);
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 4px 9px;
  border-radius: 7px;
}
.modal-body .kvs.pick { max-height: 46vh; overflow: auto; padding-right: 4px; }
.modal-body .kvs.pick .chip { font-family: var(--mono); font-size: 11.5px; }
.modal-body .kvs.pick .chip.on { color: var(--text); border-color: rgba(124, 156, 255, .6); background: rgba(124, 156, 255, .14); }

.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translate(-50%, 20px);
  z-index: 80;
  background: #1b2231;
  border: 1px solid #2c3546;
  color: var(--text);
  padding: 11px 18px;
  border-radius: 11px;
  font-size: 13px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .45);
  opacity: 0;
  pointer-events: none;
  transition: .22s ease;
  max-width: 90vw;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { border-color: rgba(255, 111, 111, .4); color: #ffc0c0; }

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================ 响应式 */
@media (max-width: 1120px) {
  .studio { grid-template-columns: 1fr; }
  .controls { position: static; }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .rail {
    position: sticky;
    top: 0;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-right: none;
    border-bottom: 1px solid var(--line-2);
    z-index: 20;
  }
  .brand-text span { display: none; }
  .rail nav { flex-direction: row; margin-left: auto; }
  .nav-item { padding: 8px 10px; font-size: 12.5px; }
  .nav-item svg { width: 15px; height: 15px; }
  .rail-foot { margin: 0; }
  .rail-foot .conn { display: none; }
  .rail-foot .nav-item { border: 1px solid transparent; }
  .main { padding: 20px 16px 50px; }
  .auth-card { padding: 26px 20px; }
}
@media (max-width: 520px) {
  .brand-text { display: none; }
  .nav-item { font-size: 0; gap: 0; padding: 9px 11px; }
  .nav-item svg { width: 18px; height: 18px; }
  .rail nav { gap: 2px; }
  .grid2 { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: 1fr; }
  .main { padding: 16px 12px 44px; }
}
