:root {
  --bg: #f3f1ea;
  --ink: #191a17;
  --muted: #686a61;
  --line: #d8d2c3;
  --panel: #fffdf6;
  --panel-strong: #11120f;
  --accent: #0f7c6d;
  --accent-dark: #08564d;
  --warn: #b46a18;
  --shadow: 0 24px 80px rgba(37, 33, 24, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  background:
    linear-gradient(90deg, rgba(17, 18, 15, 0.045) 1px, transparent 1px),
    linear-gradient(rgba(17, 18, 15, 0.035) 1px, transparent 1px),
    var(--bg);
  background-size: 36px 36px;
}

body.chat-body {
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 255, 255, 0.68), transparent 34%),
    radial-gradient(circle at 12% 8%, rgba(234, 86, 20, 0.045), transparent 26%),
    radial-gradient(circle at 88% 6%, rgba(127, 145, 130, 0.07), transparent 30%),
    linear-gradient(180deg, #f7f2eb 0%, #f1ece4 100%);
  font-family:
    "PingFang SC",
    "Noto Sans SC",
    "Microsoft YaHei",
    "Segoe UI",
    sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  border-radius: 6px;
  background: var(--panel-strong);
  color: #fffdf6;
  cursor: pointer;
  font-weight: 700;
  padding: 0.85rem 1.1rem;
}

button:hover {
  background: var(--accent-dark);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

button:disabled:hover {
  background: var(--panel-strong);
}

a {
  color: inherit;
}

.shell {
  width: min(1180px, calc(100vw - 28px));
  margin: 0 auto;
}

.chat-shell {
  width: min(1120px, calc(100vw - 28px));
  padding: 24px 0;
}

.workspace {
  min-height: calc(100vh - 36px);
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  border: 1px solid rgba(121, 109, 96, 0.14);
  border-radius: 8px;
  background: rgba(251, 248, 243, 0.82);
  box-shadow: 0 18px 42px rgba(76, 63, 54, 0.065);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 18px 22px 16px;
  border-bottom: 1px solid rgba(121, 109, 96, 0.12);
  background: rgba(247, 242, 235, 0.68);
}

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

.eyebrow {
  margin: 0 0 0.4rem;
  color: #6b7c6f;
  font-size: 0.78rem;
  font-weight: 700;
}

h1 {
  margin: 0;
  color: #433d38;
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  font-weight: 800;
  line-height: 1.08;
}

.session-notice {
  margin: 0;
  border-bottom: 1px solid rgba(121, 109, 96, 0.1);
  background: rgba(255, 255, 255, 0.38);
  color: #6f6861;
  font-size: 0.78rem;
  line-height: 1.45;
  padding: 0.42rem 22px 0.48rem;
}

.chat-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  overflow: auto;
}

.message {
  width: fit-content;
  max-width: min(780px, 86%);
  border: 1px solid rgba(121, 109, 96, 0.12);
  border-radius: 8px;
  padding: 0.95rem 1.05rem;
  background: rgba(255, 252, 247, 0.88);
  box-shadow: 0 10px 26px rgba(76, 63, 54, 0.045);
}

.message.assistant {
  align-self: flex-start;
}

.intro-message {
  max-width: min(820px, 92%);
}

.message.user {
  align-self: flex-end;
  max-width: min(680px, 82%);
  border-color: rgba(127, 145, 130, 0.28);
  background: rgba(235, 243, 235, 0.88);
}

.message-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.role {
  display: block;
  margin-bottom: 0.35rem;
  color: #7f9182;
  font-size: 0.78rem;
  font-weight: 700;
}

.message-head .role {
  margin-bottom: 0;
}

