@import url("./styles/tokens.css");
@import url("./styles/shell.css");
@import url("./styles/home.css");
@import url("./styles/home-video-market.css?v=workflow-fusion-20260617b");
@import url("./styles/cards.css");
@import url("./styles/market.css");
@import url("./styles/overlays.css");
@import url("./styles/responsive.css");

:root {
  --page: #f7f7f5;
  --panel: #ffffff;
  --panel-soft: #fbfbf9;
  --text: #111111;
  --muted: #666666;
  --faint: #9a9a92;
  --line: #e7e5df;
  --line-strong: #d8d5cb;
  --primary: #111111;
  --primary-text: #ffffff;
  --chip: #efeee9;
  --shadow: 0 12px 30px rgba(17, 17, 17, .06);
  --shadow-soft: 0 4px 14px rgba(17, 17, 17, .045);
  --radius: 8px;
  color-scheme: light;
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", system-ui, sans-serif;
}

[data-theme="dark"] {
  --page: #080808;
  --panel: #111111;
  --panel-soft: #151514;
  --text: #f5f5f2;
  --muted: #a6a6a0;
  --faint: #72726c;
  --line: #2a2a26;
  --line-strong: #3b3b36;
  --primary: #ffffff;
  --primary-text: #080808;
  --chip: #1c1c1a;
  --shadow: 0 12px 32px rgba(0, 0, 0, .24);
  --shadow-soft: 0 4px 18px rgba(0, 0, 0, .18);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { min-height: 100%; margin: 0; }
body {
  background: var(--page);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 64px;
  background: color-mix(in srgb, var(--page) 88%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1200px, calc(100vw - 32px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: #050505;
  color: #fff;
  font-size: 15px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -.02em;
}

.brand-name {
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
}

.site-nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}

.site-nav a {
  height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--text);
  background: var(--chip);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 0;
}

.theme-toggle,
.shell-theme-toggle,
.ghost-button,
.primary-button,
.text-button {
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.theme-toggle {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
}

.shell-theme-toggle {
  min-width: 58px;
  padding: 0 10px;
}

.theme-icon::before { content: "☾"; font-size: 15px; }
[data-theme="dark"] .theme-icon::before { content: "☀"; font-size: 14px; }

.ghost-button { padding: 0 12px; }
.primary-button {
  padding: 0 14px;
  border-color: var(--primary);
  background: var(--primary);
  color: var(--primary-text);
}
.text-button {
  border-color: transparent;
  background: transparent;
  padding: 0 10px;
  color: var(--muted);
}

.balance-button {
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.credit-badge,
.account-button {
  height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.credit-badge strong {
  color: #2563eb;
  font-size: 13px;
}

.account-area {
  position: relative;
  flex: 0 1 auto;
  min-width: 0;
}

.account-button {
  width: 100%;
}

.account-avatar {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-text);
  font-size: 11px;
}

.account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  width: 188px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.account-menu a,
.account-menu button {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 0 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-size: 12px;
  font-weight: 850;
}

.account-menu a:hover,
.account-menu button:hover {
  background: var(--chip);
}

.site-modal-root:empty {
  display: none;
}

.shell-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0,0,0,.36);
}

.shell-modal {
  position: relative;
  width: min(420px, calc(100vw - 36px));
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.shell-modal h2 {
  margin: 0 28px 8px 0;
  font-size: 20px;
  line-height: 1.25;
}

.shell-modal p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.shell-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--text);
}

.shell-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

.home-page .shell-theme-toggle,
.home-page .credit-badge,
.home-page .account-button {
  border-color: var(--home-line);
  background: rgba(244, 239, 230, .06);
  color: var(--home-text);
}

.home-page .account-menu {
  border-color: var(--home-line);
  background: var(--home-panel-solid);
}

.home-page .account-menu a,
.home-page .account-menu button {
  color: var(--home-text);
}

