:root {
  --bg: #fff6f8;
  --bg2: #f3efff;
  --card: #ffffff;
  --ink: #3a2c40;
  --muted: #8a7b90;
  --accent: #ff6f91;
  --accent2: #9b7bff;
  --accent-ink: #fff;
  --line: #06c755;
  --border: #f3dbe5;
  --yes: #ff5c8a;
  --no: #6c86e8;
  --unk: #a99bb3;
  --shadow: 0 10px 30px rgba(255, 111, 145, 0.18);
  --red: #d61f3c;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #1f1824;
    --bg2: #251d33;
    --card: #2d2436;
    --ink: #f6eef8;
    --muted: #b8aac0;
    --border: #44374d;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    --red: #ff6b81;
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { overflow-x: hidden; }
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; } /* ダブルタップでズームしない */
body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(120% 60% at 0% 0%, var(--bg2), transparent 60%), var(--bg);
  background-attachment: fixed;
  font-family: 'M PLUS Rounded 1c', system-ui, -apple-system, 'Hiragino Maru Gothic ProN', 'Hiragino Sans', sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}
#app { max-width: 480px; margin: 0 auto; padding: 0 16px 72px; }
.top { display: flex; justify-content: space-between; align-items: center; padding: 8px 0 0; }
.brand { text-decoration: none; font-size: 20px; line-height: 1; }
.lang { background: var(--card); border: 1px solid var(--border); color: var(--muted); border-radius: 99px; padding: 4px 12px; font: inherit; font-size: 12px; cursor: pointer; }
h1 { font-size: 30px; line-height: 1.25; margin: 0 0 4px; font-weight: 900; letter-spacing: .01em; }
h2 { font-size: 17px; margin: 18px 0 8px; }

/* ---------- 共通 ---------- */
.card, .panel { background: var(--card); border: 1px solid var(--border); border-radius: 24px; padding: 16px 14px; box-shadow: var(--shadow); }
.card h1 { font-size: 24px; }
.btn { display: block; width: 100%; margin-top: 10px; padding: 14px; font: inherit; font-size: 16px; font-weight: 700; text-align: center;
  border: 1px solid var(--border); border-radius: 16px; background: var(--card); color: var(--ink); text-decoration: none; cursor: pointer; }
.btn.primary { background: linear-gradient(135deg, var(--accent), #ff9a76); color: var(--accent-ink); border: 0; margin-top: 14px; padding: 12px; line-height: 1.3;
  box-shadow: 0 8px 20px rgba(255, 111, 145, 0.35); transition: transform .15s; }
.btn.primary:active { transform: scale(.97); }
.btn.primary small { display: block; font-size: 10px; font-weight: 500; opacity: .85; }
.sub { display: block; margin-top: 16px; text-align: center; color: var(--muted); background: none; border: 0; font: inherit; font-size: 14px; width: 100%; cursor: pointer; }
.hint { color: var(--muted); font-size: 14px; margin: 0 0 4px; }
.link { display: block; width: 100%; margin-top: 10px; padding: 8px 10px; font-size: 11px; color: var(--muted); border: 1px dashed var(--border); border-radius: 10px; background: transparent; }
input.name-input { display: block; width: 100%; padding: 10px 14px; font: inherit; font-size: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg); color: var(--ink); }

/* ---------- タイル ---------- */
.label { font-size: 12px; color: var(--muted); font-weight: 700; margin: 10px 0 5px; letter-spacing: .04em; }
.label:first-child { margin-top: 0; }
.tiles { display: grid; gap: 8px; }
.tiles-5 { grid-template-columns: repeat(5, 1fr); gap: 6px; }
.tiles-5 .tile { font-size: 11px; padding: 10px 2px; letter-spacing: -.02em; }
.share .tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
.tiles-4 { grid-template-columns: repeat(4, 1fr); }
.tiles-2 { grid-template-columns: repeat(2, 1fr); }
.tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 54px; padding: 6px 4px;
  font: inherit; font-size: 12px; font-weight: 700; line-height: 1.25; text-align: center; color: var(--ink); text-decoration: none;
  background: var(--bg); border: 2px solid transparent; border-radius: 18px; cursor: pointer; transition: transform .15s, background .2s, border-color .2s; }
