:root {
  color-scheme: light;
  --ink: #141414;
  --navy: #17324d;
  --muted: #4f5962;
  --line: #c9c2b8;
  --paper: #fffdfa;
  --ground: #fff;
  --accent: #b94713;
  --accent-dark: #87320f;
  --accent-soft: #fff0e8;
  --blue: #005ea8;
  --blue-soft: #eaf3f8;
  --success: #17634a;
  --danger: #9b1c1c;
  --max: 1120px;
  font-family: "Hiragino Sans", "Yu Gothic", "Meiryo", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-size: 18px;
  line-height: 1.75;
}

button,
textarea,
input {
  font: inherit;
}

a {
  color: inherit;
}

*:focus-visible {
  outline: 4px solid #ffbf47;
  outline-offset: 3px;
}

.global-nav {
  border-bottom: 2px solid #d6e0e6;
  background: #fff;
}

.global-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1120px, calc(100% - 36px));
  min-height: 68px;
  margin: 0 auto;
}

.global-nav-brand {
  display: grid;
  align-content: center;
  min-height: 48px;
  color: var(--navy);
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.15;
  text-decoration: none;
}

.global-nav-brand small {
  color: #2e6b8f;
  font-size: 0.7rem;
}

.global-nav-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}

.reading-tools {
  position: relative;
}

.reading-tools summary {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 9px 13px;
  border-radius: 8px;
  color: var(--navy);
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
}

.reading-tools summary:hover,
.reading-tools[open] summary {
  background: var(--blue-soft);
}

.reading-tools > div {
  position: absolute;
  z-index: 2;
  top: calc(100% + 6px);
  right: 0;
  display: flex;
  gap: 8px;
  min-width: max-content;
  padding: 8px;
  border: 1px solid #d6e0e6;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(23, 50, 77, 0.14);
}

.reading-tools button {
  min-height: 48px;
  border: 2px solid #6f8796;
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  padding: 8px 12px;
  cursor: pointer;
}

.reading-tools button[aria-pressed="true"] {
  border-color: var(--blue);
  background: var(--blue-soft);
  box-shadow: inset 0 -3px var(--blue);
}

main {
  width: min(var(--max), calc(100% - 36px));
  margin: 0 auto;
}

.intro {
  display: grid;
  align-content: center;
  min-height: auto;
  padding: 48px 0 36px;
}

.prototype-label,
.section-kicker {
  margin: 0 0 10px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 900px;
  margin: 0;
  font-family: "Yu Gothic UI", "Hiragino Kaku Gothic ProN", "BIZ UDPGothic", Meiryo, sans-serif;
  font-size: clamp(38px, 5vw, 54px);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

h2 {
  margin: 0;
  font-family: "Yu Gothic UI", "Hiragino Kaku Gothic ProN", "BIZ UDPGothic", Meiryo, sans-serif;
  font-size: clamp(25px, 3.2vw, 34px);
  line-height: 1.4;
}

.lead {
  max-width: 820px;
  margin: 26px 0 0;
  color: #252525;
  font-size: clamp(17px, 1.8vw, 21px);
}

.trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 28px 0 0;
  padding: 0;
  color: var(--muted);
  list-style: none;
}

.trust-list li::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  background: var(--accent);
  vertical-align: 0.08em;
}

.intro-actions,
.result-actions,
.generate-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.intro-actions {
  margin-top: 36px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  border-radius: 0;
  padding: 11px 18px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 900;
}

.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.button.primary:hover {
  background: var(--accent-dark);
}

.button.quiet {
  background: var(--paper);
  color: var(--ink);
}

.button.quiet:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.how,
.tool,
.result,
.notes {
  padding: 56px 0;
}

.how,
.notes {
  border-top: 1px solid var(--line);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}

.steps li {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 10px;
}

.steps span {
  color: var(--accent);
  font-family: "Yu Gothic UI", "Hiragino Kaku Gothic ProN", "BIZ UDPGothic", Meiryo, sans-serif;
  font-size: 40px;
  font-weight: 900;
  line-height: 1;
}

.steps strong {
  color: var(--ink);
  font-size: 19px;
}

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

.how-visual {
  margin: 38px 0 0;
  overflow: hidden;
  border: 2px solid #667b89;
  background: #fff;
}

.how-visual img {
  display: block;
  width: 100%;
  height: auto;
}

.how-visual figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
  padding: 14px 18px;
  border-top: 2px solid #667b89;
  background: #fff;
  color: var(--navy);
}

.how-visual figcaption strong {
  color: var(--blue);
}

.tool {
  background: var(--paper);
  border-top: 4px solid var(--ink);
  padding: clamp(22px, 4vw, 48px);
}

.tool-section {
  padding: 32px 0;
  border-top: 1px solid rgba(201, 194, 184, 0.72);
}

