:root {
  color-scheme: light;
  --bg: #f3f5f1;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-strong: #ffffff;
  --text: #18211f;
  --muted: #68756f;
  --line: rgba(28, 43, 38, 0.13);
  --line-strong: rgba(28, 43, 38, 0.22);
  --brand: #0f7567;
  --brand-dark: #09594e;
  --brand-soft: #e6f5f1;
  --accent: #c7852b;
  --accent-soft: #fff4df;
  --warn: #b96b17;
  --bad: #b64242;
  --bad-soft: #fff0f0;
  --good: #15784e;
  --good-soft: #ecf8f2;
  --focus: #3667c9;
  --shadow: 0 18px 50px rgba(22, 34, 31, 0.09);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  background:
    linear-gradient(120deg, rgba(15, 117, 103, 0.08), transparent 34%),
    linear-gradient(300deg, rgba(199, 133, 43, 0.12), transparent 42%),
    var(--bg);
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(19, 34, 31, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(19, 34, 31, 0.045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 78%);
}

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

.flow-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.45;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1520px, calc(100vw - 34px));
  margin: 0 auto;
  padding: 24px 0 28px;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 1px solid rgba(15, 117, 103, 0.26);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(15, 117, 103, 0.95), rgba(22, 45, 39, 0.95)),
    #0f7567;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(15, 117, 103, 0.24);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0;
}

p {
  margin: 8px 0 0;
  color: var(--muted);
}

.intro {
  max-width: 760px;
  line-height: 1.55;
}

.status-cluster {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.status-pill {
  min-width: 128px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  backdrop-filter: blur(14px);
}

.status-pill.subtle {
  min-width: 150px;
}

.status-pill.ok {
  color: var(--good);
  border-color: rgba(21, 120, 78, 0.28);
  background: rgba(236, 248, 242, 0.88);
}

.status-pill.bad {
  color: var(--bad);
  border-color: rgba(182, 66, 66, 0.28);
  background: rgba(255, 240, 240, 0.88);
}

.stage-strip {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto 1fr auto 1fr auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.56);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.stage-node {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 126px;
  color: var(--muted);
  font-size: 13px;
}

.stage-node span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  background: #fff;
  font-size: 12px;
  font-weight: 750;
}

.stage-node strong {
  color: inherit;
  font-size: 13px;
}

.stage-node.active {
  color: var(--brand-dark);
}

.stage-node.active span {
  color: #fff;
  border-color: var(--brand);
  background: var(--brand);
}

.stage-node.done {
  color: var(--good);
}

.stage-node.done span {
  color: var(--good);
  border-color: rgba(21, 120, 78, 0.24);
  background: var(--good-soft);
}

.stage-line {
  height: 1px;
  min-width: 28px;
  background: linear-gradient(90deg, rgba(15, 117, 103, 0.28), rgba(199, 133, 43, 0.34));
}

.layout {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.side-stack,
.main-stack {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.panel {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 16px;
  font-weight: 760;
}

.panel-title small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 12px;
}

input,
textarea,
select {
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
  padding: 10px 11px;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

textarea {
  resize: vertical;
  min-height: 102px;
  line-height: 1.55;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(54, 103, 201, 0.72);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(54, 103, 201, 0.12);
}

button {
  min-height: 38px;
  border: 0;
  border-radius: var(--radius);
  padding: 9px 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

button:hover {
  transform: translateY(-1px);
}

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

.primary {
  background: linear-gradient(135deg, var(--brand), #16473f);
  color: #fff;
  font-weight: 760;
  box-shadow: 0 12px 24px rgba(15, 117, 103, 0.24);
}

.primary:hover {
  background: linear-gradient(135deg, #138171, var(--brand-dark));
}

.secondary {
  background: rgba(255, 255, 255, 0.72);
  color: #24332f;
  border: 1px solid var(--line-strong);
}

.hint {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.status-stack {
  display: grid;
  gap: 8px;
  margin-top: 6px;
}

.login-guide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(15, 117, 103, 0.2);
  border-radius: var(--radius);
  background: rgba(230, 245, 241, 0.7);
}

.login-guide strong,
.login-guide span {
  display: block;
}

.login-guide strong {
  color: #21332e;
  font-size: 13px;
}

.login-guide span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.login-link {
  display: inline-grid;
  place-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 13px;
  white-space: nowrap;
}

.system-row {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.58);
}

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

.system-row strong {
  color: #24332f;
  font-size: 13px;
  line-height: 1.45;
}

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

.input-column {
  min-width: 0;
}

.link-box textarea {
  min-height: 144px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.76)),
    #fff;
}

.mode-row,
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.choice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.66);
  cursor: pointer;
}

.choice input {
  width: auto;
  margin: 2px 0 0;
}

.choice strong,
.choice small {
  display: block;
}

.choice strong {
  color: #1e2d29;
  font-size: 14px;
}

