/* 一生であげるお年玉：ゲーム固有のスタイル（色はCSS変数のみ） */
:root {
  --ot-red: #c8323a;
  --ot-red-2: #8e1626;
  --ot-gold: #d4a017;
  --ot-gold-soft: #fff1c9;
  --ot-paper: #fffaf0;
  --ot-paper-2: #f1dcc0;
  --ot-blue: #3a5f9e;
  --ot-blue-2: #a9c1e8;
  --ot-pink: #e86a7a;
  --ot-skin: #fbf3e6;
  --ot-hair: #2a211c;
  --ot-ink: #2b1d14;
  --ot-sky1: #ffe6c7;
  --ot-sky2: #fff7ec;
  --ot-ground: #e9d7b9;
  --ot-pine: #2f6b45;
  --ot-take: #6aa056;
  --ot-taru: #a57145;
  --ot-shadow: rgba(60, 20, 10, .18);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ot-red: #e2525a; --ot-red-2: #b43a46; --ot-gold: #e8bd4a; --ot-gold-soft: #3a3020; --ot-paper: #3a322a; --ot-paper-2: #2c251f;
    --ot-blue: #6d8fcb; --ot-blue-2: #3b4f72; --ot-pink: #e57f8d; --ot-skin: #efe4d2; --ot-hair: #120d0a; --ot-ink: #f4e9da;
    --ot-sky1: #2a2333; --ot-sky2: #1d1a22; --ot-ground: #3b3227; --ot-pine: #5a9a70; --ot-take: #86b874; --ot-taru: #8f6440; --ot-shadow: rgba(0, 0, 0, .45);
  }
}
:root[data-theme="dark"] {
  --ot-red: #e2525a; --ot-red-2: #b43a46; --ot-gold: #e8bd4a; --ot-gold-soft: #3a3020; --ot-paper: #3a322a; --ot-paper-2: #2c251f;
  --ot-blue: #6d8fcb; --ot-blue-2: #3b4f72; --ot-pink: #e57f8d; --ot-skin: #efe4d2; --ot-hair: #120d0a; --ot-ink: #f4e9da;
  --ot-sky1: #2a2333; --ot-sky2: #1d1a22; --ot-ground: #3b3227; --ot-pine: #5a9a70; --ot-take: #86b874; --ot-taru: #8f6440; --ot-shadow: rgba(0, 0, 0, .45);
}

.ot-hero { padding: 8px 0 4px; }
.ot-hero h1 em { font-style: normal; color: var(--ot-red); }
.ot-hero-art, .ot-hero-photo { border-radius: var(--radius); overflow: hidden; box-shadow: 0 6px 20px var(--ot-shadow); margin-bottom: 12px; background: var(--ot-sky2); }
.ot-hero-photo img { display: block; width: 100%; height: auto; }
.ot-scene { display: block; width: 100%; height: auto; }
.ot-sky1 { stop-color: var(--ot-sky1); } .ot-sky2 { stop-color: var(--ot-sky2); }
.ot-sun1 { stop-color: var(--ot-red); stop-opacity: .95; } .ot-sun2 { stop-color: var(--ot-red); stop-opacity: .55; }
.ot-ground { fill: var(--ot-ground); }
.ot-taru { fill: var(--ot-taru); } .ot-take { fill: var(--ot-take); } .ot-matsu { fill: var(--ot-pine); }
.ot-nawa { stroke: var(--ot-gold); stroke-width: 3; }
.ot-roof { fill: var(--ot-hair); }
.ot-wood1 { stop-color: var(--ot-taru); } .ot-wood2 { stop-color: var(--ot-red-2); }
.ot-shoji-bg { fill: var(--ot-paper); } .ot-shoji-line { stroke: var(--ot-taru); stroke-width: 1.4; fill: none; }
.ot-shime { stroke: var(--ot-gold); stroke-width: 5; stroke-linecap: round; }
.ot-shime2 { stroke: var(--ot-paper); stroke-width: 3; stroke-linecap: round; }
.ot-dai { fill: var(--ot-red); }
.ot-pg-body { fill: var(--ot-paper); stroke: var(--ot-red-2); stroke-width: .8; }
.ot-pochi.is-gold .ot-pg-body { fill: var(--ot-gold-soft); }
.ot-pochi.is-blue .ot-pg-body { fill: var(--ot-blue-2); }
.ot-pg-ume { fill: var(--ot-pink); }
.ot-hop { animation: ot-hop 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes ot-hop { 0%, 70%, 100% { transform: none; } 80% { transform: translateY(-5px); } }
.ot-float { animation: ot-float 3.2s ease-in-out infinite; }
@keyframes ot-float { 0%, 100% { transform: none; } 50% { transform: translateY(-4px); } }
.ot-start { margin: 12px 0 16px; }
.ot-list { margin: 6px 0 0; padding-left: 1.2em; }
.ot-list li + li { margin-top: 4px; }
.ot-friend { border-color: var(--ot-red); background: var(--accent-soft); }
.ot-daily .btn { white-space: normal; }
.ot-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; }

