/* ============================================================
   PRECO POP ／ 見た目
   Y2K・ステッカー・ネオンポップ。全部まるっこく、全部太く。
   ============================================================ */

:root{
  --ink:      #1B0B2E;
  --paper:    #FFFDF7;
  --pink:     #FF4D9D;
  --lime:     #C6FF3D;
  --cyan:     #4DD7FF;
  --yellow:   #FFD84D;
  --purple:   #A855F7;
  --orange:   #FF8A3D;

  --bd: 3px;
  --r: 26px;
  --shadow: 5px 5px 0 var(--ink);
  --shadow-lg: 8px 8px 0 var(--ink);

  --font: 'M PLUS Rounded 1c', 'Hiragino Maru Gothic ProN', 'ヒラギノ丸ゴ ProN', 'Zen Maru Gothic', system-ui, sans-serif;
  --font-en: 'Outfit', var(--font);
}

*{ box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body{ min-height: 100%; }

body{
  margin: 0;
  font-family: var(--font);
  font-weight: 700;
  color: var(--ink);
  background: #FFE9F3;
  overflow-x: hidden;
  padding-bottom: calc(104px + env(safe-area-inset-bottom));
  -webkit-font-smoothing: antialiased;
}

button{ font: inherit; color: inherit; cursor: pointer; -webkit-user-select: none; user-select: none; }
a{ color: inherit; }

/* ---------- 背景のふわふわ ---------- */
.bg{ position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background:
    radial-gradient(circle at 10% 0%, #FFF6BF 0%, transparent 45%),
    radial-gradient(circle at 95% 12%, #D9F8FF 0%, transparent 42%),
    radial-gradient(circle at 50% 100%, #F0E4FF 0%, transparent 55%),
    #FFE9F3;
}
.blob{ position: absolute; border-radius: 50%; filter: blur(28px); opacity: .5; }
.b1{ width: 46vw; height: 46vw; background: var(--pink);   top: -8vw;  left: -12vw; animation: float 14s ease-in-out infinite; }
.b2{ width: 40vw; height: 40vw; background: var(--cyan);   top: 32vh;  right: -14vw; animation: float 18s ease-in-out infinite reverse; }
.b3{ width: 36vw; height: 36vw; background: var(--lime);   bottom: 4vh; left: -10vw; animation: float 16s ease-in-out infinite; }
.b4{ width: 30vw; height: 30vw; background: var(--yellow); top: 62vh;  right: 22vw; animation: float 20s ease-in-out infinite reverse; }
@keyframes float{ 0%,100%{ transform: translate(0,0) scale(1); } 50%{ transform: translate(4vw,-5vh) scale(1.12); } }

/* ---------- ヘッダー ---------- */
.head{ position: sticky; top: 0; z-index: 40; padding: 10px 14px 14px;
  background: linear-gradient(#FFE9F3 62%, rgba(255,233,243,.92) 80%, rgba(255,233,243,0));
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.head-in{ max-width: 560px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }

.logo{ display: flex; align-items: center; gap: 7px; }
.logo-mark{ font-size: 26px; animation: spin 6s linear infinite; display: inline-block; }
@keyframes spin{ to{ transform: rotate(360deg); } }
.logo-text{ font-family: var(--font-en); font-weight: 900; font-size: 22px; letter-spacing: -.02em;
  text-shadow: 2px 2px 0 var(--yellow); }
.logo-text em{ font-style: normal; color: var(--pink); text-shadow: 2px 2px 0 var(--ink); }

.head-right{ display: flex; align-items: center; gap: 7px; }
.help{ width: 36px; height: 36px; border-radius: 50%; background: #fff; border: var(--bd) solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink); font-family: var(--font-en); font-weight: 900; font-size: 17px; line-height: 1;
  display: flex; align-items: center; justify-content: center; padding: 0; }
.help:active{ transform: translate(3px,3px); box-shadow: 0 0 0 var(--ink); }
body.on-intro .help{ background: var(--lime); }

.count{ display: flex; align-items: center; gap: 5px; padding: 7px 14px 7px 11px;
  background: #fff; border: var(--bd) solid var(--ink); border-radius: 999px; box-shadow: 3px 3px 0 var(--ink); }
.count:active{ transform: translate(3px,3px); box-shadow: 0 0 0 var(--ink); }
.count-emoji{ font-size: 15px; }
.count-num{ font-family: var(--font-en); font-weight: 900; font-size: 17px; }
.count.pulse{ animation: pop .5s cubic-bezier(.3,1.6,.5,1); }
@keyframes pop{ 0%{transform:scale(1)} 40%{transform:scale(1.35) rotate(-6deg)} 100%{transform:scale(1)} }

/* ---------- 画面ぜんたい ---------- */
.screen{ max-width: 560px; margin: 0 auto; padding: 4px 16px 24px; animation: slideIn .32s cubic-bezier(.2,.9,.3,1); }
@keyframes slideIn{ from{ opacity: 0; transform: translateY(14px); } }

/* ---------- 共通パーツ ---------- */
.kicker{ display: inline-block; font-family: var(--font-en); font-weight: 900; font-size: 12px;
  letter-spacing: .16em; padding: 5px 12px; border-radius: 999px;
  background: var(--ink); color: var(--lime); margin-bottom: 10px; }

.h1{ font-size: 28px; line-height: 1.3; margin: 0 0 6px; font-weight: 900; letter-spacing: -.02em; }
.h1 mark{ background: linear-gradient(transparent 58%, var(--yellow) 58%); color: inherit; padding: 0 2px; }
.lead{ font-size: 14px; line-height: 1.75; margin: 0 0 18px; opacity: .78; font-weight: 700; }

.card{ background: var(--paper); border: var(--bd) solid var(--ink); border-radius: var(--r);
  box-shadow: var(--shadow); padding: 20px; }

.btn{ display: block; width: 100%; padding: 16px; border-radius: 999px; border: var(--bd) solid var(--ink);
  background: #fff; font-weight: 900; font-size: 16px; box-shadow: var(--shadow); transition: transform .08s, box-shadow .08s; }
.btn:active{ transform: translate(5px,5px); box-shadow: 0 0 0 var(--ink); }
.btn-pink{ background: var(--pink); color: #fff; }
.btn-lime{ background: var(--lime); }
.btn-cyan{ background: var(--cyan); }
.btn-yellow{ background: var(--yellow); }
.btn-off{ background: #EFECF4; color: rgba(27,11,46,.42); box-shadow: none; border-style: dashed; cursor: default; }
.btn-off:active{ transform: none; }
.btn-ghost{ background: transparent; box-shadow: none; border-style: dashed; font-size: 14px; padding: 12px; }
.btn-ghost:active{ transform: translate(0,2px); }

.row{ display: flex; gap: 10px; }
.row > *{ flex: 1; }

/* 出典（ネタ元） */
.src{ margin-top: 14px; }
.src summary{ list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 800; padding: 5px 11px; border-radius: 999px;
  border: 2px dashed var(--ink); opacity: .6; }
.src summary::-webkit-details-marker{ display: none; }
.src[open] summary{ opacity: 1; background: var(--ink); color: var(--lime); border-style: solid; }
.src a{ display: block; margin-top: 8px; font-size: 11.5px; line-height: 1.6; font-weight: 700;
  opacity: .8; word-break: break-word; }

/* ============================================================
   👋 いちばん最初の画面
   ============================================================ */
.ic{ position: relative; background: var(--paper); border: var(--bd) solid var(--ink);
  border-radius: var(--r); box-shadow: var(--shadow); padding: 22px 20px; margin-bottom: 16px; }
.ic:nth-of-type(odd){ background: #FFFDF7; }

.ic-top{ display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.ic-n{ font-family: var(--font-en); font-weight: 900; font-size: 34px; line-height: 1;
  color: transparent; -webkit-text-stroke: 2px var(--ink); }
.ic-emoji{ font-size: 38px; line-height: 1; }
.ic-title{ font-size: 20px; font-weight: 900; margin: 0 0 10px; letter-spacing: -.01em; line-height: 1.4; }
.ic-lead{ font-size: 13px; font-weight: 800; opacity: .6; margin: -4px 0 14px; }
.ic-body{ font-size: 14.5px; line-height: 1.95; margin: 0; }
.ic-body b{ background: linear-gradient(transparent 62%, var(--yellow) 62%); padding: 0 1px; }

.ic-how{ background: linear-gradient(160deg,#EFFCFF,#F6FFE6) !important; }
.how-list{ list-style: none; padding: 0; margin: 0; }
.how-list li{ display: flex; gap: 12px; align-items: flex-start; background: #fff;
  border: var(--bd) solid var(--ink); border-radius: 18px; padding: 13px 14px; margin-bottom: 9px; }
.how-list li:last-child{ margin-bottom: 0; }
.how-emoji{ font-size: 26px; line-height: 1.2; }
.how-list b{ display: block; font-size: 15px; margin-bottom: 2px; }
.how-list div{ font-size: 12.5px; line-height: 1.7; font-weight: 700; opacity: .78; }
.how-list div b{ opacity: 1; }

.ic-promise{ background: linear-gradient(160deg,#FFF0F6,#F5EDFF) !important; }
.intro-note{ text-align: center; font-size: 11.5px; font-weight: 800; opacity: .5; margin: 0; }

/* ============================================================
   🎰 ガチャ
   ============================================================ */
.moods{ display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 9px; margin-bottom: 18px; }
.mood{ padding: 14px 6px 12px; border-radius: 20px; border: var(--bd) solid var(--ink);
  background: #fff; box-shadow: 3px 3px 0 var(--ink); text-align: center; line-height: 1.3;
  transition: transform .1s; }
.mood span{ display: block; font-size: 26px; margin-bottom: 4px; }
.mood small{ font-size: 12px; font-weight: 800; }
.mood:active{ transform: translate(3px,3px); box-shadow: 0 0 0 var(--ink); }
.mood.is-on{ background: var(--yellow); transform: translate(3px,3px); box-shadow: 0 0 0 var(--ink); }

.machine{ position: relative; border: var(--bd) solid var(--ink); border-radius: 30px;
  background: linear-gradient(160deg,#fff 0%, #FFE9F3 100%); box-shadow: var(--shadow-lg);
  padding: 26px 20px; text-align: center; overflow: hidden; }
.machine::before{ content:''; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(var(--ink) 1.2px, transparent 1.2px);
  background-size: 16px 16px; opacity: .07; }
.machine > *{ position: relative; }
.machine-ball{ font-size: 74px; display: inline-block; animation: bob 2.4s ease-in-out infinite; }
@keyframes bob{ 0%,100%{ transform: translateY(0) rotate(-4deg); } 50%{ transform: translateY(-12px) rotate(4deg); } }
.machine.rolling .machine-ball{ animation: roll .5s linear infinite; }
@keyframes roll{ to{ transform: rotate(360deg) scale(1.05); } }
.machine p{ margin: 8px 0 18px; font-size: 14px; font-weight: 800; opacity: .7; position: relative; }

/* 出たミッション */
.ticket{ position: relative; border: var(--bd) solid var(--ink); border-radius: var(--r);
  background: var(--paper); box-shadow: var(--shadow-lg); padding: 26px 20px 22px; text-align: center;
  animation: dropIn .5s cubic-bezier(.2,1.5,.4,1); }
@keyframes dropIn{ from{ opacity: 0; transform: translateY(-24px) rotate(-4deg) scale(.9); } }
.ticket-emoji{ font-size: 60px; line-height: 1; }
.ticket-title{ font-size: 22px; font-weight: 900; line-height: 1.45; margin: 12px 0 0; letter-spacing: -.01em; }
.ticket-why{ font-size: 13px; line-height: 1.8; opacity: .75; margin: 18px 0 0; position: relative;
  border-top: 3px dashed rgba(27,11,46,.16); padding-top: 16px; }

.done-stamp{ display: inline-block; margin-bottom: 12px; padding: 8px 20px; border-radius: 999px;
  background: var(--lime); border: var(--bd) solid var(--ink); font-weight: 900; font-size: 14px;
  transform: rotate(-4deg); box-shadow: 3px 3px 0 var(--ink); }

/* ============================================================
   ⚡ ジャッジ
   ============================================================ */
.dots{ display: flex; gap: 5px; justify-content: center; margin-bottom: 16px; flex-wrap: wrap; }
.dot{ width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--ink); background: transparent; }
.dot.on{ background: var(--pink); }
.dot.now{ background: var(--ink); transform: scale(1.4); }

.jcard{ position: relative; min-height: 260px; display: flex; flex-direction: column; justify-content: center;
  border: var(--bd) solid var(--ink); border-radius: 30px; background: var(--paper);
  box-shadow: var(--shadow-lg); padding: 30px 24px; text-align: center;
  animation: cardIn .35s cubic-bezier(.2,1.3,.4,1); }
@keyframes cardIn{ from{ opacity: 0; transform: translateY(30px) rotate(3deg); } }
.jcard.out-yes{ animation: flyR .3s ease-in forwards; }
.jcard.out-no{ animation: flyL .3s ease-in forwards; }
@keyframes flyR{ to{ transform: translateX(120%) rotate(18deg); opacity: 0; } }
@keyframes flyL{ to{ transform: translateX(-120%) rotate(-18deg); opacity: 0; } }

.jtag{ position: absolute; top: -14px; left: 50%; transform: translateX(-50%) rotate(-2deg);
  font-family: var(--font-en); font-weight: 900; font-size: 12px; letter-spacing: .08em;
  padding: 6px 14px; border-radius: 999px; background: var(--cyan); border: var(--bd) solid var(--ink);
  white-space: nowrap; }
.jquote{ font-size: 21px; line-height: 1.6; font-weight: 900; letter-spacing: -.01em; }
.jquote::before{ content:'“'; } .jquote::after{ content:'”'; }
.jhint{ margin-top: 16px; font-size: 12px; font-weight: 800; opacity: .45; }

.judge-btns{ display: flex; gap: 12px; margin-top: 18px; }
.jbtn{ flex: 1; padding: 20px 8px; border-radius: 24px; border: var(--bd) solid var(--ink);
  box-shadow: var(--shadow); font-weight: 900; font-size: 19px; line-height: 1.2;
  transition: transform .08s, box-shadow .08s; }
.jbtn small{ display: block; font-family: var(--font-en); font-size: 10px; letter-spacing: .1em; opacity: .55; margin-top: 3px; }
.jbtn:active{ transform: translate(5px,5px); box-shadow: 0 0 0 var(--ink); }
.jbtn-no{ background: var(--cyan); }
.jbtn-yes{ background: var(--pink); color: #fff; }

/* 答えあわせ */
.reveal{ animation: cardIn .3s cubic-bezier(.2,1.3,.4,1); }
.verdict{ text-align: center; margin-bottom: 14px; }
.verdict-mark{ font-size: 76px; line-height: 1; display: inline-block; animation: stamp .45s cubic-bezier(.2,1.8,.4,1); }
@keyframes stamp{ 0%{ transform: scale(2.4) rotate(-14deg); opacity: 0; } 60%{ transform: scale(.9); } 100%{ transform: scale(1); } }
.verdict-hit{ font-size: 22px; font-weight: 900; margin-top: 4px; letter-spacing: -.01em; }
.verdict-sub{ font-size: 12px; font-weight: 800; opacity: .5; margin-top: 4px; }
.why{ font-size: 14px; line-height: 1.9; margin: 0; }

.got{ display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 12px 14px;
  border-radius: 18px; background: var(--lime); border: var(--bd) solid var(--ink);
  animation: dropIn .45s cubic-bezier(.2,1.5,.4,1); }
.got-emoji{ font-size: 32px; }
.got b{ display: block; font-size: 15px; }
.got small{ font-size: 11px; font-weight: 800; opacity: .6; }

/* ============================================================
   🔮 診断
   ============================================================ */
.q-num{ font-family: var(--font-en); font-weight: 900; font-size: 13px; letter-spacing: .1em; opacity: .5; }
.q-text{ font-size: 21px; font-weight: 900; line-height: 1.55; margin: 6px 0 18px; letter-spacing: -.01em; }
.choice{ display: block; width: 100%; text-align: left; padding: 15px 18px; margin-bottom: 10px;
  border-radius: 20px; border: var(--bd) solid var(--ink); background: #fff; font-weight: 800; font-size: 15px;
  box-shadow: 4px 4px 0 var(--ink); transition: transform .08s, box-shadow .08s; line-height: 1.5; }
.choice:active{ transform: translate(4px,4px); box-shadow: 0 0 0 var(--ink); }

.result{ border: var(--bd) solid var(--ink); border-radius: 30px; box-shadow: var(--shadow-lg);
  padding: 30px 22px; text-align: center; color: #fff; position: relative; overflow: hidden;
  animation: dropIn .55s cubic-bezier(.2,1.4,.4,1); }
.result::before{ content:''; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.5) 1.4px, transparent 1.4px);
  background-size: 18px 18px; opacity: .35; }
.result > *{ position: relative; }
.result-emoji{ font-size: 72px; line-height: 1; }
.result-label{ font-family: var(--font-en); font-weight: 900; font-size: 11px; letter-spacing: .22em;
  color: var(--ink); opacity: .6; margin-top: 10px; }
.result-name{ font-size: 34px; font-weight: 900; margin: 2px 0 8px; letter-spacing: -.02em;
  text-shadow: 3px 3px 0 var(--ink), -1px -1px 0 var(--ink), 1px -1px 0 var(--ink), -1px 1px 0 var(--ink); }
.result-catch{ display: inline-block; font-size: 13px; font-weight: 900; padding: 7px 16px;
  border-radius: 999px; background: var(--ink); }
.result-body{ font-size: 14px; line-height: 1.9; margin: 18px 0 0; text-align: left;
  background: rgba(255,255,255,.92); color: var(--ink); padding: 16px; border-radius: 18px; }
.next-list{ list-style: none; padding: 0; margin: 14px 0 0; text-align: left; }
.next-list li{ background: #fff; color: var(--ink); border: var(--bd) solid var(--ink); border-radius: 16px;
  padding: 12px 14px; margin-bottom: 8px; font-size: 14px; font-weight: 800; display: flex; gap: 9px; line-height: 1.5; }
.next-list li::before{ content:'▶'; font-size: 10px; margin-top: 4px; color: var(--pink); }
.hashtag{ font-family: var(--font-en); font-weight: 900; font-size: 13px; margin-top: 16px;
  letter-spacing: .04em; color: var(--ink); opacity: .65; }

/* ============================================================
   🏷️ シール帳
   ============================================================ */
.meter{ height: 22px; border: var(--bd) solid var(--ink); border-radius: 999px; background: #fff;
  overflow: hidden; box-shadow: 3px 3px 0 var(--ink); margin-bottom: 20px; }
.meter i{ display: block; height: 100%; border-radius: 999px;
  background: repeating-linear-gradient(45deg, var(--pink) 0 10px, var(--purple) 10px 20px);
  transition: width .6s cubic-bezier(.2,1,.3,1); }

.book{ display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 11px; }
.sticker{ aspect-ratio: 1; border-radius: 22px; border: var(--bd) solid var(--ink); background: #fff;
  box-shadow: 4px 4px 0 var(--ink); display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 4px; padding: 6px; text-align: center; }
.sticker b{ font-size: 32px; line-height: 1; }
.sticker small{ font-size: 10px; font-weight: 800; line-height: 1.25; word-break: break-word; }
.sticker.got:nth-child(3n+1){ background: #FFF0F6; transform: rotate(-2.5deg); }
.sticker.got:nth-child(3n+2){ background: #EFFCFF; transform: rotate(1.5deg); }
.sticker.got:nth-child(3n){ background: #F6FFE6; transform: rotate(-1deg); }
.sticker.locked{ background: #F3F1F6; border-style: dashed; box-shadow: none; opacity: .55; }
.sticker.locked b{ filter: grayscale(1) opacity(.35); }
.sticker.locked small{ opacity: .5; }

/* ---------- 下タブ ---------- */
.tabs{ position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 50; display: flex; gap: 2px; padding: 5px; width: calc(100% - 28px); max-width: 420px;
  background: #fff; border: var(--bd) solid var(--ink); border-radius: 999px; box-shadow: var(--shadow); }
.tab{ flex: 1; border: none; background: transparent; border-radius: 999px; padding: 8px 2px 7px;
  font-size: 10.5px; font-weight: 900; display: flex; flex-direction: column; align-items: center; gap: 2px;
  transition: background .18s, transform .18s; }
.tab span{ font-size: 19px; line-height: 1; }
.tab.is-on{ background: var(--ink); color: var(--lime); }
.tab.is-on span{ transform: scale(1.12); }

/* ---------- キラキラ ---------- */
.pop-layer{ position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.spark{ position: absolute; font-size: 26px; animation: fly .95s ease-out forwards; }
@keyframes fly{
  0%{ transform: translate(0,0) scale(.4) rotate(0); opacity: 1; }
  100%{ transform: translate(var(--dx), var(--dy)) scale(1.25) rotate(var(--rot)); opacity: 0; }
}

/* ---------- トースト ---------- */
.toast{ position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom));
  transform: translate(-50%, 24px); z-index: 70; padding: 12px 20px; border-radius: 999px;
  background: var(--ink); color: var(--lime); font-weight: 900; font-size: 13.5px;
  border: var(--bd) solid var(--ink); box-shadow: 4px 4px 0 var(--pink);
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; white-space: nowrap; }
.toast.on{ opacity: 1; transform: translate(-50%, 0); }

/* ---------- フッター的なやつ ---------- */
.foot{ margin-top: 26px; padding: 16px; border-radius: 20px; border: 2px dashed rgba(27,11,46,.25);
  font-size: 11.5px; line-height: 1.85; font-weight: 700; opacity: .62; }
.foot b{ display: block; margin-bottom: 4px; font-size: 12px; opacity: .9; }

/* ---------- 動きを減らす設定の人へ ---------- */
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{ animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; }
}

/* ---------- ちょい広い画面 ---------- */
@media (min-width: 600px){
  .h1{ font-size: 32px; }
  .jquote{ font-size: 24px; }
}
