/* 一生で食べるお米は何俵？：ゲーム固有のスタイル（色はCSS変数のみ） */
:root {
  --ok-straw: #d9b26a;
  --ok-straw-2: #c4964a;
  --ok-rope: #7a5326;
  --ok-rice: #fffdf6;
  --ok-grain: #e9e1cc;
  --ok-bowl: #3f5f8a;
  --ok-bowl-line: #c9d6e8;
  --ok-showa: #b5651d;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --ok-straw: #b8924f; --ok-straw-2: #9d7a3c; --ok-rope: #e2c58f; --ok-rice: #f2efe6; --ok-grain: #cfc6ae; --ok-bowl: #5b7fb0; --ok-bowl-line: #9fb3cf; --ok-showa: #e08a43; }
}
:root[data-theme="dark"] { --ok-straw: #b8924f; --ok-straw-2: #9d7a3c; --ok-rope: #e2c58f; --ok-rice: #f2efe6; --ok-grain: #cfc6ae; --ok-bowl: #5b7fb0; --ok-bowl-line: #9fb3cf; --ok-showa: #e08a43; }

.ok-hero { padding: 12px 0 4px; }
.ok-hero h1 em { font-style: normal; color: var(--accent); }
.ok-start { margin: 12px 0 16px; }
.ok-list { margin: 6px 0 0; padding-left: 1.2em; }
.ok-list li + li { margin-top: 4px; }
.ok-friend { border-color: var(--accent); background: var(--accent-soft); }
.ok-daily .btn { white-space: normal; }
.ok-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; }

/* 俵 */
.ok-pile { display: block; width: 100%; max-width: 420px; height: auto; margin: 8px auto; }
.ok-tw { animation: ok-drop .5s ease both; }
.ok-tw-body { fill: var(--ok-straw); stroke: var(--ok-straw-2); stroke-width: 1.2; }
.ok-tw-rope { fill: var(--ok-rope); }
.ok-tw.is-part .ok-tw-body { opacity: .7; }
@keyframes ok-drop { from { transform: translateY(-14px); opacity: 0; } to { transform: none; opacity: 1; } }

/* 茶碗 */
.ok-bowl { width: 64px; height: auto; flex: none; }
.ok-rice { fill: var(--ok-rice); stroke: var(--ok-grain); stroke-width: 1; }
.ok-grain { fill: var(--ok-grain); }
.ok-bowl-body { fill: var(--ok-bowl); }
.ok-bowl-line { stroke: var(--ok-bowl-line); stroke-width: 2; }
.ok-bowl-foot { fill: var(--ok-bowl); }
.ok-bowls { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; min-height: 48px; margin: 6px 0; }
.ok-bowls .ok-bowl { width: 46px; }
.ok-bowls .ok-bowl.is-half { opacity: .45; }
.ok-size-row { display: flex; align-items: center; gap: 12px; }

/* 入力 */
.ok-q { font-size: 20px; margin: 12px 0 6px; }
.ok-year, .ok-count { font-size: clamp(36px, 11vw, 52px); font-weight: 900; color: var(--accent); line-height: 1.2; font-variant-numeric: tabular-nums; }
.ok-stepper { display: grid; grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); gap: 8px; margin: 12px 0 6px; }
.ok-stepper .btn { padding-left: 6px; padding-right: 6px; }
.ok-next { margin-top: 14px; }

/* 演出 */
.ok-pilebox { margin-top: 12px; }
.ok-total { font-size: 24px; font-weight: 900; color: var(--accent); font-variant-numeric: tabular-nums; }
.ok-declog { list-style: none; padding: 0; margin: 6px 0 0; font-size: 14px; }
.ok-declog li { padding: 6px 0; border-bottom: 1px solid var(--line); line-height: 1.5; }
.ok-declog li:last-child { border-bottom: 0; }
.ok-declog .small { display: block; }

/* 結果 */
.ok-big { font-size: 22px; font-weight: 800; }
.ok-big b { font-size: clamp(48px, 15vw, 72px); font-weight: 900; color: var(--accent); line-height: 1.1; font-variant-numeric: tabular-nums; }
.ok-line1 { font-weight: 800; font-size: 17px; margin: 6px 0 4px; }
.ok-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; }
.ok-type b { font-size: 20px; }
.ok-type-emoji { font-size: 34px; }
.ok-bars { display: grid; gap: 6px; margin-top: 6px; text-align: left; }
.ok-bar-row { display: grid; grid-template-columns: 8.5em 1fr 5.8em; gap: 6px; align-items: center; font-size: 12px; }
.ok-bar { height: 12px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.ok-bar i { display: block; height: 100%; border-radius: 999px; background: var(--text-sub); transition: width .9s ease; }
.ok-bar-row.is-me { font-weight: 800; color: var(--accent); }
.ok-bar-row.is-me .ok-bar i { background: var(--accent); }
.ok-bar-row.is-showa .ok-bar i { background: var(--ok-showa); }
.ok-bar-val { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ok-newtitle { margin-top: 10px; font-weight: 800; background: var(--accent-soft); border-radius: var(--radius-sm); padding: 8px 10px; }
.ok-again { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 16px; }
.ok-again .btn { padding: 10px 12px; font-size: 14px; white-space: normal; line-height: 1.35; }
.ok-dist { margin-top: 10px; display: grid; gap: 4px; }
.ok-dist-row { display: grid; grid-template-columns: 10em 1fr 3em; gap: 6px; align-items: center; font-size: 12px; }
.ok-dist-bar { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.ok-dist-bar i { display: block; height: 100%; background: var(--text-sub); border-radius: 999px; }
.ok-dist-row.is-me { font-weight: 800; color: var(--accent); }
.ok-dist-row.is-me .ok-dist-bar i { background: var(--accent); }
.ok-dist-pct { text-align: right; font-variant-numeric: tabular-nums; }
.ok-sources ul { padding-left: 1.2em; margin: 8px 0; }
.ok-sources li + li { margin-top: 6px; }
.ok-marks { font-size: 30px; letter-spacing: 4px; margin: 6px 0; }
.ok-quiz .choice { text-align: center; }

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

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