:root {
  --bg: #eef3f1;
  --surface: #fbfdfc;
  --surface-strong: #ffffff;
  --surface-soft: #eef6f2;
  --ink: #182537;
  --muted: #5d6d7c;
  --line: #d3dde3;
  --line-strong: #c4d2dc;
  --teal: #159c87;
  --blue: #2d68b1;
  --coral: #e8664c;
  --gold: #e6ad35;
  --chrome: #f7faf8;
  --shadow: 0 18px 42px rgba(32, 47, 64, 0.12);
  --soft-shadow: 0 8px 24px rgba(32, 47, 64, 0.08);
  --inset-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  margin: 0;
  height: 100%;
  min-width: 1220px;
  min-height: 100vh;
  overflow-x: auto;
  overflow-y: hidden;
  background:
    linear-gradient(135deg, #eaf0ed 0%, #f9fbf8 46%, #e9f1f3 100%);
  color: var(--ink);
  font-family: "Microsoft YaHei", "Noto Sans CJK SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0)),
    repeating-linear-gradient(0deg, rgba(39, 61, 78, 0.025) 0, rgba(39, 61, 78, 0.025) 1px, transparent 1px, transparent 24px);
}

button,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: 70px 38px minmax(0, 1fr);
  gap: 10px;
  height: 100vh;
  padding: 12px;
}

.topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(244, 249, 247, 0.92));
  border: 1px solid rgba(195, 211, 219, 0.9);
  border-radius: 8px;
  box-shadow: var(--soft-shadow), var(--inset-highlight);
  backdrop-filter: blur(16px);
}

.visual-hero {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 38px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid rgba(195, 211, 219, 0.85);
  border-radius: 8px;
  overflow: hidden;
  background: #172737;
  box-shadow: var(--soft-shadow), var(--inset-highlight);
}

.visual-hero img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 56%;
  opacity: 0.42;
  filter: saturate(0.92) contrast(1.08);
  transform: scale(1.01);
}

.visual-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(18, 37, 51, 0.78), rgba(18, 37, 51, 0.35) 45%, rgba(18, 37, 51, 0.72)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 44%);
}

.scene-status {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.scene-status span,
.scene-status em {
  display: inline-grid;
  place-items: center;
  height: 24px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  font-style: normal;
}

.scene-status strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 250px;
  gap: 12px;
}

.brand-avatar {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(21, 156, 135, 0.2);
}

.kicker {
  margin: 0 0 2px;
  color: #0b8274;
  font-size: 13px;
  font-weight: 700;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: 0;
}

h2 {
  font-size: 18px;
  line-height: 1.25;
}

.mode-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  background: #edf2f5;
  border: 1px solid #d3dde5;
  border-radius: 8px;
  box-shadow: inset 0 1px 3px rgba(32, 47, 64, 0.08);
}

