:root {
  --ink: #141413;
  --paper: #f4eee7;
  --signal: #e50803;
  --card: #fffdf7;
  --line: #d7d1c5;
  --muted: #6f6b63;
  --soft: #eee8dc;
  --outer: #f4eee7;
  --display: "Arial Black", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --body: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--outer);
  color: var(--ink);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
summary,
label {
  -webkit-tap-highlight-color: transparent;
}

.page-shell {
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background-color: var(--paper);
  background-image: radial-gradient(rgba(20, 20, 19, 0.035) 0.65px, transparent 0.65px);
  background-size: 5px 5px;
  box-shadow: 0 0 56px rgba(20, 20, 19, 0.16);
}

.fv {
  line-height: 0;
  background: var(--paper);
}

.fv img {
  display: block;
  width: calc(100% - 32px);
  max-width: 480px;
  height: auto;
  margin: 0 auto;
}

.page-shell.is-thanks {
  display: flex;
  min-height: 100svh;
  flex-direction: column;
}

.page-shell.is-thanks .fv,
.page-shell.is-thanks .form-card {
  display: none;
}

.form-card {
  position: relative;
  margin: 0 16px 58px;
  border: 2px solid var(--ink);
  background: var(--card);
  box-shadow: 9px 9px 0 var(--signal);
  scroll-margin-top: 14px;
}

.form-bridge {
  position: absolute;
  z-index: 2;
  top: -22px;
  left: 50%;
  display: grid;
  width: 112px;
  height: 40px;
  place-items: center;
  border: 2px solid var(--ink);
  background: var(--paper);
  transform: translateX(-50%) skewX(-8deg);
}

.form-bridge span {
  color: var(--signal);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  transform: skewX(8deg);
}

.step-progress {
  padding: 38px 22px 22px;
  border-bottom: 1px solid var(--line);
}

.progress-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 11px;
}

.progress-meta span {
  color: var(--signal);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.11em;
}

.progress-meta strong {
  font-size: 15px;
  font-weight: 900;
}

.progress-track {
  height: 5px;
  overflow: hidden;
  background: var(--soft);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--signal);
  transition: width 220ms ease;
}

.step-progress ol {
  display: flex;
  justify-content: space-between;
  margin: 17px 0 0;
  padding: 0;
  list-style: none;
}

.step-progress li {
  display: grid;
  justify-items: center;
  gap: 5px;
  color: #aaa59b;
  font-size: 15px;
  font-weight: 800;
}

.step-progress li span {
  display: grid;
  width: 26px;
  height: 26px;
  place-content: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: var(--card);
  font-size: 11px;
}

.step-progress li.is-active,
.step-progress li.is-done {
  color: var(--signal);
}

.step-progress li.is-active span {
  background: var(--signal);
  color: white;
}

.step-panel {
  min-width: 0;
  padding: 34px 22px 28px;
}

.step-panel[hidden] {
  display: none;
}

.question-number {
  margin: 0 0 8px;
  color: var(--signal);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.step-panel h2,
.thanks-panel h2 {
  margin: 0 0 28px;
  font-family: var(--display);
  font-size: clamp(27px, 7.6vw, 34px);
  line-height: 1.25;
  letter-spacing: -0.055em;
}

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

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

.step-question-block + .step-question-block {
  margin-top: 22px;
}

.step-field-label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 900;
}

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

.affiliation-button,
.timing-button {
  position: relative;
  display: grid;
  min-height: 58px;
  place-items: center;
  border: 2px solid var(--ink);
  background: transparent;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, color 140ms ease;
}

.affiliation-button input,
.timing-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.affiliation-button span,
.timing-button span {
  font-size: 16px;
  font-weight: 900;
}

.affiliation-button:has(input:checked),
.timing-button:has(input:checked) {
  background: var(--signal);
  color: white;
  transform: translate(-3px, -3px);
  box-shadow: 5px 5px 0 var(--ink);
}

.choice-button {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  min-height: 68px;
  align-items: center;
  padding: 12px 15px 12px 18px;
  border: 2px solid var(--ink);
  background: transparent;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, color 140ms ease;
}

