:root {
  color-scheme: light;
  font-family: Inter, "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --bg: #edf1f7;
  --rail: #dce4ef;
  --card: #ffffff;
  --line: #dce3ec;
  --line-strong: #c9d4e1;
  --text: #151927;
  --muted: #697587;
  --muted-2: #96a1af;
  --cyan: #04b9d8;
  --cyan-strong: #0a8daf;
  --yellow: #ffb800;
  --orange: #ff9f1a;
  --purple: #915df4;
  --pink: #ff6fa4;
  --blue: #20c6ef;
  --shadow: 0 18px 46px rgba(46, 61, 85, 0.11);
  --shadow-soft: 0 8px 22px rgba(46, 61, 85, 0.08);
  --radius: 8px;
  background: var(--bg);
  color: var(--text);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 54% 8%, rgba(255, 184, 0, 0.15), transparent 23%),
    linear-gradient(rgba(70, 91, 121, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(70, 91, 121, 0.045) 1px, transparent 1px),
    var(--bg);
  background-size: auto, 50px 50px, 50px 50px, auto;
  overflow-x: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button,
a,
input,
textarea {
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  letter-spacing: 0;
}

button {
  min-height: 38px;
  border: 1px solid #e59a00;
  border-radius: 999px;
  padding: 9px 18px;
  color: #17120a;
  background: linear-gradient(180deg, #ffd84a, #ffb11b);
  box-shadow: 0 6px 14px rgba(225, 145, 0, 0.22);
  font-weight: 900;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(225, 145, 0, 0.28);
}

button:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
}

.secondary {
  color: #2c3a4d;
  border-color: #d7e0eb;
  background: #ffffff;
  box-shadow: 0 3px 10px rgba(46, 61, 85, 0.06);
}

.secondary:hover {
  background: #f7fbff;
  box-shadow: 0 8px 18px rgba(46, 61, 85, 0.10);
}

.text-link,
.profile-logout,
.links a {
  color: var(--cyan-strong);
  font-weight: 900;
  text-decoration: none;
}

.text-link:hover,
.profile-logout:hover,
.links a:hover {
  color: #056d8c;
}

label {
  display: grid;
  gap: 8px;
  color: #344357;
  font-size: 14px;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid #d7e0eb;
  border-radius: var(--radius);
  padding: 11px 13px;
  color: var(--text);
  background: #f8fafc;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(4, 185, 216, 0.14);
  background: #ffffff;
}

input::placeholder,
textarea::placeholder {
  color: var(--muted-2);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.app-shell,
.admin-layout {
  width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
}

.left-rail {
  position: sticky;
  top: 0;
  height: 100vh;
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 12px;
  border-right: 1px solid #cfd9e5;
  background: rgba(216, 225, 237, 0.92);
  box-shadow: 10px 0 28px rgba(72, 88, 112, 0.08);
  overflow: hidden;
}

.rail-brand,
.admin-brand {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 26px 18px 12px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--cyan-strong);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  font-size: 12px;
  font-weight: 950;
}

.rail-brand strong,
.admin-brand h1 {
  display: block;
  margin: 0;
  color: var(--cyan);
  font-size: 20px;
  line-height: 1.1;
}

.rail-brand small,
.admin-brand p {
  display: block;
  margin: 6px 0 0;
  color: #7b8797;
  font-size: 12px;
  font-weight: 800;
}

.mode-switch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 14px 10px;
  background: rgba(196, 207, 221, 0.55);
}

.mode-card {
  min-height: 64px;
  display: grid;
  place-items: center;
  gap: 4px;
  border: 0;
  border-radius: var(--radius);
  padding: 9px;
  color: #738095;
  background: transparent;
  box-shadow: none;
}

.mode-card:hover,
.mode-card.active {
  color: #087d9c;
  background: #bfe8f3;
  box-shadow: inset 0 -3px 0 var(--cyan);
}

.mode-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: inherit;
  font-size: 22px;
  line-height: 1;
}

