/* うちの子、人間なら何歳？：ゲーム固有のスタイル（色はCSS変数のみ。毛色だけは選んだ色をSVGに直接指定） */
:root {
  --pj-eye: #2b2118;
  --pj-eye-light: #f2e6c8;
  --pj-hl: #ffffff;
  --pj-nose: #5a3a2e;
  --pj-whisker: #7a6a5a;
  --pj-cheek: #f2a3a3;
  --pj-ear-in: #f2b8b8;
  --pj-muzzle: #fbf3e6;
  --pj-haru: #f4a7b9;
  --pj-natsu: #4fb6d9;
  --pj-aki: #e0913f;
  --pj-fuyu: #a9b8cf;
  --pj-memory: #6b6185;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --pj-haru: #d98ba0; --pj-natsu: #3f97b6; --pj-aki: #c47a30; --pj-fuyu: #7f8ea6; --pj-memory: #a99ccf; }
}
:root[data-theme="dark"] { --pj-haru: #d98ba0; --pj-natsu: #3f97b6; --pj-aki: #c47a30; --pj-fuyu: #7f8ea6; --pj-memory: #a99ccf; }

.pj-hero { padding: 12px 0 4px; }
.pj-hero h1 em { font-style: normal; color: var(--accent); }
.pj-hero-pets { display: flex; justify-content: center; gap: 4px; margin: 8px 0; }
.pj-hero-pets .pj-pet { width: 92px; }
.pj-hero-pets .pj-pet:nth-child(2) { width: 110px; animation-delay: .4s; }
.pj-start { margin: 12px 0 10px; }
.pj-memory-btn { margin-bottom: 16px; white-space: normal; }
.pj-list { margin: 6px 0 0; padding-left: 1.2em; }
.pj-list li + li { margin-top: 4px; }
.pj-friend { border-color: var(--accent); background: var(--accent-soft); }
.pj-daily .btn { white-space: normal; }
.pj-disclaimer { font-size: 11px; color: var(--text-sub); background: var(--surface-2); border-radius: var(--radius-sm); padding: 8px 10px; margin: 16px 0 0; line-height: 1.6; }

/* うちの子SVG */
.pj-pet { width: 120px; height: auto; display: inline-block; }
.pj-pet-g { transform-origin: 60px 100px; animation: pj-sway 3.2s ease-in-out infinite; }
@keyframes pj-sway { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }
.pj-pet-sm { width: 52px; flex: none; }
.pj-pet-sm .pj-pet-g { animation: none; }
.pj-eye { fill: var(--pj-eye); }
.pj-eye-light { fill: var(--pj-eye-light); }
.pj-eye-hl { fill: var(--pj-hl); }
.pj-nose { fill: var(--pj-nose); }
.pj-mouth { stroke: var(--pj-nose); stroke-width: 2; stroke-linecap: round; }
.pj-whisker { stroke: var(--pj-whisker); stroke-width: 1.5; stroke-linecap: round; }
.pj-cheek { fill: var(--pj-cheek); opacity: .7; }
.pj-ear-in { fill: var(--pj-ear-in); }
.pj-muzzle { fill: var(--pj-muzzle); }

/* 入力 */
.pj-q { font-size: 20px; margin: 12px 0 6px; }
.pj-kind-row { display: flex; align-items: center; gap: 12px; }
.pj-preview { display: flex; justify-content: center; }
.pj-preview .pj-pet { width: 130px; }
.pj-step input[type="text"] { width: 100%; max-width: 280px; margin: 8px auto 12px; display: block; text-align: center; font-size: 18px; }
.pj-swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pj-swatch { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); cursor: pointer; font: inherit; }
.pj-swatch.is-on { border-color: var(--accent); background: var(--accent-soft); }
.pj-swatch-dot { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); display: block; }
.pj-val { font-size: clamp(34px, 10vw, 48px); font-weight: 900; color: var(--accent); line-height: 1.2; font-variant-numeric: tabular-nums; }
.pj-ym { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.pj-stepper { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 4px; }
.pj-stepper .btn { font-size: 22px; padding: 8px 0; }
.pj-hint { margin-top: 10px; font-weight: 800; color: var(--text); }
.pj-next { margin-top: 14px; }

/* 演出 */
.pj-count { font-size: clamp(44px, 14vw, 68px); font-weight: 900; color: var(--accent); font-variant-numeric: tabular-nums; line-height: 1.15; }

/* 結果 */
.pj-result-card.is-memory { border: 2px solid var(--pj-memory); }
.pj-big { font-size: 22px; font-weight: 800; }
.pj-big b { font-size: clamp(48px, 15vw, 72px); font-weight: 900; color: var(--accent); line-height: 1.1; font-variant-numeric: tabular-nums; }
.pj-line1 { font-weight: 800; font-size: 17px; margin: 6px 0; }
.pj-stage { display: flex; align-items: center; gap: 10px; justify-content: center; text-align: left; background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 12px; margin-top: 8px; }
.pj-stage b { font-size: 20px; }
.pj-stage-emoji { font-size: 34px; }
.pj-seasons { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; max-width: 360px; margin: 6px auto 0; }
.pj-seasons i { display: block; aspect-ratio: 1 / 1; border-radius: 50%; animation: pj-pop .35s ease both; }
@keyframes pj-pop { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: none; } }
.pj-s-haru { background: var(--pj-haru); } .pj-s-natsu { background: var(--pj-natsu); } .pj-s-aki { background: var(--pj-aki); } .pj-s-fuyu { background: var(--pj-fuyu); }
.pj-season-key { display: flex; justify-content: center; align-items: center; gap: 4px; margin-top: 6px; }
.pj-season-key span { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-left: 6px; }
.pj-next-year { border-left: 4px solid var(--accent); }
.pj-newtitle { margin-top: 10px; font-weight: 800; background: var(--accent-soft); border-radius: var(--radius-sm); padding: 8px 10px; }
.pj-again { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 16px; }
.pj-again .btn { padding: 10px 12px; font-size: 14px; white-space: normal; line-height: 1.35; }
.pj-dist { margin-top: 10px; display: grid; gap: 4px; }
.pj-dist-row { display: grid; grid-template-columns: 8.5em 1fr 3em; gap: 6px; align-items: center; font-size: 12px; }
.pj-dist-bar { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.pj-dist-bar i { display: block; height: 100%; background: var(--text-sub); border-radius: 999px; }
.pj-dist-row.is-me { font-weight: 800; color: var(--accent); }
.pj-dist-row.is-me .pj-dist-bar i { background: var(--accent); }
.pj-dist-pct { text-align: right; font-variant-numeric: tabular-nums; }
.pj-sources ul { padding-left: 1.2em; margin: 8px 0; }
.pj-sources li + li { margin-top: 6px; }
.pj-marks { font-size: 30px; letter-spacing: 4px; margin: 6px 0; }
.pj-quiz .choice { text-align: center; }

/* 図鑑 */
.pj-zukan { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.pj-zukan-item { background: var(--surface-2); border-radius: var(--radius-sm); padding: 8px 6px; text-align: center; font-size: 12px; line-height: 1.35; display: flex; flex-direction: column; align-items: center; gap: 4px; opacity: .6; }
.pj-zukan-item.on { opacity: 1; background: var(--surface); border: 1px solid var(--line); }
.pj-zukan-emoji { font-size: 26px; }

/* 静的解説 */
.pj-about h2 { font-size: 18px; margin-top: 8px; }
.pj-about p, .pj-about li { font-size: 14px; }
.pj-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.pj-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.pj-table th, .pj-table td { border-bottom: 1px solid var(--line); padding: 6px 4px; text-align: left; vertical-align: top; }
.pj-table th { color: var(--text-sub); white-space: nowrap; }
.pj-table a { word-break: break-all; }
@media (prefers-reduced-motion: reduce) { .pj-pet-g, .pj-seasons i { animation: none; } }
