:root {
  --bg: #f4f6f9;
  --paper: #f7f9fc;
  --card: #ffffff;
  --navy: #3D5A80;
  --navy-soft: #4F6E95;
  --text: #3D3D3D;
  --muted: #6E7686;
  --green: #EAF1F6;
  --green-strong: #4F6E95;
  --blue: #DCE9F1;
  --sand: #E8EFF5;
  --coral: #E07A5F;
  --line: #DCE4EC;
  --shadow: 0 18px 45px rgba(45, 50, 55, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Hiragino Sans", "Yu Gothic", "YuGothic", "Noto Sans JP", system-ui, sans-serif;
  line-height: 1.75;
  background:
    radial-gradient(circle at 12% 10%, rgba(212, 227, 240, 0.65), transparent 26rem),
    linear-gradient(180deg, #eaeef2 0%, var(--bg) 42%, #EDF2F6 100%);
}

button,
input {
  font: inherit;
}

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

.hero {
  padding: 44px 0 24px;
}

.hero__inner {
  padding: 34px 0 26px;
  border-bottom: 1px solid rgba(24, 50, 75, 0.12);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green-strong);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--navy);
  line-height: 1.35;
  letter-spacing: 0;
}

h1 {
  max-width: 900px;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.18;
  letter-spacing: 0;
  word-break: keep-all;
  overflow-wrap: normal;
  text-wrap: balance;
}

.hero-title {
  display: flex;
  flex-wrap: wrap;
  column-gap: 0.18em;
  row-gap: 0.05em;
}

.hero-title span {
  display: inline-block;
  white-space: nowrap;
}

.lead {
  max-width: 780px;
  margin: 14px 0 8px;
  color: var(--navy-soft);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 700;
}

.hero__text {
  max-width: 830px;
  margin: 0;
  color: var(--muted);
}

.notice {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  margin: 26px 0 42px;
  padding: 24px;
  background: rgba(255, 250, 242, 0.9);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.notice__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--navy);
  font-weight: 800;
  background: var(--green);
  border-radius: 999px;
}

.notice h2 {
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.notice p {
  margin: 0 0 4px;
  color: #4A5568;
  font-size: 0.95rem;
}

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

.section-heading p:last-child {
  margin: 8px 0 0;
  color: var(--muted);
}

.progress-card {
  position: sticky;
  top: 10px;
  z-index: 5;
  margin: 0 0 18px;
  padding: 14px 16px;
  background: rgba(255, 250, 242, 0.95);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(45, 50, 55, 0.08);
  backdrop-filter: blur(8px);
}

.progress-card__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--navy);
  font-weight: 800;
}

.progress-card__top span {
  color: var(--muted);
  font-size: 0.92rem;
}

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

.progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--green-strong), #98C1D9);
  border-radius: inherit;
  transition: width 0.22s ease;
}

.question-list {
  display: grid;
  gap: 18px;
}

.question-card {
  padding: 28px 32px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(45, 50, 55, 0.08);
}

.question-card.is-missing {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(224, 122, 95, 0.18);
}

.question-header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.question-title {
  margin: 0 0 22px;
  color: var(--navy);
  font-size: clamp(1rem, 2vw, 1.26rem);
  font-weight: 800;
  line-height: 1.55;
}

.question-number {
  flex: 0 0 auto;
  padding: 4px 11px;
  color: var(--navy);
  background: var(--blue);
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 900;
}

.question-category {
  width: fit-content;
  padding: 4px 10px;
  color: #2e527d;
  background: #ecf0f6;
  border: 1px solid #c9d5e4;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
}

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

.choice {
  position: relative;
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  min-height: 58px;
  padding: 13px 14px;
  color: #3D3D3D;
  background: #f8fbff;
  border: 1px solid #DCE4EC;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.choice:hover {
  transform: translateY(-1px);
  border-color: var(--green-strong);
  background: #f9fcff;
}

.choice input {
  width: 18px;
  height: 18px;
  margin: 4px 0 0;
  accent-color: var(--green-strong);
}

.choice:has(input:checked) {
  border-color: #2e527d;
  background: linear-gradient(180deg, #f2f6fb 0%, #eaeff6 100%);
  box-shadow: inset 0 0 0 2px rgba(79, 110, 149, 0.22);
  color: var(--navy);
  font-weight: 800;
}

.form-alert {
  min-height: 28px;
  margin: 18px 0 0;
  color: #9b4935;
  font-weight: 700;
}

.form-actions {
  display: flex;
  justify-content: center;
  margin: 34px 0 62px;
  padding: 10px 0;
}

.primary-button,
.secondary-button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  letter-spacing: 0;
}

