:root {
  --night-1: #09112f;
  --night-2: #1b2457;
  --night-3: #53357d;
  --ink: #1f2340;
  --muted: #66708d;
  --line: rgba(89, 77, 150, 0.18);
  --card: rgba(255, 255, 255, 0.94);
  --soft: #f7f4ff;
  --primary: #6849c6;
  --primary-dark: #4c329e;
  --secondary: #eef0ff;
  --gold: #f0cc77;
  --danger: #b04758;
  --focus: #ffcf5a;
  --footer-blue: #1565c0;
  --shadow: 0 24px 70px rgba(4, 8, 32, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.75;
  background:
    radial-gradient(circle at 13% 12%, rgba(255, 228, 157, 0.19) 0 1px, transparent 2px),
    radial-gradient(circle at 80% 17%, rgba(255, 255, 255, 0.30) 0 1px, transparent 2px),
    radial-gradient(circle at 63% 7%, rgba(255, 255, 255, 0.23) 0 1px, transparent 2px),
    radial-gradient(circle at 30% 34%, rgba(255, 255, 255, 0.18) 0 1px, transparent 2px),
    linear-gradient(145deg, var(--night-1), var(--night-2) 50%, var(--night-3));
  background-size: 170px 170px, 210px 210px, 260px 260px, 310px 310px, auto;
}

body::before,
body::after {
  position: fixed;
  z-index: -1;
  content: "";
  pointer-events: none;
  border-radius: 50%;
  filter: blur(5px);
}

body::before {
  top: -120px;
  right: -90px;
  width: 360px;
  height: 360px;
  background: rgba(162, 111, 218, 0.17);
}

body::after {
  bottom: -150px;
  left: -110px;
  width: 400px;
  height: 400px;
  background: rgba(77, 146, 211, 0.14);
}

button,
input,
select,
textarea {
  font: inherit;
}

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

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

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 8px;
  left: 8px;
  padding: 8px 14px;
  color: #10142d;
  background: #fff;
  border-radius: 999px;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-wrap {
  width: min(100% - 28px, 920px);
  margin: 0 auto;
  padding: 44px 0 24px;
}

.hero {
  position: relative;
  padding: 10px 20px 28px;
  color: #fff;
  text-align: center;
}

.hero-icon {
  width: 92px;
  height: 92px;
  margin-bottom: 10px;
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.28));
}

.eyebrow {
  margin: 0 0 2px;
  color: #f8dda1;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

h1 {
  margin: 0;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.hero-copy {
  max-width: 650px;
  margin: 12px auto 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(0.96rem, 2.5vw, 1.08rem);
}

.trust-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 760px;
  margin: 22px auto 0;
}

.trust-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px;
  align-items: center;
  padding: 10px 12px;
  text-align: left;
  color: #fff;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.19);
  border-radius: 16px;
  backdrop-filter: blur(9px);
}

.trust-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 50%;
}

.trust-item strong {
  display: block;
  font-size: 0.84rem;
}

.trust-item small {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.70rem;
  line-height: 1.4;
}

.app-shell {
  overflow: hidden;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.app-head {
  padding: 22px clamp(18px, 5vw, 38px) 14px;
  background: linear-gradient(135deg, rgba(245, 242, 255, 0.97), rgba(255, 252, 243, 0.97));
  border-bottom: 1px solid var(--line);
}

.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 0.86rem;
}

.progress-track {
  overflow: hidden;
  height: 9px;
  background: #e8e4f2;
  border-radius: 999px;
}

