/* หน้า /business/components: ลองฟังส่วนประกอบของเพลง (ใช้ร่วมกับ business.css) */
.comp-hero { padding: 56px 0 56px; }
.comp-hero h1 { margin: 12px 0 16px; font-size: clamp(1.9rem, 4.6vw, 3rem); }
.comp-hero h1 em { font-style: normal; color: var(--biz-amber); }
.comp-steps { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 24px 0 0; padding: 0; list-style: none; color: rgba(255, 255, 255, 0.85); font-size: 0.95rem; }
.comp-steps b { display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 6px; border-radius: 50%; background: var(--biz-amber); color: var(--night); font: 700 0.8rem var(--font-head); }
.comp-main { padding-bottom: 140px; }
.comp-h { margin: 0 0 6px; font-size: clamp(1.4rem, 3vw, 1.9rem); }

.song-map { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; margin: 14px 0 20px; }
.map-b { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px 10px; border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font-family: inherit; cursor: pointer; transition: transform 0.12s, border-color 0.12s; }
.map-b:hover { transform: translateY(-2px); border-color: var(--ink); }
.map-b .map-n { position: absolute; top: 5px; left: 7px; color: var(--muted); font: 600 0.68rem var(--font-head); }
.map-b .map-i { font-size: 1.5rem; }
.map-b .map-t { font-size: 0.78rem; font-weight: 600; text-align: center; line-height: 1.3; }
.map-b.is-picked { border-color: var(--accent); background: #fff1ed; }
.map-b.is-playing { background: var(--biz-amber); border-color: var(--biz-amber); animation: map-pulse 1s ease-in-out infinite alternate; }
@keyframes map-pulse { to { transform: translateY(-3px); } }

.comp-legend { display: grid; gap: 6px; margin-bottom: 22px; padding: 12px 16px; border-radius: var(--radius-sm); background: #f5efe4; color: #5c4a22; font-size: 0.88rem; }
.comp-legend .dot { display: inline-block; width: 10px; height: 10px; margin-right: 4px; border-radius: 50%; }
.comp-legend .dot.real { background: #1b8a4b; }
.comp-legend .dot.sim { background: #c98a14; }
.comp-filters { display: grid; gap: 14px; margin-bottom: 8px; }
.comp-filters label { display: block; font-weight: 600; font-size: 0.93rem; }
.comp-filters select { display: block; width: 100%; max-width: 420px; margin-top: 6px; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff; font: inherit; }
.comp-filters .chips { margin-bottom: 0; }

.comp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.comp-sec { grid-column: 1 / -1; margin-top: 22px; }
.comp-sec h2 { font-size: 1.35rem; }
.comp-sec p { color: var(--muted); font-size: 0.92rem; }
.comp-card { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.comp-card.is-picked { border-color: var(--accent); }
.comp-card.is-playing { border-color: var(--biz-amber); box-shadow: 0 0 0 3px rgba(242, 169, 59, 0.3), var(--shadow); }
.comp-head { display: flex; gap: 12px; align-items: flex-start; }
.comp-ico { display: grid; place-items: center; flex: 0 0 46px; height: 46px; border-radius: 14px; background: #f5efe4; font-size: 1.5rem; }
.comp-head h3 { font-size: 1.05rem; line-height: 1.3; }
.comp-head small { color: var(--muted); font-size: 0.8rem; }
.comp-badge { align-self: flex-start; padding: 2px 10px; border-radius: 999px; font: 600 0.72rem var(--font-head); }
.comp-badge.real { background: #e3f4e6; color: #1b5e2b; }
.comp-badge.sim { background: #fff4e0; color: #7a4a00; }
.comp-what { color: #3a3445; font-size: 0.92rem; }
.comp-ex { margin: 0; padding: 8px 12px; border-left: 3px solid var(--biz-amber); border-radius: 0 10px 10px 0; background: #fffaf0; color: #5c4a22; font-size: 0.86rem; line-height: 1.6; }
.comp-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.comp-tag { padding: 2px 10px; border-radius: 999px; background: #f1ece3; color: var(--muted); font-size: 0.76rem; }
.comp-tag.me { background: #e8f0ff; color: #243b8a; }
.comp-tag.star { background: var(--biz-amber); color: var(--night); font-weight: 700; }
.comp-bar { height: 4px; border-radius: 4px; background: #eee7da; overflow: hidden; }
.comp-bar i { display: block; width: 0; height: 100%; background: var(--biz-amber); }
.comp-act { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: auto; }
.comp-act button { padding: 9px 16px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font: 600 0.88rem var(--font-body); cursor: pointer; }
.comp-act button:hover { border-color: var(--ink); }
.comp-play { background: var(--ink) !important; border-color: var(--ink) !important; color: #fff !important; }
.comp-card.is-playing .comp-play { background: var(--biz-amber) !important; border-color: var(--biz-amber) !important; color: var(--night) !important; }
.comp-card.is-picked .comp-like { background: #fff1ed; border-color: var(--accent); color: var(--accent-deep); }
.comp-more { margin-left: auto; font-size: 0.84rem; font-weight: 600; text-decoration: none; color: var(--accent-deep); }

.comp-tray { position: fixed; z-index: 55; left: 84px; right: 16px; bottom: 12px; max-width: 760px; margin-left: auto; margin-right: auto; border-radius: 18px; background: var(--night); color: #fff; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45); }
.comp-tray[hidden] { display: none !important; }
.tray-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
.tray-toggle { flex: 1; padding: 6px 4px; border: 0; background: none; color: #fff; font: 600 0.95rem var(--font-head); text-align: left; cursor: pointer; }
.tray-toggle b { display: inline-grid; place-items: center; min-width: 24px; height: 24px; margin: 0 4px; border-radius: 12px; background: var(--biz-amber); color: var(--night); }
.tray-clear { border: 0; background: none; color: rgba(255, 255, 255, 0.65); font: 600 0.82rem var(--font-body); cursor: pointer; }
.tray-list { display: grid; gap: 6px; max-height: 40vh; overflow: auto; margin: 0; padding: 4px 14px 14px; list-style: none; }
.tray-list[hidden] { display: none !important; }
.tray-list li { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.08); font-size: 0.9rem; }
.tray-x { border: 0; background: none; color: rgba(255, 255, 255, 0.6); font-size: 1rem; cursor: pointer; }

@media (max-width: 960px) {
    .song-map { grid-template-columns: repeat(4, 1fr); }
    .comp-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .song-map { grid-template-columns: repeat(2, 1fr); }
    .comp-grid { grid-template-columns: 1fr; }
    .comp-tray { left: 12px; right: 12px; bottom: 76px; }
    .tray-bar { flex-wrap: wrap; }
    .comp-main { padding-bottom: 220px; }
}
@media (prefers-reduced-motion: reduce) { .map-b.is-playing { animation: none; } }