.primary-button {
  min-width: min(100%, 360px);
  padding: 16px 26px;
  color: white;
  background: var(--navy);
  box-shadow: 0 12px 26px rgba(24, 50, 75, 0.22);
}

.secondary-button {
  padding: 11px 18px;
  color: var(--navy);
  background: #ffffff;
  border: 1px solid #b9c7d8;
}

.result-section {
  display: none;
  margin: 28px 0 76px;
}

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

.result-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 16px;
}

.result-sheet {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(24, 50, 75, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(24, 50, 75, 0.04) 1px, transparent 1px),
    var(--paper);
  background-size: 28px 28px;
  border: 1px solid #bbcadd;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.result-sheet::before {
  content: "";
  position: absolute;
  inset: 14px;
  pointer-events: none;
  border: 1px solid rgba(24, 50, 75, 0.12);
  border-radius: 6px;
}

.result-hero {
  position: relative;
  padding: 36px 42px 30px;
  background:
    radial-gradient(circle at 86% 18%, rgba(212, 227, 240, 0.95), transparent 12rem),
    linear-gradient(135deg, rgba(217, 232, 237, 0.9), rgba(255, 250, 242, 0.94) 58%),
    var(--paper);
  border-bottom: 1px solid var(--line);
}

.result-hero__stamp {
  position: absolute;
  top: 24px;
  right: 30px;
  padding: 7px 13px;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(24, 50, 75, 0.18);
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 800;
}

.result-hero__label {
  margin: 0 0 8px;
  color: var(--navy-soft);
  font-size: 0.95rem;
  font-weight: 800;
}

.result-title {
  max-width: 820px;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.18;
  text-wrap: balance;
}

.type-badge {
  display: flex;
  align-items: center;
  width: fit-content;
  margin-top: 14px;
  padding: 8px 16px;
  color: var(--navy);
  background: linear-gradient(180deg, #edf2f7 0%, #d9e8ed 100%);
  border: 1px solid rgba(127, 168, 144, 0.45);
  border-radius: 999px;
  font-size: clamp(1rem, 1.8vw, 1.18rem);
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: 0 8px 18px rgba(45, 50, 55, 0.07);
}

.catchcopy {
  position: relative;
  display: block;
  width: fit-content;
  max-width: 720px;
  margin: 18px 0 0;
  padding: 13px 19px 13px 22px;
  color: var(--navy);
  background: #fff;
  border: 1px solid #dbe2ea;
  border-left: 7px solid var(--green-strong);
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(45, 50, 55, 0.08);
  font-weight: 800;
}

.catchcopy::after {
  content: "";
  position: absolute;
  left: 28px;
  bottom: -9px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-right: 1px solid #dbe2ea;
  border-bottom: 1px solid #dbe2ea;
  transform: rotate(45deg);
}

.hidden-type {
  max-width: 760px;
  margin: 24px 0 0;
  padding: 14px 16px;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.62);
  border: 1px dashed rgba(24, 50, 75, 0.28);
  border-radius: 8px;
}

.result-content {
  display: grid;
  gap: 20px;
  padding: 30px;
}

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

.result-card {
  position: relative;
  padding: 22px;
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(45, 50, 55, 0.055);
}

.result-card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 1.05rem;
}

.result-card h3::before {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--green-strong);
  border-radius: 999px;
}

.result-card p {
  margin: 0;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  padding: 8px 12px;
  color: var(--navy);
  background: #e8f1f3;
  border: 1px solid #ccdde3;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
}

.equipment-card .tag-list li {
  background: #edf2f7;
  border-color: #d0d9e5;
}

.bubble-list {
  display: grid;
  gap: 10px;
}

.bubble-list p {
  margin: 0;
  padding: 12px 14px;
  color: #344049;
  background: #ffffff;
  border: 1px solid #c7d4e5;
  border-left: 5px solid #98C1D9;
  border-radius: 8px;
}

.speech {
  position: relative;
  background: #f5f8fb;
  border-color: #d8e0ea;
}

.theme-card {
  padding: 24px 24px 26px;
}

.theme-card p {
  color: #334149;
  font-size: 1rem;
  line-height: 1.95;
}

.speech::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 28px;
  width: 20px;
  height: 20px;
  background: #f5f8fb;
  border-top: 1px solid #d8e0ea;
  border-left: 1px solid #d8e0ea;
  transform: rotate(45deg);
}

.sheet-block {
  padding: 0;
}

.sheet-block__heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.sheet-block__heading p {
  margin: 0;
  color: var(--green-strong);
  font-size: 0.82rem;
  font-weight: 900;
}