/* ポチ袋 */
.ot-pochi { display: inline-block; height: auto; max-width: 100%; }
.ot-pochi .ot-pochi-c1 { stop-color: var(--ot-paper); } .ot-pochi .ot-pochi-c2 { stop-color: var(--ot-paper-2); }
.ot-pochi.is-gold .ot-pochi-c1 { stop-color: var(--ot-gold-soft); } .ot-pochi.is-gold .ot-pochi-c2 { stop-color: var(--ot-gold); }
.ot-pochi.is-blue .ot-pochi-c1 { stop-color: var(--ot-blue-2); } .ot-pochi.is-blue .ot-pochi-c2 { stop-color: var(--ot-blue); }
.ot-pochi-flap { fill: var(--ot-red); }
.ot-pochi.is-blue .ot-pochi-flap { fill: var(--ot-red-2); }
.ot-pochi-fold { stroke: var(--ot-red-2); stroke-width: 1.5; opacity: .6; }
.ot-washi-line { stroke: var(--ot-ink); stroke-width: .5; opacity: .25; }
.ot-mizuhiki { stroke: var(--ot-red); stroke-width: 3.5; } .ot-mizuhiki2 { stroke: var(--ot-gold); stroke-width: 3.5; }
.ot-musubi { fill: var(--ot-red); }
.ot-ume circle { fill: var(--ot-pink); } .ot-ume .ot-ume-c { fill: var(--ot-gold); }
.ot-pochi-text { font-size: 15px; font-weight: 900; fill: var(--ot-red-2); }

/* 甥姪の人形 */
.ot-kid { display: inline-block; vertical-align: bottom; height: auto; }
.ot-kid-face { fill: var(--ot-skin); stroke: var(--ot-ink); stroke-opacity: .15; }
.ot-kid-hair { fill: var(--ot-hair); }
.ot-kid-eye { fill: var(--ot-hair); } .ot-kid-hl { fill: var(--ot-skin); }
.ot-kid-cheek { fill: var(--ot-red); opacity: .75; }
.ot-kid-mouth { stroke: var(--ot-hair); stroke-width: 1.4; stroke-linecap: round; }
.ot-kid-body.ot-h0 { fill: var(--ot-red); } .ot-kid-body.ot-h1 { fill: var(--ot-blue); } .ot-kid-body.ot-h2 { fill: var(--ot-gold); } .ot-kid-body.ot-h3 { fill: var(--ot-pine); }

/* 入力 */
.ot-q { font-size: 20px; margin: 12px 0 6px; line-height: 1.4; }
.ot-choice-row { display: flex; align-items: center; gap: 12px; }
.ot-sibdots { color: var(--ot-red); letter-spacing: 2px; min-width: 4.6em; font-size: 14px; }
.ot-next { margin-top: 14px; }

/* 家族ガチャ */
.ot-fam { display: grid; gap: 8px; margin-top: 10px; }
.ot-sib { border-left: 4px solid var(--ot-red); }
.ot-sib.is-rare { border-left-color: var(--ot-gold); background: var(--ot-gold-soft); }
.ot-sib-row { display: flex; align-items: flex-end; gap: 10px; justify-content: space-between; }
.ot-sib-kids { display: flex; align-items: flex-end; gap: 2px; min-height: 44px; flex-wrap: wrap; }
.ot-sib-none { color: var(--text-sub); }
.ot-famsum { text-align: center; font-size: 22px; font-weight: 900; color: var(--ot-red); margin: 12px 0 4px; }

/* プレイ */
.ot-stage { margin-top: 10px; }
.ot-total { font-size: clamp(34px, 11vw, 48px); font-weight: 900; color: var(--ot-red); line-height: 1.15; font-variant-numeric: tabular-nums; }
.ot-kidsrow { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: 2px; min-height: 52px; margin: 8px 0 4px; }
.ot-stack { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; min-height: 22px; }
.ot-mini { width: 14px; height: 20px; border-radius: 3px; background: var(--ot-paper); border-top: 6px solid var(--ot-red); box-shadow: 0 1px 2px var(--ot-shadow); animation: ot-drop .45s ease both; }
.ot-mini.is-gold { background: var(--ot-gold-soft); border-top-color: var(--ot-gold); }
.ot-mini.is-blue { background: var(--ot-blue-2); border-top-color: var(--ot-red-2); }
@keyframes ot-drop { from { transform: translateY(-12px); opacity: 0; } to { transform: none; opacity: 1; } }
.ot-dilemma { margin-top: 12px; border: 2px solid var(--ot-red); }
.ot-dilemma h3 { font-size: 17px; margin: 6px 0 10px; line-height: 1.45; }
.ot-dilemma .choice { white-space: normal; }
.ot-dilemma.is-done { border-color: var(--line); opacity: .85; }
.ot-log { list-style: none; padding: 0; margin: 6px 0 0; font-size: 13px; }
.ot-log li { padding: 5px 0; border-bottom: 1px solid var(--line); line-height: 1.5; }
.ot-log li:last-child { border-bottom: 0; }

