:root {
  color-scheme: dark;
  --bg: #09111f;
  --panel: rgba(15, 23, 42, 0.92);
  --panel-soft: #111b31;
  --line: #26364f;
  --line-strong: #475569;
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #60a5fa;
  --accent-2: #8b5cf6;
  --good: #93c5fd;
  --warn: #fca5a5;
  --info: #cbd5e1;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top, rgba(96, 165, 250, 0.14), transparent 34%),
    radial-gradient(circle at right, rgba(139, 92, 246, 0.12), transparent 30%),
    var(--bg);
  color: var(--text);
}

body.ai-blocked {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

.page {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px;
}

.hero,
.panel,
.meta-item,
.item-card,
.cell,
.detail-card,
.trace-item {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.26);
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  padding: 24px;
  border-radius: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #bfdbfe;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 12px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(32px, 4vw, 44px);
  line-height: 1.08;
}

.hero-copy {
  max-width: 720px;
  margin: 12px 0 0;
  color: #cbd5e1;
  line-height: 1.7;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.toolbar label,
.field {
  display: grid;
  gap: 6px;
  min-width: 180px;
  color: #cbd5e1;
  font-size: 14px;
}

.field-location {
  min-width: min(320px, 100%);
}

.field-help {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.field-error {
  min-height: 16px;
  color: #fecaca;
  font-size: 12px;
  line-height: 1.35;
}

.toolbar input,
.toolbar select,
.toolbar button {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  color: var(--text);
}

.toolbar input,
.toolbar select {
  background: rgba(15, 23, 42, 0.88);
}

.location-picker {
  position: relative;
}

.location-picker input {
  width: 100%;
}

.location-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: grid;
  gap: 6px;
  max-height: 280px;
  padding: 8px;
  overflow-y: auto;
  border: 1px solid rgba(96, 165, 250, 0.3);
  border-radius: 14px;
  background: rgba(9, 17, 31, 0.98);
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.42);
  z-index: 30;
}

.location-option {
  width: 100%;
  min-height: 56px;
  padding: 10px 12px;
  border: 1px solid rgba(71, 85, 105, 0.72);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: 4px;
}

.location-option strong {
  font-size: 14px;
}

.location-option span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.location-match {
  min-height: 18px;
  color: #bfdbfe;
  font-size: 12px;
  line-height: 1.5;
}

.location-match strong {
  color: #e0f2fe;
  font-weight: 700;
}

.toolbar input.is-invalid,
.toolbar select.is-invalid {
  border-color: #f87171;
  box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.18);
}

.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}

.toolbar button {
  cursor: pointer;
  font-weight: 700;
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.toolbar button:disabled {
  cursor: wait;
  opacity: 0.62;
  transform: none;
}

.toolbar button.primary-action {
  border-color: transparent;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.toolbar button.secondary-action {
  background: rgba(15, 23, 42, 0.86);
  color: #dbeafe;
}

.ai-panel {
  display: grid;
  gap: 14px;
}

.ai-head {
  margin-bottom: 0;
}

.ai-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.ai-session,
.ai-status {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid rgba(96, 165, 250, 0.34);
  border-radius: 12px;
  background: rgba(30, 64, 175, 0.16);
  color: #bfdbfe;
  font-size: 12px;
  font-weight: 700;
}

.ai-session {
  border-color: rgba(45, 212, 191, 0.36);
  background: rgba(13, 148, 136, 0.12);
  color: #99f6e4;
  user-select: all;
}

.ai-status[data-tone="good"] {
  border-color: rgba(96, 165, 250, 0.62);
}

.ai-status[data-tone="warn"] {
  border-color: rgba(248, 113, 113, 0.72);
  color: #fecaca;
}

.ai-thread {
  display: grid;
  gap: 10px;
  min-height: 138px;
  max-height: 420px;
  overflow-y: auto;
  padding: 12px;
  border: 1px solid rgba(71, 85, 105, 0.5);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.58);
}

.ai-message {
  max-width: min(860px, 100%);
  padding: 12px 14px;
  border: 1px solid rgba(71, 85, 105, 0.62);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.82);
  color: #e2e8f0;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.ai-message.user {
  justify-self: end;
  border-color: rgba(45, 212, 191, 0.42);
  background: rgba(13, 148, 136, 0.14);
}

