/* 🎹 おんがく（ongaku_ui.js）11-26。style.css とは べつ（ほかの 作業と ぶつからない ように）。iPad と スマホ・タップは 44px いじょう */
.okmute { font-size:13px; margin:4px 0 8px; } .okmute .zhsub { font-size:11px; }
.okw .okprompt { padding:12px 14px; }
.okw .okbig { font-size:40px; font-weight:800; line-height:1.2; }
.okw .oksub { font-size:18px; color:var(--mute); font-weight:700; letter-spacing:.04em; }
.okw .nm { font-size:19px; font-weight:700; line-height:1.6; }
.okw .nm .zhsub { font-size:13px; }
.okw .oksm { font-size:.7em; font-weight:600; color:var(--mute); }
.okw .okhint { font-size:15px; color:var(--mute); }
.okw .okplay { margin:6px 0; font-size:19px; padding:12px 14px; }
.okw .row .btn { margin:6px 0; }

/* メニュー */
.okgrid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:10px 0; }
.oktile { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; min-height:112px; padding:10px 6px; border:3px solid var(--line); border-radius:20px; background:#fff; box-shadow:0 4px 0 var(--line); font:inherit; color:var(--ink); }
.oktile:active { transform:translateY(3px); box-shadow:0 1px 0 var(--line); }
.oktile .okti { font-size:34px; line-height:1.1; } .oktile .oktn { font-size:18px; font-weight:800; line-height:1.3; } .oktile .oktn .zhsub { font-size:12px; }
.oktile .lvb { font-size:12px; }
.okfreeb { font-size:22px; }

/* ホームの タイル */
.okhrow { margin-top:-2px; }
.okhbtn { display:flex !important; align-items:center; gap:10px; text-align:left; font-size:21px; padding:12px 16px; margin:6px 0; }
.okhbtn .okhic { font-size:30px; line-height:1; } .okhbtn .okhl { flex:1; } .okhbtn .okhl .zhsub { font-size:12px; }
.okhbtn .okhn { font-size:14px; background:var(--bg2); color:var(--ink); border-radius:12px; padding:3px 9px; }

/* けんばん */
.okkb { --okwmin:44px; --okbw:36px; display:flex; flex-wrap:wrap-reverse; gap:8px 0; margin:12px 0 6px; overflow-x:auto; overscroll-behavior-x:contain; user-select:none; -webkit-user-select:none; touch-action:manipulation; }
.okseg { position:relative; display:flex; min-width:0; height:168px; }
.okk { -webkit-appearance:none; appearance:none; font:inherit; padding:0; margin:0; cursor:pointer; touch-action:manipulation; -webkit-touch-callout:none; }
.okwk { flex:1 1 0; min-width:var(--okwmin); height:100%; background:#fff; border:2px solid #4a3a2a; border-left-width:1px; border-right-width:1px; border-radius:0 0 10px 10px; box-shadow:inset 0 -6px 0 #e7dfd3; display:flex; align-items:flex-end; justify-content:center; padding-bottom:12px; color:var(--ink); }
.okseg .okwk:first-child { border-left-width:2px; } .okseg .okwk:last-of-type { border-right-width:2px; }
.okbk { position:absolute; top:0; height:60%; transform:translateX(-50%); box-sizing:border-box; background:#2b2118; border:2px solid #1a120b; border-radius:0 0 7px 7px; box-shadow:inset 0 -5px 0 #4b3b2e; z-index:2; }
.okkl { display:flex; flex-direction:column; align-items:center; line-height:1.05; pointer-events:none; }
.okkl b { font-size:19px; } .okkl small { font-size:10px; color:var(--mute); margin-top:3px; white-space:nowrap; }
.okkb.lab-none .okkl, .okkb.lab-c .okk:not(.okc) .okkl { visibility:hidden; }
.okkb .okk.right .okkl, .okkb .okk.wrong .okkl, .okkb .okk.lit .okkl, .okkb .okk.nx .okkl { visibility:visible; }
.okwk.down, .okwk:active { background:#ffe7c2; box-shadow:inset 0 -2px 0 #e7dfd3; }
.okbk.down, .okbk:active { background:#5a4636; }
.okwk.lit { background:#fde68a; } .okbk.lit { background:#b45309; }
.okwk.right { background:#bbf7d0; } .okwk.wrong { background:#fecaca; }
.okwk.nx { background:#bae6fd; box-shadow:inset 0 -6px 0 #7dd3fc, 0 0 0 3px #38bdf8; animation:oknx 1s ease-in-out infinite; position:relative; z-index:1; }
@keyframes oknx { 50% { background:#e0f2fe; } }
.okkb.lab-c .okc:not(.right):not(.wrong) { background:linear-gradient(180deg,#fff 70%,#fff3d6); }

/* こたえの ボタン */
.okopts { display:grid; gap:10px; margin:10px 0; }
.okopts.ok2 { grid-template-columns:repeat(2,minmax(0,1fr)); } .okopts.ok3 { grid-template-columns:repeat(3,minmax(0,1fr)); }
.okopts.okrho { grid-template-columns:1fr; }
.okopt { position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; min-height:96px; padding:8px 6px; border:3px solid var(--line); border-radius:20px; background:#fff; box-shadow:0 4px 0 var(--line); font:inherit; color:var(--ink); }
.okopt:active:not(:disabled) { transform:translateY(3px); box-shadow:0 1px 0 var(--line); }
.okopt.right { background:#dcfce7; border-color:var(--ok); } .okopt.wrong { background:#fee2e2; border-color:var(--bad); }
.okopt:disabled { opacity:1; } .okopt:disabled:not(.right):not(.wrong):not(.okdot) { opacity:.55; }
.okopt.sing { border-color:var(--pri); background:#fff4e0; }
.okopt .okbig { font-size:34px; } .okopt .zhsub { font-size:12px; }
.okopt .okord { position:absolute; top:6px; right:10px; background:var(--pri); color:#fff; border-radius:50%; width:28px; height:28px; line-height:28px; font-size:17px; }
.okopts.okrho .okopt { min-height:72px; padding:4px 8px; }
.oknvo .okopt .okname { font-size:17px; line-height:1.9; }
.okname rt { font-size:.55em; }
.okw .okbig.okname { font-size:30px; line-height:1.9; }

/* 五線譜・リズム・おんぷ（SVG） */
.okstaff { width:min(100%,380px); height:auto; display:block; margin:0 auto; }
.okstaff .okln line, .oknv .okln line { stroke:#4a3a2a; stroke-width:1.4; }
.okstaff .okled { stroke-width:2; }
.okclef { stroke:#3a2a1a; fill:#3a2a1a; }
.oknh { fill:none; stroke:#1d1209; stroke-width:3.2; }
.okcap { font-size:14px !important; color:var(--mute); } .okcap rt { font-size:.6em; }
.okrh { width:min(100%,360px); height:auto; display:block; margin:0 auto; }
.okrh.sm { width:min(100%,300px); }
.okrh .okts { font-size:20px; font-weight:800; fill:#3a2a1a; text-anchor:middle; font-family:inherit; }
.okrh .okrl { stroke:#8a6a3a; stroke-width:1.4; } .okrh .okbar { stroke:#3a2a1a; stroke-width:2; }
.okhd { fill:#1d1209; stroke:#1d1209; stroke-width:1; transition:fill .08s; }
.okhd.hol { fill:#fff; stroke-width:2.6; } .okhd.okwh { stroke-width:3.2; }
.okstm { stroke:#1d1209; stroke-width:2.4; } .okbeam, .okrect { fill:#1d1209; }
.okrest { fill:none; stroke:#1d1209; stroke-width:3.4; stroke-linejoin:round; stroke-linecap:round; } .okrest.thin { stroke-width:2.6; }
.okflag { fill:none; stroke:#1d1209; stroke-width:2.6; stroke-linecap:round; } .okdot2 { fill:#1d1209; }
.okhd.on { fill:var(--pri); stroke:var(--pri); } .okhd.hol.on { fill:#ffd9a0; }
.okhd.hit { fill:var(--ok); stroke:var(--ok); } .okhd.miss { fill:var(--bad); stroke:var(--bad); }
.oknv { width:110px; height:auto; display:block; margin:0 auto; }
.okprompt .oknv { width:140px; }

/* リズムを たたく */
.okbeats { display:flex; justify-content:center; gap:14px; margin:6px 0 2px; }
.okbeats i { font-style:normal; width:34px; height:34px; line-height:34px; border-radius:50%; background:#f1e6d2; color:var(--mute); font-weight:800; font-size:16px; }
.okbeats i.on { background:var(--pri); color:#fff; }
.okpad { display:flex; flex-direction:column; align-items:center; justify-content:center; width:100%; min-height:150px; margin:10px 0; border:4px solid var(--pri2); border-radius:28px; background:#fff; box-shadow:0 6px 0 var(--line); font:inherit; color:var(--ink); touch-action:manipulation; user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; }
.okpad.live { border-color:var(--pri); background:#fff8ec; }
.okpad.hit { transform:translateY(4px); box-shadow:0 2px 0 var(--line); background:#ffe2b3; }
.okpad:disabled { opacity:.5; }
.okpad .okpadl { font-size:22px; font-weight:800; } .okpad .okcount { font-size:40px; font-weight:800; color:var(--pri); min-height:44px; line-height:44px; }

/* まねっこ */
.okdots { display:flex; justify-content:center; gap:10px; margin:8px 0 2px; }
.okdots i { width:20px; height:20px; border-radius:50%; border:3px solid var(--pri2); background:#fff; }
.okdots i.on { background:var(--pri); border-color:var(--pri); } .okdots i.bad { background:var(--bad); border-color:var(--bad); }

/* 自由弾き */
.oksongs { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin:8px 0; }
.oksong { min-height:56px; padding:6px 4px; border:2px solid var(--line); border-radius:16px; background:#fff; font:inherit; font-size:15px; font-weight:700; color:var(--ink); line-height:1.25; }
.oksong .zhsub { font-size:11px; } .oksong.on { border-color:var(--pri); background:#fff1db; }
.okprog { height:10px; border-radius:6px; background:#f1e6d2; overflow:hidden; margin-top:8px; } .okprog i { display:block; height:100%; background:var(--ok); transition:width .2s; }

/* 家長 */
.okpp td.small { text-align:left; font-size:12px; }

@media (max-width:560px) {
  .okgrid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .oktile { min-height:96px; }
  .okseg { height:132px; }
  .okkb { --okwmin:40px; --okbw:30px; }   /* 360px の スマホでも 2オクターブめ（白い けん 8こ）が 1だんに はいる */
  .okkl b { font-size:16px; } .okkl small { font-size:9px; }
  .okwk { padding-bottom:8px; }
  .okw .okbig { font-size:34px; }
  .okopt { min-height:84px; } .okopt .okbig { font-size:28px; }
  .oksongs { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .okpad { min-height:128px; }
  .okhbtn { font-size:19px; }
}
@media (min-width:700px) { .okseg { height:190px; } }
@media (prefers-reduced-motion:reduce) {
  .okwk.nx { animation:none; }
  .okhd, .okprog i { transition:none; }
  .okpad.hit, .oktile:active, .okopt:active:not(:disabled) { transform:none; }
}