.sheet-block__heading h3 {
  font-size: 1.25rem;
}

.staff-block {
  display: grid;
  gap: 16px;
  margin-top: 6px;
  padding: 20px;
  background: #edf3f5;
  border: 1px solid #cbdfe5;
  border-radius: 8px;
}

.staff-block .sheet-block__heading {
  background: var(--navy);
  border-color: var(--navy);
}

.staff-block .sheet-block__heading p,
.staff-block .sheet-block__heading h3 {
  color: #ffffff;
}

.staff-block .result-card {
  background: #ffffff;
  border-color: #d6e3e7;
}

.staff-block .result-card h3::before {
  background: #98C1D9;
}

.line-box {
  white-space: pre-line;
  padding: 16px;
  background: #ffffff;
  border: 1px solid #d7dee6;
  border-radius: 8px;
}

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

.action-card {
  min-height: 156px;
}

.write-lines {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.write-lines span {
  display: block;
  height: 1px;
  background: repeating-linear-gradient(
    90deg,
    #adc4cb 0,
    #adc4cb 10px,
    transparent 10px,
    transparent 16px
  );
}

.check-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 30px;
  color: var(--navy);
  font-weight: 700;
}

.check-list li::before {
  content: "";
  position: absolute;
  top: 0.34em;
  left: 0;
  width: 17px;
  height: 17px;
  background: #ffffff;
  border: 2px solid #98C1D9;
  border-radius: 4px;
}

.copy-status {
  margin: 8px 0 0;
  color: var(--green-strong);
  font-weight: 800;
  text-align: right;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  padding: 18px;
}

.modal.is-open {
  display: grid;
  place-items: center;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 50, 75, 0.36);
  backdrop-filter: blur(4px);
}