.choice small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.choice.selected {
  border-color: rgba(15, 117, 103, 0.48);
  background: rgba(230, 245, 241, 0.9);
  box-shadow: inset 0 0 0 1px rgba(15, 117, 103, 0.12);
}

.compact-options {
  margin-top: 6px;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  margin-top: 8px;
}

.toggle input {
  width: auto;
  margin: 0;
}

.commerce-card,
.analysis-card {
  min-width: 0;
  border-left: 3px solid var(--accent);
  padding-left: 14px;
}

.analysis-card {
  border-left-color: var(--brand);
}

.material-head {
  display: grid;
  gap: 5px;
  margin-bottom: 12px;
}

.material-head strong {
  color: #26332f;
  font-size: 15px;
}

.material-head span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.material-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.need-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.68);
  color: #42504c;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.35;
}

.need-item.strong {
  border-color: rgba(199, 133, 43, 0.42);
  background: var(--accent-soft);
  color: #73500f;
  font-weight: 750;
}

.process-note {
  border: 1px solid rgba(15, 117, 103, 0.18);
  border-radius: var(--radius);
  background: rgba(230, 245, 241, 0.72);
  color: #334640;
  padding: 12px;
  font-size: 13px;
  line-height: 1.55;
}

.signal-stack {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.signal-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.signal-row div {
  position: relative;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(28, 43, 38, 0.08);
}

.signal-row i {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  animation: signalPulse 2.6s ease-in-out infinite;
}

@keyframes signalPulse {
  0%,
  100% {
    opacity: 0.72;
    transform: translateX(-4%);
  }
  50% {
    opacity: 1;
    transform: translateX(3%);
  }
}

.jobs-panel {
  min-height: 360px;
}

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

.job-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(255, 255, 255, 0.64);
  cursor: pointer;
}

.job-item:hover,
.job-item.active {
  border-color: rgba(15, 117, 103, 0.56);
  background: rgba(255, 255, 255, 0.92);
}

.job-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-weight: 760;
  font-size: 13px;
}

.job-title > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.job-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.job-delete {
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid rgba(182, 66, 66, 0.3);
  background: rgba(255, 246, 246, 0.92);
  color: var(--bad);
  font-size: 12px;
  line-height: 1.25;
}

.job-delete:hover {
  background: #ffeaea;
}

.job-phase {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.job-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.badge {
  white-space: nowrap;
  font-size: 12px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #eef2ef;
}

.badge.running {
  color: var(--warn);
  background: #fff5e8;
}

.badge.waiting_assets {
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.badge.done {
  color: var(--good);
  background: var(--good-soft);
}

.badge.failed {
  color: var(--bad);
  background: var(--bad-soft);
}

.detail-panel {
  min-height: 456px;
}

.empty {
  color: var(--muted);
  padding: 28px 0;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.metric {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px;
  background: rgba(255, 255, 255, 0.7);
}

.metric strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 18px;
}

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

.timeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.timeline-step {
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: rgba(255, 255, 255, 0.58);
}

.timeline-step span,
.timeline-step small {
  display: block;
}

.timeline-step span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.timeline-step strong {
  display: block;
  margin-top: 6px;
  color: #25332f;
  font-size: 13px;
}

.timeline-step small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.timeline-step.done {
  border-color: rgba(21, 120, 78, 0.28);
  background: var(--good-soft);
}

.timeline-step.active {
  border-color: rgba(199, 133, 43, 0.42);
  background: var(--accent-soft);
}

.result {
  border: 1px solid rgba(21, 120, 78, 0.28);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--good-soft);
  margin-bottom: 12px;
  word-break: break-all;
}

.result.error {
  border-color: rgba(182, 66, 66, 0.28);
  background: var(--bad-soft);
  color: #8b2424;
}

.result a {
  color: var(--brand-dark);
  font-weight: 750;
}

.material-workflow {
  border: 1px solid rgba(15, 117, 103, 0.18);
  border-radius: var(--radius);
  background: rgba(248, 252, 250, 0.84);
  padding: 14px;
  margin-bottom: 12px;
}

.material-summary {
  display: grid;
  gap: 5px;
  margin-bottom: 12px;
}

.material-summary strong {
  color: #20302b;
  font-size: 15px;
}

.material-summary span {
  color: var(--muted);
  font-size: 13px;
}

.requirement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.requirement-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  padding: 10px;
  min-height: 92px;
}

.requirement-card.required {
  border-color: rgba(199, 133, 43, 0.4);
  background: var(--accent-soft);
}

.requirement-card strong,
.requirement-card span {
  display: block;
}

.requirement-card strong {
  color: #20302b;
  font-size: 14px;
}

.requirement-card span {
  margin-top: 4px;
  color: #73500f;
  font-size: 12px;
  font-weight: 700;
}

