/* ボカロ年代診断：架空のレトロゲーム機「VOCALO ROM」 */
:root {
  --plastic: #e9e2d0;
  --plastic-d: #cfc6ae;
  --ink: #1b1530;
  --scr: #10122a;
  --scr-2: #1c2050;
  --glow: #f6f0dc;
  --dim: #8f92c8;
  --red: #e5394f;
  --blue: #2f6fe0;
  --yellow: #ffcf33;
  --teal: #3cc8bd;
  --pink: #ff7aa8;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background-color: #d8d0ba;
  background-image: radial-gradient(rgba(27, 21, 48, .13) 1px, transparent 1.4px);
  background-size: 6px 6px;
  color: var(--ink);
  font-family: "DotGothic16", monospace;
}
button { font: inherit; color: inherit; }
canvas.sprite { image-rendering: pixelated; display: block; }

/* ===== 本体 ===== */
.console {
  max-width: 460px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--plastic);
  padding: 22px 14px 26px;
  box-shadow: inset 0 -6px 0 var(--plastic-d), 0 0 0 3px var(--ink);
  position: relative;
}
@media (min-width: 520px) {
  .console { margin: 28px auto; min-height: 0; border-radius: 18px 18px 40px 40px; }
}
.bezel-top { display: flex; align-items: center; gap: 12px; padding: 0 4px 12px; }
.brand { font-family: "DotGothic16", monospace; font-size: 17px; letter-spacing: .02em; }
.brand b { color: var(--red); margin-left: 2px; font-weight: 400; }
.power { font-family: "Press Start 2P"; font-size: 7px; display: flex; align-items: center; gap: 6px; color: #6d6552; margin-left: auto; }
.power i { width: 8px; height: 8px; background: #5a1a22; box-shadow: 0 0 0 2px var(--ink); }
.power i.on { background: var(--red); box-shadow: 0 0 0 2px var(--ink), 0 0 8px var(--red); }
.snd { font-family: "Press Start 2P"; font-size: 7px; background: var(--plastic-d); border: 0; padding: 6px 7px; box-shadow: 0 0 0 2px var(--ink); cursor: pointer; }
.snd[aria-pressed="true"] { background: var(--yellow); }

/* ===== ブラウン管 ===== */
.crt {
  background: #2b2a33;
  padding: 14px;
  border-radius: 10px;
  box-shadow: inset 0 0 0 3px var(--ink), inset 0 6px 0 #45434f;
}
.crt-in {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  display: flex; flex-direction: column;
  background: radial-gradient(120% 90% at 50% 40%, var(--scr-2), var(--scr) 70%);
  color: var(--glow);
  border-radius: 18px / 14px;
  padding: 18px 16px 20px;
  box-shadow: 0 0 0 3px var(--ink);
}
.crt-in::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.22) 0 1px, transparent 1px 3px);
  z-index: 5;
}
.crt-in.boot { animation: boot .7s steps(6) both; }
@keyframes boot {
  0% { clip-path: inset(49.5% 0 49.5% 0); filter: brightness(3); }
  45% { clip-path: inset(49.5% 0 49.5% 0); filter: brightness(3); }
  100% { clip-path: inset(0 0 0 0); filter: none; }
}

