/* ご先祖さまは何人？：ゲーム固有のスタイル（色は common.css の変数のみ） */
.gs-friend { border-color: var(--accent); background: var(--accent-soft); }
.gs-hero { padding: 8px 0 4px; }
.gs-hero h1 em { font-style: normal; color: var(--accent); }
.gs-hero .lead { font-size: 15px; }
.gs-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; }

/* 家系図の扇 */
.gs-fan { width: 100%; max-width: 420px; height: auto; display: block; margin: 8px auto 10px; }
.gs-me { fill: var(--accent); }
.gs-me-label { font-size: 8px; font-weight: 800; fill: var(--accent-ink); }
.gs-seg { stroke: var(--surface); stroke-width: .4; animation: gs-in .45s ease both; transition: opacity .3s ease; }
.gs-k1 { fill: var(--accent); fill-opacity: .85; }
.gs-k2 { fill: var(--warn); fill-opacity: .8; }
.gs-k3 { fill: var(--good); fill-opacity: .7; }
.gs-k0 { fill: var(--info); fill-opacity: .65; }
.gs-seg.is-off { opacity: .12; animation: none; }
@keyframes gs-in { from { opacity: 0; } to { opacity: 1; } }
.gs-fanbox { position: relative; border-radius: var(--radius); transition: box-shadow .6s ease; }
.gs-fanbox.is-glow { box-shadow: 0 -18px 40px -18px var(--accent); }

/* 入力 */
.gs-input { border: 2px solid var(--accent); }
.gs-row { display: grid; grid-template-columns: 1fr 1.3fr; gap: 8px; }
.gs-sel { min-width: 0; font-size: 16px; padding: 10px 8px; }
.gs-input .btn-lg { margin-top: 12px; }
.gs-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.gs-two .btn { padding: 10px 12px; font-size: 14px; white-space: normal; line-height: 1.35; min-width: 0; }

/* デイリー */
.gs-daily { margin-top: 4px; }
.gs-quiz-q { font-weight: 800; margin: 12px 0 8px; line-height: 1.5; }
.gs-quiz-opts .choice { min-height: 48px; padding: 10px 14px; }
.gs-quiz-opts .choice:disabled { cursor: default; opacity: 1; }

/* さかのぼり */
.gs-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.gs-top .btn { flex: none; }
.gs-panel { text-align: center; padding: 16px; }
.gs-panel.is-cross { border: 2px solid var(--accent); background: var(--accent-soft); }
.gs-gen { font-size: 15px; font-weight: 800; color: var(--accent); }
.gs-year { font-size: clamp(20px, 6vw, 26px); font-weight: 900; margin: 2px 0 8px; }
.gs-anc { font-size: clamp(34px, 11vw, 58px); font-weight: 900; line-height: 1.15; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gs-bar { height: 12px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin: 10px 0 6px; }
.gs-bar > span { display: block; height: 100%; width: 0; background: var(--info); border-radius: 999px; transition: width .5s ease; }
.gs-bar.is-over > span { background: var(--accent); }
.gs-pop { color: var(--text-sub); }
.gs-ev { margin: 10px 0 0; min-height: 1.6em; }

/* 結果 */
.gs-main { text-align: center; border: 2px solid var(--accent); padding: 20px 14px; }
.gs-big { font-size: clamp(38px, 12vw, 64px); font-weight: 900; color: var(--accent); line-height: 1.2; white-space: nowrap; }
.gs-crossbox { border-left: 4px solid var(--accent); }
.gs-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 8px; }
.gs-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.gs-table th, .gs-table td { border-bottom: 1px solid var(--line); padding: 6px 4px; text-align: left; white-space: nowrap; }
.gs-table th { color: var(--text-sub); font-size: 12px; }
.gs-table td:nth-child(2) { white-space: normal; min-width: 5.5em; }
@media (max-width: 420px) { .gs-table { font-size: 12px; } .gs-table th, .gs-table td { padding: 6px 3px; } }
.gs-table tr.is-cross td { color: var(--accent); font-weight: 800; }
.gs-share { margin-top: 4px; }
.gs-crow { display: grid; grid-template-columns: minmax(0, 1.6fr) 1fr auto; gap: 8px; align-items: center; margin-top: 8px; font-size: 13px; }
.gs-cbar { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.gs-cbar > span { display: block; height: 100%; background: var(--text-sub); }
.gs-crow.is-me .gs-cbar > span { background: var(--accent); }
.gs-crow.is-me b, .gs-crow.is-me .gs-clabel { color: var(--accent); }

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

.gs-sources summary { font-weight: 700; }
.gs-sources ul { padding-left: 1.2em; margin: 8px 0; }
.gs-sources li + li { margin-top: 6px; }

/* 解説 */
.gs-about h2 { font-size: 18px; margin-top: 8px; }
.gs-about p, .gs-about li { font-size: 14px; }
.gs-about .gs-table td { white-space: normal; }
.gs-about .gs-table a { word-break: break-all; }

@media (prefers-reduced-motion: reduce) {
  .gs-seg { animation: none; }
  .gs-bar > span, .gs-fanbox { transition: none; }
}