.home-page .account-menu a:hover,
.home-page .account-menu button:hover {
  background: rgba(244, 239, 230, .1);
}

html[data-theme="light"] .home-page .site-header {
  background: color-mix(in srgb, var(--page) 88%, transparent);
  border-bottom-color: var(--line);
}

html[data-theme="light"] .home-page .brand-name,
html[data-theme="light"] .home-page .site-nav a,
html[data-theme="light"] .home-page .shell-theme-toggle,
html[data-theme="light"] .home-page .credit-badge,
html[data-theme="light"] .home-page .account-button {
  color: var(--text);
}

html[data-theme="light"] .home-page .site-nav a:hover,
html[data-theme="light"] .home-page .site-nav a.active,
html[data-theme="light"] .home-page .site-nav a[data-active="true"] {
  background: var(--chip);
  color: var(--text);
}

html[data-theme="light"] .home-page .shell-theme-toggle,
html[data-theme="light"] .home-page .credit-badge,
html[data-theme="light"] .home-page .account-button {
  border-color: var(--line);
  background: var(--panel);
}

.container {
  width: min(1200px, calc(100vw - 32px));
  margin: 0 auto;
}

.hero {
  min-height: 720px;
  max-height: 760px;
  display: grid;
  grid-template-columns: minmax(360px, .78fr) minmax(560px, 1.22fr);
  align-items: center;
  gap: 34px;
  padding: 44px 0 22px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
}

h1 {
  margin: 18px 0 14px;
  color: var(--text);
  font-size: clamp(40px, 5.2vw, 64px);
  line-height: .96;
  letter-spacing: 0;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-width: 520px;
  margin-top: 24px;
}

.hero-stat {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.hero-stat b { display: block; font-size: 18px; line-height: 22px; }
.hero-stat span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.35; font-weight: 800; }

.hero-subtitle {
  margin: 0;
  max-width: 560px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
  font-weight: 500;
}

