/* あの頃の体力テスト、全国何位？：ゲーム固有のスタイル（色は common.css の変数のみ） */
.tj-friend { border-color: var(--accent); background: var(--accent-soft); }
.tj-hero { padding: 4px 0 4px; }
.tj-hero h1 em { font-style: normal; color: var(--accent); }
.tj-hero .lead { font-size: 15px; }
.tj-hero-art { border-radius: var(--radius); overflow: hidden; margin: 0 0 12px; box-shadow: var(--shadow); border: 1px solid var(--line); aspect-ratio: 360 / 210; background: var(--surface-2); }
.tj-hero-svg, .tj-hero-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tj-hand { transform-origin: 0 0; animation: tj-spin 4s linear infinite; }
@keyframes tj-spin { to { transform: rotate(360deg); } }
.tj-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; }

/* 学年・記録表 */
.tj-setup { border: 2px solid var(--accent); }
.field-label { font-weight: 800; font-size: 14px; margin: 4px 0 6px; }
.tj-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.tj-seg-btn { appearance: none; border: 2px solid var(--line); background: var(--surface); color: var(--text); border-radius: var(--radius-sm); padding: 10px 8px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 52px; touch-action: manipulation; min-width: 0; }
.tj-seg-btn b { font-size: 16px; }
.tj-seg-btn span { font-size: 11px; color: var(--text-sub); }
.tj-seg-btn.is-on { border-color: var(--accent); background: var(--accent-soft); }
.tj-seg-btn.is-on b { color: var(--accent); }
.tj-seg-sm { margin: 0 0 8px; }
.tj-seg-sm .tj-seg-btn { min-height: 42px; padding: 6px; }
.tj-seg-sm .tj-seg-btn b { font-size: 14px; }
.tj-go { margin-top: 12px; }
.tj-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 16px; }
.tj-two .btn { padding: 10px 12px; font-size: 14px; white-space: normal; line-height: 1.35; min-width: 0; }

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

