* {
  box-sizing: border-box;
}

:root {
  --bg: #f3f3ef;
  --paper: rgba(255, 255, 255, 0.9);
  --ink: #151515;
  --muted: #666666;
  --line: rgba(17, 17, 17, 0.1);
  --line-strong: rgba(17, 17, 17, 0.16);
  --panel: rgba(255, 255, 255, 0.82);
  --shadow: 0 16px 36px rgba(17, 17, 17, 0.06);
  --shadow-soft: 0 6px 18px rgba(17, 17, 17, 0.04);
}

body.shell-body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, #f8f8f4 0%, var(--bg) 56%, #efefe9 100%);
}

.shell-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px 24px 72px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  color: rgba(17, 17, 17, 0.78);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.shell-hero,
.generator-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #e7e7e3 0%, #f3f3ef 58%, #ebebe6 100%);
  color: var(--ink);
  border: 1px solid rgba(17, 17, 17, 0.05);
  border-radius: 28px;
  padding: 34px 40px 30px;
  box-shadow: var(--shadow);
}

.generator-hero.compact {
  padding: 28px 32px;
}

.shell-hero::after,
.generator-hero::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -60px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0));
  opacity: 0.75;
}

.shell-hero h1,
.generator-hero h1 {
  margin: 16px 0 14px;
  max-width: 720px;
  font-size: 54px;
  line-height: 1.04;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.shell-hero p,
.generator-hero p {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.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: 22px;
  background: var(--panel);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-soft);
}

.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: #1145a5;
  background: rgba(25, 94, 230, 0.1);
}

.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: rgba(17, 17, 17, 0.7);
  text-decoration: none;
  font-weight: 600;
}

.back-link:hover {
  color: var(--ink);
}

.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%;
}

.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);
  letter-spacing: -0.02em;
}

.panel-tip {
  color: rgba(17, 17, 17, 0.48);
  font-size: 13px;
}

.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(17, 17, 17, 0.12);
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  border-radius: 14px;
  padding: 14px 16px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

input[type="file"]:focus,
input[type="number"]:focus,
textarea:focus {
  outline: none;
  border-color: rgba(17, 17, 17, 0.34);
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.06);
}

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

.primary-btn {
  border: 0;
  border-radius: 14px;
  padding: 14px 18px;
  background: #111111;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(17, 17, 17, 0.14);
  transition: transform 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.primary-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  background: #1d1d1d;
  box-shadow: 0 12px 28px rgba(17, 17, 17, 0.18);
}

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

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

.preview-item {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(247, 247, 244, 0.92);
  border: 1px solid rgba(17, 17, 17, 0.08);
}

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

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

.status-text {
  margin: 0;
  min-height: 24px;
  color: var(--muted);
  line-height: 1.7;
}

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

.narrow {
  max-width: 720px;
}

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

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

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

  .shell-hero h1,
  .generator-hero h1 {
    font-size: 38px;
  }
}