.hero-note {
  max-width: 520px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.factory {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.factory-console {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.console-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.featured-template {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 12px;
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.featured-cover {
  min-height: 244px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  position: relative;
  background: var(--chip);
}
.featured-cover img { width: 100%; height: 100%; object-fit: cover; }

.featured-info h2 {
  margin: 8px 0;
  font-size: 24px;
  line-height: 1.1;
}
.featured-info p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}
.featured-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

.factory-line {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  contain: layout paint;
}

.line-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.marquee {
  display: flex;
  gap: 10px;
  width: max-content;
  animation: slide-left 28s linear infinite;
}
.factory-line:hover .marquee { animation-play-state: paused; }
.factory-line:nth-child(2) .marquee { animation-duration: 34s; animation-direction: reverse; }
.factory-line:nth-child(3) .marquee { animation-duration: 31s; }

@keyframes slide-left {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

.flow-card {
  flex: 0 0 auto;
  width: 118px;
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  overflow: hidden;
}

.flow-card.image,
.flow-card.video { height: 132px; }
.flow-card img { width: 100%; height: 100%; object-fit: cover; }
.flow-card.video { position: relative; }
.video-badge {
  position: absolute;
  left: 7px;
  bottom: 7px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(0,0,0,.66);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}

.flow-card.text,
.flow-card.node {
  padding: 10px;
}
.flow-card strong {
  display: block;
  color: var(--text);
  font-size: 13px;
  line-height: 18px;
}
.flow-card span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}
.flow-card.node { border-style: dashed; }

.agent-status {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.agent-status small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.workstation-bar {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  padding-bottom: 18px;
}

.station-button {
  min-height: 70px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  text-align: left;
  box-shadow: var(--shadow-soft);
}
.station-button:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.station-button b { display: block; font-size: 13px; margin-bottom: 5px; }
.station-button span { display: block; color: var(--muted); font-size: 11px; line-height: 1.45; }

.section {
  padding: 74px 0;
  border-top: 1px solid var(--line);
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.asset-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.asset-cover {
  height: 210px;
  position: relative;
  border-bottom: 1px solid var(--line);
  background: var(--chip);
}
.asset-cover img { width: 100%; height: 100%; object-fit: cover; }
.asset-status {
  position: absolute;
  top: 8px;
  left: 8px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(0,0,0,.68);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}
.asset-body { padding: 12px; }
.asset-body h3 { margin: 8px 0 7px; font-size: 17px; line-height: 1.2; }
.asset-body p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.asset-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
  margin: 10px 0;
}
.asset-meta span {
  min-height: 30px;
  display: flex;
  align-items: center;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.asset-actions { display: flex; gap: 8px; margin-top: 10px; }
.asset-actions button,
.asset-actions a { flex: 1; justify-content: center; display: inline-flex; align-items: center; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.filter-pill {
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.filter-pill.active { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }

.market-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 14px;
}
.market-sidebar {
  position: sticky;
  top: 84px;
  align-self: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.market-sidebar h3 { margin: 4px 0 10px; font-size: 14px; }
.market-sidebar .filter-pill { width: 100%; justify-content: flex-start; margin-bottom: 6px; border-radius: 8px; }

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  background: rgba(0,0,0,.28);
}
.drawer-backdrop.open { display: block; }
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 110;
  width: min(420px, calc(100vw - 24px));
  height: 100vh;
  padding: 14px;
  background: var(--panel);
  border-left: 1px solid var(--line);
  box-shadow: -18px 0 50px rgba(0,0,0,.16);
  transform: translateX(104%);
  transition: transform .22s ease;
  overflow: auto;
}
.drawer.open { transform: translateX(0); }
.drawer-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.drawer-head h3 { margin: 0; font-size: 18px; }
.drawer-section { padding: 14px 0; border-bottom: 1px solid var(--line); }
.drawer-section h4 { margin: 0 0 8px; font-size: 14px; }
.ledger-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.ledger-item:last-child { border-bottom: 0; }
.ledger-item span { color: var(--muted); }
.cost-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
  font-weight: 850;
}
.cost-row strong { color: var(--text); }

.detail-preview {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  margin-top: 10px;
}
.detail-preview img {
  width: 120px;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

@media (prefers-reduced-motion: reduce) {
  .marquee { animation: none; }
  .drawer { transition: none; }
}
.section.compact { padding: 48px 0; }
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.section-head h2 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.08;
}
.section-head p {
  margin: 8px 0 0;
  max-width: 560px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.showcase-card,
.content-card,
.step-card,
.workstation-detail,
.case-row,
.workflow-card,
.credit-card,
.modal-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.showcase-card {
  padding: 12px;
}

.showcase-flow {
  display: grid;
  grid-template-columns: 120px 1fr 120px;
  gap: 10px;
  align-items: stretch;
}
.media-box {
  min-height: 150px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel-soft);
  border: 1px solid var(--line);
}
.media-box img { width: 100%; height: 100%; object-fit: cover; }
.agent-card {
  padding: 12px;
  border-radius: 8px;
  background: var(--panel-soft);
  border: 1px dashed var(--line-strong);
}
.agent-card strong,
.showcase-meta strong { display: block; font-size: 14px; line-height: 20px; }
.agent-card p,
.showcase-meta p,
.content-card p,
.step-card p,
.workflow-card p,
.credit-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.showcase-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}
.tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.steps-grid,
.content-grid,
.workflow-grid,
.credit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.content-grid,
.workflow-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.step-card,
.content-card,
.workflow-card,
.credit-card {
  min-height: 158px;
  padding: 16px;
}
.step-num {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 8px;
  background: var(--primary);
  color: var(--primary-text);
  font-weight: 900;
}
.content-card b,
.workflow-card b,
.credit-card b { display: block; font-size: 16px; line-height: 22px; }

.page-hero {
  padding: 58px 0 30px;
}
.page-hero h1 {
  max-width: 880px;
  margin-bottom: 16px;
  font-size: clamp(38px, 5vw, 62px);
}
.page-hero p {
  max-width: 720px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.workshop-layout {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 18px;
  align-items: start;
}
.station-list {
  position: sticky;
  top: 84px;
  display: grid;
  gap: 8px;
}
.station-list button {
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  text-align: left;
  font-weight: 850;
}
.station-list button span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.station-list button.active {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary);
}
.workstation-detail { padding: 22px; min-height: 420px; }
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 18px;
}
.canvas-preview {
  min-height: 320px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 24px 24px,
    var(--panel-soft);
  position: relative;
  overflow: hidden;
}
.node {
  position: absolute;
  width: 130px;
  min-height: 74px;
  padding: 10px;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-soft);
  font-size: 12px;
  font-weight: 850;
}
.node span { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; font-weight: 700; line-height: 1.35; }
.node.dashed { border-style: dashed; }
.case-stack { display: grid; gap: 16px; }
.case-row {
  padding: 14px;
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 14px;
}
.case-product {
  min-height: 210px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.case-product img { width: 100%; height: 100%; object-fit: cover; }
.case-outputs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.case-output {
  min-height: 170px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.case-output img { width: 100%; height: 100%; object-fit: cover; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0,0,0,.38);
}
.modal-backdrop.open { display: flex; }
.modal-card {
  width: min(480px, calc(100vw - 32px));
  padding: 20px;
}
.modal-card h3 { margin: 0 0 8px; font-size: 20px; }
.modal-card p { margin: 0; color: var(--muted); line-height: 1.7; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

.footer {
  padding: 40px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 900px) {
  body {
    overflow-x: hidden;
  }

  .site-header { height: auto; }
  .nav-shell {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 0;
  }
  .brand-mark { width: 32px; height: 32px; }
  .site-nav {
    order: 3;
    width: 100%;
    justify-content: stretch;
    overflow-x: hidden;
    padding-bottom: 0;
  }
  .site-nav a {
    flex: 1 1 0;
    justify-content: center;
    min-width: 0;
    padding: 0 8px;
  }
  .nav-actions {
    order: 4;
    width: 100%;
    flex-wrap: wrap;
  }
  .shell-theme-toggle {
    flex: 0 0 58px;
  }
  .credit-badge,
  .account-area,
  .download-client-button {
    flex: 1 1 132px;
    min-width: 0;
  }
  .credit-badge,
  .account-button,
  .download-client-button {
    justify-content: center;
  }
  .ghost-button, .text-button { display: none; }
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 42px;
  }
  .factory { overflow: hidden; }
  .marquee {
    width: auto;
    overflow-x: auto;
    animation: none;
    padding-bottom: 2px;
  }
  .workstation-bar,
  .showcase-grid,
  .template-grid,
  .steps-grid,
  .content-grid,
  .workflow-grid,
  .credit-grid,
  .workshop-layout,
  .detail-grid,
  .case-row {
    grid-template-columns: 1fr;
  }
  .market-layout { grid-template-columns: 1fr; }
  .market-sidebar { position: static; }
  .featured-template { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr; }
  .station-list { position: static; }
  .showcase-flow {
    grid-template-columns: 1fr;
  }
  .media-box { min-height: 220px; }
  .case-outputs { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .nav-menu-button {
    display: inline-grid;
    place-items: center;
  }

  .site-nav {
    max-height: 0;
    overflow: hidden;
    padding-bottom: 0;
  }

  .site-nav.open {
    max-height: 260px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow-x: hidden;
    padding-bottom: 2px;
  }
}

@media (max-width: 560px) {
  .brand-name,
  .account-label {
    display: none;
  }

  .nav-shell {
    width: min(100% - 20px, 1200px);
  }

  .credit-badge,
  .account-area,
  .download-client-button {
    flex-basis: calc(50% - 4px);
  }
}