.choice-button input,
.check-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.choice-button > span {
  font-size: 17px;
  font-weight: 900;
}

.choice-button small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.choice-button b {
  display: grid;
  width: 32px;
  height: 32px;
  place-content: center;
  background: var(--ink);
  color: var(--paper);
  font-size: 17px;
}

.choice-button:has(input:checked) {
  background: var(--signal);
  color: white;
  transform: translate(-3px, -3px);
  box-shadow: 5px 5px 0 var(--ink);
}

.choice-button:has(input:checked) small {
  color: rgba(255, 255, 255, 0.78);
}

.selection-count {
  width: max-content;
  margin: -12px 0 15px auto;
  padding: 5px 10px;
  background: var(--ink);
  color: var(--paper);
  font-size: 11px;
  font-weight: 900;
}

.reason-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.check-card {
  position: relative;
  display: grid;
  min-height: 92px;
  place-items: center;
  padding: 12px 10px 12px 34px;
  border: 2px solid var(--ink);
  cursor: pointer;
  text-align: center;
}

.check-card::before {
  position: absolute;
  top: 8px;
  left: 8px;
  display: grid;
  width: 17px;
  height: 17px;
  place-content: center;
  border: 1px solid var(--ink);
  content: "";
  font-size: 12px;
  font-weight: 900;
}

.check-card span {
  font-size: 14.4px;
  font-weight: 800;
  line-height: 1.55;
}

.check-card:has(input:checked) {
  border-color: var(--signal);
  background: var(--signal);
  color: white;
}

.check-card:has(input:checked)::before {
  border-color: white;
  content: "✓";
}

.check-card.is-limit-disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.field-group {
  min-width: 0;
  margin-bottom: 20px;
}

.field-group > label,
.field-group > .field-label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 900;
}

.required,
.optional {
  padding: 3px 6px;
  background: var(--signal);
  color: white;
  font-size: 9px;
  font-weight: 900;
}

.optional {
  background: var(--ink);
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="tel"],
select {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 54px;
  padding: 0 14px;
  border: 2px solid var(--ink);
  border-radius: 0;
  outline: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
}

input:focus,
select:focus,
button:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 3px;
}

input[aria-invalid="true"],
select[aria-invalid="true"] {
  border-color: var(--signal);
}

.select-wrap {
  position: relative;
}

.select-wrap::after {
  position: absolute;
  top: 50%;
  right: 17px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  content: "";
  pointer-events: none;
  transform: translateY(-70%) rotate(45deg);
}

select {
  appearance: none;
  padding-right: 42px;
}

.field-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.optional-locations {
  margin: 2px 0 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.optional-locations summary {
  padding: 16px 3px;
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.optional-locations[open] summary {
  margin-bottom: 16px;
  color: var(--signal);
}

.privacy-check {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 8px;
  padding: 15px;
  border: 1px solid var(--line);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
}

.privacy-check input {
  width: 19px;
  height: 19px;
  margin: 0;
  accent-color: var(--signal);
}

.field-error {
  min-height: 1.4em;
  margin: 5px 0 0;
  color: var(--signal);
  font-size: 11px;
  font-weight: 800;
}

.button-row {
  display: grid;
  grid-template-columns: 0.72fr 1.7fr;
  gap: 10px;
  margin-top: 22px;
}

.button-row button {
  min-height: 58px;
  border: 2px solid var(--ink);
  border-radius: 0;
  cursor: pointer;
  font-weight: 900;
}

.back-button {
  background: transparent;
  color: var(--ink);
}

.next-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  background: var(--signal);
  color: white;
  box-shadow: 5px 5px 0 var(--ink);
}

.next-button span {
  font-size: 21px;
}

.thanks-panel {
  display: grid;
  min-height: calc(100svh - 103px);
  flex: 1;
  place-content: center;
  padding: 64px 30px 58px;
  background: var(--paper);
  text-align: center;
}

.thanks-logo {
  display: block;
  width: min(64vw, 250px);
  height: auto;
  margin: 0 auto 34px;
}

.thanks-mark {
  display: grid;
  width: 68px;
  height: 68px;
  margin: 0 auto 30px;
  place-content: center;
  background: var(--signal);
  color: white;
  box-shadow: 6px 6px 0 var(--ink);
  font-size: 34px;
  font-weight: 900;
  transform: rotate(-4deg);
}

.thanks-panel h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(28px, 7vw, 36px);
  line-height: 1.28;
  letter-spacing: -0.055em;
}

