/* ライブアイドルガチャ
   部品の作りと構造は、実績のあるニコニコ動画ガチャの部品を移植したもの。
   色と見た目はアイドル版の装い（明るい白＋ピンク基調、階層色は彩度を抑えた色、
   灰色のベタ塗りは使わない）で仕上げている。 */
:root {
  --topbar-h: 60px;
  --tab-h: 58px;
  --bg: #fff7fa;
  --panel: #ffffff;
  --panel2: #fff5f9;
  --line: #f0cfdd;
  --text: #3a2430;
  --muted: #a06a80;
  --accent: #ff5c8a;
  --accent-dark: #c2185b;
  --gold: #d9930d;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: linear-gradient(180deg, #fff7fa 0%, #fdf3ff 55%, #fff9ec 100%);
  color: var(--text);
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
button { font-family: inherit; cursor: pointer; }
.hidden { display: none !important; }

/* ヘッダー */
.topbar {
  min-height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
  z-index: 30;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo-tile {
  width: 40px; height: 40px; flex: none;
  background: linear-gradient(135deg, #ff5c8a, #ff9f43);
  color: #fff;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 22px;
  box-shadow: 0 2px 8px rgba(255, 92, 138, .45);
}
.brand-ja { font-weight: 800; font-size: 17px; line-height: 1.15; white-space: nowrap; }
.brand-en { font-size: 9.5px; letter-spacing: .18em; color: var(--muted); white-space: nowrap; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.points-pill {
  background: var(--panel2); border: 1px solid var(--line); color: var(--gold);
  font-weight: 700; border-radius: 999px; padding: 6px 12px; font-size: 14px;
  white-space: nowrap; flex: none;
}
.icon-btn {
  background: var(--panel); border: 1px solid var(--line); color: var(--text);
  width: 36px; height: 36px; border-radius: 10px; font-size: 16px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn.off { opacity: .42; }
.lang-toggle {
  background: var(--panel); border: 1px solid var(--line); color: var(--text);
  height: 36px; border-radius: 10px; padding: 0 12px; font-size: 13px;
  white-space: nowrap; flex: none;
}
.theme-toggle {
  background: var(--panel); border: 1px solid var(--line); color: var(--text);
  height: 36px; border-radius: 10px; padding: 0 10px; font-size: 13px;
  white-space: nowrap; flex: none;
}
@media (max-width: 640px) {
  :root { --topbar-h: 100px; }
  .brand { flex: 1 1 auto; }
  .xpromo-chip { margin-left: auto; }
  .topbar-right { margin-left: 0; flex: 1 1 100%; }
  .points-pill { margin-right: auto; }
}

/* メイン・ビュー */
main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.view { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.scroll-area { flex: 1; overflow-y: auto; padding: 14px 14px 30px; max-width: 860px; width: 100%; margin: 0 auto; }
.view-title { font-size: 19px; margin: 2px 0 12px; }
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px; margin-bottom: 14px;
}
.panel h2, .panel h3 { font-size: 15px; margin-bottom: 8px; }
.panel p, .panel li { font-size: 13.5px; line-height: 1.7; color: #5c4150; }
.panel ul { padding-left: 18px; }
.panel-note { font-size: 12.5px; color: var(--muted); line-height: 1.6; margin: 4px 0 10px; }

/* ガチャ画面（1画面） */
#viewGacha { overflow-y: auto; display: block; }
.gacha-stage {
  /* 基本は1画面に収める。ドックを開く等で収まりきらない時は容器ごと縦に伸びて
     #viewGacha 側が少しスクロールする（ステージ自体は潰さない、20261203-50） */
  min-height: 430px;
  min-height: calc(100dvh - var(--topbar-h) - var(--tab-h) - var(--safe-b));
  display: flex; flex-direction: column;
  padding: 10px 12px 8px;
  max-width: 860px; margin: 0 auto; width: 100%;
}
.pack-row {
  display: flex; gap: 8px; overflow-x: auto; padding-top: 8px;
  scrollbar-width: none; flex: none;
}
.pack-row::-webkit-scrollbar { display: none; }
.pack-chip {
  flex: none; border: 1px solid var(--line); background: var(--panel);
  color: var(--text); border-radius: 999px; padding: 7px 13px; font-size: 13px;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.pack-chip.active { background: linear-gradient(135deg, #ff5c8a, #ff7eb6); color: #fff; border-color: #ff5c8a; font-weight: 700; }
.pack-chip .lock { color: var(--gold); font-size: 11.5px; }
.pack-chip.active .lock { color: #fff; }
.pack-chip .cnt { color: var(--muted); font-size: 11px; }
.pack-chip.active .cnt { color: #ffe3ee; }
.stage-main { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }

/* ステージ（アイドル版の演出：暗転→スポットライト→登場） */
.stage {
  width: 100%; max-width: 680px;
  /* 高さは .stage-screen の 16:9（aspect-ratio）で決まる固定の広さ。
     -49 で入れた「空きに合わせて縮める」方式は実機で縦潰れに見えたため廃止し、
     収まりきらない分はページ側のスクロールで逃がす（20261203-50） */
  background: #fff;
  border: 1px solid #f3b8cf; border-radius: 14px;
  overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 8px 28px rgba(255, 92, 138, .18);
}
.stage-screen {
  position: relative; overflow: hidden; aspect-ratio: 16 / 9;
  cursor: pointer;
  background:
    radial-gradient(90% 62% at 50% 34%, rgba(255,255,255,.95) 0%, rgba(255,255,255,0) 60%),
    radial-gradient(130% 95% at 50% 0%, #fff 0%, rgba(255,255,255,0) 55%),
    linear-gradient(180deg, #ffe0ee 0%, #f6e3ff 46%, #ffd9a8 82%, #f7b267 100%);
}
.stage-curtain {
  position: absolute; top: 0; bottom: 0; width: 36px; z-index: 3; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0,0,0,.28), rgba(255,255,255,.10) 32%, rgba(0,0,0,.05) 55%, rgba(0,0,0,.30)),
    repeating-linear-gradient(90deg, #d81b60 0 6px, #a31247 6px 9px, #e7548f 9px 13px, #ad1457 13px 18px);
  box-shadow: inset -8px 0 14px rgba(0,0,0,.28), inset 2px 0 4px rgba(255,255,255,.18);
  transition: filter .5s ease;
}
.stage-curtain.left { left: 0; border-radius: 0 0 14px 0; }
.stage-curtain.right { right: 0; transform: scaleX(-1); border-radius: 0 0 14px 0; }
.stage-valance {
  position: absolute; top: 0; left: 0; right: 0; height: 24px; z-index: 3; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,.14), rgba(0,0,0,.16)),
    repeating-linear-gradient(90deg, #d81b60 0 8px, #a31247 8px 12px, #e7548f 12px 17px, #ad1457 17px 24px);
  box-shadow: 0 4px 10px rgba(74,10,40,.30);
}
.stage-valance::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 9px;
  background: radial-gradient(circle at 12px 0, #a31247 7px, rgba(163,18,71,0) 8px);
  background-size: 24px 9px; background-repeat: repeat-x;
}
.stage-beams { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.beam {
  position: absolute; top: -12%; height: 128%; width: 34%;
  clip-path: polygon(43% 0, 57% 0, 100% 100%, 0 100%);
  opacity: .35; mix-blend-mode: screen;
  transform-origin: 50% 0;
  transition: opacity .5s ease;
  animation: beamSweepB 7.5s ease-in-out infinite alternate;
  will-change: transform;
}
.beam.b1 { left: 1%; background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,0) 78%); animation-name: beamSweepA; animation-duration: 8.5s; }
.beam.b2 { left: 33%; background: linear-gradient(180deg, rgba(255,233,160,.95), rgba(255,233,160,0) 80%); animation-name: beamSweepB; }
.beam.b3 { right: 1%; background: linear-gradient(180deg, rgba(255,190,225,.95), rgba(255,190,225,0) 78%); animation-name: beamSweepC; animation-duration: 9.2s; }
.beam.b4 { left: 16%; width: 22%; background: linear-gradient(180deg, rgba(190,220,255,.8), rgba(190,220,255,0) 75%); animation-name: beamSweepB; animation-duration: 6.4s; animation-direction: alternate-reverse; }
.beam.b5 { right: 16%; width: 22%; background: linear-gradient(180deg, rgba(255,205,235,.8), rgba(255,205,235,0) 75%); animation-name: beamSweepA; animation-duration: 7.1s; animation-direction: alternate-reverse; }
@keyframes beamSweepA { from { transform: rotate(12deg); } to { transform: rotate(3deg); } }
@keyframes beamSweepB { from { transform: rotate(-4deg); } to { transform: rotate(4deg); } }
@keyframes beamSweepC { from { transform: rotate(-12deg); } to { transform: rotate(-3deg); } }
.stage-screen.live .beam { animation-duration: 2.6s; }
.stage-screen.live .beam.b2 { animation-duration: 3.3s; }
.stage-screen.live .beam.b3 { animation-duration: 2.9s; }
.stage-screen.live .beam.b4 { animation-duration: 2.2s; }
.stage-screen.live .beam.b5 { animation-duration: 2.4s; }
.stage-beams.heat0 .beam { opacity: .3; }
.stage-beams.heat1 .beam { opacity: .45; }
.stage-beams.heat2 .beam { opacity: .62; }
.stage-beams.heat3 .beam { opacity: .85; }
.stage-glow { position: absolute; inset: 0; z-index: 1; pointer-events: none; transition: background .4s ease; }
.stage-floor {
  position: absolute; left: 0; right: 0; bottom: 0; height: 30%; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,183,213,.22) 55%, rgba(216,27,96,.20) 100%);
  border-top: 1px solid rgba(255,255,255,.45);
}
.floor-shine {
  position: absolute; left: 50%; bottom: 16%; transform: translateX(-50%);
  width: 48%; height: 26px; border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(255,240,180,.9), rgba(255,240,180,0) 70%);
  filter: blur(2px); opacity: .5; transition: opacity .4s ease;
}
.stage-screen.spot .floor-shine { opacity: 1; }
.stage-sparkles { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
.sparkle {
  position: absolute; opacity: 0; pointer-events: none;
  background: linear-gradient(135deg, #fff8c4, #ffb300);
  clip-path: polygon(50% 0, 63% 37%, 100% 50%, 63% 63%, 50% 100%, 37% 63%, 0 50%, 37% 37%);
  animation: sparkleFloat var(--t, 5s) ease-in-out var(--d, 0s) infinite;
  will-change: transform, opacity;
}
@keyframes sparkleFloat {
  0%, 100% { opacity: 0; transform: translateY(7px) scale(.55) rotate(0deg); }
  50% { opacity: .95; transform: translateY(-9px) scale(1) rotate(35deg); }
}
/* 「いちばんの推し」登場の瞬間に舞う金＋ピンク＋白の光の粒子（JS が生成し、終わると消える。
   丸のほかに星型（.star）とハート型（.heart）が混ざる） */
.fav-petal {
  position: absolute; border-radius: 50%; pointer-events: none; opacity: 0;
  box-shadow: 0 0 6px 1px rgba(255, 214, 90, .8);
  animation: favPetal 1.9s ease-out forwards; animation-delay: var(--d, 0s);
  will-change: transform, opacity;
}
.fav-petal.star {
  border-radius: 0;
  clip-path: polygon(50% 0, 63% 37%, 100% 50%, 63% 63%, 50% 100%, 37% 63%, 0 50%, 37% 37%);
}
.fav-petal.heart { border-radius: 0; box-shadow: none; line-height: 0; }
@keyframes favPetal {
  0% { opacity: 0; transform: translate(0, 10px) scale(.5) rotate(0deg); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--x, 0px), -84px) scale(1.1) rotate(var(--r, 0deg)); }
}
/* 「いちばんの推し」登場の瞬間の画面フラッシュ（ステージ内のみ。表示テキストより下の層） */
.fav-flash {
  position: absolute; inset: 0; z-index: 6; pointer-events: none; opacity: 0;
  mix-blend-mode: screen;
  background: radial-gradient(circle at 50% 44%, rgba(255,255,255,.95) 0%, rgba(255,214,90,.55) 34%, rgba(255,92,138,.28) 58%, transparent 75%);
  animation: favFlash .8s ease-out forwards;
}
@keyframes favFlash {
  0% { opacity: 0; }
  14% { opacity: 1; }
  100% { opacity: 0; }
}
/* 中心から放射する光（ゆっくり回りながら消える。端はマスクで落として見やすく保つ） */
.fav-rays {
  position: absolute; inset: -12%; z-index: 6; pointer-events: none; opacity: 0;
  mix-blend-mode: screen;
  background: repeating-conic-gradient(from 0deg at 50% 44%, rgba(255,214,90,.34) 0deg 7deg, rgba(255,92,138,.12) 7deg 12deg, transparent 12deg 22deg);
  -webkit-mask-image: radial-gradient(circle at 50% 44%, #000 0%, transparent 68%);
  mask-image: radial-gradient(circle at 50% 44%, #000 0%, transparent 68%);
  animation: favRays 1.9s ease-out forwards;
}
@keyframes favRays {
  0% { opacity: 0; transform: rotate(-6deg) scale(.92); }
  18% { opacity: .9; }
  100% { opacity: 0; transform: rotate(14deg) scale(1.06); }
}
/* 「いちばんの推し」登場に被せるカットイン：斜めの金＋ピンクの帯と一緒に、顔の大きな
   アップと名前がスライドインして止まり、抜けていく（約1.6秒）。ステージ内の最上層に
   置くが、帯は上部〜中央に寄せて下部の名前・ピル（.stage-info）とは重ならない。
   タップは透過し、JS がアニメーション後に要素ごと消す */
.fav-cutin { position: absolute; inset: 0; z-index: 8; pointer-events: none; overflow: hidden; }
.fav-cutin-band {
  position: absolute; left: -7%; right: -7%; top: 11%; height: 104px;
  display: flex; align-items: center; gap: 14px; padding: 0 9%;
  background: linear-gradient(100deg, #ffb300 0%, #ff7a3d 46%, #ff5c8a 100%);
  border-top: 3px solid rgba(255,255,255,.95); border-bottom: 3px solid rgba(255,255,255,.95);
  box-shadow: 0 12px 32px rgba(173, 20, 87, .38);
  opacity: 0; transform: rotate(-7deg) translateX(-118%);
  animation: favCutinMove 1.6s cubic-bezier(.22, .9, .26, 1) both;
  will-change: transform, opacity;
}
/* 帯の中を流れ続けるスピード線 */
.fav-cutin-band::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(100deg, rgba(255,255,255,.22) 0 12px, transparent 12px 30px);
  animation: favCutinLines .45s linear infinite;
}
@keyframes favCutinLines {
  from { background-position: 0 0; }
  to { background-position: -60px 0; }
}
/* 帯の下に少し遅れて付いてくる細い差し色の帯 */
.fav-cutin-stripe {
  position: absolute; left: -7%; right: -7%; top: calc(11% + 114px); height: 10px;
  background: linear-gradient(100deg, #ff5c8a 0%, #ffb300 100%);
  box-shadow: 0 4px 14px rgba(173, 20, 87, .3);
  opacity: 0; transform: rotate(-7deg) translateX(-118%);
  animation: favCutinMove 1.6s cubic-bezier(.22, .9, .26, 1) .06s both;
  will-change: transform, opacity;
}
@keyframes favCutinMove {
  0% { transform: rotate(-7deg) translateX(-118%); opacity: 0; }
  10% { opacity: 1; }
  20% { transform: rotate(-7deg) translateX(2.5%); opacity: 1; }
  27% { transform: rotate(-7deg) translateX(0); }
  72% { transform: rotate(-7deg) translateX(0); opacity: 1; }
  90% { opacity: 1; }
  100% { transform: rotate(-7deg) translateX(118%); opacity: 0; }
}
.fav-cutin-face {
  position: relative; flex: none; width: 94px; height: 94px; border-radius: 50%;
  border: 4px solid #fff; box-shadow: 0 0 0 3px rgba(255,179,0,.9), 0 6px 18px rgba(120, 10, 50, .35);
  background: linear-gradient(135deg, #ffd65a, #ff5c8a);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  animation: favCutinFace .5s cubic-bezier(.2, 1.6, .4, 1) both;
}
.fav-cutin-face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.fav-cutin-initial { font-size: 40px; font-weight: 900; color: #fff; }
@keyframes favCutinFace {
  from { transform: scale(.4); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.fav-cutin-text { position: relative; min-width: 0; }
.fav-cutin-name {
  font-size: clamp(21px, 6vw, 32px); font-weight: 900; letter-spacing: .05em; color: #fff; line-height: 1.15;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 2px 0 rgba(173,20,87,.6), 0 0 16px rgba(255,179,0,.65), 0 3px 10px rgba(120, 10, 50, .35);
}
.fav-cutin-group {
  font-size: 13px; font-weight: 800; letter-spacing: .14em; color: rgba(255,255,255,.96);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 1px 4px rgba(120, 10, 50, .5);
}
/* ===== 推し召喚（2026-12-03）：「いちばんの推し」がステージ下のドックから見守る。
   登場演出はステージ内に重ねる .summon-intro、ドックは .gacha-stage 内の帯で、
   閉じている間は高さ0に畳んで1画面レイアウトに影響させない ===== */
.summon-intro {
  position: absolute; inset: 0; z-index: 40; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  opacity: 0; transition: opacity .45s ease;
  background: radial-gradient(62% 62% at 50% 46%, rgba(255,255,255,.94), rgba(255,255,255,0) 72%);
}
.summon-intro.show { opacity: 1; }
.summon-intro.settle { opacity: 0; }
.summon-intro-rays {
  position: absolute; inset: -25%; pointer-events: none;
  background: repeating-conic-gradient(rgba(255,214,90,.30) 0deg 9deg, rgba(255,214,90,0) 9deg 22deg);
  -webkit-mask-image: radial-gradient(closest-side, #000 30%, transparent 72%);
  mask-image: radial-gradient(closest-side, #000 30%, transparent 72%);
  animation: summonRaysSpin 8s linear infinite;
}
@keyframes summonRaysSpin { to { transform: rotate(360deg); } }
.summon-intro-face { position: relative; line-height: 0; }
.summon-intro-face .x-avatar {
  box-shadow: 0 0 0 4px #ffd65a, 0 0 34px rgba(255,183,0,.75), 0 10px 30px rgba(173,20,87,.35);
  animation: summonIntroPop .6s cubic-bezier(.2,1.4,.4,1) both;
}
@keyframes summonIntroPop { from { transform: scale(.55); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.summon-intro-name { font-size: 26px; font-weight: 900; color: #7a103f; text-shadow: 0 2px 0 #fff, 0 0 14px rgba(255,255,255,.9); position: relative; }
.summon-intro-note { font-size: 13px; font-weight: 700; color: #c2185b; letter-spacing: .35em; text-indent: .35em; position: relative; }
.summon-dock {
  display: flex; align-items: center; gap: 6px; position: relative; flex: none;
  overflow: hidden;
  max-height: 0; margin-top: 0; padding: 0 14px; border: 0 solid #ff8fb8;
  background: linear-gradient(135deg, #fff5f9, #ffe9f3); border-radius: 14px;
  box-shadow: 0 4px 18px rgba(255, 92, 138, .18);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: max-height .55s ease, margin-top .55s ease, padding .55s ease,
    opacity .5s ease, transform .5s ease, box-shadow .3s ease, visibility 0s .55s;
}
.summon-dock.on {
  /* 中身は約85px（アイコン64px／テキスト3行）。開くアニメーション用の余裕込みで
     118px に抑え、ドック自体はコンパクトに保つ（20261203-50） */
  max-height: 118px; margin-top: 8px; padding: 8px 12px; border-width: 1.5px;
  opacity: 1; visibility: visible; transform: none; transition-delay: 0s;
}
.summon-dock.glow { box-shadow: 0 0 0 2px #ffd65a, 0 0 26px 6px rgba(255,183,0,.65), 0 0 44px 12px rgba(255,92,138,.45); }
.summon-main {
  display: flex; align-items: center; gap: 10px; position: relative;
  flex: 1; min-width: 0; cursor: pointer; border-radius: 10px;
}
.summon-face { flex: none; line-height: 0; }
.summon-face .x-avatar {
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px #ffb300, 0 4px 14px rgba(173,20,87,.3);
  transition: box-shadow .3s ease;
}
.summon-dock.glow .summon-face .x-avatar { box-shadow: 0 0 0 3px #fff, 0 0 0 5px #ffd65a, 0 0 24px rgba(255,183,0,.9); }
/* ドック内のテキストは .summon-info の左端1列に全て揃える。装飾は称号ピルだけにし、
   推し被り枚数はピル状の背景・余白を持たない素の文字にする（20261203-50） */
.summon-info { display: block; min-width: 0; }
.summon-name { display: block; font-size: 16.5px; font-weight: 900; line-height: 1.3; color: #7a103f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.summon-group { font-size: 12px; font-weight: 700; color: #c2185b; margin-left: 6px; }
.summon-sub { display: flex; align-items: center; gap: 6px; margin-top: 4px; flex-wrap: nowrap; }
.summon-title {
  background: #fff; border: 1px solid #ffb300; color: #a35b00; border-radius: 999px;
  padding: 1px 7px; font-size: 11.5px; font-weight: 700; transition: box-shadow .3s ease, background .3s ease;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.summon-dups { font-size: 11.5px; font-weight: 700; color: #8a5a00; transition: color .3s ease, text-shadow .3s ease; flex: none; white-space: nowrap; }
.summon-title.title-glow { box-shadow: 0 0 0 2px #ffd65a, 0 0 16px rgba(255,183,0,.95); background: #fff7dd; }
.summon-dups.title-glow { color: #b8860b; text-shadow: 0 0 10px rgba(255,183,0,.95); }
.summon-note { display: block; font-size: 11.5px; color: #a35b78; margin-top: 4px; }
.summon-dismiss {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid #ff8fb8; background: rgba(255,255,255,.85); color: #c2185b;
  font-size: 13px; font-weight: 700; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
}
.summon-sparks { position: absolute; inset: 0; pointer-events: none; }
.summon-spark {
  position: absolute; z-index: 6; pointer-events: none; color: #ffb300;
  text-shadow: 0 0 6px #ffd65a; animation: summonSparkFloat 1.3s ease-out forwards;
}
@keyframes summonSparkFloat {
  0% { opacity: 0; transform: translateY(6px) scale(.6) rotate(0deg); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-26px) scale(1.15) rotate(40deg); }
}

/* ===== NEWパレード（10連以上で初入手がいた時、推しセレモニーの後・結果一覧の前に、
   NEW全員のアイコンがステージ上を右から左へ流れる。アイコンは横一列ではなく、
   JS が1つずつ縦位置と大きさをずらして不揃いに流す（群れの見た目）。
   JS が生成し、終わると消える。
   タップは透過し、ステージ側のクリックでスキップする） ===== */
.new-parade { position: absolute; inset: 0; z-index: 7; pointer-events: none; overflow: hidden; }
.new-parade-track {
  position: absolute; top: 58%; left: 100%; display: flex; gap: 16px; align-items: flex-start;
  transform: translateY(-50%); will-change: transform;
}
.new-parade-chip {
  position: relative; flex: none; width: 58px; height: 58px;
  filter: drop-shadow(0 4px 10px rgba(173, 20, 87, .35));
  transform: scale(var(--nps, 1));
  animation: np-bob 1.1s ease-in-out infinite;
}
/* チップごとの小さな上下動（周期・位相は JS が inline でずらす）。
   大きさは CSS 変数 --nps 経由で keyframes 内でも保つ */
@keyframes np-bob {
  0%, 100% { transform: translateY(0) scale(var(--nps, 1)); }
  50% { transform: translateY(-6px) scale(var(--nps, 1)); }
}
.new-parade.reduced .new-parade-chip { animation: none; }
.xa-parade {
  width: 58px; height: 58px; font-size: 24px;
  border: 2px solid #fff; box-shadow: 0 0 0 2px rgba(255, 45, 120, .55), 0 0 14px rgba(255, 45, 120, .45);
}
.np-badge {
  position: absolute; top: -8px; right: -14px; margin-left: 0;
  font-size: 10px; padding: 2px 6px; transform: rotate(8deg);
  box-shadow: 0 2px 6px rgba(173, 20, 87, .4);
}
/* reduced-motion 時は流さず、中央に静止表示する（JS が .reduced を付ける） */
.new-parade.reduced .new-parade-track {
  left: 50%; transform: translate(-50%, -50%);
  flex-wrap: wrap; justify-content: center; max-width: 94%;
}
.stage-dim {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: radial-gradient(90% 95% at 50% 42%, rgba(74, 10, 40, .16), rgba(74, 10, 40, .60));
  opacity: 0; transition: opacity .5s ease;
}
.stage-screen.dim .stage-dim { opacity: 1; }
.stage-screen.dim .stage-curtain { filter: brightness(.5); }
.stage-screen.dim .beam { opacity: .10; }
/* 階層のステージ画像（開演時に幕の裏に仕込み、幕が開くと見える。格がレア度を示唆する） */
.stage-backdrop {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  z-index: 0; pointer-events: none; opacity: 0; transition: opacity .35s ease;
}
.stage-screen.backdrop-on .stage-backdrop { opacity: 1; }
/* 画像が主役になる開演中は、CSSで描いた旧装飾（両脇幕・バランス・床）を退場させる */
.stage-screen.backdrop-on .stage-curtain,
.stage-screen.backdrop-on .stage-valance,
.stage-screen.backdrop-on .stage-floor { opacity: 0; }
.stage-curtain, .stage-valance, .stage-floor { transition: opacity .35s ease, filter .5s ease; }
/* 閉じた幕（待機の姿）：curtain.jpg を左右2枚のパネルに分けて1枚絵として見せる */
.curtain-panel {
  position: absolute; top: 0; bottom: 0; width: 50.6%; z-index: 5; pointer-events: none;
  background-image: url("stages/curtain.jpg");
  background-size: 198% 100%; background-repeat: no-repeat;
  transition: transform .68s cubic-bezier(.62, .02, .24, 1);
  will-change: transform;
}
.curtain-panel.left { left: 0; background-position: 0% 50%; box-shadow: inset -14px 0 22px rgba(40, 0, 16, .45); }
.curtain-panel.right { right: 0; background-position: 100% 50%; box-shadow: inset 14px 0 22px rgba(40, 0, 16, .45); }
.stage-screen.curtain-tease .curtain-panel.left { transform: translateX(-2.6%); }
.stage-screen.curtain-tease .curtain-panel.right { transform: translateX(2.6%); }
.stage-screen.curtain-open .curtain-panel.left { transform: translateX(-104%); }
.stage-screen.curtain-open .curtain-panel.right { transform: translateX(104%); }
.stage-screen.curtain-snap .curtain-panel { transition: none !important; }
/* 「いちばんの推し」が主役の回だけ、幕絵に金＋ピンクの色味を重ねた専用幕にする */
.stage-screen.curtain-fav .curtain-panel {
  background-image: linear-gradient(160deg, rgba(255, 179, 0, .34), rgba(255, 45, 120, .30)), url("stages/curtain.jpg");
}
/* 予兆：幕の継ぎ目から漏れる光（色・太さ・広がりは JS が階層に合わせて付ける） */
.stage-seam {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; transform: translateX(-50%);
  z-index: 6; pointer-events: none; opacity: 0; transition: opacity .22s ease;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,.98) 16%, rgba(255,255,255,.98) 84%, transparent);
}
.stage-screen.curtain-tease .stage-seam { opacity: 1; }
/* 登場の光の弾け（heat が高いほど強い） */
.stage-burst {
  position: absolute; inset: 0; z-index: 6; pointer-events: none; opacity: 0;
  mix-blend-mode: screen; --burst-c: #ffd65a; --burst-o: .35;
  background: radial-gradient(circle at 50% 44%, rgba(255,255,255,.95) 0%, var(--burst-c) 26%, transparent 62%);
}
.stage-burst.heat1 { --burst-o: .5; }
.stage-burst.heat2 { --burst-o: .72; }
.stage-burst.heat3 { --burst-o: .98; }
.stage-burst.fire { animation: burstFlash .62s ease-out; }
.stage-burst.heat3.fire { animation-name: burstFlashBig; animation-duration: .85s; }
@keyframes burstFlash {
  0% { opacity: 0; transform: scale(.55); }
  22% { opacity: var(--burst-o); }
  100% { opacity: 0; transform: scale(1.25); }
}
@keyframes burstFlashBig {
  0% { opacity: 0; transform: scale(.45); }
  20% { opacity: var(--burst-o); }
  100% { opacity: 0; transform: scale(1.6); }
}
/* 「いちばんの推し」登場のバースト：金の芯からピンクへ広がる光（階層色とは別系統） */
.stage-burst.fav {
  --burst-o: .85;
  background: radial-gradient(circle at 50% 44%, rgba(255,255,255,.95) 0%, #ffd65a 24%, rgba(255, 92, 138, .75) 46%, transparent 66%);
}
.stage-screen.spot .beam.b2 { opacity: .95; }
.stage-screen.spot .perf-avatar {
  box-shadow: 0 0 0 5px rgba(255,255,255,.95), 0 0 60px 18px rgba(255, 214, 90, .85), 0 10px 24px rgba(173, 20, 87, .3);
}
.stage-idle {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 6;
  pointer-events: none; text-align: center;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .94) 55%);
  padding: 26px 14px 10px;
}
.idle-avatar { display: none; }
.idle-text { font-size: 13px; font-weight: 700; color: #ad1457; letter-spacing: .12em; text-shadow: 0 1px 0 #fff; }
.stage-performer {
  position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%);
  z-index: 4; text-align: center;
}
.stage-performer.pop { animation: perfPop .45s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes perfPop {
  from { transform: translate(-50%, -50%) scale(.55); opacity: 0; }
  to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
.perf-avatar {
  position: relative; isolation: isolate;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(255,255,255,.9), 0 0 44px 12px rgba(255, 214, 90, .75), 0 10px 24px rgba(173, 20, 87, .3);
  line-height: 0;
  transition: box-shadow .4s ease;
}
.perf-avatar::after {
  content: ""; position: absolute; inset: -13px; z-index: -1; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(255,214,90,0), rgba(255,214,90,.55), rgba(255,92,138,0), rgba(255,214,90,.55), rgba(255,214,90,0));
  animation: haloSpin 7s linear infinite;
  will-change: transform;
}
@keyframes haloSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
/* 「タップで開演」の案内ピル（待機中の幕の中央に浮かぶ。タップはステージ全体で受ける） */
.open-pill {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  z-index: 7; pointer-events: none;
  font-size: 13px; font-weight: 800; letter-spacing: .14em; color: #ad1457;
  background: rgba(255,255,255,.88); border: 1px solid #f3b8cf; border-radius: 999px; padding: 6px 16px;
  animation: openPillGlow 2.8s ease-in-out infinite alternate;
  will-change: box-shadow;
}
@keyframes openPillGlow {
  from { box-shadow: 0 0 6px rgba(255, 214, 90, .35), 0 8px 10px rgba(173, 20, 87, .18); }
  to { box-shadow: 0 0 17px rgba(255, 214, 90, .85), 0 8px 10px rgba(173, 20, 87, .18); }
}
.stage-info {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 6;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .94) 55%);
  padding: 26px 14px 10px;
}
.stage-title { font-size: 15.5px; font-weight: 700; line-height: 1.45; }
.stage-name { font-size: 16px; font-weight: 900; color: #4a1030; margin-top: 3px; }
.stage-meta { font-size: 12px; color: #7a4a5e; margin-top: 3px; }
.penlight-sea { position: absolute; left: 0; right: 0; bottom: 0; height: 27%; z-index: 2; pointer-events: none; }
.pen {
  position: absolute; width: 6px; height: 27px;
  transform-origin: 50% 100%;
  opacity: .45;
}
.pen-light {
  position: absolute; left: 50%; top: 0; transform: translateX(-50%);
  width: 5px; height: 18px; border-radius: 3px;
  background: rgba(255, 255, 255, .38);
}
.pen-grip {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 3px; height: 9px; border-radius: 2px;
  background: rgba(122, 74, 94, .5);
}
.pen.lit {
  opacity: 1;
  animation: penWave var(--t, 1.8s) ease-in-out var(--d, 0s) infinite alternate;
  will-change: transform;
}
.pen.lit .pen-light {
  background: var(--c, #ffffff);
  box-shadow: 0 0 9px 2px var(--c, #ffffff);
}
@keyframes penWave {
  from { transform: rotate(-8deg) translateY(0); }
  to { transform: rotate(8deg) translateY(-2.5px); }
}
@media (prefers-reduced-motion: reduce) {
  .beam, .pen.lit, .open-pill, .sparkle, .fav-petal, .perf-avatar::after, .fav-note, .fav-flash, .fav-rays, .fav-cutin-band, .fav-cutin-band::before, .fav-cutin-stripe, .fav-cutin-face, .result-card.fav-hit, .mini-card.fav-hit, .summon-intro-rays, .summon-intro-face .x-avatar, .summon-spark, .song-fav-btn.fav-bounce { animation: none !important; }
  .curtain-panel { transition-duration: .01s !important; }
  .summon-dock, .summon-intro { transition-duration: .01s !important; }
  .stage-burst.fire { animation: none !important; }
  .celeb-ring, .celeb-group { animation: none !important; }
  .celeb-ring-shrink { transition-duration: .01s !important; }
}

/* Xアイコン（公式CDN直リンク表示。失敗時はWorker経由→頭文字の円にフォールバック） */
.x-avatar { position: relative; display: inline-block; border-radius: 50%; overflow: hidden; flex: none; line-height: 0; }
.x-avatar-initial {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 900;
}
.x-avatar-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.xa-idle { width: 104px; height: 104px; font-size: 42px; }
.xa-stage { width: 132px; height: 132px; font-size: 54px; }
.xa-result { width: 116px; height: 116px; font-size: 46px; }
.xa-mini { width: 100%; height: 100%; font-size: 26px; border-radius: 0; }
.xa-col { width: 84px; height: 84px; font-size: 34px; }
.xa-detail { width: 148px; height: 148px; font-size: 60px; }
.xa-group { width: 76px; height: 76px; font-size: 30px; }
.xa-fav { width: 148px; height: 148px; font-size: 60px; }
.xa-summon { width: 64px; height: 64px; font-size: 26px; }

/* 進捗・引くボタン */
.progress-wrap { flex: none; padding-top: 8px; }
.progress-text { font-size: 12px; color: var(--muted); margin-bottom: 5px; display: flex; justify-content: space-between; }
.progress-bar { height: 8px; background: #fadbe8; border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, #ff5c8a, #ff9f43); width: 0%; transition: width .4s ease; }
.multi-sel-row { display: flex; gap: 6px; padding-top: 8px; flex: none; flex-wrap: wrap; }
.multi-chip {
  border: 1px solid var(--line); background: var(--panel); color: var(--text);
  border-radius: 999px; padding: 5px 12px; font-size: 12.5px; font-weight: 600;
}
.multi-chip.active { background: linear-gradient(135deg, #ff5c8a, #ff7eb6); color: #fff; border-color: #ff5c8a; font-weight: 700; }
.multi-chip:disabled { opacity: .4; }
.pull-row { display: flex; gap: 8px; padding-top: 8px; flex: none; }
/* 引くボタン列は縦を詰めてステージの広さを確保する（20261203-50）。
   ただし指で押しやすい高さ（実高56px前後）は残し、文字サイズも落とさない */
.pull-btn {
  flex: 1; border-radius: 12px; border: 1px solid var(--line);
  background: var(--panel2); color: var(--text); font-size: 15px; font-weight: 700;
  padding: 8px 3px; min-height: 48px;
}
.pull-btn.main { background: linear-gradient(135deg, #ff5c8a, #ff7eb6); color: #fff; border-color: #ff5c8a; flex: 1.3; box-shadow: 0 4px 14px rgba(255, 92, 138, .35); }
.pull-btn.point { color: var(--gold); }
.pull-btn.summon-btn {
  background: linear-gradient(135deg, #ffb300, #ff5c8a); color: #fff; border-color: #ffb300;
  box-shadow: 0 4px 14px rgba(255, 179, 0, .4);
}
.pull-btn.summon-btn.used { opacity: .75; box-shadow: none; }
/* 召喚ボタンのラベル「★ 推し召喚」が「喚」だけ次の行に落ちないよう、日本語ラベルは
   改行禁止＋フォント（15px→13px）と字間（-0.08em）を詰め、左右padding（3px→1px）も
   削って1行に収める（20261203-52、360px幅で実測：文字62.4px／可幅65px）。
   「★ 召喚中」も同じボタンなので同じ指定で1行に収まる。
   英語版 "★ Summon Oshi" は元々2行表示のため対象外とし、html[lang] で日本語のみに絞る */
html[lang="ja"] .pull-btn.summon-btn {
  white-space: nowrap; font-size: 13px; letter-spacing: -0.08em; padding-left: 1px; padding-right: 1px;
}
/* 狭幅（〜390px）ではフォントの実測幅が広い環境（Android系）で「喚」が
   ボタン右端からはみ出すため、一段詰める（20261204-59 監査の追加分） */
@media (max-width: 390px) {
  html[lang="ja"] .pull-btn.summon-btn { font-size: 12px; letter-spacing: -0.1em; }
}
.pull-btn:disabled { opacity: .45; cursor: not-allowed; }
.pull-btn.short { opacity: .55; border-style: dashed; }
.pull-btn.short .sub { color: var(--gold); }
.pull-btn .sub { display: block; font-size: 10px; font-weight: 500; color: var(--muted); margin-top: 1px; letter-spacing: -0.02em; }
.pull-btn.main .sub { color: #ffe3ee; }
/* 「{price}ptで今すぐ」が「ぐ」だけ次の行に落ちないよう、paid経路のサブは
   空白位置でのみ改行可（keep-all）＋字間を詰めて1行に収める（20261203-51）。
   英語版 "Pull now for {price}pt" は空白で改行できるので従来通り2行に収まる */
.pull-btn.paid .sub { word-break: keep-all; letter-spacing: -0.05em; }
/* 所持ポイント表示は数字と単位が分かれないよう改行しない（20261203-51） */
#openPointSheet .sub { white-space: nowrap; }
.pull-btn .btn-label { display: block; white-space: pre-line; line-height: 1.25; }
.below-fold { max-width: 860px; margin: 0 auto; padding: 4px 12px 26px; width: 100%; }
.intro-text { font-size: 13.5px; line-height: 1.7; color: #5c4150; margin: 6px 0 14px; }

/* タブバー */
.tabbar {
  flex: none; height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: flex; background: rgba(255, 255, 255, .95); border-top: 1px solid var(--line); z-index: 30;
}
.tab {
  flex: 1; background: none; border: none; color: var(--muted);
  font-size: 12px; font-weight: 700; padding: 6px 1px; white-space: nowrap;
  position: relative;
}
/* 「その他／アプデ情報」タブの2段表記と新着の赤ポッチ */
.tab-lines { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.25; }
.tab-line { display: block; }
.tab-dot {
  position: absolute; top: 5px; right: calc(50% - 36px);
  width: 9px; height: 9px; border-radius: 50%;
  background: #e60023; box-shadow: 0 0 0 2px #fff; pointer-events: none;
}
.tab.active { color: var(--accent); box-shadow: inset 0 2px 0 var(--accent); }

/* 結果 */
.overlay {
  position: fixed; inset: 0; z-index: 60; background: rgba(96, 16, 68, .55);
  display: flex; align-items: center; justify-content: center; padding: 14px;
}
.overlay-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
  width: 100%; max-width: 560px; max-height: calc(100dvh - 28px); overflow-y: auto;
  padding: 16px;
}
.bonus-banner {
  background: linear-gradient(90deg, #fdf3d7, #ffe9f2); color: #8a6508;
  border: 1px solid #e5c86b; border-radius: 10px; padding: 9px 12px;
  font-size: 13px; font-weight: 700; margin-bottom: 12px; line-height: 1.5;
}
.result-points { text-align: center; font-size: 14px; color: var(--accent-dark); font-weight: 700; padding: 10px 0 2px; }
.result-actions { display: flex; gap: 8px; margin-top: 10px; }
/* 結果オーバーレイ下段の3ボタン（シェア／コピー／閉じる）が、360px幅では
   合計の最小幅がカード内幅を超えて右端のボタンが画面外に切れていた
   （実測：日本語で2px・英語で7px）。狭幅では詰めて1行に収める（20261204-59） */
@media (max-width: 390px) {
  .result-actions .action-btn { padding-left: 6px; padding-right: 6px; font-size: 12.5px; letter-spacing: -0.02em; gap: 5px; }
}
.sub-btn {
  border: 1px solid #ffb3cd; background: var(--panel); color: var(--accent-dark);
  border-radius: 10px; padding: 9px 14px; font-size: 13.5px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  white-space: nowrap;
}
.sub-btn.wide { width: 100%; margin: 4px 0 14px; }
.sub-btn:disabled { opacity: .45; cursor: not-allowed; }
.sub-btn.on { background: linear-gradient(135deg, #ff5c8a, #ff7eb6); color: #fff; border-color: #ff5c8a; font-weight: 700; }
.action-btn {
  flex: 1; border: 1px solid #ffb3cd; background: var(--panel); color: var(--accent-dark);
  border-radius: 10px; padding: 9px 14px; font-size: 13.5px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  white-space: nowrap;
}
.action-btn.share { background: #000; color: #fff; border-color: #000; }
.action-btn.song { background: #ff0033; color: #fff; border-color: #ff0033; text-decoration: none; }
.action-btn.song.tiktok { background: #000; border-color: #000; }

/* バッジ類（ニコニコ版の作り：ピル型バッジ＋NEW＋おまけタグ） */
.tier-badge {
  display: inline-block; font-weight: 800; font-size: 12.5px; border-radius: 999px;
  padding: 3px 10px; color: #fff;
}
.new-badge {
  display: inline-block; font-weight: 800; font-size: 12px; border-radius: 6px;
  padding: 3px 8px; background: #ff2d78; color: #fff; margin-left: 6px;
}
.bonus-tag {
  display: inline-block; font-weight: 800; font-size: 11.5px; border-radius: 6px;
  padding: 3px 8px; background: #fdf3d7; color: #8a6508; border: 1px solid #e5c86b; margin-left: 6px;
}
.retired-tag { background: #ececf1; color: #55586b; border-color: #c9cbd6; }
/* 卒業タグ（詳細モーダル用）: 落ち着いたラベンダーで、引退タグと区別する */
.graduated-tag { background: #efeaf8; color: #5d5480; border-color: #c3b9dd; }
/* 卒業バッジ（図鑑・推しの名前の横） */
.grad-badge {
  display: inline-block; background: #efeaf8; color: #5d5480; border: 1px solid #c3b9dd;
  border-radius: 999px; padding: 0 7px; font-size: 10.5px; font-weight: 700; margin-left: 5px;
  vertical-align: 1px;
}
/* 「いちばんの推しです」の一言（ステージ登場時と単発の結果カードに添える。
   少し大きめにし、弾んで出る出現アニメーション付き） */
.fav-note {
  display: inline-block; margin-top: 6px; font-size: 13.5px; font-weight: 800;
  color: #a35b00; background: linear-gradient(90deg, #fff3c4, #ffe0ec);
  border: 1.5px solid #f2b705; border-radius: 999px; padding: 4px 15px;
  box-shadow: 0 2px 10px rgba(255, 150, 60, .35);
  animation: favNotePop .6s cubic-bezier(.18, 2.4, .42, 1) both;
}
@keyframes favNotePop {
  0% { transform: scale(.4); opacity: 0; }
  55% { transform: scale(1.18); opacity: 1; }
  75% { transform: scale(.94); }
  100% { transform: scale(1); opacity: 1; }
}
.badge-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.badge-row .new-badge, .badge-row .bonus-tag { margin-left: 0; }

/* 結果カード（アイドル版は正方形アバターを左に置く横型） */
.result-card {
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--panel2);
  display: flex; gap: 12px; padding: 12px 14px 14px;
}
/* 「いちばんの推し」の結果カード：金枠＋ピンクの光彩がゆっくり脈打つ
   （階層色・best の金アウトラインとは別系統） */
.result-card.fav-hit {
  border-color: #f2b705;
  box-shadow: 0 0 0 2px rgba(255, 179, 0, .75), 0 0 22px 3px rgba(255, 92, 138, .45);
  animation: favHitPulse 1.7s ease-in-out infinite alternate;
}
@keyframes favHitPulse {
  from { box-shadow: 0 0 0 2px rgba(255, 179, 0, .75), 0 0 16px 2px rgba(255, 92, 138, .38); }
  to { box-shadow: 0 0 0 2.5px rgba(255, 179, 0, .95), 0 0 32px 7px rgba(255, 92, 138, .62); }
}
.result-card .rc-head { flex: none; line-height: 0; }
.result-card .rc-body { flex: 1; min-width: 0; }
.rc-title { font-size: 16.5px; font-weight: 700; line-height: 1.45; margin: 8px 0 6px; color: #4a1030; }
.rc-group { font-size: 12.5px; color: var(--muted); line-height: 1.8; font-weight: 700; }
.rc-foll { font-size: 12.5px; color: var(--muted); line-height: 1.8; }
.rc-foll b { color: var(--text); font-size: 14px; }
.rc-id { font-size: 12.5px; color: var(--muted); line-height: 1.8; }
.rc-stack { font-size: 12.5px; color: var(--muted); line-height: 1.8; }
.rc-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.rc-actions .action-btn { flex: none; }
.x-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: #000; color: #fff; text-decoration: none;
  font-weight: 700; font-size: 13.5px; border-radius: 10px; padding: 8px 14px;
  white-space: nowrap;
}
.shelf-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--panel); color: var(--accent-dark);
  border: 1px solid #ffb3cd; border-radius: 10px;
  padding: 8px 14px; font-size: 13.5px; font-weight: 700; white-space: nowrap;
}
.shelf-toggle .heart-icon { color: #e88bb0; flex: none; }
.shelf-toggle.on {
  background: linear-gradient(135deg, #ff5c8a, #ff7eb6); color: #fff; border-color: #ff5c8a;
  box-shadow: 0 3px 10px rgba(255, 92, 138, .35);
}
.shelf-toggle.on .heart-icon { color: #fff; }
.shelf-toggle:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
/* 多連結果のヘッドライン：合計フォロワー数（カウントアップ表示）＋その回のNEW人数 */
.total-head { text-align: center; padding: 4px 0 12px; }
.total-label { font-size: 12px; color: var(--muted); letter-spacing: .14em; }
.total-num { font-size: 34px; font-weight: 900; line-height: 1.2; font-variant-numeric: tabular-nums; color: #e91e63; }
.total-new { margin-top: 5px; font-size: 14px; font-weight: 700; }
.total-new .new-badge { margin-left: 0; }
/* NEWピルと人数の間に少しだけ空白を空ける（2026-12-02 実機指摘） */
.total-new-num { margin-left: 6px; }
/* 多連結果は固定レイアウト：カード全体を縦フレックスにし、ヘッドライン（合計・NEW）と
   獲得pt・「もう1回」・シェア等のボタン類を固定表示し、結果グリッドだけがスクロールする */
.overlay-card.big-result { display: flex; flex-direction: column; overflow: hidden; container-type: inline-size; }
.overlay-card.big-result #resultBody { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
.overlay-card.big-result .total-head { flex: none; }
.overlay-card.big-result .result-points { border-top: 1px solid var(--line); margin-top: 10px; }

/* 初回お知らせ（白＋ピンクの不透明パネル。シートより手前、トーストより奥に出す） */
.overlay.notice { z-index: 80; }
.notice-card { max-width: 480px; }
/* 100万人記念ポップアップ＆細いバー */
.million-card {
  background: linear-gradient(135deg, #ff5c8a 0%, #ff8fab 45%, #ffc93c 130%);
  border: none; color: #fff; text-align: center; max-width: 480px;
  box-shadow: 0 10px 34px rgba(230, 0, 90, .35); padding: 24px 18px 18px;
}
.million-kicker { font-size: 12.5px; font-weight: 700; letter-spacing: .08em; opacity: .95; }
.million-title { font-size: 27px; font-weight: 900; line-height: 1.3; margin: 6px 0 8px; white-space: pre-line; }
.million-text { font-size: 13.5px; line-height: 1.7; opacity: .97; margin-bottom: 8px; }
.million-card .result-actions { justify-content: center; flex-wrap: wrap; }
.pull-btn.million-claim {
  background: #fff; color: #d81b60; border: none; font-weight: 800;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}
.pull-btn.million-later { background: rgba(255, 255, 255, .22); color: #fff; border: 1px solid rgba(255, 255, 255, .65); }
.million-bar {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(90deg, #ff5c8a, #ff8fab); color: #fff;
  font-size: 12.5px; font-weight: 700; border-radius: 10px;
  padding: 7px 10px; margin-top: 8px; line-height: 1.4;
}
.million-bar-btn {
  background: #fff; color: #d81b60; border: none; border-radius: 999px;
  font-size: 12px; font-weight: 800; padding: 5px 12px; cursor: pointer; white-space: nowrap;
}
.notice-title { font-size: 17px; font-weight: 800; color: #4a1030; margin-bottom: 10px; }
.news-date { font-size: 12px; color: var(--muted, #8a6a7a); margin: -6px 0 10px; }
.news-body { font-size: 13.5px; line-height: 1.75; }
.news-img { width: 100%; height: auto; display: block; border-radius: 12px; margin-bottom: 10px; }
.news-body p { margin-bottom: 8px; }
.news-head { font-weight: 800; color: #4a1030; margin-top: 12px; }
/* 「いちばんの推し」発表（専用ページ。1人だけを表示する。順位表ではない・件数は出さない） */
.top-panel { text-align: center; }
.top-announce { padding: 12px 0 6px; }
.top-avatar { line-height: 0; display: flex; justify-content: center; margin-bottom: 12px; }
.top-sentence { font-size: 16.5px; font-weight: 800; color: #4a1030; line-height: 1.55; }
.top-group { font-size: 13px; color: var(--muted); font-weight: 700; margin-top: 5px; }
.top-actions { justify-content: center; margin-top: 14px; }
.top-mine-tag {
  display: inline-block; background: #ff2d78; color: #fff; font-size: 11.5px; font-weight: 800;
  border-radius: 6px; padding: 3px 9px; margin-top: 10px;
}
.top-msg { text-align: center; color: var(--muted); padding: 18px 0; font-size: 13.5px; line-height: 1.7; }
.notice-list { padding-left: 20px; font-size: 13.5px; line-height: 1.75; display: flex; flex-direction: column; gap: 6px; }
.about-notice-row { margin-top: 14px; }
/* About内「アップデート情報」一覧：タイトルと日付は閉じたままでも見える */
.news-list { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.news-item { border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.news-item > summary { cursor: pointer; list-style: none; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.news-item > summary::-webkit-details-marker { display: none; }
.news-item-title { font-weight: 800; font-size: 14px; color: #4a1030; text-wrap: balance; }
.news-item-date { font-size: 12px; color: var(--muted); }
.news-item-body { padding: 0 12px 12px; font-size: 13.5px; line-height: 1.75; }
.news-item-body p { margin-bottom: 8px; }
/* グリッドの表示領域は2行分（10人）まで。それを超える分はこの領域の中だけがスクロールする。
   高さの内訳：列幅 = (コンテナ幅 - 列間ギャップ4×8px) / 5、カード高 = 列幅（サムネは正方形）+ 本文約78px */
.mini-grid-scroll {
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
  max-height: calc(2 * ((100cqw - 32px) / 5 + 78px) + 8px);
}
/* 多連結果は5列のコンパクトグリッド。詳細はタップで詳細モーダルへ */
.mini-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.mini-card {
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--panel2);
  display: flex; flex-direction: column; cursor: pointer;
}
.mini-card.best { outline: 2px solid var(--gold); }
/* 多連結果で「いちばんの推し」の1枚だけが光る（金枠＋ピンクの光彩が脈打つ） */
.mini-card.fav-hit {
  border-color: #f2b705;
  box-shadow: 0 0 0 2px rgba(255, 179, 0, .8), 0 0 14px 2px rgba(255, 92, 138, .55);
  animation: favHitPulseMini 1.7s ease-in-out infinite alternate;
}
@keyframes favHitPulseMini {
  from { box-shadow: 0 0 0 2px rgba(255, 179, 0, .8), 0 0 10px 1px rgba(255, 92, 138, .45); }
  to { box-shadow: 0 0 0 2px rgba(255, 179, 0, .95), 0 0 20px 4px rgba(255, 92, 138, .7); }
}
.mini-card .mc-thumb { aspect-ratio: 1; background: #fdf3f7; position: relative; line-height: 0; }
.mini-card .mc-new { position: absolute; top: 3px; left: 3px; margin: 0; font-size: 9px; padding: 1px 5px; border-radius: 4px; }
.mini-card .mc-body { padding: 4px 5px 5px; min-width: 0; }
.mini-card .mc-title { font-size: 11px; font-weight: 700; color: #4a1030; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.mini-card .mc-group { font-size: 10px; color: var(--muted); line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-card .mc-foll { font-size: 10px; font-weight: 700; color: #8a6508; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-card .tier-badge { font-size: 9px; padding: 1px 5px; margin-bottom: 3px; white-space: nowrap; max-width: 100%; overflow: hidden; }
.mini-card .bonus-tag { font-size: 9.5px; padding: 1px 5px; margin-left: 4px; }

/* 詳細モーダル */
.detail-card { padding: 0; overflow: hidden auto; }
.detail-head {
  padding: 18px 10px 14px;
  display: flex; align-items: center; justify-content: center;
}
.detail-body { padding: 12px 14px 14px; }
.detail-body .badge-row { justify-content: center; }
.detail-title { font-size: 16.5px; font-weight: 700; line-height: 1.45; margin: 8px 0 6px; text-align: center; color: #4a1030; text-wrap: balance; }
.detail-meta { font-size: 12.5px; color: var(--muted); line-height: 1.8; text-align: center; }
.detail-meta b { color: var(--text); }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; margin-top: 4px; }
.detail-actions .action-btn { flex: none; }

/* 図鑑 */
.col-controls { margin-bottom: 12px; }
.text-input {
  width: 100%; background: var(--panel); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 10px 12px; font-size: 14px; font-family: inherit;
}
.text-input:focus { outline: none; border-color: var(--accent); }
.select-input {
  background: var(--panel); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 10px 12px; font-size: 14px; font-family: inherit; min-width: 0;
}
.col-select-row .select-input { background: var(--panel2); border-color: #ffb3cd; font-weight: 700; }
.col-filter-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.col-select-row { display: flex; gap: 8px; margin-top: 8px; }
.col-select-row .select-input { flex: 1; }
.chip {
  border: 1px solid var(--line); background: var(--panel); color: var(--text);
  border-radius: 999px; padding: 5px 11px; font-size: 12px; white-space: nowrap;
}
.chip.active { background: linear-gradient(135deg, #ff5c8a, #ff7eb6); color: #fff; border-color: #ff5c8a; font-weight: 700; }
/* 階層フィルタの選択中は、その階層の色で塗る */
.col-filter-row .chip.active[data-tier="0"] { background: #bd8a1e; border-color: #bd8a1e; color: #fff; }
.col-filter-row .chip.active[data-tier="1"] { background: #8a5fb0; border-color: #8a5fb0; color: #fff; }
.col-filter-row .chip.active[data-tier="2"] { background: #4a86c5; border-color: #4a86c5; color: #fff; }
.col-filter-row .chip.active[data-tier="3"] { background: #379e85; border-color: #379e85; color: #fff; }
.col-filter-row .chip.active[data-tier="4"] { background: #c95d7b; border-color: #c95d7b; color: #fff; }
.col-filter-row .chip.active[data-tier="5"] { background: #cf7a4e; border-color: #cf7a4e; color: #fff; }
.col-row {
  display: flex; gap: 10px; padding: 9px 10px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--panel); margin-bottom: 8px; align-items: center;
  cursor: pointer;
  /* 図鑑の高速化：画面外の行はレイアウトと描画を省略する（高さは実測 119px、
     auto で一度描いた行は実寸を覚える）。未対応ブラウザでは無視される。 */
  content-visibility: auto;
  contain-intrinsic-size: auto 119px;
}
.col-row .col-thumb { flex: none; line-height: 0; }
.col-row .col-main { flex: 1; min-width: 0; }
.col-row .col-title { font-size: 13.5px; font-weight: 600; line-height: 1.45; color: #4a1030; }
.col-row .col-sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.6; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.col-main { min-width: 0; }
/* 見出し・名前類の改行は行のバランスを取って、末尾1文字だけが落ちる形を防ぐ
   （例：お知らせ題の「す」落ち、図鑑の名前の「の」落ち。20261204-59） */
.col-title { font-size: 13.5px; font-weight: 600; line-height: 1.45; text-wrap: balance; }
.col-sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.6; }
.mylist-badge {
  display: inline-block; background: var(--panel2); border: 1px solid var(--line); color: var(--accent-dark);
  border-radius: 999px; padding: 2px 9px; font-size: 11px; font-weight: 700; margin-top: 4px;
}
.fav-star { color: #ffb300; }
.pack-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 5px; }
.pack-chips-label { font-size: 11px; color: var(--muted); }
.pack-mini-chip {
  border: 1px solid var(--line); background: var(--panel2); color: var(--accent-dark);
  border-radius: 999px; padding: 1px 8px; font-size: 11px; line-height: 1.5; white-space: nowrap;
}
.progress-line { display: flex; align-items: center; gap: 8px; font-size: 12.5px; margin: 5px 0; }
.progress-line .pl-name { width: 108px; flex: none; color: #5c4150; font-weight: 700; }
.progress-line .progress-bar { flex: 1; }
.progress-line .pl-num { width: 92px; flex: none; text-align: right; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.checker-row { display: flex; gap: 8px; }
.checker-row .text-input { flex: 1; width: auto; }
.checker-row .sub-btn { flex: none; }
#checkerResult, #checkerResultG { margin-top: 10px; font-size: 13.5px; line-height: 1.7; color: #5c4150; }
.save-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.save-code {
  width: 100%; background: #fff8fb; border: 1px solid var(--line); color: var(--muted);
  border-radius: 10px; padding: 8px; font-size: 11px; word-break: break-all; font-family: inherit; resize: vertical;
}
.save-msg { font-size: 12.5px; color: var(--accent-dark); margin-top: 6px; min-height: 16px; }

/* 推し（アイドル版：情報行＋ボタン行の2段カード） */
.shelf-card {
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel);
  padding: 9px 10px; margin-bottom: 8px; position: relative;
}
/* 誕生日アイコン（推しカード右上。当日だけ表示し、タップで本人のXプロフィールへ） */
.shelf-bday {
  position: absolute; top: 6px; right: 8px; z-index: 2;
  font-size: 21px; line-height: 1; text-decoration: none;
  padding: 2px; border-radius: 8px;
}
.shelf-bday:active { transform: scale(1.15); }
.shelf-main-row { display: flex; gap: 10px; align-items: center; cursor: pointer; min-width: 0; }
.shelf-main-row .col-thumb { flex: none; line-height: 0; }
.shelf-main-row .col-main { flex: 1; min-width: 0; }
.shelf-btn-row { display: flex; gap: 8px; margin-top: 8px; }
.shelf-btn-row .sub-btn, .shelf-btn-row .shelf-toggle { flex: 1; }

/* グループカード（アイドル版） */
.gc-poster {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px; margin-bottom: 10px; text-align: center;
  /* 図鑑の高速化：画面外のカードはレイアウトと描画を省略する（.col-row と同じ作法） */
  content-visibility: auto;
  contain-intrinsic-size: auto 300px;
}
.gc-poster.done { border-color: #e5c86b; background: linear-gradient(180deg, #fffdf2, #fff); }
.gc-kicker { font-size: 10.5px; font-weight: 800; letter-spacing: .12em; color: var(--muted); }
.gc-avatar { margin: 8px auto 4px; line-height: 0; display: flex; justify-content: center; }
.gc-name { font-size: 17px; font-weight: 900; color: #4a1030; line-height: 1.35; text-wrap: balance; }
.gc-count { font-size: 12.5px; color: #5c4150; margin-top: 3px; }
.gc-track { margin: 9px 0 4px; }
.gc-date { font-size: 11.5px; font-weight: 800; color: #8a6508; margin-top: 5px; }
.gc-members { font-size: 11.5px; color: var(--muted); line-height: 1.7; margin-top: 8px; }
.card-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.card-actions .action-btn { flex: none; }

/* マイページ（アイドル版） */
.mypage-hero { text-align: center; }
.fav-avatar { line-height: 0; display: flex; justify-content: center; }
.fav-kicker { font-size: 11px; font-weight: 800; letter-spacing: .1em; color: #8a6508; margin-top: 10px; }
.fav-name { font-size: 21px; font-weight: 900; color: #4a1030; margin-top: 3px; line-height: 1.35; text-wrap: balance; }
.fav-meta { font-size: 12.5px; color: var(--muted); margin-top: 5px; display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.fav-dup { font-size: 13px; font-weight: 700; color: #4a1030; margin-top: 7px; }
.fav-dup-title { color: #b8860b; }
.fav-dup-next { font-size: 11px; color: var(--muted); margin-top: 2px; }
.pr-event-note { font-weight: 700; color: #c2185b; }
.detail-pr { font-size: 12.5px; margin-top: 6px; text-align: center; min-height: 1em; }
.detail-pr.mine { color: #b8860b; font-weight: 800; }
.detail-pr.taken { color: var(--muted); }
.detail-pr.free { color: #c2185b; font-weight: 700; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.stat-cell { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-align: center; min-width: 0; }
.stat-num { font-size: 19px; font-weight: 900; color: #e91e63; line-height: 1.3; overflow-wrap: anywhere; }
.stat-label { font-size: 11px; color: var(--muted); font-weight: 700; margin-top: 2px; text-wrap: balance; }

/* 実績 */
.title-panel { display: flex; align-items: center; gap: 10px; }
.title-label { font-size: 12.5px; color: var(--muted); }
.title-current { font-size: 16px; font-weight: 800; color: #4a1030; }
.ach-cat { font-size: 14.5px; margin: 16px 0 8px; color: #7c1d4e; }
.ach-row {
  border: 1px solid var(--line); background: var(--panel); border-radius: 12px;
  padding: 11px 12px; margin-bottom: 8px;
}
.ach-row.done { border-color: #e5c86b; background: #fffdf4; }
.ach-head { display: flex; align-items: baseline; gap: 8px; }
.ach-name { font-size: 14px; font-weight: 700; color: #4a1030; }
.ach-reward { margin-left: auto; font-size: 12px; color: var(--gold); flex: none; font-weight: 700; }
.ach-progress { display: flex; align-items: center; gap: 8px; margin-top: 7px; }
.ach-progress .progress-bar { flex: 1; }
.ach-progress .ach-num { font-size: 11.5px; color: var(--muted); flex: none; }
.ach-title-btn { margin-top: 8px; }

/* シート（ニコニコ版の作り：不透明パネル＋固定ヘッダー＋内部スクロール） */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 70; background: rgba(96, 16, 68, .55);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  background: var(--panel); border: 1px solid var(--line); border-bottom: none;
  border-radius: 18px 18px 0 0; width: 100%; max-width: 640px;
  max-height: 86dvh; display: flex; flex-direction: column;
  padding-bottom: var(--safe-b);
}
.sheet-head {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line); flex: none;
}
.sheet-title { font-size: 16px; font-weight: 800; color: #4a1030; }
.sheet-points { margin-left: auto; color: var(--gold); font-weight: 700; font-size: 14px; white-space: nowrap; }
.sheet-body { overflow-y: auto; padding: 6px 16px 18px; min-height: 0; }
.sheet-section { font-size: 13px; color: var(--muted); margin: 16px 0 8px; letter-spacing: .06em; }
.sheet-note { font-size: 12px; color: var(--muted); margin-bottom: 10px; line-height: 1.6; }
.shop-row {
  display: flex; align-items: center; gap: 10px; border: 1px solid var(--line);
  background: var(--panel2); border-radius: 12px; padding: 11px 12px; margin-bottom: 8px;
}
.shop-main { flex: 1; min-width: 0; }
.shop-name { font-size: 14px; font-weight: 700; color: #4a1030; }
.shop-desc { font-size: 11.5px; color: var(--muted); margin-top: 2px; line-height: 1.55; }
.shop-btn {
  flex: none; border: 1px solid #ff5c8a; background: linear-gradient(135deg, #ff5c8a, #ff7eb6); color: #fff;
  font-weight: 800; border-radius: 10px; padding: 9px 12px; font-size: 13px; min-width: 96px;
  box-shadow: 0 3px 10px rgba(255, 92, 138, .3);
}
.shop-btn:disabled { background: #ffe9f2; color: var(--accent-dark); border-color: #ffc7da; cursor: not-allowed; box-shadow: none; }
.shop-btn.owned { background: #e0f4ee; color: #22755f; border-color: #9fd8c6; box-shadow: none; }

/* About・リクエストフォーム（アイドル版：＠付き入力欄） */
.req-form { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.req-input-wrap { position: relative; }
.req-at {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  font-size: 14px; font-weight: 800; color: var(--muted); pointer-events: none;
}
.req-input-wrap .text-input { padding-left: 32px; }
.req-notes { font-size: 11.5px; color: var(--muted); line-height: 1.7; padding-left: 18px; }
.req-group-note { color: #e60023; font-weight: 700; font-size: 14.5px; line-height: 1.6; margin: 10px 0 6px; }
.kind-row { display: flex; gap: 8px; flex-wrap: wrap; }
.kind-row .chip { flex: 1 1 40%; padding: 9px 11px; font-size: 13px; text-align: center; }
textarea.text-input { resize: vertical; line-height: 1.6; }
.contact-reply-row { display: flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.contact-reply-row input { width: 18px; height: 18px; accent-color: #ff5c8a; flex: none; }
.contact-email-note { font-size: 11.5px; color: var(--muted); line-height: 1.6; margin: -4px 0 0; }

/* グループコンプリート演出（アイドル版） */
.overlay.celeb { background: rgba(255, 214, 64, .25); }
.celeb-card {
  position: relative; background: linear-gradient(180deg, #fffde7, #fff);
  border: 3px solid #ffb300; border-radius: 22px; padding: 26px 22px;
  text-align: center; max-width: 420px; width: 100%;
  box-shadow: 0 24px 60px rgba(245, 127, 23, .4);
  animation: celebIn .45s cubic-bezier(.2, 1.6, .4, 1);
  max-height: 92dvh; overflow-y: auto;
}
@keyframes celebIn { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.celeb-pens { position: absolute; inset: 0; overflow: hidden; pointer-events: none; border-radius: 22px; }
.celeb-pen { position: absolute; bottom: 6px; width: 7px; height: 7px; border-radius: 50%; box-shadow: 0 0 8px 2px currentColor; animation: penWave 1.15s ease-in-out infinite alternate; }
.celeb-title { font-size: 13px; font-weight: 900; color: #f57f17; letter-spacing: .15em; margin-bottom: 10px; }
.celeb-close { width: 100%; margin-top: 12px; }
/* グループコンプリート演出：全員のアイコンが円形に並んでグルッと回り、回りながら
   中央へ集まって、カッと光ってグループのアイコンが現れる */
.celeb-stage { position: relative; width: min(300px, 76vw); aspect-ratio: 1; margin: 4px auto 2px; }
.celeb-ring { position: absolute; inset: 0; animation: celebSpin 2.2s linear infinite; will-change: transform; }
@keyframes celebSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.celeb-ring-shrink { position: absolute; inset: 0; transition: transform 1s ease-in, opacity 1s ease-in; }
.celeb-ring.converge .celeb-ring-shrink { transform: scale(.07); opacity: .15; }
.celeb-ring-item { position: absolute; transform: translate(-50%, -50%); line-height: 0; filter: drop-shadow(0 2px 5px rgba(173, 20, 87, .25)); }
.xa-ring { width: 100%; height: 100%; font-size: 20px; }
.celeb-flash {
  position: absolute; inset: -12%; border-radius: 50%; pointer-events: none; opacity: 0;
  background: radial-gradient(circle, rgba(255,255,255,.98) 0%, rgba(255,224,130,.85) 34%, rgba(255,214,90,0) 68%);
}
.celeb-stage.flash-on .celeb-flash { animation: celebFlash .55s ease-out; }
@keyframes celebFlash { 0% { opacity: 0; transform: scale(.4); } 25% { opacity: 1; } 100% { opacity: 0; transform: scale(1.25); } }
.celeb-group { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; animation: celebGroupIn .45s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes celebGroupIn { from { transform: translate(-50%, -50%) scale(.6); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
.celeb-gname { font-size: 19px; font-weight: 900; color: #4a1030; margin-top: 6px; line-height: 1.35; }
.xa-celeb { width: 104px; height: 104px; font-size: 42px; }
.celeb-actions { display: flex; gap: 8px; justify-content: center; align-items: stretch; flex-wrap: wrap; margin-top: 12px; }
.celeb-actions .celeb-close { width: auto; margin-top: 0; flex: 1; min-width: 110px; }
.celeb-actions .action-btn { flex: none; }

/* トースト・フッター・排出率 */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + 16px);
  transform: translateX(-50%); z-index: 90;
  background: #fff; color: #4a1030; font-weight: 700; font-size: 13.5px;
  border: 1px solid var(--line);
  border-radius: 999px; padding: 10px 18px; box-shadow: 0 6px 24px rgba(160, 40, 110, .3);
  max-width: calc(100vw - 32px); text-align: center; text-wrap: balance;
}
.site-footer { font-size: 11.5px; color: #b08aa0; line-height: 1.8; padding: 6px 2px 10px; text-align: center; }
/* 排出率パネル見出し：タップで開閉（デフォルトは畳んだ状態）。矢印で開閉状態を示す */
.rates-head { cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rates-head::after { content: "▾"; font-size: 13px; color: var(--muted); transition: transform .2s ease; }
.rates-head[aria-expanded="true"]::after { transform: rotate(180deg); }
.rates-head[aria-expanded="false"] { margin-bottom: 0; }
.rates-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rates-table td, .rates-table th { padding: 5px 4px; border-bottom: 1px solid var(--line); text-align: left; }
.rates-table td:last-child, .rates-table th:last-child { text-align: right; font-weight: 700; }

/* About内の画面テーマ切り替え（自動／ライト／ダークのチップ列） */
.theme-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.theme-row .chip { padding: 8px 16px; font-size: 13px; }

/* ===== ダークモード（html[data-theme="dark"] の時だけ効く。ライトの見た目は不変） =====
   土台は濃いグレー〜紺寄りのプラム色にし、ピンクの差し色はそのまま映える配色。
   ステージの中（幕・スポットライト・登場演出）は「暗い客席から見る明るい舞台」として
   場面の色を保ち、外枠だけ暗く締める */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1a0f1e;
  --panel: #271830;
  --panel2: #32203c;
  --line: #54365c;
  --text: #f7ecf3;
  --muted: #cda6bf;
  --accent: #ff5c8a;
  --accent-dark: #ff8fab;
  --gold: #ecb93f;
}
html[data-theme="dark"] body {
  background: linear-gradient(180deg, #1a0f1e 0%, #251329 55%, #170d1a 100%);
}
html[data-theme="dark"] .topbar { background: rgba(26, 14, 32, .92); }
html[data-theme="dark"] .tabbar { background: rgba(26, 14, 32, .95); }
html[data-theme="dark"] .tab-dot { box-shadow: 0 0 0 2px #1a0e20; }
html[data-theme="dark"] .panel p, html[data-theme="dark"] .panel li { color: #dec9d8; }
html[data-theme="dark"] .intro-text { color: #dec9d8; }
html[data-theme="dark"] .notice-title,
html[data-theme="dark"] .news-head,
html[data-theme="dark"] .news-item-title,
html[data-theme="dark"] .rc-title,
html[data-theme="dark"] .mini-card .mc-title,
html[data-theme="dark"] .detail-title,
html[data-theme="dark"] .col-row .col-title,
html[data-theme="dark"] .gc-name,
html[data-theme="dark"] .fav-name,
html[data-theme="dark"] .fav-dup,
html[data-theme="dark"] .title-current,
html[data-theme="dark"] .ach-name,
html[data-theme="dark"] .sheet-title,
html[data-theme="dark"] .shop-name,
html[data-theme="dark"] .toast,
html[data-theme="dark"] .top-sentence { color: #f9eef5; }
html[data-theme="dark"] .progress-line .pl-name,
html[data-theme="dark"] .gc-count,
html[data-theme="dark"] #checkerResult,
html[data-theme="dark"] #checkerResultG { color: #dec9d8; }
html[data-theme="dark"] .ach-cat { color: #ff8fab; }
html[data-theme="dark"] .fav-kicker,
html[data-theme="dark"] .fav-dup-title,
html[data-theme="dark"] .detail-pr.mine,
html[data-theme="dark"] .gc-date,
html[data-theme="dark"] .mini-card .mc-foll { color: #ecb93f; }
html[data-theme="dark"] .news-item { background: var(--panel2); }
html[data-theme="dark"] .save-code { background: #1d1122; }
html[data-theme="dark"] .mini-card .mc-thumb { background: #38223a; }
html[data-theme="dark"] .gc-poster.done { background: linear-gradient(180deg, #3d2c12, var(--panel)); }
html[data-theme="dark"] .ach-row.done { background: #342a16; }
html[data-theme="dark"] .toast { background: #32203c; }
html[data-theme="dark"] .progress-bar { background: #47263c; }
html[data-theme="dark"] .total-num { color: var(--accent); }
html[data-theme="dark"] .shop-btn:disabled { background: #3a2233; color: var(--muted); border-color: var(--line); }
html[data-theme="dark"] .shop-btn.owned { background: #14332a; color: #7fd8bd; border-color: #2c5a4a; }
html[data-theme="dark"] .stage {
  background: #160a1c; border-color: #5f2f4c;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .55);
}
html[data-theme="dark"] .summon-dock { background: linear-gradient(135deg, #38203c, #2a1626); border-color: #7a3d5c; }
html[data-theme="dark"] .summon-name { color: #f9eef5; }
html[data-theme="dark"] .summon-note { color: #cda6bf; }
html[data-theme="dark"] .summon-title { background: #32203c; }
html[data-theme="dark"] .summon-dismiss { background: #32203c; color: #ff8fab; }

@media (max-width: 560px) {
  .brand-ja { font-size: 15px; }
  .xa-result { width: 92px; height: 92px; font-size: 38px; }
  .result-card { padding: 10px 12px 12px; gap: 10px; }
  /* 5列グリッドをスマホ幅でも崩さないための圧縮 */
  .mini-grid { gap: 6px; }
  .mini-card .mc-body { padding: 4px 3px 5px; }
  .mini-card .tier-badge { font-size: 8px; padding: 1px 3px; }
  .mini-card .mc-title { font-size: 10.5px; }
  .mini-card .mc-group { font-size: 9.5px; }
  .mini-card .mc-foll { font-size: 9.5px; }
}

/* ===== 代表曲リスト＋その場プレイヤー＋お気に入りの曲（2026-12-04、?v=20261204-64） ===== */
.overlay.song-list-overlay { z-index: 65; }
.overlay.song-player-overlay { z-index: 66; }
.song-head { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 6px; }
.song-list-title { font-size: 17px; font-weight: 800; flex: 1; padding-top: 4px; }
.song-row { display: flex; align-items: stretch; gap: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 6px; background: var(--panel2); }
.song-row.origin { border-color: var(--accent); background: #ffeef4; box-shadow: 0 0 0 1px var(--accent) inset; }
.song-row-main { flex: 1; display: flex; gap: 10px; align-items: center; background: none; border: none; text-align: left; padding: 2px; color: var(--text); min-width: 0; }
.song-thumb { width: 104px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; flex: none; background: #000; }
.song-row-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.song-row-group { font-weight: 800; font-size: 13.5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.song-origin-tag { font-size: 10.5px; font-weight: 700; color: #fff; background: var(--accent); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.song-solo-tag { background: #7a4fd0; }
.song-row-title { font-size: 12.5px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.song-row-views { font-size: 11.5px; color: var(--muted); }
.song-fav-btn { flex: none; align-self: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: 19px; line-height: 1; padding: 0; }
.song-fav-btn.on { color: #ff0033; border-color: #ffb3cd; }
.song-fav-btn.player { align-self: flex-start; }
.song-player-names { flex: 1; min-width: 0; }
.song-player-group { font-weight: 800; font-size: 15px; }
.song-player-song { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.song-player-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; }
.song-player-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.song-player-blocked { padding: 18px 6px; text-align: center; }
.song-player-blocked p { font-size: 13.5px; margin-bottom: 12px; line-height: 1.6; }
/* 操作列は2段組：1段目に前／次ボタン、2段目に連続再生とループを中央へ。
   ループボタンの追加で1段に収まらなくなり、「連続再生」のラベルが
   1文字ずつ縦に割れてチェックが潰れ、「次の動画」が右端からはみ出した
   （実機 360〜390px）。ラベルには折り返し禁止と縮小禁止を入れて守る */
.song-player-controls { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.song-player-controls .sub-btn { flex: none; }
.song-autoplay { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; cursor: pointer; white-space: nowrap; flex: none; }
.song-autoplay input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.song-player-mid { display: inline-flex; align-items: center; justify-content: center; gap: 10px; order: 3; flex-basis: 100%; margin-top: 2px; }
.song-loop-btn { padding: 7px 11px; font-size: 13px; }
.fav-song-head { font-size: 15px; font-weight: 800; margin-bottom: 8px; }
/* ハートの色分け（2026-12-04、?v=20261204-70）：登録済みハートは付いている色で表示する */
.song-fav-btn.on.favc-pink { color: #ff5c8a; border-color: #ffc2d4; }
.song-fav-btn.on.favc-red { color: #ff0033; border-color: #ffb3cd; }
.song-fav-btn.on.favc-blue { color: #2f7bff; border-color: #bcd4ff; }
.song-fav-btn.on.favc-yellow { color: #f0a500; border-color: #ffe1a1; }
.song-fav-btn.on.favc-green { color: #1fb877; border-color: #a9e8cd; }
.song-fav-btn.on.favc-purple { color: #8e44ec; border-color: #ddc2ff; }
/* 色ピッカー：ハートの下に少しの間だけ出る小さなポップ（元のハートには被せない） */
.fav-color-pop { position: fixed; z-index: 95; display: flex; align-items: center; flex-wrap: wrap; gap: 2px; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 6px 8px 6px 12px; box-shadow: 0 8px 24px rgba(80, 10, 50, .28); max-width: calc(100vw - 16px); }
.fav-color-pop.hidden { display: none; }
.fav-pop-label { font-size: 11.5px; font-weight: 700; color: var(--muted); margin-right: 4px; white-space: nowrap; }
.fav-pop-dot { border: none; background: none; font-size: 22px; line-height: 1; padding: 4px; cursor: pointer; border-radius: 50%; }
/* 選択中の色の印：その色のリング＋ひと回り大きく */
.fav-pop-dot.sel { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px currentColor; transform: scale(1.12); }
/* ハートを押した瞬間に小さく弾む反応（押せたことを即座に返す） */
@keyframes favHeartBounce { 0% { transform: scale(1); } 35% { transform: scale(1.38); } 62% { transform: scale(.9); } 100% { transform: scale(1); } }
.song-fav-btn.fav-bounce { animation: favHeartBounce .45s ease; }
.fav-pop-dot.favc-pink { color: #ff5c8a; }
.fav-pop-dot.favc-red { color: #ff0033; }
.fav-pop-dot.favc-blue { color: #2f7bff; }
.fav-pop-dot.favc-yellow { color: #f0a500; }
.fav-pop-dot.favc-green { color: #1fb877; }
.fav-pop-dot.favc-purple { color: #8e44ec; }
.fav-pop-remove { border: 1px solid var(--line); background: var(--panel2); color: var(--muted); border-radius: 999px; font-size: 11.5px; font-weight: 700; padding: 6px 10px; margin-left: 4px; white-space: nowrap; cursor: pointer; }
/* マイページの色フィルタチップ（選択中はその色で塗る。階層フィルタと同じ流儀） */
.fav-color-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.fav-filter-chip .cnt { color: var(--muted); font-size: 11px; }
.fav-filter-chip.active .cnt { color: #ffe3ee; }
.fav-chip-heart.favc-pink { color: #ff5c8a; }
.fav-chip-heart.favc-red { color: #ff0033; }
.fav-chip-heart.favc-blue { color: #2f7bff; }
.fav-chip-heart.favc-yellow { color: #f0a500; }
.fav-chip-heart.favc-green { color: #1fb877; }
.fav-chip-heart.favc-purple { color: #8e44ec; }
.fav-color-filters .chip.active .fav-chip-heart { color: #fff; }
.fav-color-filters .chip.active[data-fav-filter="pink"] { background: #ff5c8a; border-color: #ff5c8a; }
.fav-color-filters .chip.active[data-fav-filter="red"] { background: #ff0033; border-color: #ff0033; }
.fav-color-filters .chip.active[data-fav-filter="blue"] { background: #2f7bff; border-color: #2f7bff; }
.fav-color-filters .chip.active[data-fav-filter="yellow"] { background: #f0a500; border-color: #f0a500; }
.fav-color-filters .chip.active[data-fav-filter="green"] { background: #1fb877; border-color: #1fb877; }
.fav-color-filters .chip.active[data-fav-filter="purple"] { background: #8e44ec; border-color: #8e44ec; }
html[data-theme="dark"] .song-row.origin { background: #3d1626; }

/* 相互誘導チップ（アイドル人生スロット）：ヘッダー右上の小さなボタン状バナー */
.xpromo-chip {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  text-decoration: none; color: #fff; font-weight: 800; font-size: 12.5px; white-space: nowrap;
  background: linear-gradient(135deg, #ff5c8a, #ff9f43);
  border-radius: 999px; padding: 4px 12px 4px 4px;
  box-shadow: 0 2px 8px rgba(255, 92, 138, .35);
}
.xpromo-chip img { width: 34px; height: 21px; object-fit: cover; border-radius: 999px; display: block; }
@media (max-width: 620px) {
  .xpromo-chip { padding: 4px; }
  .xpromo-chip span { display: none; }
  .xpromo-chip img { width: 40px; height: 25px; }
}
/* リリースお知らせポップアップの「遊んでみる」リンク */
/* <a> はボタンのように文字が中央寄せにならないため、ポップアップ内の
   ボタン類は flex で上下左右中央にそろえる（「閉じる」側も同じ） */
#slotRelOverlay .pull-btn { display: flex; align-items: center; justify-content: center; text-align: center; }
#slotRelPlay { text-decoration: none; }
