/* MOVE アンケート × P-KID 壁紙ガチャ
   配色は LP の墨をベースに、壁紙の世界観に合わせてアクセントを金にしている */
:root {
  --ink-950: #0a0c10;
  --ink-900: #13161b;
  --ink-850: #1d2126;
  --ink-800: #2a2e34;
  --ink-700: #44484d;
  --paper-100: #ebe7df;
  --paper-500: #aca79e;
  --gold-300: #f3d98b;
  --gold-400: #e6c15a;
  --gold-500: #cfa53a;
  --gold-700: #7a5c14;
  --purple-300: #c9b3f5;
  --shu-400: #f56f57;

  --bg: var(--ink-950);
  --surface: var(--ink-900);
  --elevated: var(--ink-850);
  --text: var(--paper-100);
  --text-2: var(--paper-500);
  --line: var(--ink-800);
  --line-strong: var(--ink-700);
  --accent: var(--gold-400);

  --font: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Meiryo UI", "Meiryo", system-ui, sans-serif;
  --radius: 16px;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(90% 50% at 85% 0%, rgba(207, 165, 58, 0.16), transparent 70%),
    radial-gradient(70% 40% at 0% 30%, rgba(160, 120, 240, 0.10), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  word-break: auto-phrase;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }

.wrap {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: calc(20px + env(safe-area-inset-top, 0px)) 16px calc(32px + env(safe-area-inset-bottom, 0px));
}

/* ---------- hero ---------- */
.hero { margin-bottom: 20px; }
.wordmark { width: 104px; opacity: 0.9; margin-bottom: 12px; }
.hero-row { display: flex; align-items: center; gap: 8px; }
.hero-copy { flex: 1 1 auto; min-width: 0; }
.eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--gold-300);
}
.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 8vw, 40px);
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: 0.01em;
}
.gold {
  background: linear-gradient(180deg, #fff3c4 0%, var(--gold-400) 45%, var(--gold-500) 70%, #fff0b3 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead { margin: 0; color: var(--text-2); font-size: 14px; }
.hero-pkid {
  flex: 0 0 auto;
  width: clamp(120px, 36vw, 200px);
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.55));
  animation: bob 3.2s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateY(-6px); } }

/* ---------- card ---------- */
.card {
  background: rgba(19, 22, 27, 0.86);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.card-note { margin: 0 0 8px; font-size: 13px; color: var(--text-2); }
.center { text-align: center; }

/* ---------- questions ---------- */
.q { border: 0; margin: 0; padding: 18px 0; border-top: 1px solid var(--line); min-width: 0; }
.card-note + .q { border-top: 0; }
legend.q-title { float: left; width: 100%; }
fieldset.q .pills { clear: both; }
.q-title {
  display: block;
  padding: 0;
  margin-bottom: 10px;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.6;
}
.q-no {
  display: inline-block;
  margin-right: 8px;
  padding: 0 7px;
  border-radius: 6px;
  background: var(--gold-700);
  color: var(--gold-300);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  vertical-align: 2px;
}
.req { color: var(--shu-400); margin-left: 4px; }
.opt {
  margin-left: 8px;
  padding: 1px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
  vertical-align: 2px;
}

.select { position: relative; }
.select::after {
  content: "";
  position: absolute;
  right: 16px; top: 50%;
  width: 8px; height: 8px;
  border-right: 2px solid var(--text-2);
  border-bottom: 2px solid var(--text-2);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
select, textarea {
  width: 100%;
  font: inherit;
  font-size: 16px; /* iOSのズーム防止 */
  color: var(--text);
  background: var(--elevated);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease);
}
select {
  appearance: none;
  -webkit-appearance: none;
  padding: 13px 40px 13px 14px;
}
select:invalid { color: var(--text-2); }
/* 開いたときの選択肢リスト。Windows の Chrome/Edge は select の暗い背景を引き継いで文字が見えなくなるので、白地に黒で固定する */
select option { background: #ffffff; color: #111111; font-weight: 500; }
select option:disabled { color: #8a8a8a; }
textarea { padding: 12px 14px; resize: vertical; min-height: 110px; line-height: 1.6; }
select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(230, 193, 90, 0.22);
}

.pills { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pill { position: relative; cursor: pointer; }
.pill input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pill span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--elevated);
  font-weight: 700;
  font-size: 15px;
  text-align: center;
  transition: all 180ms var(--ease);
}
.pill input:checked + span {
  border-color: var(--gold-400);
  background: linear-gradient(180deg, rgba(230, 193, 90, 0.22), rgba(230, 193, 90, 0.08));
  color: var(--gold-300);
  box-shadow: 0 0 0 1px var(--gold-400) inset;
}
.pill input:focus-visible + span { box-shadow: 0 0 0 3px rgba(230, 193, 90, 0.35); }

/* ---------- Q5 ---------- */
.gift-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 10px 14px 10px 6px;
  border-radius: 14px;
  background: linear-gradient(100deg, rgba(207, 165, 58, 0.2), rgba(160, 120, 240, 0.14));
  border: 1px solid rgba(230, 193, 90, 0.35);
}
.gift-banner img { width: 64px; flex: 0 0 auto; }
.gift-banner p { margin: 0; font-size: 14px; line-height: 1.55; }
.gift-banner b { color: var(--gold-300); }
.meter { margin: 8px 2px 0; font-size: 13px; color: var(--text-2); transition: color 200ms; }
.meter b { color: var(--text); font-size: 15px; }
.meter.on { color: var(--gold-300); font-weight: 700; }