.thanks-panel h2 span {
  display: block;
  white-space: nowrap;
}

.thanks-message {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  line-height: 2;
}

.site-footer {
  display: grid;
  gap: 13px;
  justify-items: center;
  padding: 28px 20px 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.noscript {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  margin: 0;
  padding: 12px;
  background: var(--signal);
  color: white;
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (hover: hover) {
  .choice-button:hover,
  .check-card:hover {
    box-shadow: 4px 4px 0 var(--ink);
  }

  .next-button:hover {
    box-shadow: 7px 7px 0 var(--ink);
  }
}

@media (max-width: 380px) {
  .reason-grid {
    grid-template-columns: 1fr;
  }

  .check-card {
    min-height: 62px;
  }

}

@media (min-width: 700px) {
  .page-shell {
    margin-block: 28px;
    min-height: calc(100vh - 56px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

.footer-link,
.policy-link {
  color: inherit;
  text-underline-offset: 3px;
}

.policy-link {
  color: var(--signal);
  font-weight: 700;
}

/* ===== 規約ページ・規約モーダル共通 ===== */
.legal-shell {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.legal-head {
  display: grid;
  gap: 14px;
  justify-items: center;
  text-align: center;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--ink);
}

.legal-head img {
  width: 180px;
  max-width: 60%;
  height: auto;
}

.legal-head h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: 0.04em;
}

.legal-intro {
  margin: 24px 0 0;
  font-size: 14px;
  line-height: 1.9;
}

.legal-section {
  margin-top: 32px;
}

.legal-section h2 {
  margin: 0 0 12px;
  padding-left: 10px;
  border-left: 4px solid var(--signal);
  font-size: 16px;
  line-height: 1.5;
}

.legal-section p,
.legal-section li {
  font-size: 14px;
  line-height: 1.9;
}

.legal-section p {
  margin: 0 0 12px;
}

.legal-section ul {
  margin: 0 0 12px;
  padding-left: 1.2em;
}

.legal-section li {
  margin-bottom: 6px;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.legal-table th,
.legal-table td {
  padding: 10px 12px;
  border: 1px solid var(--line);
  text-align: left;
  line-height: 1.8;
  vertical-align: top;
}

.legal-table th {
  width: 34%;
  background: var(--soft);
  font-weight: 700;
}

.legal-meta {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
  line-height: 1.9;
}

.legal-back {
  display: block;
  margin-top: 32px;
  padding: 16px;
  background: var(--ink);
  color: var(--card);
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
  text-align: center;
  text-decoration: none;
}

@media (min-width: 600px) {
  .legal-head h1 {
    font-size: 26px;
  }
}
/* ===== プライバシーポリシーのモーダル ===== */
.policy-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: min(80vh, 720px);
  padding: 0;
  border: none;
  border-radius: 14px;
  background: var(--card);
  color: var(--ink);
  overflow: hidden;
}

.policy-dialog::backdrop {
  background: rgba(20, 20, 19, 0.6);
}

.policy-dialog[open] {
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.policy-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 12px 16px 20px;
  border-bottom: 2px solid var(--ink);
}

.policy-dialog-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 16px;
  letter-spacing: 0.03em;
}

.policy-dialog-close {
  flex: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--soft);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.policy-dialog-close:hover {
  background: var(--line);
}

.policy-dialog-body {
  padding: 4px 20px 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.policy-dialog-body .legal-section {
  margin-top: 24px;
}

.policy-dialog-body .legal-intro {
  margin-top: 20px;
}

.policy-dialog-loading {
  padding: 32px 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.policy-dialog-foot {
  padding: 12px 20px 16px;
  border-top: 1px solid var(--line);
}

.policy-dialog-done {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 8px;
  background: var(--ink);
  color: var(--card);
  font-family: var(--body);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