.mode-tabs-label {
  padding: 0 8px 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.mode-tab {
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.mode-tab.is-active {
  color: #ffffff;
  background: linear-gradient(180deg, #3477c6, var(--blue));
  box-shadow: 0 8px 18px rgba(45, 104, 177, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.workspace {
  display: grid;
  grid-template-columns: 92px minmax(820px, 1fr) 292px;
  gap: 10px;
  width: 100%;
  min-height: 0;
  margin: 0;
  align-items: stretch;
}

.track-panel,
.chat-panel,
.growth-panel {
  min-width: 0;
  min-height: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 248, 0.95));
  border: 1px solid rgba(195, 211, 219, 0.9);
  border-radius: 8px;
  box-shadow: var(--shadow), var(--inset-highlight);
  backdrop-filter: blur(14px);
}

.track-panel,
.growth-panel {
  overflow: auto;
  padding: 12px;
  scrollbar-width: thin;
  scrollbar-color: #b8c8d1 transparent;
}

.track-panel {
  overflow: hidden;
}

.track-panel .panel-heading {
  display: grid;
  justify-items: center;
  gap: 7px;
  margin-bottom: 12px;
}

.track-panel .panel-heading h2 {
  font-size: 14px;
}

.panel-heading,
.chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-heading {
  margin-bottom: 12px;
}

.panel-icon {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(180deg, #21ad98, var(--teal));
  box-shadow: 0 8px 16px rgba(21, 156, 135, 0.22);
  font-weight: 800;
}

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

.track-launch {
  display: grid;
  place-items: center;
  gap: 4px;
  width: 100%;
  min-height: 92px;
  padding: 8px 6px;
  border: 1px solid rgba(204, 218, 226, 0.92);
  border-radius: 8px;
  background:
    linear-gradient(180deg, #ffffff, #f6faf8);
  box-shadow: 0 5px 14px rgba(32, 47, 64, 0.05), var(--inset-highlight);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.track-image {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 7px;
  border: 1px solid var(--line);
  box-shadow: 0 4px 10px rgba(32, 47, 64, 0.12);
}

.track-launch span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.track-launch strong {
  font-size: 18px;
  line-height: 1.1;
}

.track-launch small {
  color: #16786b;
  font-size: 12px;
  font-weight: 800;
}

.track-launch {
  border-color: var(--teal);
  background:
    linear-gradient(180deg, #ffffff, #effaf6);
  box-shadow: 0 12px 26px rgba(21, 156, 135, 0.18), var(--inset-highlight);
}

.track-launch:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(32, 47, 64, 0.11), var(--inset-highlight);
}

.keyword-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.keyword {
  padding: 3px 6px;
  border-radius: 6px;
  border: 1px solid #d4ece5;
  background: #edf8f5;
  color: #16786b;
  font-size: 12px;
  font-weight: 700;
}

.track-guide {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.source-note {
  min-height: 22px;
  color: #7a6232;
  font-size: 12px;
  font-weight: 700;
}

.import-audio {
  display: grid;
  place-items: center;
  min-height: 30px;
  border: 1px dashed #b7c7d6;
  border-radius: 8px;
  color: var(--muted);
  background: #f7fafc;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.import-audio input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.select-track,
.play-track,
.secondary-button,
.primary-button,
.send-button,
.stage-button,
.icon-button,
.mini-button {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  min-height: 38px;
  background: linear-gradient(180deg, #ffffff, #f4f8f6);
  color: var(--ink);
  font-weight: 800;
  box-shadow: var(--inset-highlight);
}

.select-track {
  color: var(--blue);
}

.play-track {
  width: 100%;
  min-height: 36px;
  padding: 0 6px;
  color: #ffffff;
  background: linear-gradient(180deg, #f07b5f, var(--coral));
  border-color: var(--coral);
  box-shadow: 0 8px 16px rgba(232, 102, 76, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.dialog-actions .select-track,
.dialog-actions .import-audio {
  min-height: 36px;
  padding: 0 12px;
}

.dialog-actions .import-audio {
  display: inline-grid;
}

.chat-panel {
  display: grid;
  grid-template-rows: auto auto auto auto minmax(320px, 1fr) auto;
  min-height: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, #fbfdfc 0%, #f4f8f6 100%);
}

.chat-head {
  justify-content: space-between;
  padding: 15px 18px;
  border-bottom: 1px solid rgba(205, 218, 226, 0.92);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(246, 250, 248, 0.9));
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.72);
}

.context-line {
  min-height: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.icon-button {
  width: 42px;
  flex: 0 0 42px;
  color: #ffffff;
  background: var(--teal);
  border-color: var(--teal);
}

.stage-list {
  display: flex;
  gap: 8px;
  padding: 12px 18px;
  overflow-x: auto;
  border-bottom: 1px solid rgba(211, 221, 227, 0.86);
  background: #f7faf8;
}

.suggestion-list {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 18px;
  overflow-x: auto;
  border-bottom: 1px solid rgba(211, 221, 227, 0.86);
  background: #f0f6f3;
}

.suggestion-chip {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #c7d8e2;
  border-radius: 8px;
  color: #2f5f91;
  background: linear-gradient(180deg, #ffffff, #f5f8fb);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: var(--inset-highlight);
}

.agent-tools {
  border-bottom: 1px solid rgba(211, 221, 227, 0.86);
  background: #fbfdfc;
}

.agent-tools summary {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 18px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  list-style: none;
  cursor: pointer;
}

.agent-tools summary::-webkit-details-marker {
  display: none;
}

.agent-tools summary::after {
  content: "展开";
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}

.agent-tools[open] summary::after {
  content: "收起";
}

.tool-list {
  display: flex;
  gap: 8px;
  padding: 0 18px 12px;
  overflow-x: auto;
}

.tool-chip {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #c8ddd6;
  border-radius: 8px;
  color: #16786b;
  background: linear-gradient(180deg, #fbfffd, #edf8f4);
  font-size: 13px;
  font-weight: 900;
  box-shadow: var(--inset-highlight);
}

.stage-button {
  flex: 0 0 auto;
  padding: 0 12px;
  color: var(--muted);
  background: linear-gradient(180deg, #ffffff, #f0f5f7);
}

.stage-button.is-active {
  color: #ffffff;
  background: linear-gradient(180deg, #20ad98, var(--teal));
  border-color: var(--teal);
  box-shadow: 0 8px 16px rgba(21, 156, 135, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  padding: 18px;
  overflow-y: auto;
  background:
    linear-gradient(180deg, rgba(247, 250, 248, 0.92), rgba(242, 247, 245, 0.96)),
    repeating-linear-gradient(0deg, transparent 0, transparent 31px, rgba(31, 45, 61, 0.025) 32px);
  scrollbar-width: thin;
  scrollbar-color: #b8c8d1 transparent;
}

.message {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  max-width: 92%;
}

.message.user {
  align-self: flex-end;
  grid-template-columns: minmax(0, 1fr) 38px;
}

.message.user .avatar {
  grid-column: 2;
}

.message.user .bubble {
  grid-column: 1;
  grid-row: 1;
  color: #17345c;
  background: linear-gradient(180deg, #e8f1ff, #dae8ff);
  border-color: #bfd2f6;
}

.avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(180deg, #3d7ecb, var(--blue));
  box-shadow: 0 8px 16px rgba(45, 104, 177, 0.18);
  font-weight: 900;
}

.assistant .avatar {
  background: linear-gradient(180deg, #21ad98, var(--teal));
}

.bubble {
  padding: 12px 13px;
  border: 1px solid rgba(205, 218, 226, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 22px rgba(32, 47, 64, 0.07), var(--inset-highlight);
  line-height: 1.68;
  white-space: normal;
  overflow-wrap: anywhere;
}

.message-sources {
  grid-column: 2;
  margin-top: -6px;
  color: var(--muted);
  font-size: 12px;
}

.message-sources summary {
  cursor: pointer;
  font-weight: 800;
}

.message-sources ul {
  margin: 6px 0 0;
  padding-left: 18px;
  line-height: 1.55;
}

.typing {
  color: var(--muted);
}

.composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 94px;
  gap: 10px;
  padding: 14px 18px 16px;
  border-top: 1px solid rgba(205, 218, 226, 0.9);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(244, 248, 246, 0.95));
}

.composer textarea {
  width: 100%;
  resize: none;
  border: 1px solid #c8d6df;
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--ink);
  background: #ffffff;
  box-shadow: inset 0 1px 2px rgba(32, 47, 64, 0.08);
  line-height: 1.55;
}

.composer textarea:focus {
  outline: 3px solid rgba(47, 111, 189, 0.18);
  border-color: var(--blue);
}

.send-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #ffffff;
  background: linear-gradient(180deg, #3477c6, var(--blue));
  border-color: var(--blue);
  box-shadow: 0 10px 22px rgba(45, 104, 177, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.send-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.send-icon {
  font-size: 18px;
  line-height: 1;
}

.growth-panel {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 14px;
}

.growth-score {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, #fff8df, #fff2bf);
  border: 1px solid #ead48f;
  box-shadow: 0 10px 22px rgba(208, 154, 37, 0.14), var(--inset-highlight);
}

.profile-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.profile-box label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.profile-box input {
  width: 100%;
  min-width: 0;
  height: 34px;
  border: 1px solid #cad7df;
  border-radius: 8px;
  padding: 0 9px;
  color: var(--ink);
  background: linear-gradient(180deg, #ffffff, #f8fbfa);
  box-shadow: inset 0 1px 2px rgba(32, 47, 64, 0.06);
}

.sync-status {
  min-height: 20px;
  margin: -4px 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.growth-score span {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(180deg, #f0c552, var(--gold));
  box-shadow: 0 8px 18px rgba(230, 173, 53, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  font-size: 26px;
  font-weight: 900;
}

.growth-score p {
  color: #7d6a2f;
  font-size: 13px;
  font-weight: 800;
}

.growth-score strong {
  display: block;
  margin-top: 2px;
  font-size: 18px;
}

.growth-list {
  display: grid;
  gap: 0;
  margin: 8px 0 0;
}

.growth-list div {
  padding: 9px 0;
  border-bottom: 1px solid rgba(211, 221, 227, 0.82);
}

.growth-list div:last-child {
  border-bottom: 0;
}

.growth-list dt {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.growth-list dd {
  margin: 0;
  min-height: 22px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.side-section {
  margin-top: 12px;
  border-top: 1px solid rgba(211, 221, 227, 0.86);
}

.side-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 40px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  list-style: none;
  cursor: pointer;
}

.side-section summary::-webkit-details-marker {
  display: none;
}

.side-section summary::after {
  content: "展开";
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.side-section[open] summary::after {
  content: "收起";
}

.side-section summary .mini-button + * {
  display: none;
}

.analytics-box {
  padding-top: 0;
  border-color: var(--line);
  background: transparent;
}

.analytics-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.analytics-head h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.2;
}

.mini-button {
  min-height: 30px;
  padding: 0 10px;
  border-color: #bad2c8;
  color: #16786b;
  font-size: 12px;
  font-weight: 900;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.analytics-grid div {
  min-width: 0;
  padding: 9px 7px;
  border: 1px solid #d2e4dd;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f4faf7);
  box-shadow: var(--inset-highlight);
  text-align: center;
}

.analytics-grid span {
  display: block;
  color: var(--teal);
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.analytics-grid p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.analytics-list {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
}

.analytics-list div {
  min-width: 0;
}

.analytics-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.analytics-list dd {
  margin: 3px 0 0;
  min-height: 18px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.report-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.report-text {
  display: none;
  max-height: 260px;
  margin: 12px 0 0;
  padding: 12px;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  background: #f8fbfa;
  white-space: pre-wrap;
  line-height: 1.6;
  font: inherit;
  font-size: 13px;
}

.report-text.has-content {
  display: block;
}

.track-dialog,
.tool-dialog {
  width: min(860px, calc(100vw - 28px));
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
}

.track-dialog::backdrop,
.tool-dialog::backdrop {
  background: rgba(18, 31, 44, 0.46);
  backdrop-filter: blur(6px);
}

.track-dialog-card,
.tool-dialog-card {
  position: relative;
  display: block;
  padding: 18px;
  border: 1px solid rgba(195, 211, 219, 0.95);
  border-radius: 8px;
  background:
    linear-gradient(180deg, #ffffff, #f5faf7);
  box-shadow: 0 28px 70px rgba(18, 31, 44, 0.28), var(--inset-highlight);
}

.tool-dialog {
  width: min(860px, calc(100vw - 28px));
}

.tool-dialog-card {
  display: block;
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
}

.dialog-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f4f8f6);
  color: var(--muted);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

#trackDialogBody {
  display: block;
}

#toolDialogBody {
  min-width: 0;
}

.dialog-kicker {
  color: var(--teal) !important;
  font-size: 13px;
  font-weight: 900;
}

.track-picker {
  display: grid;
  gap: 14px;
  padding-right: 28px;
}

.track-picker-head {
  display: grid;
  gap: 5px;
}

.track-picker-head h3 {
  margin: 0;
  font-size: 22px;
}

.track-picker-head p {
  color: var(--muted);
  line-height: 1.55;
}

.track-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.picker-track-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  background: linear-gradient(180deg, #ffffff, #f6faf8);
  box-shadow: var(--inset-highlight);
  text-align: left;
}

.picker-track-card.is-active {
  border-color: var(--teal);
  box-shadow: 0 14px 26px rgba(21, 156, 135, 0.18), var(--inset-highlight);
}

.picker-track-card:hover {
  transform: translateY(-1px);
}

.picker-track-card .dialog-track-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(32, 47, 64, 0.13);
}

.picker-track-card span {
  color: var(--teal);
  font-size: 13px;
  font-weight: 900;
}

.picker-track-card strong {
  font-size: 16px;
  line-height: 1.25;
}

.picker-track-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tool-dialog-copy {
  display: grid;
  gap: 14px;
  padding-right: 30px;
}

.tool-dialog-copy h3 {
  margin: 0;
  font-size: 22px;
}

.path-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.path-list li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f6faf8);
  box-shadow: var(--inset-highlight);
}

.path-list li > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: var(--muted);
  background: #edf3f8;
  font-weight: 900;
}

.path-list li.is-done > span {
  color: #ffffff;
  background: var(--teal);
}

.path-list p,
.practice-feedback {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.55;
}

.practice-list {
  display: grid;
  gap: 12px;
}

.practice-item {
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f6faf8);
  box-shadow: var(--inset-highlight);
}

.practice-item h4 {
  margin: 0 0 10px;
  line-height: 1.45;
}

.practice-options {
  display: grid;
  gap: 8px;
}

.practice-options button,
.scaffold-list button,
.tool-insert,
.tool-copy {
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  background: linear-gradient(180deg, #ffffff, #f4f8f6);
  font-weight: 800;
  text-align: left;
  padding: 7px 10px;
  box-shadow: var(--inset-highlight);
}

.practice-options button.is-correct {
  color: #137163;
  border-color: #9ad7c8;
  background: #edf9f5;
}

.practice-options button.is-wrong {
  color: #9b3d2c;
  border-color: #f0b6a6;
  background: #fff1ed;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}

.compare-table th,
.compare-table td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  line-height: 1.55;
}

.compare-table th {
  width: 84px;
  color: var(--blue);
  background: #f1f6f8;
}

.scaffold-list {
  display: grid;
  gap: 8px;
}

.tool-result {
  max-height: 520px;
  margin: 0;
  padding: 12px;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #f8fbfa;
  white-space: pre-wrap;
  line-height: 1.65;
  font: inherit;
}

.tool-result h4 {
  margin: 14px 0 8px;
  font-size: 16px;
}

.tool-result h4:first-child {
  margin-top: 0;
}

.tool-result p {
  margin: 8px 0;
}

.tool-result hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 12px 0;
}

.tool-list-output {
  margin: 8px 0;
  padding-left: 22px;
}

.tool-list-output li {
  margin: 6px 0;
}

.tool-sources {
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  background: #f3f7f8;
  font-size: 13px;
}

.tool-sources summary {
  cursor: pointer;
  font-weight: 900;
}

.tool-sources ul {
  margin: 8px 0 0;
  padding-left: 18px;
  line-height: 1.55;
}

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tool-insert {
  color: #ffffff;
  background: var(--blue);
  border-color: var(--blue);
}

.tool-loading {
  color: var(--muted);
}

.secondary-button,
.primary-button {
  padding: 0 10px;
}

.secondary-button {
  color: var(--blue);
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(180deg, #f07b5f, var(--coral));
  border-color: var(--coral);
  box-shadow: 0 9px 18px rgba(232, 102, 76, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* ===== AI 学伴主体版工作台 ===== */
body {
  min-width: 1280px;
  background: #f5f8fa;
}

body::before {
  background:
    linear-gradient(180deg, rgba(45, 122, 110, 0.06), transparent 240px),
    repeating-linear-gradient(0deg, rgba(29, 53, 67, 0.022) 0, rgba(29, 53, 67, 0.022) 1px, transparent 1px, transparent 28px);
}

.app-shell {
  grid-template-rows: 62px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
}

.topbar {
  padding: 0 16px;
  background: linear-gradient(180deg, #2f8274, #286f64);
  border: 0;
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(31, 70, 75, 0.18);
}

.brand {
  min-width: 300px;
}

.brand-avatar {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

.kicker,
.brand h1 {
  color: #ffffff;
}

.kicker {
  opacity: 0.82;
  font-size: 12px;
}

.brand h1 {
  font-size: 21px;
}

.mode-tabs {
  flex: 1;
  justify-content: center;
  gap: 4px;
  max-width: 520px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: none;
}

.mode-tab {
  min-width: 118px;
  min-height: 38px;
  color: rgba(255, 255, 255, 0.82);
  border-radius: 6px;
}

.mode-tab.is-active {
  color: #1f3e39;
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(12, 36, 42, 0.18);
}

.topbar-status {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 150px;
  justify-content: flex-end;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: 800;
}

.topbar-status strong {
  display: inline-grid;
  place-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 6px;
  color: #ffffff;
  background: rgba(255, 149, 0, 0.96);
}

.workspace {
  grid-template-columns: 270px minmax(680px, 1fr) 330px;
  gap: 12px;
}

.companion-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  min-height: 0;
}

.agent-card,
.route-panel,
.track-panel,
.chat-panel,
.growth-panel {
  border-radius: 8px;
  border: 1px solid #dbe6eb;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(31, 53, 68, 0.08);
  backdrop-filter: none;
}

.agent-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
  min-height: 132px;
  align-content: start;
  background:
    linear-gradient(135deg, rgba(45, 122, 110, 0.96), rgba(28, 89, 93, 0.96)),
    url("/assets/hero-music-classroom.png") center/cover;
  color: #ffffff;
  overflow: hidden;
}

.agent-avatar-large {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.84);
}

.agent-card p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 800;
}

.agent-card h2 {
  margin-top: 4px;
  color: #ffffff;
  font-size: 20px;
}

.agent-tags {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
}

.agent-tags span {
  display: inline-grid;
  place-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 12px;
  font-weight: 800;
}

.track-panel {
  padding: 14px;
  overflow: visible;
}

.route-panel {
  min-height: 0;
  padding: 14px;
  overflow: auto;
}

.panel-heading {
  margin-bottom: 12px;
}

.panel-heading h2 {
  font-size: 16px;
}

.panel-icon {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: #2d7a6e;
  box-shadow: none;
}

.track-list {
  gap: 10px;
}

.track-launch {
  justify-items: stretch;
  min-height: 0;
  gap: 8px;
  padding: 10px;
  border-color: #d8e6e4;
  text-align: left;
  box-shadow: none;
}

.track-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #d6e1e5;
}

.track-launch span {
  color: #2d7a6e;
  font-size: 12px;
}

.track-launch strong {
  font-size: 18px;
  line-height: 1.18;
}

.track-launch small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 700;
}

.play-track {
  min-height: 38px;
  border-radius: 6px;
  background: #ff9500;
  border-color: #ff9500;
  box-shadow: none;
}

.stage-list {
  display: grid;
  gap: 8px;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
}

.stage-button {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  padding: 0 10px;
  border-radius: 6px;
  text-align: left;
  color: #425868;
  background: #f7faf9;
  box-shadow: none;
}

.stage-button span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #e8f0f2;
  color: #667884;
  font-size: 12px;
  font-weight: 900;
}

.stage-button strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.stage-button.is-active {
  color: #ffffff;
  background: #2d7a6e;
  border-color: #2d7a6e;
  box-shadow: none;
}

.stage-button.is-active span {
  color: #2d7a6e;
  background: #ffffff;
}

.chat-panel {
  grid-template-rows: 132px 54px minmax(0, 1fr) 54px 84px;
  background: #ffffff;
  overflow: hidden;
}

.mission-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 18px;
  min-height: 132px;
  padding: 18px;
  border-bottom: 1px solid #dde8ec;
  background: linear-gradient(135deg, #ffffff 0%, #f1f8f5 100%);
}

.mission-copy {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 8px;
}

.mission-copy h2 {
  font-size: 28px;
  color: #18362f;
}

.mission-copy > p:last-child {
  max-width: 720px;
  color: #5d6d7c;
  line-height: 1.65;
}

.mission-card img {
  width: 100%;
  height: 96px;
  align-self: center;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #d8e5e8;
}

.context-line,
.chat-kicker {
  min-height: 18px;
  color: #2d7a6e;
  font-size: 12px;
  font-weight: 900;
}

.chat-head {
  padding: 12px 18px;
  background: #ffffff;
}

.chat-head h2 {
  font-size: 18px;
}

.chat-messages {
  padding: 18px;
  background: #f8fbfa;
}

.message {
  max-width: 84%;
}

.avatar,
.assistant .avatar {
  border-radius: 6px;
  background: #2d7a6e;
  box-shadow: none;
}

.message.user .avatar {
  background: #2d68b1;
}

.bubble {
  border-radius: 8px;
  box-shadow: none;
}

.suggestion-list {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 6px 18px;
  border-top: 1px solid #dde8ec;
  border-bottom: 0;
  background: #ffffff;
}

.suggestion-list::before {
  content: "可以问";
  flex: 0 0 auto;
  color: #6a7b88;
  font-size: 12px;
  font-weight: 800;
}

.suggestion-chip {
  min-height: 26px;
  padding: 0 8px;
  border-radius: 6px;
  color: #2d7a6e;
  border-color: rgba(45, 122, 110, 0.16);
  background: rgba(244, 250, 247, 0.7);
  font-size: 12px;
  font-weight: 700;
  box-shadow: none;
}

.composer {
  grid-template-columns: minmax(0, 1fr) 88px;
  min-height: 84px;
  padding: 12px 18px;
  background: #ffffff;
}

.composer textarea,
.profile-box input {
  border-radius: 6px;
}

.send-button {
  border-radius: 6px;
  background: #2d7a6e;
  border-color: #2d7a6e;
  box-shadow: none;
}

.growth-panel {
  padding: 14px;
  overflow: auto;
}

.growth-score,
.analytics-grid div,
.practice-item,
.path-list li,
.picker-track-card {
  border-radius: 8px;
  box-shadow: none;
}

.growth-score {
  background: #fff8df;
}

.activity-dock {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #dde8ec;
}

.activity-dock .panel-heading {
  margin-bottom: 10px;
}

.tool-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0;
  overflow: visible;
}

.tool-chip {
  min-height: 38px;
  border-radius: 6px;
  white-space: normal;
  color: #2d7a6e;
  background: #f4faf7;
  box-shadow: none;
}

.report-actions {
  grid-template-columns: 1fr;
}

.secondary-button,
.primary-button,
.mini-button {
  border-radius: 6px;
  box-shadow: none;
}

.primary-button {
  background: #ff9500;
  border-color: #ff9500;
}

/* 进一步收敛左右栏，把非主体功能改成抽屉 */
.workspace {
  grid-template-columns: 220px minmax(760px, 1fr) 260px;
}

.companion-panel {
  grid-template-rows: auto auto auto;
  align-content: start;
}

.agent-card {
  grid-template-columns: 48px minmax(0, 1fr);
  min-height: 112px;
  padding: 14px;
}

.agent-avatar-large {
  width: 48px;
  height: 48px;
}

.agent-card h2 {
  font-size: 18px;
}

.agent-tags span {
  min-height: 24px;
  padding: 0 8px;
}

.track-panel,
.route-panel,
.growth-panel {
  padding: 12px;
}

.track-thumb {
  aspect-ratio: 4 / 3;
}

.track-launch small {
  min-height: auto;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.route-panel {
  overflow: hidden;
}

.route-panel summary,
.side-section summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  list-style: none;
  cursor: pointer;
}

.route-panel summary::-webkit-details-marker,
.side-section summary::-webkit-details-marker {
  display: none;
}

.route-panel summary::after,
.side-section summary::after {
  content: "打开";
  margin-left: auto;
  color: #72828f;
  font-size: 12px;
  font-weight: 800;
}

.route-panel[open] summary::after,
.side-section[open] summary::after {
  content: "收起";
}

.route-panel .stage-list {
  margin-top: 8px;
}

.chat-panel {
  grid-template-rows: 118px 50px minmax(0, 1fr) 50px 78px;
}

.mission-card {
  min-height: 118px;
  grid-template-columns: minmax(0, 1fr) 210px;
  padding: 16px 18px;
}

.mission-copy h2 {
  font-size: 26px;
}

.mission-card img {
  height: 82px;
}

.growth-panel {
  gap: 10px;
}

.growth-panel > #reportArea {
  min-height: 0;
}

.growth-score {
  padding: 10px;
}

.growth-score span {
  width: 48px;
  height: 48px;
  font-size: 24px;
}

.growth-score strong {
  font-size: 16px;
}

.profile-section .profile-box {
  margin-top: 8px;
  margin-bottom: 8px;
}

.side-section {
  margin-top: 10px;
}

.activity-dock {
  padding-top: 0;
}

.activity-dock .tool-list {
  margin-top: 8px;
}

.tool-list {
  grid-template-columns: 1fr;
}

.tool-chip {
  min-height: 34px;
}

.analytics-grid {
  grid-template-columns: 1fr;
}

.analytics-grid div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
}

.analytics-grid span {
  font-size: 18px;
}

.report-actions {
  gap: 8px;
}

.report-actions .secondary-button,
.report-actions .primary-button {
  min-height: 36px;
}

.vocal-analysis {
  display: grid;
  gap: 12px;
}

.analysis-hero {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(28, 66, 52, 0.12);
  box-shadow: 0 12px 24px rgba(32, 47, 64, 0.14);
}

.vocal-upload {
  border: 1px dashed rgba(45, 91, 72, 0.35);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.72);
  display: grid;
  gap: 8px;
}

.vocal-upload span {
  font-weight: 700;
  color: var(--ink);
}

.analysis-status,
.tool-note,
.tool-error {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}

.tool-error {
  color: #a23b28;
}

.analysis-result {
  display: grid;
  gap: 12px;
}

.analysis-loading {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(28, 66, 52, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.analysis-loading strong {
  display: block;
  color: var(--ink);
  margin-bottom: 3px;
}

.analysis-loading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.analysis-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(45, 91, 72, 0.18);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.analysis-wave {
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 38px;
  height: 28px;
}

.analysis-wave span {
  width: 4px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  animation: wavePulse 0.9s ease-in-out infinite;
}

.analysis-wave span:nth-child(2) {
  animation-delay: 0.1s;
}

.analysis-wave span:nth-child(3) {
  animation-delay: 0.2s;
}

.analysis-wave span:nth-child(4) {
  animation-delay: 0.3s;
}

.analysis-wave span:nth-child(5) {
  animation-delay: 0.4s;
}

.analysis-score-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.score-card {
  background: #ffffff;
  border: 1px solid rgba(28, 66, 52, 0.12);
  border-radius: 8px;
  padding: 10px 8px;
  text-align: center;
}

.score-card span {
  display: block;
  font-size: 24px;
  font-weight: 800;
  color: var(--accent);
}

.score-card p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.analysis-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.analysis-metrics span {
  border: 1px solid rgba(28, 66, 52, 0.12);
  background: rgba(250, 248, 242, 0.8);
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 12px;
  color: var(--muted);
}

.analysis-copy {
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(28, 66, 52, 0.1);
  border-radius: 8px;
  padding: 10px 12px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes wavePulse {
  0%,
  100% {
    height: 8px;
    opacity: 0.55;
  }

  50% {
    height: 24px;
    opacity: 1;
  }
}

.site-filing {
  position: fixed;
  right: 12px;
  bottom: 5px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 22px;
  padding: 3px 8px;
  border: 1px solid rgba(196, 210, 220, 0.78);
  border-radius: 6px;
  color: #657683;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 3px 12px rgba(32, 47, 64, 0.08);
  backdrop-filter: blur(8px);
  font-size: 10px;
}

.site-filing a {
  color: #47687a;
  text-decoration: none;
}

.site-filing a:hover {
  color: #1d7569;
  text-decoration: underline;
}

@media (max-width: 900px) {
  html,
  body {
    width: 100%;
    height: auto;
    min-width: 0;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .app-shell {
    display: block;
    width: 100%;
    height: auto;
    min-height: 100vh;
    padding: 8px;
  }

  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px 8px;
    min-height: 0;
    padding: 10px;
  }

  .brand {
    min-width: 0;
    gap: 9px;
  }

  .brand-avatar {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .brand h1 {
    overflow: hidden;
    font-size: 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .kicker {
    overflow: hidden;
    max-width: 190px;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar-status {
    min-width: 0;
    gap: 5px;
    font-size: 11px;
  }

  .topbar-status strong {
    min-height: 26px;
    padding: 0 8px;
  }

  .mode-tabs {
    grid-column: 1 / -1;
    width: 100%;
    max-width: none;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .mode-tabs::-webkit-scrollbar {
    display: none;
  }

  .mode-tab {
    flex: 1 0 auto;
    min-width: 92px;
    min-height: 36px;
    padding: 0 10px;
    font-size: 13px;
  }

  .workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    width: 100%;
    margin-top: 8px;
  }

  .companion-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .agent-card {
    grid-template-columns: 44px minmax(0, 1fr);
    min-height: 0;
    padding: 12px;
  }

  .agent-avatar-large {
    width: 44px;
    height: 44px;
  }

  .agent-card h2 {
    font-size: 17px;
  }

  .agent-tags {
    gap: 6px;
  }

  .track-panel,
  .route-panel,
  .growth-panel {
    padding: 11px;
    overflow: visible;
  }

  .track-launch {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    align-items: center;
  }

  .track-thumb {
    grid-row: 1 / span 3;
    width: 96px;
    aspect-ratio: 4 / 3;
  }

  .play-track {
    grid-column: 1 / -1;
  }

  .chat-panel {
    display: grid;
    grid-template-rows: auto auto minmax(360px, 1fr) auto auto;
    min-height: 720px;
  }

  .mission-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    min-height: 0;
    padding: 14px;
  }

  .mission-copy h2 {
    font-size: 22px;
  }

  .mission-copy > p:last-child {
    font-size: 13px;
    line-height: 1.55;
  }

  .mission-card img {
    height: 92px;
  }

  .chat-head,
  .chat-messages,
  .suggestion-list,
  .composer {
    padding-right: 12px;
    padding-left: 12px;
  }

  .chat-messages {
    min-height: 360px;
  }

  .message {
    max-width: 100%;
  }

  .bubble {
    min-width: 0;
    font-size: 14px;
    line-height: 1.6;
  }

  .suggestion-list {
    flex-wrap: wrap;
    align-content: center;
    min-height: 52px;
  }

  .composer {
    grid-template-columns: minmax(0, 1fr) 72px;
    min-height: 78px;
    gap: 8px;
  }

  .send-button {
    padding: 0 8px;
  }

  .growth-panel {
    max-height: none;
  }

  .profile-box,
  .tool-list {
    grid-template-columns: 1fr 1fr;
  }

  .analytics-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .track-picker-grid,
  .analysis-score-row,
  .report-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .dialog-card {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    margin: 10px;
  }

  .compare-table {
    min-width: 680px;
  }

  .site-filing {
    position: static;
    display: grid;
    justify-items: center;
    gap: 4px;
    margin: 0 6px 8px;
    padding: 9px 8px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .app-shell {
    padding: 6px;
  }

  .topbar {
    padding: 9px;
  }

  .brand h1 {
    font-size: 17px;
  }

  .topbar-status > span {
    display: none;
  }

  .profile-box,
  .tool-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .analytics-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .track-launch {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .track-thumb {
    width: 82px;
  }

  .mission-card img {
    height: 78px;
  }
}

@media print {
  body {
    background: #ffffff;
  }

  .topbar,
  .track-panel,
  .chat-panel,
  .report-actions {
    display: none !important;
  }

  .sync-status,
  .analytics-box {
    display: none !important;
  }

  .app-shell,
  .workspace,
  .growth-panel {
    display: block;
    padding: 0;
    margin: 0;
    box-shadow: none;
    border: 0;
  }

  #reportArea {
    padding: 16px;
  }
}
