:root {
  --ink: #17242a;
  --muted: #607078;
  --paper: #fffdf8;
  --canvas: #f1f3ec;
  --teal: #0c6b62;
  --teal-dark: #084d47;
  --orange: #e2673f;
  --line: #d9ddd4;
  --soft: #e6eee9;
  --danger: #a43d2d;
  --shadow: 0 18px 45px rgba(31, 48, 48, 0.1);
  font-family: Inter, "Noto Sans SC", "Yu Gothic UI", "Hiragino Kaku Gothic ProN", system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 82% 8%, rgba(226, 103, 63, 0.12), transparent 28rem),
    radial-gradient(circle at 10% 38%, rgba(12, 107, 98, 0.09), transparent 30rem),
    var(--canvas);
}

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

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
pre:focus-visible {
  outline: 3px solid rgba(226, 103, 63, 0.38);
  outline-offset: 2px;
}

.site-header,
main,
footer {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--teal);
  border-radius: 50% 50% 50% 14px;
  font-family: Georgia, serif;
  font-size: 1.25rem;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  letter-spacing: 0.08em;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
}

.privacy-pill {
  padding: 9px 14px;
  border: 1px solid rgba(12, 107, 98, 0.22);
  border-radius: 999px;
  color: var(--teal-dark);
  background: rgba(255, 255, 255, 0.62);
  font-size: 0.84rem;
  font-weight: 700;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-link {
  color: var(--teal-dark);
  font-size: 0.8rem;
  font-weight: 700;
  text-underline-offset: 4px;
}

.hero {
  padding: 66px 4px 54px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 70px;
  align-items: end;
}

.eyebrow,
.step {
  color: var(--orange);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

h1 {
  max-width: 800px;
  margin: 10px 0 20px;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", Georgia, serif;
  font-size: clamp(2.25rem, 5vw, 4.35rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

h1 em {
  color: var(--teal);
  font-style: normal;
  box-shadow: inset 0 -0.18em 0 rgba(226, 103, 63, 0.18);
}

.lead {
  max-width: 690px;
  margin: 0;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.8;
}

.scope-alert {
  max-width: 760px;
  margin: 16px 0 0;
  padding: 14px 16px;
  border-left: 4px solid var(--orange);
  border-radius: 0 10px 10px 0;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.72);
  font-size: 0.9rem;
  line-height: 1.65;
}

.scope-alert strong {
  color: var(--teal-dark);
}

.hero-note {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  padding: 20px 0 4px;
  border-top: 1px solid var(--ink);
}

.hero-note span {
  color: var(--orange);
  font-weight: 800;
}

.hero-note p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.7;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  gap: 18px;
  align-items: start;
}

.panel {
  border: 1px solid rgba(23, 36, 42, 0.1);
  border-radius: 24px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--shadow);
}

.form-panel,
.output-panel {
  padding: clamp(22px, 3.3vw, 38px);
}

.panel-heading {
  margin-bottom: 28px;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.panel-heading h2 {
  margin: 5px 0 0;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", Georgia, serif;
  font-size: 1.65rem;
}

.text-button {
  padding: 8px;
  border: 0;
  color: var(--muted);
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 4px;
}

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

.field > span {
  font-size: 0.82rem;
  font-weight: 750;
}

.field i {
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 500;
}

.field small {
  color: var(--muted);
  line-height: 1.55;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: #fff;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

input,
select {
  min-height: 48px;
  padding: 0 13px;
}

textarea {
  padding: 13px;
  resize: vertical;
  line-height: 1.6;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #aeb9b1;
}

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(164, 61, 45, 0.1);
}

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

.choice-grid {
  margin: 20px 0;
  padding: 18px;
  border-radius: 16px;
  background: var(--soft);
}

.full {
  grid-column: 1 / -1;
}

.hidden {
  display: none !important;
}

.status {
  min-height: 22px;
  margin: 18px 0 8px;
  color: var(--danger);
  font-size: 0.84rem;
  line-height: 1.5;
}

.status.success {
  color: var(--teal-dark);
}

.primary-button {
  width: 100%;
  min-height: 54px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-radius: 14px;
  color: white;
  background: var(--teal);
  font-weight: 800;
  transition: transform 140ms ease, background 140ms ease;
}

.primary-button:hover {
  background: var(--teal-dark);
  transform: translateY(-1px);
}

.output-panel {
  position: sticky;
  top: 18px;
  overflow: hidden;
  background: var(--ink);
  color: white;
}

.output-state {
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.72rem;
}

.output-state.ready {
  color: #bce9d3;
  border-color: rgba(188, 233, 211, 0.3);
}

.message-paper {
  min-height: 260px;
  padding: 24px;
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(23, 36, 42, 0.06);
}

.message-paper textarea {
  width: 100%;
  margin: 0;
  min-height: 210px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  box-shadow: none;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: "Yu Gothic UI", "Hiragino Kaku Gothic ProN", sans-serif;
  font-size: 0.98rem;
  line-height: 1.9;
  resize: vertical;
}

.empty-output {
  margin: 82px auto 0;
  max-width: 260px;
  color: #87928b;
  text-align: center;
  line-height: 1.7;
}

.output-actions {
  margin: 12px 0 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.secondary-button {
  min-height: 45px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 11px;
  color: white;
  background: rgba(255, 255, 255, 0.07);
}

.secondary-button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.14);
}

.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.check-card,
.help-card {
  padding: 19px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.check-card h3,
.help-card span {
  margin: 0 0 10px;
  color: #ffd4c5;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.check-card ul {
  margin: 0;
  padding-left: 1.2rem;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.8rem;
  line-height: 1.75;
}

.help-card {
  margin-top: 10px;
}

.help-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  line-height: 1.65;
}

.trust-strip {
  margin: 22px 0 76px;
  padding: 23px 26px;
  display: grid;
  grid-template-columns: 110px 110px 130px 1fr;
  gap: 24px;
  align-items: center;
  border: 1px solid rgba(23, 36, 42, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.45);
}

.trust-strip div {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.trust-strip strong {
  color: var(--teal);
  font-family: Georgia, serif;
  font-size: 1.55rem;
}

.trust-strip span,
.trust-strip p {
  color: var(--muted);
  font-size: 0.78rem;
}

.trust-strip p {
  margin: 0;
  padding-left: 24px;
  border-left: 1px solid var(--line);
  line-height: 1.65;
}

.policy-section {
  margin: 0 0 76px;
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid rgba(23, 36, 42, 0.1);
  border-radius: 24px;
  background: rgba(255, 253, 248, 0.78);
}

.policy-heading {
  max-width: 680px;
  margin-bottom: 28px;
}

.policy-heading h2 {
  margin: 6px 0 8px;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", Georgia, serif;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
}

.policy-heading p {
  margin: 0;
  color: var(--muted);
}

.policy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.policy-grid article {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.66);
}

.policy-grid article > span {
  color: var(--orange);
  font-size: 0.72rem;
  font-weight: 800;
}

.policy-grid h3 {
  margin: 8px 0 12px;
  font-size: 1rem;
}

.policy-grid p {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.7;
}

.policy-grid p:last-child {
  margin-bottom: 0;
}

footer {
  padding: 22px 0 36px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.75rem;
}

footer p {
  margin: 0;
}

footer a {
  color: inherit;
  text-underline-offset: 3px;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 44px;
  }

  .hero-note {
    max-width: 560px;
  }

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

  .output-panel {
    position: static;
  }

  .trust-strip {
    grid-template-columns: repeat(3, 1fr);
  }

  .trust-strip p {
    grid-column: 1 / -1;
    padding: 16px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

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

@media (max-width: 560px) {
  .site-header,
  main,
  footer {
    width: min(100% - 24px, 1180px);
  }

  .site-header {
    min-height: 76px;
  }

  .brand small {
    display: none;
  }

  .privacy-pill {
    padding: 8px 10px;
    font-size: 0.74rem;
  }

  .header-actions {
    gap: 8px;
  }

  .header-link {
    display: none;
  }

  .hero {
    padding: 36px 2px;
  }

  .lead {
    font-size: 0.94rem;
  }

  .form-panel,
  .output-panel {
    padding: 21px 17px;
    border-radius: 18px;
  }

  .choice-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .full {
    grid-column: auto;
  }

  .output-actions {
    grid-template-columns: 1fr;
  }

  .trust-strip {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .policy-section {
    padding: 22px 17px;
    border-radius: 18px;
  }

  .trust-strip p {
    grid-column: auto;
  }

  footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
