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

:root {
  --ivory: #fffaf2;
  --cream: #f7ecdd;
  --rose: #f4c8c2;
  --rose-deep: #c96f65;
  --brown: #5b4034;
  --brown-soft: #8a6657;
  --sage: #7b8b6f;
  --ink: #2f2621;
  --line: #e7d8ca;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(91, 64, 52, 0.13);
}

html {
  min-width: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.75;
  letter-spacing: 0;
  text-size-adjust: 100%;
}

body {
  min-width: 0;
  margin: 0;
  background: linear-gradient(180deg, #fffaf2 0%, #fff7f4 46%, #fffaf2 100%);
}

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

img, svg, canvas {
  max-width: 100%;
}

button, input, textarea {
  font: inherit;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 40px);
  border-bottom: 1px solid rgba(231, 216, 202, 0.9);
  background: rgba(255, 250, 242, 0.94);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--brown);
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--rose);
  color: var(--brown);
  font-size: 15px;
}

.brand-text {
  display: grid;
  gap: 1px;
  line-height: 1.25;
}

.brand-text small {
  color: var(--brown-soft);
  font-size: 11px;
  font-weight: 700;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 16px;
  color: var(--brown-soft);
  font-size: 14px;
  font-weight: 700;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 5px 0;
}

.site-nav a[aria-current="page"] {
  color: var(--rose-deep);
}

.section-band {
  background: radial-gradient(circle at 18% 12%, rgba(244, 200, 194, 0.58), transparent 32%), linear-gradient(135deg, #fffaf2, #f8e9df 64%, #fff6f0);
}

.hero {
  padding: clamp(48px, 8vw, 92px) 0 clamp(36px, 6vw, 72px);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.78fr);
  gap: clamp(28px, 6vw, 64px);
  align-items: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--rose-deep);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

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

h1 {
  margin: 0;
  color: var(--brown);
  font-size: clamp(36px, 7vw, 68px);
  line-height: 1.15;
}

h2 {
  margin: 0 0 14px;
  color: var(--brown);
  font-size: clamp(24px, 4vw, 36px);
  line-height: 1.25;
}

h3 {
  margin: 0 0 8px;
  color: var(--brown);
  font-size: 19px;
  line-height: 1.35;
}

.lead {
  margin: 20px 0 0;
  color: var(--brown-soft);
  font-size: clamp(17px, 2.4vw, 21px);
  line-height: 1.8;
}

.hero-actions, .button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  min-width: 150px;
  padding: 13px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

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

.button.primary {
  background: var(--brown);
  color: var(--white);
  box-shadow: 0 12px 28px rgba(91, 64, 52, 0.22);
}

.button.secondary {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.76);
  color: var(--brown);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  box-shadow: none;
}

.hero-panel {
  padding: clamp(18px, 4vw, 26px);
  border: 1px solid rgba(231, 216, 202, 0.95);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
}

.memo-preview {
  min-height: 320px;
  padding: clamp(22px, 5vw, 34px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #fff8f4);
}

.memo-label {
  width: fit-content;
  margin: 0 0 24px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f1e3d3;
  color: var(--brown-soft);
  font-size: 12px;
  font-weight: 800;
}

.memo-preview h2 {
  font-size: clamp(24px, 4vw, 34px);
}

.memo-preview ul {
  display: grid;
  gap: 12px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.memo-preview li {
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff3ea;
  color: var(--brown-soft);
  font-weight: 700;
}

.content-section, .guide-layout, .policy-page {
  padding: clamp(42px, 7vw, 76px) 0;
}

.text-block.wide {
  max-width: 780px;
}

.text-block p, .guide-section p, .policy-page p {
  margin: 0 0 12px;
  color: var(--brown-soft);
  font-size: 16px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.feature-card, .guide-section, .review-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 25px rgba(91, 64, 52, 0.08);
}

.feature-card {
  padding: 22px;
}

.feature-card p {
  margin: 0;
  color: var(--brown-soft);
}

.compact-hero {
  padding: clamp(42px, 7vw, 72px) 0;
}

.page-hero h1 {
  max-width: 760px;
  font-size: clamp(34px, 6vw, 56px);
}

.page-hero .lead {
  max-width: 820px;
  margin-bottom: 26px;
}

.guide-layout {
  display: grid;
  gap: 18px;
}

.guide-section {
  padding: clamp(22px, 4vw, 32px);
}

.note-section {
  border-color: rgba(201, 111, 101, 0.35);
  background: #fff6f3;
}

.caution-section {
  border-color: rgba(123, 139, 111, 0.38);
  background: #fbfaf1;
}

.topic-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.topic-list span {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff9f2;
  color: var(--brown);
  font-weight: 700;
}

.center-action {
  display: flex;
  justify-content: center;
  padding-top: 10px;
}

.memo-shell {
  padding-bottom: 44px;
}

.memo-intro {
  padding: clamp(32px, 6vw, 54px) 0 18px;
}

.memo-intro h1 {
  max-width: 820px;
  font-size: clamp(31px, 6vw, 52px);
}

.memo-intro p:not(.eyebrow) {
  max-width: 820px;
  margin: 16px 0 0;
  color: var(--brown-soft);
}

.privacy-note {
  padding: 12px 14px;
  border-left: 4px solid var(--sage);
  border-radius: 6px;
  background: #fbfaf1;
}

.chat-app {
  max-width: 820px;
}

.progress-card {
  position: sticky;
  top: 65px;
  z-index: 10;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 242, 0.95);
  box-shadow: 0 10px 24px rgba(91, 64, 52, 0.08);
}

.progress-text {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--brown);
  font-size: 14px;
  font-weight: 800;
}