/* 結果 */
.ot-result-card.is-rare { border: 2px solid var(--ot-gold); background: linear-gradient(180deg, var(--ot-gold-soft), var(--surface) 40%); }
.ot-result-art { margin: 6px 0; }
.ot-portrait { margin: 8px auto; max-width: 280px; border-radius: var(--radius); overflow: hidden; box-shadow: 0 6px 18px var(--ot-shadow); }
.ot-portrait img { display: block; width: 100%; height: auto; }
.ot-big { font-size: 22px; font-weight: 800; }
.ot-big b { font-size: clamp(46px, 14vw, 68px); font-weight: 900; color: var(--ot-red); line-height: 1.1; font-variant-numeric: tabular-nums; }
.ot-line1 { font-weight: 800; font-size: 17px; margin: 6px 0 4px; }
.ot-top { font-size: 15px; margin: 2px 0 6px; } .ot-top b { color: var(--ot-red); font-size: 20px; }
.ot-type { 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; }
.ot-type b { font-size: 20px; }
.ot-type-emoji { font-size: 34px; }
.ot-balance { text-align: left; background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 12px; margin-top: 12px; }
.ot-bars { display: grid; gap: 6px; margin-top: 6px; }
.ot-bar-row { display: grid; grid-template-columns: 7.5em 1fr 5.5em; gap: 6px; align-items: center; font-size: 12px; }
.ot-bar { height: 12px; background: var(--surface); border-radius: 999px; overflow: hidden; }
.ot-bar i { display: block; height: 100%; border-radius: 999px; background: var(--ot-red); transition: width .9s ease; }
.ot-bar i.is-recv { background: var(--ot-gold); }
.ot-bar-row.is-me { font-weight: 800; color: var(--ot-red); }
.ot-bar-val { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ot-newtitle { margin-top: 10px; font-weight: 800; background: var(--accent-soft); border-radius: var(--radius-sm); padding: 8px 10px; }
.ot-again { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 16px; }
.ot-again .btn { padding: 10px 12px; font-size: 14px; white-space: normal; line-height: 1.35; }
.ot-dist { margin-top: 10px; display: grid; gap: 4px; }
.ot-dist-row { display: grid; grid-template-columns: 11em 1fr 3em; gap: 6px; align-items: center; font-size: 12px; }
.ot-dist-bar { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.ot-dist-bar i { display: block; height: 100%; background: var(--text-sub); border-radius: 999px; }
.ot-dist-row.is-me { font-weight: 800; color: var(--ot-red); }
.ot-dist-row.is-me .ot-dist-bar i { background: var(--ot-red); }
.ot-dist-pct { text-align: right; font-variant-numeric: tabular-nums; }
.ot-sources ul { padding-left: 1.2em; margin: 8px 0; }
.ot-sources li + li { margin-top: 6px; }
.ot-adbox { margin-top: 24px; }
.ot-marks { font-size: 30px; letter-spacing: 4px; margin: 6px 0; }
.ot-quiz .choice { text-align: center; white-space: normal; }

/* 図鑑 */
.ot-zukan { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.ot-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; }
.ot-zukan-item.on { opacity: 1; background: var(--surface); border: 1px solid var(--line); }
.ot-zukan-emoji { font-size: 26px; }

/* 静的解説 */
.ot-about h2 { font-size: 18px; margin-top: 8px; }
.ot-about p, .ot-about li { font-size: 14px; }
.ot-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ot-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.ot-table th, .ot-table td { border-bottom: 1px solid var(--line); padding: 6px 4px; text-align: left; vertical-align: top; }
.ot-table th { color: var(--text-sub); white-space: nowrap; }
.ot-table a { word-break: break-all; }
@media (max-width: 380px) { .ot-bar-row { grid-template-columns: 6.5em 1fr 5em; font-size: 11px; } .ot-dist-row { grid-template-columns: 9em 1fr 2.8em; } .ot-again { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .ot-mini, .ot-hop, .ot-float { animation: none; } .ot-bar i { transition: none; } }
.ai-note { margin: 4px 0 8px; text-align: right; }
