/* taiko.css — 名曲ドンカッ！（games/taiko/） */
.tk-body .owl-guide { z-index: 40; }
.tk-hero { position: relative; overflow: hidden; color: #fff; min-height: 340px; display: flex; align-items: center; background: #120818 url('/classicalmusic/img/game-taiko.webp') center / cover no-repeat; }
.tk-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14, 6, 22, 0.94) 0%, rgba(14, 6, 22, 0.7) 50%, rgba(14, 6, 22, 0.15) 100%); }
.tk-hero-in { position: relative; z-index: 1; padding: 48px 0; }
.tk-hero h1 { font-family: var(--mincho); font-size: clamp(2.2rem, 7vw, 4rem); margin: 4px 0 10px; line-height: 1.1; background: var(--goldgrad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tk-hero h1 small { display: block; font-size: 0.42em; letter-spacing: 0.1em; }
.tk-hero .lead { max-width: 620px; color: #f3e9d8; }
.tk-hero .t-en { color: #d9c9a8; max-width: 560px; }
.tk-hero .kicker { color: var(--gold2); }
.tk-wrap { padding: 22px 0 34px; scroll-margin-top: 70px; }

/* ---------- 曲えらび ---------- */
.tk-lvtabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.tk-lvtabs button { display: grid; gap: 0; padding: 10px 4px; border-radius: 16px; border: 3px solid transparent; background: var(--card); color: var(--ink); box-shadow: var(--shadow); font-family: var(--round); cursor: pointer; }
.tk-lvtabs button b { font-size: clamp(0.92rem, 3.4vw, 1.15rem); color: var(--c); }
.tk-lvtabs button small { font: 700 0.66rem var(--en); letter-spacing: 0.12em; color: var(--muted); }
.tk-lvtabs button[aria-selected='true'] { background: var(--c); border-color: var(--c); box-shadow: 0 10px 24px -12px var(--c); }
.tk-lvtabs button[aria-selected='true'] b, .tk-lvtabs button[aria-selected='true'] small { color: #fff; }
.tk-optrow { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 10px; }
.tk-optrow > div { display: grid; gap: 3px; }
.tk-optrow label { font-size: 0.86rem; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.tk-chk { cursor: pointer; }
.tk-chk input { width: 18px; height: 18px; accent-color: var(--wine); }
.tk-more { margin: 0 0 14px; font-size: 0.9rem; }
.tk-more summary { cursor: pointer; font-weight: 900; color: var(--muted); margin-bottom: 8px; }
.tk-more input[type='range'] { width: 130px; accent-color: var(--wine); }
.tk-more output { font-size: 0.8rem; color: var(--muted); min-width: 7em; }
.tk-songs { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
@media (max-width: 520px) { .tk-songs { grid-template-columns: 1fr; } }
.tk-song { background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; border-top: 5px solid var(--c); }
.tk-song-main { display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; align-items: center; text-align: left; border: 0; background: transparent; color: var(--ink); padding: 12px 14px 8px; cursor: pointer; font: inherit; }
.tk-song-main:hover .tk-art img { transform: rotate(-6deg) scale(1.08); }
.tk-art { width: 72px; height: 72px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff4dc, #e9c879); overflow: hidden; display: block; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.6); }
.tk-art img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.tk-meta { display: grid; gap: 1px; min-width: 0; }
.tk-name { font-family: var(--mincho); font-size: 1.12rem; line-height: 1.25; }
.tk-meta small { font: 600 0.86rem var(--en); color: var(--gold-ink); }
.tk-sub { font-size: 0.76rem; color: var(--muted); font-weight: 700; }
.tk-about { font-size: 0.78rem; color: var(--ink2); line-height: 1.45; margin-top: 2px; }
.tk-go { display: grid; justify-items: center; gap: 2px; }
.tk-go .tk-stars { font-size: 1.05rem; padding: 3px 10px; background: var(--c); color: #fff; border-radius: 999px; }
.tk-best { font-size: 0.72rem; font-weight: 900; color: var(--wine); white-space: nowrap; }
.tk-stars { font-weight: 900; color: #e8a800; letter-spacing: 0.02em; font-family: var(--round); }
.tk-lvs { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px dashed var(--line); }
.tk-lvs button { display: grid; justify-items: center; gap: 0; padding: 6px 2px 8px; border: 0; background: transparent; color: var(--ink); font-size: 0.72rem; font-weight: 900; cursor: pointer; position: relative; }
.tk-lvs button + button { border-left: 1px dashed var(--line); }
.tk-lvs button span:first-child { color: var(--c); }
.tk-lvs button:hover, .tk-lvs button[aria-current='true'] { background: color-mix(in srgb, var(--c) 12%, transparent); }
.tk-lvs .tk-stars { font-size: 0.8rem; }
.tk-crown { display: inline-block; vertical-align: middle; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35)); }
.tk-lvs .tk-crown { position: absolute; top: 2px; right: 4px; }

/* ---------- プレイ画面 ---------- */
.tk-play { scroll-margin-top: 62px; position: relative; background: #0d0716; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-lg); color: #fff; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.tk-top { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; background: linear-gradient(90deg, #3a0c22, #1b0612); }
.tk-ttl { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.tk-ttl b { font-family: var(--mincho); font-size: clamp(0.92rem, 3.6vw, 1.2rem); line-height: 1.25; }
.tk-ttl span { flex: none; font-size: 0.74rem; font-weight: 900; padding: 2px 10px; border-radius: 999px; }
.tk-sc { display: grid; justify-items: end; line-height: 1; }
.tk-sc span { font: 700 0.62rem var(--en); letter-spacing: 0.2em; color: var(--gold2); }
.tk-sc b { font-family: var(--round); font-size: clamp(1.1rem, 4.4vw, 1.6rem); font-variant-numeric: tabular-nums; min-width: 6ch; text-align: right; }
.tk-ibtn { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.25); background: rgba(255, 255, 255, 0.08); color: #fff; display: grid; place-items: center; cursor: pointer; }
.tk-ibtn:hover { background: rgba(255, 255, 255, 0.18); }
.tk-stage { position: relative; }
.tk-cv { display: block; width: 100%; height: clamp(250px, 46vh, 440px); }
@media (pointer: coarse) { .tk-cv { height: clamp(240px, 40vh, 400px); } }
.tk-msg { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 10px; background: rgba(13, 7, 22, 0.75); font-size: 1.1rem; }
.tk-load { width: min(280px, 70vw); height: 10px; border-radius: 99px; background: rgba(255, 255, 255, 0.15); overflow: hidden; }
.tk-load i { display: block; height: 100%; width: 0; background: var(--goldgrad); transition: width 0.2s; }
.tk-pad { display: grid; justify-items: center; gap: 8px; padding: 12px 10px 16px; background: radial-gradient(120% 140% at 50% 0%, #3a1430 0%, #160812 70%); }
.tk-keys { font-size: 0.78rem; color: #d9c9e0; }
.tk-keys kbd { background: #2a1a30; color: #fff; border-color: #5a4466; margin: 0 2px; }
@media (pointer: coarse) { .tk-keys { display: none; } }
.tk-auto .tk-pad::before { content: 'お手本モード（自動でたたきます）'; font-size: 0.8rem; font-weight: 900; color: var(--gold2); }

/* 太鼓（まん中＝ドン、ふち＝カッ） */
.tk-drum { position: relative; width: min(280px, 74vw, 36vh); aspect-ratio: 1; border-radius: 50%; border: 0; padding: 0; cursor: pointer; touch-action: none; -webkit-tap-highlight-color: transparent; background: radial-gradient(circle at 50% 50%, #6b3a1c 0 60%, #3d1f0c 61% 100%); box-shadow: 0 14px 30px -10px #000, inset 0 0 0 6px #2a1406; }
@media (pointer: fine) { .tk-drum { width: min(150px, 40vw); } .tk-pad { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 10px 18px; } .tk-auto .tk-pad::before { width: 100%; } }
.tk-rim { position: absolute; inset: 4%; border-radius: 50%; border: clamp(14px, 4.4vw, 26px) solid rgba(70, 184, 214, 0.28); transition: border-color 0.1s; }
.tk-rim.l { clip-path: inset(0 50% 0 0); }
.tk-rim.r { clip-path: inset(0 0 0 50%); }
.tk-face { position: absolute; inset: 15%; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fffaf0, #efdcb8 70%, #d9bf8d); box-shadow: inset 0 -6px 14px rgba(120, 70, 20, 0.35), 0 0 0 4px #2a1406; display: grid; place-items: center; overflow: hidden; }
.tk-face::before { content: 'ドン'; font: 900 clamp(1.1rem, 5vw, 1.6rem) var(--round); color: rgba(150, 40, 20, 0.38); }
.tk-dl, .tk-dr { position: absolute; top: 0; bottom: 0; width: 50%; background: #ff5a3a; opacity: 0; transition: opacity 0.12s; }
.tk-dl { left: 0; }
.tk-dr { right: 0; }
.tk-drum::after { content: 'カッ'; position: absolute; top: 1.5%; left: 50%; transform: translateX(-50%); font: 900 0.72rem var(--round); color: rgba(160, 230, 255, 0.75); }
.tk-drum.on-don-L .tk-dl, .tk-drum.on-don-R .tk-dr { opacity: 0.75; transition: none; }
.tk-drum.on-ka-L .tk-rim.l, .tk-drum.on-ka-R .tk-rim.r { border-color: rgba(70, 200, 255, 0.95); transition: none; }
.tk-drum:active { transform: scale(0.985); }
.tk-face b { display: none; }

/* 一時停止 */
.tk-over { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(10, 4, 16, 0.8); z-index: 5; }
.tk-pbox { text-align: center; }
.tk-pbox h2 { font-family: var(--mincho); margin: 0 0 14px; }
.tk-pbox .kicker { color: var(--gold2); }
.tk-pbox .btn.ghost { color: #fff; border-color: rgba(255, 255, 255, 0.4); }

/* 全画面 */
.tk-play:fullscreen { border-radius: 0; display: flex; flex-direction: column; }
.tk-play:fullscreen .tk-stage { flex: 1; min-height: 0; }
.tk-play:fullscreen .tk-cv { height: 100%; }
.tk-play:fullscreen .tk-drum { width: min(240px, 30vh); }

/* ---------- 結果 ---------- */
.tk-result { scroll-margin-top: 70px; }
.tk-res { background: var(--card); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-lg); overflow: hidden; text-align: center; padding-bottom: 20px; }
.tk-res-head { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 20px 18px; background: var(--velvet); color: #fff; text-align: left; border-bottom: 5px solid var(--c); }
.tk-res-head img { width: clamp(90px, 22vw, 140px); height: auto; }
.tk-res-head .kicker { color: var(--gold2); }
.tk-res-head h2 { font-family: var(--mincho); margin: 0 0 6px; font-size: clamp(1.2rem, 4.6vw, 1.8rem); }
.tk-lvb { font: 900 0.8rem var(--round); padding: 2px 10px; border-radius: 999px; vertical-align: middle; color: #fff; }
.tk-rank { display: flex; align-items: center; gap: 10px; font-size: clamp(1rem, 4vw, 1.4rem); }
.tk-grade { font: 900 2.4rem/1 var(--en); width: 1.4em; height: 1.4em; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, 0.12); }
.tk-grade.gS { background: var(--goldgrad); color: #3a2200; }
.tk-grade.gA { background: #ff8a3d; }
.tk-grade.gB { background: #3a8fd8; }
.tk-res-score { padding: 16px 10px 6px; display: grid; justify-items: center; }
.tk-res-score span { font: 700 0.8rem var(--en); letter-spacing: 0.3em; color: var(--gold-ink); }
.tk-res-score b { font: 900 clamp(2.4rem, 11vw, 3.6rem)/1.05 var(--round); font-variant-numeric: tabular-nums; color: var(--wine); }
.tk-res-score em { font-style: normal; font-weight: 900; color: #fff; background: var(--ng); padding: 2px 12px; border-radius: 999px; animation: tk-blink 0.9s infinite; }
.tk-res-score small { color: var(--muted); font-weight: 700; }
@keyframes tk-blink { 50% { opacity: 0.55; } }
.tk-res-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 520px; margin: 12px auto; padding: 0 14px; }
.tk-res-grid div { background: var(--bg2); border-radius: 14px; padding: 8px 4px; display: grid; }
.tk-res-grid span { font-size: 0.74rem; font-weight: 900; color: var(--muted); }
.tk-res-grid b { font: 900 1.5rem var(--round); }
.tk-res-grid .br b { color: #d89a00; }
.tk-res-grid .be b { color: var(--ink2); }
.tk-res-grid .mi b { color: #5a7090; }
.tk-res-msg { font-weight: 700; padding: 0 16px; }
.tk-res-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 16px 0 8px; }

/* ---------- 説明 ---------- */
.tk-how { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; text-align: center; font-size: 0.86rem; margin-bottom: 14px; }
.tk-how div { background: var(--bg2); border-radius: 14px; padding: 12px 6px; }
.tk-n { display: block; width: 44px; height: 44px; margin: 0 auto 6px; border-radius: 50%; border: 4px solid #fffaf0; box-shadow: 0 0 0 3px #1a0f22; background: radial-gradient(circle at 35% 30%, #ff7a4d, #e8342a 60%, #a8170f); }
.tk-n.ka { background: radial-gradient(circle at 35% 30%, #7fe0ff, #2fa8d8 60%, #13698f); }
.tk-n.big { width: 56px; height: 56px; margin-top: -6px; }
.tk-n.roll { width: 76px; border-radius: 99px; background: linear-gradient(#ffe46b, #e8a800); }
.tk-n.ball { background: radial-gradient(circle at 35% 30%, #ffb36b, #ff7f1a 60%, #b84f00); }
.tk-list { padding-left: 1.2em; }
.tk-list li { margin-bottom: 6px; }
