:root {
  --red: #ff2442;
  --red-deep: #e71937;
  --red-soft: #fff0f2;
  --ink: #20222a;
  --muted: #747784;
  --line: #e9eaf0;
  --canvas: #f7f7f9;
  --panel: #ffffff;
  --success: #16a765;
  --warning: #e9811f;
  --radius: 18px;
  --shadow: 0 9px 28px rgba(26, 28, 36, 0.055);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--canvas); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid rgba(255,36,66,.23); outline-offset: 2px; }

.app-shell { display: flex; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 264px; padding: 27px 18px 20px; background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 4; }
.brand { display: flex; align-items: center; justify-content:space-between; gap: 8px; min-width:0; padding: 0 8px 28px; font-size: 23px; font-weight: 800; letter-spacing: -.65px; }
.brand-mark { color: var(--red); }
.brand small { flex:0 0 auto; font-size: 12px; color: var(--muted); padding: 4px 7px; border: 1px solid var(--line); border-radius: 999px; font-weight: 600; letter-spacing: 0; }
.nav { display: grid; gap: 7px; }
.nav-item { width: 100%; border: 0; background: transparent; display: flex; align-items: center; gap: 13px; padding: 13px 13px; border-radius: 12px; color: #4b4e58; font-size: 15px; text-align: left; }
.nav-item:hover { background: #fafafa; }
.nav-item.active { background: var(--red-soft); color: var(--red); font-weight: 750; }
.nav-icon { width: 21px; text-align: center; font-size: 19px; line-height: 1; }
.sidebar-bottom { margin-top: auto; padding: 18px 10px 0; border-top: 1px solid var(--line); display: grid; gap: 11px; }
.status-line { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.status-dot.muted { background: #b8bcc7; }
.admin-toggle { margin-top: 6px; border: 1px solid var(--line); color: #525661; background: white; border-radius: 10px; padding: 10px; text-align: left; font-size: 13px; }

.content { margin-left: 264px; width: calc(100% - 264px); min-height: 100vh; padding: 26px 42px 80px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; max-width: 1380px; margin: 0 auto 26px; }
.page-head h1 { margin: 0; font-size: 30px; line-height: 1.16; letter-spacing: -.8px; }
.page-head p { margin: 8px 0 0; color: var(--muted); font-size: 15px; }
.head-actions { display: flex; align-items: center; gap: 10px; }
.avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: #ffe9ed; color: #742633; font-weight: 700; }
.page { max-width: 1380px; margin: 0 auto; }

.panel, .metric, .track-card, .entry-card { background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: var(--radius); }
.panel { padding: 23px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 17px; }
.section-title h2, .section-title h3 { margin: 0; font-size: 18px; letter-spacing: -.3px; }
.section-title p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.eyebrow { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 10px; background: var(--red-soft); color: var(--red); font-size: 12px; font-weight: 700; }
.muted { color: var(--muted); }
.success { color: var(--success); }
.warning { color: var(--warning); }
.danger { color: var(--red); }
.divider { height: 1px; background: var(--line); margin: 18px 0; }

.button { min-height: 42px; padding: 0 17px; border-radius: 11px; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; cursor: pointer; font-weight: 700; font-size: 14px; background: white; color: var(--ink); transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.button:hover { transform: translateY(-1px); }
.button.primary { color: white; background: var(--red); box-shadow: 0 7px 14px rgba(255,36,66,.18); }
.button.primary:hover { background: var(--red-deep); }
.button.outline { color: var(--red); border-color: #ffb6c1; }
.button.ghost { border-color: var(--line); color: #535763; }
.button.link { border: 0; padding: 0; min-height: auto; color: var(--red); background: transparent; }
.button.full { width: 100%; }
.button.small { min-height: 34px; padding: 0 12px; font-size: 13px; }

.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.entry-card { min-height: 258px; padding: 27px 27px 23px; position: relative; overflow: hidden; display: flex; flex-direction: column; }
.entry-card::before { content: ""; position: absolute; width: 180px; height: 180px; right: -55px; bottom: -65px; border-radius: 50%; background: radial-gradient(circle, rgba(255,36,66,.11), rgba(255,36,66,0)); }
.entry-card .entry-step { align-self: flex-start; }
.entry-card h2 { margin: 19px 0 9px; font-size: 25px; letter-spacing: -.5px; }
.entry-card p { margin: 0; max-width: 410px; color: var(--muted); font-size: 15px; line-height: 1.65; }
.flow { display: flex; align-items: center; gap: 7px; margin: 27px 0 22px; color: #575b67; font-size: 13px; }
.flow span { display: inline-flex; align-items: center; gap: 6px; }
.flow i { width: 24px; height: 1px; background: #d6d8df; display: block; }
.entry-card .button { margin-top: auto; }
.home-lower { display: grid; grid-template-columns: 1.25fr 1fr; gap: 20px; margin-top: 20px; }
.position-summary { display: grid; grid-template-columns: 1fr 140px; gap: 17px; align-items: center; }
.position-name { font-size: 25px; margin: 7px 0 13px; font-weight: 800; letter-spacing: -.4px; }
.summary-lines { display: grid; gap: 7px; color: #525662; font-size: 14px; }
.mini-art { height: 125px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(145deg, #fff2f3, #fff8f8); color: var(--red); font-size: 42px; }
.quota-row { display: grid; grid-template-columns: 104px 1fr 42px; align-items: center; gap: 11px; padding: 10px 0; color: #4d515d; font-size: 14px; }
.progress { height: 8px; border-radius: 99px; background: #eeeff3; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--red); }
.notice { margin-top: 16px; padding: 12px 13px; border-radius: 10px; color: #93515c; background: #fff4f5; font-size: 13px; }

.stepper { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; padding: 16px 22px; margin-bottom: 20px; }
.step { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; font-weight: 600; position: relative; }
.step:not(:last-child)::after { content: ""; height: 1px; background: #dfe1e7; flex: 1; margin-left: 8px; }
.step-num { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; border: 1px solid #cfd2d9; background: #fff; font-size: 13px; }
.step.active { color: var(--red); }
.step.active .step-num { background: var(--red); border-color: var(--red); color: white; }
.two-column { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, .8fr); gap: 20px; }
.form-grid { display: grid; gap: 16px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 14px; color: #353842; font-weight: 700; }
.field label em { color: var(--red); font-style: normal; margin-left: 2px; }
.field small { color: var(--muted); font-size: 12px; }
input, textarea, select { width: 100%; border: 1px solid #dfe1e7; border-radius: 10px; color: var(--ink); background: white; padding: 12px 13px; font-size: 14px; }
textarea { min-height: 98px; resize: vertical; line-height: 1.55; }
input::placeholder, textarea::placeholder { color: #a6a9b3; }
.choice-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.choice { border: 1px solid #dfe1e7; border-radius: 12px; padding: 14px 11px; min-height: 86px; background: white; text-align: left; color: #4c505b; }
.choice.active { border-color: var(--red); background: #fffafb; color: var(--red); }
.choice b { display: block; font-size: 14px; margin-top: 8px; }
.helper-list { display: grid; gap: 18px; }
.helper-item { display: grid; grid-template-columns: 38px 1fr; gap: 11px; align-items: start; }
.helper-icon { width: 38px; height: 38px; display: grid; place-items: center; color: var(--red); background: var(--red-soft); border-radius: 50%; }
.helper-item b { font-size: 14px; }
.helper-item p { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.sticky-actions { position: sticky; bottom: 13px; z-index: 2; display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; padding: 14px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow); }
.result-panel { margin-top: 20px; }
.result-hero { padding: 18px; border-radius: 13px; background: #fffafb; border: 1px solid #ffe0e5; }
.result-hero h3 { margin: 10px 0 8px; font-size: 21px; }
.result-hero p { margin: 0; color: #5c606a; line-height: 1.7; font-size: 14px; }

.creation-layout { display: grid; grid-template-columns: minmax(480px, 1.08fr) minmax(380px, .92fr); gap: 20px; }
.imported { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; margin-bottom: 17px; border-radius: 10px; background: var(--red-soft); color: #555966; font-size: 14px; }
.chip-row, .tabs, .filters { display: flex; gap: 9px; flex-wrap: wrap; }
.chip { border: 1px solid #dfe1e7; border-radius: 10px; padding: 10px 13px; background: white; color: #555965; font-size: 14px; }
.chip.active { color: var(--red); border-color: var(--red); background: #fffafb; font-weight: 700; }
.quick-tracks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.quick-track { min-height: 112px; padding: 13px 10px; text-align: center; border: 1px solid #dfe1e7; border-radius: 12px; background: #fff; color: #545864; }
.quick-track .track-symbol { display: block; color: var(--red); font-size: 25px; margin: 2px auto 8px; }
.quick-track b { display: block; font-size: 14px; }
.quick-track small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.quick-track.active { border-color: var(--red); box-shadow: inset 0 0 0 1px rgba(255,36,66,.08); background: #fffafb; }
.form-split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.result-tabs { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 17px; }
.result-tab { padding: 10px 18px 11px; border: 0; background: transparent; color: var(--muted); font-weight: 700; }
.result-tab.active { color: var(--red); border-bottom: 2px solid var(--red); }
.article-card { padding: 20px; border: 1px solid var(--line); border-radius: 14px; min-height: 500px; display: flex; flex-direction: column; }
.article-card h2 { font-size: 23px; line-height: 1.35; margin: 16px 0; letter-spacing: -.35px; }
.article-copy { color: #4c505c; line-height: 1.82; font-size: 15px; }
.article-question { border-top: 1px dashed #d9dce3; margin-top: 19px; padding-top: 17px; }
.article-question b { display: block; margin-bottom: 8px; }
.article-actions { display: flex; gap: 9px; margin-top: auto; padding-top: 22px; }
.image-preview { min-height: 400px; display: grid; place-items: center; border: 1px dashed #d6d9e2; border-radius: 14px; background: #fafafa; color: var(--muted); text-align: center; padding: 25px; }
.image-preview strong { display: block; color: #414550; margin: 10px 0 6px; }

.library-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.search { max-width: 250px; position: relative; }
.search input { padding-left: 38px; }
.search::before { content: "⌕"; position: absolute; z-index: 1; left: 14px; top: 9px; color: var(--muted); font-size: 20px; }
.library-layout { display: grid; grid-template-columns: minmax(480px, 1.25fr) minmax(340px, .83fr); gap: 20px; }
.track-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.track-card { min-height: 208px; padding: 19px; text-align: left; position: relative; }
.track-card.active { border-color: var(--red); box-shadow: 0 9px 25px rgba(255,36,66,.09); }
.track-card .source-badge { position: absolute; right: 12px; top: 12px; }
.track-icon { color: var(--red); font-size: 29px; }
.track-card h3 { margin: 12px 0 7px; font-size: 17px; }
.track-card p { margin: 0; color: var(--muted); line-height: 1.55; font-size: 13px; }
.track-card .button { margin-top: 14px; }
.detail-panel { position: sticky; top: 22px; align-self: start; }
.tag { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 7px; background: var(--red-soft); color: var(--red); font-size: 12px; font-weight: 700; margin: 5px 5px 0 0; }
.detail-list { display: grid; gap: 12px; margin-top: 18px; }
.detail-row { display: grid; grid-template-columns: 76px 1fr; gap: 9px; padding-bottom: 11px; border-bottom: 1px solid #f0f1f4; color: #4f535d; font-size: 13px; line-height: 1.5; }
.detail-row b { color: #323640; }
.case-list { display: grid; gap: 10px; margin-top: 18px; }
.case-card { display: grid; grid-template-columns: 102px 1fr; min-height: 94px; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; }
.case-thumb { display: grid; place-items: center; background: linear-gradient(135deg, #f6e4d2, #ece7e1); color: #805d40; font-size: 28px; }
.case-info { padding: 11px; }
.case-info b { font-size: 13px; line-height: 1.35; display: block; }
.case-info small { display: block; margin: 5px 0; color: var(--muted); font-size: 12px; }
.detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 19px; }

.new-track-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) 320px; gap: 20px; }
.template-steps { display: grid; gap: 7px; }
.template-step { display: flex; gap: 10px; align-items: center; padding: 12px; border-radius: 10px; color: var(--muted); font-size: 14px; }
.template-step.active { color: var(--red); background: var(--red-soft); font-weight: 700; }
.template-step.complete { color: var(--success); }
.case-builder { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; }
.case-builder-card { border: 1px dashed #d6d9e1; border-radius: 12px; padding: 14px; min-height: 160px; background: #fbfbfc; }
.case-builder-card.done { border-style: solid; border-color: #bce8d2; background: #fbfffd; }
.case-builder-card b { display: block; margin-bottom: 8px; font-size: 14px; }
.case-builder-card span { color: var(--muted); font-size: 12px; line-height: 1.5; }
.prompt-preview { border: 1px solid #bce8d2; background: #fbfffd; border-radius: 12px; padding: 17px; margin-top: 16px; }
.prompt-preview h4 { margin: 0 0 8px; color: var(--success); }
.prompt-preview p { margin: 0; color: #4b5c52; line-height: 1.65; font-size: 13px; }
.visibility-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.visibility-card { text-align: left; border: 1px solid #dfe1e7; border-radius: 13px; background: #fff; padding: 16px; }
.visibility-card.active { border-color: var(--red); background: #fffafb; }
.visibility-card b { display: block; font-size: 16px; }
.visibility-card p { color: var(--muted); font-size: 13px; line-height: 1.55; margin: 8px 0 0; }

.settings-layout { display: grid; gap: 17px; max-width: 1080px; }
.api-steps { display: grid; grid-template-columns: 1fr 36px 1fr 36px 1fr; align-items: center; gap: 10px; padding: 16px 0 7px; }
.api-step { text-align: center; }
.api-step .round { width: 38px; height: 38px; display: grid; place-items: center; margin: 0 auto 8px; border-radius: 50%; background: var(--red-soft); color: var(--red); font-weight: 800; }
.api-step b { display: block; font-size: 14px; }
.api-arrow { text-align: center; color: #b5b8c2; font-size: 24px; }
.api-form { display: grid; grid-template-columns: 250px 1fr; gap: 14px; align-items: end; }
.license-grid { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 20px; align-items: center; }
.license-grid span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.license-grid b { font-size: 15px; }

.activation { max-width: 680px; margin: 6vh auto; text-align: center; }
.activation .panel { padding: 38px; }
.activation-mark { width: 62px; height: 62px; margin: 0 auto 16px; border-radius: 19px; display: grid; place-items: center; color: white; background: var(--red); font-size: 29px; }
.activation h1 { margin: 0; font-size: 29px; }
.activation p { color: var(--muted); line-height: 1.65; }
.activation form { display: flex; gap: 10px; margin: 23px auto 14px; max-width: 480px; }
.activation form input { text-transform: uppercase; letter-spacing: 1.1px; }

.admin-shell .sidebar { background: #fff; }
.admin-shell .brand { font-size: 20px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.metric { padding: 18px; min-height: 130px; }
.metric-label { color: var(--muted); font-size: 13px; }
.metric-value { font-weight: 800; letter-spacing: -.9px; font-size: 29px; margin: 13px 0 7px; }
.metric-note { font-size: 12px; }
.admin-grid { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(310px,.75fr); gap: 20px; margin-top: 20px; }
.chart { min-height: 255px; position: relative; padding: 18px 8px 30px; overflow: hidden; }
.chart-grid { position: absolute; inset: 28px 8px 38px; background: repeating-linear-gradient(to bottom, transparent 0 42px, #eef0f3 43px 44px); }
.chart svg { position: relative; width: 100%; height: 190px; z-index: 1; overflow: visible; }
.chart-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; position: absolute; left: 17px; right: 17px; bottom: 10px; }
.donut-wrap { display: grid; grid-template-columns: 160px 1fr; align-items: center; gap: 10px; min-height: 225px; }
.donut { width: 145px; height: 145px; border-radius: 50%; background: conic-gradient(var(--red) 0 68%, #667083 68% 89%, #e1e4ea 89% 100%); display: grid; place-items: center; }
.donut::after { content: "授权"; width: 88px; height: 88px; border-radius: 50%; background: white; display: grid; place-items: center; font-size: 14px; font-weight: 750; }
.legend { display: grid; gap: 14px; font-size: 13px; }
.legend span { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 700px; }
th, td { padding: 13px 10px; border-bottom: 1px solid #eef0f3; text-align: left; font-size: 13px; white-space: nowrap; }
th { color: var(--muted); font-weight: 650; }
td { color: #424650; }
.status-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 650; }
.status-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.admin-tabs { margin-bottom: 20px; }
.review-card { display: grid; grid-template-columns: 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid #eef0f3; }
.review-card h3 { margin: 0 0 5px; font-size: 16px; }
.review-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.review-meta { display: flex; gap: 10px; margin-top: 8px; color: var(--muted); font-size: 12px; }

.toast { position: fixed; bottom: 22px; left: 50%; z-index: 10; transform: translate(-50%, 20px); background: #252830; color: white; border-radius: 10px; padding: 11px 16px; opacity: 0; pointer-events: none; transition: all .2s ease; font-size: 14px; box-shadow: 0 12px 25px rgba(0,0,0,.18); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.mobile-bar { display: none; }

@media (max-width: 1120px) {
  .content { padding: 28px 27px 80px; }
  .quick-tracks { grid-template-columns: repeat(2,1fr); }
  .library-layout, .creation-layout, .new-track-layout { grid-template-columns: 1fr; }
  .detail-panel { position: static; }
  .metric-grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 780px) {
  .sidebar { display: none; }
  .content { margin-left: 0; width: 100%; padding: 23px 16px 92px; }
  .page-head { margin-bottom: 18px; }
  .page-head h1 { font-size: 24px; }
  .page-head p { font-size: 13px; }
  .head-actions .button { display: none; }
  .dashboard-grid, .home-lower, .two-column, .admin-grid { grid-template-columns: 1fr; }
  .entry-card { min-height: 240px; padding: 21px; }
  .entry-card h2 { font-size: 21px; }
  .flow { gap: 5px; font-size: 11px; }
  .flow i { width: 13px; }
  .position-summary { grid-template-columns: 1fr 96px; }
  .mini-art { height: 96px; }
  .stepper { overflow-x: auto; padding: 14px; }
  .step { min-width: 115px; font-size: 12px; }
  .choice-row, .visibility-choice { grid-template-columns: repeat(2, 1fr); }
  .quick-tracks { grid-template-columns: repeat(3, 1fr); }
  .quick-track:nth-child(4) { display: none; }
  .form-split, .api-form, .license-grid { grid-template-columns: 1fr; }
  .case-builder { grid-template-columns: 1fr; }
  .track-grid { grid-template-columns: repeat(2,1fr); }
  .library-head { align-items: stretch; flex-direction: column; }
  .search { max-width: 100%; }
  .api-steps { grid-template-columns: 1fr 22px 1fr 22px 1fr; }
  .api-step b { font-size: 12px; }
  .api-arrow { font-size: 19px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric { min-height: 112px; padding: 15px; }
  .metric-value { font-size: 24px; }
  .donut-wrap { grid-template-columns: 130px 1fr; }
  .donut { width: 120px; height: 120px; }
  .donut::after { width: 72px; height: 72px; }
  .activation { margin: 3vh auto; }
  .activation .panel { padding: 28px 18px; }
  .activation form { flex-direction: column; }
  .mobile-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: grid; grid-template-columns: repeat(4,1fr); padding: 7px 8px max(7px, env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
  .mobile-item { display: grid; justify-items: center; gap: 3px; border: 0; background: transparent; color: #636772; font-size: 11px; padding: 4px; }
  .mobile-item span { font-size: 20px; }
  .mobile-item.active { color: var(--red); font-weight: 750; }
}

@media (max-width: 410px) {
  .track-grid { grid-template-columns: 1fr; }
  .quick-tracks { grid-template-columns: repeat(3,1fr); gap: 7px; }
  .quick-track { padding: 10px 5px; }
  .quick-track b { font-size: 12px; }
  .panel { padding: 17px; }
}

/* Visual system refresh: fluid canvas, aligned cards, and one icon language. */
.content {
  margin-left: 264px;
  width: calc(100% - 264px);
  padding: clamp(22px, 1.65vw, 32px) clamp(24px, 2.75vw, 56px) 92px;
}
.page-head, .page {
  width: 100%;
  max-width: none;
}
.page-head {
  margin-bottom: 16px;
}
.dashboard-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: clamp(18px, 1.35vw, 26px);
}
.home-lower {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  align-items: stretch;
  gap: clamp(18px, 1.35vw, 26px);
  margin-top: clamp(18px, 1.35vw, 26px);
}
.entry-card {
  min-height: 292px;
  padding: clamp(25px, 2vw, 34px);
  justify-content: flex-start;
}
.entry-card h2 { margin-top: 18px; }
.entry-card p { max-width: 31rem; }
.entry-card .flow { margin-top: auto; padding-top: 26px; }
.entry-card .button { margin-top: 19px; }
.panel { border-radius: 20px; }
.nav-icon, .mobile-item > span, .status-icon, .button-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}
.ui-icon {
  display: block;
  width: 20px;
  height: 20px;
}
.nav-icon {
  width: 22px;
  height: 22px;
}
.nav-icon .ui-icon {
  width: 20px;
  height: 20px;
}
.mobile-item > span {
  width: 21px;
  height: 21px;
}
.mobile-item > span .ui-icon {
  width: 20px;
  height: 20px;
}
.status-icon {
  width: 16px;
  height: 16px;
  color: #747784;
}
.status-icon.ui-icon { width: 16px; height: 16px; }
.button-icon {
  width: 16px;
  height: 16px;
  margin-right: 7px;
  vertical-align: -3px;
}
.button-icon.ui-icon { width: 16px; height: 16px; }
.admin-toggle {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
}
.status-line {
  min-height: 20px;
  gap: 8px;
}
.quick-tracks {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.quick-track {
  min-height: 126px;
  padding: 14px 10px 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}
.quick-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  color: var(--red);
  background: #fff1f3;
  margin-bottom: 4px;
}
.quick-icon .ui-icon { width: 23px; height: 23px; }
.quick-track.active .quick-icon {
  color: white;
  background: var(--red);
  box-shadow: 0 7px 14px rgba(255,36,66,.18);
}
.library-layout {
  grid-template-columns: minmax(0, 1.65fr) minmax(350px, .75fr);
  gap: clamp(18px, 1.35vw, 26px);
}
.track-grid {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}
.track-card {
  min-height: 248px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.track-card:hover {
  transform: translateY(-3px);
  border-color: #ffc3cc;
  box-shadow: 0 14px 30px rgba(255,36,66,.10);
}
.track-card .source-badge { z-index: 1; }
.track-scene {
  height: 82px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  color: var(--red);
  border: 1px solid rgba(255,255,255,.72);
  background: linear-gradient(135deg, #fff2f3, #fffafb);
}
.track-scene::before,
.track-scene::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}
.track-scene::before {
  width: 112px;
  height: 112px;
  right: -37px;
  bottom: -72px;
  background: rgba(255, 255, 255, .72);
}
.track-scene::after {
  width: 48px;
  height: 48px;
  left: -18px;
  top: -20px;
  border: 1px solid rgba(255,255,255,.86);
}
.scene-icon {
  position: relative;
  z-index: 1;
  width: 35px;
  height: 35px;
  stroke-width: 1.55;
}
.scene-huaijiu { color: #a66747; background: linear-gradient(135deg, #f4e7d7, #fff8f0 58%, #ebd0ba); }
.scene-food { color: #bd603e; background: linear-gradient(135deg, #ffe5c8, #fff8ed 58%, #f5c6a4); }
.scene-pet { color: #c75670; background: linear-gradient(135deg, #fde5e9, #fff9fa 58%, #f0c0cb); }
.scene-marriage { color: #a05b82; background: linear-gradient(135deg, #f8e4ef, #fff9fc 58%, #edc7dc); }
.scene-rural { color: #5f8a67; background: linear-gradient(135deg, #e4f0df, #fbfff8 58%, #c9dfbe); }
.scene-objects { color: #72768b; background: linear-gradient(135deg, #e9ebf0, #fbfcff 58%, #d8dbe4); }
.scene-shared-life { color: #6977a9; background: linear-gradient(135deg, #e9edff, #fbfcff 58%, #d5dcfb); }
.track-card h3 {
  margin: 14px 0 7px;
  line-height: 1.25;
}
.track-card p { min-height: 40px; }
.track-card .button { margin-top: auto; align-self: flex-start; }
.detail-panel { top: 24px; }
.case-thumb {
  background: linear-gradient(135deg, #f4e7d7, #ebd0ba);
  color: #9b6647;
}
.entry-card::before {
  width: 240px;
  height: 240px;
  right: -55px;
  bottom: -104px;
  background: radial-gradient(circle, rgba(255,36,66,.12), rgba(255,36,66,0) 70%);
}
@media (min-width: 1680px) {
  .entry-card { min-height: 316px; }
  .track-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .track-scene { height: 90px; }
}
@media (max-width: 1120px) {
  .content { padding: 28px 27px 84px; }
  .dashboard-grid, .home-lower { grid-template-columns: 1fr; }
  .library-layout { grid-template-columns: 1fr; }
}
@media (max-width: 780px) {
  .content { margin-left: 0; width: 100%; padding: 22px 16px 94px; }
  .page-head, .page { width: 100%; }
  .quick-tracks { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .quick-track:nth-child(4) { display: flex; }
  .track-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .track-card { min-height: 218px; }
  .track-scene { height: 70px; }
}
.flow-icon { width: 15px; height: 15px; color: var(--red); }
.mini-art .hero-icon { width: 52px; height: 52px; stroke-width: 1.45; }

/* Core API phase: ergonomic real-data states. */
.settings-layout { width: 100%; max-width: none; }
.empty-result { min-height: 300px; display:grid; place-items:center; align-content:center; text-align:center; color:var(--muted); gap:8px; }
.empty-result .ui-icon { width:42px; height:42px; color:var(--red); }
.empty-result b { color:#30333d; }
.check-row { display:flex; gap:9px; align-items:flex-start; font-size:14px; line-height:1.5; color:#555965; }
.check-row input { width:18px; height:18px; margin-top:1px; accent-color:var(--red); }
.toast.error { background:#9c2639; }
.activation-mark .ui-icon { width:31px; height:31px; }

/* Stage four: review gate and asynchronous image state. */
.quality-box { display:grid; gap:6px; margin-top:16px; padding:13px; border:1px solid #e4e6eb; border-radius:12px; background:#fafbfc; color:#555965; font-size:13px; line-height:1.55; }
.quality-box b { color:#373b45; }
.quality-box.passed { border-color:#bce8d2; background:#fbfffd; }
.quality-box.passed b { color:var(--success); }
.quality-box.review { border-color:#ffd4b5; background:#fffaf6; }
.quality-box small { color:#a46a35; }
.image-task { display:grid; gap:10px; min-height:188px; margin-top:16px; padding:13px; border:1px dashed #daddE5; border-radius:13px; place-items:center; text-align:center; color:var(--muted); }
.image-task .ui-icon { width:34px; height:34px; color:var(--red); }
.image-task b { display:block; color:#3c404a; margin-top:6px; }
.image-task p { margin:4px 0 0; font-size:13px; }
.image-task.completed { display:flex; align-items:flex-start; text-align:left; }
.image-task.completed img { width:112px; height:148px; object-fit:cover; border-radius:9px; border:1px solid var(--line); }
.image-task.completed .eyebrow { margin-top:6px; }

/* Stage five: model blind testing and release checks. */
.detail-actions { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.quality-page { display:grid; gap:20px; }
.quality-hero { display:flex; align-items:center; justify-content:space-between; gap:22px; background:linear-gradient(118deg,#fff 0%,#fff7f8 100%); }
.quality-hero h2 { margin:8px 0 7px; font-size:23px; }
.quality-hero p { max-width:690px; margin:0; color:var(--muted); line-height:1.65; }
.quality-actions { display:flex; flex-wrap:wrap; gap:10px; flex:0 0 auto; }
.quality-setup h3 { margin:0 0 6px; }
.quality-setup > p { color:var(--muted); margin:0 0 18px; font-size:14px; }
.quality-metrics { margin:0; }
.quality-columns { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
.score-list { display:grid; gap:11px; }
.score-list > div { display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid #eff0f3; padding-bottom:10px; font-size:14px; color:var(--muted); }
.score-list > div:last-child { border:0; padding-bottom:0; }
.score-list b { color:#363944; }
.gate-list { display:grid; gap:12px; }
.gate-list > div { display:grid; grid-template-columns:10px 1fr; gap:9px; align-items:start; }
.gate-dot { display:block; width:8px; height:8px; border-radius:50%; margin-top:6px; background:#b8bdc7; }
.gate-dot.guarded { background:var(--success); box-shadow:0 0 0 4px rgba(48,171,104,.10); }
.gate-dot.ready { background:var(--red); box-shadow:0 0 0 4px rgba(255,36,66,.10); }
.gate-list b { font-size:14px; color:#40434d; }
.gate-list p { margin:3px 0 0; color:var(--muted); line-height:1.5; font-size:12px; }
.blind-sample h3 { margin:7px 0 3px; }
.blind-results { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-top:17px; }
.blind-results article { padding:15px; border:1px solid var(--line); border-radius:13px; background:#fcfcfd; min-height:165px; }
.blind-label { display:inline-flex; padding:4px 8px; border-radius:99px; background:#fff0f2; color:var(--red); font-size:12px; font-weight:750; }
.blind-results h4 { margin:12px 0 7px; font-size:16px; line-height:1.45; }
.blind-results p { margin:0; color:#676b75; font-size:13px; line-height:1.65; }
.blind-results small { display:block; color:var(--muted); margin-top:11px; font-size:12px; }
.quality-review { display:grid; grid-template-columns:auto 180px minmax(180px,1fr) auto; gap:10px; align-items:center; margin-top:16px; padding-top:16px; border-top:1px solid var(--line); }
.quality-review label { font-weight:700; font-size:14px; }
.quality-review select,.quality-review input { width:100%; min-height:40px; border:1px solid var(--line); border-radius:9px; padding:0 11px; color:#424650; background:white; }
@media (max-width:780px) { .quality-hero { align-items:flex-start; flex-direction:column; } .quality-columns,.blind-results { grid-template-columns:1fr; } .quality-review { grid-template-columns:1fr; align-items:stretch; } .quality-actions { width:100%; } .quality-actions .button { flex:1; } }

/* Dashboard status refinement: keep both rows on one shared, compact grid rhythm. */
.dashboard-grid, .home-lower { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.dashboard-grid .entry-card { min-height: 248px; height: 100%; padding: 24px clamp(24px, 2vw, 32px) 22px; }
.dashboard-grid .entry-card h2 { margin: 14px 0 7px; }
.dashboard-grid .entry-card p { line-height: 1.55; }
.dashboard-grid .entry-card .flow { margin: auto 0 14px; padding-top: 15px; }
.dashboard-grid .entry-card .button { margin-top: 0; }
.dashboard-grid + .home-lower { margin-top: 16px; }
.home-lower > .panel { min-height: 260px; height: 100%; padding: 22px 24px; }
.home-lower > .panel > .section-title { min-height: 44px; align-items: flex-start; margin-bottom: 12px; }
.position-summary { grid-template-columns: minmax(0, 1fr) 132px; }
.position-name { font-size: 23px; margin: 5px 0 10px; }
.summary-lines { gap: 6px; }
.summary-lines span:first-child { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.55; }
.mini-art { height: 118px; background: linear-gradient(145deg, #fff4f2, #fff9f6); }
.quota-notice { margin-top: 14px; display: flex; align-items: center; min-height: 46px; }
@media (min-width: 1680px) { .dashboard-grid .entry-card { min-height: 254px; } }
@media (max-width: 780px) { .dashboard-grid, .home-lower { grid-template-columns: 1fr; gap: 14px; } .dashboard-grid .entry-card { min-height: 232px; padding: 21px; } .dashboard-grid .entry-card .flow { padding-top: 13px; margin-bottom: 13px; } .dashboard-grid + .home-lower { margin-top: 14px; } .home-lower > .panel { min-height: 0; padding: 20px; } .home-lower > .panel > .section-title { min-height: 0; } .position-summary { grid-template-columns: minmax(0, 1fr) 96px; } }

/* Track detail and prompt version management. */
.track-detail-page { display:grid; gap:20px; }
.track-detail-hero { display:grid; grid-template-columns:118px minmax(0,1fr) auto; align-items:center; gap:22px; }
.track-detail-scene { width:118px; height:118px; display:grid; place-items:center; border-radius:18px; }
.track-detail-scene .scene-icon { width:48px; height:48px; }
.track-detail-badges { display:flex; align-items:center; gap:10px; }
.track-detail-hero h2 { margin:10px 0 7px; font-size:26px; }
.track-detail-hero p { max-width:700px; margin:0; color:var(--muted); line-height:1.65; }
.track-detail-actions { display:grid; gap:9px; min-width:166px; }
.track-detail-columns { display:grid; grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr); gap:20px; }
.detail-list.spacious .detail-row { grid-template-columns:92px 1fr; padding-bottom:14px; font-size:14px; }
.public-prompt-list { display:grid; gap:12px; }
.public-prompt-list > div { display:grid; grid-template-columns:40px 1fr; gap:11px; padding:13px; border:1px solid #ebecef; border-radius:12px; background:#fcfcfd; }
.public-prompt-list > div > span { width:40px; height:40px; display:grid; place-items:center; border-radius:10px; color:var(--red); background:var(--red-soft); }
.public-prompt-list b { font-size:14px; }
.public-prompt-list p { margin:5px 0 0; color:#5d616d; font-size:13px; line-height:1.6; white-space:pre-wrap; }
.prompt-rules { margin-top:14px; padding:14px; border-radius:12px; background:#fff8f9; }
.prompt-rules b { font-size:14px; }
.prompt-rules ul { margin:9px 0 0; padding-left:19px; color:#666a75; font-size:13px; line-height:1.7; }
.detail-case-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.detail-case { display:flex; flex-direction:column; min-height:292px; padding:16px; border:1px solid var(--line); border-radius:14px; background:#fcfcfd; }
.detail-case-head { display:grid; grid-template-columns:38px 1fr; gap:11px; align-items:start; }
.case-index { width:38px; height:38px; display:grid; place-items:center; border-radius:10px; color:var(--red); background:var(--red-soft); font-size:12px; font-weight:800; }
.detail-case h3 { margin:1px 0 5px; font-size:15px; line-height:1.45; }
.detail-case-head p { margin:0; color:var(--muted); font-size:12px; }
.case-body { margin:14px 0; color:#575b66; font-size:13px; line-height:1.7; }
.comment-evidence { display:grid; gap:6px; margin-top:auto; }
.comment-evidence b { font-size:13px; }
.comment-evidence span { padding:7px 9px; border-radius:8px; background:white; color:#666a75; font-size:12px; line-height:1.45; }
.detail-case > .button { align-self:flex-start; margin-top:10px; }
.prompt-admin-layout { display:grid; grid-template-columns:310px minmax(0,1fr); gap:20px; align-items:start; }
.prompt-version-list { position:sticky; top:24px; padding-right:14px; }
.prompt-list-scroll { display:grid; gap:7px; max-height:calc(100vh - 230px); overflow:auto; padding-right:4px; }
.prompt-version-item { width:100%; min-height:62px; display:flex; justify-content:space-between; align-items:center; gap:10px; padding:11px 12px; border:1px solid transparent; border-radius:11px; background:#f8f9fb; text-align:left; color:#424650; }
.prompt-version-item:hover,.prompt-version-item.active { border-color:#ffc7d0; background:#fff7f8; }
.prompt-version-item b,.prompt-version-item small { display:block; }
.prompt-version-item small { margin-top:4px; color:var(--muted); font-size:12px; }
.prompt-version-item em { padding:4px 7px; border-radius:99px; color:var(--success); background:#edf9f3; font-size:11px; font-style:normal; font-weight:750; }
.prompt-title-line { display:flex; align-items:center; gap:11px; }
.prompt-title-line h2 { margin:0; }
.prompt-form { display:grid; grid-template-columns:1fr 1fr; gap:15px; }
.prompt-form .field:first-child,.prompt-form .field:last-of-type,.prompt-test-result,.prompt-sticky { grid-column:1/-1; }
.prompt-form textarea { min-height:134px; resize:vertical; line-height:1.65; }
.prompt-form .field:first-child textarea { min-height:84px; }
.prompt-form textarea[readonly] { color:#626671; background:#f8f9fa; cursor:default; }
.prompt-test-result { display:flex; flex-wrap:wrap; gap:12px; padding:13px; border-radius:11px; font-size:13px; }
.prompt-test-result.passed { color:#237d51; background:#edf9f3; border:1px solid #bce8d2; }
.prompt-test-result.failed { color:#9c4a31; background:#fff7f2; border:1px solid #ffd5c3; }
.prompt-sticky { margin-top:0; }
@media (max-width:1120px) { .track-detail-hero { grid-template-columns:96px minmax(0,1fr); } .track-detail-scene { width:96px; height:96px; } .track-detail-actions { grid-column:1/-1; grid-template-columns:repeat(3,minmax(0,1fr)); } .track-detail-columns,.prompt-admin-layout { grid-template-columns:1fr; } .prompt-version-list { position:static; } .prompt-list-scroll { max-height:320px; } .detail-case-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:780px) { .track-detail-hero { grid-template-columns:72px minmax(0,1fr); gap:14px; } .track-detail-scene { width:72px; height:72px; border-radius:14px; } .track-detail-scene .scene-icon { width:34px; height:34px; } .track-detail-hero h2 { font-size:21px; } .track-detail-actions { grid-template-columns:1fr; } .detail-case-grid,.prompt-form { grid-template-columns:1fr; } .prompt-form .field { grid-column:1; } .prompt-editor .section-title { align-items:flex-start; flex-direction:column; } }

/* system-api-settings */
.system-settings-page { display: grid; gap: 20px; }
.api-priority-card { overflow: hidden; }
.priority-flow { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr); align-items: stretch; gap: 12px; margin-top: 18px; }
.priority-flow > i { align-self: center; color: #c1c4cd; font-style: normal; font-size: 22px; }
.priority-item { display: flex; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fafbfc; }
.priority-item > span { flex: 0 0 30px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #eef0f4; font-weight: 800; color: var(--muted); }
.priority-item.active { border-color: #ffc5cf; background: #fff6f7; }
.priority-item.active > span { background: var(--red); color: white; }
.priority-item b { display: block; margin: 2px 0 6px; }
.priority-item p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.system-settings-grid { display: grid; grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr); gap: 20px; align-items: start; }
.credential-state { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fafbfc; margin: 12px 0 18px; }
.credential-state p { margin: 5px 0 4px; color: var(--muted); }
.credential-state small { color: #9094a0; overflow-wrap: anywhere; }
.credential-icon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; color: var(--red); background: #fff0f2; }
.credential-icon .ui-icon { width: 23px; height: 23px; }
.stack-form { display: grid; gap: 15px; }
.model-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.field small { display: block; color: var(--muted); font-size: 11px; margin-top: 6px; }
.limit-fields { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; padding: 14px; border-radius: 14px; background: #fafbfc; border: 1px solid var(--line); }
.switch-row { display: flex; align-items: flex-start; gap: 11px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; }
.switch-row input { width: 18px; height: 18px; accent-color: var(--red); margin-top: 1px; }
.switch-row span { display: grid; gap: 5px; }
.switch-row small { color: var(--muted); }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; }
.notice.compact { margin-top: 15px; font-size: 12px; }
.production-note { line-height: 1.7; }

@media (max-width: 1100px) {
  .system-settings-grid { grid-template-columns: 1fr; }
  .priority-flow { grid-template-columns: 1fr; }
  .priority-flow > i { display: none; }
}
@media (max-width: 780px) {
  .model-fields, .limit-fields { grid-template-columns: 1fr; }
  .priority-item { padding: 14px; }
}

/* track-admin-management */
.limit-heading { margin: 4px 0 -5px; }
.limit-heading b { font-size: 15px; }
.limit-heading p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.track-admin-page { display: grid; gap: 20px; }
.track-admin-summary { display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.track-admin-summary h2 { margin: 9px 0 7px; font-size: 21px; }
.track-admin-summary p { margin: 0; color: var(--muted); }
.track-counts { display: grid; grid-template-columns: repeat(4, minmax(72px,1fr)); min-width: 410px; border: 1px solid var(--line); border-radius: 15px; overflow: hidden; }
.track-count { border: 0; border-right: 1px solid var(--line); background: #fff; padding: 12px 10px; display: grid; gap: 4px; color: var(--muted); cursor: pointer; }
.track-count:last-child { border-right: 0; }
.track-count b { color: var(--ink); font-size: 20px; }
.track-count span { font-size: 12px; }
.track-count.active { background: #fff1f3; color: var(--red); }
.track-count.active b { color: var(--red); }
.track-admin-layout { display: grid; grid-template-columns: minmax(260px,.58fr) minmax(0,1.42fr); gap: 20px; align-items: start; }
.track-admin-list { position: sticky; top: 20px; padding: 16px; }
.track-admin-scroll { display: grid; gap: 8px; max-height: calc(100vh - 250px); overflow: auto; padding-right: 3px; }
.track-admin-item { width: 100%; border: 1px solid transparent; background: transparent; border-radius: 13px; display: grid; grid-template-columns: 38px minmax(0,1fr) auto; gap: 10px; align-items: center; text-align: left; padding: 10px; cursor: pointer; }
.track-admin-item:hover { background: #fafbfc; }
.track-admin-item.active { border-color: #ffc7d0; background: #fff3f5; }
.track-admin-item > span:nth-child(2) { display: grid; min-width: 0; gap: 5px; }
.track-admin-item b, .track-admin-item small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-admin-item small { color: var(--muted); font-size: 11px; }
.track-admin-item em { font-size: 11px; font-style: normal; padding: 4px 7px; border-radius: 999px; }
.track-admin-item em.online { color: #16864c; background: #eaf9f0; }
.track-admin-item em.offline { color: var(--muted); background: #f0f1f4; }
.track-admin-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: var(--red); background: #fff; }
.track-admin-icon .ui-icon { width: 20px; height: 20px; }
.track-admin-editor { display: grid; gap: 20px; min-width: 0; }
.track-admin-form { display: grid; gap: 15px; }
.track-admin-form textarea { min-height: 92px; }
.track-prompt-link .detail-list { margin-bottom: 16px; }
.track-case-editor-list { display: grid; gap: 10px; }
.track-case-editor { border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; }
.track-case-editor summary { list-style: none; padding: 14px; display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 11px; cursor: pointer; }
.track-case-editor summary::-webkit-details-marker { display: none; }
.track-case-editor summary > span:nth-child(2) { display: grid; gap: 5px; }
.track-case-editor summary small { color: var(--muted); }
.track-case-editor summary em { color: var(--red); font-style: normal; font-size: 13px; }
.track-case-editor form { display: grid; gap: 13px; padding: 15px; border-top: 1px solid var(--line); background: #fafbfc; }
.track-case-editor textarea { min-height: 110px; }
.track-case-editor.add-case { margin-top: 13px; border-style: dashed; }
.track-case-editor .check { font-size: 13px; }
.track-case-editor .check input { accent-color: var(--red); }

@media (max-width: 1100px) {
  .track-admin-summary { align-items: stretch; flex-direction: column; }
  .track-counts { min-width: 0; }
  .track-admin-layout { grid-template-columns: 1fr; }
  .track-admin-list { position: static; }
  .track-admin-scroll { max-height: 360px; }
}
@media (max-width: 780px) {
  .track-counts { grid-template-columns: repeat(2,1fr); }
  .track-count { border-bottom: 1px solid var(--line); }
  .track-count:nth-child(2) { border-right: 0; }
  .track-count:nth-child(3), .track-count:nth-child(4) { border-bottom: 0; }
  .track-admin-item { grid-template-columns: 34px minmax(0,1fr); }
  .track-admin-item em { display: none; }
  .track-case-editor summary { grid-template-columns: 34px minmax(0,1fr) auto; }
}
/* user-api-settings-redesign */
.settings-top-grid { display:grid; grid-template-columns:minmax(0,1.08fr) minmax(390px,.92fr); gap:20px; align-items:stretch; }
.settings-top-grid > .panel { min-width:0; }
.api-guide-card, .api-key-card { padding:27px; }
.api-guide-card .section-title, .api-key-card .section-title { align-items:flex-start; }
.api-guide-card .section-title h2, .api-key-card .section-title h2, .license-card .section-title h2 { margin-top:10px; }
.api-onboarding { display:grid; gap:0; margin-top:7px; }
.onboarding-step { position:relative; display:grid; grid-template-columns:42px minmax(0,1fr); gap:14px; padding:8px 0 20px; }
.onboarding-step:not(:last-child)::after { content:""; position:absolute; left:20px; top:46px; bottom:0; width:1px; background:#ffd6dc; }
.step-badge { position:relative; z-index:1; width:42px; height:42px; display:grid; place-items:center; border-radius:13px; color:#fff; background:var(--red); box-shadow:0 7px 16px rgba(255,36,68,.18); font-weight:800; }
.onboarding-step:nth-child(2) .step-badge, .onboarding-step:nth-child(3) .step-badge { color:var(--red); background:#fff0f2; box-shadow:none; }
.onboarding-step h3 { margin:2px 0 7px; font-size:16px; }
.onboarding-step p { margin:0; color:var(--muted); font-size:14px; line-height:1.7; }
.onboarding-step code { padding:2px 6px; border-radius:5px; color:#9f2436; background:#fff0f2; font-family:inherit; }
.volc-model-list { display:grid; gap:7px; margin:11px 0 2px; }
.volc-model-item { display:flex; flex-wrap:wrap; align-items:center; gap:6px 9px; font-size:12px; }
.volc-model-item b { font-size:13px; }
.volc-model-item code { overflow-wrap:anywhere; }
.onboarding-action { margin-top:12px; }
.guide-security { display:flex; gap:10px; align-items:flex-start; margin-top:1px; padding:13px 14px; color:#666a75; background:#fafbfc; border:1px solid var(--line); border-radius:12px; font-size:12px; line-height:1.6; }
.guide-security-icon { flex:0 0 auto; width:18px; height:18px; color:var(--red); margin-top:1px; }
.api-key-heading { padding-bottom:17px; border-bottom:1px solid #f0f1f4; }
.api-status { flex:0 0 auto; display:inline-flex; align-items:center; gap:7px; padding:7px 10px; border-radius:999px; font-size:12px; font-weight:700; white-space:nowrap; }
.api-status i { width:7px; height:7px; border-radius:50%; background:currentColor; }
.api-status.is-ready { color:#168c53; background:#eaf8f1; }
.api-status.is-warning { color:#c76c12; background:#fff5e8; }
.api-status.is-empty { color:#777b86; background:#f1f2f5; }
.api-form-stacked { grid-template-columns:1fr; gap:17px; }
.api-form-stacked .field { min-width:0; }
.api-key-field input { min-height:50px; border-color:#d8dae1; }
.api-key-field input:focus { border-color:var(--red); box-shadow:0 0 0 4px rgba(255,36,68,.09); }
.api-balance-row { display:flex; justify-content:space-between; gap:18px; padding:13px 14px; border-radius:12px; background:#fafbfc; border:1px solid var(--line); font-size:13px; }
.api-form-actions { display:flex; flex-wrap:wrap; gap:9px; }
.api-form-actions .button.primary { min-width:154px; }
.last-check { margin-top:15px; padding-top:14px; border-top:1px solid #f0f1f4; color:var(--muted); font-size:12px; }
.license-card { padding:24px 27px; }
.license-card .license-grid { grid-template-columns:repeat(4,minmax(120px,1fr)) auto; }
.license-note { margin-top:19px; }
@media (max-width:1180px) { .settings-top-grid { grid-template-columns:1fr; } .api-guide-card, .api-key-card { padding:24px; } }
@media (max-width:780px) { .api-guide-card, .api-key-card, .license-card { padding:19px; } .api-key-heading, .license-card .section-title { flex-direction:column; align-items:flex-start; } .onboarding-step { grid-template-columns:36px minmax(0,1fr); gap:12px; } .step-badge { width:36px; height:36px; border-radius:11px; } .onboarding-step:not(:last-child)::after { left:17px; top:40px; } .onboarding-action { width:100%; justify-content:center; } .volc-model-item { align-items:flex-start; flex-direction:column; } .api-form-actions { display:grid; grid-template-columns:1fr; } .api-form-actions .button { width:100%; } .license-card .license-grid { grid-template-columns:1fr 1fr; } .license-card .license-grid > div:last-child { grid-column:1/-1; } }
@media (max-width:430px) { .license-card .license-grid { grid-template-columns:1fr; } .license-card .license-grid > div:last-child { grid-column:auto; } }
/* user-api-settings-alignment */
.first-step .step-action-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:18px; align-items:center; }
.first-step .onboarding-action { align-self:center; margin-top:0; white-space:nowrap; }
.locked-label { display:inline-flex; margin-left:6px; padding:2px 7px; border-radius:999px; color:#777b86; background:#eef0f3; font-size:11px; font-weight:600; vertical-align:middle; }
.locked-field input { color:#6e727d; background:#f4f5f7; border-color:#e1e3e8; cursor:not-allowed; box-shadow:none; }
.locked-field input:focus { border-color:#e1e3e8; box-shadow:none; }
.api-form-actions { justify-content:flex-end; }
@media (max-width:780px) { .first-step .step-action-row { grid-template-columns:1fr; gap:0; } .first-step .onboarding-action { margin-top:12px; } .api-form-actions { justify-content:stretch; } }
/* api-actions-feedback */
.warning-delete { color:#a96008; background:#fff4c9; border-color:#ee9d2d; border-style:dashed; box-shadow:none; }
.warning-delete:hover { color:#8d4d00; background:#ffe9a3; border-color:#df8412; }
.auto-dismiss-notice { overflow:hidden; max-height:120px; opacity:1; transform:translateY(0); transition:opacity .28s ease, transform .28s ease, max-height .28s ease, margin .28s ease, padding .28s ease, border-width .28s ease; }
.auto-dismiss-notice.is-hiding { max-height:0; margin-top:0; margin-bottom:0; padding-top:0; padding-bottom:0; border-width:0; opacity:0; transform:translateY(-5px); }
@media (prefers-reduced-motion:reduce) { .auto-dismiss-notice { transition:none; } }
/* activation-modal-redesign */
.activation-overlay { position:fixed; inset:0; z-index:30; display:grid; place-items:center; padding:28px; background:rgba(24,27,35,.38); backdrop-filter:blur(7px); }
.activation-modal { position:relative; width:min(780px,100%); padding:36px; overflow:hidden; border:1px solid rgba(255,255,255,.8); border-radius:26px; background:#fff; box-shadow:0 28px 80px rgba(22,25,34,.24); animation:activationModalIn .2s ease-out; }
.activation-modal::before { content:""; position:absolute; inset:0 0 auto; height:5px; background:linear-gradient(90deg,#ff2444,#ff6078 56%,#ffb3bf); }
.activation-close { position:absolute; top:18px; right:18px; width:38px; height:38px; display:grid; place-items:center; border:1px solid var(--line); border-radius:50%; color:#6c707b; background:#fafbfc; font-size:24px; line-height:1; cursor:pointer; }
.activation-close:hover { color:var(--red); border-color:#ffc4cd; background:#fff5f6; }
.activation-modal-hero { display:grid; grid-template-columns:76px minmax(0,1fr); gap:20px; align-items:center; padding-right:42px; }
.activation-modal-hero .activation-mark { width:76px; height:76px; margin:0; border-radius:22px; box-shadow:0 14px 28px rgba(255,36,68,.2); }
.activation-modal-hero .activation-mark .ui-icon { width:36px; height:36px; }
.activation-modal-hero h2 { margin:10px 0 7px; font-size:28px; letter-spacing:-.6px; }
.activation-modal-hero p { margin:0; color:var(--muted); font-size:14px; line-height:1.7; }
.activation-feature-row { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin:28px 0; padding:14px; border:1px solid #f0e7e9; border-radius:16px; background:linear-gradient(135deg,#fffafb,#fff6f7); }
.activation-feature-row > div { display:grid; grid-template-columns:36px minmax(0,1fr); gap:10px; align-items:center; padding:8px; }
.activation-feature-row .ui-icon { width:24px; height:24px; padding:6px; box-sizing:content-box; border-radius:11px; color:var(--red); background:#fff; }
.activation-feature-row span { display:grid; gap:4px; }
.activation-feature-row b { font-size:14px; }
.activation-feature-row small { color:var(--muted); font-size:11px; white-space:nowrap; }
.activation-modal-form { display:grid; gap:9px; margin:0; max-width:none; text-align:left; }
.activation-modal-form > label { font-size:14px; font-weight:750; }
.activation-input-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px; }
.activation-input-row input { width:100%; min-height:52px; padding:0 16px; border:1px solid #dfe1e7; border-radius:12px; color:var(--ink); background:#fff; font-size:15px; text-transform:uppercase; letter-spacing:.7px; outline:none; }
.activation-input-row input:focus { border-color:var(--red); box-shadow:0 0 0 4px rgba(255,36,68,.09); }
.activation-submit { min-width:142px; min-height:52px; padding:0 24px; white-space:nowrap; font-size:15px; box-shadow:0 10px 22px rgba(255,36,68,.22); }
.activation-demo { display:flex; align-items:center; gap:9px; margin-top:12px; color:var(--muted); font-size:12px; }
.activation-demo code { padding:5px 9px; border-radius:7px; color:#a4293c; background:#fff0f2; font-family:inherit; font-weight:700; letter-spacing:.4px; }
.activation-modal-foot { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-top:27px; padding-top:20px; border-top:1px solid var(--line); }
.activation-modal-foot p { margin:0; color:var(--muted); font-size:12px; }
.toast { z-index:50; }
@keyframes activationModalIn { from { opacity:0; transform:translateY(12px) scale(.985); } to { opacity:1; transform:translateY(0) scale(1); } }
@media (max-width:780px) { .activation-overlay { align-items:end; padding:12px; } .activation-modal { max-height:calc(100vh - 24px); overflow-y:auto; padding:26px 20px 22px; border-radius:23px; } .activation-modal-hero { grid-template-columns:58px minmax(0,1fr); gap:14px; padding-right:28px; } .activation-modal-hero .activation-mark { width:58px; height:58px; border-radius:17px; } .activation-modal-hero .activation-mark .ui-icon { width:28px; height:28px; } .activation-modal-hero h2 { font-size:23px; } .activation-feature-row { grid-template-columns:1fr; margin:21px 0; } .activation-feature-row > div { grid-template-columns:36px minmax(0,1fr); } .activation-input-row { grid-template-columns:1fr; } .activation-submit { width:100%; } .activation-modal-foot { align-items:stretch; flex-direction:column; } .activation-modal-foot .button { width:100%; } }
@media (prefers-reduced-motion:reduce) { .activation-modal { animation:none; } }


/* Creation: show every official track without truncation. */
.quick-tracks{grid-template-columns:repeat(3,minmax(0,1fr))}

/* Track library: two-column horizontal cards; keep the detail preview unchanged. */
.library-layout .track-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.library-layout .track-card {
  min-height: 166px;
  padding: 16px;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  column-gap: 15px;
  align-items: start;
}
.library-layout .track-card .track-scene {
  grid-column: 1;
  grid-row: 1 / span 3;
  width: 96px;
  height: 100%;
  min-height: 132px;
  margin: 0;
  border-radius: 14px;
}
.library-layout .track-card h3 {
  grid-column: 2;
  margin: 3px 52px 7px 0;
  font-size: 16px;
  line-height: 1.3;
}
.library-layout .track-card p {
  grid-column: 2;
  min-height: 0;
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
}
.library-layout .track-card .button {
  grid-column: 2;
  align-self: end;
  justify-self: end;
  margin-top: 12px;
}
.library-layout .track-card .source-badge {
  right: 14px;
  top: 14px;
}
@media (max-width: 780px) {
  .library-layout .track-grid {
    grid-template-columns: 1fr;
  }
}