.modal__panel {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(86vh, 760px);
  overflow: auto;
  padding: 28px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.modal__panel h2 {
  margin-bottom: 12px;
  font-size: 1.45rem;
}

.modal__panel h3 {
  margin: 16px 0 8px;
  font-size: 1rem;
}

.modal__panel p {
  margin: 0 0 10px;
}

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

.modal__grid ol {
  margin: 0;
  padding-left: 1.35em;
}

.modal__note {
  margin-top: 16px !important;
  padding: 12px 14px;
  color: var(--navy);
  background: #f3f7fb;
  border: 1px solid #c9d5e4;
  border-radius: 8px;
  font-weight: 800;
}

.modal__close {
  margin-top: 14px;
}

.site-footer {
  padding: 0 0 34px;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

@media (max-width: 760px) {
  main,
  .hero__inner,
  .site-footer {
    width: min(100% - 22px, 1120px);
  }

  .hero {
    padding-top: 26px;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(2rem, 8vw, 2.8rem);
    line-height: 1.16;
  }

  .hero__inner {
    padding: 28px 0 22px;
  }

  .hero-title {
    display: block;
  }

  .hero-title span {
    display: block;
  }

  .notice,
  .choices,
  .result-grid,
  .staff-note-grid,
  .check-list {
    grid-template-columns: 1fr;
  }

  .notice,
  .result-hero,
  .result-content {
    padding: 18px;
  }

  .question-card {
    padding: 22px 16px;
  }

  .question-header {
    gap: 8px;
    margin-bottom: 12px;
  }

  .question-title {
    margin-bottom: 18px;
    font-size: 1rem;
    line-height: 1.6;
  }

  .progress-card {
    top: 0;
    margin-inline: -2px;
  }

  .form-actions {
    margin: 26px 0 48px;
  }

  .choice {
    min-height: 54px;
    padding: 14px 13px;
  }

  .modal__panel {
    padding: 22px 16px;
  }

  .modal__grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .result-toolbar {
    justify-content: stretch;
  }

  .secondary-button {
    flex: 1 1 170px;
  }

  .result-hero__stamp {
    position: static;
    display: inline-block;
    margin-bottom: 14px;
  }

  .result-title {
    font-size: clamp(1.7rem, 8vw, 2.4rem);
  }

  .type-badge {
    margin-top: 12px;
    padding: 7px 13px;
    font-size: 0.98rem;
  }

  .sheet-block__heading {
    display: block;
  }

  .sheet-block__heading h3 {
    margin-top: 4px;
  }

  .staff-block {
    padding: 14px;
  }

  .theme-card {
    padding: 20px;
  }

  .theme-card p {
    font-size: 0.98rem;
    line-height: 1.9;
  }

  .action-card {
    min-height: 130px;
  }
}

@media print {
  @page {
    size: A4;
    margin: 12mm;
  }

  body {
    background: white;
    color: #222;
    font-size: 9.4pt;
    line-height: 1.35;
  }

  .hero,
  .notice,
  .form-section,
  .result-toolbar,
  .site-footer,
  .modal {
    display: none !important;
  }

  main {
    width: 100%;
  }

  .result-section,
  .result-section.is-visible {
    display: block !important;
    margin: 0;
  }

  .result-sheet {
    border: 0;
    box-shadow: none;
    background: white;
    overflow: visible;
  }

  .customer-sheet {
    break-after: page;
    page-break-after: always;
  }

  .staff-sheet {
    break-before: page;
    page-break-before: always;
  }

  .result-sheet::before,
  .catchcopy::after,
  .speech::before {
    display: none;
  }

  .result-hero {
    padding: 0 0 4mm;
    background: white;
  }

  .result-hero__stamp {
    position: static;
    display: inline-block;
    padding: 1.5mm 3mm;
    margin-bottom: 2mm;
    border-color: #cfcfcf;
  }

  .result-hero__label {
    margin-bottom: 1mm;
    font-size: 13px;
  }

  .result-title {
    max-width: 100%;
    font-size: 32px;
    line-height: 1.14;
  }

  .type-badge {
    margin-top: 2.4mm;
    padding: 1.5mm 3mm;
    background: white;
    border: 1px solid #cfcfcf;
    box-shadow: none;
    font-size: 15px;
  }

  .catchcopy,
  .hidden-type,
  .type-badge,
  .result-card,
  .line-box,
  .sheet-block__heading,
  .staff-block,
  .bubble-list p,
  .write-lines span {
    break-inside: avoid;
    background: white;
    border-color: #cfcfcf;
    box-shadow: none;
  }

  .result-content {
    padding: 0;
    gap: 4mm;
  }

  .customer-content {
    gap: 2.2mm;
  }

  .staff-content {
    gap: 3mm;
  }

  .result-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 3mm;
  }

  .customer-sheet .result-grid {
    gap: 2mm;
  }

  .result-card {
    padding: 3mm;
  }

  .customer-sheet .result-card {
    padding: 2.2mm;
  }

  .result-card h3 {
    margin-bottom: 1.5mm;
    font-size: 10pt;
  }

  .customer-sheet .result-card h3 {
    margin-bottom: 1mm;
    font-size: 9pt;
  }

  .customer-sheet .result-card p {
    font-size: 8.2pt;
    line-height: 1.32;
  }

  .theme-card {
    padding: 3mm;
  }

  .theme-card p {
    font-size: 9pt;
    line-height: 1.42;
  }

  .customer-sheet .theme-card {
    padding: 2.2mm;
  }

  .customer-sheet .theme-card p {
    font-size: 8.2pt;
    line-height: 1.32;
  }

  .catchcopy,
  .hidden-type {
    margin-top: 3mm;
    padding: 2.5mm 3mm;
  }

  .catchcopy {
    font-size: 15px;
  }

  .sheet-block__heading {
    padding: 2.5mm 3mm;
  }

  .sheet-block__heading p {
    font-size: 7.5pt;
  }

  .sheet-block__heading h3 {
    font-size: 12pt;
  }

  .staff-block {
    gap: 3mm;
    margin-top: 0;
    padding: 3mm;
  }

  .staff-note-grid,
  .check-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 3mm;
  }

  .action-card {
    min-height: 28mm;
  }

  .write-lines {
    gap: 5mm;
    margin-top: 5mm;
  }

  .write-lines span {
    border-bottom: 1px dashed #9a9a9a;
  }

  .check-list li {
    padding-left: 6mm;
    font-size: 8.8pt;
  }

  .check-list li::before {
    top: 0.2em;
    width: 3.8mm;
    height: 3.8mm;
    border-color: #777;
  }

  .tag-list li {
    padding: 1.5mm 2.2mm;
    border: 1px solid #cfcfcf;
    background: white;
    font-size: 8.4pt;
  }

  .customer-sheet .tag-list {
    gap: 1.2mm;
  }

  .customer-sheet .tag-list li {
    padding: 1.2mm 1.8mm;
    font-size: 7.6pt;
  }

  .bubble-list {
    gap: 1.8mm;
  }

  .bubble-list p {
    padding: 2mm 2.5mm;
  }

  .customer-sheet .bubble-list {
    gap: 1.2mm;
  }

  .customer-sheet .bubble-list p {
    padding: 1.3mm 1.8mm;
    font-size: 7.8pt;
    line-height: 1.25;
  }
}
