:root {
  --paper: #f7f1e6;
  --paper-strong: #ede5d8;
  --ink: #1b1a18;
  --muted: #61594d;
  --line: rgba(53, 48, 40, 0.14);
  --line-strong: rgba(42, 39, 33, 0.28);
  --accent: #3e5219;
  --accent-soft: rgba(62, 82, 25, 0.1);
  --soft: #7b8f84;
  --standard: #6f6655;
  --firm: #6f4f4e;
  --surface: rgba(245, 243, 238, 0.9);
  --surface-hi: rgba(255, 255, 255, 0.72);
  --shadow: 0 18px 48px rgba(31, 27, 22, 0.04);
  --radius: 8px;
  --max: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", "Hiragino Sans", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.55), transparent 30%),
    linear-gradient(180deg, #f9f3e8 0%, #f3ebdd 100%);
}

.paper-body {
  position: relative;
  min-height: 100vh;
}

.paper-noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.25;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(52, 45, 38, 0.05) 0 1px, transparent 1px),
    radial-gradient(circle at 75% 30%, rgba(52, 45, 38, 0.04) 0 1px, transparent 1px),
    radial-gradient(circle at 30% 80%, rgba(52, 45, 38, 0.04) 0 1px, transparent 1px);
  background-size: 26px 26px, 31px 31px, 37px 37px;
}

a {
  color: inherit;
  text-decoration: none;
}

code {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.95em;
  background: rgba(35, 31, 28, 0.06);
  padding: 0.1rem 0.35rem;
  border-radius: 0.4rem;
}

.site-header,
.site-footer,
.section-shell {
  position: relative;
  z-index: 1;
}

.site-header,
.site-footer,
.section-shell {
  width: min(calc(100% - 2rem), var(--max));
  margin-inline: auto;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.4rem 0 0;
  gap: 1rem;
}

.site-mark {
  display: inline-flex;
  flex-direction: column;
  gap: 0.3rem;
}

.site-mark__line,
.site-header__link,
.site-footer {
  color: var(--muted);
  font-size: 0.84rem;
  letter-spacing: 0.04em;
}

.site-mark__name {
  font-family: "Noto Serif JP", serif;
  font-size: clamp(1rem, 1.6vw, 1.3rem);
}

.site-header__link {
  border-bottom: 0.5px solid var(--line-strong);
  padding-bottom: 0.2rem;
}

.section-shell {
  padding: 5.6rem 0 0;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 2.2rem;
  align-items: start;
}

.section-grid--narrow {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 0.9fr);
}

.hero {
  min-height: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(330px, 0.9fr);
  gap: clamp(1.5rem, 3vw, 2.8rem);
  align-items: start;
}

.hero__copy {
  max-width: none;
  padding-right: 0.4rem;
}

.hero__copy h1 {
  max-width: none;
}

.eyebrow,
.section-kicker,
.tone-card__eyebrow,
.preview-card__tone,
.guidance-card__eyebrow,
.support-card__eyebrow,
.document-card__label,
.meta-strip__label {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Noto Serif JP", serif;
  line-height: 1.15;
  font-weight: 700;
}

h1 {
  font-size: clamp(2.8rem, 4.1vw, 4.35rem);
  max-width: 11ch;
  margin-top: 0.9rem;
  letter-spacing: -0.045em;
}

h2 {
  font-size: clamp(2rem, 3.2vw, 2.9rem);
  margin-top: 0.4rem;
  letter-spacing: -0.03em;
}

h3 {
  font-size: clamp(1.2rem, 1.8vw, 1.55rem);
  letter-spacing: -0.02em;
}

p,
li {
  line-height: 1.8;
}

.hero__lead,
.section-heading p,
.body-stack p,
.preview-card p,
.tone-card p,
.guidance-card p,
.support-card p,
.related-card p,
.document-card__text {
  color: var(--muted);
}

.hero__lead {
  max-width: 38rem;
  font-size: 1.07rem;
  margin: 1.35rem 0 0;
}

