/* =========================================================
   夜の楽しみ方タイプ診断 — スマホ基準（375px）
   コンセプトページと同じ世界観：ミルクピンクに水玉、丸ゴシック、ステッカー風
   ========================================================= */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #fff5f8; --bg-2: #ffe8f0; --ink: #4a2a3a; --dim: #8a6573; --mute: #b597a4;
  --pink: #ff6fa5; --pink-2: #ffb3cf; --rose: #e2477f; --lav: #b9a3ff; --mint: #8fdcc4; --lemon: #ffe08a;
  --type: #ff6fa5;
  --line: rgba(226, 71, 127, .16);
  --shadow: 0 14px 34px rgba(226, 71, 127, .16);
  --round: 'Zen Maru Gothic', 'Hiragino Maru Gothic ProN', sans-serif;
  --num: 'Fredoka', 'Zen Maru Gothic', sans-serif;
  --script: 'Parisienne', cursive;
  --gutter: 20px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  min-height: 100svh; color: var(--ink); font-family: var(--round); font-size: 15px; font-weight: 500; line-height: 1.85;
  letter-spacing: .02em; overflow-x: clip; word-break: auto-phrase; -webkit-font-smoothing: antialiased;
  background: radial-gradient(circle at 10px 10px, rgba(255, 111, 165, .1) 2.2px, transparent 2.6px) 0 0 / 28px 28px, var(--bg);
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ol, ul { list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; touch-action: manipulation; }
[hidden] { display: none !important; }