.mode-card strong {
  font-size: 12px;
}

.rail-tabs {
  display: flex;
  gap: 6px;
  padding: 0 10px;
  overflow-x: auto;
}

.rail-tabs button {
  min-height: 32px;
  flex: 0 0 auto;
  border-color: #d4dde8;
  border-radius: 7px;
  padding: 6px 10px;
  color: #647184;
  background: #eef3f8;
  box-shadow: none;
  font-size: 12px;
}

.rail-tabs button.active,
.rail-tabs button:hover {
  color: #ffffff;
  border-color: #078aaa;
  background: #0896b8;
}

.rail-search {
  padding: 0 10px;
}

.rail-search span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.rail-search input {
  height: 32px;
  border-radius: 7px;
  background: #f8fafc;
  font-size: 12px;
}

.model-list,
.side-list {
  display: grid;
  align-content: start;
  gap: 6px;
  overflow: auto;
  padding: 6px 10px 12px;
}

.model-item {
  position: relative;
  min-height: 76px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  border-radius: var(--radius);
  padding: 10px 8px;
  color: var(--text);
  background: transparent;
  box-shadow: none;
  text-align: left;
}

.model-item:hover,
.model-item.active {
  background: #bfeaf2;
  box-shadow: none;
}

.model-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 999px;
  background: var(--cyan);
}

.model-logo {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  color: #ffffff;
  background: #151923;
  box-shadow: 0 8px 16px rgba(21, 25, 35, 0.18);
  font-size: 12px;
  font-weight: 950;
}

.model-item strong {
  display: block;
  font-size: 13px;
}

.model-item small,
.model-item p {
  display: block;
  margin: 4px 0 0;
  color: #667386;
  font-size: 11px;
  line-height: 1.35;
}

