* {
  box-sizing: border-box;
}

:root {
  --bg: #dcdee2;
  --paper: #f3f4f6;
  --paper-strong: #efeff2;
  --ink: #17181d;
  --muted: #5f6068;
  --line: rgba(23, 24, 29, 0.08);
  --shadow: 0 18px 40px rgba(23, 24, 29, 0.05);
  --shadow-soft: 0 10px 24px rgba(23, 24, 29, 0.04);
}

body.shell-body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

.shell-page {
  max-width: 1260px;
  margin: 0 auto;
  padding: 28px 28px 72px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tool-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 18px;
  margin-top: 24px;
}

.tool-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.tool-card {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 28px;
  transition: transform 180ms ease, border-color 180ms ease;
}

.tool-card:hover {
  transform: translateY(-4px);
  border-color: rgba(25, 94, 230, 0.28);
}

.tool-card.featured {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 251, 255, 0.96)),
    #fff;
}

.tool-card.muted {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(245, 248, 252, 0.94)),
    #fff;
}

.tool-badge {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  background: rgba(23, 24, 29, 0.06);
}

.tool-card h2 {
  margin: 16px 0 10px;
  font-size: 28px;
  color: var(--ink);
}

.tool-card p,
.tool-card li {
  color: var(--muted);
  line-height: 1.7;
}

.tool-card ul {
  margin: 16px 0 22px;
  padding-left: 20px;
}

.tool-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 700;
}

.back-link {
  display: inline-flex;
  margin-bottom: 14px;
  color: #24252b;
  text-decoration: none;
  font-weight: 600;
}

.editorial-shell .back-link {
  margin-bottom: 18px;
}

.editorial-hero {
  padding: 18px 0 10px;
}

.eyebrow-muted {
  background: rgba(23, 24, 29, 0.06);
  color: rgba(23, 24, 29, 0.78);
}

.editorial-hero h1 {
  margin: 14px 0 8px;
  font-size: clamp(56px, 9vw, 82px);
  line-height: 0.95;
  letter-spacing: -0.05em;
  font-weight: 800;
}

.editorial-lead {
  margin: 0;
  max-width: 980px;
  color: #2b2d33;
  font-size: clamp(22px, 3.2vw, 30px);
  line-height: 1.3;
  font-weight: 700;
}

.editorial-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
}

.editorial-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(23, 24, 29, 0.05);
  color: #2b2d33;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.editorial-note {
  color: #6a6b73;
  font-size: 15px;
  line-height: 1.5;
}

.editorial-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 18px;
  margin-top: 34px;
}

.generator-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 18px;
  margin-top: 24px;
}

.panel {
  padding: 26px;
}

.upload-panel,
.requirements-panel,
.status-panel {
  min-height: 100%;
}

.editorial-panel {
  background: rgba(248, 248, 250, 0.92);
  border-color: rgba(23, 24, 29, 0.08);
  box-shadow: var(--shadow-soft);
}

.editorial-panel-muted {
  background: rgba(244, 244, 246, 0.96);
}

.panel-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}

.panel-title-row h2 {
  margin: 0;
  font-size: 22px;
  color: var(--ink);
}

.panel-tip {
  color: #6c7a91;
  font-size: 13px;
}

.editorial-title-row {
  margin-bottom: 22px;
}

.panel-copy {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--ink);
  font-weight: 600;
}

input,
textarea,
button {
  font: inherit;
}

input[type="file"],
input[type="number"],
textarea {
  width: 100%;
  border: 1px solid rgba(23, 24, 29, 0.08);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

textarea {
  resize: vertical;
  min-height: 240px;
  line-height: 1.6;
}

.primary-btn {
  border: 0;
  border-radius: 18px;
  padding: 15px 20px;
  background: #18191f;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(23, 24, 29, 0.12);
  display: inline-flex;
  text-decoration: none;
  justify-content: center;
}

.primary-btn:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.editorial-btn {
  margin-top: 8px;
}

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

.preview-item {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(241, 246, 255, 0.8);
  border: 1px solid rgba(115, 144, 196, 0.16);
}

.preview-item strong {
  color: var(--ink);
}

.preview-item span {
  color: var(--muted);
  line-height: 1.6;
}

.status-text {
  margin: 0;
  min-height: 24px;
  color: #373943;
  line-height: 1.7;
}

.status-text.error {
  color: #a4262c;
}

.narrow {
  max-width: none;
}

.generator-hero {
  padding: 18px 0 10px;
}

.generator-hero.compact h1 {
  margin: 14px 0 8px;
  font-size: 42px;
}

.generator-hero p {
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 980px) {
  .tool-grid,
  .generator-layout,
  .editorial-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .shell-page {
    padding: 18px 14px 36px;
  }

  .panel,
  .tool-card {
    border-radius: 22px;
    padding: 20px 18px;
  }

  .editorial-hero h1 {
    font-size: 46px;
  }

  .editorial-lead {
    font-size: 18px;
  }

  .editorial-meta {
    gap: 10px;
  }
}