.progress-bar {
  width: 14.285%;
  height: 100%;
  background: linear-gradient(90deg, #7b5dd3, #c376c9, #e5b961);
  border-radius: inherit;
  transition: width 0.3s ease;
}

.form-area {
  padding: clamp(22px, 5vw, 42px);
}

.form-step[hidden],
.preview-screen[hidden] {
  display: none !important;
}

.step-kicker {
  margin: 0 0 4px;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.form-step h2,
.preview-screen h2 {
  margin: 0 0 8px;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(1.45rem, 4vw, 2rem);
}

.lead {
  margin: 0 0 22px;
  color: var(--muted);
}

.field {
  margin-top: 20px;
}

.field:first-of-type {
  margin-top: 0;
}

.field-label,
legend {
  display: block;
  margin-bottom: 8px;
  color: #313752;
  font-weight: 750;
}

.required {
  margin-left: 6px;
  color: var(--danger);
  font-size: 0.78rem;
}

.optional {
  margin-left: 6px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 500;
}

.hint {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}


.privacy-warning {
  color: #c62828;
  font-weight: 700;
  line-height: 1.65;
}

textarea,
select,
input[type="text"] {
  width: 100%;
  color: var(--ink);
  background: #fff;
  border: 1px solid #d7d3e5;
  border-radius: 15px;
  box-shadow: inset 0 1px 2px rgba(26, 31, 65, 0.04);
}

textarea,
input[type="text"] {
  padding: 13px 15px;
}

textarea {
  min-height: 145px;
  resize: vertical;
}

textarea.large {
  min-height: 265px;
}

select {
  min-height: 50px;
  padding: 10px 42px 10px 14px;
}

textarea:focus,
select:focus,
input[type="text"]:focus {
  border-color: #8369cb;
  box-shadow: 0 0 0 4px rgba(104, 73, 198, 0.11);
  outline: none;
}

.two-col,
.three-col {
  display: grid;
  gap: 16px;
}

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

.stacked-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin-top: 4px;
}

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

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

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.choice-chip {
  position: relative;
  cursor: pointer;
}

.choice-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-chip span {
  display: inline-flex;
  min-height: 43px;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  color: #414763;
  background: #f7f6fb;
  border: 1px solid #dedbe9;
  border-radius: 999px;
  transition: 0.18s ease;
}

.choice-chip input:checked + span {
  color: #fff;
  background: linear-gradient(135deg, #7254c8, #9259b8);
  border-color: transparent;
  box-shadow: 0 7px 18px rgba(104, 73, 198, 0.23);
}

.choice-chip input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.notice-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  margin-top: 20px;
  padding: 14px 16px;
  color: #484f70;
  background: #f5f3fb;
  border: 1px solid #dfd9ef;
  border-radius: 16px;
  font-size: 0.86rem;
}

.notice-card strong {
  color: #41366e;
}

.notice-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff;
  background: var(--primary);
  border-radius: 50%;
}

.validation-message {
  min-height: 1.5em;
  margin-top: 8px;
  color: var(--danger);
  font-size: 0.84rem;
  font-weight: 700;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.action-left,
.action-right {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-weight: 750;
  text-decoration: none;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.18s ease, background 0.18s ease;
}

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

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #8a55b6);
  box-shadow: 0 10px 24px rgba(104, 73, 198, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), #78429f);
}

.btn-gold {
  color: #29233f;
  background: linear-gradient(135deg, #ffe6a8, var(--gold));
  box-shadow: 0 10px 24px rgba(210, 164, 63, 0.24);
}

.btn-secondary {
  color: #4a4f6a;
  background: var(--secondary);
  border: 1px solid #d9d9eb;
}

.btn-plain {
  color: #655d78;
  background: transparent;
}

.btn-danger {
  color: #9c3145;
  background: #fff0f2;
  border: 1px solid #f0c9cf;
}

.preview-instruction {
  margin-bottom: 16px;
  padding: 13px 15px;
  color: #4e456b;
  background: #f6f2ff;
  border-left: 4px solid var(--primary);
  border-radius: 10px;
}

.preview-text {
  width: 100%;
  min-height: 390px;
  margin: 0;
  padding: 18px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: #232941;
  background: #fff;
  border: 1px solid #d9d5e5;
  border-radius: 18px;
  box-shadow: inset 0 2px 8px rgba(31, 35, 64, 0.04);
}

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

.preview-actions .btn {
  width: 100%;
}

.sub-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.copy-status {
  min-height: 1.5em;
  margin: 10px 0 0;
  color: #38684a;
  text-align: center;
  font-weight: 750;
}

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

.info-box {
  padding: 13px;
  color: #3c4260;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.70);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(7, 12, 43, 0.12);
}

.info-box strong {
  display: block;
  margin-bottom: 2px;
  color: #4d3c83;
  font-size: 0.83rem;
}

.info-box small {
  display: block;
  font-size: 0.72rem;
  line-height: 1.5;
}

.ad-panel {
  max-width: 920px;
  margin: 18px auto 0;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid #d7e6f8;
  border-radius: 12px;
}

.ad-panel[hidden] {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
}

.ad-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  padding: 5px 8px;
  background: #f4f8ff;
  border-bottom: 1px solid #d7e6f8;
}