.tool-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.section-head {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
}

.hint {
  max-width: 820px;
  margin: 0 0 16px;
  color: var(--muted);
}

textarea {
  width: 100%;
  min-height: 168px;
  resize: vertical;
  border: 2px solid #736b61;
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  padding: 15px;
}

textarea:focus {
  border-color: var(--accent);
}

.input-footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.form-error {
  display: none;
  margin: 12px 0 0;
  color: var(--danger);
  font-weight: 800;
}

.form-error.is-visible {
  display: block;
}

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

fieldset {
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

legend {
  margin-bottom: 9px;
  color: var(--ink);
  font-weight: 900;
}

fieldset label,
.check-list label {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  margin: 0 8px 8px 0;
  border: 2px solid var(--line);
  background: #fff;
  padding: 9px 13px;
  cursor: pointer;
  font-weight: 700;
}

input[type="radio"],
input[type="checkbox"] {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin: 0 10px 0 0;
  accent-color: var(--accent);
}

fieldset label:has(input:checked),
.check-list label:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 5px 0 var(--accent);
}

.check-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.generate-row {
  align-items: center;
  padding-top: 28px;
  border-top: 2px solid var(--ink);
}

.generate-row p {
  margin: 0;
  color: var(--muted);
}

.result {
  display: none;
  scroll-margin-top: 32px;
}

.result.is-visible {
  display: block;
}

.result-head {
  margin-bottom: 18px;
}

.result-head p {
  margin: 10px 0 0;
  color: var(--muted);
}

.output-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 800;
}

#output {
  min-height: 360px;
  border-color: var(--ink);
  background: #fff;
  font-size: 15px;
  line-height: 1.65;
}

.result-actions {
  margin-top: 16px;
}

.copy-status {
  min-height: 1.7em;
  margin: 10px 0 0;
  color: var(--success);
  font-weight: 800;
}

.copy-status.is-error {
  color: var(--danger);
}

.notes ul {
  max-width: 900px;
  margin: 18px 0 0;
  padding-left: 1.2em;
  color: var(--muted);
}

.site-footer {
  width: 100%;
  margin: 0;
  padding: 32px 20px;
  border-top: 2px solid #9eb5c3;
  background: #e7eff2;
  color: var(--navy);
  font-size: 15px;
  text-align: center;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
  margin-bottom: 10px;
}

.site-footer .footer-site-nav {
  margin-bottom: 18px;
}

.site-footer a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--blue);
  font-weight: 700;
}

.site-footer p {
  max-width: 780px;
  margin: 8px auto 0;
}

@media (max-width: 760px) {
  body {
    font-size: 17px;
  }

  .global-nav-inner {
    display: block;
    padding: 12px 0;
  }

  .global-nav-brand {
    width: max-content;
    margin-bottom: 8px;
  }

  .global-nav-actions,
  .reading-tools {
    display: block;
    width: 100%;
  }

  .reading-tools summary {
    width: 100%;
  }

  .reading-tools > div {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
    margin-top: 6px;
  }

  .reading-tools button {
    width: 100%;
  }

  .reading-tools button:last-child {
    grid-column: 1 / -1;
  }

  .intro {
    min-height: auto;
    padding-top: 48px;
  }

  .steps,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .how-visual {
    margin-top: 28px;
  }

  .how-visual figcaption {
    display: grid;
    grid-template-columns: 1fr;
    text-align: center;
  }

  h1 {
    font-size: clamp(1.75rem, 8.2vw, 2.125rem);
    letter-spacing: 0;
  }

  .tool {
    width: calc(100% + 24px);
    margin-left: -12px;
    padding: 24px 12px;
  }

  .input-footer {
    flex-direction: column;
  }

  .button,
  .generate-row .button,
  .result-actions .button {
    width: 100%;
  }

  fieldset label,
  .check-list label {
    width: 100%;
    margin-right: 0;
  }
}

html[data-reading-mode="large"] main {
  zoom: 1.2;
}

html[data-reading-mode="contrast"] {
  --ground: #fff;
  --paper: #fff;
  --ink: #000;
  --navy: #000;
  --muted: #111;
  --line: #000;
  --accent: #000;
  --accent-dark: #000;
  --accent-soft: #fff;
  --blue: #000;
  --blue-soft: #fff;
}

html[data-reading-mode="contrast"] .button,
html[data-reading-mode="contrast"] .reading-tools button,
html[data-reading-mode="contrast"] fieldset label,
html[data-reading-mode="contrast"] .check-list label {
  border-color: #000;
  box-shadow: none;
}

html[data-reading-mode="contrast"] .button.primary {
  background: #000;
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media (forced-colors: active) {
  fieldset label:has(input:checked),
  .check-list label:has(input:checked),
  .button {
    border-color: CanvasText;
  }
}