.message-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.icon-button {
  border: 1px solid rgba(127, 145, 130, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: #6b7c6f;
  flex: 0 0 auto;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.38rem 0.58rem;
}

.icon-button:hover,
.icon-button.copied,
.icon-button.active {
  background: #6b7c6f;
  color: #fffdf6;
}

.message.pending {
  color: var(--muted);
}

.thinking {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.thinking span {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--accent);
  animation: thinking-pulse 1s ease-in-out infinite;
}

.thinking span:nth-child(2) {
  animation-delay: 0.16s;
}

.thinking span:nth-child(3) {
  animation-delay: 0.32s;
}

.thinking p {
  margin-left: 0.25rem;
}

@keyframes thinking-pulse {
  0%,
  80%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }

  40% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

.message p {
  margin: 0;
  line-height: 1.58;
}

.message-body {
  display: grid;
  gap: 0.58rem;
  min-width: 0;
}

.message-body h2,
.message-body h3 {
  margin: 0;
  line-height: 1.25;
}

.message-body h2 {
  font-size: 1.08rem;
}

.message-body h3 {
  color: var(--accent-dark);
  font-size: 0.96rem;
}

.message-body p {
  margin: 0;
}

.message-body ul {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding-left: 1.2rem;
}

.message-body li {
  line-height: 1.5;
}

.skill-disclosure {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.2rem;
}

.skill-toggle {
  width: fit-content;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(234, 86, 20, 0.14);
  border-radius: 8px;
  background: rgba(255, 250, 245, 0.92);
  color: #c8470f;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
  font-size: 0.86rem;
  font-weight: 800;
}

.skill-toggle:hover {
  border-color: rgba(234, 86, 20, 0.22);
  background: rgba(255, 247, 240, 0.98);
  color: #c8470f;
}

.skill-shelf {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.62rem;
}

.skill-shelf[hidden] {
  display: none;
}

.skill-card-button {
  min-height: 0;
  display: grid;
  gap: 0.45rem;
  border: 1px solid rgba(121, 109, 96, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
  padding: 0.78rem 0.85rem;
  text-align: left;
  box-shadow: none;
}

.skill-card-button:hover {
  border-color: rgba(127, 145, 130, 0.24);
  background: rgba(247, 250, 245, 0.92);
  color: var(--ink);
}

.skill-name {
  color: #433d38;
  font-size: 0.94rem;
  font-weight: 800;
}

.skill-fact {
  display: grid;
  gap: 0.14rem;
  color: #6f6861;
  font-size: 0.8rem;
  line-height: 1.42;
}

.skill-fact strong {
  color: #6b7c6f;
  font-size: 0.72rem;
  line-height: 1.2;
}

.capability-note {
  color: var(--muted);
}

.message-meta {
  display: inline-block;
  margin-bottom: 0.45rem;
  border: 1px solid rgba(127, 145, 130, 0.22);
  border-radius: 999px;
  background: rgba(247, 250, 245, 0.82);
  color: #6b7c6f;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
}

.composer {
  display: grid;
  grid-template-columns: 1fr 92px;
  gap: 10px;
  padding: 14px 22px 18px;
  border-top: 1px solid rgba(121, 109, 96, 0.12);
  background: rgba(246, 241, 234, 0.84);
}

.composer textarea {
  min-height: 58px;
  max-height: 180px;
  resize: vertical;
}

.composer button {
  align-self: stretch;
  min-height: 58px;
  background: #7f9182;
  color: #fbf8f3;
}

.composer button:hover {
  background: #6b7c6f;
}

.composer button:disabled:hover {
  background: #7f9182;
}

textarea,
input {
  width: 100%;
  border: 1px solid rgba(121, 109, 96, 0.14);
  border-radius: 8px;
  background: rgba(255, 252, 247, 0.92);
  color: var(--ink);
  padding: 0.85rem 0.9rem;
  outline: none;
}

textarea:focus,
input:focus {
  border-color: rgba(127, 145, 130, 0.38);
  box-shadow: 0 0 0 3px rgba(127, 145, 130, 0.13);
}

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

.login-panel {
  width: min(440px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 28px;
}

.login-form {
  display: grid;
  gap: 0.65rem;
  margin-top: 1.5rem;
}

.login-form button {
  margin-top: 0.55rem;
}

.captcha-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
  align-items: center;
}

.captcha-image {
  min-height: 54px;
  overflow: hidden;
  border: 1px solid rgba(121, 109, 96, 0.14);
  border-radius: 8px;
  background: rgba(255, 252, 247, 0.92);
}

.captcha-image svg {
  display: block;
  width: 100%;
  height: 54px;
}

.footnote {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.alert {
  border: 1px solid rgba(180, 106, 24, 0.35);
  border-radius: 6px;
  background: #fff4e3;
  color: #7b3c04;
  padding: 0.75rem 0.85rem;
}

.alert.success {
  border-color: rgba(15, 124, 109, 0.32);
  background: #e8f5ef;
  color: #075448;
}

.admin-shell {
  padding: 34px 0;
}

.admin-body {
  font-family:
    "PingFang SC",
    "Microsoft YaHei",
    "Segoe UI",
    sans-serif;
}

.admin-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 22px;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: 18px;
  align-items: start;
}

.editor-panel,
.list-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 246, 0.92);
  box-shadow: var(--shadow);
  padding: 22px;
}