.screen { display: none; }
.screen.on { display: flex; flex-direction: column; flex: 1; animation: flick .28s steps(3); }
@keyframes flick { 0% { opacity: 0; transform: translateX(-3px); } 50% { opacity: .6; transform: translateX(2px); } }
.tiny { font-family: "Press Start 2P", monospace; font-size: 8px; letter-spacing: .08em; color: var(--dim); margin: 0; }
.blink { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* タイトル */
.logo { margin: 26px 0 12px; line-height: 1; font-weight: 400; }
.logo span { display: block; }
.l1 { font-size: 26px; color: var(--teal); margin-left: 4px; }
.l2 {
  font-size: 56px; color: var(--yellow); letter-spacing: -.02em;
  text-shadow: 3px 0 0 var(--red), 0 4px 0 var(--ink), 3px 4px 0 var(--ink);
  transform: skewX(-6deg); transform-origin: left;
}
.type { min-height: 4.4em; font-size: 15px; line-height: 1.75; margin: 22px 0 8px; }
.type::after { content: "▌"; animation: blink .6s steps(1) infinite; color: var(--teal); }
.type.done::after { content: ""; }
.parade { margin: 14px -16px 6px; height: 84px; overflow: hidden; }
.parade-belt { display: flex; align-items: flex-end; width: max-content; animation: march 14s steps(140) infinite; }
.parade .sprite { margin: 0 -4px; animation: hop .5s steps(2) infinite; }
.parade .sprite:nth-child(2n) { animation-delay: -.25s; }
@keyframes march { to { transform: translateX(-50%); } }
@keyframes hop { 50% { transform: translateY(-4px); } }
.start-hint { font-size: 15px; color: var(--yellow); text-align: center; margin: 12px 0 0; }

/* 質問 */
.hud { display: flex; justify-content: space-between; margin-bottom: 18px; }
.q-text { font-size: 18px; margin: 0 0 18px; }

/* カートリッジ（曲） */
.cart {
  position: relative;
  width: 88%;
  margin: 6px auto 22px;
  background: #8e8ba0;
  padding: 18px 14px 26px;
  clip-path: polygon(0 10px, 10px 10px, 10px 0, calc(100% - 10px) 0, calc(100% - 10px) 10px, 100% 10px, 100% 100%, 0 100%);
  box-shadow: inset 0 -10px 0 #6d6a82, inset 6px 0 0 #a9a6ba;
}
.cart::before {
  content: ""; position: absolute; left: 18%; right: 18%; top: 6px; height: 4px;
  background: repeating-linear-gradient(90deg, #5e5b72 0 6px, transparent 6px 10px);
}
.cart-label {
  display: block;
  background: var(--glow);
  color: var(--ink);
  padding: 14px 12px 12px;
  box-shadow: 0 0 0 3px var(--ink);
}
.cart-label .stripe { display: flex; height: 6px; margin: -14px -12px 10px; }
.cart-label .stripe i { flex: 1; }
.c-title { font-size: 25px; word-break: keep-all; overflow-wrap: anywhere; line-height: 1.25; margin: 0 0 6px; word-break: break-word; }
.c-p { font-size: 13px; margin: 0; color: #5a5480; }
.cart.in { animation: insert .35s steps(4) both; }
@keyframes insert { from { transform: translateY(-40px); } }
.cart.spin { width: 120px; margin: 120px auto 22px; animation: wobble .5s steps(2) infinite; }
.cart.spin .cart-label { font-family: "Press Start 2P"; font-size: 8px; text-align: center; padding: 10px 4px; }
@keyframes wobble { 50% { transform: rotate(6deg) translateY(-3px); } }
#s-load { text-align: center; }

/* キャラ選択・メニュー */
.select { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 2px; margin-top: 2px; }
.select button:nth-child(3n+2) { transform: translateY(14px); }
.select button:last-child { grid-column: 2; }
.select button {
  background: none; border: 0; padding: 4px 0 6px; cursor: pointer; color: var(--glow);
  display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; line-height: 1.25;
}
.select .duo { display: flex; }
.select .duo .sprite + .sprite { margin-left: -22px; }
.select button:hover, .select button:focus-visible { outline: none; background: rgba(255,255,255,.08); }
.select button:hover .sprite, .select button:focus-visible .sprite { animation: hop .4s steps(2) infinite; }
.menu { list-style: none; padding: 0; margin: 6px 0 0; }
.menu button {
  width: 100%; text-align: left; background: none; border: 0; padding: 12px 6px 12px 28px;
  font-size: 18px; color: var(--glow); cursor: pointer; position: relative;
}
.menu button:hover::before, .menu button:focus-visible::before { content: "▶"; position: absolute; left: 6px; color: var(--yellow); animation: blink .5s steps(1) infinite; }
.menu button:focus-visible { outline: none; }

/* 進みぐあい */
.track {
  position: relative; height: 34px; margin-top: auto;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.2) 0 6px, transparent 6px 12px) 0 100% / 100% 2px no-repeat;
}
.track i { position: absolute; bottom: 2px; left: 0; transition: left .3s steps(4); }
.track::after { content: "GOAL"; position: absolute; right: 0; bottom: 6px; font-family: "Press Start 2P"; font-size: 7px; color: var(--yellow); }

/* 結果 */
#s-result h3 { font-size: 15px; font-weight: 400; color: var(--teal); margin: 30px 0 8px; }
.r-you { margin: 14px 0 0; font-size: 14px; color: var(--dim); }
.r-era {
  font-size: 30px; line-height: 1.3; font-weight: 400; margin: 2px 0 12px; color: var(--yellow);
  word-break: keep-all; text-shadow: 3px 3px 0 var(--red);
}
.r-hero { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: end; }
.r-oshi { animation: hop .7s steps(2) infinite; }
.r-stats { margin: 0; background: var(--glow); color: var(--ink); padding: 10px 12px; box-shadow: 4px 4px 0 var(--red); }
.r-stats dt { font-size: 11px; color: #5a5480; }
.r-stats dd { margin: 0 0 6px; font-size: 21px; white-space: nowrap; }
.r-stats dd:last-child { margin: 0; }
.songs { list-style: none; padding: 0; margin: 0; counter-reset: n; }
.songs li a {
  display: grid; grid-template-columns: 2.2em 1fr auto; align-items: center; gap: 0 4px;
  color: var(--glow); text-decoration: none; padding: 9px 0;
  border-bottom: 2px dotted rgba(255,255,255,.22);
  counter-increment: n;
}
.songs li a::before { content: counter(n, decimal-leading-zero); font-family: "Press Start 2P"; font-size: 9px; color: var(--dim); grid-row: 1 / 3; }
.songs li b { font-weight: 400; font-size: 16px; }
.songs li span { grid-column: 2; font-size: 12px; color: var(--dim); }
.songs li em { grid-column: 3; grid-row: 1 / 3; font-style: normal; font-size: 13px; color: var(--pink); }
.songs li a:hover b { color: var(--yellow); }
.songs.mini li b { font-size: 14px; }
.share { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.moods { display: flex; flex-wrap: wrap; gap: 6px; }
.moods button { background: none; border: 0; box-shadow: inset 0 0 0 2px var(--dim); color: var(--glow); padding: 6px 10px; cursor: pointer; font-size: 14px; }
.moods button.sel { background: var(--yellow); color: var(--ink); box-shadow: none; }
.check label { display: block; margin: 10px 0; font-size: 14px; }
.check input { width: 4.2em; font: inherit; font-size: 17px; padding: 3px 6px; border: 0; background: var(--glow); color: var(--ink); }
.note { font-size: 12px; color: var(--dim); line-height: 1.6; }
.credit { margin-top: 30px; font-size: 10px; line-height: 1.6; color: var(--dim); font-family: sans-serif; }
.credit a { color: var(--dim); }

/* 画面の中のボタン */
.key {
  display: inline-block; background: var(--glow); color: var(--ink); border: 0; cursor: pointer;
  padding: 10px 14px; font-size: 14px; text-decoration: none; box-shadow: 4px 4px 0 var(--blue);
}
.key:active { transform: translate(4px, 4px); box-shadow: none; }
.key.ghost { background: none; color: var(--yellow); box-shadow: inset 0 0 0 2px var(--yellow); margin-top: 30px; }

/* ===== 本体のボタン ===== */
.pad { padding: 22px 6px 0; }
.pad-start { display: flex; justify-content: center; padding: 8px 0 4px; }
.pill {
  font-family: "Press Start 2P"; font-size: 12px; letter-spacing: .1em;
  background: #4a4756; color: var(--glow); border: 0; padding: 12px 26px; border-radius: 30px; cursor: pointer;
  box-shadow: 0 0 0 3px var(--ink), 0 5px 0 3px var(--ink);
}
.pill:active { box-shadow: 0 0 0 3px var(--ink); transform: translateY(5px); }
.pad-ans { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; align-items: start; }
.hw { background: none; border: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0; }
.hw b {
  width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center;
  font-size: 26px; font-weight: 400; color: #fff;
  box-shadow: 0 0 0 3px var(--ink), 0 6px 0 3px var(--ink), inset -5px -6px 0 rgba(0,0,0,.18);
  transition: transform .05s;
}
.hw span { font-size: 14px; }
.hw.like b { background: var(--red); }
.hw.know { margin-top: 18px; }
.hw.know b { background: var(--blue); }
.hw.unknown b { background: #8f8a7a; }
.hw:active b, .hw.pressed b { transform: translateY(6px); box-shadow: 0 0 0 3px var(--ink), inset -5px -6px 0 rgba(0,0,0,.18); }
.back { display: block; margin: 16px auto 0; background: none; border: 0; color: #6d6552; font-size: 14px; cursor: pointer; padding: 6px; }
.back:hover { color: var(--ink); }

/* ===== ギミックと飾り（2回目） ===== */
.screw { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--plastic-d); box-shadow: inset 0 0 0 2px #8f8670; }
.screw::after { content: ""; position: absolute; left: 2px; right: 2px; top: 4px; height: 2px; background: #8f8670; transform: rotate(35deg); }
.s1 { left: 6px; top: 6px; } .s2 { right: 6px; top: 6px; } .s3 { left: 6px; bottom: 6px; } .s4 { right: 6px; bottom: 6px; }

.slot { height: 34px; margin: 0 22% 10px; position: relative; background: #3b3945; box-shadow: inset 0 0 0 3px var(--ink), inset 0 8px 0 #24232b; }
.slot-cart {
  position: absolute; left: 10%; right: 10%; bottom: 8px; height: 44px;
  background: #8e8ba0; box-shadow: 0 0 0 3px var(--ink), inset 0 6px 0 #a9a6ba;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: transform .2s steps(3);
}
.slot-cart span { background: var(--glow); font-family: "Press Start 2P"; font-size: 6px; line-height: 1.5; padding: 4px 6px; text-align: center; box-shadow: 0 0 0 2px var(--ink); }
.slot-cart small { font-size: 5px; color: #5a5480; }
.slot-cart.pull { transform: translateY(-8px); }
#slot-item canvas { display: block; }

.fx { position: absolute; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.fx.top { z-index: 4; }
.screen { position: relative; z-index: 2; }
.fx canvas { position: absolute; image-rendering: pixelated; }
.fx-float { bottom: -40px; opacity: .45; animation: float-up 6s steps(36) forwards; }
@keyframes float-up { to { transform: translate(var(--sway), -560px); opacity: 0; } }
.fx-burst { z-index: 3; animation: burst .75s steps(8) forwards; margin: -15px 0 0 -15px; }
@keyframes burst { to { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 0; } }
.fx-rain { top: -40px; animation: rain 2s steps(20) forwards; }
@keyframes rain { to { transform: translateY(620px) rotate(var(--rot)); } }

/* 起動画面 */
#s-boot { align-items: center; justify-content: center; text-align: center; cursor: pointer; }
.boot-logo { font-family: "DotGothic16"; font-size: 24px; margin: 0 0 18px; line-height: 1.4; }
.boot-logo span { color: var(--glow); }
.boot-logo b { color: var(--red); font-weight: 400; display: block; font-size: 44px; animation: rgb .5s steps(2) 3; }
@keyframes rgb { 50% { text-shadow: -3px 0 var(--teal), 3px 0 var(--yellow); } }
.boot-line { min-height: 3em; line-height: 2; white-space: pre-line; }
.boot-skip { position: absolute; bottom: 4px; left: 0; right: 0; opacity: .5; }

/* タイトルの星と床 */
.star { position: absolute; width: 3px; height: 3px; background: var(--glow); z-index: 0; animation: twinkle 1.8s steps(1) infinite; }
.star.big { width: 3px; height: 3px; box-shadow: 0 -3px 0 var(--glow), 0 3px 0 var(--glow), -3px 0 0 var(--glow), 3px 0 0 var(--glow); }
@keyframes twinkle { 50% { opacity: .15; } }
#s-title { position: relative; }
.stage { position: relative; margin: 6px -16px 0; height: 120px; }
.floor {
  position: absolute; left: -20%; right: -20%; bottom: -6px; height: 70px;
  background:
    repeating-linear-gradient(90deg, rgba(60,200,189,.55) 0 2px, transparent 2px 34px),
    repeating-linear-gradient(0deg, rgba(60,200,189,.55) 0 2px, transparent 2px 14px);
  transform: perspective(120px) rotateX(55deg);
  transform-origin: bottom;
  animation: floor 1s steps(7) infinite;
  -webkit-mask-image: linear-gradient(to top, #000 40%, transparent);
          mask-image: linear-gradient(to top, #000 40%, transparent);
}
@keyframes floor { to { background-position: 0 0, 0 14px; } }
.stage .parade { position: absolute; left: 0; right: 0; bottom: 18px; margin: 0; }
.parade .sprite { cursor: pointer; pointer-events: auto; }
.parade .sprite.jump { animation: jump .5s steps(5) !important; }
@keyframes jump { 40% { transform: translateY(-26px); } }
.hint { text-align: center; margin-top: 4px; }

/* 質問中：ラベルのすみのアイテムシール */
.cart-label { position: relative; }
.cart-label .sticker { position: absolute; right: -10px; bottom: -12px; transform: rotate(12deg); filter: drop-shadow(2px 2px 0 var(--ink)); }
.track i { display: flex; align-items: flex-end; gap: 2px; }

/* 結果：推しのまわりのアイテム */
.r-oshi { position: relative; }
.r-oshi .orbit { position: absolute; animation: orbit 1.2s steps(4) infinite; }
.r-oshi .orbit.a { left: -14px; top: 6px; }
.r-oshi .orbit.b { right: -14px; top: 24px; animation-delay: -.6s; }
@keyframes orbit { 50% { transform: translateY(-8px) rotate(-15deg); } }

/* 本体の下 */
.foot { display: flex; align-items: center; gap: 14px; margin-top: 26px; padding: 0 6px; }
.vents { display: flex; flex-direction: column; gap: 4px; }
.vents i { display: block; width: 54px; height: 4px; background: var(--plastic-d); box-shadow: inset 0 2px 0 #b1a88f; }
.model { font-family: "Press Start 2P"; font-size: 6px; line-height: 1.8; color: #8f8670; margin: 0; }
.model b { font-weight: 400; color: #6d6552; font-size: 8px; }
.speaker {
  margin-left: auto; width: 56px; height: 40px;
  background: radial-gradient(#8f8670 2px, transparent 2.5px) 0 0 / 8px 8px;
}

/* ===== スマホで1画面に収める（結果画面だけスクロール） ===== */
html, body { height: 100%; }
body:not(.scroll) { overflow: hidden; }
.console { display: flex; flex-direction: column; height: 100dvh; min-height: 0; }
body.scroll .console { height: auto; min-height: 100dvh; }
.crt { flex: 1; min-height: 0; display: flex; }
body.scroll .crt { flex: none; }
.crt-in { flex: 1; min-height: 0; }
body.scroll .crt-in { min-height: 420px; }
.pad, .foot, .bezel-top { flex: none; }
@media (min-width: 520px) {
  .console { height: min(880px, calc(100dvh - 56px)); }
  body.scroll .console { height: auto; min-height: 0; }
  body:not(.scroll) { overflow: auto; }
}
@media (max-height: 720px) {
  .foot { display: none; }
  .l2 { font-size: 46px; }
  .logo { margin-top: 14px; }
  .type { margin: 14px 0 4px; min-height: 3.6em; }
  .pad { padding-top: 14px; }
  .hw b { width: 58px; height: 58px; }
  .cart { margin-bottom: 12px; }
}

/* ジャンプしても頭が切れないように、上に余白 */
.stage { height: 150px; }
.parade { height: 130px !important; display: flex; align-items: flex-end; }
.parade-belt { align-items: flex-end; }

/* 「下のボタンを押してね」の案内（ボタンには見えないように） */
.start-hint { font-family: "DotGothic16"; font-size: 14px; color: var(--dim); margin: 8px 0 0; }
.start-hint b { color: var(--yellow); font-weight: 400; display: inline-block; animation: nudge .8s steps(2) infinite; }
@keyframes nudge { 50% { transform: translateY(4px); } }

/* シェア */
.share { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 8px; }
.share .key { text-align: center; padding: 10px 4px; font-size: 13px; }
.share .key.x { box-shadow: 4px 4px 0 #000; }
.share .key.ig { box-shadow: 4px 4px 0 var(--pink); }
.share .key.th { box-shadow: 4px 4px 0 #555; }
.share .key.line { box-shadow: 4px 4px 0 #06c755; }
.share .key.fb { box-shadow: 4px 4px 0 #1877f2; }
.share .key.save { box-shadow: 4px 4px 0 var(--yellow); }
.share-preview { margin-top: 16px; }
.share-preview img { width: 100%; display: block; box-shadow: 0 0 0 3px var(--ink); image-rendering: pixelated; }
.share-note { font-size: 11px; color: var(--dim); margin: 8px 0 0; }

/* 音ボタン：鳴っているときは音符が動く */
.snd[aria-pressed="true"] { animation: bob .5s steps(2) infinite; }
@keyframes bob { 50% { transform: translateY(-2px); } }

/* Xのシェアは一番大きく */
.x-big {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 4px 0 14px; padding: 16px 10px; font-size: 19px; text-decoration: none;
  background: #000; color: #fff; box-shadow: 5px 5px 0 var(--yellow);
}
.x-big b { font-size: 24px; font-weight: 400; font-family: sans-serif; }
.x-big:active { transform: translate(5px, 5px); box-shadow: none; }

/* ゲームのセリフ窓 */
.logo { margin-bottom: 0; }
.msg {
  position: relative; margin: 10px 0 0; min-height: 104px;
  background: #0b0c1f; color: var(--glow);
  box-shadow: 0 0 0 3px var(--glow), 0 0 0 6px var(--ink), 0 0 0 9px var(--glow);
  padding: 12px 14px 14px 76px; cursor: pointer;
}
.msg-face { position: absolute; left: 10px; top: 12px; width: 56px; height: 66px; overflow: hidden; background: #1c2050; box-shadow: 0 0 0 2px var(--dim); }
.msg-face canvas { margin: -2px 0 0 -2px; }
.msg-name { position: absolute; left: 66px; top: -14px; margin: 0; background: var(--yellow); color: var(--ink); font-size: 13px; padding: 2px 10px; box-shadow: 0 0 0 3px var(--ink); }
.msg-text { margin: 6px 0 0; font-size: 15px; line-height: 1.6; min-height: 3.2em; }
.msg-next { position: absolute; right: 10px; bottom: 6px; font-style: normal; color: var(--yellow); font-size: 12px; animation: nudge .6s steps(2) infinite; }
.msg.typing .msg-next { visibility: hidden; }
.stage { height: 140px; }
@media (max-height: 720px) { .msg { min-height: 92px; } .msg-text { font-size: 14px; } .stage { height: 124px; } }
#s-title.on { justify-content: center; gap: 6px; }

/* とちゅうのひとこと（キャラのつぶやき） */
.tip { display: flex; align-items: center; gap: 8px; margin: 4px 0 8px; min-height: 44px; }
.tip-face { flex: none; width: 34px; height: 40px; overflow: hidden; background: #1c2050; box-shadow: 0 0 0 2px var(--dim); }
.tip-face canvas { margin: -1px 0 0 -3px; }
.tip p {
  position: relative; flex: 1; margin: 0; padding: 7px 10px; font-size: 13px; line-height: 1.45;
  background: var(--glow); color: var(--ink); box-shadow: 0 0 0 2px var(--ink), 3px 3px 0 2px var(--red);
}
.tip p::before { content: ""; position: absolute; left: -8px; top: 50%; margin-top: -5px; border: 5px solid transparent; border-right: 4px solid var(--glow); }

/* いまの予想メーター（色は6つの世代） */
.meter { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 12px; color: var(--dim); }
.m-label { flex: none; }
.m-bar { position: relative; flex: 1; display: flex; height: 8px; margin-top: 10px; box-shadow: 0 0 0 2px var(--ink); }
.m-bar i { display: block; }
.m-bar i:nth-child(1) { flex: 3; background: #e5394f; }
.m-bar i:nth-child(2) { flex: 2; background: #ff7aa8; }
.m-bar i:nth-child(3) { flex: 3; background: #ffcf33; }
.m-bar i:nth-child(4) { flex: 4; background: #3cc8bd; }
.m-bar i:nth-child(5) { flex: 4; background: #2f6fe0; }
.m-bar i:nth-child(6) { flex: 5; background: #b07cff; }
.m-bar b { position: absolute; top: -15px; margin-left: -6px; font-weight: 400; font-size: 12px; color: var(--glow); transition: left .5s steps(5); }
.m-year { flex: none; min-width: 6.2em; text-align: right; color: var(--yellow); }
.meter.unknown .m-bar b { left: 50%; animation: wander 1.2s steps(6) infinite; }
.meter.unknown .m-year { color: var(--dim); }
@keyframes wander { 0%,100% { left: 15%; } 50% { left: 85%; } }
.meter.jump .m-year, .meter.jump .m-bar b { animation: flash .18s steps(1) 4; }
@keyframes flash { 50% { color: var(--red); } }

/* 結果：年齢の注意書きと、種明かし */
.r-note { font-size: 12px; color: var(--dim); margin: 10px 0 0; line-height: 1.6; }
.why { list-style: none; padding: 0; margin: 0; counter-reset: why; }
.why li { counter-increment: why; position: relative; padding: 10px 0 10px 40px; border-bottom: 2px dotted rgba(255,255,255,.18); }
.why li::before {
  content: counter(why, decimal-leading-zero); position: absolute; left: 0; top: 12px;
  font-family: "Press Start 2P"; font-size: 11px; color: var(--yellow);
}
.why b { display: block; font-weight: 400; font-size: 15px; color: var(--glow); }
.why span { display: block; font-size: 12px; color: var(--dim); margin-top: 3px; line-height: 1.6; }

@media (max-height: 720px) {
  .tip { min-height: 38px; margin: 0 0 4px; }
  .tip p { font-size: 12px; padding: 5px 8px; }
  .menu button { padding: 9px 6px 9px 28px; font-size: 16px; }
  .q-text { margin-bottom: 10px; }
  .hud { margin-bottom: 10px; }
}

/* 結果：二人組の推しは並べる（少し重ねる） */
.r-oshi { display: flex; align-items: flex-end; }
.r-oshi.duo .sprite + .sprite { margin-left: -8px; }