.model-item em {
  align-self: start;
  border-radius: 4px;
  padding: 2px 5px;
  color: #087d9c;
  background: rgba(4, 185, 216, 0.13);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.rail-user-card {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 0 10px 12px;
  border-radius: var(--radius);
  padding: 10px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.coin {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #ffc83d, #ff8a00);
}

.rail-user-card strong,
.rail-user-card small {
  display: block;
}

.rail-user-card small {
  color: var(--muted);
}

.main-stage {
  position: relative;
  min-width: 0;
  min-height: 100vh;
  overflow: auto;
  overflow-x: hidden;
  padding: 28px 28px 150px;
}

.top-actions {
  position: fixed;
  top: 18px;
  right: 26px;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 7px 14px;
  color: #151927;
  background: linear-gradient(180deg, #ffd84a, #ffb11b);
  box-shadow: 0 6px 14px rgba(225, 145, 0, 0.22);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.new-chat-button {
  position: sticky;
  top: 28px;
  z-index: 5;
  min-width: 138px;
  margin-left: -8px;
  border-radius: 999px;
  font-size: 15px;
}

.stage-center {
  width: min(900px, calc(100% - 40px));
  margin: 128px auto 0;
}

.hero-card {
  min-height: 136px;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  border-radius: 14px;
  padding: 30px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.hero-card > div,
.feature-card,
.status-card {
  min-width: 0;
}

.hero-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  color: #ffffff;
  background: #161923;
  box-shadow: 0 10px 22px rgba(21, 25, 35, 0.20);
  font-size: 34px;
}

.section-kicker,
.page-heading p,
.metric-card span {
  margin: 0 0 6px;
  color: var(--cyan-strong);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-card h1 {
  margin: 0;
  color: #171b29;
  font-size: clamp(30px, 4.5vw, 42px);
  line-height: 1.12;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.hero-card h1::first-letter {
  color: inherit;
}

.hero-card p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
  overflow-wrap: anywhere;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 46px;
}

.feature-card {
  min-height: 96px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  grid-template-areas:
    "icon title"
    "icon copy";
  align-items: center;
  column-gap: 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 22px;
  box-shadow: var(--shadow-soft);
}

.feature-card span {
  grid-area: icon;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 950;
}

.feature-card strong {
  grid-area: title;
  align-self: end;
  font-size: 18px;
}

.feature-card p {
  grid-area: copy;
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.feature-card.yellow {
  border-color: #ffe5a3;
  background: #fff8df;
}

.feature-card.yellow span {
  color: #ffb800;
  background: #fff0b6;
}

.feature-card.purple {
  border-color: #eadcff;
  background: #f5efff;
}

.feature-card.purple span {
  color: var(--purple);
  background: #eadcff;
}

.feature-card.blue {
  border-color: #cfedf7;
  background: #ecfaff;
}

.feature-card.blue span {
  color: var(--blue);
  background: #ccf3fc;
}

.feature-card.pink {
  border-color: #ffd8e6;
  background: #fff0f5;
}

.feature-card.pink span {
  color: var(--pink);
  background: #ffd9e7;
}

.status-card,
.panel-card,
.admin-top-card,
.admin-page,
.composer-card,
.profile-popover,
.auth-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
}

.status-card {
  margin-top: 28px;
  padding: 22px;
}

.status-row,
.surface-heading-row,
.qishui-login-head,
.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.status-row h2,
.surface-heading-row h2,
.page-heading h2 {
  margin: 0;
  color: #171b29;
  font-size: 24px;
}

.badge {
  min-width: 76px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #cdeff5;
  border-radius: 999px;
  padding: 6px 10px;
  color: #078aaa;
  background: #eafaff;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.track-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.track-list:empty::before {
  content: "任务创建后，这里会显示曲目进度、状态和下载入口。";
  display: block;
  border: 1px dashed #cbd6e3;
  border-radius: 12px;
  padding: 18px;
  color: var(--muted);
  background: #f8fafc;
}

.track,
.log-entry,
.sms-relay-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
}

.track {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 13px;
}

.track strong {
  display: block;
  margin-bottom: 4px;
}

.track small,
.log-time,
.empty-log,
.sms-relay-item-head span,
.sms-relay-meta {
  color: var(--muted);
}

.links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.composer-card {
  position: fixed;
  left: calc(270px + max(28px, (100vw - 270px - 980px) / 2));
  right: max(28px, (100vw - 270px - 980px) / 2);
  bottom: 18px;
  z-index: 12;
  min-height: 142px;
  display: grid;
  align-content: space-between;
  gap: 14px;
  padding: 18px;
}

.composer-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.count-pill {
  width: auto;
  min-height: 34px;
  display: grid;
  grid-template-columns: auto 62px;
  align-items: center;
  gap: 8px;
  border: 1px solid #ffe0a3;
  border-radius: 999px;
  padding: 6px 10px;
  color: #8a5a00;
  background: #fff3c9;
}

.count-pill span {
  font-size: 12px;
}

.count-pill input {
  height: 28px;
  border: 0;
  padding: 0 6px;
  background: transparent;
  text-align: center;
}

.composer-placeholder {
  margin: 0;
  min-height: 24px;
  color: #8490a1;
}

.platform-submit-grid {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.notice-panel {
  position: fixed;
  left: auto;
  right: 28px;
  top: 72px;
  bottom: auto;
  z-index: 20;
  max-width: min(560px, calc(100vw - 310px));
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #ffe0a3;
  border-radius: 12px;
  padding: 12px 14px;
  color: #754c00;
  background: #fff7df;
  box-shadow: var(--shadow-soft);
}

.user-tab-page,
.admin-page {
  display: none;
}

.user-tab-page.active,
.admin-page.active {
  display: block;
}

.utility-page {
  width: min(1040px, calc(100% - 40px));
  margin: 92px auto 0;
}

.panel-card {
  padding: 24px;
}

.surface-form-grid,
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.wide-field {
  grid-column: 1 / -1;
}

.form-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

.button-row,
.ops-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.log-list,
.sms-relay-list {
  display: grid;
  gap: 10px;
  max-height: 420px;
  overflow: auto;
}

.log-entry {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.5;
}

.error,
.error-log {
  color: #d94841;
}

.error {
  white-space: pre-wrap;
}

.error-log {
  border-color: #ffd1cc;
  background: #fff1ef;
}

.qishui-vnc-frame {
  display: block;
  width: 100%;
  height: min(62vh, 640px);
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-top: 16px;
  background: #f8fafc;
}

.qishui-vnc-frame[hidden] {
  display: none;
}

.activity-surface {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.7fr);
  gap: 18px;
}

.activity-panel h3,
.panel-card h3 {
  margin: 0 0 14px;
  color: #171b29;
  font-size: 17px;
}

.avatar-button {
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #d7e0eb;
  border-radius: 50%;
  padding: 0;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.avatar-button img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
  object-fit: cover;
}

.user-profile {
  position: relative;
}

.user-profile::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 0;
  width: min(320px, calc(100vw - 36px));
  height: 12px;
}

.profile-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(330px, calc(100vw - 36px));
  display: none;
  padding: 16px;
}

.user-profile:hover .profile-popover,
.user-profile.is-open .profile-popover,
.user-profile:focus-within .profile-popover {
  display: block;
}

.profile-popover h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.password-form {
  display: grid;
  gap: 12px;
}

.profile-logout {
  display: inline-flex;
  margin-top: 12px;
}

.admin-layout {
  grid-template-columns: 270px minmax(0, 1fr);
}

.admin-sidebar {
  grid-template-rows: auto 1fr auto;
  padding-bottom: 12px;
}

.side-list {
  padding-top: 10px;
}

.side-list-item {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: var(--radius);
  padding: 10px 12px;
  color: #596779;
  background: transparent;
  box-shadow: none;
  text-align: left;
}

.side-list-item:hover,
.side-list-item.active {
  color: #087d9c;
  background: #bfe8f3;
  box-shadow: inset 4px 0 0 var(--cyan);
}

.sidebar-actions {
  display: grid;
  gap: 10px;
  padding: 12px 10px 0;
}

.admin-top-card {
  width: min(1120px, calc(100% - 40px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  margin: 26px auto 18px;
  padding: 26px;
}

.admin-top-card h2 {
  margin: 0;
  font-size: 32px;
}

.admin-top-card p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
}

.admin-mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 98px);
  gap: 10px;
}

.admin-mini-stats article {
  border: 1px solid #e3e9f0;
  border-radius: 12px;
  padding: 12px;
  background: #f8fbff;
}

.admin-mini-stats strong,
.admin-mini-stats span {
  display: block;
}

.admin-mini-stats span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.admin-form-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto 40px;
}