.ai-message.assistant {
  justify-self: start;
  border-color: rgba(96, 165, 250, 0.38);
}

.ai-message.system {
  justify-self: stretch;
  color: var(--muted);
  border-style: dashed;
}

.ai-review {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(45, 212, 191, 0.3);
  border-radius: 16px;
  background: rgba(13, 148, 136, 0.08);
}

.ai-review[hidden] {
  display: none;
}

.ai-review-head,
.ai-review-grid {
  display: grid;
  gap: 10px;
}

.ai-review-head {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

.ai-review-head span {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.ai-review-grid {
  grid-template-columns: minmax(180px, 0.35fr) minmax(0, 0.65fr);
}

.ai-review label {
  display: grid;
  gap: 6px;
  color: #cbd5e1;
  font-size: 13px;
}

.ai-review input,
.ai-review select,
.ai-review textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.88);
  color: var(--text);
  font: inherit;
}

.ai-review textarea {
  resize: vertical;
  line-height: 1.6;
}

.ai-review button {
  justify-self: start;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.86);
  color: #dbeafe;
  cursor: pointer;
  font-weight: 700;
}

.ai-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
}

.ai-composer textarea {
  width: 100%;
  min-height: 92px;
  resize: vertical;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.88);
  color: var(--text);
  line-height: 1.65;
}

.ai-composer button,
.ai-actions button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
}

.ai-composer button:disabled,
.ai-actions button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.ai-composer .primary-action {
  border-color: transparent;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.ai-actions .secondary-action {
  background: rgba(15, 23, 42, 0.86);
  color: #dbeafe;
}

.ai-busy-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(5, 11, 23, 0.86);
  backdrop-filter: blur(8px);
}

body.ai-blocked .ai-busy-overlay {
  display: flex;
}

.ai-busy-box {
  width: min(520px, 100%);
  display: grid;
  gap: 14px;
  padding: 28px;
  border: 1px solid rgba(96, 165, 250, 0.42);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  text-align: center;
}

.ai-busy-box strong {
  font-size: 24px;
}

.ai-busy-box span {
  color: var(--muted);
  line-height: 1.65;
}

.ai-busy-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(71, 85, 105, 0.52);
}

.ai-busy-bar i {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #60a5fa, #8b5cf6);
  animation: aiBusySlide 1.2s ease-in-out infinite;
}

@keyframes aiBusySlide {
  0% {
    transform: translateX(-105%);
  }

  100% {
    transform: translateX(245%);
  }
}

.ops-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.ops-card {
  min-height: 102px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.9);
}

.ops-card[data-tone="good"] {
  border-color: rgba(96, 165, 250, 0.62);
}

.ops-card[data-tone="warn"] {
  border-color: rgba(248, 113, 113, 0.72);
}

.ops-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.ops-card strong {
  display: block;
  margin-top: 7px;
  font-size: 18px;
}

.ops-card p {
  margin: 8px 0 0;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.55;
}

.section {
  margin-top: 24px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 14px;
}

.section-head h2 {
  margin: 0;
  font-size: 26px;
}

.section-head.compact h2 {
  font-size: 22px;
}

.board-head {
  align-items: flex-start;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 18px;
}

.layout-main {
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.8fr);
}

.panel {
  padding: 18px;
  border-radius: 22px;
}

.panel-wide {
  min-width: 0;
}

.palace-side {
  position: sticky;
  top: 20px;
  align-self: start;
}

.meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.meta-item {
  padding: 14px;
  border-radius: 16px;
}

.meta-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

.meta-value {
  display: block;
  font-size: 15px;
  line-height: 1.5;
}

.meta-item.error {
  border-color: #ef4444;
  background: rgba(127, 29, 29, 0.58);
  color: #fee2e2;
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.stack {
  display: grid;
  gap: 12px;
}

.topic-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.topic-tab {
  appearance: none;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(15, 23, 42, 0.86);
  color: #cbd5e1;
  cursor: pointer;
  font-weight: 700;
}

.topic-tab.is-active {
  border-color: transparent;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.98), rgba(124, 58, 237, 0.98));
  color: #fff;
}

.focus-control {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  min-width: min(420px, 100%);
}