.hero__actions,
.final-call__actions,
.preview-card__actions,
.template-block__head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.hero__actions {
  margin-top: 1.55rem;
}

.hero__note {
  margin-top: 0.95rem;
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 32rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  border: 1px solid transparent;
  min-height: 2.9rem;
  padding: 0 1.25rem;
  letter-spacing: 0.03em;
  font-weight: 600;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button--primary {
  background: var(--ink);
  color: #f7f1e6;
}

.button--ghost {
  background: transparent;
  color: var(--ink);
  border-color: transparent;
  border-bottom-color: var(--line-strong);
}

.button--small {
  min-height: 2.45rem;
  padding-inline: 0.95rem;
  font-size: 0.95rem;
}

.hero__summary {
  display: grid;
  align-self: stretch;
}

.hero__summary .document-card {
  display: grid;
  gap: 1rem;
  min-height: 100%;
  padding: 1.45rem 1.5rem 1.55rem;
  border-left-width: 3px;
}

.document-card,
.template-block,
.meta-strip,
.support-card,
.guidance-card,
.related-card {
  background: var(--surface);
}

.document-card {
  width: 100%;
  padding: 1.8rem 1.85rem 1.9rem;
  border-radius: var(--radius);
  border-left: 4px solid rgba(62, 82, 25, 0.3);
  transform: none;
}

.document-card__rule {
  height: 0.5px;
  background: var(--line-strong);
  margin: 1rem 0 1.15rem;
}

.document-card__title {
  font-family: "Noto Serif JP", serif;
  font-size: 2rem;
  letter-spacing: -0.03em;
}

.document-card__meta {
  margin-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.document-card__meta span,
.preview-card__channel,
.soon-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: rgba(38, 34, 30, 0.04);
}

.document-card__list {
  margin: 1rem 0 0;
  padding-left: 1.15rem;
  color: var(--muted);
}

.section-heading {
  padding-top: 0.4rem;
}

.situation-panel,
.tone-ladder,
.template-preview-grid,
.body-stack,
.guidance-grid,
.related-grid {
  border-top: 0.5px solid var(--line-strong);
  padding-top: 1.75rem;
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.chip {
  border: none;
  background: rgba(245, 243, 238, 0.72);
  color: var(--ink);
  padding: 0.9rem 1.1rem;
  border-radius: 0;
  border-left: 3px solid transparent;
  font: inherit;
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease;
}

.chip:hover,
.chip.is-active {
  transform: translateY(-1px);
  border-left-color: rgba(62, 82, 25, 0.68);
  background: rgba(85, 99, 79, 0.1);
}

.selection-note {
  margin: 1rem 0 0;
  color: var(--muted);
}

.hero__steps {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--ink);
  display: grid;
  gap: 0.55rem;
}

.hero__steps li::marker {
  font-weight: 700;
}

.hero__assist {
  margin: -0.1rem 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.hero__mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.hero__mini-card {
  padding: 0.9rem 0.95rem;
  background: rgba(255, 255, 255, 0.42);
  border-left: 3px solid rgba(62, 82, 25, 0.18);
}

.hero__mini-card p {
  margin: 0;
}

.hero__mini-label {
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero__link-list {
  display: grid;
  gap: 0.45rem;
}

.hero__link-list a {
  color: var(--ink);
  line-height: 1.55;
  width: fit-content;
  border-bottom: 0.5px solid rgba(42, 39, 33, 0.14);
  transition: border-color 180ms ease;
}

.hero__link-list a:hover,
.hero__link-list a:focus-visible {
  border-bottom-color: var(--line-strong);
  outline: none;
}

.tone-ladder,
.template-preview-grid,
.guidance-grid,
.related-grid {
  display: grid;
  gap: 1.25rem;
}

.tone-ladder {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tone-card,
.preview-card,
.guidance-card,
.related-card {
  padding: 1.45rem 1.5rem 1.55rem;
  border: none;
  border-left: 4px solid rgba(62, 82, 25, 0.16);
  border-radius: 0;
  background: rgba(245, 243, 238, 0.88);
}

.tone-card--soft {
  background: linear-gradient(180deg, rgba(123, 143, 132, 0.13), rgba(255, 255, 255, 0.34));
}

.tone-card--standard {
  background: linear-gradient(180deg, rgba(111, 102, 85, 0.12), rgba(255, 255, 255, 0.34));
}

.tone-card--firm {
  background: linear-gradient(180deg, rgba(111, 79, 78, 0.12), rgba(255, 255, 255, 0.34));
}

.template-preview-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.preview-card {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  justify-content: space-between;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.preview-card.is-muted {
  border-left-color: rgba(62, 82, 25, 0.08);
  background: rgba(245, 243, 238, 0.72);
}

.preview-card.is-highlighted {
  border-left-color: rgba(62, 82, 25, 0.65);
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(31, 27, 22, 0.05);
}

.preview-card__top {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.8rem;
}

.preview-card__tone {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.72rem;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.preview-card__tone--soft {
  background: rgba(123, 143, 132, 0.18);
  color: #30453a;
}

.preview-card__tone--standard {
  background: rgba(111, 102, 85, 0.16);
  color: #4a4132;
}

.preview-card__tone--firm {
  background: rgba(111, 79, 78, 0.18);
  color: #5b3230;
}

.preview-card--link {
  cursor: pointer;
}

.preview-card--link:hover {
  transform: translateY(-2px);
  border-left-color: rgba(62, 82, 25, 0.5);
  box-shadow: 0 16px 28px rgba(31, 27, 22, 0.05);
}

.preview-card--link:focus-visible {
  transform: translateY(-2px);
  border-left-color: rgba(62, 82, 25, 0.5);
  box-shadow: 0 16px 28px rgba(31, 27, 22, 0.05);
  outline: none;
}

.preview-card__linktext {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--ink);
  font-weight: 600;
  border-bottom: 0.5px solid var(--line-strong);
  padding-bottom: 0.15rem;
}

.body-stack--tight {
  gap: 0.35rem;
}

.body-stack {
  display: grid;
  gap: 0.7rem;
}

.section-helper-list {
  margin: 1.1rem 0 0;
  padding-left: 1.15rem;
  color: var(--muted);
  display: grid;
  gap: 0.45rem;
}

.faq-stack {
  display: grid;
  gap: 1rem;
  border-top: 0.5px solid var(--line-strong);
  padding-top: 1.75rem;
}

.faq-card {
  padding: 1.25rem 1.3rem;
  border-left: 4px solid rgba(62, 82, 25, 0.18);
  background: rgba(245, 243, 238, 0.88);
}

.ad-slot {
  border-top: 0.5px solid var(--line-strong);
  padding-top: 1.2rem;
}

.ad-slot__label {
  margin: 0 0 0.6rem;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ad-slot__box {
  min-height: 118px;
  display: grid;
  place-items: center;
  gap: 0.35rem;
  padding: 1rem;
  text-align: center;
  border: 1px dashed rgba(42, 39, 33, 0.28);
  background: rgba(255, 255, 255, 0.4);
  color: var(--muted);
}

.ad-slot__box strong {
  color: var(--ink);
}

.ad-slot--layout-compact {
  display: none;
}

.final-call {
  padding-bottom: 4rem;
}

.template-hero {
  padding-top: 4rem;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.template-hero h1 {
  max-width: 14ch;
  font-size: clamp(2.5rem, 4.8vw, 4.25rem);
}

.template-hero .section-heading > p:last-child {
  max-width: 48rem;
}

.meta-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  padding: 1rem;
  border-radius: 0;
  border-left: 4px solid rgba(62, 82, 25, 0.24);
}

.meta-strip__item {
  display: grid;
  gap: 0.2rem;
}

.template-config {
  display: grid;
  gap: 1rem;
}

.template-config__lead,
.template-config__hint {
  margin: 0;
  color: var(--muted);
}

.template-config__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.template-tools {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.template-field {
  display: grid;
  gap: 0.35rem;
}

.template-field span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.template-field input {
  width: 100%;
  min-height: 2.9rem;
  border: none;
  border-left: 3px solid rgba(62, 82, 25, 0.28);
  background: rgba(255, 255, 255, 0.62);
  padding: 0.7rem 0.85rem;
  font: inherit;
  color: var(--ink);
}

.template-field input:focus {
  outline: none;
  border-left-color: rgba(62, 82, 25, 0.74);
  background: rgba(255, 255, 255, 0.82);
}

.guidance-grid {
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.guidance-card--warning {
  background: linear-gradient(180deg, rgba(111, 79, 78, 0.08), rgba(255, 255, 255, 0.34));
}

.template-layout {
  grid-template-columns: 1fr;
  gap: 1.35rem;
}

.template-block {
  border-radius: 0;
  border-left: 4px solid rgba(62, 82, 25, 0.35);
  padding: 1.2rem 1.25rem 1.3rem;
  background: var(--surface-hi);
}

.template-block__head {
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.template-pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: "Plus Jakarta Sans", sans-serif;
  line-height: 1.95;
  padding: 1.4rem;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.55);
  border: none;
}

.copy-feedback {
  min-height: 1.6rem;
  margin: 0.8rem 0 0;
  color: var(--accent);
  font-weight: 600;
}

.support-stack {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.support-card {
  border-radius: 0;
  border-left: 4px solid rgba(62, 82, 25, 0.16);
  padding: 1.15rem 1.25rem;
  height: 100%;
}

.support-card ul {
  padding-left: 1.1rem;
  margin: 0.5rem 0 0;
}

.related-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.related-card--link {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.8rem;
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.related-card--link:hover {
  transform: translateY(-2px);
  border-left-color: rgba(62, 82, 25, 0.5);
  box-shadow: 0 16px 28px rgba(31, 27, 22, 0.05);
}

.related-card--link:focus-visible {
  transform: translateY(-2px);
  border-left-color: rgba(62, 82, 25, 0.5);
  box-shadow: 0 16px 28px rgba(31, 27, 22, 0.05);
  outline: none;
}

.related-card__linktext {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--ink);
  font-weight: 600;
  border-bottom: 0.5px solid var(--line-strong);
  padding-bottom: 0.15rem;
}

.site-footer {
  padding: 0 0 2rem;
}

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

  .tone-ladder,
  .template-preview-grid,
  .guidance-grid,
  .related-grid,
  .meta-strip,
  .template-config__grid,
  .support-stack,
  .hero__mini-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 2rem;
  }

  .ad-slot--layout-wide {
    display: none;
  }

  .ad-slot--layout-compact {
    display: block;
  }

  h1 {
    max-width: 9ch;
  }
}

@media (max-width: 640px) {
  .site-header,
  .site-footer,
  .section-shell {
    width: min(calc(100% - 1.2rem), var(--max));
  }

  .section-shell {
    padding-top: 2.7rem;
  }

  h1 {
    font-size: clamp(2rem, 11vw, 3.1rem);
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .document-card {
    transform: none;
  }

  .chip {
    width: 100%;
    justify-content: flex-start;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__actions .button {
    width: 100%;
  }

  .hero__lead,
  .hero__note,
  .selection-note,
  .body-stack p,
  .support-card p,
  .related-card p,
  .preview-card p {
    line-height: 1.65;
  }

  .template-block,
  .support-card,
  .guidance-card,
  .related-card,
  .preview-card {
    padding: 1rem;
  }

  .template-pre {
    padding: 1rem;
    font-size: 0.94rem;
    line-height: 1.8;
  }

  .template-block__head,
  .template-tools {
    flex-direction: column;
    align-items: stretch;
  }

  .template-block__head .button,
  .template-tools .button {
    width: 100%;
  }

  .document-card {
    width: 100%;
    padding: 1.2rem 1rem;
  }

  .document-card__title {
    font-size: 1.5rem;
  }
}