.ad-label,
.ad-close-notice {
  color: #4f6f91;
  font-size: 0.72rem;
  line-height: 1.3;
}

.ad-close-notice {
  margin-left: auto;
}

.ad-close-btn {
  min-height: 0;
  height: auto;
  margin: 0;
  padding: 4px 9px;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  background: #1565c0;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.ad-close-btn:hover {
  background: #0d47a1;
}

.ad-body {
  min-height: 90px;
  padding: 8px;
  background: #fff;
}

.site-footer {
  margin-top: 18px;
  padding: 12px 10px 18px;
  color: var(--footer-blue);
  text-align: center;
  background: rgba(246, 250, 255, 0.94);
  border-top: 1px solid rgba(21, 101, 192, 0.16);
}

.site-footer p {
  margin: 0;
  font-size: 0.84rem;
}

.site-footer a {
  color: var(--footer-blue);
  font-weight: 700;
  text-decoration: none;
}

.site-footer a:hover {
  color: #0d47a1;
  text-decoration: underline;
}

@media (max-width: 760px) {
  .site-wrap {
    width: min(100% - 18px, 920px);
    padding-top: 24px;
  }

  .hero {
    padding-inline: 8px;
  }

  .trust-row,
  .info-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .three-col {
    grid-template-columns: 1fr;
  }

  .two-col {
    grid-template-columns: 1fr;
  }

  .form-actions {
    flex-direction: column-reverse;
  }

  .action-left,
  .action-right {
    width: 100%;
  }

  .action-right {
    flex-direction: row;
  }

  .action-right .btn,
  .action-left .btn {
    flex: 1;
  }
}

@media (max-width: 520px) {
  .hero-icon {
    width: 76px;
    height: 76px;
  }

  .trust-row {
    grid-template-columns: 1fr;
  }

  .app-shell {
    border-radius: 22px;
  }

  .form-area {
    padding: 22px 17px 26px;
  }

  .app-head {
    padding-inline: 18px;
  }

  .preview-actions,
  .info-strip {
    grid-template-columns: 1fr;
  }

  .action-right {
    flex-direction: column;
  }

  .btn {
    min-height: 50px;
  }
}

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

/* v1.1.0：ゲームカテゴリー向けの進行表示 */
.progress-meta strong {
  color: #4f3c82;
}

.form-step .two-col + fieldset,
.form-step fieldset + .two-col {
  margin-top: 20px;
}


/* v1.1.2：入力ページとプレビューページを分離 */
.hero.compact-hero {
  padding-bottom: 22px;
}

.input-section + .input-section {
  margin-top: 38px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}

.input-section > h2 {
  margin-bottom: 18px;
}

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

.form-actions .action-right {
  margin-left: auto;
}

.preview-shell h2 {
  margin: 0 0 8px;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(1.55rem, 4vw, 2.15rem);
}

.preview-page .site-wrap {
  width: min(100% - 28px, 980px);
}

.preview-page .preview-text {
  min-height: 360px;
}

@media (max-width: 640px) {
  .input-section + .input-section {
    margin-top: 30px;
    padding-top: 26px;
  }

  .form-actions {
    display: grid;
    gap: 10px;
  }

  .form-actions .action-left,
  .form-actions .action-right {
    width: 100%;
    margin: 0;
  }

  .form-actions .btn {
    width: 100%;
    margin: 0;
  }
}

/* v1.1.3：横並び入力欄の縦位置を統一 */
.two-col {
  align-items: start;
  row-gap: 24px;
}

.two-col > .field {
  margin-top: 0;
  min-width: 0;
}

.three-col > .field {
  margin-top: 0;
  min-width: 0;
}

/* v1.1.4：夢の内容より下を一つの補足情報欄に整理 */
.supplementary-section > h2 {
  margin-bottom: 22px;
}

.supplementary-section fieldset {
  margin-top: 26px;
}