.switch-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.86);
  color: #dbeafe;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.switch-control input {
  width: 16px;
  height: 16px;
  accent-color: #3b82f6;
}

.focus-readout {
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid rgba(96, 165, 250, 0.34);
  border-radius: 12px;
  background: rgba(30, 64, 175, 0.16);
}

.focus-readout span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.focus-readout strong {
  display: block;
  margin-top: 2px;
  color: #e0f2fe;
  font-size: 13px;
  line-height: 1.35;
}

.item-card,
.detail-card,
.cell,
.trace-item {
  border-radius: 18px;
}

.item-card,
.detail-card {
  padding: 16px;
}

.item-card {
  display: grid;
  gap: 12px;
}

.item-card.good {
  border-color: rgba(96, 165, 250, 0.72);
}

.item-card.warn {
  border-color: rgba(248, 113, 113, 0.72);
}

.item-card.info {
  border-color: rgba(148, 163, 184, 0.56);
}

.item-card.is-clickable {
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.item-card.is-clickable:hover,
.cell:hover,
.topic-tab:hover,
.toolbar button:hover,
.location-option:hover {
  transform: translateY(-1px);
}

.item-card.is-active {
  box-shadow: 0 0 0 2px rgba(248, 250, 252, 0.2);
}

.item-head,
.detail-header,
.cell-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.item-title,
.detail-header h3 {
  margin: 0;
  font-size: 18px;
}

.item-conclusion,
.detail-summary,
.detail-conclusion {
  margin: 0;
  line-height: 1.7;
  color: #e2e8f0;
}

.basis-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: #cbd5e1;
  line-height: 1.65;
}

.ref-list,
.tags,
.cell-stems {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ref-chip,
.tag,
.level-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.ref-chip,
.tag {
  padding: 4px 10px;
  border: 1px solid #334155;
}

.ref-chip {
  background: rgba(15, 23, 42, 0.78);
  color: #c4b5fd;
}

.ref-chip.palace {
  color: #93c5fd;
}

.level-badge {
  padding: 4px 10px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.level-badge.good {
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(96, 165, 250, 0.34);
  color: var(--good);
}

.level-badge.warn {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(248, 113, 113, 0.34);
  color: var(--warn);
}

.level-badge.info {
  background: rgba(148, 163, 184, 0.14);
  border-color: rgba(148, 163, 184, 0.34);
  color: var(--info);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.cell {
  appearance: none;
  width: 100%;
  padding: 16px;
  text-align: left;
  color: var(--text);
  cursor: pointer;
  display: grid;
  gap: 10px;
  align-content: start;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.cell.is-duty {
  border-color: rgba(250, 204, 21, 0.42);
}

.cell.is-focus {
  box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.4);
}

.cell.is-use-god {
  border-color: rgba(45, 212, 191, 0.48);
}

.cell.is-selected {
  border-color: rgba(248, 250, 252, 0.82);
  box-shadow: 0 0 0 2px rgba(248, 250, 252, 0.15), inset 0 0 0 1px rgba(96, 165, 250, 0.28);
}

.cell-name {
  font-size: 18px;
}

.cell-meta {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.cell-lines {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.cell-markers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.marker {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid rgba(71, 85, 105, 0.74);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.74);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 800;
}

.marker.target {
  border-color: rgba(96, 165, 250, 0.62);
  background: rgba(37, 99, 235, 0.18);
  color: #bfdbfe;
}

.marker.use-god {
  border-color: rgba(45, 212, 191, 0.5);
  background: rgba(13, 148, 136, 0.16);
  color: #99f6e4;
}

.marker.duty {
  border-color: rgba(250, 204, 21, 0.48);
  background: rgba(113, 63, 18, 0.25);
  color: #fde68a;
}

.marker.focus {
  border-color: rgba(168, 85, 247, 0.48);
  background: rgba(88, 28, 135, 0.18);
  color: #ddd6fe;
}

.marker.empty {
  border-color: rgba(248, 113, 113, 0.44);
  background: rgba(127, 29, 29, 0.22);
  color: #fecaca;
}

.marker.move {
  border-color: rgba(34, 197, 94, 0.42);
  background: rgba(20, 83, 45, 0.22);
  color: #86efac;
}

.marker.risk {
  border-color: rgba(248, 113, 113, 0.52);
  background: rgba(127, 29, 29, 0.25);
  color: #fecaca;
}

.marker.combine {
  border-color: rgba(52, 211, 153, 0.46);
  background: rgba(6, 78, 59, 0.22);
  color: #a7f3d0;
}

.marker.tomb {
  border-color: rgba(251, 191, 36, 0.48);
  background: rgba(120, 53, 15, 0.22);
  color: #fde68a;
}

.cell-target {
  padding: 9px 10px;
  border: 1px solid rgba(45, 212, 191, 0.28);
  border-radius: 12px;
  background: rgba(15, 118, 110, 0.13);
}

.cell-target span {
  display: block;
  color: #99f6e4;
  font-size: 11px;
  font-weight: 800;
}

.cell-target strong {
  display: block;
  margin-top: 3px;
  color: #ecfeff;
  font-size: 13px;
  line-height: 1.35;
}

.cell-line,
.detail-box {
  padding: 10px 12px;
  border: 1px solid rgba(71, 85, 105, 0.4);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.78);
}

.cell-line span,
.detail-box span,
.detail-kicker,
.trace-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.cell-line strong,
.detail-box strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
}

.cell-quick {
  display: grid;
  gap: 4px;
  padding-top: 2px;
}

.cell-quick p,
.cell-quick span {
  margin: 0;
  color: #dbeafe;
  font-size: 12px;
  line-height: 1.55;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.cell-quick span {
  color: var(--muted);
  -webkit-line-clamp: 1;
}

.cell-quick .cell-factor {
  color: #fef3c7;
}

.cell-stems {
  color: #cbd5e1;
  font-size: 13px;
}

.tag-duty {
  color: #fde68a;
  border-color: rgba(250, 204, 21, 0.38);
  background: rgba(113, 63, 18, 0.28);
}

.tag-empty {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.38);
  background: rgba(127, 29, 29, 0.28);
}

.tag-move {
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.38);
  background: rgba(20, 83, 45, 0.28);
}

.tag-normal {
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.78);
}