/* ---------- button ---------- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  margin-top: 8px;
  padding: 12px 20px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #1a1305;
  background: linear-gradient(180deg, var(--gold-300), var(--gold-500));
  box-shadow: 0 8px 24px rgba(207, 165, 58, 0.3);
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms var(--ease), opacity 180ms, box-shadow 180ms;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.35; box-shadow: none; cursor: not-allowed; }
.btn.gacha { animation: glow 1.6s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 8px 36px rgba(243, 217, 139, 0.65); } }
.btn-ghost {
  color: var(--gold-300);
  background: transparent;
  border: 1px solid var(--gold-500);
  box-shadow: none;
}
.form-error { margin: 8px 0 0; color: var(--shu-400); font-size: 14px; }

/* ---------- drawing ---------- */
.spin-pkid { width: 180px; margin: 8px auto 0; animation: wobble 0.6s ease-in-out infinite; }
@keyframes wobble { 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }
.drawing-text { margin: 12px 0 4px; font-weight: 700; color: var(--gold-300); }
.slot {
  font-size: 64px;
  font-weight: 900;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.slot small, .result-no small { font-size: 18px; color: var(--text-2); margin-left: 6px; font-weight: 700; }

/* ---------- result ---------- */
#result { position: relative; overflow: hidden; }
#result.reveal { animation: pop 600ms var(--spring); }
@keyframes pop { from { transform: scale(0.9); opacity: 0; } }
.result-no {
  margin: 0;
  font-size: 72px;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff3c4 0%, var(--gold-400) 50%, var(--gold-500) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.result-no small { -webkit-text-fill-color: var(--text-2); }
.result-name { margin: 6px 0 4px; font-size: 26px; font-weight: 800; }
.result-sub { margin: 0 0 18px; font-size: 13px; color: var(--text-2); }

.previews {
  display: grid;
  grid-template-columns: 0.42fr 1fr;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}
.pv { margin: 0; }
.pv img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  background: var(--elevated);
}
.pv-sp img { aspect-ratio: 9 / 16; object-fit: cover; }
.pv-pc img { aspect-ratio: 16 / 9; object-fit: cover; }
.pv figcaption { margin-top: 6px; font-size: 12px; color: var(--text-2); }

.dl { display: grid; gap: 4px; }
.hint { margin: 10px 0 0; font-size: 12px; color: var(--text-2); }
.result-pkid { width: 160px; margin: 14px auto -8px; }

/* ---------- thanks ---------- */
.thanks-pkid { width: 200px; margin: 0 auto 8px; }
#thanks h2 { margin: 0 0 6px; font-size: 22px; }
#thanks p { margin: 0; color: var(--text-2); }

/* ---------- confetti ---------- */
.confetti {
  position: fixed;
  top: -20px;
  width: 9px;
  height: 14px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 50;
  animation: fall linear forwards;
}
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

.foot { margin-top: 28px; text-align: center; font-size: 11px; color: var(--ink-700); letter-spacing: 0.1em; }

@media (min-width: 560px) {
  .card { padding: 28px 28px; }
  .dl { grid-template-columns: 1fr 1fr; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- 2026-09-26 改訂: 番号なしの当選画面・LPへの導線 ---------- */
.wordmark-link { display: inline-block; }
.result-title { margin: 4px 0 6px; font-size: clamp(24px, 7vw, 30px); font-weight: 800; line-height: 1.35; }
.dots i { font-style: normal; animation: blink 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: 0.2s; }
.dots i:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 100% { opacity: 0.2; } 50% { opacity: 1; } }
.foot a { color: var(--text-2); text-decoration: none; font-size: 12px; }
.foot a:hover { color: var(--gold-300); }

/* ---------- 2026-09-26 改訂2: スマホでの見出しの折り返し ---------- */
.hero .eyebrow { white-space: nowrap; }
.hero .hero-title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: clamp(26px, 7.2vw, 40px);
  line-height: 1.3;
  font-weight: 800;
}
.hero-title > span { display: block; white-space: nowrap; }
.hero-row { justify-content: space-between; margin-bottom: 10px; }
.hero .hero-pkid { width: clamp(110px, 30vw, 200px); }
.hero .lead > span { display: block; white-space: nowrap; }
@media (max-width: 350px) {
  .hero .lead > span { white-space: normal; }
}

/* ---------- 画面の縁の金の光（ゆみ希望） ----------
   外周に細い金の線＋内側へにじむ光。上をゆっくり光の粒が一周する */
@property --edge-a {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
}
body::before {
  box-shadow:
    inset 0 0 0 1px rgba(243, 217, 139, 0.45),
    inset 0 0 14px rgba(230, 193, 90, 0.28),
    inset 0 0 48px rgba(207, 165, 58, 0.12);
  animation: edge-breathe 4s ease-in-out infinite;
}
body::after {
  padding: 2px;
  background: conic-gradient(from var(--edge-a),
    transparent 0deg, transparent 300deg,
    rgba(255, 240, 190, 0.0) 310deg,
    rgba(255, 240, 190, 0.95) 340deg,
    rgba(230, 193, 90, 0.0) 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  filter: drop-shadow(0 0 6px rgba(243, 217, 139, 0.7));
  animation: edge-run 7s linear infinite;
}
@keyframes edge-breathe { 50% { opacity: 0.6; } }
@keyframes edge-run { to { --edge-a: 360deg; } }
.nw { white-space: nowrap; }
.btn.is-loading { opacity: 0.6; cursor: progress; }