.admin-page {
  min-height: 560px;
  padding: 26px;
}

.page-heading {
  align-items: flex-end;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.metric-card {
  position: relative;
  overflow: hidden;
  min-height: 112px;
  border: 1px solid #e3e9f0;
  border-radius: 12px;
  padding: 16px;
  background: #f8fbff;
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-left: 4px solid var(--cyan);
}

.metric-card strong,
.metric-card span {
  position: relative;
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  color: #171b29;
  font-size: 24px;
  line-height: 1.15;
}

.secret-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.secret-control-area {
  grid-template-columns: minmax(0, 1fr) 74px;
}

.secret-toggle {
  min-height: 40px;
  padding: 0 12px;
  white-space: nowrap;
}

textarea.is-concealed {
  -webkit-text-security: disc;
  font-family: text-security-disc, Inter, "Microsoft YaHei", system-ui, sans-serif;
}

.sms-relay-status-panel,
.panel-card + .panel-card {
  margin-top: 16px;
}

.sms-relay-list {
  margin-top: 14px;
}

.sms-relay-item {
  padding: 12px;
}

.sms-relay-item-head,
.sms-relay-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}

.sms-relay-item p {
  margin: 8px 0 0;
  color: #344357;
  line-height: 1.6;
  word-break: break-word;
}