.requirement-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.upload-box {
  display: grid;
  place-items: center;
  min-height: 118px;
  border: 1px dashed rgba(15, 117, 103, 0.36);
  border-radius: var(--radius);
  background: rgba(230, 245, 241, 0.48);
  color: #22332e;
  text-align: center;
  cursor: pointer;
  margin-bottom: 12px;
  padding: 14px;
}

.upload-box input {
  display: none;
}

.upload-box span {
  display: block;
  font-weight: 760;
}

.upload-box small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

.asset-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.empty-assets {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.66);
  color: var(--muted);
  padding: 13px;
  font-size: 13px;
}

.asset-tile {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}

.asset-tile img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #edf1ef;
}

.asset-tile div {
  padding: 8px;
}

.asset-tile strong,
.asset-tile span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-tile strong {
  color: #26332f;
  font-size: 12px;
}

.asset-tile span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.asset-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  min-height: 25px;
  padding: 3px 7px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.92);
  color: #38443f;
  font-size: 12px;
}

.advanced-url {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.advanced-url summary {
  cursor: pointer;
  color: #34443e;
  font-weight: 700;
}

.logs {
  min-height: 240px;
  max-height: 440px;
  overflow: auto;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(15, 117, 103, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(18, 29, 27, 0.98), rgba(20, 24, 27, 0.98)),
    #101820;
  color: #d8f3e6;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.app-footer {
  position: fixed;
  z-index: 20;
  right: 14px;
  bottom: 10px;
  display: flex;
  justify-content: center;
  padding: 0;
}

.version-trigger {
  min-height: 28px;
  padding: 3px 14px;
  border: 1px solid rgba(28, 43, 38, 0.1);
  background: rgba(255, 255, 255, 0.82);
  color: rgba(60, 76, 70, 0.56);
  font-size: 12px;
  letter-spacing: 0;
  user-select: none;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 14px rgba(22, 34, 31, 0.07);
}

.version-trigger:hover {
  color: var(--brand-dark);
  transform: none;
}

body.modal-open {
  overflow: hidden;
}

.admin-backdrop {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(10, 18, 16, 0.62);
  backdrop-filter: blur(8px);
}

.admin-dialog {
  width: min(680px, 100%);
  max-height: min(88vh, 860px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius);
  background: #f7f9f6;
  box-shadow: 0 30px 90px rgba(5, 14, 12, 0.32);
}

.admin-dialog-head {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 249, 246, 0.95);
  backdrop-filter: blur(16px);
}

.admin-dialog-head h2 {
  margin: 2px 0 0;
  font-size: 20px;
}

.admin-kicker {
  color: var(--brand);
  font-size: 10px;
  font-weight: 800;
}

.icon-close {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--text);
  font-size: 24px;
  line-height: 1;
}

.admin-login-view,
.admin-config-view {
  padding: 20px;
}

.admin-login-view {
  width: min(420px, 100%);
  margin: 24px auto 30px;
}

.admin-wide-btn {
  width: 100%;
}

.admin-section {
  padding: 0 0 20px;
  margin: 0 0 20px;
  border-bottom: 1px solid var(--line);
}

.compact-admin-section {
  margin-bottom: 10px;
}

.admin-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.admin-section-title strong,
.admin-section-title span {
  display: block;
}

.admin-section-title strong {
  font-size: 15px;
}

.admin-section-title div > span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.admin-provider-tag {
  padding: 4px 7px;
  border: 1px solid rgba(15, 117, 103, 0.2);
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 10px;
  font-weight: 800;
}

.admin-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 12px;
}

.admin-span-2 {
  grid-column: 1 / -1;
}

.admin-result {
  min-height: 20px;
  margin: 2px 0 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.admin-result.ok {
  color: var(--good);
}

.admin-result.bad {
  color: var(--bad);
}

.admin-result.working {
  color: var(--focus);
}

.admin-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}

.admin-actions-end {
  margin-top: -2px;
}

.admin-logout {
  width: 100%;
  background: transparent;
  color: var(--muted);
}

.hidden {
  display: none;
}

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

@media (max-width: 820px) {
  .app-footer {
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
  }

  .shell {
    width: min(100vw - 20px, 1440px);
    padding: 14px 0 18px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .status-cluster {
    justify-content: flex-start;
    width: 100%;
  }

  .status-pill {
    flex: 1 1 150px;
  }

  .stage-strip {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .stage-line {
    display: none;
  }

  .stage-node {
    width: 100%;
  }

  .mode-row,
  .grid-2,
  .login-guide,
  .material-checklist,
  .detail-grid,
  .timeline {
    grid-template-columns: 1fr;
  }

  .admin-backdrop {
    align-items: end;
    padding: 0;
  }

  .admin-dialog {
    width: 100%;
    max-height: 94vh;
    border-radius: var(--radius) var(--radius) 0 0;
  }

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

  .admin-span-2 {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }

  .flow-canvas {
    display: none;
  }
}
