/* ===== 情報PiPi プレゼント応募ページ ===== */
:root {
  --blue: #1f4fd8;
  --blue-d: #14369c;
  --yellow: #ffe14d;
  --yellow-d: #d9b400;
  --pink: #ff5fa2;
  --mint: #3fd8b5;
  --purple: #8b5cf6;
  --ink: #1d2340;
  --muted: #6b6f86;
  --line: #e6e0f0;
  --bg: #fff8fc;
  --err: #e0245e;
  --rainbow: linear-gradient(90deg, #ff5fa2, #ff9a4d, #ffcf3f, #3fd8b5, #4d8bff, #8b5cf6, #ff5fa2);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", system-ui, sans-serif;
  font-weight: 500;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
.pipi { color: var(--blue); font-family: "Fredoka", sans-serif; }
.wrap { max-width: 680px; margin: 0 auto; padding: 0 16px; }
br.pc { display: none; }
@media (min-width: 600px) { br.pc { display: inline; } }

#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 50; }

/* ---- 上部バー ---- */
.topbar {
  position: relative; z-index: 6;
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px; background: #fff;
  box-shadow: 0 2px 10px rgba(29, 35, 64, .06);
}
.topbar a { color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.1rem; }
.topbar-tag {
  font-family: "Fredoka", sans-serif; font-weight: 700; font-size: .8rem; letter-spacing: .15em;
  color: #fff; padding: 2px 12px; border-radius: 999px;
  background: var(--rainbow); background-size: 300% 100%;
  animation: gradflow 4s linear infinite;
}

/* ===== ヒーロー ===== */
.hero {
  position: relative; overflow: hidden; text-align: center;
  padding: 20px 16px 56px;
  background: linear-gradient(120deg, #fff3b8, #ccf5e6, #ffd9ec, #dcdcff, #fff3b8);
  background-size: 400% 400%;
  animation: bgmove 14s ease infinite;
}
.hero--mini { padding-bottom: 28px; }
.hero > * { position: relative; z-index: 2; }
.hero-rays {
  position: absolute !important; z-index: 0 !important;
  left: 50%; top: 52%; width: 1100px; height: 1100px; margin: -550px 0 0 -550px;
  border-radius: 50%;
  background: repeating-conic-gradient(rgba(255, 255, 255, .7) 0 9deg, transparent 9deg 18deg);
  -webkit-mask-image: radial-gradient(circle, #000 15%, transparent 60%);
  mask-image: radial-gradient(circle, #000 15%, transparent 60%);
  animation: spin 40s linear infinite;
}
.hero-sparks { position: absolute !important; inset: 0; z-index: 1 !important; pointer-events: none; }

.hero-kicker {
  display: inline-block; margin: 0 0 4px; padding: 4px 18px;
  font-weight: 800; font-size: .95rem; color: #fff;
  background: var(--blue); border-radius: 999px;
  box-shadow: 0 4px 0 var(--blue-d);
  animation: wobble 3s ease-in-out infinite;
}
.hero-title {
  margin: 8px 0 0; font-weight: 800; line-height: 1.2;
  font-size: clamp(2.4rem, 11vw, 4.2rem); letter-spacing: .02em;
}
.hero-title span {
  display: inline-block; color: var(--pink);
  text-shadow: 0 0 0 #fff, 3px 3px 0 #fff, -3px -3px 0 #fff, 3px -3px 0 #fff, -3px 3px 0 #fff, 0 7px 0 rgba(29, 35, 64, .18);
  animation: hop 1.8s ease-in-out infinite;
  animation-delay: calc(var(--i) * .1s);
}
.hero-title span:nth-child(3n+2) { color: var(--blue); }
.hero-title span:nth-child(3n) { color: #ff9a1f; }
.hero--mini .hero-title { font-size: clamp(1.8rem, 8vw, 2.8rem); }

.hero-sub {
  margin: 4px 0 0; font-weight: 800; line-height: 1.3;
  font-size: clamp(1.3rem, 6vw, 2rem);
}
.hero-sub .kira { font-size: 1.25em; }
.hero-count { margin: 12px 0 20px; font-weight: 800; font-size: clamp(1.1rem, 5vw, 1.5rem); }
.hero-count strong { font-size: 1.6em; }

/* キラキラ文字 */
.kira {
  background: linear-gradient(100deg, var(--pink) 0%, var(--purple) 30%, #fff 45%, var(--blue) 60%, var(--pink) 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  animation: shimmer 3s linear infinite;
  filter: drop-shadow(0 2px 0 #fff) drop-shadow(0 4px 0 rgba(29, 35, 64, .12));
}

/* キラキラの星 */
.spark {
  position: absolute; width: var(--s); height: var(--s);
  background: var(--c, #fff); opacity: .9;
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  animation: twinkle var(--dur) ease-in-out infinite;
  animation-delay: var(--dl);
}

/* ===== プレゼント箱 ===== */
.gift {
  display: block; position: relative;
  width: 230px; height: 310px; margin: 16px auto 8px;
  padding: 0; border: 0; background: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.hero--mini .gift { transform: scale(.8); margin-top: -20px; margin-bottom: -40px; }
.gift:focus-visible { outline: 3px dashed var(--blue); outline-offset: 6px; border-radius: 12px; }
.gift-box {
  position: absolute; z-index: 2; left: 12px; bottom: 0; width: 206px; height: 150px;
  border-radius: 6px 6px 12px 12px;
  background: linear-gradient(90deg, transparent 43%, var(--yellow) 43%, var(--yellow) 57%, transparent 57%),
              linear-gradient(#ff86b6, #ff4f95);
  box-shadow: inset 0 -14px 0 rgba(0, 0, 0, .08), 0 16px 26px rgba(255, 79, 149, .35);
}
.gift-lid {
  position: absolute; z-index: 3; left: 0; bottom: 146px; width: 230px; height: 48px;
  border-radius: 10px;
  background: linear-gradient(90deg, transparent 43%, var(--yellow) 43%, var(--yellow) 57%, transparent 57%),
              linear-gradient(#ff9cc4, #ff6aa6);
  box-shadow: 0 6px 0 rgba(0, 0, 0, .08);
  transform-origin: 100% 100%;
}
.gift-bow { position: absolute; left: 50%; bottom: 40px; width: 100px; height: 52px; margin-left: -50px; }
.gift-bow::before, .gift-bow::after {
  content: ""; position: absolute; bottom: 0; width: 50px; height: 46px;
  border: 12px solid var(--yellow); border-radius: 50% 50% 8px 50%;
  box-shadow: 0 3px 0 var(--yellow-d);
}
.gift-bow::before { left: 0; transform: rotate(-18deg); }
.gift-bow::after { right: 0; transform: scaleX(-1) rotate(-18deg); }
.gift-plate {
  position: absolute; z-index: 1; left: 50%; bottom: 70px;
  transform: translate(-50%, 0) scale(.3); opacity: 0;
}

/* 揺れる → 開く */
.gift.is-shaking .gift-box,
.gift.is-shaking .gift-lid { animation: shake .45s ease-in-out 2; }
.gift.is-open .gift-lid {
  transform: rotate(98deg);
  animation: lidOff .6s cubic-bezier(.3, .8, .4, 1.15) both;
}
.gift.is-open .gift-plate {
  transform: translate(-50%, -150px) rotate(-7deg); opacity: 1;
  animation: plateUp 1s cubic-bezier(.2, 1.5, .4, 1) .1s both, plateFloat 3.2s ease-in-out 1.2s infinite;
}

/* ===== ネームプレート（CSSで描く） ===== */
.plate {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 24px 14px 14px;
  background: linear-gradient(#3166f0, var(--blue));
  border-radius: 999px;
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .18), 0 8px 0 var(--blue-d), 0 18px 28px rgba(31, 79, 216, .35);
  white-space: nowrap;
}
.plate-hole {
  flex: none; width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); box-shadow: inset 0 3px 3px rgba(0, 0, 0, .35);
}
.plate-text {
  font-family: "Fredoka", "M PLUS Rounded 1c", sans-serif; font-weight: 700;
  font-size: 50px; line-height: 1; color: var(--yellow); letter-spacing: .01em;
  text-shadow: 0 2px 0 #f4cf1c, 0 4px 0 var(--yellow-d), 0 7px 8px rgba(0, 0, 0, .3);
}
.plate-preview { text-align: center; margin: 18px 0 4px; }
.plate-preview .plate-text { font-size: clamp(26px, 8vw, 44px); }
.plate-note { margin: 14px 0 0; font-size: .8rem; color: var(--muted); }

/* ===== ボタン：流れるグラデーション ===== */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 14px 34px;
  border: 0; border-radius: 999px; cursor: pointer;
  font: inherit; font-weight: 800; font-size: 1.15rem; line-height: 1.3;
  color: #fff; text-decoration: none; text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
  background: var(--rainbow); background-size: 300% 100%;
  animation: gradflow 4s linear infinite;
  box-shadow: 0 6px 0 rgba(29, 35, 64, .18), 0 12px 24px rgba(255, 95, 162, .35);
  transition: transform .15s, box-shadow .15s;
}
.btn::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .75), transparent);
  transform: skewX(-20deg);
  animation: shine 2.6s ease-in-out infinite;
}
.btn:hover { transform: translateY(-2px) scale(1.04); }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(29, 35, 64, .18); }
.btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.btn-hero { font-size: 1.3rem; padding: 16px 40px; animation: gradflow 4s linear infinite, pulse 1.6s ease-in-out infinite; }
.btn-big { width: 100%; font-size: 1.25rem; min-height: 64px; }
.btn-sub {
  width: 100%; background: #fff; color: var(--ink); text-shadow: none;
  border: 2px solid var(--line); box-shadow: 0 4px 0 var(--line); animation: none;
}
.btn-sub::after { display: none; }
.btn.is-busy { opacity: .6; pointer-events: none; }

/* ===== セクション共通 ===== */
.sec { position: relative; padding: 56px 0; }
.sec-title {
  margin: 0 0 28px; text-align: center; font-weight: 800;
  font-size: clamp(1.5rem, 6.5vw, 2rem); line-height: 1.4;
}
.sec-title::before, .sec-title::after {
  content: "★"; display: inline-block; margin: 0 .4em; color: #ffcf3f;
  animation: spin 4s linear infinite;
}
.sec-title::after { color: var(--pink); animation-direction: reverse; }

.card {
  background: linear-gradient(#fff, #fff) padding-box, var(--rainbow) border-box;
  background-size: 100% 100%, 300% 100%;
  border: 4px solid transparent; border-radius: 26px;
  padding: 24px 18px;
  box-shadow: 0 16px 40px rgba(139, 92, 246, .14);
  animation: gradflowBorder 6s linear infinite;
}
@media (min-width: 600px) { .card { padding: 36px 40px; } }

/* ---- プレゼント紹介 ---- */
.sec-present { background: #fff; }
.present { position: relative; max-width: 560px; margin: 0 auto; }
.present-photo {
  border-radius: 22px; border: 6px solid #fff;
  box-shadow: 0 18px 40px rgba(29, 35, 64, .18);
  animation: float 5s ease-in-out infinite;
}
.stamp {
  position: absolute; right: -6px; top: -22px;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  width: 96px; height: 96px; border-radius: 50%;
  font-weight: 800; font-size: .85rem; line-height: 1.15; color: #fff; text-align: center;
  background: radial-gradient(circle at 30% 30%, #ff8fbf, var(--pink));
  border: 4px dashed rgba(255, 255, 255, .8);
  box-shadow: 0 8px 18px rgba(255, 95, 162, .45);
  animation: stamp 2.4s ease-in-out infinite;
}
.stamp b { font-family: "Fredoka", sans-serif; font-size: 2.2rem; line-height: 1; color: var(--yellow); }
.present-text { margin: 28px 0 0; text-align: center; font-size: 1.05rem; }
.present-text strong {
  background: linear-gradient(transparent 60%, rgba(255, 225, 77, .8) 60%);
}

/* ---- 応募のしかた ---- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 600px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step {
  position: relative; display: flex; align-items: center; gap: 14px;
  padding: 18px; background: #fff; border-radius: 20px;
  box-shadow: 0 8px 22px rgba(29, 35, 64, .08);
}
@media (min-width: 600px) { .step { flex-direction: column; text-align: center; } }
.step p { margin: 0; line-height: 1.6; }
.step b { color: var(--pink); }
.step-no {
  flex: none; display: grid; place-items: center;
  width: 54px; height: 54px; border-radius: 50%;
  font-family: "Fredoka", sans-serif; font-weight: 700; font-size: 1.7rem; color: #fff;
  background: var(--rainbow); background-size: 300% 100%;
  animation: gradflow 4s linear infinite, bob 2s ease-in-out infinite;
  box-shadow: 0 4px 0 rgba(29, 35, 64, .15);
}

/* ---- フォーム ---- */
.sec-form { background: linear-gradient(#fff8fc, #f3ecff); }
.field { margin-top: 26px; }
.entry-form label, .kw legend { display: block; font-weight: 800; font-size: 1.05rem; }
.req, .opt {
  display: inline-block; margin-left: 6px; padding: 0 8px; border-radius: 6px;
  font-size: .75rem; vertical-align: 2px; color: #fff; background: var(--pink);
}
.opt { background: #a9acbf; }
.hint { margin: 2px 0 6px; font-size: .85rem; color: var(--muted); line-height: 1.6; }
.entry-form input[type="text"],
.entry-form input[type="email"],
.entry-form textarea {
  width: 100%; margin-top: 6px; padding: 14px;
  font: inherit; font-size: 16px; /* iOSで勝手に拡大しないよう16px以上 */
  color: var(--ink); background: #fff;
  border: 2px solid var(--line); border-radius: 14px;
  transition: border-color .2s, box-shadow .2s;
}
.entry-form input.zip { max-width: 12em; }
.entry-form textarea { min-height: 120px; resize: vertical; }
.entry-form input:focus, .entry-form textarea:focus {
  outline: none; border-color: var(--pink); box-shadow: 0 0 0 4px rgba(255, 95, 162, .2);
}
.entry-form .is-err { border-color: var(--err); background: #fff5f8; }
.field-err { margin: 6px 0 0; color: var(--err); font-weight: 800; font-size: .9rem; }
.err-box {
  margin: 0 0 18px; padding: 14px 18px; border-radius: 14px;
  background: #fff0f4; border: 2px solid #ffb3c8; color: var(--err); font-weight: 800;
}

/* キーワード選択 */
.kw { margin: 0; padding: 0; border: 0; min-width: 0; }
.kw legend { padding: 0; margin-bottom: 12px; line-height: 1.6; }
.kw legend b { color: var(--pink); }
.tv {
  position: relative; display: inline-block; vertical-align: middle; margin-right: 6px;
  width: 64px; height: 44px; padding: 5px; border-radius: 9px; background: var(--ink);
}
.tv::before, .tv::after {
  content: ""; position: absolute; top: -10px; width: 2px; height: 12px; background: var(--ink);
}
.tv::before { left: 24px; transform: rotate(-30deg); }
.tv::after { right: 24px; transform: rotate(30deg); }
.tv-screen {
  display: grid; place-items: center; width: 100%; height: 100%; border-radius: 5px;
  font-size: .7rem; color: #fff; letter-spacing: .05em;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .08) 0 2px, transparent 2px 4px), var(--rainbow);
  background-size: 100% 100%, 300% 100%;
  animation: gradflowTv 3s linear infinite, blink 1.2s steps(2) infinite;
}
.kw-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kw-item { position: relative; display: block; cursor: pointer; }
.kw-item input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.kw-btn {
  display: block; padding: 16px 6px; text-align: center;
  font-family: "Fredoka", "M PLUS Rounded 1c", sans-serif; font-weight: 700; font-size: 1.15rem;
  background: #fff; border: 3px solid var(--line); border-radius: 16px;
  box-shadow: 0 4px 0 var(--line);
  transition: transform .15s, border-color .2s;
}
.kw-item:hover .kw-btn { border-color: var(--pink); transform: translateY(-2px); }
.kw-item input:focus-visible + .kw-btn { outline: 3px solid var(--blue); outline-offset: 2px; }
.kw-item input:checked + .kw-btn {
  color: #fff; border-color: transparent; text-shadow: 0 1px 2px rgba(0, 0, 0, .3);
  background: var(--rainbow); background-size: 300% 100%;
  box-shadow: 0 4px 0 rgba(29, 35, 64, .18), 0 0 18px rgba(255, 95, 162, .5);
  animation: gradflow 3s linear infinite, pop .45s cubic-bezier(.2, 1.6, .4, 1);
}
.kw.is-err .kw-btn { border-color: #ffb3c8; }

/* 注意書き・同意 */
.notes {
  margin-top: 30px; padding: 16px 18px; border-radius: 16px;
  background: #fffbe6; border: 2px dashed #ffd84d; font-size: .9rem; line-height: 1.7;
}
.notes p { margin: 0 0 6px; }
.notes ul { margin: 0; padding-left: 1.2em; }
.notes li + li { margin-top: 6px; }
.agree {
  display: flex !important; align-items: center; gap: 10px;
  margin-top: 18px; padding: 14px 16px; border-radius: 14px;
  background: #fff; border: 2px solid var(--line); cursor: pointer;
}
.agree.is-err { border-color: var(--err); background: #fff5f8; }
.agree input { width: 24px; height: 24px; flex: none; accent-color: var(--pink); }
.actions { display: grid; gap: 14px; margin-top: 28px; }

.hp-field {
  position: absolute; left: -9999px; top: -9999px;
  width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none;
}

/* ---- 確認画面 ---- */
.confirm-lead { margin: 0 0 6px; text-align: center; font-weight: 800; font-size: 1.1rem; }
.confirm-list { display: grid; grid-template-columns: 1fr; margin: 22px 0 0; }
.confirm-list dt { margin-top: 12px; font-size: .85rem; font-weight: 800; color: var(--muted); }
.confirm-list dd { margin: 0; padding-bottom: 10px; border-bottom: 1px dashed var(--line); word-break: break-all; }
.confirm-list .pre { white-space: pre-wrap; }
@media (min-width: 600px) {
  .confirm-list { grid-template-columns: 10em 1fr; }
  .confirm-list dt { margin-top: 0; padding: 10px 0; border-bottom: 1px dashed var(--line); }
  .confirm-list dd { padding: 10px 0; }
}
.addr-warn { margin: 18px 0 0; padding: 12px 14px; border-radius: 12px; background: #fffbe6; font-weight: 800; font-size: .95rem; }

/* ---- 完了画面 ---- */
.done { text-align: center; }
.done-big {
  margin: 0 0 16px; font-weight: 800; line-height: 1.35;
  font-size: clamp(1.7rem, 7.5vw, 2.4rem);
  color: var(--pink); animation: bob 2s ease-in-out infinite;
}
.done-note { font-size: .9rem; color: var(--muted); }

/* ---- フッター ---- */
.foot { padding: 32px 16px 40px; text-align: center; font-size: .85rem; color: var(--muted); background: #fff; }
.foot p { margin: 4px 0; }
.foot a { font-weight: 800; }
.foot .copy { margin-top: 12px; font-size: .75rem; }

/* ===== スクロールで出てくる ===== */
.js .rv {
  opacity: 0; transform: translateY(40px) scale(.97);
  transition: opacity .8s cubic-bezier(.2, .8, .2, 1), transform .8s cubic-bezier(.2, .8, .2, 1);
  transition-delay: var(--d, 0s);
}
.js .rv-pop { transform: scale(.6) rotate(-6deg); }
.js .rv.is-in { opacity: 1; transform: none; }

/* ===== キーフレーム ===== */
@keyframes gradflow { to { background-position: 300% 0; } }
@keyframes gradflowBorder { to { background-position: 0 0, 300% 0; } }
@keyframes gradflowTv { to { background-position: 0 0, 300% 0; } }
@keyframes bgmove { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes hop { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-14px) rotate(-4deg); } }
@keyframes wobble { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes shimmer { to { background-position: -250% 0; } }
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(.2) rotate(0); } 50% { opacity: 1; transform: scale(1) rotate(90deg); } }
@keyframes shake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-5deg) translateY(-3px); } 75% { transform: rotate(5deg) translateY(-3px); } }
@keyframes lidOff { from { transform: none; } 40% { transform: translateY(-14px) rotate(20deg); } }
@keyframes plateUp { from { transform: translate(-50%, 0) scale(.3) rotate(0); opacity: 0; } }
@keyframes plateFloat {
  0%, 100% { transform: translate(-50%, -150px) rotate(-7deg); }
  50% { transform: translate(-50%, -162px) rotate(5deg); }
}
@keyframes shine { 0% { left: -60%; } 55%, 100% { left: 130%; } }
@keyframes pulse { 0%, 100% { scale: 1; } 50% { scale: 1.07; } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-10px) rotate(1.5deg); } }
@keyframes stamp { 0%, 100% { transform: rotate(-10deg) scale(1); } 50% { transform: rotate(8deg) scale(1.1); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes pop { 0% { transform: scale(.8); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes blink { 50% { opacity: .55; } }

/* ===== 動きを減らす設定の人には止める ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
  .hero-rays, .hero-sparks { display: none; }
}

/* 言葉の途中で折り返さないためのまとまり */
.nw { display: inline-block; }