.relay-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.guide-list {
  margin: 12px 0 0;
  padding-left: 20px;
  color: #344357;
  line-height: 1.7;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.ops-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  font-size: 14px;
}

.ops-table th,
.ops-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.ops-table th {
  color: var(--cyan-strong);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ops-table tr:hover td {
  background: #f4f9fc;
}

.admin-output {
  margin: 14px 0 0;
  min-height: 360px;
  max-height: 680px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  color: #344357;
  background: #f8fafc;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 13px;
  line-height: 1.5;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
}

.auth-card {
  width: min(430px, 100%);
  display: grid;
  gap: 18px;
  padding: 32px;
}

.auth-card h1 {
  margin: 0;
  color: #171b29;
  font-size: 30px;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(75, 92, 118, 0.06);
}

::-webkit-scrollbar-thumb {
  border: 2px solid rgba(75, 92, 118, 0.06);
  border-radius: 999px;
  background: rgba(86, 103, 127, 0.28);
}

@media (max-width: 1180px) {
  .app-shell,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .left-rail {
    position: sticky;
    top: 0;
    z-index: 18;
    height: auto;
    grid-template-rows: auto auto;
    gap: 8px;
    overflow: visible;
  }

  .rail-brand {
    padding: 14px 16px 8px;
  }

  .mode-switch,
  .rail-search,
  .rail-user-card {
    display: none;
  }

  .user-workbench-page .model-list {
    display: flex;
    padding: 8px 10px 12px;
    overflow-x: auto;
  }

  .user-workbench-page .model-item {
    min-width: 210px;
    flex: 0 0 210px;
  }

  .side-list,
  .admin-nav {
    display: flex;
    overflow-x: auto;
  }

  .side-list-item,
  .admin-nav-item {
    width: auto;
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .main-stage {
    min-height: calc(100vh - 88px);
  }

  .composer-card {
    left: 20px;
    right: 20px;
  }

  .notice-panel {
    left: 20px;
    right: 20px;
    top: 98px;
    max-width: none;
  }

  .admin-top-card,
  .admin-form-shell {
    width: min(100% - 40px, 1000px);
  }
}

@media (max-width: 760px) {
  .user-workbench-page .left-rail,
  .user-workbench-page .main-stage {
    width: min(100%, 390px);
    max-width: 100vw;
  }

  .main-stage {
    padding: 18px 12px 260px;
  }

  .top-actions {
    position: static;
    justify-content: flex-end;
    margin-bottom: 12px;
    max-width: 100%;
    overflow: hidden;
  }

  .new-chat-button {
    position: static;
    margin: 0 0 16px;
  }

  .stage-center,
  .utility-page,
  .admin-form-shell,
  .admin-top-card {
    width: 100%;
    margin-top: 16px;
  }

  .hero-card {
    grid-template-columns: 1fr;
    padding: 22px;
    overflow: hidden;
  }

  .hero-card h1 {
    font-size: 24px;
    line-height: 1.16;
    word-break: break-all;
  }

  .hero-card p:last-child,
  .feature-card p {
    word-break: break-all;
  }

  .feature-grid,
  .surface-form-grid,
  .settings-grid,
  .metric-grid,
  .relay-guide-grid,
  .activity-surface,
  .admin-top-card,
  .admin-mini-stats {
    grid-template-columns: 1fr;
  }

  .composer-card {
    position: static;
    min-height: auto;
    margin-top: 20px;
  }

  .platform-submit-grid,
  .button-row,
  .ops-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .platform-submit-grid > *,
  .button-row > *,
  .ops-strip > * {
    width: 100%;
  }

  .notice-panel {
    position: static;
    margin: 14px 0;
  }

  .status-row,
  .surface-heading-row,
  .page-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .track,
  .log-entry {
    grid-template-columns: 1fr;
  }
}