.tile .ti { font-size: 22px; line-height: 1; }
.tile span:last-child { white-space: pre-line; }
.tile:active { transform: scale(.95); }
.tile.on { background: linear-gradient(160deg, #fff0f5, #f3ecff); border-color: var(--accent); box-shadow: 0 6px 16px rgba(255, 111, 145, .25); }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .tile.on { background: linear-gradient(160deg, #4a2b3d, #352a52); } }
.share .tile { min-height: 64px; flex-direction: row; gap: 8px; font-size: 14px; }
.share .tile .ti { font-size: 20px; }
.tile-line { background: var(--line); color: #fff; }
.tile-ig { background: linear-gradient(135deg, #feda75, #fa7e1e 30%, #d62976 60%, #962fbf 85%, #4f5bd5); color: #fff; }

/* ---------- 贈る側 ---------- */
.hero { text-align: center; padding: 0 4px 10px; }
.hero-small { padding-top: 16px; }
.hero-art { font-size: 26px; display: flex; justify-content: center; gap: 12px; margin-bottom: 0; }
.hero-art span { display: inline-block; animation: bob 2.4s ease-in-out infinite; }
.hero-art span:nth-child(2) { animation-delay: .3s; font-size: 34px; }
.hero-art span:nth-child(3) { animation-delay: .6s; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-4deg); } }
.tagline { color: var(--accent); font-weight: 800; margin: 0; font-size: 12px; }
.lead { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 4px 0 0; }
.legal { display: flex; justify-content: center; gap: 6px; margin: 10px 0 0; font-size: 11px; color: var(--muted); }
.legal a { color: var(--muted); }
.made { margin-top: 22px; padding-top: 6px; border-top: 1px dashed var(--border); animation: pop .35s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }

/* ---------- 真ん中に寄せる画面（届いた・占い完了） ---------- */
.stage { min-height: calc(100vh - 140px); min-height: calc(100dvh - 140px); display: flex; flex-direction: column; justify-content: center; align-items: stretch; text-align: center; padding: 8px 4px 16px; }
.stage-art { position: relative; height: 150px; margin-bottom: 8px; }
.stage-art .orb { position: absolute; left: 50%; top: 10px; font-size: 92px; line-height: 1; transform: translateX(-50%); animation: float 3s ease-in-out infinite; filter: drop-shadow(0 14px 18px rgba(155, 123, 255, .35)); }
.stage-art .letter { position: absolute; left: calc(50% + 34px); top: 74px; font-size: 48px; animation: float 3s ease-in-out infinite .5s; }
.stage-art .spark { position: absolute; font-size: 22px; animation: twinkle 2s ease-in-out infinite; }
.stage-art .s1 { left: 18%; top: 14px; } .stage-art .s2 { right: 18%; top: 4px; animation-delay: .6s; } .stage-art .s3 { left: 26%; top: 104px; animation-delay: 1.1s; font-size: 16px; }
@keyframes float { 50% { transform: translate(-50%, -10px); } }
.stage-art .letter { animation-name: float2; } @keyframes float2 { 50% { transform: translateY(-8px) rotate(-6deg); } }
@keyframes twinkle { 50% { opacity: .3; transform: scale(.7); } }
.stage h1 { font-size: 26px; white-space: pre-line; }
.stage .lead { font-size: 14px; margin-top: 8px; }
.chips { list-style: none; padding: 0; margin: 18px 0 4px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.chips li { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 10px 2px; font-size: 11px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.chips li span { display: block; font-size: 20px; margin-bottom: 2px; }
.stage .btn.primary { font-size: 18px; padding: 16px; }
.stage-panel { margin-top: 16px; text-align: left; }
.done-pill { display: block; width: fit-content; margin: 0 auto 6px; padding: 4px 14px; border-radius: 99px; background: #e5f7ec; color: #1f8a4c; font-size: 13px; font-weight: 800; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .done-pill { background: #1d3b2a; color: #8be0ad; } }
.stage-panel.optional { box-shadow: none; opacity: .92; }
.stage-panel.optional .hint { margin: 2px 0 10px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.stage-panel.optional .btn { width: fit-content; display: block; margin: 0 auto; }
.opt-tag { display: inline-block; margin-right: 6px; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--border); font-size: 11px; color: var(--muted); vertical-align: 1px; }
@media (max-height: 720px) { .stage-art { height: 110px; } .stage-art .orb { font-size: 70px; } .stage-art .letter { top: 56px; font-size: 38px; } }

/* ---------- 年代・性別（プルダウン） ---------- */
.pick-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pick-pill { position: relative; min-width: 0; display: flex; align-items: center; gap: 6px; padding: 0 28px 0 12px; height: 42px; border-radius: 14px; background: var(--bg); border: 2px solid transparent; font-size: 11px; font-weight: 700; color: var(--muted); margin: 0; }
.pick-pill::after { content: '▾'; position: absolute; right: 10px; color: var(--muted); pointer-events: none; }
.pick-pill.on { border-color: var(--accent); }
.pick-pill select { flex: 1; min-width: 0; text-overflow: ellipsis; appearance: none; -webkit-appearance: none; border: 0; background: transparent; padding: 0; margin: 0; font: inherit; font-size: 14px; font-weight: 800; color: var(--ink); width: auto; display: block; }
.for-whom { margin: 0 0 4px; font-size: 13px; font-weight: 700; color: var(--accent); }
.pick-note { margin: 4px 2px 0; font-size: 10px; color: var(--muted); line-height: 1.4; }
.chips-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: inherit; font-size: 12px; font-weight: 700; padding: 7px 11px; border-radius: 99px; border: 2px solid transparent; background: var(--bg); color: var(--ink); cursor: pointer; }
.chip.on { border-color: var(--accent); background: linear-gradient(160deg, #fff0f5, #f3ecff); }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .chip.on { background: linear-gradient(160deg, #4a2b3d, #352a52); } }
.label-note { font-weight: 500; font-size: 10px; margin-left: 4px; }

/* ---------- 答えた人への方向性のヒント ---------- */
.hint-box { margin: 12px auto 4px; max-width: 360px; padding: 14px 16px; border-radius: 20px; background: linear-gradient(160deg, #fff0f5, #f3ecff); border: 1px solid var(--border); box-shadow: var(--shadow); animation: pop .4s ease-out; }
.hint-box small { display: block; font-size: 12px; color: var(--muted); font-weight: 700; }
.hint-box strong { display: block; margin-top: 4px; font-size: 18px; line-height: 1.45; color: var(--accent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .hint-box { background: linear-gradient(160deg, #4a2b3d, #352a52); } }

/* ---------- 結果を見るリンク・送った占い ---------- */
.mine { margin-top: 12px; }
.mine .hint { font-size: 12px; line-height: 1.5; }
.mine-row { display: flex; gap: 8px; margin-top: 8px; }
.mine-link { flex: 1; min-width: 0; padding: 8px 10px; font-size: 11px; color: var(--muted); border: 1px dashed var(--border); border-radius: 10px; background: transparent; }
.btn.mini { width: auto; margin: 0; padding: 8px 14px; font-size: 13px; border-radius: 12px; white-space: nowrap; }
.sent-link { font: inherit; font-size: 12px; font-weight: 800; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; }
.legal { flex-wrap: wrap; align-items: center; }
.sent { list-style: none; margin: 0; padding: 0; }
.sent li + li { border-top: 1px dashed var(--border); }
.sent a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 2px; color: var(--ink); text-decoration: none; font-weight: 700; }
.sent-main small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); }
.badge { flex: none; font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 99px; background: var(--bg); color: var(--muted); border: 1px solid var(--border); }
.badge.ok { background: var(--accent); color: #fff; border-color: var(--accent); }
.badge.off { opacity: .6; }

/* ---------- 伝書鳩 ---------- */
.pigeon-stage { position: fixed; inset: 0; z-index: 30; overflow: hidden; background: radial-gradient(circle at 50% 55%, rgba(255, 240, 246, .92), rgba(243, 236, 255, .88)); animation: veil 2.3s ease forwards; }
@keyframes veil { 0% { opacity: 0; } 10%, 80% { opacity: 1; } 100% { opacity: 0; } }
.pigeon { position: absolute; left: -60vw; bottom: 12%; width: 62vw; max-width: 340px; animation: fly 1.9s cubic-bezier(.3, .1, .6, 1) forwards; }
.pigeon-svg { width: 100%; display: block; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .15)); }
.wing-front, .wing-back { transform-origin: 58px 46px; animation: flap .22s ease-in-out infinite alternate; }
.wing-back { animation-delay: .05s; }
@keyframes flap { to { transform: scaleY(-.55); } }
@keyframes fly {
  0% { transform: translate(0, 0) rotate(-4deg); }
  45% { transform: translate(78vw, -24vh) rotate(-10deg); }
  100% { transform: translate(calc(165vw + 200px), -80vh) rotate(-18deg); }
}
.heart { position: absolute; left: calc(6% + var(--i) * 11%); bottom: calc(20% + var(--i) * 7%); color: var(--accent); font-size: 26px; opacity: 0;
  animation: heart 1.4s ease-out forwards; animation-delay: calc(.15s + var(--i) * .14s); }
@keyframes heart { 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-40px) scale(1.4); } }
.sent-toast { position: absolute; left: 50%; top: 22%; max-width: 86vw; white-space: normal !important; text-align: center; transform: translate(-50%, 0); margin: 0; padding: 10px 18px; border-radius: 99px;
  background: var(--card); color: var(--ink); font-weight: 800; box-shadow: var(--shadow); white-space: nowrap; opacity: 0; animation: toast 2.2s ease forwards; }
@keyframes toast { 15%, 80% { opacity: 1; transform: translate(-50%, -10px); } 100% { opacity: 0; transform: translate(-50%, -20px); } }

/* ---------- 答える側（スワイプ） ---------- */
.quiz { display: flex; flex-direction: column; align-items: stretch; }
.quiz-top { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; min-height: 32px; }
.back { font: inherit; font-size: 12px; color: var(--muted); background: var(--card); border: 1px solid var(--border); border-radius: 99px; padding: 4px 10px; cursor: pointer; }
.progress { height: 8px; background: var(--border); border-radius: 99px; overflow: hidden; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 99px; transition: width .3s; }
.deck { position: relative; height: min(54vh, 420px); margin: 14px 0 12px; }
.card-bg, .qcard { position: absolute; inset: 0; border-radius: 28px; }
.card-bg { background: var(--card); border: 1px solid var(--border); }
.card-bg.b1 { transform: translateY(10px) scale(.95); opacity: .8; }
.card-bg.b2 { transform: translateY(20px) scale(.9); opacity: .5; }
.qcard {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 28px 24px;
  background: linear-gradient(160deg, hsl(var(--hue) 100% 97%), hsl(calc(var(--hue) + 40) 90% 93%));
  color: #3a2c40; border: 1px solid rgba(255, 255, 255, .7); box-shadow: var(--shadow);
  touch-action: none; user-select: none; cursor: grab; animation: enter .3s ease-out; transition: transform .26s ease-in;
  --oy: 0; --on: 0; --ou: 0;
}
.qcard.drag { transition: none; cursor: grabbing; }
.qcard:focus { outline: none; }
@keyframes enter { from { transform: translateY(14px) scale(.94); } }
.qemoji { font-size: 64px; line-height: 1; margin-bottom: 14px; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .08)); }
.qnum { margin: 0; font-weight: 800; color: var(--accent); font-size: 14px; letter-spacing: .08em; }
.qtext { font-size: 22px; line-height: 1.5; margin: 6px 0 0; }
.stamp { position: absolute; top: 22px; padding: 4px 12px; background: rgba(255, 255, 255, .85); border: 3px solid; border-radius: 12px; font-weight: 900; font-size: 20px; pointer-events: none; }
.st-yes { left: 20px; color: var(--yes); transform: rotate(-14deg); opacity: var(--oy); }
.st-no { right: 20px; color: var(--no); transform: rotate(14deg); opacity: var(--on); }
.st-unknown { left: 50%; top: auto; bottom: 22px; transform: translateX(-50%); color: var(--unk); opacity: var(--ou); }
.qcard.show-yes { --oy: 1; }
.qcard.show-no { --on: 1; }
.qcard.show-unknown { --ou: 1; }
/* 1問目のお手本: 右へ（はい）→ 左へ（いいえ）→ 戻る を一度だけ */
.qcard.tutorial { animation: tut-card 2.6s ease-in-out .5s 1 both; }
@keyframes tut-card {
  0%, 100% { transform: none; }
  22%, 32% { transform: translateX(70px) rotate(6deg); }
  45% { transform: none; }
  67%, 77% { transform: translateX(-70px) rotate(-6deg); }
  90% { transform: none; }
}
.qcard.tutorial .st-yes { animation: tut-yes 2.6s ease-in-out .5s 1 both; }
.qcard.tutorial .st-no { animation: tut-no 2.6s ease-in-out .5s 1 both; }
@keyframes tut-yes { 0%, 12%, 42%, 100% { opacity: 0; } 22%, 32% { opacity: 1; } }
@keyframes tut-no { 0%, 57%, 87%, 100% { opacity: 0; } 67%, 77% { opacity: 1; } }
.swipe-tip { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); z-index: 3; pointer-events: none; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.tip-hand { font-size: 40px; line-height: 1; animation: tut-hand 2.6s ease-in-out .5s 1 both; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .2)); }
@keyframes tut-hand { 0%, 100% { transform: none; } 22%, 32% { transform: translateX(70px); } 45% { transform: none; } 67%, 77% { transform: translateX(-70px); } 90% { transform: none; } }
.tip-text { background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 800; padding: 4px 12px; border-radius: 99px; white-space: nowrap; }
.answers-row { display: flex; justify-content: center; align-items: center; gap: 6px; }
.round { font: inherit; font-weight: 800; border: 0; border-radius: 99px; background: var(--card); color: var(--muted); cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .08); transition: transform .12s; }
.round:active { transform: scale(.9); }
.round.big { width: 64px; height: 64px; font-size: 26px; }
.round.big.yes { color: #fff; background: linear-gradient(135deg, #ff5c8a, #ff9a76); }
.round.big.no { color: #fff; background: linear-gradient(135deg, #6c86e8, #8fd3f4); }
.round.mid { width: 46px; height: 46px; font-size: 18px; }
.round.small { min-width: 58px; height: 40px; padding: 0 6px; font-size: 10px; white-space: nowrap; }
.arrow { display: flex; align-items: center; justify-content: center; gap: 4px; width: 86px; height: 62px; border: 0; cursor: pointer;
  font: inherit; font-weight: 800; color: #fff; transition: transform .12s; white-space: nowrap; -webkit-appearance: none; appearance: none; }
.arrow span { font-size: 24px; line-height: 1; }
.arrow small { font-size: 10px; }
.arrow.no { background: linear-gradient(135deg, #6c86e8, #8fd3f4); clip-path: polygon(0 50%, 30% 0, 100% 0, 100% 100%, 30% 100%); padding: 0 4px 0 18px; }
.arrow.yes { background: linear-gradient(135deg, #ff5c8a, #ff9a76); clip-path: polygon(0 0, 70% 0, 100% 50%, 70% 100%, 0 100%); padding: 0 18px 0 4px; }
.arrow:active { transform: scale(.92); }
.swipe-hint { text-align: center; color: var(--muted); font-size: 12px; margin: 12px 0 0; }

/* ---------- 結果 ---------- */
.picks { list-style: none; padding: 0; margin: 16px 0 0; }
.pick { border: 1px solid var(--border); border-radius: 20px; padding: 16px; margin-top: 12px; background: var(--bg); }
.pick h3 { margin: 4px 0; font-size: 19px; }
.rank { font-size: 12px; font-weight: 800; color: var(--accent); }
.reason { margin: 0; font-size: 14px; color: var(--muted); }
.notice-red { margin: 6px 0 0; font-size: 13px; font-weight: 800; color: var(--red); }
.notice { margin: 6px 0 0; font-size: 13px; }
.warn { background: #fff3cd; color: #6b5300; padding: 8px 12px; border-radius: 10px; font-size: 13px; }
/* 贈る側の評価（当たってる・どれもピンとこない・喜んでもらえた？） */
.fb-fit, .fb-none { margin-top: 10px; background: var(--card); border: 1px solid var(--border); color: var(--muted); border-radius: 99px; padding: 6px 14px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.fb-fit.on, .fb-none.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.fb-box { margin-top: 12px; text-align: center; }
.fb-lead { margin: 12px 0 0; padding: 10px 12px; border-radius: 14px; background: var(--bg); font-size: 13px; color: var(--muted); line-height: 1.6; }
.fb-lead b { color: var(--ink); }
.fb-status { min-height: 1.4em; margin: 6px 0 0; font-size: 13px; font-weight: 700; color: var(--accent); }
.fb-reactions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.fb-reactions .btn.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.others { margin-top: 18px; border-top: 1px dashed var(--border); padding-top: 10px; }
.others summary { cursor: pointer; color: var(--accent); font-weight: 800; font-size: 14px; list-style: none; text-align: center; }
.others summary::-webkit-details-marker { display: none; }
.others summary::after { content: ' ▾'; }
.others[open] summary::after { content: ' ▴'; }
.other-list { margin: 10px 0 0; padding-left: 22px; font-size: 14px; }
.other-list li { margin-bottom: 10px; }
.other-list a { color: var(--ink); font-weight: 700; }
.other-list .reason, .other-list .notice-red, .other-list .notice { display: block; margin: 0; font-size: 12px; }
.debug { font-size: 12px; overflow-x: auto; background: var(--bg); padding: 8px; border-radius: 8px; }

/* ---------- 広告枠（忍者AdMax のバナー） ---------- */
.ad { display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.ad iframe.admax { display: block; border: 0; max-width: 100%; }
.ad-banner { position: fixed; left: 0; right: 0; bottom: 0; height: 60px; background: var(--card); z-index: 5; padding-bottom: env(safe-area-inset-bottom); }

/* 背の低い画面（iPhone SE など）では飾りを減らして一画面に収める */
@media (max-height: 720px) {
  .hero-art { display: none; }
  .hero .lead { display: none; }
  h1 { font-size: 26px; }
  .tile { min-height: 56px; }
  .deck { height: 46vh; }
}

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

/* ---------- 通販リンク（日本向けは楽天。Amazon を出すときは横並び。1つなら幅いっぱい） ---------- */
.stores { display: flex; gap: 8px; }
.stores .btn { flex: 1; min-width: 0; }
.stores .btn.amazon { border-color: #f3a847; }
.stores .btn.rakuten { border-color: #bf0000; color: #bf0000; }
.store-links { display: inline-flex; gap: 10px; margin-left: 8px; font-size: 13px; }
.pr-note { color: var(--muted); font-size: 11px; margin: 12px 0 0; }
.other-list .store-links a { color: var(--muted); font-weight: 500; text-decoration: underline; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .stores .btn.rakuten { color: #ff8a8a; border-color: #ff8a8a; } }
.imp { position: absolute; width: 1px; height: 1px; border: 0; opacity: 0; }

/* ---------- 拡散まわり: ストーリー画像・ほかの人も占う・ネタバラシ ---------- */
.hint-box .story-btn { display: block; margin: 10px auto 0; background: var(--card); }
.try-others { text-align: center; border: 2px solid var(--accent); }
.try-others h2 { font-size: 17px; margin: 2px 0 4px; }
.try-others .hint { font-size: 13px; line-height: 1.6; }
.try-others .btn.primary { margin-top: 8px; }
.btn.mini.another { display: block; margin: 12px auto 0; }
.extras { margin-top: 16px; }
.extras .label { margin-top: 4px; }
.extras .label + .hint, .extras .hint { font-size: 12px; line-height: 1.6; }
.extras .btn.mini { display: block; margin: 6px 0 14px; }
.img-modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .65); display: grid; place-items: center; z-index: 30; padding: 16px; }
.img-modal-box { background: var(--card); border-radius: 24px; padding: 14px; max-width: 360px; width: 100%; text-align: center; max-height: 100%; overflow: auto; }
.img-modal-box img { width: 100%; max-height: 60vh; object-fit: contain; border-radius: 16px; display: block; }
.img-modal-box .hint { margin: 10px 0 0; font-size: 12px; }

/* ---------- まとめて送る ---------- */
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.bulk-toggle { flex: none; font: inherit; font-size: 11px; font-weight: 800; color: var(--accent); background: var(--bg); border: 1px solid var(--border); border-radius: 99px; padding: 3px 10px; cursor: pointer; }
.bulk-toggle.on { color: var(--muted); }
.bulk-names { display: grid; gap: 6px; }
.add-name { display: block; margin: 6px 0 0; font-size: 12px; }
.bulk-list { list-style: none; margin: 0; padding: 0; }
.bulk-item { padding: 12px 2px; }
.bulk-item + .bulk-item { border-top: 1px dashed var(--border); }
.bulk-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.bulk-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.bulk-result { margin-top: 8px; font-size: 12px; color: var(--muted); }
.bulk-result summary { cursor: pointer; font-weight: 700; }
.bulk-foot { text-align: center; font-size: 12px; color: var(--muted); margin: 10px 16px; }
.giver-hint strong { font-size: 15px; }
.giver-hint .hint { margin: 6px 0 0; font-size: 12px; }
.guide-card { display: flex; align-items: center; gap: 12px; margin: 18px 0 6px; padding: 14px 16px; border-radius: 18px; border: 2px solid var(--accent); background: var(--card); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); }
.guide-card-icon { font-size: 26px; line-height: 1; }
.guide-card-text { flex: 1; min-width: 0; }
.guide-card-text b { display: block; font-size: 15px; }
.guide-card-text small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.guide-card-arrow { font-size: 26px; color: var(--accent); line-height: 1; }
.key-ico { display: inline-block; width: 1em; height: 1em; vertical-align: -.12em; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23f1d9a2'/%3E%3Cstop offset='.5' stop-color='%23c9a15e'/%3E%3Cstop offset='1' stop-color='%23946c33'/%3E%3C/linearGradient%3E%3C/defs%3E%3Ccircle cx='12' cy='9' r='4.2' fill='url(%23g)'/%3E%3Cpath d='M9.7 11.5 8.4 19.5h7.2l-1.3-8z' fill='url(%23g)'/%3E%3C/svg%3E") center / contain no-repeat; }
.key-badge { display: inline-block; width: 1.25em; height: 1.25em; border-radius: 50%; vertical-align: -.28em; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23f1d9a2'/%3E%3Cstop offset='.5' stop-color='%23c9a15e'/%3E%3Cstop offset='1' stop-color='%23946c33'/%3E%3C/linearGradient%3E%3C/defs%3E%3Ccircle cx='12' cy='9' r='4.2' fill='url(%23g)'/%3E%3Cpath d='M9.7 11.5 8.4 19.5h7.2l-1.3-8z' fill='url(%23g)'/%3E%3C/svg%3E") center / 78% no-repeat, linear-gradient(160deg, #9a6a43, #7b4d2c 55%, #5e3a22); }
