:root {
  --ink: #111111;
  --soft-ink: #34383c;
  --muted: #777c83;
  --line: #d9d6ce;
  --paper: #f5f2eb;
  --panel: #ffffff;
  --charcoal: #1f2326;
  --red: #a7302d;
  --gold: #b39159;
  --blue: #315b74;
  --green: #596d57;
  --shadow: 0 18px 50px rgba(17, 17, 17, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.access-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(rgba(17, 19, 21, 0.82), rgba(17, 19, 21, 0.9)),
    url("./assets/contact_sheet.png") center / cover;
}

.access-screen.is-unlocked {
  display: none;
}

.access-card {
  width: min(460px, 100%);
  border: 1px solid rgba(246, 242, 234, 0.2);
  border-radius: 8px;
  padding: 30px;
  background: rgba(17, 19, 21, 0.92);
  color: #f6f2ea;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

.brand-mark.large {
  width: 58px;
  height: 58px;
  margin-bottom: 18px;
}

.access-card h2 {
  margin-bottom: 12px;
  font-size: 28px;
}

.access-copy {
  color: rgba(246, 242, 234, 0.68);
  line-height: 1.7;
}

.access-btn {
  width: 100%;
  margin-top: 14px;
}

.access-error {
  min-height: 20px;
  margin: 10px 0 0;
  color: #e7b0aa;
  font-size: 13px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 430px) 1fr;
}

.control-panel {
  min-height: 100vh;
  padding: 28px;
  background: #111315;
  color: #f6f2ea;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.brand-block {
  display: flex;
  gap: 14px;
  align-items: center;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(246, 242, 234, 0.45);
  display: grid;
  place-items: center;
  color: var(--gold);
  font-size: 13px;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: 22px;
  font-weight: 600;
}

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

.step {
  min-height: 52px;
  border: 1px solid rgba(246, 242, 234, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: #eee8df;
  text-align: left;
  padding: 9px 10px;
  border-radius: 6px;
}

.step span {
  display: block;
  color: var(--gold);
  font-size: 11px;
  margin-bottom: 4px;
}

.step.is-active {
  border-color: var(--gold);
  background: rgba(179, 145, 89, 0.16);
}

.project-tools {
  border: 1px solid rgba(246, 242, 234, 0.14);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.project-tools strong {
  display: block;
  color: #f6f2ea;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.small-action {
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

.full-action {
  width: 100%;
  margin-top: 14px;
}

.backend-note {
  margin: 10px 0 0;
  color: rgba(246, 242, 234, 0.62);
  font-size: 12px;
  line-height: 1.6;
}

.file-input {
  width: 100%;
  margin-top: 12px;
  color: rgba(246, 242, 234, 0.78);
  font-size: 12px;
}

.upload-box > .file-input,
.compact-upload > .file-input {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.generated-image {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #111315;
}

.generated-image img {
  display: block;
  width: 100%;
  height: auto;
}

.poster-preview {
  position: relative;
  aspect-ratio: 3 / 4;
  min-height: 430px;
}

.poster-preview img {
  height: 100%;
  object-fit: cover;
  opacity: 0.78;
}

.final-poster-result img {
  height: 100%;
  object-fit: cover;
}

.poster-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 19, 21, 0.08), rgba(17, 19, 21, 0.72));
}

.poster-preview-copy {
  position: absolute;
  z-index: 1;
  left: 34px;
  right: 34px;
  bottom: 34px;
  color: #f8f1e7;
}

.poster-preview-copy span,
.poster-preview-copy em {
  display: block;
  color: #d8c39b;
  font-style: normal;
  line-height: 1.5;
}

.poster-preview-copy strong {
  display: block;
  margin: 10px 0;
  font-family: "Songti SC", STSong, serif;
  font-size: clamp(34px, 5vw, 62px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: 0;
}

.project-drawer {
  border: 1px solid rgba(246, 242, 234, 0.14);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
}

.project-drawer summary {
  color: rgba(246, 242, 234, 0.82);
  cursor: pointer;
  font-size: 13px;
}

.project-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.project-item {
  border: 1px solid rgba(246, 242, 234, 0.14);
  border-radius: 6px;
  padding: 9px;
  background: rgba(255, 255, 255, 0.05);
  color: #f6f2ea;
  text-align: left;
}

.project-item strong,
.project-item span {
  display: block;
}

.project-item span {
  margin-top: 3px;
  color: rgba(246, 242, 234, 0.56);
  font-size: 12px;
}

.panel-section {
  display: block;
}

.is-hidden {
  display: none;
}

.field-grid,
.diagnosis-grid {
  display: grid;
  gap: 12px;
}

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

.deep-questionnaire {
  border: 1px solid rgba(179, 145, 89, 0.32);
  border-radius: 8px;
  padding: 12px;
  background: rgba(179, 145, 89, 0.08);
}

.deep-questionnaire summary {
  cursor: pointer;
  color: #f6f2ea;
}

.deep-questionnaire summary strong,
.deep-questionnaire summary span {
  display: block;
}

.deep-questionnaire summary strong {
  color: var(--gold);
  margin-bottom: 5px;
}

.deep-questionnaire summary span {
  color: rgba(246, 242, 234, 0.62);
  font-size: 12px;
  line-height: 1.5;
}

.nested-grid {
  margin-top: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: rgba(246, 242, 234, 0.78);
  font-size: 13px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 43px;
  border: 1px solid rgba(246, 242, 234, 0.18);
  background: rgba(255, 255, 255, 0.07);
  color: #fffaf0;
  border-radius: 6px;
  padding: 10px 12px;
  outline: none;
}

select option {
  color: #111;
}

textarea {
  min-height: 88px;
  resize: vertical;
}

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

.script-card {
  border: 1px solid rgba(246, 242, 234, 0.16);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.script-card.is-selected {
  border-color: var(--gold);
  background: rgba(179, 145, 89, 0.13);
}

.script-index {
  display: inline-grid;
  place-items: center;
  min-width: 58px;
  min-height: 26px;
  margin-bottom: 10px;
  border-radius: 4px;
  background: var(--gold);
  color: #111315;
  font-size: 13px;
  font-weight: 700;
}

.script-card h3 {
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 15px;
}

.script-card p {
  margin-bottom: 8px;
  color: rgba(246, 242, 234, 0.72);
  font-size: 13px;
  line-height: 1.55;
}

.upload-box {
  min-height: 210px;
  border: 1px dashed rgba(246, 242, 234, 0.32);
  border-radius: 8px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  position: relative;
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(179, 145, 89, 0.18);
  touch-action: manipulation;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.upload-box.is-complete {
  border-style: solid;
  border-color: rgba(179, 145, 89, 0.76);
  background: rgba(179, 145, 89, 0.08);
}

.upload-symbol {
  width: 48px;
  height: 48px;
  border: 1px solid var(--gold);
  display: grid;
  place-items: center;
  margin-bottom: 10px;
  color: var(--gold);
  font-size: 28px;
}

.upload-box span,
.photo-rules span,
.module-note span {
  color: rgba(246, 242, 234, 0.62);
  font-size: 12px;
}

.upload-complete {
  display: none;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 14px;
  border: 1px solid rgba(179, 145, 89, 0.42);
  border-radius: 8px;
  padding: 10px;
  background: rgba(17, 19, 21, 0.72);
  text-align: left;
}

.upload-box.is-complete .upload-complete {
  display: flex;
}

.upload-complete img {
  width: 54px;
  height: 72px;
  border-radius: 6px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
}

.upload-complete b {
  display: block;
  color: var(--gold);
  font-size: 14px;
}

.upload-complete b::before {
  content: "✓";
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--gold);
  color: #111315;
  font-size: 12px;
}

.upload-complete small {
  display: block;
  max-width: 210px;
  margin-top: 3px;
  overflow: hidden;
  color: rgba(246, 242, 234, 0.68);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-rules,
.adjust-grid,
.poster-options,
.reference-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip,
.poster-option,
.reference-upload {
  min-height: 38px;
  border: 1px solid rgba(246, 242, 234, 0.18);
  border-radius: 999px;
  color: #f6f2ea;
  background: rgba(255, 255, 255, 0.05);
  padding: 8px 13px;
}

.chip.is-selected,
.poster-option.is-selected {
  border-color: var(--gold);
  background: rgba(179, 145, 89, 0.16);
}

.module-note {
  border: 1px solid rgba(179, 145, 89, 0.32);
  border-radius: 8px;
  padding: 14px;
  background: rgba(179, 145, 89, 0.08);
}

.module-note strong {
  display: block;
  margin-bottom: 6px;
  color: var(--gold);
}

.retouch-panel {
  border: 1px solid rgba(179, 145, 89, 0.32);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  margin-bottom: 14px;
  overflow: hidden;
}

.retouch-panel summary {
  min-height: 48px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  color: #f6f2ea;
  list-style: none;
}

.retouch-panel summary::-webkit-details-marker {
  display: none;
}

.retouch-panel summary span {
  color: var(--gold);
  font-weight: 700;
}

.retouch-panel summary small {
  color: rgba(246, 242, 234, 0.58);
}

.retouch-body {
  padding: 0 14px 14px;
}

.reference-grid {
  margin-top: 14px;
}

.reference-upload {
  border-radius: 6px;
  text-align: left;
  cursor: pointer;
}

.reference-upload span {
  color: var(--gold);
  margin-right: 6px;
}

.reference-input {
  display: none;
}

.avatar-preview {
  margin-top: 12px;
  border: 1px solid rgba(246, 242, 234, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  aspect-ratio: 3 / 4;
  display: grid;
  place-items: center;
  color: rgba(246, 242, 234, 0.64);
  overflow: hidden;
}

.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-preview.is-empty {
  min-height: 180px;
  padding: 18px;
  text-align: center;
}

.compact-upload {
  min-height: 132px;
  margin-top: 4px;
  cursor: pointer;
}

.hero-result {
  margin-top: 0;
  margin-bottom: 16px;
}

.actions {
  margin-top: 0;
  position: sticky;
  bottom: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 10px;
  padding-top: 12px;
  background: linear-gradient(rgba(17, 19, 21, 0), #111315 18%);
}

.primary,
.secondary {
  min-height: 46px;
  border-radius: 6px;
  padding: 0 16px;
}

.primary {
  border: 0;
  background: var(--gold);
  color: #111315;
  font-weight: 600;
}

.secondary {
  border: 1px solid rgba(246, 242, 234, 0.2);
  background: transparent;
  color: #f6f2ea;
}

.preview-panel {
  padding: 30px;
  min-width: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 22px;
}

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

.light-action {
  min-height: 38px;
  border-color: var(--line);
  color: var(--soft-ink);
}

.topbar h2 {
  margin-bottom: 0;
  font-size: 26px;
}

.status-pill {
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--soft-ink);
  background: #fffaf2;
  white-space: nowrap;
}

.stage {
  display: grid;
  grid-template-columns: minmax(330px, 0.95fr) minmax(360px, 1.05fr);
  gap: 18px;
  align-items: start;
}

.hero-preview,
.output-board,
.case-strip {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.portrait-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--charcoal);
}

.portrait-frame.format-16-9 {
  aspect-ratio: 16 / 9;
}

.portrait-frame.format-1-1 {
  aspect-ratio: 1 / 1;
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.portrait-frame.is-reference::after {
  content: "对标效果展示";
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  padding: 10px 16px;
  border: 1px solid rgba(247, 241, 232, 0.3);
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.68);
  color: #f7f1e8;
  font-size: 15px;
  letter-spacing: 0;
  white-space: nowrap;
}

.image-badge {
  position: absolute;
  left: 16px;
  bottom: 16px;
  background: rgba(17, 17, 17, 0.72);
  color: #f7f1e8;
  border: 1px solid rgba(247, 241, 232, 0.18);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
}

.diagnosis-card {
  padding: 18px;
}

.diagnosis-card h3 {
  font-size: 22px;
  margin-bottom: 10px;
}

.diagnosis-card p {
  color: var(--soft-ink);
  line-height: 1.65;
}

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

.score-grid div {
  min-height: 72px;
  background: #f6f2eb;
  border: 1px solid #e8e2d8;
  border-radius: 6px;
  padding: 9px;
}

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

.score-grid strong {
  display: block;
  margin-top: 7px;
  font-size: 24px;
}

.output-board {
  min-height: 430px;
}

.board-head,
.strip-head {
  padding: 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.board-head h3,
.strip-head h3 {
  margin: 0;
}

.board-head span,
.strip-head span {
  color: var(--muted);
  font-size: 13px;
}

.board-content {
  padding: 18px;
  display: grid;
  gap: 12px;
}

.decision-panel {
  border-top: 1px solid var(--line);
  padding: 14px 18px 18px;
  background: #fbf8f1;
}

.decision-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.decision-btn {
  min-height: 42px;
  border-radius: 6px;
  padding: 8px 10px;
  border: 1px solid #d8cdbb;
  background: #fffdf8;
  color: var(--soft-ink);
  font-size: 13px;
  line-height: 1.35;
}

.decision-btn.confirm {
  border-color: rgba(89, 109, 87, 0.45);
  color: var(--green);
}

.decision-btn.reject {
  border-color: rgba(167, 48, 45, 0.38);
  color: var(--red);
}

.decision-btn.expert {
  border-color: rgba(179, 145, 89, 0.56);
  color: #7b5b27;
  font-weight: 600;
}

.decision-btn:hover {
  background: #f5efe2;
}

#decisionStatus {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.insight-row {
  border-left: 3px solid var(--gold);
  padding: 10px 12px;
  background: #fbf8f1;
}

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

.insight-row span {
  color: var(--soft-ink);
  line-height: 1.6;
}

.script-edit-row {
  display: grid;
  gap: 8px;
  border-left: 3px solid var(--gold);
  padding: 10px 12px;
  background: #fbf8f1;
}

.script-edit-row strong {
  color: var(--ink);
}

.script-edit-row textarea {
  width: 100%;
  min-height: 86px;
  resize: vertical;
  border: 1px solid #e0d9cd;
  border-radius: 6px;
  padding: 10px;
  color: var(--soft-ink);
  background: #fffdf8;
  line-height: 1.6;
}

.loading-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
}

.loading-inline i {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(179, 145, 89, 0.26);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.86s linear infinite;
}

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

.topic-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.topic-item {
  min-height: 46px;
  border: 1px solid #e8e2d8;
  border-radius: 6px;
  padding: 9px 10px;
  background: #fffaf2;
  color: var(--soft-ink);
  font-size: 13px;
  line-height: 1.45;
}

.topic-item strong {
  color: var(--gold);
  margin-right: 4px;
}

.script-output {
  display: grid;
  gap: 10px;
}

.generated-script {
  border: 1px solid #e8e2d8;
  border-radius: 8px;
  padding: 12px;
  background: #fffaf2;
}

.generated-script strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
}

.generated-script p {
  margin-bottom: 6px;
  color: var(--soft-ink);
  font-size: 13px;
  line-height: 1.65;
}

.prompt-box {
  border: 1px solid #e8e2d8;
  border-radius: 8px;
  background: #111315;
  color: #f6f2ea;
  overflow: auto;
}

.prompt-box pre {
  margin: 0;
  padding: 14px;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.65;
}

.case-strip {
  grid-column: 1 / -1;
}

.match-note {
  margin: 14px 14px 0;
  border: 1px solid #e8e2d8;
  border-left: 3px solid var(--gold);
  border-radius: 6px;
  padding: 10px 12px;
  background: #fbf8f1;
  color: var(--soft-ink);
  font-size: 13px;
  line-height: 1.55;
}

.match-note.persona {
  border-left-color: var(--blue);
}

.match-note.fallback {
  border-left-color: var(--red);
}

.case-grid {
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.case-thumb {
  border: 1px solid var(--line);
  background: #faf7ef;
  border-radius: 8px;
  overflow: hidden;
  text-align: left;
}

.case-thumb.is-active {
  outline: 2px solid var(--gold);
}

.case-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.case-thumb-image {
  position: relative;
  aspect-ratio: 4 / 3;
}

.case-thumb-image em {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.62);
  color: #f7f1e8;
  font-style: normal;
  font-size: 11px;
  white-space: nowrap;
}

.case-thumb span {
  display: block;
  padding: 9px;
  color: var(--soft-ink);
  font-size: 12px;
}

.poster-mock {
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  overflow: hidden;
  background: #111315;
  color: #f8f1e7;
  position: relative;
  min-height: 410px;
}

.poster-format-16-9 {
  aspect-ratio: 16 / 9;
  min-height: 280px;
}

.poster-format-1-1 {
  aspect-ratio: 1 / 1;
  min-height: 340px;
}

.poster-format-3-4 {
  aspect-ratio: 3 / 4;
}

.poster-mock img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.poster-copy {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 30px;
}

.poster-kicker {
  margin-bottom: 12px;
  color: #d8c39b;
  font-size: 14px;
}

.poster-copy h3 {
  margin-bottom: 10px;
  font-size: 34px;
}

.poster-copy p {
  margin-bottom: 0;
  color: #e7dac6;
  font-size: 16px;
}

.portrait-history {
  border: 1px solid #e8e2d8;
  border-radius: 8px;
  background: #fffaf2;
  padding: 12px;
}

.history-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.history-head span {
  color: var(--muted);
  font-size: 12px;
}

.history-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.history-thumb {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbf8f1;
  text-align: left;
}

.history-thumb.is-active {
  outline: 2px solid var(--gold);
}

.history-thumb img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
}

.history-thumb span {
  display: block;
  padding: 8px;
  color: var(--soft-ink);
  font-size: 12px;
}

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

  .control-panel {
    min-height: auto;
  }

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

  .case-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .control-panel,
  .preview-panel {
    padding: 18px;
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .score-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

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