.progress-track {
  height: 9px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #eadccc;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--rose-deep), var(--sage));
  transition: width 0.24s ease;
}

.chat-log {
  display: grid;
  gap: 14px;
  padding: 22px 0 16px;
}

.bubble-row {
  display: flex;
}

.bubble-row.system {
  justify-content: flex-start;
}

.bubble-row.user {
  justify-content: flex-end;
}

.bubble {
  width: fit-content;
  max-width: min(86%, 620px);
  padding: 14px 16px;
  border-radius: 8px;
  box-shadow: 0 9px 20px rgba(91, 64, 52, 0.07);
  overflow-wrap: anywhere;
}

.bubble.system {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--brown);
}

.bubble.user {
  background: var(--brown);
  color: var(--white);
}

.bubble.summary {
  border-color: rgba(123, 139, 111, 0.38);
  background: #fbfaf1;
  color: #4c5b43;
}

.bubble-title {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 800;
  opacity: 0.76;
}

.answer-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

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

.choice-button {
  min-height: 52px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf5;
  color: var(--brown);
  cursor: pointer;
  font-weight: 800;
  line-height: 1.35;
  text-align: left;
}

.choice-button[aria-pressed="true"] {
  border-color: var(--rose-deep);
  background: #fff0ec;
  box-shadow: inset 0 0 0 2px rgba(201, 111, 101, 0.16);
}

.free-field {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  color: var(--brown);
  font-weight: 800;
}

.free-field textarea {
  width: 100%;
  min-height: 112px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fffdf9;
  color: var(--ink);
}

.helper-text, .small-note, .status-message {
  margin: 10px 0 0;
  color: var(--brown-soft);
  font-size: 14px;
}

.review-panel {
  padding: clamp(20px, 4vw, 30px);
}

.review-panel h2 {
  font-size: clamp(24px, 4vw, 34px);
}

.review-list {
  display: grid;
  gap: 12px;
  margin: 20px 0;
}

.review-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.review-summary-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf5;
}

.review-summary-card h3 {
  font-size: 16px;
}

.review-summary-card ul {
  display: grid;
  gap: 7px;
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--brown-soft);
  font-size: 14px;
}

.review-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf5;
}

.review-item strong {
  display: block;
  color: var(--brown);
}

.review-item p {
  margin: 5px 0 0;
  color: var(--brown-soft);
}

.agreement-box {
  padding: 14px;
  border: 1px solid rgba(123, 139, 111, 0.36);
  border-radius: 8px;
  background: #fbfaf1;
}

.check-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: var(--brown);
  font-weight: 800;
}

.check-row input {
  width: 20px;
  height: 20px;
  margin-top: 3px;
  accent-color: var(--brown);
}

.pdf-mount {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 794px;
  background: white;
  color: #2f2621;
}

.pdf-document {
  width: 794px;
  padding: 46px;
  background: white;
  color: #2f2621;
  font-family: "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.65;
}

.pdf-document h1 {
  color: #5b4034;
  font-size: 30px;
}

.pdf-document h2 {
  margin-top: 26px;
  color: #5b4034;
  font-size: 19px;
}

.pdf-answer, .pdf-note {
  padding: 10px 12px;
  border: 1px solid #e7d8ca;
  border-radius: 6px;
  background: #fffaf2;
}

.pdf-document ul {
  padding-left: 20px;
}

.policy-page {
  max-width: 840px;
}

.policy-page section {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #fff7f0;
  color: var(--brown-soft);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 24px 0;
  font-size: 14px;
}

.footer-inner p {
  margin: 0;
}

.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.footer-note {
  color: var(--sage);
  font-weight: 800;
}

@media (max-width: 760px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand {
    white-space: normal;
  }

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

  .hero-inner, .feature-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    padding: 14px;
  }

  .memo-preview {
    min-height: 0;
  }

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

  .review-summary-grid {
    grid-template-columns: 1fr;
  }

  .progress-card {
    top: 108px;
  }

  .bubble {
    max-width: 92%;
  }

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

@media (max-width: 420px) {
  .container {
    width: min(100% - 24px, 1120px);
  }

  .site-header {
    padding: 12px;
  }

  .site-nav {
    gap: 8px 12px;
    font-size: 13px;
  }

  h1 {
    font-size: 32px;
  }

  .page-hero h1, .memo-intro h1 {
    font-size: 30px;
  }

  .answer-panel {
    padding: 14px;
  }

  .progress-card {
    top: 104px;
  }
}
