/* Ansambel Mini: papan 16 ketukan, pilihan alat, mode tebak suara */
.am-wrap { flex: 1; min-height: 0; display: flex; padding: clamp(4px, 1vw, 12px); background: #3b0764; }
.am-stage { position: relative; flex: 1; min-height: 0; border-radius: 16px; overflow: auto; border: 3px solid #fff; background: linear-gradient(180deg, #fef3c7, #fde68a); padding: clamp(6px, 1.2vw, 14px); display: flex; flex-direction: column; gap: clamp(6px, 1.2vh, 12px); color: var(--ink); -webkit-overflow-scrolling: touch; }
.am-tabs { display: flex; gap: 6px; }
.am-tab { flex: 1; min-height: 36px; border: 3px solid #fff; border-radius: 999px; background: rgba(255,255,255,.6); font: inherit; font-weight: 800; font-size: clamp(13px, 1.7vw, 18px); color: var(--ink); cursor: pointer; }
.am-tab[aria-pressed="true"] { background: #7c3aed; color: #fff; }
.am-sec[hidden] { display: none; }
.am-sec { display: flex; flex-direction: column; gap: clamp(6px, 1.2vh, 12px); flex: 1; min-height: 0; }
.am-pick { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.am-pk { display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 2px 14px 2px 8px; border: 3px solid var(--c); border-radius: 999px; background: #fff; font: inherit; font-weight: 800; font-size: clamp(13px, 1.7vw, 18px); color: var(--ink); cursor: pointer; }
.am-pk .em { font-size: 1.3em; }
.am-pk[aria-pressed="true"] { background: var(--c); color: #fff; }
.am-pick .hint { font-weight: 700; font-size: clamp(11px, 1.3vw, 15px); color: var(--muted); }
.am-info { background: rgba(255,255,255,.75); border-radius: 12px; padding: 6px 12px; font-weight: 700; font-size: clamp(12px, 1.5vw, 17px); line-height: 1.3; min-height: 2.8em; }
.am-grid { display: flex; flex-direction: column; gap: 6px; }
.am-row { display: grid; grid-template-columns: clamp(86px, 13vw, 140px) 1fr; gap: 8px; align-items: center; }
.am-lab { display: flex; align-items: center; gap: 6px; min-height: clamp(38px, 7vh, 58px); border: 3px solid var(--c); border-radius: 12px; background: #fff; font: inherit; font-weight: 800; font-size: clamp(12px, 1.6vw, 18px); color: var(--ink); cursor: pointer; padding: 0 6px; text-align: left; }
.am-lab .em { font-size: 1.4em; }
.am-lab .mute { margin-left: auto; font-size: 1.1em; }
.am-row.muted .am-lab { opacity: .5; }
.am-cells { display: grid; grid-template-columns: repeat(16, 1fr); gap: 3px; }
.am-cell { min-width: 0; height: clamp(38px, 7vh, 58px); border: 2px solid rgba(15,23,42,.25); border-radius: 8px; background: rgba(255,255,255,.7); color: #fff; font: inherit; font-weight: 800; font-size: clamp(8px, 1.2vw, 14px); padding: 0; cursor: pointer; overflow: hidden; }
.am-cell.g4 { margin-left: 4px; }
.am-cell.on { background: var(--c); border-color: var(--c); }
.am-cell.cur { outline: 3px solid #0f172a; outline-offset: 1px; transform: translateY(-2px); }
.am-cell.cur.on { filter: brightness(1.3); }
.am-row.muted .am-cell { opacity: .45; }
.am-ctl { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: auto; }
.am-play { min-height: 44px; padding: 0 20px; border: 0; border-radius: 999px; background: #7c3aed; color: #fff; font: inherit; font-weight: 800; font-size: clamp(14px, 1.8vw, 20px); cursor: pointer; box-shadow: 0 4px 0 rgba(15,23,42,.25); }
.am-play:active { transform: translateY(2px); }
.am-play.alt, .am-play.am-alt { background: #fff; color: var(--ink); border: 3px solid #7c3aed; }
.am-play.on { background: #dc2626; }
.am-opts { display: flex; gap: 4px; background: rgba(255,255,255,.6); border-radius: 999px; padding: 3px; }
.am-opts button { min-height: 36px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; font: inherit; font-weight: 800; font-size: clamp(12px, 1.5vw, 16px); color: var(--ink); cursor: pointer; }
.am-opts button[aria-pressed="true"] { background: #7c3aed; color: #fff; }
.am-sec h2 { margin: 0; font-size: clamp(20px, 3vw, 32px); }
.am-sec p { margin: 0; font-weight: 700; font-size: clamp(13px, 1.7vw, 19px); line-height: 1.35; }
.am-levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.am-lv { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 12px 14px; border: 3px solid #7c3aed; border-radius: 16px; background: #fff; font: inherit; color: var(--ink); cursor: pointer; }
.am-lv b { font-size: clamp(16px, 2.2vw, 24px); color: #7c3aed; } .am-lv span { font-weight: 700; font-size: clamp(12px, 1.6vw, 17px); }
.am-ghead { display: flex; justify-content: space-between; font-weight: 800; font-size: clamp(13px, 1.7vw, 19px); }
.am-q { font-size: clamp(15px, 2.2vw, 26px) !important; font-weight: 800 !important; }
.am-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.am-ch { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border: 4px solid var(--c); border-radius: 16px; background: #fff; font: inherit; font-weight: 800; font-size: clamp(14px, 2vw, 22px); color: var(--ink); cursor: pointer; }
.am-ch .em { font-size: clamp(28px, 6vh, 52px); line-height: 1; }
.am-ch.ok { background: #bbf7d0; border-color: var(--ok); } .am-ch.bad { background: var(--rose-100); border-color: var(--bad); }
.am-ch:disabled { cursor: default; }
.am-fb { min-height: 1.3em; color: #4c1d95; }
.am-cell.wrong { outline: 3px solid #dc2626; }
.am-listen { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: clamp(36px, 8vh, 64px); animation: am-pulse .5s infinite alternate; }
@keyframes am-pulse { from { transform: scale(1); } to { transform: scale(1.15); } }
.pn-stars { font-size: clamp(32px, 7vh, 60px); color: #f59e0b; letter-spacing: 6px; line-height: 1; }
.pn-stars .off { color: #cbd5e1; }
@media (max-height: 520px) { .am-wrap { padding: 3px 6px; } .am-stage { border-width: 2px; border-radius: 12px; padding: 5px 8px; gap: 5px; } .am-tab { min-height: 30px; } .am-pk { min-height: 34px; } .am-info { padding: 3px 10px; min-height: 2.4em; } .am-play { min-height: 38px; } }
@media (prefers-reduced-motion: reduce) { .am-listen { animation: none; } }

.am-grid.dense { gap: 4px; }
.am-grid.dense .am-cell { height: clamp(24px, 4.4vh, 40px); font-size: clamp(7px, 1vw, 12px); }
.am-grid.dense .am-lab { min-height: clamp(24px, 4.4vh, 40px); font-size: clamp(11px, 1.4vw, 15px); }
.am-grid.dense .am-lab .em { font-size: 1.15em; }