h2 {
  margin: 0 0 1rem;
  font-size: 1.35rem;
}

.skill-form {
  display: grid;
  gap: 0.7rem;
}

.skill-form.separated {
  margin-top: 1.2rem;
  border-top: 1px solid var(--line);
  padding-top: 1.2rem;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.checkbox-row input {
  width: auto;
}

.form-actions,
.card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.text-link {
  color: var(--accent-dark);
  font-family: "Courier New", monospace;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.secondary-button,
.danger-button {
  border: 1px solid var(--line);
  background: #fffefa;
  color: var(--ink);
}

.secondary-button:hover {
  background: #ece7d9;
}

.danger-button {
  color: #8b1d13;
}

.danger-button:hover {
  background: #fae5e0;
}

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

.skill-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 1rem;
}

.skill-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.skill-card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.skill-card p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.hint {
  border-left: 3px solid var(--accent);
  padding-left: 0.75rem;
}

.pill {
  border-radius: 999px;
  font-family: "Courier New", monospace;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.35rem 0.55rem;
  white-space: nowrap;
}

.pill.enabled {
  background: #dff1ea;
  color: #075448;
}

.pill.disabled {
  background: #eee7db;
  color: #6b6251;
}

.pill.invalid {
  background: #fae5e0;
  color: #8b1d13;
}

.pill-stack {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
}

.danger-text {
  color: #8b1d13;
}

.file-path {
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 0.78rem;
  word-break: break-all;
}

.empty-state {
  margin: 0;
  color: var(--muted);
}

.log-list {
  display: grid;
  gap: 14px;
}

.log-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 1rem;
}

.log-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.85rem;
}

.log-head h2 {
  margin: 0;
}

.log-block {
  margin-top: 0.85rem;
}

.log-block p {
  margin: 0.35rem 0 0;
  line-height: 1.55;
  white-space: pre-wrap;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-heading h2 {
  margin-bottom: 0;
}

.section-total {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid rgba(15, 124, 109, 0.2);
  border-radius: 999px;
  background: rgba(232, 245, 239, 0.88);
  color: #08564d;
  font-size: 0.86rem;
  font-weight: 800;
  padding: 0 0.78rem;
  white-space: nowrap;
}

.conversation-list {
  display: grid;
  gap: 16px;
}

.conversation-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 210px;
  gap: 18px;
  align-items: stretch;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(96, 110, 103, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(15, 124, 109, 0.09), transparent 26%),
    rgba(255, 253, 246, 0.98);
  color: inherit;
  padding: 0;
  text-decoration: none !important;
  box-shadow: 0 10px 28px rgba(37, 33, 24, 0.06);
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.conversation-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: #0f7c6d;
  content: "";
}

.conversation-card:hover {
  border-color: rgba(15, 124, 109, 0.48);
  box-shadow: 0 18px 42px rgba(37, 33, 24, 0.11);
  transform: translateY(-2px);
}

.conversation-card-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.48rem;
  border-right: 1px solid rgba(96, 110, 103, 0.16);
  background: rgba(244, 248, 243, 0.86);
  padding: 1rem 0.55rem;
}

.conversation-index-number {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: #11120f;
  color: #fffdf6;
  font-size: 0.9rem;
  font-weight: 900;
}