/* 種目ごとの選択 */
.tj-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.tj-top .btn { flex: none; }
.tj-count { flex: none; font-variant-numeric: tabular-nums; }
.tj-item-head { display: flex; gap: 14px; align-items: center; padding: 14px 16px; margin-bottom: 10px; }
.tj-picto-box { flex: none; width: 76px; height: 76px; border-radius: 18px; background: linear-gradient(160deg, var(--accent-soft), var(--surface-2)); display: flex; align-items: center; justify-content: center; color: var(--text); }
.tj-picto { width: 62px; height: 62px; color: var(--text); }
.tj-item-name { font-size: 24px; margin: 0; }
.tj-ask { font-weight: 700; margin: 4px 0 8px; }
.tj-bands { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tj-bandbtn { appearance: none; border: 2px solid var(--line); background: var(--surface); color: var(--text); border-radius: var(--radius-sm); padding: 8px 10px; min-height: 52px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 6px; text-align: left; touch-action: manipulation; transition: transform .08s, border-color .15s; min-width: 0; }
.tj-bandbtn b { font-size: 15px; font-variant-numeric: tabular-nums; line-height: 1.3; }
.tj-bandbtn span { flex: none; font-size: 11px; font-weight: 700; color: var(--text-sub); background: var(--surface-2); border-radius: 999px; padding: 1px 7px; }
.tj-bandbtn:hover { border-color: var(--accent); }
.tj-bandbtn:active { transform: scale(.97); }
.tj-bandbtn.is-on { border-color: var(--accent); background: var(--accent-soft); }
.tj-bandbtn.s10 span, .tj-bandbtn.s9 span { background: var(--accent); color: var(--accent-ink); }
.tj-skip { margin-top: 10px; }

/* 発表・結果 */
.tj-main { text-align: center; padding: 18px 14px; border: 2px solid var(--accent); }
.tj-main.is-rare { background: linear-gradient(160deg, var(--accent-soft), var(--surface)); }
.tj-num { font-size: clamp(52px, 16vw, 84px); font-weight: 900; color: var(--accent); line-height: 1.1; font-variant-numeric: tabular-nums; }
.tj-num-sm { font-size: clamp(30px, 9vw, 44px); }
.tj-sub { margin: 4px 0 0; font-weight: 700; }
.tj-watch { width: 96px; height: 96px; display: block; margin: 0 auto 4px; }
.tj-w-top { fill: var(--text-sub); }
.tj-w-rim { fill: var(--surface-2); stroke: var(--text-sub); stroke-width: 5; }
.tj-w-face { fill: var(--surface); }
.tj-w-hand line { stroke: var(--accent); }
.tj-w-hand { transform-origin: 60px 66px; animation: tj-spin 1s linear infinite; }
.tj-watch.is-stop .tj-w-hand { animation-play-state: paused; }
.tj-w-pin { fill: var(--accent); }
.tj-qbox { padding: 10px; }
.tj-queue { width: 100%; height: auto; display: block; }
.tj-person { fill: var(--text-sub); fill-opacity: .35; }
.tj-person.is-ahead { fill: var(--info); fill-opacity: .55; }
.tj-person.is-you { fill: var(--accent); fill-opacity: 1; }
.tj-band { fill: var(--bad); }
.tj-face { margin: 0 auto 8px; width: min(220px, 60vw); }
.tj-medal { display: block; width: 78%; height: auto; margin: 0 auto; animation: tj-swing 2.4s ease-in-out infinite; transform-origin: 50% 0; }
@keyframes tj-swing { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
.tj-portrait { display: block; width: 100%; height: auto; border-radius: 50%; border: 4px solid var(--accent); box-shadow: var(--shadow); }
.tj-emblem { position: relative; width: 100%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 40% 35%, var(--surface), var(--accent-soft) 70%); border: 4px solid var(--accent); display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); }
.tj-emblem .tj-picto { width: 58%; height: 58%; }
.tj-emblem span { position: absolute; right: 6%; bottom: 6%; font-size: 40px; line-height: 1; background: var(--surface); border-radius: 50%; width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; border: 2px solid var(--line); }
.tj-emblem.is-rare { border-color: var(--warn); box-shadow: 0 0 0 6px var(--accent-soft), var(--shadow); }
.tj-type { margin-top: 10px; font-size: 22px; line-height: 1.4; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.tj-row { font-size: 22px; letter-spacing: 2px; margin-top: 8px; }
.tj-share { margin-top: 4px; }

.tj-chart { padding: 14px 14px 16px; }
.tj-radar { width: 100%; max-width: 360px; height: auto; display: block; margin: 4px auto 6px; }
.tj-r-grid { fill: none; stroke: var(--line); stroke-width: 1; }
.tj-r-grid.is-outer { stroke: var(--text-sub); stroke-opacity: .5; }
.tj-r-axis { stroke: var(--line); stroke-width: 1; }
.tj-r-label { font-size: 10.5px; font-weight: 700; fill: var(--text); }
.tj-r-avg { fill: none; stroke: var(--info); stroke-width: 1.6; stroke-dasharray: 4 3; }
.tj-r-me { fill: var(--accent); fill-opacity: .32; stroke: var(--accent); stroke-width: 2.4; stroke-linejoin: round; }
.tj-r-me.is-anim { animation: tj-grow .9s cubic-bezier(.2, .8, .3, 1.2) both; }
@keyframes tj-grow { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.tj-r-dot { fill: var(--accent); }
.tj-r-me-key { fill: var(--accent); fill-opacity: .6; }
.tj-r-avg-key { fill: none; stroke: var(--info); stroke-dasharray: 3 2; }
.tj-r-key { font-size: 10px; fill: var(--text-sub); }
.tj-items { display: grid; gap: 6px; margin-top: 6px; }
.tj-irow { display: grid; grid-template-columns: 7.8em minmax(0, 1fr) auto; gap: 2px 8px; align-items: center; font-size: 13px; padding: 6px 8px; border-radius: var(--radius-sm); background: var(--surface-2); }
.tj-irow.is-best { outline: 2px solid var(--accent); background: var(--accent-soft); }
.tj-irow.is-none { opacity: .65; }
.tj-iname { font-weight: 700; }
.tj-ival { color: var(--text-sub); font-variant-numeric: tabular-nums; min-width: 0; }
.tj-itop { font-weight: 800; color: var(--accent); white-space: nowrap; }
.tj-ibar { grid-column: 1 / -1; height: 6px; background: var(--surface); border-radius: 999px; overflow: hidden; }
.tj-ibar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }

.tj-crow { display: grid; grid-template-columns: minmax(5em, auto) 1fr auto; gap: 8px; align-items: center; margin-top: 8px; font-size: 13px; }
.tj-cbar { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.tj-cbar > span { display: block; height: 100%; background: var(--text-sub); max-width: 100%; }
.tj-crow.is-me .tj-cbar > span { background: var(--accent); }
.tj-crow.is-me b, .tj-crow.is-me span { color: var(--accent); font-weight: 800; }
.tj-trend-list { display: grid; gap: 6px; margin-top: 8px; }
.tj-trow { display: grid; grid-template-columns: 1fr; font-size: 14px; background: var(--surface-2); border-radius: var(--radius-sm); padding: 8px 10px; }
.tj-trow span:first-child { font-weight: 800; }
.tj-public { margin-top: 4px; }
.tj-plist { margin: 4px 0 0; padding-left: 1.2em; font-size: 14px; }
.tj-sources summary { font-weight: 700; }
.tj-sources ul { padding-left: 1.2em; margin: 8px 0; }
.tj-sources li + li { margin-top: 6px; }

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

/* 解説 */
.tj-about h2 { font-size: 19px; }
.tj-table-wrap { overflow-x: auto; }
.tj-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tj-table th, .tj-table td { border-bottom: 1px solid var(--line); padding: 6px; text-align: left; vertical-align: top; }

@media (prefers-reduced-motion: reduce) {
  .tj-hand, .tj-w-hand, .tj-r-me.is-anim, .tj-medal { animation: none !important; }
}
.ai-note { margin: 4px 0 8px; text-align: right; }
.ai-note-c { text-align: center; margin: 4px 0 0; font-size: 10px; }
.tj-main .ai-note-c { margin: -4px 0 8px; }