.detail-card {
  display: grid;
  gap: 14px;
}

.detail-kicker {
  margin-bottom: 8px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.detail-section {
  display: grid;
  gap: 10px;
}

.detail-section h4 {
  margin: 0;
  font-size: 14px;
  color: #bfdbfe;
}

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

.correction-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(71, 85, 105, 0.42);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.7);
}

.correction-row span {
  color: #fcd34d;
  font-size: 12px;
  font-weight: 800;
}

.correction-row strong {
  color: #e2e8f0;
  font-size: 13px;
  line-height: 1.6;
}

.trace-list {
  display: grid;
  gap: 10px;
}

.trace-item {
  padding: 12px 14px;
}

.trace-label {
  margin-bottom: 6px;
  color: #93c5fd;
  font-weight: 700;
}

.trace-value {
  color: #e2e8f0;
  line-height: 1.7;
  word-break: break-word;
}

.trace-detail {
  display: grid;
  gap: 12px;
}

.trace-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 12px;
}

.trace-columns h4 {
  margin: 0 0 8px;
  color: #bfdbfe;
  font-size: 14px;
}

.placeholder {
  padding: 18px;
  border: 1px dashed rgba(71, 85, 105, 0.7);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.62);
  color: var(--muted);
  line-height: 1.7;
}

.placeholder.small {
  padding: 12px;
}

@media (max-width: 1180px) {
  .two-col,
  .layout-main,
  .ops-grid {
    grid-template-columns: 1fr;
  }

  .palace-side {
    position: static;
  }
}

@media (max-width: 820px) {
  .page {
    padding: 16px;
  }

  .hero {
    padding: 18px;
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar,
  .toolbar label,
  .toolbar-actions,
  .ai-actions,
  .ai-review-grid,
  .ai-review-head {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .toolbar button,
  .ai-actions button,
  .ai-composer button {
    width: 100%;
  }

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

  .grid,
  .panel-grid,
  .detail-grid,
  .trace-columns {
    grid-template-columns: 1fr;
  }

  .focus-control {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .cell-lines {
    grid-template-columns: 1fr;
  }
}