.conversation-turn-count {
  border-radius: 999px;
  background: rgba(15, 124, 109, 0.12);
  color: #08564d;
  font-size: 0.75rem;
  font-weight: 900;
  padding: 0.22rem 0.52rem;
  white-space: nowrap;
}

.conversation-card-main {
  min-width: 0;
  padding: 1.05rem 0;
}

.conversation-card-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.62rem;
}

.conversation-card-top span {
  color: #08564d;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0;
}

.conversation-card-top code {
  max-width: 100%;
  overflow: hidden;
  border-radius: 5px;
  background: rgba(17, 18, 15, 0.055);
  color: #545a53;
  font-family: "Courier New", monospace;
  font-size: 0.76rem;
  padding: 0.18rem 0.42rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-card h3 {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: #1f2420;
  font-size: 1.06rem;
  font-weight: 900;
  line-height: 1.48;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.conversation-preview {
  display: -webkit-box;
  overflow: hidden;
  margin: 0.62rem 0 0;
  color: #646960;
  font-size: 0.92rem;
  line-height: 1.62;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.conversation-card-side {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-direction: column;
  gap: 0.75rem;
  border-left: 1px solid rgba(96, 110, 103, 0.14);
  background: rgba(255, 255, 255, 0.5);
  color: #646960;
  font-size: 0.82rem;
  padding: 1.05rem 1rem;
}

.conversation-card-side time {
  display: grid;
  gap: 0.22rem;
}

.conversation-card-side time span {
  color: #7a7f75;
  font-size: 0.74rem;
  font-weight: 800;
}

.conversation-card-side time strong {
  color: #242720;
  font-size: 0.9rem;
  font-weight: 900;
  white-space: nowrap;
}

.mini-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.35rem;
}

.mini-tags span {
  border: 1px solid rgba(15, 124, 109, 0.18);
  border-radius: 999px;
  background: rgba(232, 245, 239, 0.78);
  color: #08564d;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 0.22rem 0.48rem;
}

.conversation-enter {
  margin-top: auto;
  color: #0f7c6d;
  font-size: 0.82rem;
  font-weight: 900;
}

.conversation-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.conversation-meta-bar span {
  border: 1px solid rgba(121, 109, 96, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0.62rem;
}

.conversation-thread {
  display: grid;
  gap: 16px;
}

.turn-card {
  border: 1px solid rgba(216, 210, 195, 0.92);
  border-radius: 8px;
  background: #fffdf6;
  overflow: hidden;
}

.turn-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgba(216, 210, 195, 0.86);
  background: rgba(247, 242, 235, 0.62);
  padding: 0.95rem 1rem;
}

.turn-head h2 {
  margin: 0;
  font-size: 1rem;
}

.turn-head time {
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 0.78rem;
  white-space: nowrap;
}

.turn-body {
  display: grid;
  gap: 12px;
  padding: 1rem;
}

.dialogue-pane {
  border: 1px solid rgba(121, 109, 96, 0.12);
  border-radius: 8px;
  padding: 0.9rem 1rem;
}

.user-pane {
  margin-left: clamp(0px, 8vw, 92px);
  background: rgba(235, 243, 235, 0.88);
  border-color: rgba(127, 145, 130, 0.26);
}

.assistant-pane {
  margin-right: clamp(0px, 8vw, 92px);
  background: rgba(255, 252, 247, 0.92);
}

.dialogue-label {
  margin-bottom: 0.5rem;
  color: #6b7c6f;
  font-size: 0.76rem;
  font-weight: 800;
}

.dialogue-content {
  color: #312d29;
  line-height: 1.62;
  overflow-wrap: anywhere;
}

.plain-content {
  white-space: pre-wrap;
}

.markdown-content {
  display: grid;
  gap: 0.62rem;
}

.markdown-content h2,
.markdown-content h3,
.markdown-content p,
.markdown-content ul,
.markdown-content ol,
.markdown-content blockquote,
.markdown-content pre {
  margin: 0;
}

.markdown-content h2 {
  border-bottom: 1px solid rgba(216, 210, 195, 0.82);
  color: #433d38;
  font-size: 1.08rem;
  line-height: 1.35;
  padding-bottom: 0.32rem;
}

.markdown-content h3 {
  color: var(--accent-dark);
  font-size: 0.98rem;
  line-height: 1.35;
}

.markdown-content ul,
.markdown-content ol {
  display: grid;
  gap: 0.34rem;
  padding-left: 1.25rem;
}

.markdown-content li {
  line-height: 1.55;
}

.markdown-content blockquote {
  border-left: 3px solid rgba(15, 124, 109, 0.42);
  background: rgba(232, 245, 239, 0.52);
  color: #3e5e54;
  padding: 0.62rem 0.8rem;
}

.markdown-content code {
  border: 1px solid rgba(121, 109, 96, 0.14);
  border-radius: 5px;
  background: rgba(243, 241, 234, 0.82);
  font-family: "Courier New", monospace;
  font-size: 0.88em;
  padding: 0.08rem 0.28rem;
}

.markdown-content pre {
  overflow: auto;
  border-radius: 8px;
  background: #191a17;
  color: #fffdf6;
  padding: 0.85rem;
}

.markdown-content pre code {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
}

.turn-foot {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.75rem;
  border-top: 1px solid rgba(216, 210, 195, 0.74);
  color: var(--muted);
  font-size: 0.8rem;
  padding: 0.75rem 1rem;
}

.turn-foot details {
  max-width: min(780px, 100%);
}

.turn-foot summary {
  color: var(--accent-dark);
  cursor: pointer;
  font-weight: 700;
}

.turn-foot p {
  margin: 0.4rem 0 0;
  line-height: 1.5;
  white-space: pre-wrap;
}

.full-panel {
  margin-top: 18px;
}

.detail-list {
  display: grid;
  gap: 0.5rem;
  margin: 0 0 1rem;
}

.detail-list dt {
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.detail-list dd {
  margin: 0;
  line-height: 1.45;
  word-break: break-word;
}

.file-list {
  margin: 0;
  padding-left: 1.1rem;
  font-family: "Courier New", monospace;
  font-size: 0.88rem;
  line-height: 1.7;
}

.code-preview {
  overflow: auto;
  max-height: 520px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #191a17;
  color: #fffdf6;
  font-family: "Courier New", monospace;
  font-size: 0.88rem;
  line-height: 1.55;
  margin: 0;
  padding: 1rem;
  white-space: pre-wrap;
}

@media (max-width: 680px) {
  .shell {
    width: min(100vw - 16px, 100%);
  }

  .chat-shell {
    padding: 8px 0;
  }

  .workspace {
    min-height: calc(100vh - 16px);
  }

  .topbar,
  .composer {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    padding: 14px 16px 12px;
  }

  .session-notice {
    padding-inline: 16px;
  }

  .chat-panel {
    padding: 14px 16px;
  }

  .message,
  .message.user {
    max-width: 100%;
  }

  .intro-message {
    max-width: 100%;
  }

  .composer {
    display: flex;
    flex-direction: column;
    padding: 12px 16px;
  }

  .composer button {
    min-height: 46px;
  }

  button {
    width: 100%;
  }

  .icon-button {
    width: auto;
  }

  .skill-card-button {
    width: 100%;
    max-width: 100%;
  }

  .admin-header,
  .admin-actions,
  .log-head,
  .section-heading,
  .turn-head,
  .skill-card-head,
  .form-actions,
  .card-actions {
    align-items: stretch;
    flex-direction: column;
  }

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

  .conversation-card {
    grid-template-columns: 1fr;
  }

  .conversation-card-marker {
    align-items: center;
    justify-content: flex-start;
    flex-direction: row;
    border-right: 0;
    border-bottom: 1px solid rgba(96, 110, 103, 0.16);
    padding: 0.85rem 1rem;
  }

  .conversation-card-main {
    padding: 0 1rem 0.95rem;
  }

  .conversation-card-side {
    align-items: flex-start;
    border-left: 0;
    border-top: 1px solid rgba(96, 110, 103, 0.14);
    text-align: left;
  }

  .mini-tags {
    justify-content: flex-start;
  }

  .user-pane,
  .assistant-pane {
    margin-left: 0;
    margin-right: 0;
  }
}
