/* =========================================================
   パシャ解 ver2.0 — にぎやかで、さわって楽しいデザイン
   ・モードごとのテーマ色（body[data-kind]）
   ・立体ボタン（押すと沈む）／動く背景／マスコット
   ========================================================= */
:root {
  --bg: #f7fbff;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --text: #2b2d42;
  --text-2: #5c6178;
  --text-3: #9095a8;
  --line: #e2e8f0;
  --line-dark: #cfd7e3;
  --ok: #58a700;
  --ok-soft: #d7ffb8;
  --ok-line: #58cc02;
  --warn: #c76d00;
  --warn-soft: #fff1d0;
  --ng: #e02f2f;
  --ng-soft: #ffe1e1;
  --gold: #ffc800;
  --shadow: 0 2px 0 var(--line);
  --radius: 22px;
  --safe-top: env(safe-area-inset-top);
  --safe-bottom: env(safe-area-inset-bottom);

  /* テーマ（既定は「問題」＝空色） */
  --mc: #1cb0f6;
  --mc-dark: #1386c0;
  --mc-soft: #ddf4ff;
  --mc-2: #7fd3ff;
  --bg-a: #ddf4ff;
  --bg-b: #f7fbff;
}
body[data-kind="translate"] { --mc: #b86ef5; --mc-dark: #8d48c9; --mc-soft: #f4e6ff; --mc-2: #e0b7ff; --bg-a: #f1e3ff; }
body[data-kind="creature"]  { --mc: #4fc000; --mc-dark: #3a9100; --mc-soft: #e3f9cf; --mc-2: #a8eb6a; --bg-a: #e2f8cf; }
body[data-kind="music"]     { --mc: #ff4b8b; --mc-dark: #d02f69; --mc-soft: #ffe3ee; --mc-2: #ffa3c4; --bg-a: #ffe2ee; }
body[data-kind="ask"]       { --mc: #00c2a8; --mc-dark: #00937f; --mc-soft: #d9fbf5; --mc-2: #7ee8d8; --bg-a: #d6f7f0; }
body[data-kind="daily"]     { --mc: #ff9600; --mc-dark: #cf7600; --mc-soft: #fff0d9; --mc-2: #ffc970; --bg-a: #ffefd6; }

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131f24;
    --surface: #1c2b33;
    --surface-2: #233640;
    --text: #f1f7fb;
    --text-2: #b6c4cc;
    --text-3: #7f939e;
    --line: #2f4651;
    --line-dark: #22343d;
    --ok: #79e026;
    --ok-soft: #1f3a12;
    --warn: #ffb547;
    --warn-soft: #3a2a0f;
    --ng: #ff6b6b;
    --ng-soft: #3f1d1d;
    --bg-b: #131f24;
  }
  body[data-kind] { --bg-a: color-mix(in srgb, var(--mc) 22%, #131f24); --mc-soft: color-mix(in srgb, var(--mc) 22%, #1c2b33); }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  min-height: 100dvh;
  background: var(--bg-b);
  color: var(--text);
  font-family: "M PLUS Rounded 1c", -apple-system, BlinkMacSystemFont, "Hiragino Maru Gothic ProN", "Hiragino Sans", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  transition: background-color .4s;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
b, strong, h1, h2, h3, h4 { font-weight: 800; }
svg { width: 22px; height: 22px; flex-shrink: 0; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ===== 動く背景 ===== */
.bg {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--mc) 18%, transparent) 1.5px, transparent 0) 0 0 / 26px 26px,
    linear-gradient(180deg, var(--bg-a) 0%, var(--bg-b) 70%);
  transition: background .5s;
}
.bg i {
  position: absolute; display: block; border-radius: 50%;
  background: var(--mc-2); opacity: .35;
  animation: drift 18s ease-in-out infinite alternate;
  transition: background .5s;
}
.bg i:nth-child(1)  { width: 160px; height: 160px; left: -40px; top: 8%; }
.bg i:nth-child(2)  { width: 90px;  height: 90px;  right: -20px; top: 22%; animation-duration: 14s; background: #ffd43b; opacity: .3; }
.bg i:nth-child(3)  { width: 26px;  height: 26px;  left: 18%; top: 40%; animation-duration: 9s; border-radius: 8px; }
.bg i:nth-child(4)  { width: 200px; height: 200px; right: -70px; bottom: 6%; animation-duration: 22s; }
.bg i:nth-child(5)  { width: 18px;  height: 18px;  right: 24%; top: 12%; animation-duration: 8s; background: #ff7aa2; opacity: .45; }
.bg i:nth-child(6)  { width: 40px;  height: 40px;  left: 8%; bottom: 18%; animation-duration: 12s; border-radius: 12px; background: #ffd43b; opacity: .35; }
.bg i:nth-child(7)  { width: 14px;  height: 14px;  left: 50%; top: 68%; animation-duration: 7s; background: var(--mc); opacity: .35; }
.bg i:nth-child(8)  { width: 60px;  height: 60px;  left: 60%; top: 4%; animation-duration: 16s; opacity: .25; }
.bg i:nth-child(9)  { width: 22px;  height: 22px;  right: 10%; top: 52%; animation-duration: 10s; border-radius: 6px; background: #74c0fc; opacity: .4; }
.bg i:nth-child(10) { width: 12px;  height: 12px;  left: 30%; top: 16%; animation-duration: 6s; background: #ffd43b; opacity: .6; }
.bg i:nth-child(11) { width: 120px; height: 120px; left: 30%; bottom: -50px; animation-duration: 20s; opacity: .22; }
.bg i:nth-child(12) { width: 16px;  height: 16px;  right: 36%; bottom: 30%; animation-duration: 9s; background: #ff7aa2; opacity: .4; border-radius: 5px; }
@keyframes drift {
  0%   { transform: translate(0, 0) rotate(0deg) scale(1); }
  50%  { transform: translate(24px, -30px) rotate(90deg) scale(1.08); }
  100% { transform: translate(-18px, 20px) rotate(180deg) scale(.94); }
}

/* ===== 画面切り替え ===== */
.view { display: none; min-height: 100dvh; padding-bottom: calc(24px + var(--safe-bottom)); }
.view.active { display: block; animation: view-in .35s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes view-in { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ===== 立体ボタン ===== */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 20px; border-radius: 16px; border: none;
  font-weight: 800; font-size: 16px; letter-spacing: .04em; text-decoration: none;
  background: var(--surface); color: var(--text);
  box-shadow: 0 4px 0 var(--line-dark);
  transition: transform .08s ease, box-shadow .08s ease, filter .15s;
  user-select: none; -webkit-user-select: none;
}
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--line-dark); }
.btn.primary { background: var(--mc); color: #fff; box-shadow: 0 5px 0 var(--mc-dark); text-shadow: 0 1px 0 rgba(0, 0, 0, .12); }
.btn.primary:active { transform: translateY(5px); box-shadow: 0 0 0 var(--mc-dark); }
.btn.ghost { background: var(--surface); color: var(--mc-dark); border: 2px solid var(--line); box-shadow: 0 4px 0 var(--line); }
.btn.ghost:active { box-shadow: 0 0 0 var(--line); }
.btn.white { background: #fff; color: var(--mc-dark); box-shadow: 0 5px 0 rgba(0, 0, 0, .18); }
.btn.clear { background: rgba(255, 255, 255, .16); color: #fff; box-shadow: 0 4px 0 rgba(0, 0, 0, .15); }
.btn.paypay { background: #ff0033; color: #fff; box-shadow: 0 5px 0 #b30024; }
.btn.block { width: 100%; }
.btn.grow { flex: 1; }
.btn.big { min-height: 64px; font-size: 19px; border-radius: 20px; }
.btn.big svg { width: 26px; height: 26px; }
.btn.small { min-height: 0; padding: 8px 14px; font-size: 13px; border-radius: 12px; box-shadow: 0 3px 0 var(--line); }
.btn.small:active { transform: translateY(3px); }
.btn:disabled { filter: grayscale(.6); opacity: .6; }

.icon-btn {
  width: 44px; height: 44px; border-radius: 14px; border: 2px solid var(--line);
  display: grid; place-items: center; background: var(--surface); color: var(--text-2);
  box-shadow: 0 3px 0 var(--line); transition: transform .08s, box-shadow .08s;
}
.icon-btn:active { transform: translateY(3px); box-shadow: none; }
.icon-btn-spacer { width: 44px; }
.text-btn { border: none; background: none; color: var(--mc-dark); font-weight: 800; font-size: 14px; padding: 6px 0; }

.appbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: calc(10px + var(--safe-top)) 14px 10px;
  background: color-mix(in srgb, var(--bg-a) 70%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
}
.appbar-title { margin: 0; font-size: 18px; font-weight: 900; }
.appbar-actions { display: flex; gap: 8px; }
.brand { display: flex; align-items: center; gap: 8px; }
.stat {
  display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; border-radius: 14px;
  background: var(--surface); border: 2px solid var(--line); font-size: 15px; font-weight: 900;
}
.stat-icon { font-size: 17px; line-height: 1; }
.stat.fire b { color: #ff7a00; }
.stat.star b { color: #e6a700; }
.stat.plan { font-size: 13px; color: var(--mc-dark); }
.stat.plan.admin { background: #fff4c2; border-color: #ffd43b; color: #b07d00; }
.stat.bump { animation: bump .5s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes bump { 40% { transform: scale(1.3) rotate(-6deg); } }

.page { padding: 8px 16px; }

/* ===== 吹き出し ===== */
.bubble {
  position: relative; display: inline-block; max-width: 300px;
  padding: 12px 16px; border-radius: 18px;
  background: var(--surface); color: var(--text); border: 2px solid var(--line);
  font-weight: 800; font-size: 15px; line-height: 1.5; text-align: center;
  box-shadow: 0 3px 0 var(--line);
}
.bubble::after {
  content: ""; position: absolute; left: 50%; bottom: -10px; width: 16px; height: 16px; margin-left: -8px;
  background: var(--surface); border-right: 2px solid var(--line); border-bottom: 2px solid var(--line);
  transform: rotate(45deg); border-bottom-right-radius: 4px;
}
.bubble.left::after { left: -9px; top: 50%; bottom: auto; margin: -8px 0 0; transform: rotate(135deg); }
.bubble b { color: var(--mc-dark); }
.bubble.pop { animation: pop .45s cubic-bezier(.2, 1.6, .4, 1) both; }

/* ===== マスコット ===== */
.mascot { width: 150px; aspect-ratio: 200 / 212; margin: 0 auto; }
.mascot.big { width: 170px; }
.mascot.small { width: 92px; }
.m-svg { width: 100%; height: 100%; overflow: visible; display: block; }
.m-svg * { transform-box: view-box; }
.m-shadow { fill: rgba(0, 0, 0, .1); transform-origin: 100px 204px; animation: shadow 2.6s ease-in-out infinite; }
.m-bob { transform-origin: 100px 192px; animation: bob 2.6s ease-in-out infinite; }
.m-eye-open { transform-origin: 100px 106px; animation: blink 4.6s infinite; }
.m-pupils { transition: transform .3s; }
.m-arm-l { transform-origin: 38px 120px; }
.m-arm-r { transform-origin: 162px 120px; animation: wave-soft 5s ease-in-out infinite; }
.m-star { transform-origin: 110px 14px; animation: twinkle 3s ease-in-out infinite; }
.m-eye-happy, .m-grin, .m-oh, .m-sad, .m-sweat, .m-acc { display: none; }
.mascot[data-acc="none"] .m-antenna, .mascot[data-acc="daily"] .m-antenna { display: inline; }
.m-antenna { display: none; }
.mascot[data-acc="exam"] .m-acc-exam,
.mascot[data-acc="translate"] .m-acc-translate,
.mascot[data-acc="creature"] .m-acc-creature,
.mascot[data-acc="music"] .m-acc-music,
.mascot[data-acc="daily"] .m-acc-daily,
.mascot[data-acc="ask"] .m-acc-ask { display: inline; }
.mascot[data-acc="ask"] .m-antenna { display: inline; }
.m-acc-creature { transform-origin: 100px 46px; animation: sway 3s ease-in-out infinite; }

/* 表情 */
.mascot.happy .m-eye-open, .mascot.listening .m-eye-open { display: none; }
.mascot.happy .m-eye-happy, .mascot.listening .m-eye-happy { display: inline; }
.mascot.happy .m-smile { display: none; }
.mascot.happy .m-grin { display: inline; }
.mascot.happy .m-jump { transform-origin: 100px 200px; animation: hop .7s cubic-bezier(.3, 1.4, .5, 1) 2; }
.mascot.happy .m-arm-l { animation: arm-up-l .7s ease-in-out 2; }
.mascot.happy .m-arm-r { animation: arm-up-r .7s ease-in-out 2; }
.mascot.thinking .m-smile { display: none; }
.mascot.thinking .m-oh { display: inline; }
.mascot.thinking .m-pupils { transform: translate(5px, -7px); }
.mascot.thinking .m-sweat { display: inline; animation: sweat 1.6s ease-in infinite; }
.mascot.thinking .m-bob { animation: think 1.8s ease-in-out infinite; }
.mascot.thinking .m-arm-r { animation: none; transform: rotate(-35deg); }
.mascot.sad .m-smile { display: none; }
.mascot.sad .m-sad { display: inline; }
.mascot.sad .m-pupils { transform: translateY(5px); }
.mascot.sad .m-bob { animation: sad 3s ease-in-out infinite; }
.mascot.listening .m-bob { animation: groove .5s ease-in-out infinite alternate; }
.mascot.waving .m-arm-r { animation: wave 1.2s ease-in-out infinite; }
.mascot.jump .m-jump { transform-origin: 100px 200px; animation: hop .55s cubic-bezier(.3, 1.4, .5, 1); }

@keyframes bob { 0%, 100% { transform: translateY(0) scale(1.03, .97); } 50% { transform: translateY(-7px) scale(.98, 1.02); } }
@keyframes shadow { 0%, 100% { transform: scale(1); } 50% { transform: scale(.85); opacity: .7; } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.08); } }
@keyframes wave-soft { 0%, 70%, 100% { transform: rotate(0); } 76% { transform: rotate(-30deg); } 82% { transform: rotate(-5deg); } 88% { transform: rotate(-30deg); } }
@keyframes wave { 0%, 100% { transform: rotate(-10deg); } 50% { transform: rotate(-55deg); } }
@keyframes twinkle { 0%, 100% { transform: rotate(0) scale(1); } 50% { transform: rotate(20deg) scale(1.2); } }
@keyframes sway { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }
@keyframes hop { 0%, 100% { transform: translateY(0) scale(1); } 20% { transform: translateY(4px) scale(1.12, .88); } 50% { transform: translateY(-34px) scale(.94, 1.08); } 80% { transform: translateY(2px) scale(1.06, .94); } }
@keyframes arm-up-l { 50% { transform: rotate(50deg); } }
@keyframes arm-up-r { 50% { transform: rotate(-50deg); } }
@keyframes think { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg) translateY(-3px); } }
@keyframes sad { 0%, 100% { transform: translateY(2px) scale(1.02, .98); } 50% { transform: translateY(0) scale(1); } }
@keyframes groove { from { transform: rotate(-6deg) translateY(0); } to { transform: rotate(6deg) translateY(-6px); } }
@keyframes sweat { 0% { transform: translateY(-4px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(14px); opacity: 0; } }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

.mascot-btn { border: none; background: none; padding: 0; display: block; margin: 0 auto; }

/* ===== 起動演出 ===== */
.splash {
  position: fixed; inset: 0; z-index: 200; overflow: hidden;
  display: grid; place-items: center; cursor: pointer;
  background: radial-gradient(circle at 50% 40%, #5fd0ff 0%, #1cb0f6 45%, #6a5cff 100%);
  color: #fff;
}
.splash.out { animation: splash-out .5s ease-in forwards; }
@keyframes splash-out { to { opacity: 0; transform: scale(1.15); visibility: hidden; } }
.splash-rays {
  position: absolute; inset: -50%;
  background: repeating-conic-gradient(rgba(255, 255, 255, .13) 0 10deg, transparent 10deg 20deg);
  animation: spin 24s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.splash-inner { position: relative; text-align: center; }
.splash-mascot { animation: drop .9s cubic-bezier(.3, 1.5, .5, 1) both; }
@keyframes drop { 0% { transform: translateY(-120vh) rotate(-20deg); } 70% { transform: translateY(0) scale(1.1, .9); } 100% { transform: none; } }
.splash-title { margin: 8px 0 0; font-size: 64px; font-weight: 900; letter-spacing: .04em; line-height: 1.1; }
.splash-title span {
  display: inline-block; text-shadow: 0 5px 0 rgba(0, 0, 0, .18), 0 0 24px rgba(255, 255, 255, .5);
  animation: letter .6s cubic-bezier(.2, 1.8, .4, 1) both;
}
.splash-title span:nth-child(1) { animation-delay: .7s; color: #fff; }
.splash-title span:nth-child(2) { animation-delay: .82s; color: #ffe066; }
.splash-title span:nth-child(3) { animation-delay: .94s; color: #fff; }
.splash-title span:nth-child(4) { animation-delay: 1.06s; color: #ffe066; }
@keyframes letter { from { transform: translateY(40px) scale(.2) rotate(-30deg); opacity: 0; } to { transform: none; opacity: 1; } }
.splash-ver {
  display: inline-block; margin-top: 8px; padding: 4px 16px; border-radius: 999px;
  background: #ffc800; color: #6b4b00; font-weight: 900; font-size: 18px; letter-spacing: .08em;
  box-shadow: 0 4px 0 #d9a400; animation: pop .5s cubic-bezier(.2, 1.8, .4, 1) 1.3s both;
}
.splash-tag { margin: 14px 0 0; font-weight: 800; opacity: .95; animation: fade .6s ease 1.5s both; }
.splash-sparks i {
  position: absolute; width: 14px; height: 14px; background: #fff; opacity: 0;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: sparkle 1.6s ease-in-out infinite;
}
.splash-sparks i:nth-child(1) { left: 14%; top: 20%; animation-delay: .3s; }
.splash-sparks i:nth-child(2) { left: 80%; top: 16%; animation-delay: .7s; width: 20px; height: 20px; }
.splash-sparks i:nth-child(3) { left: 70%; top: 70%; animation-delay: 1s; }
.splash-sparks i:nth-child(4) { left: 20%; top: 76%; animation-delay: .5s; width: 22px; height: 22px; background: #ffe066; }
.splash-sparks i:nth-child(5) { left: 50%; top: 10%; animation-delay: 1.2s; background: #ffe066; }
.splash-sparks i:nth-child(6) { left: 88%; top: 46%; animation-delay: .2s; }
.splash-sparks i:nth-child(7) { left: 6%; top: 50%; animation-delay: .9s; background: #ffe066; }
.splash-sparks i:nth-child(8) { left: 40%; top: 86%; animation-delay: 1.4s; }
@keyframes sparkle { 0%, 100% { opacity: 0; transform: scale(.2) rotate(0); } 50% { opacity: 1; transform: scale(1) rotate(90deg); } }

/* ===== ロック画面 ===== */
.lock.active { display: grid; place-items: center; padding: calc(24px + var(--safe-top)) 24px calc(24px + var(--safe-bottom)); }
.lock-inner { width: 100%; max-width: 360px; text-align: center; }
.lock .bubble { margin-bottom: 14px; }
.app-name { margin: 6px 0 0; font-size: 36px; font-weight: 900; letter-spacing: .04em; color: var(--mc-dark); }
.app-name .ver {
  display: inline-block; vertical-align: middle; font-size: 14px; padding: 2px 10px; border-radius: 999px;
  background: #ffc800; color: #6b4b00; box-shadow: 0 3px 0 #d9a400; letter-spacing: .06em;
}
.tagline { margin: 4px 0 24px; color: var(--text-2); font-weight: 700; }
.lock-form { display: grid; gap: 14px; }
.code-input, .text-input {
  width: 100%; height: 60px; border-radius: 16px; border: 2px solid var(--line);
  background: var(--surface); text-align: center; font-size: 26px; letter-spacing: .5em; font-weight: 900;
  outline: none; transition: border-color .15s, box-shadow .15s; box-shadow: 0 3px 0 var(--line);
}
.text-input { height: 52px; font-size: 17px; letter-spacing: .08em; }
.code-input::placeholder, .text-input::placeholder { font-size: 15px; letter-spacing: .08em; font-weight: 700; color: var(--text-3); }
.code-input:focus, .text-input:focus { border-color: var(--mc); box-shadow: 0 3px 0 var(--mc); }
.code-input.shake { animation: shake .35s; border-color: var(--ng); }
@keyframes shake { 25% { transform: translateX(-8px); } 50% { transform: translateX(8px); } 75% { transform: translateX(-4px); } }
.form-error { min-height: 1.5em; margin: 0; color: var(--ng); font-size: 14px; font-weight: 700; }

/* ===== ホーム ===== */
.home { padding: 0 16px; }
.kind-tabs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 4px 0 6px; }
.kind-tabs button {
  display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 0 6px;
  border: 2px solid var(--line); border-radius: 16px;
  background: var(--surface); color: var(--text-2); font-size: 12px; font-weight: 900;
  box-shadow: 0 4px 0 var(--line); transition: transform .08s, box-shadow .08s, background .2s;
}
.kind-tabs button span { font-size: 24px; line-height: 1.15; transition: transform .25s cubic-bezier(.2, 1.8, .4, 1); }
.kind-tabs button:active { transform: translateY(4px); box-shadow: none; }
.kind-tabs button[aria-pressed="true"] {
  border-color: var(--mc); background: var(--mc-soft); color: var(--mc-dark); box-shadow: 0 4px 0 var(--mc);
}
.kind-tabs button[aria-pressed="true"] span { transform: scale(1.18) rotate(-6deg); }

.stage { display: flex; flex-direction: column; align-items: center; padding: 16px 0 2px; }
.stage .bubble { margin-bottom: 12px; min-height: 48px; }
.actions-main { display: grid; gap: 12px; margin-top: 4px; }
.hero-sub { margin: 0; text-align: center; color: var(--text-2); font-size: 13px; font-weight: 700; }

.tips { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 8px; }
.tips li {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 2px solid var(--line); border-radius: 16px; padding: 10px 14px;
  font-size: 14px; color: var(--text-2); font-weight: 700;
}
.tips svg { color: #fff; background: var(--mc); width: 32px; height: 32px; padding: 6px; border-radius: 10px; box-shadow: 0 3px 0 var(--mc-dark); }
.tips b { color: var(--mc-dark); }

.recent { margin-top: 24px; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; padding: 0 4px; }
.section-head h3 { margin: 0; font-size: 16px; font-weight: 900; }

/* ===== 履歴リスト ===== */
.history-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.history-list li {
  display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 18px;
  background: var(--surface); border: 2px solid var(--line); box-shadow: 0 4px 0 var(--line);
  cursor: pointer; transition: transform .08s, box-shadow .08s;
  animation: rise .4s cubic-bezier(.2, 1.2, .4, 1) both;
}
.history-list li:nth-child(2) { animation-delay: .05s; }
.history-list li:nth-child(3) { animation-delay: .1s; }
.history-list li:active { transform: translateY(4px); box-shadow: none; }
.history-list img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; background: var(--surface-2); }
.h-body { flex: 1; min-width: 0; }
.h-answers { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 14px; }
.h-answers b { color: var(--text); font-size: 15px; }
.h-meta { font-size: 12px; color: var(--text-3); margin-top: 2px; font-weight: 700; }
.empty { text-align: center; color: var(--text-2); padding: 60px 0; font-weight: 700; }
.thumb-icon { width: 56px; height: 56px; border-radius: 14px; background: var(--mc-soft); display: grid; place-items: center; font-size: 28px; flex: none; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ===== アプリ内カメラ ===== */
.camera { position: fixed; inset: 0; z-index: 40; background: #000; color: #fff; }
.camera video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.camera-guide { position: absolute; inset: 18% 6% 26%; pointer-events: none; }
.camera-guide span {
  position: absolute; inset: 0; border-radius: 22px;
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .35);
  background:
    linear-gradient(var(--mc), var(--mc)) top left / 34px 5px no-repeat, linear-gradient(var(--mc), var(--mc)) top left / 5px 34px no-repeat,
    linear-gradient(var(--mc), var(--mc)) top right / 34px 5px no-repeat, linear-gradient(var(--mc), var(--mc)) top right / 5px 34px no-repeat,
    linear-gradient(var(--mc), var(--mc)) bottom left / 34px 5px no-repeat, linear-gradient(var(--mc), var(--mc)) bottom left / 5px 34px no-repeat,
    linear-gradient(var(--mc), var(--mc)) bottom right / 34px 5px no-repeat, linear-gradient(var(--mc), var(--mc)) bottom right / 5px 34px no-repeat;
  animation: guide 1.8s ease-in-out infinite;
}
@keyframes guide { 50% { transform: scale(.985); } }
.camera-hint {
  position: absolute; left: 50%; top: calc(18% - 52px); margin: 0; transform: translateX(-50%); white-space: nowrap;
  padding: 6px 14px; border-radius: 999px; background: rgba(0, 0, 0, .45);
  font-size: 14px; font-weight: 800;
}
.camera-top {
  position: absolute; top: 0; left: 0; right: 0; padding: calc(10px + var(--safe-top)) 12px 0;
  display: flex; justify-content: space-between; align-items: center;
}
.analyze-btn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 66px; border: none; border-radius: 22px;
  background: var(--mc); color: #fff; font-size: 19px; font-weight: 900; letter-spacing: .04em;
  box-shadow: 0 6px 0 var(--mc-dark); transition: transform .08s, box-shadow .08s;
}
.analyze-btn:active { transform: translateY(6px); box-shadow: none; }
.camera-bottom {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; gap: 14px;
  padding: 20px 16px calc(24px + var(--safe-bottom));
}
.icon-btn.light { color: #fff; background: rgba(0, 0, 0, .4); border-color: rgba(255, 255, 255, .25); box-shadow: none; }
.icon-btn.round { width: 56px; height: 56px; border-radius: 50%; cursor: pointer; }
.camera-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.camera-flash.on { animation: flash .25s ease-out; }
@keyframes flash { from { opacity: .85; } to { opacity: 0; } }

/* ===== 解析中・録音中 ===== */
.overlay {
  position: fixed; inset: 0; z-index: 50; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  padding: calc(24px + var(--safe-top)) 24px calc(24px + var(--safe-bottom));
  background: radial-gradient(circle at 50% 35%, var(--mc-2) 0%, var(--mc) 45%, var(--mc-dark) 100%);
  color: #fff; animation: fade .2s ease;
}
.overlay::before {
  content: ""; position: absolute; inset: -50%; z-index: -1;
  background: repeating-conic-gradient(rgba(255, 255, 255, .08) 0 10deg, transparent 10deg 20deg);
  animation: spin 30s linear infinite;
}
.overlay > * { position: relative; }
.overlay .bubble { color: var(--text); }
.overlay-actions { display: grid; gap: 10px; width: min(80vw, 320px); justify-items: center; }
.proc-stage { position: relative; width: min(80vw, 320px); height: 240px; }
.proc-stage .mascot { position: absolute; right: -6px; bottom: -6px; width: 150px; }
.polaroid {
  position: absolute; left: 0; top: 6px; width: 170px; padding: 8px 8px 26px; border-radius: 8px;
  background: #fff; transform: rotate(-7deg); box-shadow: 0 10px 30px rgba(0, 0, 0, .25); overflow: hidden;
  animation: pop .4s cubic-bezier(.2, 1.6, .4, 1) both;
}
.polaroid img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; background: #eee; }
.polaroid.hidden + .mascot { right: 50%; transform: translateX(50%); }
.scan-line {
  position: absolute; left: 8px; right: 8px; height: 40px; top: -40px;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--mc) 70%, transparent) 85%, #fff);
  animation: scan 1.4s ease-in-out infinite;
}
@keyframes scan { 0% { top: -40px; } 100% { top: 85%; } }
.timer { font-size: 60px; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1; text-shadow: 0 4px 0 rgba(0, 0, 0, .15); }
.timer::after { content: "秒"; font-size: 20px; font-weight: 800; margin-left: 4px; opacity: .85; }
.dots { display: inline-flex; gap: 4px; margin-left: 6px; vertical-align: middle; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--mc); animation: dot 1s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 100% { transform: translateY(0); opacity: .4; } 50% { transform: translateY(-5px); opacity: 1; } }
.rec-progress { width: min(72vw, 300px); height: 14px; border-radius: 7px; background: rgba(0, 0, 0, .18); overflow: hidden; }
.rec-progress i { display: block; height: 100%; width: 0; background: #fff; border-radius: 7px; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .08); }
.notes-float i {
  position: absolute; font-style: normal; font-size: 30px; font-weight: 900; color: rgba(255, 255, 255, .8);
  animation: note 3s ease-in infinite; bottom: 20%;
}
.notes-float i:nth-child(1) { left: 12%; }
.notes-float i:nth-child(2) { left: 30%; animation-delay: .6s; font-size: 22px; }
.notes-float i:nth-child(3) { left: 68%; animation-delay: 1.1s; }
.notes-float i:nth-child(4) { left: 84%; animation-delay: .3s; font-size: 26px; }
.notes-float i:nth-child(5) { left: 50%; animation-delay: 1.6s; font-size: 20px; }
.notes-float i:nth-child(6) { left: 22%; animation-delay: 2.2s; }
@keyframes note { 0% { transform: translateY(0) rotate(0); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(-60vh) rotate(25deg); opacity: 0; } }
.notes-float { position: absolute; inset: 0; pointer-events: none; }

/* ===== 結果 ===== */
.result { padding: 4px 16px 130px; }
.result-hero { display: flex; align-items: center; gap: 14px; margin: 4px 0 12px; }
.result-hero .mascot { margin: 0; flex: none; }
.result-hero .bubble { text-align: left; flex: 1; animation: pop .45s cubic-bezier(.2, 1.6, .4, 1) .15s both; }
.summary { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.pill {
  display: inline-flex; align-items: center; gap: 4px; padding: 5px 12px; border-radius: 999px;
  background: var(--surface); border: 2px solid var(--line); font-size: 13px; font-weight: 800; color: var(--text-2);
}
.pill svg { width: 15px; height: 15px; }
.pill.fast { background: var(--mc-soft); border-color: var(--mc-2); color: var(--mc-dark); }

.q-card {
  background: var(--surface); border-radius: var(--radius); border: 2px solid var(--line);
  box-shadow: 0 4px 0 var(--line); padding: 18px; margin-bottom: 14px;
  animation: rise .45s cubic-bezier(.2, 1.2, .4, 1) both;
}
#result-cards > :nth-child(2) { animation-delay: .08s; }
#result-cards > :nth-child(3) { animation-delay: .16s; }
#result-cards > :nth-child(4) { animation-delay: .24s; }
#result-cards > :nth-child(5) { animation-delay: .32s; }
#result-cards > :nth-child(n+6) { animation-delay: .4s; }
.q-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.q-num {
  font-weight: 900; font-size: 15px; color: #fff; background: var(--mc); padding: 2px 12px; border-radius: 10px;
  box-shadow: 0 3px 0 var(--mc-dark);
}
.chip { font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); }
.chip.multi { background: var(--warn-soft); color: var(--warn); }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.ng { background: var(--ng-soft); color: var(--ng); }

.answer-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 0 6px; }
.answer-label { font-size: 13px; color: var(--text-3); font-weight: 800; width: 100%; }
.answer-badge {
  min-width: 70px; height: 70px; padding: 0 16px; border-radius: 22px;
  display: grid; place-items: center;
  background: var(--ok-line); color: #fff;
  font-size: 36px; font-weight: 900; line-height: 1;
  box-shadow: 0 6px 0 #46a302; text-shadow: 0 2px 0 rgba(0, 0, 0, .12);
  animation: stamp .55s cubic-bezier(.2, 1.8, .4, 1) .2s both;
}
.answer-badge:nth-child(3) { animation-delay: .3s; }
.answer-badge:nth-child(4) { animation-delay: .4s; }
.answer-badge:nth-child(5) { animation-delay: .5s; }
@keyframes stamp { from { transform: scale(2.2) rotate(-20deg); opacity: 0; } to { transform: none; opacity: 1; } }
.answer-text { margin: 14px 0 6px; }
.answer-text p {
  margin: 6px 0 0; padding: 14px 16px; border-radius: 16px; background: var(--ok-soft);
  border: 2px solid var(--ok-line); box-shadow: 0 4px 0 var(--ok-line);
  font-size: 18px; font-weight: 900; white-space: pre-wrap; line-height: 1.5;
  animation: pop .45s cubic-bezier(.2, 1.6, .4, 1) .2s both;
}

.conf { display: flex; align-items: center; gap: 10px; margin: 14px 0 4px; font-size: 12px; color: var(--text-3); font-weight: 800; }
.conf-bar { flex: 1; height: 12px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.conf-bar i {
  display: block; height: 100%; border-radius: 6px; transform-origin: left;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .12), inset 0 3px 0 rgba(255, 255, 255, .3);
  animation: grow .8s cubic-bezier(.2, 1, .3, 1) .3s both;
}
@keyframes grow { from { transform: scaleX(0); } }
.conf.high i { background: var(--ok-line); }
.conf.mid i { background: #ffb020; }
.conf.low i { background: #ff4b4b; }

.alert { font-size: 14px; font-weight: 700; padding: 10px 14px; border-radius: 14px; margin-top: 10px; border: 2px solid transparent; }
.alert.warn { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.alert.ng { background: var(--ng-soft); color: var(--ng); border-color: color-mix(in srgb, var(--ng) 30%, transparent); }

.q-text { margin: 14px 0 8px; font-size: 14px; color: var(--text-2); font-weight: 700; }
.choices { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.choices li {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 14px;
  background: var(--surface); border: 2px solid var(--line); box-shadow: 0 3px 0 var(--line);
  font-size: 14px; color: var(--text-2); font-weight: 700;
}
.choices .lbl { font-weight: 900; color: var(--text); min-width: 1.4em; }
.choices li.correct { background: var(--ok-soft); color: var(--text); border-color: var(--ok-line); box-shadow: 0 3px 0 var(--ok-line); }
.choices li.correct .lbl { color: var(--ok); }
.choices li.correct::after { content: "✓"; margin-left: auto; color: var(--ok); font-weight: 900; }

.exp { margin-top: 14px; border-top: 2px dashed var(--line); padding-top: 12px; }
.exp summary { font-size: 14px; font-weight: 900; color: var(--mc-dark); cursor: pointer; list-style: none; }
.exp summary::-webkit-details-marker { display: none; }
.exp summary::before { content: "💡 "; }
.exp p { margin: 6px 0 0; font-size: 14px; color: var(--text-2); font-weight: 700; white-space: pre-wrap; }

.notes { font-size: 13px; color: var(--text-3); margin: 0 4px 14px; font-weight: 700; }
.no-question { text-align: center; padding: 32px 18px; }
.no-question p { color: var(--text-2); }

.photo { margin-top: 8px; }
.photo summary { font-size: 14px; color: var(--text-2); cursor: pointer; padding: 8px 4px; font-weight: 800; }
.photo img { width: 100%; border-radius: 16px; margin-top: 6px; border: 2px solid var(--line); }

.bottom-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; gap: 10px; padding: 12px 16px calc(14px + var(--safe-bottom));
  background: color-mix(in srgb, var(--bg-b) 88%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-top: 2px solid var(--line);
}

.r-title { margin: 12px 0 4px; font-size: 24px; font-weight: 900; line-height: 1.3; }
.r-sub { margin: 0 0 6px; color: var(--text-2); font-size: 14px; font-weight: 800; }
.r-summary { margin: 0 0 4px; font-size: 15px; color: var(--text-2); line-height: 1.65; font-weight: 700; }
.r-section h4 { margin: 0 0 10px; font-size: 16px; font-weight: 900; }
.r-section .alert:first-of-type { margin-top: 0; }
.actions { margin: 0; padding-left: 1.4em; display: grid; gap: 10px; font-size: 15px; font-weight: 700; }
.actions li::marker { color: var(--mc); font-weight: 900; }
.actions li .chip { display: inline-block; margin-left: 6px; vertical-align: 1px; }
.kv { margin: 0; display: grid; gap: 8px; }
.kv div { display: flex; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); font-size: 14px; }
.kv dt { flex: 0 0 34%; color: var(--text-3); font-weight: 800; }
.kv dd { margin: 0; flex: 1; font-weight: 800; word-break: break-word; }
.r-translation { margin: 8px 0 0; font-size: 15px; color: var(--text); white-space: pre-wrap; line-height: 1.65; font-weight: 700; }
.links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.tr-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tr-items li { padding: 10px 12px; border-radius: 14px; background: var(--surface-2); }
.tr-orig { font-size: 12px; color: var(--text-3); font-weight: 700; }
.tr-ja { font-size: 16px; font-weight: 900; margin-top: 2px; }
.tr-note { font-size: 13px; color: var(--text-2); margin-top: 4px; font-weight: 700; }
.cands { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cands li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); font-size: 14px; font-weight: 700; }
.cands b { color: var(--mc-dark); }

/* ===== 有料案内 ===== */
.paywall { display: flex; flex-direction: column; align-items: center; }
.paywall .bubble { margin: 8px 0 12px; }
.paywall .q-card { width: 100%; }
.pay-card h3 { margin: 0 0 8px; font-size: 17px; font-weight: 900; color: var(--mc-dark); }
.pay-price { margin: 0 0 6px; font-size: 28px; font-weight: 900; }
.pay-card .btn { margin-top: 10px; }
.device-code { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; padding: 10px 14px; border-radius: 14px; background: var(--surface-2); }
.dev-code { font-size: 22px; letter-spacing: .14em; font-variant-numeric: tabular-nums; }
.unlock-form { display: grid; gap: 10px; }
.group-form { display: flex; gap: 8px; margin-top: 10px; }
.group-form .text-input { flex: 1; height: 46px; }

/* ===== 設定 ===== */
.group-title { margin: 22px 4px 8px; font-size: 14px; color: var(--text-2); font-weight: 900; }
.group { background: var(--surface); border-radius: 18px; overflow: hidden; border: 2px solid var(--line); box-shadow: 0 4px 0 var(--line); }
.row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; min-height: 56px; padding: 12px 16px; border: none; background: none; text-align: left;
  font-size: 15px; font-weight: 800;
}
.row + .row { border-top: 2px solid var(--line); }
.row small { display: block; font-size: 12px; color: var(--text-3); font-weight: 700; }
.row.column { flex-direction: column; align-items: stretch; }
.row.danger { color: var(--ng); }
.row-note { margin: 0; font-size: 12px; color: var(--text-3); font-weight: 700; }
.group-note { margin: 8px 4px 0; }
.admin-card { display: grid; gap: 10px; }
.admin-card h3 { margin: 0; font-size: 17px; }
.issue-result {
  padding: 12px; border-radius: 14px; background: var(--ok-soft); border: 2px solid var(--ok-line);
  text-align: center; font-weight: 800;
}
.issue-result b { display: block; font-size: 22px; letter-spacing: .08em; margin: 4px 0 8px; user-select: all; }

.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; border-radius: 14px; background: var(--surface-2); }
.segmented.four { grid-template-columns: repeat(4, 1fr); }
.segmented button { border: none; background: none; padding: 9px 4px; border-radius: 11px; font-size: 14px; font-weight: 800; color: var(--text-2); }
.segmented button[aria-checked="true"] { background: var(--mc); color: #fff; box-shadow: 0 3px 0 var(--mc-dark); }

.switch {
  appearance: none; -webkit-appearance: none; position: relative; flex-shrink: 0;
  width: 54px; height: 32px; border-radius: 16px; background: var(--line); transition: background .2s; margin: 0;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 0 rgba(0, 0, 0, .15); transition: transform .25s cubic-bezier(.2, 1.6, .4, 1);
}
.switch:checked { background: var(--mc); }
.switch:checked::after { transform: translateX(22px); }

.about { text-align: center; font-size: 12px; color: var(--text-3); margin: 32px 0; font-weight: 700; }

/* ===== トースト ===== */
.toast {
  position: fixed; left: 16px; right: 16px; bottom: calc(24px + var(--safe-bottom)); z-index: 300;
  padding: 14px 16px; border-radius: 16px; background: #2b2d42; color: #fff; font-size: 14px; font-weight: 800;
  box-shadow: 0 5px 0 #15162a;
  transform: translateY(150%); opacity: 0; transition: transform .3s cubic-bezier(.2, 1.4, .4, 1), opacity .25s ease;
}
.toast.show { transform: none; opacity: 1; }

/* ===== タップのキラキラ・紙吹雪 ===== */
.spark {
  position: fixed; z-index: 400; width: 10px; height: 10px; margin: -5px 0 0 -5px; pointer-events: none;
  background: var(--c); border-radius: 50%;
  animation: spark .55s cubic-bezier(.1, .8, .3, 1) forwards;
}
.spark.star { border-radius: 0; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); width: 14px; height: 14px; margin: -7px 0 0 -7px; }
@keyframes spark { to { transform: translate(var(--dx), var(--dy)) scale(.2) rotate(120deg); opacity: 0; } }
.confetti {
  position: fixed; z-index: 400; top: -20px; width: 10px; height: 16px; pointer-events: none;
  background: var(--c); border-radius: 3px;
  animation: fall var(--t) cubic-bezier(.3, .4, .6, 1) var(--d) forwards;
}
@keyframes fall {
  0% { transform: translate(0, 0) rotate(0); opacity: 1; }
  100% { transform: translate(var(--dx), 110vh) rotate(var(--r)); opacity: .9; }
}
.plus-one {
  position: fixed; z-index: 400; pointer-events: none; font-weight: 900; font-size: 22px; color: #e6a700;
  text-shadow: 0 2px 0 #fff; animation: plus 1s ease-out forwards;
}
@keyframes plus { from { transform: translateY(0) scale(.6); opacity: 0; } 20% { opacity: 1; transform: translateY(-8px) scale(1.2); } to { transform: translateY(-50px) scale(1); opacity: 0; } }

@media (min-width: 600px) {
  .home, .result, .page { max-width: 560px; margin: 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.pay-price.muted { font-size: 18px; color: var(--text-2); }
.group-btn { margin-top: 10px; }

/* ===== ログイン（Google） ===== */
.btn.google { background: #fff; color: #2b2d42; border: 2px solid var(--line); box-shadow: 0 4px 0 var(--line); gap: 12px; }
.btn.google svg { width: 24px; height: 24px; }
.btn.google:active { box-shadow: none; }
.dev-login { display: grid; gap: 8px; padding: 10px; border-radius: 16px; border: 2px dashed var(--line); }
.row-note a, .about a { color: var(--mc-dark); font-weight: 800; }
.row-note.center { text-align: center; margin: 6px 0 24px; line-height: 1.8; }

/* ===== 管理者ボタン（通知バッジ付き） ===== */
.admin-btn { position: relative; font-size: 20px; background: #fff4c2; border-color: #ffd43b; box-shadow: 0 3px 0 #ffd43b; }
.badge {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: #ff4b4b; color: #fff; font-size: 12px; font-weight: 900; font-style: normal; line-height: 20px; text-align: center;
  box-shadow: 0 2px 0 #c62828; animation: bump 1.2s ease-in-out infinite;
}

/* ===== 有料プラン ===== */
.plan-card { position: relative; width: 100%; }
.plan-card.best { border-color: var(--gold); box-shadow: 0 5px 0 #e6b400; }
.plan-ribbon {
  position: absolute; top: -12px; right: 16px; padding: 3px 12px; border-radius: 999px;
  background: var(--gold); color: #6b4b00; font-size: 12px; font-weight: 900; box-shadow: 0 3px 0 #d9a400;
}
.plan-head { display: flex; align-items: center; gap: 12px; }
.plan-head h3 { margin: 0; font-size: 19px; font-weight: 900; }
.plan-head p { margin: 0; font-size: 13px; color: var(--text-2); font-weight: 800; }
.plan-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: var(--mc-soft); flex: none; }
.plan-price { margin-left: auto; font-size: 28px; font-weight: 900; color: var(--mc-dark); white-space: nowrap; }
.plan-price small { font-size: 13px; margin-left: 2px; }
.plan-points { margin: 12px 0 14px; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 14px; font-weight: 700; color: var(--text-2); }
.plan-points li::before { content: "✓ "; color: var(--ok); font-weight: 900; }

/* ===== 管理者画面 ===== */
.admin .section-head { margin-top: 20px; }
.admin .segmented { margin: 20px 0 10px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile {
  padding: 12px 14px; border-radius: 18px; background: var(--surface); border: 2px solid var(--line); box-shadow: 0 4px 0 var(--line);
  display: grid; gap: 2px; animation: rise .4s cubic-bezier(.2, 1.2, .4, 1) both;
}
.tile.wide { grid-column: 1 / -1; }
.tile small { font-size: 12px; color: var(--text-3); font-weight: 800; }
.tile b { font-size: 22px; font-weight: 900; }
.tile span { font-size: 12px; color: var(--text-2); font-weight: 700; }
.tile.money { background: var(--ok-soft); border-color: var(--ok-line); box-shadow: 0 4px 0 var(--ok-line); }
.tile.money b { color: var(--ok); }
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.feed li {
  display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 14px;
  background: var(--surface); border: 2px solid var(--line); font-size: 14px; font-weight: 800;
}
.feed li.unread { background: #fff8db; border-color: #ffd43b; }
.feed small { display: block; font-size: 12px; color: var(--text-3); font-weight: 700; }
.feed-main { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.feed-side { text-align: right; white-space: nowrap; font-size: 13px; }
.feed-empty { justify-content: center !important; color: var(--text-3); }
@media (prefers-color-scheme: dark) {
  .feed li.unread { background: #3a320f; }
  .admin-btn { background: #3a320f; }
}

.admin-link { justify-self: center; font-size: 13px; color: var(--text-2); }

/* =========================================================
   ver2.1 — 下のメニュー・図鑑・ランキング・ログインボーナス・あそべるステージ
   ========================================================= */

/* 背景の水玉がゆっくり流れる */
.bg { animation: dots-drift 40s linear infinite; }
@keyframes dots-drift { to { background-position: 26px 52px, 0 0; } }

/* ===== 下のメニュー ===== */
.view.tabbed { padding-bottom: calc(96px + var(--safe-bottom)); }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 6px 6px calc(6px + var(--safe-bottom));
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-top: 2px solid var(--line);
}
.tabbar button {
  display: flex; flex-direction: column; align-items: center; gap: 0; padding: 6px 0 4px;
  border: 2px solid transparent; border-radius: 14px; background: none;
  font-size: 11px; font-weight: 900; color: var(--text-3); transition: transform .1s;
}
.tabbar button span { font-size: 24px; line-height: 1.15; filter: grayscale(.7); opacity: .75; transition: transform .25s cubic-bezier(.2, 1.8, .4, 1); }
.tabbar button.active { color: var(--mc-dark); background: var(--mc-soft); border-color: var(--mc-2); }
.tabbar button.active span { filter: none; opacity: 1; transform: translateY(-2px) scale(1.15); }
.tabbar button:active { transform: scale(.92); }
@media (min-width: 600px) { .tabbar { left: 50%; right: auto; width: 560px; transform: translateX(-50%); border-radius: 22px 22px 0 0; border: 2px solid var(--line); border-bottom: none; } }

.stat.gift { cursor: pointer; background: #fff0f6; border-color: #ffa8c5; }
.stat.gift b { color: #e64980; }

/* ===== ステージ（キャラ・シャボン玉） ===== */
.stage { position: relative; min-height: 290px; overflow: hidden; border-radius: 28px; margin-top: 4px; cursor: pointer; }
.pop-layer { position: absolute; inset: 0; pointer-events: none; }
.pop-bubble {
  position: absolute; bottom: -70px; padding: 0; border-radius: 50%; pointer-events: auto; cursor: pointer;
  border: 2px solid rgba(255, 255, 255, .9);
  background:
    radial-gradient(circle at 30% 28%, rgba(255, 255, 255, .95) 0 12%, transparent 14%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .05) 55%, color-mix(in srgb, var(--mc-2) 55%, #ff9ee5) 100%);
  box-shadow: inset -4px -6px 10px rgba(180, 120, 255, .25), 0 4px 12px rgba(0, 0, 0, .06);
  animation: bubble-rise var(--dur, 9s) linear forwards, bubble-wobble 2.4s ease-in-out infinite;
}
.pop-bubble.popped { animation: bubble-pop .25s ease-out forwards; pointer-events: none; }
@keyframes bubble-rise {
  0% { transform: translate(0, 0); opacity: 0; }
  8% { opacity: 1; }
  50% { transform: translate(var(--sway, 20px), -190px); }
  100% { transform: translate(0, -400px); opacity: .8; }
}
@keyframes bubble-wobble { 50% { border-radius: 46% 54% 50% 50% / 52% 48% 52% 48%; } }
@keyframes bubble-pop { to { transform: scale(1.7); opacity: 0; } }
.stage .bubble { position: relative; z-index: 2; }
.walk-area { position: relative; z-index: 1; display: flex; justify-content: center; align-self: stretch; width: 100%; }
.walker { will-change: transform; }
.stage-hint { margin: 2px 0 0; font-size: 11px; font-weight: 800; color: var(--text-3); opacity: .8; }

/* ===== キャラの動き ===== */
.mascot { position: relative; }
.m-eye-sleep { display: none; }
.mascot:not(.thinking):not(.sad) .m-pupils { transform: translate(var(--px, 0px), var(--py, 0px)); }
.mascot .m-svg { transition: transform .2s; }
.mascot.face-left .m-svg { transform: scaleX(-1); }

/* 歩く */
.mascot.walking .m-bob { animation: walk-bob .34s ease-in-out infinite; }
.mascot.walking .m-foot-l { transform-origin: 72px 192px; animation: step .34s ease-in-out infinite; }
.mascot.walking .m-foot-r { transform-origin: 128px 192px; animation: step .34s ease-in-out infinite reverse; }
.mascot.walking .m-arm-l, .mascot.walking .m-arm-r { animation: arm-swing .34s ease-in-out infinite alternate; }
@keyframes walk-bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-9px) rotate(3deg); } }
@keyframes step { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes arm-swing { from { transform: rotate(-18deg); } to { transform: rotate(18deg); } }

/* さわったときの反応 */
.mascot.r-jump .m-jump { transform-origin: 100px 200px; animation: hop .56s cubic-bezier(.3, 1.4, .5, 1); }
.mascot.r-spin .m-jump { transform-origin: 100px 120px; animation: spin-once .7s cubic-bezier(.5, 0, .3, 1.3); }
.mascot.r-squish .m-jump { transform-origin: 100px 200px; animation: squish .5s cubic-bezier(.3, 1.6, .5, 1); }
.mascot.r-shake .m-jump { transform-origin: 100px 190px; animation: shake-body .6s ease-in-out; }
.mascot.r-giggle .m-jump { transform-origin: 100px 190px; animation: shake-body .3s ease-in-out 4; }
.mascot.r-dance .m-jump { transform-origin: 100px 200px; animation: dance 1.8s ease-in-out; }
.mascot.r-dance .m-arm-l { animation: arm-up-l .3s ease-in-out 6; }
.mascot.r-dance .m-arm-r { animation: arm-up-r .3s ease-in-out 6; }
.mascot.r-look .m-pupils { animation: look-around 1.4s ease-in-out; }
@keyframes spin-once { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@keyframes squish { 30% { transform: scale(1.25, .7); } 60% { transform: scale(.9, 1.12); } 100% { transform: none; } }
@keyframes shake-body { 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }
@keyframes dance {
  0%, 100% { transform: none; }
  15% { transform: translateY(-26px) rotate(-12deg); }
  30% { transform: translateY(0) rotate(0) scale(1.1, .9); }
  45% { transform: translateY(-26px) rotate(12deg); }
  60% { transform: translateY(0) scale(1.1, .9); }
  80% { transform: translateY(-34px) rotate(360deg); }
}
@keyframes look-around { 0%, 100% { transform: translate(0, 0); } 30% { transform: translate(-6px, 0); } 70% { transform: translate(6px, -2px); } }

/* ねむる */
.mascot.sleeping .m-eye-open, .mascot.sleeping .m-smile { display: none; }
.mascot.sleeping .m-eye-sleep { display: inline; }
.mascot.sleeping .m-oh { display: inline; transform-origin: 100px 140px; transform: scale(.6); }
.mascot.sleeping .m-bob { animation: breathe 3s ease-in-out infinite; }
.mascot.sleeping .m-arm-r { animation: none; }
@keyframes breathe { 0%, 100% { transform: scale(1.04, .96); } 50% { transform: scale(.99, 1.01); } }
.m-zzz {
  display: none; position: absolute; right: -6%; top: 2%; font-weight: 900; font-size: 26px; color: var(--mc-dark);
  pointer-events: none;
}
.m-zzz i { font-style: normal; font-size: .75em; margin-left: 2px; }
.mascot.sleeping .m-zzz { display: block; animation: zzz 2.4s ease-in-out infinite; }
@keyframes zzz { 0% { transform: translate(0, 6px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translate(14px, -24px); opacity: 0; } }

/* ===== 図鑑 ===== */
.zukan-count { font-weight: 900; color: var(--mc-dark); background: var(--mc-soft); padding: 4px 12px; border-radius: 999px; }
#view-zukan .appbar, #view-ranking .appbar { justify-content: space-between; }
.zukan-filter { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; }
.zukan-filter button {
  flex: none; padding: 6px 12px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface);
  font-size: 13px; font-weight: 800; color: var(--text-2); box-shadow: 0 3px 0 var(--line);
}
.zukan-filter button.on { border-color: var(--mc); background: var(--mc-soft); color: var(--mc-dark); box-shadow: 0 3px 0 var(--mc); }
.zukan-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.zcard {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 6px 10px;
  border-radius: 18px; background: var(--surface); border: 2px solid var(--line); box-shadow: 0 4px 0 var(--line);
  text-align: center; cursor: pointer; animation: rise .4s cubic-bezier(.2, 1.2, .4, 1) both; transition: transform .1s;
}
.zcard:active { transform: translateY(3px); box-shadow: none; }
.zcard img, .zcard .zicon { width: 100%; aspect-ratio: 1; border-radius: 12px; object-fit: cover; background: var(--mc-soft); }
.zcard .zicon { display: grid; place-items: center; font-size: 40px; }
.zcard b { font-size: 13px; line-height: 1.3; word-break: break-all; }
.zcard small { font-size: 10px; color: var(--text-3); font-weight: 800; }
.zno {
  position: absolute; top: 4px; left: 4px; z-index: 1; padding: 1px 7px; border-radius: 8px;
  background: var(--gold); color: #6b4b00; font-size: 10px; font-weight: 900; box-shadow: 0 2px 0 #d9a400;
}
.zukan-loading { grid-column: 1 / -1; text-align: center; color: var(--text-3); padding: 30px 0; font-weight: 800; list-style: none; }
#zukan-empty .btn { margin-top: 12px; }
.zukan-badge {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px;
  background: var(--mc-soft); border-color: var(--mc-2); box-shadow: 0 4px 0 var(--mc-2);
}
.zukan-badge b { font-size: 16px; }
.zukan-badge span { font-size: 13px; font-weight: 800; color: var(--text-2); }
.zukan-badge .btn { margin-left: auto; }
.zukan-badge.new { background: linear-gradient(135deg, #fff6c4, #ffe0f0); border-color: var(--gold); box-shadow: 0 4px 0 #e6b400; animation: pop .5s cubic-bezier(.2, 1.8, .4, 1) both; }

/* ===== ランキング ===== */
#view-ranking .segmented { margin-bottom: 14px; }
.podium { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: end; gap: 8px; margin: 6px 0 12px; min-height: 60px; }
.pod { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; min-width: 0; animation: rise .5s cubic-bezier(.2, 1.2, .4, 1) both; }
.pod b { font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod-medal { font-size: 34px; line-height: 1; animation: twinkle-medal 2.4s ease-in-out infinite; }
.pod-score { font-size: 12px; font-weight: 900; color: var(--mc-dark); }
.pod-block {
  width: 100%; display: grid; place-items: center; border-radius: 14px 14px 6px 6px;
  color: #fff; font-size: 26px; font-weight: 900; text-shadow: 0 2px 0 rgba(0, 0, 0, .15);
}
.pod-1 .pod-block { height: 96px; background: linear-gradient(#ffd43b, #f5a700); box-shadow: 0 5px 0 #c98a00; }
.pod-2 .pod-block { height: 70px; background: linear-gradient(#ced4da, #9aa5b1); box-shadow: 0 5px 0 #7d8793; }
.pod-3 .pod-block { height: 54px; background: linear-gradient(#f4b183, #d9822b); box-shadow: 0 5px 0 #a8621d; }
.pod-1 { animation-delay: .1s; }
.pod.me b { color: var(--mc-dark); }
@keyframes twinkle-medal { 50% { transform: rotate(-10deg) scale(1.1); } }
.my-rank .mine {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 12px 16px; margin-bottom: 12px; border-radius: 18px;
  background: var(--mc); color: #fff; box-shadow: 0 5px 0 var(--mc-dark); font-weight: 800;
}
.my-rank .mine b { font-size: 26px; font-weight: 900; }
.my-rank .mine small { opacity: .9; }
.rank-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rank-list li {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 16px;
  background: var(--surface); border: 2px solid var(--line); font-size: 14px; font-weight: 800;
}
.rank-list li b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-list li.me { border-color: var(--mc); background: var(--mc-soft); }
.rk { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); font-weight: 900; font-size: 13px; }

/* ===== ログインボーナス ===== */
.sheet-wrap { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 20px; background: rgba(20, 24, 40, .55); animation: fade .2s ease; }
.sheet {
  position: relative; overflow: hidden; width: min(100%, 380px); padding: 22px 20px 20px; border-radius: 28px; text-align: center;
  background: var(--surface); border: 3px solid var(--gold); box-shadow: 0 8px 0 #e6b400, 0 30px 60px rgba(0, 0, 0, .3);
  animation: pop .5s cubic-bezier(.2, 1.6, .4, 1) both;
}
.sheet > * { position: relative; }
.sheet > .sheet-rays {
  position: absolute; inset: -60%; z-index: 0;
  background: repeating-conic-gradient(rgba(255, 200, 0, .14) 0 10deg, transparent 10deg 20deg);
  animation: spin 20s linear infinite;
}
.sheet-title { margin: 0; font-size: 26px; font-weight: 900; color: #e67700; text-shadow: 0 3px 0 #ffe066; }
.sheet .mascot { width: 130px; margin: 6px auto 0; }
.sheet-streak { margin: 4px 0 10px; font-weight: 900; font-size: 18px; }
.stamps { list-style: none; margin: 0 0 12px; padding: 0; display: flex; justify-content: center; gap: 8px; }
.stamps li {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-2); border: 3px dashed var(--line-dark); font-weight: 900; color: var(--text-3);
}
.stamps li.done { background: var(--gold); border: 3px solid #e6b400; color: #6b4b00; box-shadow: 0 3px 0 #c98a00; }
.stamps li.today { animation: stamp-in .6s cubic-bezier(.2, 1.8, .4, 1) .3s both; }
@keyframes stamp-in { from { transform: scale(2.4) rotate(-30deg); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-reward { margin: 0 0 14px; font-weight: 800; line-height: 1.6; }
.sheet-reward b { color: #e64980; font-size: 1.15em; }
.sheet-reward small { color: var(--text-3); }

/* =========================================================
   ver2.2 — 立体（3D）感：キャラの陰影・浮島・奥行きのある背景・ツヤのあるボタンとカード
   ========================================================= */

/* キャラの陰影（index.html の共通グラデーション。色はモードに連動） */
.pk-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.pk-hi { stop-color: color-mix(in srgb, var(--mc) 38%, #fff); }
.pk-mid { stop-color: var(--mc); }
.pk-lo { stop-color: var(--mc-dark); }
.pk-deep { stop-color: color-mix(in srgb, var(--mc-dark) 70%, #000); }
.m-shadow { fill: rgba(20, 30, 60, .22); }
.haptic-switch { position: fixed; left: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }

/* キャラが指の方へ体を傾ける */
.mascot .m-svg {
  transform: perspective(700px) rotateY(var(--ry, 0deg)) rotateX(var(--rx, 0deg));
  transition: transform .3s ease-out;
  filter: drop-shadow(0 10px 10px rgba(20, 30, 60, .12));
}
.mascot.face-left .m-svg { transform: perspective(700px) rotateY(calc(180deg + var(--ry, 0deg))) rotateX(var(--rx, 0deg)); }

/* キャラが立つ浮島 */
.stage::before {
  content: ""; position: absolute; left: 10%; right: 10%; top: 30%; height: 70%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(ellipse at 50% 55%, rgba(255, 255, 255, .85), rgba(255, 255, 255, 0) 65%);
}
.island {
  position: relative; z-index: 0; width: 84%; height: 56px; margin: -40px auto 6px; border-radius: 50%;
  background:
    radial-gradient(ellipse at 38% 30%, rgba(255, 255, 255, .9) 0 18%, transparent 45%),
    radial-gradient(ellipse at 50% 40%, color-mix(in srgb, var(--mc-2) 45%, #fff) 0%, var(--mc-2) 70%, color-mix(in srgb, var(--mc-2) 75%, var(--mc-dark)) 100%);
  box-shadow:
    0 10px 0 color-mix(in srgb, var(--mc-dark) 55%, #8a5a2b),
    0 18px 0 color-mix(in srgb, var(--mc-dark) 40%, #5c3a1a),
    0 30px 30px rgba(20, 30, 60, .22),
    inset 0 -8px 14px rgba(0, 0, 0, .1);
  animation: island-float 4s ease-in-out infinite;
}
.walk-area { animation: island-float 4s ease-in-out infinite; }
@keyframes island-float { 50% { transform: translateY(-5px); } }

/* 背景：立体的な球とキューブが、奥行きごとに指の動きでずれる */
.bg i {
  --c: var(--mc-2);
  --d: 18px;
  background: radial-gradient(circle at 32% 28%, #fff 0%, color-mix(in srgb, var(--c) 55%, #fff) 18%, var(--c) 55%, color-mix(in srgb, var(--c) 70%, #1a2050) 115%);
  box-shadow: 0 16px 28px rgba(20, 30, 60, .1);
  translate: calc(var(--bx, 0) * var(--d)) calc(var(--by, 0) * var(--d));
  transition: translate .8s cubic-bezier(.2, .8, .2, 1);
  opacity: .5;
}
.bg i:nth-child(1), .bg i:nth-child(4), .bg i:nth-child(11) { --d: 6px; filter: blur(1.5px); opacity: .32; }
.bg i:nth-child(8) { --d: 10px; filter: blur(.8px); }
.bg i:nth-child(2), .bg i:nth-child(6), .bg i:nth-child(10) { --c: #ffd43b; }
.bg i:nth-child(5), .bg i:nth-child(12) { --c: #ff8fb8; }
.bg i:nth-child(9) { --c: #74c0fc; }
.bg i:nth-child(7) { --c: var(--mc); }
.bg i:nth-child(3), .bg i:nth-child(6), .bg i:nth-child(9), .bg i:nth-child(12) {
  --d: 30px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--c) 35%, #fff) 0%, var(--c) 55%, color-mix(in srgb, var(--c) 70%, #1a2050) 100%);
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, .7), 0 10px 18px rgba(20, 30, 60, .14);
  opacity: .7;
}
.bg i:nth-child(5), .bg i:nth-child(7), .bg i:nth-child(10) { --d: 34px; opacity: .75; }

/* ボタン：ツヤ・光・押し込み */
.btn { overflow: hidden; }
.btn.primary {
  background: linear-gradient(180deg, color-mix(in srgb, var(--mc) 62%, #fff) 0%, var(--mc) 42%, color-mix(in srgb, var(--mc) 88%, #000) 100%);
  box-shadow: 0 6px 0 var(--mc-dark), 0 14px 20px color-mix(in srgb, var(--mc) 32%, transparent), inset 0 2px 0 rgba(255, 255, 255, .5), inset 0 -3px 0 rgba(0, 0, 0, .08);
}
.btn.primary:active { transform: translateY(6px) scale(.985); box-shadow: 0 0 0 var(--mc-dark), 0 4px 8px color-mix(in srgb, var(--mc) 25%, transparent), inset 0 2px 0 rgba(255, 255, 255, .4); }
.btn.ghost, .btn.white, .btn.google {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface) 55%, var(--surface-2) 100%);
  box-shadow: 0 5px 0 var(--line-dark), 0 10px 16px rgba(20, 30, 60, .06), inset 0 2px 0 rgba(255, 255, 255, .8);
}
.btn.ghost:active, .btn.white:active, .btn.google:active { transform: translateY(5px) scale(.985); box-shadow: 0 0 0 var(--line-dark), inset 0 2px 0 rgba(255, 255, 255, .6); }
.btn.paypay { box-shadow: 0 6px 0 #b30024, inset 0 2px 0 rgba(255, 255, 255, .35); }
/* 大きいボタンにキラッと光が流れる */
.btn.big::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 38%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-20deg); animation: shine 3.6s ease-in-out infinite;
}
@keyframes shine { 0%, 65% { left: -60%; } 100% { left: 135%; } }

/* カード・タイル：やわらかい影と上側のツヤ */
.q-card, .tips li, .history-list li, .zcard, .tile, .plan-card, .group, .rank-list li, .feed li {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .7), rgba(255, 255, 255, 0) 38%);
  box-shadow: 0 4px 0 var(--line), 0 12px 24px rgba(20, 30, 60, .06);
}
.zcard:active, .history-list li:active { transform: perspective(500px) rotateX(10deg) translateY(3px); }
.tips svg { box-shadow: 0 3px 0 var(--mc-dark), inset 0 2px 0 rgba(255, 255, 255, .4); background-image: linear-gradient(180deg, rgba(255, 255, 255, .3), transparent); }

/* モードのタイル：立体＆選ぶと前に飛び出す */
.kind-tabs button {
  background-image: linear-gradient(180deg, #fff 0%, var(--surface) 50%, var(--surface-2) 100%);
  box-shadow: 0 4px 0 var(--line-dark), 0 8px 14px rgba(20, 30, 60, .06), inset 0 2px 0 rgba(255, 255, 255, .9);
  transition: transform .2s cubic-bezier(.2, 1.6, .4, 1), box-shadow .2s;
}
.kind-tabs button span { filter: drop-shadow(0 3px 2px rgba(20, 30, 60, .2)); }
.kind-tabs button[aria-pressed="true"] {
  background-image: linear-gradient(180deg, #fff 0%, var(--mc-soft) 60%);
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 5px 0 var(--mc), 0 12px 18px color-mix(in srgb, var(--mc) 25%, transparent), inset 0 2px 0 #fff;
}
.kind-tabs button:active { transform: translateY(3px) scale(.97); box-shadow: 0 1px 0 var(--line-dark); }
@media (prefers-color-scheme: dark) {
  .kind-tabs button, .kind-tabs button[aria-pressed="true"] { background-image: none; }
  .q-card, .tips li, .history-list li, .zcard, .tile, .plan-card, .group, .rank-list li, .feed li { background-image: none; }
}

/* 上の数字・下のメニュー・吹き出し */
.stat { box-shadow: 0 3px 0 var(--line), inset 0 2px 0 rgba(255, 255, 255, .8); }
.stat-icon, .tabbar button span { filter: drop-shadow(0 2px 1px rgba(20, 30, 60, .2)); }
.tabbar button.active span { filter: drop-shadow(0 3px 2px rgba(20, 30, 60, .25)); }
.bubble { box-shadow: 0 4px 0 var(--line), 0 12px 20px rgba(20, 30, 60, .08); }
.icon-btn { background-image: linear-gradient(180deg, #fff, var(--surface-2)); box-shadow: 0 3px 0 var(--line-dark), inset 0 2px 0 #fff; }
.icon-btn.sound-btn { font-size: 18px; }
.icon-btn.sound-btn.muted { filter: grayscale(1); opacity: .7; }
@media (prefers-color-scheme: dark) { .icon-btn { background-image: none; } }

/* 答えのハンコ・表彰台もツヤを足す */
.answer-badge { background: linear-gradient(180deg, #8ee04a 0%, var(--ok-line) 45%, #46a302 100%); box-shadow: 0 6px 0 #3a8a00, 0 14px 20px rgba(88, 204, 2, .3), inset 0 2px 0 rgba(255, 255, 255, .5); }
.pod-block { box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45), 0 5px 0 rgba(0, 0, 0, .2), 0 14px 20px rgba(20, 30, 60, .12) !important; }

.stage-hint { margin-top: 22px; }
.stage { min-height: 310px; }

/* ===== ログインカレンダー（左上の🔥） ===== */
.stat.fire { cursor: pointer; background: #fff4e6; border-color: #ffc078; }
.stat.fire b { color: #f76707; }
.stat.fire:active { transform: translateY(2px); }
.cal-sheet { border-color: #ff922b; box-shadow: 0 8px 0 #e8590c, 0 30px 60px rgba(0, 0, 0, .3); text-align: left; }
.cal-head { display: flex; align-items: center; justify-content: space-between; }
.cal-streak { display: flex; align-items: baseline; gap: 6px; }
.cal-fire { font-size: 40px; line-height: 1; filter: drop-shadow(0 3px 2px rgba(232, 89, 12, .35)); animation: flame 1.6s ease-in-out infinite; }
.cal-streak b { font-size: 40px; font-weight: 900; color: #f76707; line-height: 1; }
.cal-streak small { font-weight: 900; color: var(--text-2); }
@keyframes flame { 0%, 100% { transform: scale(1) rotate(-3deg); } 50% { transform: scale(1.12) rotate(3deg); } }
.cal-progress { margin: 12px 0 10px; }
.cal-bar { height: 14px; border-radius: 7px; background: var(--surface-2); overflow: hidden; }
.cal-bar i {
  display: block; height: 100%; width: 0; border-radius: 7px;
  background: linear-gradient(180deg, #ffd43b, #ff922b); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .4);
  transition: width .6s cubic-bezier(.2, 1, .3, 1);
}
.cal-progress p { margin: 6px 0 0; font-size: 14px; font-weight: 800; color: var(--text-2); }
.cal-progress b { color: #e64980; }
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 8px; }
.cal-nav b { font-size: 17px; font-weight: 900; }
.cal-nav .icon-btn { width: 38px; height: 38px; }
.cal-nextbtn svg { transform: scaleX(-1); }
.cal-nav .icon-btn:disabled { opacity: .35; }
.cal-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-w { font-size: 11px; font-weight: 900; color: var(--text-3); padding-bottom: 2px; }
.cal-w.sun { color: #e03131; }
.cal-w.sat { color: #1c7ed6; }
.cal-day {
  position: relative; aspect-ratio: 1; border-radius: 12px; display: grid; place-items: center;
  background: var(--surface-2); font-size: 13px; font-weight: 800; color: var(--text-3);
}
.cal-day span { position: relative; z-index: 1; }
.cal-day.on { background: linear-gradient(180deg, #fff3bf, #ffd8a8); color: #d9480f; box-shadow: 0 3px 0 #ffa94d; }
.cal-day.on span { position: absolute; top: 2px; left: 5px; font-size: 10px; }
.cal-day.on i { font-style: normal; font-size: 20px; line-height: 1; animation: pop .4s cubic-bezier(.2, 1.8, .4, 1) both; }
.cal-day.today { outline: 3px solid #ff922b; outline-offset: -1px; }
.cal-day.future { opacity: .45; }

/* ===== 友だち招待（ver2.3） ===== */
.invite-btn { font-size: 18px; }
.invite-banner {
  margin: 0 0 14px; padding: 10px 14px; border-radius: 16px; font-weight: 900; line-height: 1.5;
  background: linear-gradient(180deg, #ffe3ee, #ffc9dc); color: #c2255c; border: 2px solid #ff8fb8; box-shadow: 0 4px 0 #ff8fb8;
  animation: pop .5s cubic-bezier(.2, 1.8, .4, 1) both;
}
.invite-banner b { font-size: 1.2em; }
.install-note { margin-top: 6px; }
.invite { display: flex; flex-direction: column; gap: 12px; }
.invite-hero {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-radius: 24px;
  background: linear-gradient(135deg, #fff3bf, #ffd8a8); box-shadow: 0 5px 0 #ffa94d, inset 0 2px 0 rgba(255, 255, 255, .7);
}
.invite-hero .mascot { width: 104px; flex: none; }
.invite-offer { flex: 1; text-align: center; color: #7a3d00; }
.invite-offer p { margin: 0; font-weight: 800; font-size: 14px; }
.invite-offer b { display: block; font-size: 22px; font-weight: 900; line-height: 1.25; color: #2b2d42; }
.invite-offer em { font-style: normal; font-size: 40px; color: #ff4b8b; text-shadow: 0 3px 0 #fff; }
.invite-card-wrap {
  border-radius: 20px; overflow: hidden; background: var(--surface-2); min-height: 120px; display: grid; place-items: center;
  box-shadow: 0 6px 0 var(--line), 0 16px 28px rgba(20, 30, 60, .12);
}
.invite-card-wrap img { display: block; width: 100%; height: auto; }
.invite-loading { margin: 0; padding: 24px; color: var(--text-3); font-weight: 800; text-align: center; }
.invite-loading:empty { display: none; }
.invite-sub { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.invite-stat { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; font-weight: 800; }
.invite-stat b { font-size: 28px; font-weight: 900; color: #ff4b8b; }
.invite-stat small { font-size: 14px; margin-left: 2px; color: var(--text-2); }

/* 招待コード（大きく・手で入れられるように） */
.invite-code-box {
  display: grid; justify-items: center; gap: 2px; width: 100%; padding: 12px 14px 14px; border: 0; border-radius: 22px; cursor: pointer;
  background: #2b2d42; color: #fff; box-shadow: 0 5px 0 #14151f, 0 14px 24px rgba(20, 30, 60, .18); font: inherit;
}
.invite-code-box:active { transform: translateY(4px); box-shadow: 0 1px 0 #14151f; }
.invite-code-box small { font-size: 13px; font-weight: 900; color: #ffd43b; }
.invite-code-box b { font-family: "Consolas", "Menlo", monospace; font-size: 40px; font-weight: 900; letter-spacing: .22em; line-height: 1.15; padding-left: .22em; }
.invite-code-box span { font-size: 11px; font-weight: 700; color: rgba(255, 255, 255, .7); line-height: 1.5; }
.code-input { font-family: "Consolas", "Menlo", monospace; font-size: 20px; font-weight: 900; letter-spacing: .2em; text-transform: uppercase; }

/* 招待コード：ポップなクーポン（黒い札をやめた） */
.invite-code-box {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 255, 255, .35) 0 6px, transparent 7px),
    radial-gradient(circle at 88% 30%, rgba(255, 255, 255, .3) 0 4px, transparent 5px),
    radial-gradient(circle at 80% 85%, rgba(255, 255, 255, .25) 0 8px, transparent 9px),
    linear-gradient(135deg, #ff5fa2 0%, #ff8a5c 55%, #ffb627 100%);
  box-shadow: 0 6px 0 #d6336c, 0 16px 28px rgba(255, 95, 162, .35), inset 0 2px 0 rgba(255, 255, 255, .45);
  outline: 3px dashed rgba(255, 255, 255, .75); outline-offset: -9px;
}
.invite-code-box:active { box-shadow: 0 1px 0 #d6336c; }
.invite-code-box small { color: #fff; font-size: 14px; text-shadow: 0 2px 0 rgba(160, 20, 70, .35); }
.code-tiles { display: flex; gap: 6px; margin: 6px 0 4px; padding-left: 0 !important; letter-spacing: 0 !important; }
.code-tiles i {
  font-style: normal; display: grid; place-items: center; width: 42px; height: 50px; border-radius: 12px;
  background: linear-gradient(180deg, #fff 0%, #fff 60%, #fff0f6 100%); color: #e64980;
  font-family: "Consolas", "Menlo", monospace; font-size: 30px; font-weight: 900;
  box-shadow: 0 4px 0 rgba(160, 20, 70, .45), inset 0 -3px 0 rgba(230, 73, 128, .12);
  animation: tile-pop .5s cubic-bezier(.2, 1.8, .4, 1) both; animation-delay: calc(var(--i, 0) * 60ms);
}
@keyframes tile-pop { from { transform: translateY(10px) scale(.6); opacity: 0; } }
.invite-code-box span { color: #fff; font-size: 12px; font-weight: 800; text-shadow: 0 1px 0 rgba(160, 20, 70, .3); }

/* 上の数字は折り返さない（💌 を足して窮屈になったため） */
.stat { white-space: nowrap; }
.brand { gap: 6px; min-width: 0; }

/* 招待：いっしょに送るメッセージ */
.invite-msg .group-title { margin: 4px 0 8px; }
.msg-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; }
.msg-chips::-webkit-scrollbar { display: none; }
.msg-chips button {
  flex: none; padding: 8px 14px; border-radius: 999px; border: 2px solid var(--line-dark); background: var(--surface);
  font: inherit; font-weight: 900; font-size: 14px; color: var(--text-2); box-shadow: 0 3px 0 var(--line-dark); cursor: pointer;
  transition: transform .15s cubic-bezier(.2, 1.6, .4, 1);
}
.msg-chips button[aria-checked="true"] { background: linear-gradient(135deg, #ff5fa2, #ff9f1c); color: #fff; border-color: #d6336c; box-shadow: 0 3px 0 #d6336c; transform: translateY(-2px) scale(1.04); }
.msg-chips button:active { transform: translateY(2px); box-shadow: none; }
.chat-preview { padding: 14px 12px; border-radius: 20px; background: #8cabd8; background-image: linear-gradient(180deg, #9db8e0, #7fa0d0); }
.chat-bubble {
  position: relative; margin-left: auto; max-width: 88%; padding: 10px 14px; border-radius: 18px 18px 4px 18px; background: #8de055; color: #1d2b12;
  font-size: 14px; font-weight: 700; line-height: 1.55; box-shadow: 0 2px 0 rgba(0, 0, 0, .12); animation: pop .35s cubic-bezier(.2, 1.8, .4, 1) both;
}
.chat-bubble p { margin: 0; }
.chat-link { display: block; margin-top: 4px; color: #0b57d0; text-decoration: underline; word-break: break-all; font-size: 12px; }

/* 招待：LINE・Instagram・X へ直接 */
.share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.share-btn {
  display: grid; justify-items: center; gap: 0; padding: 12px 8px; border-radius: 18px; border: 0; cursor: pointer; color: #fff; font: inherit;
  box-shadow: 0 5px 0 var(--sh), inset 0 2px 0 rgba(255, 255, 255, .35); transition: transform .08s, box-shadow .08s;
}
.share-btn b { font-size: 18px; font-weight: 900; line-height: 1.2; }
.share-btn small { font-size: 12px; font-weight: 800; opacity: .9; }
.share-btn:active { transform: translateY(5px); box-shadow: 0 0 0 var(--sh); }
.share-btn:disabled { opacity: .5; }
.share-btn.line { background: linear-gradient(180deg, #2bd673, #06c755); --sh: #04913e; }
.share-btn.insta { background: linear-gradient(45deg, #f9a825 0%, #f2545b 35%, #d6249f 65%, #6a3de8 100%); --sh: #8e1f7a; }
.share-btn.x { background: linear-gradient(180deg, #333, #0f0f0f); --sh: #000; }
.share-btn.more { background: linear-gradient(180deg, #fff, var(--surface-2)); color: var(--text); --sh: var(--line-dark); }

/* 意見箱（ver2.4） */
.icon-btn.feedback-btn { font-size: 18px; }
.appbar-actions { gap: 6px; }
.appbar-actions .icon-btn { width: 40px; height: 40px; }
.fb-sheet { position: relative; width: min(400px, 100%); text-align: left; display: grid; gap: 12px; border-color: var(--mc); }
.fb-close { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; z-index: 2; }
.fb-head { display: flex; align-items: center; gap: 6px; padding-right: 30px; }
.fb-head .mascot { width: 84px; flex: none; margin: 0; }
.fb-bubble { position: static; margin: 0; font-weight: 900; font-size: 17px; line-height: 1.4; }
.fb-bubble small { font-size: 12px; color: var(--text-2); font-weight: 800; }
.fb-kinds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.fb-kinds button {
  display: grid; justify-items: center; gap: 2px; padding: 8px 2px; border-radius: 16px; border: 2px solid var(--line-dark); background: var(--surface);
  font: inherit; font-size: 12px; font-weight: 900; color: var(--text-2); box-shadow: 0 3px 0 var(--line-dark); cursor: pointer;
  transition: transform .15s cubic-bezier(.2, 1.6, .4, 1);
}
.fb-kinds button span { font-size: 26px; line-height: 1.1; }
.fb-kinds button[aria-checked="true"] { border-color: var(--mc); background: var(--mc-soft); color: var(--mc-dark); box-shadow: 0 3px 0 var(--mc); transform: translateY(-3px) scale(1.06); }
.fb-text { width: 100%; height: auto; min-height: 110px; padding: 12px 14px; resize: vertical; font: inherit; font-weight: 700; line-height: 1.5; }
.fb-count { margin: -8px 4px 0 0; text-align: right; font-size: 12px; font-weight: 800; color: var(--text-3); }
.fb-item .feed-main { white-space: normal; }
.fb-body { display: block; margin-top: 4px; font-size: 14px; font-weight: 700; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.fb-item.unread { background: var(--mc-soft); }
#admin-tab button { position: relative; }
.tab-badge { position: absolute; top: -6px; right: -4px; }
#admin-tab { display: grid; grid-template-columns: repeat(3, 1fr); }
.fb-bubble { font-size: 15px; white-space: nowrap; }
.fb-text { text-align: left; }

/* 学習モード（答えをかくして、選んでから答え合わせ） */
.study-chip { background: #f3e8ff; color: #7c3aed; }
.study-locked .study-ans { display: none; }
.study-open .study-reveal, .study-open .study-hint { display: none; }
.study-hint { margin: 6px 2px 10px; font-size: 13px; font-weight: 800; color: var(--text-3); }
.choices.pickable li { cursor: pointer; transition: transform .12s cubic-bezier(.2, 1.6, .4, 1), border-color .12s; }
.study-locked .choices.pickable li:active { transform: scale(.97); }
.choices li.picked { border-color: var(--mc); background: var(--mc-soft); box-shadow: 0 3px 0 var(--mc); }
.choices li.wrong { border-color: #ff4b4b; background: #ffe3e3; box-shadow: 0 3px 0 #ea2b2b; }
.study-result { margin: 4px 0 8px; text-align: center; font-size: 20px; font-weight: 900; }
.study-result:empty { display: none; }
.study-result .ok { color: #46a302; }
.study-result .ng { color: #ea2b2b; }
.study-open .study-ans { animation: pop .4s cubic-bezier(.2, 1.6, .4, 1) both; }
.study-open .choices li.correct.picked { border-color: var(--ok-line); background: var(--ok-soft); box-shadow: 0 3px 0 var(--ok-line); }

/* アプリ内アンケート（ver2.5） */
.survey-card {
  display: flex; align-items: center; gap: 12px; width: 100%; margin: 4px 0 12px; padding: 14px 16px; border: 0; border-radius: 20px; cursor: pointer; font: inherit; text-align: left; color: #fff;
  background: linear-gradient(135deg, #7c5cff 0%, #b86ef5 50%, #ff5fa2 100%); box-shadow: 0 5px 0 #5b3cc4, 0 14px 24px rgba(124, 92, 255, .3);
  animation: pop .5s cubic-bezier(.2, 1.8, .4, 1) both;
}
.survey-card:active { transform: translateY(4px); box-shadow: 0 1px 0 #5b3cc4; }
.survey-emoji { font-size: 30px; }
.survey-text { flex: 1; display: grid; }
.survey-text b { font-size: 17px; font-weight: 900; }
.survey-text small { font-size: 12px; font-weight: 700; opacity: .9; }
.survey-go { background: #fff; color: #7c5cff; font-weight: 900; font-size: 14px; padding: 7px 14px; border-radius: 999px; }
.survey-sheet { max-height: 88vh; overflow-y: auto; }
.survey-qs { display: grid; gap: 16px; }
.sv-title { margin: 0 0 8px; font-weight: 900; font-size: 15px; line-height: 1.4; }
.sv-title span { display: inline-block; margin-right: 6px; padding: 1px 8px; border-radius: 8px; background: var(--mc); color: #fff; font-size: 12px; }
.sv-title small { margin-left: 6px; font-size: 11px; color: var(--text-3); }
.sv-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.sv-opt {
  padding: 8px 12px; border-radius: 999px; border: 2px solid var(--line-dark); background: var(--surface); font: inherit; font-size: 13px; font-weight: 800;
  color: var(--text-2); box-shadow: 0 3px 0 var(--line-dark); cursor: pointer; transition: transform .15s cubic-bezier(.2, 1.6, .4, 1);
}
.sv-opt[aria-pressed="true"] { border-color: var(--mc); background: var(--mc-soft); color: var(--mc-dark); box-shadow: 0 3px 0 var(--mc); transform: translateY(-2px); }
.sv-stars { display: flex; gap: 6px; }
.sv-star { border: 0; background: none; font-size: 34px; line-height: 1; color: var(--line-dark); cursor: pointer; transition: transform .15s cubic-bezier(.2, 1.6, .4, 1); }
.sv-star[aria-pressed="true"] { color: #ffc800; text-shadow: 0 2px 0 #e0a800; transform: scale(1.12); }
.sv-block { display: grid !important; gap: 6px; }
.sv-row { display: grid; grid-template-columns: 7.5em 1fr 3em 3em; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.sv-row i { height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--mc) var(--w), var(--surface-2) var(--w)); }
.sv-row b { text-align: right; }
.sv-row small { color: var(--text-3); }
#admin-tab { grid-template-columns: repeat(4, 1fr); }
.sv-block { grid-template-columns: minmax(0, 1fr); }
.sv-row { width: 100%; }

/* 上のバー：ボーナスは「のこり回数」の中に小さく（ボタンの重なり防止） */
button.stat { font: inherit; font-size: 13px; cursor: pointer; }
.stat.plan { white-space: nowrap; }
.bonus-mini { margin-left: 4px; padding: 1px 6px; border-radius: 999px; background: #ffe3ee; color: #c2255c; font-size: 11px; font-weight: 900; }
.brand { flex-wrap: nowrap; min-width: 0; }
.appbar { gap: 6px; }
@media (max-width: 380px) {
  .plan-word { display: none; }
  .appbar-actions { gap: 4px; }
  .appbar-actions .icon-btn { width: 36px; height: 36px; }
  .stat { padding: 6px 8px; }
}
.brand { overflow: visible; }
.appbar-actions { flex: none; }

/* ===== ver2.7：質問モード・話して翻訳・ライト・図鑑のレア度・流入 ===== */
@media (max-width: 380px) { .kind-tabs button { font-size: 11px; } .kind-tabs button span { font-size: 21px; } }
.ask-box { display: flex; gap: 8px; align-items: stretch; }
.ask-box textarea {
  flex: 1; min-width: 0; resize: none; padding: 12px 14px; border-radius: 18px; border: 2px solid var(--mc-2);
  background: var(--surface); color: var(--text); font: inherit; font-size: 16px; font-weight: 700; line-height: 1.45;
  box-shadow: inset 0 3px 0 rgba(20, 30, 60, .05);
}
.ask-box textarea:focus { outline: none; border-color: var(--mc); }
.ask-send { flex: none; padding: 0 18px; border-radius: 18px; font-size: 16px; }
.ask-q { margin: 0 0 6px; padding: 8px 12px; border-radius: 14px; background: var(--mc-soft); color: var(--mc-dark); font-weight: 800; font-size: 14px; }
.ask-points { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; font-size: 15px; line-height: 1.6; }
.ask-follow { display: flex; flex-wrap: wrap; gap: 8px; }
.ask-follow .btn { text-align: left; white-space: normal; line-height: 1.4; }

.torch-btn { font-size: 22px; }
.torch-btn[aria-pressed="true"] { background: #ffd43b; border-color: #fff; box-shadow: 0 0 24px #ffd43b; }
.recorder.speech .notes-float { display: none; }

.rarity {
  display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0 2px; padding: 6px 12px 6px 6px;
  border-radius: 999px; background: var(--surface-2); border: 2px solid var(--line); font-weight: 900;
}
.rarity b { min-width: 44px; padding: 2px 10px; border-radius: 999px; color: #fff; text-align: center; font-size: 15px; letter-spacing: .04em; }
.rarity .stars { color: #f5a700; font-size: 16px; letter-spacing: 1px; }
.rarity .stars i { font-style: normal; color: var(--line-dark); }
.rarity small { font-size: 12px; color: var(--text-2); }
.rarity.r1 b, .zrare.r1 { background: #8a94a6; }
.rarity.r2 b, .zrare.r2 { background: #2f9e44; }
.rarity.r3 b, .zrare.r3 { background: #1c7ed6; }
.rarity.r4 b, .zrare.r4 { background: linear-gradient(135deg, #ae3ec9, #f06595); }
.rarity.r5 b, .zrare.r5 { background: linear-gradient(135deg, #f59f00, #ff6b6b, #cc5de8, #339af0); }
.rarity.r4, .rarity.r5 { border-color: #f5a700; box-shadow: 0 0 0 3px rgba(245, 167, 0, .2); }
.zrare {
  position: absolute; top: 4px; right: 4px; z-index: 1; padding: 1px 7px; border-radius: 8px;
  color: #fff; font-size: 10px; font-weight: 900; box-shadow: 0 2px 0 rgba(0, 0, 0, .15);
}

.flow-chart { display: flex; align-items: flex-end; gap: 4px; height: 120px; padding: 10px 12px !important; }
.flow-chart span { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; }
.flow-chart i { width: 100%; min-height: 2px; border-radius: 4px 4px 0 0; background: var(--mc); }
.flow-chart em { font-style: normal; font-size: 10px; font-weight: 900; color: var(--mc-dark); }
.flow-chart small { font-size: 9px; color: var(--text-3); }
#admin-tab { grid-template-columns: repeat(5, 1fr); gap: 3px; }
#admin-tab button { font-size: 12px; padding: 9px 1px; white-space: nowrap; }
.feed li.flow-head { display: block; line-height: 1.8; font-size: 13px; color: var(--text-2); }
.flow-head b { color: var(--text); font-size: 15px; }

.share-result {
  margin: 14px 0; padding: 14px; border-radius: 22px; border: 3px solid var(--mc-2);
  background: linear-gradient(135deg, var(--mc-soft), var(--surface)); box-shadow: 0 5px 0 var(--mc-2);
}
.share-head { margin: 0 0 8px; font-weight: 900; font-size: 16px; }
.share-head b { color: var(--mc-dark); }
.share-head small { display: block; font-size: 11px; color: var(--text-3); font-weight: 800; }
.share-preview {
  margin: 0 0 10px; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 2px dashed var(--line-dark);
  font-size: 13px; line-height: 1.6; white-space: pre-wrap; color: var(--text-2);
}
.share-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.share-row .share-x { background: #14171a; color: #fff; box-shadow: 0 4px 0 #000; }
.share-row .share-line { background: #06c755; color: #fff; box-shadow: 0 4px 0 #04913e; }

/* ===== ver2.8：キャラの自由行動 ===== */
.mascot.running .m-bob { animation: walk-bob .2s ease-in-out infinite; }
.mascot.running .m-foot-l, .mascot.running .m-foot-r { animation-duration: .2s; }
.mascot.running .m-arm-l, .mascot.running .m-arm-r { animation-duration: .2s; }
.mascot.running .m-svg { transform: rotate(8deg); }
.mascot.running.face-left .m-svg { transform: scaleX(-1) rotate(8deg); }
.mascot.r-flip .m-jump { transform-origin: 100px 120px; animation: flip .95s cubic-bezier(.3, .9, .4, 1); }
.mascot.r-stretch .m-jump { transform-origin: 100px 200px; animation: stretch 1.4s ease-in-out; }
.mascot.r-stretch .m-arm-l { animation: arm-up-l 1.4s ease-in-out; }
.mascot.r-stretch .m-arm-r { animation: arm-up-r 1.4s ease-in-out; }
.mascot.r-bigjump .m-jump { transform-origin: 100px 200px; animation: bigjump .8s cubic-bezier(.3, 1.2, .5, 1); }
.mascot.r-bigjump .m-arm-l { animation: arm-up-l .8s ease-in-out; }
.mascot.r-bigjump .m-arm-r { animation: arm-up-r .8s ease-in-out; }
.mascot.r-nod .m-jump { transform-origin: 100px 190px; animation: nod .45s ease-in-out 2; }
@keyframes flip {
  0% { transform: none; }
  20% { transform: translateY(8px) scale(1.18, .82); }
  55% { transform: translateY(-95px) rotate(-200deg); }
  85% { transform: translateY(0) rotate(-360deg) scale(1.12, .88); }
  100% { transform: rotate(-360deg); }
}
@keyframes stretch { 0%, 100% { transform: none; } 35%, 65% { transform: scale(.9, 1.2); } 80% { transform: scale(1.08, .94); } }
@keyframes bigjump { 0%, 100% { transform: none; } 15% { transform: translateY(6px) scale(1.15, .85); } 50% { transform: translateY(-110px) scale(.92, 1.1); } 85% { transform: translateY(2px) scale(1.1, .9); } }
@keyframes nod { 50% { transform: rotate(-8deg) translateY(4px); } }

.stage-critter { position: absolute; top: 40%; width: 40px; height: 32px; z-index: 3; pointer-events: none; }
.stage-critter svg { width: 100%; height: 100%; overflow: visible; }
.stage-critter.ltr { left: -50px; animation: fly-ltr 4s ease-in-out forwards; }
.stage-critter.rtl { right: -50px; animation: fly-rtl 4s ease-in-out forwards; }
.stage-critter .wing-l { transform-origin: 19px 16px; animation: flap .16s ease-in-out infinite alternate; }
.stage-critter .wing-r { transform-origin: 21px 16px; animation: flap .16s ease-in-out infinite alternate; }
@keyframes flap { to { transform: scaleX(.35); } }
@keyframes fly-ltr { 0% { transform: translate(0, 0); } 25% { transform: translate(28vw, -50px); } 50% { transform: translate(52vw, 20px); } 75% { transform: translate(78vw, -60px); } 100% { transform: translate(115vw, -20px); } }
@keyframes fly-rtl { 0% { transform: translate(0, 0); } 25% { transform: translate(-28vw, -50px); } 50% { transform: translate(-52vw, 20px); } 75% { transform: translate(-78vw, -60px); } 100% { transform: translate(-115vw, -20px); } }
.stage-note { position: absolute; z-index: 3; font-size: 28px; font-weight: 900; pointer-events: none; opacity: 0;
  text-shadow: 0 2px 0 #fff, 0 3px 0 rgba(0, 0, 0, .15); animation: note-up 2.2s ease-out forwards; }
@keyframes note-up { 0% { transform: translate(0, 0) scale(.4); opacity: 0; } 15% { opacity: 1; transform: translate(0, -10px) scale(1.1); } 100% { transform: translate(var(--dx), -140px) rotate(20deg) scale(.9); opacity: 0; } }

/* ===== ver2.8：オリジナルのステッカー風アイコン（絵文字の代わり）と動き ===== */
.stk { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 2px 0 rgba(43, 45, 66, .18)); }
.kind-tabs button span { width: 32px; height: 32px; display: block; margin-bottom: 2px; }
.kind-tabs button[aria-pressed="true"] .stk { animation: stk-wiggle 2.6s ease-in-out infinite; transform-origin: 50% 90%; }
.kind-tabs button:active .stk { animation: stk-boing .35s cubic-bezier(.3, 1.8, .5, 1); }
@media (max-width: 380px) { .kind-tabs button span { width: 28px; height: 28px; } }
.tabbar button span { display: block; width: 30px; height: 30px; margin: 0 auto 2px; font-size: 0; }
.tabbar button[aria-current="page"] .stk, .tabbar button.active .stk { animation: stk-hop .5s cubic-bezier(.3, 1.6, .5, 1); }
.appbar-actions .icon-btn .stk { width: 26px; height: 26px; }
.appbar-actions .icon-btn { font-size: 0; }
.appbar-actions .admin-btn span { display: block; width: 26px; height: 26px; }
.invite-btn .stk { animation: stk-wiggle 3.2s ease-in-out infinite; }
.feedback-btn .stk { animation: stk-wiggle 3.2s ease-in-out 1.6s infinite; }
.sound-btn .s-wave1 { animation: s-wave 1.4s ease-in-out infinite; }
.sound-btn .s-wave2 { animation: s-wave 1.4s ease-in-out .2s infinite; }
@keyframes stk-wiggle { 0%, 70%, 100% { transform: rotate(0) translateY(0); } 76% { transform: rotate(-12deg) translateY(-3px); } 84% { transform: rotate(10deg) translateY(-3px); } 92% { transform: rotate(-4deg); } }
@keyframes stk-boing { 40% { transform: scale(1.3, .8); } 70% { transform: scale(.9, 1.15); } }
@keyframes stk-hop { 0% { transform: translateY(0); } 40% { transform: translateY(-9px) scale(1.1); } 100% { transform: none; } }
@keyframes s-wave { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .stk, .stk * { animation: none !important; } }
.stat .stk.tk { display: inline-block; width: 22px; height: 22px; vertical-align: -5px; margin-right: 2px; animation: stk-wiggle 4s ease-in-out 1s infinite; }
.survey-emoji .stk { width: 40px; height: 40px; animation: stk-wiggle 3s ease-in-out infinite; }

/* ===== キャラの芸（ウインク・こける・くしゃみ・くるくる・側転） ===== */
.m-wink { display: none; }
.mascot.r-wink .m-eye-r { display: none; }
.mascot.r-wink .m-wink { display: inline; }
.mascot.r-wink .m-jump { transform-origin: 100px 190px; animation: wink-tilt 1s ease-in-out; }
@keyframes wink-tilt { 20%, 80% { transform: rotate(-8deg) translateY(-4px); } }
.mascot.r-trip .m-jump { transform-origin: 100px 196px; animation: trip 2s cubic-bezier(.3, .8, .4, 1); }
.mascot.r-trip .m-arm-l, .mascot.r-trip .m-arm-r { animation: arm-up-l .3s ease-in-out 2; }
@keyframes trip {
  0% { transform: none; }
  12% { transform: rotate(-14deg) translateY(-6px); }
  28% { transform: translate(12px, 10px) rotate(80deg) scale(1.05, .92); }
  34% { transform: translate(14px, 4px) rotate(72deg); }
  40%, 62% { transform: translate(14px, 10px) rotate(80deg); }
  78% { transform: translate(6px, -10px) rotate(-8deg) scale(.95, 1.08); }
  90% { transform: scale(1.08, .92); }
  100% { transform: none; }
}
.mascot.r-sneeze .m-jump { transform-origin: 100px 196px; animation: sneeze .9s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes sneeze { 0% { transform: none; } 15% { transform: rotate(-10deg) scale(.95, 1.06); } 30% { transform: rotate(12deg) translateY(4px) scale(1.12, .88); } 55% { transform: rotate(-4deg); } 100% { transform: none; } }
.mascot.r-twirl .m-jump { transform-origin: 100px 120px; animation: twirl 1.4s ease-in-out; }
@keyframes twirl { 0%, 100% { transform: none; } 30% { transform: translateY(-18px) rotateY(180deg); } 60% { transform: translateY(-18px) rotateY(360deg); } }
.mascot.rolling .m-jump { transform-origin: 100px 120px; animation: roll .45s linear infinite; }
.mascot.rolling.face-left .m-jump { animation-direction: reverse; }
@keyframes roll { to { transform: rotate(360deg); } }

#stamps[hidden], .stamps[hidden] { display: none !important; }

/* ===== Deep解説 ===== */
.deep-btn { background: linear-gradient(135deg, #2b2d42, #4a3f8f); color: #fff; border: 0; box-shadow: 0 5px 0 #15162a; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 2px 8px; }
.deep-btn em { font-style: normal; font-size: .82em; background: #ffd43b; color: #2b2d42; border-radius: 999px; padding: 1px 10px; }
.deep-btn small { flex-basis: 100%; font-size: 11px; font-weight: 800; opacity: .85; }
.deep-offer { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; border: 2px dashed #4a3f8f; }
.deep-offer b { display: block; }
.deep-offer span { font-size: 13px; color: var(--text-2); font-weight: 700; }
.deep-subject { margin: 0 0 8px; font-weight: 900; color: var(--mc-dark); }
.deep-answer { display: flex; align-items: baseline; gap: 10px; margin: 8px 0; padding: 10px 14px; border-radius: 14px; background: var(--mc-soft); }
.deep-answer small { font-weight: 900; color: var(--mc-dark); }
.deep-answer b { font-size: 18px; }
.deep-steps { counter-reset: d; list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 10px; }
.deep-steps li { counter-increment: d; position: relative; padding-left: 40px; }
.deep-steps li::before { content: counter(d); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--mc); color: #fff; display: grid; place-items: center; font-weight: 900; }
.deep-steps p { margin: 2px 0 0; line-height: 1.7; font-size: 15px; }
.fig { margin: 14px 0; padding: 12px; border-radius: 18px; background: var(--surface-2); border: 2px solid var(--line); }
.fig-body { display: flex; justify-content: center; overflow-x: auto; }
.fig-flow { justify-content: flex-start; align-items: center; gap: 4px; }
.fig-species { display: grid; justify-items: center; flex: none; }
.fig-species small { font-size: 11px; font-weight: 800; color: var(--text-2); }
.fig-arrow { display: grid; justify-items: center; flex: none; max-width: 110px; text-align: center; }
.fig-arrow span { font-size: 11px; font-weight: 800; color: var(--mc-dark); line-height: 1.3; }
.fig-arrow b { font-size: 26px; color: var(--mc-dark); }
.fig-mol { width: 220px; height: 170px; background: #fff; border-radius: 12px; }
.fig-body > .fig-mol { width: 300px; height: 220px; }
.fig-crystal { background: var(--surface); border-radius: 12px; cursor: grab; }
.fig-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: center; align-items: center; margin-top: 6px; font-size: 12px; font-weight: 800; }
.fig-body:has(.fig-crystal), .fig-body:has(.fig-plot) { flex-direction: column; align-items: center; }
.fig-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 4px; vertical-align: -1px; }
.fig-legend small { flex-basis: 100%; text-align: center; color: var(--text-3); }
.fig figcaption { margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--text-2); line-height: 1.6; }
.fig-plot { width: 100%; max-width: 360px; height: auto; background: var(--surface); border-radius: 12px; }
.fig-plot .bg { fill: none; }
.fig-plot .g { stroke: var(--line); stroke-width: 1; }
.fig-plot .ax { stroke: var(--text-2); stroke-width: 1.4; }
.fig-plot text { fill: var(--text-3); font-size: 10px; font-weight: 700; }
.fig-plot .pt { fill: #ff4b8b; stroke: #fff; stroke-width: 1.5; }
.fig-plot .pl { fill: var(--text); font-size: 11px; font-weight: 900; }
.fig-loading, .fig-fail { color: var(--text-3); font-size: 12px; font-weight: 700; }
.deep-btn em .stk.tk { display: inline-block; width: 18px; height: 18px; vertical-align: -4px; margin-right: 1px; }
.fig-flow { flex-direction: column; align-items: center; justify-content: flex-start; }
.fig-flow .fig-mol { width: 280px; height: 180px; }
.fig-arrow { flex-direction: row; display: flex; align-items: center; gap: 8px; max-width: 300px; text-align: left; margin: 2px 0; }
.fig-arrow b { font-size: 28px; }
.fig-arrow span { font-size: 12px; }
.fig-row { display: flex; align-items: center; justify-content: center; gap: 4px; flex-wrap: wrap; }
.fig-flow .fig-mol.fig-mol-s { width: 130px; height: 120px; }
.fig-plus { font-size: 22px; color: var(--mc-dark); }
.fig-ion { display: grid; place-items: center; min-width: 90px; height: 120px; padding: 0 10px; background: #fff; border-radius: 12px; color: #2b2d42; font: 700 26px/1 "Segoe UI", Arial, sans-serif; }

/* ===== ログインなしのおためし ===== */
.guest-try { margin-top: 10px; }
body.guest #tabbar, body.guest .appbar-actions, body.guest #stat-streak-btn, body.guest #stat-plan, body.guest #stat-bonus,
body.guest #deep-btn, body.guest #survey-card, body.guest #share-result, body.guest #retry-btn, body.guest #recent, body.guest .stage-hint { display: none !important; }
.guest-cta { margin: 16px 0; padding: 18px 16px; border-radius: 20px; text-align: center; background: linear-gradient(135deg, #fff6d6, #ffe3ef); border: 3px solid var(--text); box-shadow: 0 5px 0 var(--text); color: #2b2d42; }
.guest-cta-head { margin: 0 0 6px; font-size: 18px; font-weight: 900; }
.guest-cta-head b { color: #e8336f; }
.guest-cta-sub { margin: 0 0 14px; font-size: 13px; line-height: 1.6; color: #5c6178; }

/* 管理画面：どこで帰ってしまうか */
.feed li.flow-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.flow-steps > span { background: var(--surface-2, rgba(0, 0, 0, .04)); border-radius: 12px; padding: 8px; text-align: center; }
.flow-steps b { display: block; font-size: 18px; }
.flow-steps small { display: block; font-size: 11px; color: var(--text-2); line-height: 1.4; }
.flow-steps .flow-inapp { grid-column: 1 / -1; text-align: left; }

/* 生き物モードはカメラで撮った写真だけ（カメラ画面の「写真から選ぶ」を隠す） */
body[data-kind="creature"] .camera-gallery { visibility: hidden; }
.zukan-badge .rare-bonus { display: block; margin-top: 4px; font-weight: 900; color: #c2185b; }

/* ホーム画面に追加の案内 */
.install-steps { text-align: left; margin: 0 0 16px; padding: 0 0 0 1.4em; font-weight: 700; line-height: 1.7; }
.install-steps li { margin: 6px 0; }
.install-steps b { color: var(--text); background: #fff3bf; padding: 0 4px; border-radius: 4px; }
#install-sheet .btn + .btn { margin-top: 8px; }

/* 図鑑：はじめて見つけた日と、見つけた回数（2回目から） */
.zcard small .zcount { font-style: normal; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: var(--kind-soft, rgba(124, 77, 255, .12)); font-weight: 900; }
