:root {
  color: #1f2933;
  background: #f4f1ea;
  font-family: Inter, 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  line-height: 1.5;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
}

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

button {
  cursor: pointer;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: end;
  padding: 44px clamp(20px, 4vw, 64px) 28px;
  color: #fff;
  background: linear-gradient(135deg, #1f2933 0%, #29394a 54%, #8a4b2a 100%);
}

.eyebrow {
  margin: 0 0 10px;
  color: #f7c873;
  font-weight: 700;
  letter-spacing: 0.08em;
}

h1, h2, h3, p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(32px, 5vw, 56px);
  letter-spacing: -0.04em;
}

.subtitle {
  max-width: 820px;
  margin-bottom: 0;
  color: #f8efe2;
  font-size: 18px;
}

.profile-card {
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
}

.profile-card strong {
  display: block;
  margin-bottom: 10px;
  color: #f7c873;
}

.profile-card p {
  margin-bottom: 0;
  color: #fff8ed;
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 56px;
}

.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.tab {
  flex: 0 0 auto;
  border: 1px solid #d7cbb9;
  border-radius: 999px;
  padding: 10px 16px;
  color: #4d3b2f;
  background: #fffaf2;
  transition: 0.2s ease;
}

.tab.active,
.tab:hover {
  border-color: #8a4b2a;
  color: #fff;
  background: #8a4b2a;
}

.panel {
  border: 1px solid #e2d7c7;
  border-radius: 24px;
  padding: clamp(18px, 3vw, 32px);
  background: #fffaf2;
  box-shadow: 0 18px 50px rgba(88, 63, 39, 0.1);
}

.panel-heading,
.output-heading,
.actions {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.panel-heading {
  margin-bottom: 22px;
}

.panel-heading h2 {
  margin-bottom: 6px;
  font-size: 28px;
}

.panel-heading p {
  margin-bottom: 0;
  color: #6b5d50;
}

.tool-form {
  display: grid;
  gap: 18px;
}

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

.field {
  display: grid;
  gap: 8px;
}

.field:has(textarea) {
  grid-column: 1 / -1;
}

.field span {
  color: #3c3027;
  font-weight: 700;
}

input, select, textarea {
  width: 100%;
  border: 1px solid #d8c9b7;
  border-radius: 14px;
  padding: 13px 14px;
  color: #1f2933;
  background: #fff;
  outline: none;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

input:focus, select:focus, textarea:focus {
  border-color: #a65f35;
  box-shadow: 0 0 0 4px rgba(166, 95, 53, 0.14);
}

.primary-button,
.secondary-button,
.ghost-button {
  border-radius: 12px;
  padding: 11px 16px;
  font-weight: 700;
}

.primary-button {
  border: 0;
  color: #fff;
  background: #a65f35;
}

.secondary-button {
  border: 1px solid #d8c9b7;
  color: #4d3b2f;
  background: #fff;
}

.ghost-button {
  border: 1px solid #d8c9b7;
  color: #8a4b2a;
  background: #fff8ec;
}

.output-card {
  margin-top: 26px;
  border-top: 1px dashed #d8c9b7;
  padding-top: 22px;
}

.output-heading h3 {
  margin-bottom: 0;
}

#output {
  min-height: 360px;
  margin-top: 14px;
  white-space: pre-wrap;
}

.copy-status {
  min-height: 24px;
  margin: 10px 0 0;
  color: #6b5d50;
}

@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .fields {
    grid-template-columns: 1fr;
  }

  .panel-heading,
  .output-heading,
  .actions {
    align-items: stretch;
    flex-direction: column;
  }
}
