/* アンケート画面。配色はルーレット（/roulette/styles.css）に合わせる。 */
.loading,
.notice {
  width: min(100% - 32px, 560px);
  margin: 0 auto;
  padding: 72px 0;
  text-align: center;
  line-height: 1.8;
}
.notice h1 { margin: 0 0 12px; color: var(--gold); font-size: 1.5rem; }
.notice p { margin: 0; color: #dce7ff; }

.survey {
  width: min(100% - 32px, 560px);
  margin: 0 auto;
  padding: 32px 0 56px;
}
.survey-head { margin-bottom: 24px; text-align: center; }
.eyebrow {
  margin: 0 0 6px;
  color: var(--gold);
  font-size: .875rem;
  font-weight: 800;
  letter-spacing: .12em;
}
.survey-head h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.4rem, 6vw, 1.9rem);
  line-height: 1.4;
  font-weight: 800;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.lead {
  margin: 12px 0 0;
  color: #dce7ff;
  font-size: .9375rem;
  line-height: 1.8;
  text-align: left;
}

#survey-form {
  display: grid;
  gap: 18px;
  padding: 24px 20px 28px;
  border: 1px solid #ffffff24;
  border-radius: 20px;
  background: #0b1438e6;
  box-shadow: 0 18px 48px #0006;
}

.field { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field > label,
.field > legend {
  padding: 0;
  color: #fff;
  font-size: .9375rem;
  font-weight: 700;
  line-height: 1.6;
}
.field > legend { margin-bottom: 8px; }
.req {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 7px;
  border-radius: 4px;
  background: #fc765e;
  color: #fff;
  font-size: .6875rem;
  font-weight: 800;
  vertical-align: 2px;
  letter-spacing: .04em;
}

input[type="text"],
input[type="email"],
select {
  width: 100%;
  min-height: 50px;
  padding: 10px 14px;
  border: 1.5px solid #b9c4e366;
  border-radius: 12px;
  background: #050a22;
  color: #fff;
  font: inherit;
  font-size: 16px; /* iOS のズーム防止 */
}
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #b9c4e3 50%), linear-gradient(135deg, #b9c4e3 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
input:focus-visible,
select:focus-visible { outline: 3px solid var(--gold); outline-offset: 1px; border-color: transparent; }
[aria-invalid="true"] { border-color: #ff8f7a !important; }

.choices { display: flex; gap: 10px; flex-wrap: wrap; }
.choice {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 120px;
  min-height: 48px;
  padding: 8px 18px;
  border: 1.5px solid #b9c4e366;
  border-radius: 999px;
  background: #050a22;
  color: #fff;
  cursor: pointer;
}
.choice:has(input:checked) { border-color: var(--gold); background: #2a2a12; }
.choice:has(input:focus-visible) { outline: 3px solid var(--gold); outline-offset: 2px; }
.choice input,
.check input { width: 20px; height: 20px; margin: 0; accent-color: #ffc72e; flex: none; }

.branch {
  display: grid;
  gap: 18px;
  padding: 16px;
  border-left: 3px solid var(--gold);
  border-radius: 0 12px 12px 0;
  background: #ffffff0a;
}

.terms { padding-top: 6px; border-top: 1px solid #ffffff1f; }
.check { display: flex; gap: 12px; align-items: flex-start; color: #fff; font-size: .875rem; line-height: 1.75; cursor: pointer; }
.check input { margin-top: 4px; }
.links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding-left: 32px; font-size: .875rem; }
.links a { color: #9cc8ff; text-underline-offset: 3px; }
.links a:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.error { margin: 0; color: #ffb3a5; font-size: .8125rem; font-weight: 700; line-height: 1.6; }

.submit {
  width: 100%;
  min-height: 60px;
  margin-top: 6px;
  border: 2px solid #fff0a2;
  border-radius: 999px;
  background: linear-gradient(#fff3a9 0%, #ffe370 32%, #ffc72e 74%, #f1a515 100%);
  color: #56180e;
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: .05em;
  cursor: pointer;
}
.submit:disabled { cursor: progress; filter: brightness(.85); }
.submit:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.form-status { margin: 0; min-height: 1.5em; color: #dce7ff; font-size: .875rem; text-align: center; line-height: 1.6; }
.form-status:empty { display: none; }

.existing-note {
  width: min(100% - 32px, 480px);
  margin: 16px auto 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: #ffffff14;
  color: #dce7ff;
  font-size: .875rem;
  line-height: 1.6;
  text-align: center;
}

/* テストモード */
.test-banner {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 16px;
  padding: 10px 16px;
  background: #ffd84d;
  color: #2b1d00;
  font-size: .875rem;
  line-height: 1.6;
  text-align: center;
}
.test-banner p { margin: 0; }
.test-banner button,
.test-retry-dialog {
  min-height: 40px;
  padding: 6px 16px;
  border: 2px solid #2b1d00;
  border-radius: 999px;
  background: #fff;
  color: #2b1d00;
  font-weight: 800;
  cursor: pointer;
}
.test-retry-dialog { margin-top: 18px; border-color: #ffd84d; background: #ffd84d; }
