:root {
  --bg: #f7f2ea;
  --panel: #fffaf3;
  --ink: #12212f;
  --accent: #d14928;
  --accent-dark: #9d321a;
  --line: #e7d9c5;
  --ok: #0f766e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Noto Sans SC", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 10% 20%, #fff7ea 0%, #f9ecd8 36%, #f7f2ea 100%);
  overflow-x: hidden;
}

.bg-decor {
  position: fixed;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  filter: blur(55px);
  opacity: 0.4;
  z-index: -1;
}

.bg-left {
  left: -120px;
  top: -80px;
  background: #ffb366;
}

.bg-right {
  right: -140px;
  bottom: -90px;
  background: #ff7d4d;
}

.shell {
  width: min(980px, 94vw);
  margin: 28px auto;
  display: grid;
  gap: 16px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 14px 35px rgba(79, 45, 18, 0.08);
  padding: 20px;
}

.hero h1 {
  margin: 6px 0 8px;
  font-family: "Alfa Slab One", serif;
  font-weight: 400;
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  color: #7a1f0f;
  letter-spacing: 0.4px;
}

.tag {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 1.2px;
  color: #9a5d2d;
}

.sub {
  margin: 0;
  color: #3f4a58;
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.nav-panel {
  padding: 14px 20px;
}

.identity-box {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.identity-box input {
  min-width: 260px;
  border: 1px solid #d8c4a8;
  border-radius: 10px;
  padding: 9px 12px;
  background: #fff;
  font-size: 0.95rem;
}

.stats {
  margin-top: 14px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.stat-item {
  border: 1px solid #e9d8c2;
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
}

.stat-label {
  font-size: 0.86rem;
  color: #694428;
}

.stat-value {
  margin-top: 4px;
  font-size: 1.4rem;
  font-weight: 700;
  color: #7a1f0f;
}

label {
  font-weight: 700;
}

select,
.btn,
textarea {
  font-family: inherit;
}

select {
  min-width: 130px;
  border: 1px solid #d8c4a8;
  border-radius: 10px;
  padding: 9px 12px;
  background: #fff;
  font-size: 0.95rem;
}

.btn {
  border: 0;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 18px rgba(209, 73, 40, 0.28);
}

.btn-primary:active {
  background: var(--accent-dark);
}

.btn-ghost {
  background: #fff;
  color: #7a2f1f;
  border: 1px solid #e6b79e;
}

.status {
  margin: 12px 0 0;
  min-height: 20px;
  color: var(--ok);
  font-weight: 700;
}

.output-title {
  font-size: 0.95rem;
  margin-bottom: 8px;
  color: #5d3920;
  font-weight: 700;
}

textarea {
  width: 100%;
  height: 340px;
  border-radius: 12px;
  border: 1px solid #dfceb8;
  background: #fff;
  resize: vertical;
  padding: 12px;
  line-height: 1.7;
  color: #243141;
}

@media (max-width: 640px) {
  .shell {
    margin: 16px auto;
  }

  .panel {
    padding: 14px;
    border-radius: 16px;
  }

  textarea {
    height: 280px;
  }
}