/* 紙吹雪 */
.burst { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.burst i { position: absolute; width: 9px; height: 13px; margin: -6px 0 0 -4px; border-radius: 2px; background: var(--c); font-style: normal; animation: pop 1.2s cubic-bezier(.2, .7, .3, 1) forwards; }
.burst i.is-heart { width: auto; height: auto; background: none; color: var(--c); font-size: 18px; line-height: 1; }
@keyframes pop {
  0% { transform: translate(0, 0) scale(0) rotate(0); opacity: 1; }
  15% { transform: translate(calc(var(--dx) * .3), calc(var(--dy) * .3)) scale(var(--s)) rotate(calc(var(--r) * .2)); }
  100% { transform: translate(var(--dx), calc(var(--dy) + 140px)) scale(var(--s)) rotate(var(--r)); opacity: 0; }
}

/* ---------- header ---------- */
.hd { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; padding: 10px var(--gutter); padding-top: calc(10px + env(safe-area-inset-top)); background: rgba(255, 245, 248, .85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.hd-brand img { width: 88px; }
.hd-link { padding: 4px 12px; border-radius: 999px; background: #fff; color: var(--rose); font-size: 12.5px; font-weight: 900; box-shadow: 0 2px 0 var(--pink-2); }

/* ---------- 共通 ---------- */
main { max-width: 560px; margin: 0 auto; padding: 0 var(--gutter); }
.scr { padding: 26px 0 60px; text-align: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; padding: 0 24px; border-radius: 999px;
  font-weight: 900; font-size: 15px; line-height: 1.35; transition: transform .35s var(--spring);
}
.btn:active { transform: scale(.95); }
.btn i { font-style: normal; }
.btn-main { background: linear-gradient(110deg, var(--pink), #ff8fb8); color: #fff; box-shadow: 0 10px 24px rgba(255, 111, 165, .4), inset 0 -3px 0 rgba(226, 71, 127, .3); }
.btn-line { background: #fff; border: 2px solid var(--pink-2); color: var(--rose); }
.btn-big { width: 100%; min-height: 62px; font-size: 18px; }
.ribbon {
  position: relative; display: inline-block; padding: 5px 22px; background: var(--pink); color: #fff;
  font-family: var(--num); font-weight: 600; font-size: 12.5px; letter-spacing: .14em;
}
.ribbon::before, .ribbon::after { content: ''; position: absolute; top: 4px; width: 14px; height: 100%; background: var(--rose); z-index: -1; }
.ribbon::before { left: -10px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 40% 50%); }
.ribbon::after { right: -10px; clip-path: polygon(0 0, 100% 0, 60% 50%, 100% 100%, 0 100%); }
em { font-style: normal; color: var(--rose); text-shadow: 2px 2px 0 #fff, -2px 2px 0 #fff, 2px -2px 0 #fff, -2px -2px 0 #fff, 0 3px 0 #fff, 0 8px 18px rgba(226, 71, 127, .25); }

/* ---------- はじめ ---------- */
.intro-title { margin-top: 16px; font-weight: 900; font-size: clamp(34px, 11vw, 54px); line-height: 1.3; }
.intro-title em { display: inline-block; font-size: 1.12em; animation: jelly 2.6s ease-in-out infinite; }
@keyframes jelly { 0%, 70%, 100% { transform: none; } 78% { transform: scale(1.08, .92); } 86% { transform: scale(.95, 1.06); } 94% { transform: scale(1.02, .98); } }
.intro-sub { margin-top: 8px; font-weight: 900; color: var(--dim); }
.parade { display: flex; width: max-content; gap: 6px; margin: 22px calc(-1 * var(--gutter)) 0; animation: march 22s linear infinite; }
.parade span { width: 92px; flex: none; animation: hopCat 1.6s ease-in-out infinite; animation-delay: calc(var(--d) * -.2s); }
@keyframes march { to { transform: translateX(-50%); } }
@keyframes hopCat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px) rotate(-3deg); } }
.intro-facts { display: flex; justify-content: center; gap: 8px; margin: 22px 0 20px; }
.intro-facts li { padding: 6px 14px; border-radius: 16px; background: #fff; box-shadow: 0 4px 0 var(--pink-2); font-weight: 900; font-size: 13px; }
.intro-facts b { font-family: var(--num); font-size: 22px; color: var(--rose); margin: 0 2px; }
.intro-note { margin-top: 12px; font-size: 11.5px; color: var(--mute); }
.intro-about { margin-top: 40px; padding: 22px 18px; border-radius: 26px; background: #fff; box-shadow: var(--shadow); text-align: left; }
.intro-about p { font-size: 13.5px; color: var(--dim); }
.intro-about .r-h + p { margin-bottom: 18px; }
.type-links { display: flex; flex-wrap: wrap; gap: 6px; }
.type-links a { display: inline-block; padding: 5px 12px; border-radius: 999px; background: var(--bg-2); color: var(--rose); font-size: 12.5px; font-weight: 900; }

/* ---------- 質問 ---------- */
.q-progress { position: relative; height: 12px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 2px var(--line); margin: 6px 6px 0; }
.q-progress i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: linear-gradient(90deg, var(--lav), var(--pink)); transition: width .5s var(--spring); }
.q-progress span { position: absolute; top: 50%; translate: -50% -50%; font-size: 20px; transition: left .5s var(--spring); }
.q-count { margin-top: 16px; font-family: var(--num); font-weight: 600; color: var(--mute); }
.q-count b { font-size: 26px; color: var(--rose); }
.q-cat { width: 96px; margin: 4px auto 0; }
.q-text { margin-top: 6px; min-height: 2.9em; font-weight: 900; font-size: clamp(21px, 6.2vw, 28px); line-height: 1.45; }
.quiz.is-swap .q-cat { animation: hop .6s var(--spring); }
.quiz.is-swap .q-text, .quiz.is-swap .opt { animation: slideIn .5s var(--spring) both; }
.quiz.is-swap .opt:nth-child(2) { animation-delay: .05s; }
.quiz.is-swap .opt:nth-child(3) { animation-delay: .1s; }
.quiz.is-swap .opt:nth-child(4) { animation-delay: .15s; }
@keyframes hop { 0% { transform: scale(.6) rotate(-10deg); } 60% { transform: scale(1.1) rotate(4deg); } 100% { transform: none; } }
@keyframes slideIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
.q-opts { display: grid; gap: 10px; margin-top: 18px; }
.q-hint { margin-top: 12px; font-size: 12px; font-weight: 700; color: var(--mute); }
.opt {
  --c: var(--pink); --edge: var(--pink-2);
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 62px; padding: 10px 16px; border-radius: 22px; background: #fff; text-align: left;
  font-weight: 900; font-size: 16px; line-height: 1.45; box-shadow: 0 5px 0 var(--edge), 0 10px 20px rgba(226, 71, 127, .08);
  transition: transform .25s var(--spring), box-shadow .2s, background .2s;
}
.opt:nth-child(2) { --c: #9d8bff; --edge: #d6ccff; }
.opt:nth-child(3) { --c: #5fc7a7; --edge: #bfeedd; }
.opt:nth-child(4) { --c: #ffa94a; --edge: #ffdcb3; }
.opt:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--edge); }
.opt-mark { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--c); color: #fff; font-family: var(--num); font-size: 16px; font-weight: 600; }
.opt.is-last { box-shadow: 0 0 0 3px var(--c), 0 5px 0 var(--edge); }
.opt.is-picked { background: var(--bg-2); transform: scale(1.03); }
.opt:disabled { cursor: default; }
.q-back { margin-top: 18px; padding: 6px 12px; font-size: 13px; font-weight: 700; color: var(--mute); }

/* ---------- 診断中 ---------- */
.think { padding-top: 90px; }
.think-cat { width: 150px; margin: 0 auto; animation: spin 1.4s var(--spring) infinite; }
@keyframes spin { 0% { transform: rotate(0) scale(1); } 50% { transform: rotate(180deg) scale(.9); } 100% { transform: rotate(360deg) scale(1); } }
.think-text { margin-top: 18px; font-weight: 900; font-size: 20px; color: var(--rose); }
.think-text span { animation: blinkDot 1.2s infinite; }
.think-text span:nth-child(2) { animation-delay: .2s; }
.think-text span:nth-child(3) { animation-delay: .4s; }
@keyframes blinkDot { 50% { opacity: 0; } }

/* ---------- 結果 ---------- */
.r-kicker { font-weight: 900; font-size: 14px; color: var(--dim); }
.r-cat { width: 210px; margin: 8px auto 0; }
.result.is-fresh .r-cat { animation: reveal .9s var(--spring) both; }
@keyframes reveal { 0% { transform: scale(.2) rotate(-30deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.r-name {
  display: inline-block; margin-top: 4px; padding: 6px 22px; border-radius: 999px; background: var(--type); color: #fff;
  font-weight: 900; font-size: clamp(24px, 7.6vw, 34px); line-height: 1.4; box-shadow: 0 6px 0 rgba(74, 42, 58, .18); rotate: -2deg;
}
.result.is-fresh .r-name { animation: stamp .7s var(--spring) .45s both; }
@keyframes stamp { from { scale: 2.4; opacity: 0; } to { scale: 1; opacity: 1; } }
.r-catch { margin-top: 14px; font-weight: 900; font-size: 17px; }
.r-try { margin-top: 16px; width: 100%; }
.r-card { margin-top: 18px; padding: 20px 18px; border-radius: 26px; background: #fff; box-shadow: var(--shadow); text-align: left; }
.r-h { font-weight: 900; font-size: 16px; text-align: center; margin-bottom: 10px; }
.r-h::before { content: '♡ '; color: var(--pink); }
.r-desc { font-size: 14.5px; }
.r-traits { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 14px; }
.r-traits li { padding: 3px 12px; border-radius: 999px; background: var(--bg-2); color: var(--rose); font-size: 12.5px; font-weight: 900; }
.meters { display: grid; gap: 12px; }
.meter { display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 900; color: var(--mute); }
.m-l { text-align: right; }
.m-l.is-on, .m-r.is-on { color: var(--rose); }
.m-bar { position: relative; height: 14px; border-radius: 999px; background: #e8ddff; overflow: hidden; }
.m-bar i { position: absolute; inset: 0 auto 0 0; width: var(--v); background: linear-gradient(90deg, var(--pink), #ff9cc2); border-radius: inherit; animation: grow 1s var(--spring) .3s both; }
@keyframes grow { from { width: 0; } }
.match { display: grid; grid-template-columns: 70px 1fr auto; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 20px; background: var(--bg); }
.match .match-cat { width: 70px; }
.match b { display: block; font-size: 16px; }
.match small { display: block; font-size: 12px; color: var(--dim); line-height: 1.6; }
.match i { font-style: normal; font-weight: 900; color: var(--rose); }
.r-tip { background: linear-gradient(150deg, #fff, #f3efff); }
.r-tip p { font-size: 14px; }

.share { margin-top: 26px; }
.share-t { font-weight: 900; font-size: 14px; color: var(--dim); }
.share-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.sh { display: grid; place-items: center; min-height: 50px; border-radius: 999px; font-weight: 900; font-size: 14px; }
.sh-x { background: #1b1b1f; color: #fff; }
.sh-line { background: #06c755; color: #fff; }
.sh-copy { grid-column: 1 / -1; min-height: 44px; background: #fff; border: 2px solid var(--pink-2); color: var(--rose); }

.r-next { margin-top: 30px; padding: 26px 18px; border-radius: 30px; background: linear-gradient(150deg, #ffd8ea, #e8dcff); display: grid; gap: 10px; }
.r-next-t { font-weight: 900; font-size: 18px; line-height: 1.55; margin-bottom: 6px; }
.r-next-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.r-next-2 .btn { padding: 8px 10px; font-size: 13.5px; }
.again { margin-top: 4px; padding: 8px; font-size: 13px; font-weight: 900; color: var(--rose); text-decoration: underline; text-underline-offset: 3px; }

.all { margin-top: 30px; }
.all-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.all-grid a { display: block; height: 100%; padding: 6px 2px 8px; border-radius: 18px; background: #fff; overflow-wrap: anywhere; font-size: 10px; font-weight: 900; line-height: 1.35; transition: transform .3s var(--spring); }
.all-grid a:active { transform: scale(.94); }
.all-grid a.is-me { box-shadow: 0 0 0 3px var(--pink); }
.all-grid svg { width: 100%; }

/* ---------- footer ---------- */
.ft { padding: 30px var(--gutter) 40px; text-align: center; color: var(--mute); font-size: 12px; }
.ft img { width: 100px; margin: 0 auto 6px; }
.ft-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin: 12px 0; font-size: 12.5px; font-weight: 700; color: var(--dim); }

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

/* スマホ・タブレット：すりガラスのぼかしを外して、スクロールを軽く */
@media (hover: none), (pointer: coarse) {
  .hd { background: rgba(255, 245, 248, .96); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
