@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable.min.css");

:root {
  color-scheme: light;
  --bg: #f7f6f2;
  --surface: #fff;
  --surface-soft: #f0f2eb;
  --sidebar: #f1f1eb;
  --ink: #222f2c;
  --muted: #5e6b62;
  --muted-strong: #536258;
  --primary: #194d46;
  --primary-hover: #123d37;
  --primary-soft: #e4ece3;
  --border: #e3e6dd;
  --border-strong: #cad3c6;
  --sage: #e9efe3;
  --sand: #f4eddd;
  --amber: #be934d;
  --shadow: 0 8px 24px rgba(33, 53, 37, .045);
  --radius: 16px;
  --sidebar-width: 224px;
  font-family: "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.6; letter-spacing: -0.02em; word-break: keep-all; overflow-wrap: break-word; }
button, input, select, textarea { font: inherit; letter-spacing: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, select { cursor: pointer; touch-action: manipulation; }
button { color: inherit; }
button:disabled { opacity: .5; cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4, p { margin: 0; word-break: keep-all; }
h1, h2, h3, h4 { letter-spacing: -0.03em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { border: 0; }
button, input, select, textarea { outline-offset: 4px; }
:focus-visible { outline: 3px solid #90b4a4; outline-offset: 4px; }
::selection { background: #d9e7d8; color: #194d46; }
[hidden] { display: none !important; }
.icon { width: 20px; height: 20px; display: inline-block; flex-shrink: 0; vertical-align: middle; stroke-width: 1.7; }
.sr-only, .visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.app-shell { min-height: 100vh; }
.sidebar {
  width: var(--sidebar-width);
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  padding: 30px 20px 28px;
  display: flex;
  flex-direction: column;
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(101, 113, 95, 0.3) transparent;
}
.sidebar::-webkit-scrollbar {
  width: 5px;
}
.sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
  background: rgba(101, 113, 95, 0.28);
  border-radius: 999px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(101, 113, 95, 0.5);
}
.brand { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--primary); margin: 0 6px 28px; flex-shrink: 0; }
.brand-mark { height: 40px; width: 40px; border-radius: 50%; object-fit: cover; background: transparent; display: block; flex-shrink: 0; box-shadow: 0 2px 8px rgba(25,77,70,.15); }
.mobile-brand img { border-radius: 50%; object-fit: cover; box-shadow: 0 1px 4px rgba(25,77,70,.15); }
.brand-name { font-size: 23px; line-height: 1.15; font-weight: 750; letter-spacing: -.8px; }
.brand-caption { flex-basis: 100%; padding-left: 45px; margin-top: -9px; font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); }
.sidebar-label { padding: 0 15px; margin-bottom: 10px; font-size: 10px; font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase; color: #65715f; flex-shrink: 0; }
.nav-list { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.nav-link { display: flex; align-items: center; gap: 13px; padding: 12px 15px; min-height: 46px; width: 100%; color: #596950; border-radius: 10px; text-align: left; font-size: 13px; font-weight: 550; background: transparent; transition: color .18s, background .18s; }
.nav-link:hover { background: #e8ece1; color: var(--primary); }
.nav-link.active { background: var(--primary); color: #fff; box-shadow: 0 3px 9px rgba(25,77,70,.08); }
.nav-link .icon { width: 19px; height: 19px; }
.nav-link .nav-icon-img { width: 22px; height: 22px; object-fit: contain; flex-shrink: 0; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1)); transition: transform .2s cubic-bezier(0.34, 1.56, 0.64, 1); }
.nav-link:hover .nav-icon-img { transform: scale(1.15); }
.nav-link.active .nav-icon-img { transform: scale(1.1); filter: drop-shadow(0 2px 5px rgba(0,0,0,0.2)); }
.sidebar-bottom { margin-top: auto; padding-top: 20px; flex-shrink: 0; }
.my-part-mini { border: 1px solid var(--border-strong); border-radius: 12px; padding: 15px 14px; background: rgba(255,255,255,.33); font-size: 12px; color: var(--muted); }
.my-part-mini > span, .my-part-mini > small { display: block; }
.my-part-mini strong { display: block; color: var(--primary); font-size: 14px; margin-top: 4px; font-weight: 650; }
.my-part-mini .part-pill { display: inline-flex; margin-top: 7px; }
.sidebar-bottom > p { margin-top: 20px; font-size: 10px; text-align: center; letter-spacing: .2px; color: #65715f; }
.main-shell { margin-left: var(--sidebar-width); min-height: 100vh; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 94px; padding: 21px 48px; border-bottom: 1px solid var(--border); background: var(--bg); }
.topbar-kicker { display: block; color: var(--muted); font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase; margin-bottom: 2px; }
.topbar-title { font-weight: 650; font-size: 16px; letter-spacing: -.35px; }
.topbar-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.topbar-actions > span { font-size: 11px; color: var(--muted); margin-right: 7px; }
.icon-button { width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: transparent; color: var(--muted-strong); transition: border-color .18s, color .18s, background .18s; }
.icon-button:hover { border-color: var(--border-strong); color: var(--primary); background: var(--surface); }
.topbar-actions .avatar, .avatar { border-radius: 50%; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; background: #e4e8dc; color: var(--primary); font-size: 11px; font-weight: 700; }
#app { max-width: 1536px; margin: 0 auto; }
.page { padding: 32px 48px 24px; animation: page-enter .25s ease-out both; }
.home-intro { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.eyebrow { color: var(--primary); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.65px; margin-bottom: 6px; }
.home-intro h1, .page-heading h1 { font-size: 27px; line-height: 1.4; font-weight: 700; letter-spacing: -1.1px; }
.home-intro p, .page-heading p { margin-top: 7px; color: var(--muted); font-size: 12px; }
.intro-date { text-align: right; color: var(--muted); font-size: 11px; white-space: nowrap; padding-bottom: 3px; }
.intro-date .icon { width: 14px; height: 14px; margin-right: 4px; }
.search-box { margin-bottom: 24px; }
.search-bar, .search-input-wrap { display: flex; align-items: center; gap: 12px; border: 1px solid var(--border); border-radius: 12px; padding: 0 16px; background: var(--surface); height: 48px; width: 100%; box-sizing: border-box; margin-bottom: 18px; transition: border-color .18s, box-shadow .18s; }
.search-bar:focus-within, .search-input-wrap:focus-within { border-color: #a1b6a6; box-shadow: 0 0 0 3px rgba(161,182,166,.12); }
.search-bar label, .search-input-wrap label { flex: 0 0 auto; display: flex; color: #899285; }
.search-bar label .icon, .search-input-wrap label .icon, .search-bar > .icon, .search-input-wrap > .icon { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; }
.search-bar input, .search-input-wrap .search-input { border: 0 !important; padding: 10px 0 !important; background: transparent !important; width: 100% !important; min-width: 0 !important; flex: 1 !important; color: var(--ink) !important; font-size: 13px !important; outline: none !important; box-shadow: none !important; }
.search-bar input::placeholder, .search-input-wrap .search-input::placeholder, .search-input::placeholder { color: var(--muted); font-size: 13px; }
.search-bar button { padding: 5px 9px; min-height: 30px; border-radius: 6px; font-size: 11px; background: #f0f2eb; color: var(--muted-strong); white-space: nowrap; }
.search-hint { font-size: 10px; color: var(--muted); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; white-space: nowrap; }
.search-input { border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; background: var(--surface); color: var(--ink); font-size: 13px; width: 100%; box-sizing: border-box; outline: none; transition: border-color .18s, box-shadow .18s; }
.search-input:focus { border-color: #a1b6a6; box-shadow: 0 0 0 3px rgba(161,182,166,.12); }

.hero-panel { display: grid; grid-template-columns: 1.1fr 1fr; overflow: hidden; border-radius: var(--radius); background: var(--primary); color: #f7f8ef; min-height: 226px; margin-bottom: 32px; position: relative; }
.hero-copy { z-index: 1; padding: 28px 32px; }
.hero-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 9px; letter-spacing: 1px; color: #dce3c4; font-weight: 600; border: 1px solid rgba(220,227,196,.27); padding: 3px 8px; border-radius: 5px; margin-bottom: 14px; }
.hero-tag .icon { width: 12px; height: 12px; }
.hero-title { font-size: 27px; font-weight: 600; line-height: 1.45; letter-spacing: -1.1px; }
.hero-text { color: #adc8bc; font-size: 11px; line-height: 1.8; margin-top: 8px; max-width: 440px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 20px; }
.hero-actions .button.primary { background: #f1f0dc; color: #254d3f; border-color: #f1f0dc; font-size: 11px; min-height: 36px; padding: 9px 15px; }
.hero-actions .button.primary:hover { background: #fffdeb; }
.hero-actions .button.secondary, .hero-actions .button.ghost { background: transparent; color: #d4e0cf; border-color: rgba(217,229,213,.28); min-height: 36px; font-size: 11px; padding: 9px 15px; }
.hero-actions .icon { width: 14px; height: 14px; }
.hero-bottom { display: flex; align-items: center; gap: 7px; color: #9bbbae; font-size: 10px; margin-top: 17px; }
.hero-bottom .icon { width: 13px; height: 13px; }
.hero-art { position: relative; display: flex; align-items: center; justify-content: center; padding: 24px; overflow: hidden; background: radial-gradient(ellipse at 55% 80%, rgba(66,101,60,.5), transparent 70%); }
.hero-art::before, .hero-art::after { content: ""; position: absolute; width: 240px; height: 240px; border-radius: 50%; border: 1px solid rgba(219,229,189,.11); }
.hero-art::after { width: 320px; height: 320px; }
.hero-art > img { max-height: 205px; width: auto; position: relative; z-index: 1; }
.rhythm-bars { display: flex; align-items: center; justify-content: center; gap: 7px; height: 116px; position: relative; z-index: 1; transform: rotate(-5deg); }
.rhythm-bars span { display: block; width: 10px; height: 36%; background: #a2b788; border-radius: 8px; opacity: .85; box-shadow: 0 3px 16px rgba(0,0,0,.08); }
.rhythm-bars span:nth-child(2n) { height: 61%; background: #bac899; }
.rhythm-bars span:nth-child(3n) { height: 87%; background: #d5d5a1; }
.rhythm-bars span:nth-child(4n) { height: 100%; background: #eee1ad; }
.rhythm-bars span:nth-child(5n) { height: 73%; }
.hero-art .art-caption { position: absolute; bottom: 25px; font-size: 9px; letter-spacing: 3px; color: #93b09c; z-index: 2; }

.section { margin-bottom: 32px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-heading > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; }
.section-heading h2 { font-size: 16px; font-weight: 650; letter-spacing: -.45px; }
.section-note { color: var(--muted); font-size: 10px; font-weight: 400; }
.section-heading > a, .text-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 0 6px 7px; background: transparent; color: var(--muted-strong); font-size: 11px; min-height: 32px; white-space: nowrap; }
.text-button:hover { color: var(--primary); }
.text-button .icon { width: 13px; height: 13px; }
.song-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 19px; }
.song-card { min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; transition: transform .18s, box-shadow .18s, border-color .18s; }
.song-card:hover { transform: translateY(-3px); border-color: #cbd6c8; box-shadow: var(--shadow); }
.cover-wrap { position: relative; overflow: hidden; aspect-ratio: 1.38; background: var(--primary-soft); }
.song-cover { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.song-card:hover .song-cover { transform: scale(1.035); }
.cover-wrap > button:first-child { width: 100%; height: 100%; padding: 0; display: block; background: transparent; }
.status-badge { display: inline-flex; align-items: center; gap: 4px; border-radius: 4px; padding: 3px 7px; font-size: 8px; font-weight: 650; color: #345441; background: #e5eed5; backdrop-filter: blur(8px); }
.cover-wrap .status-badge { position: absolute; top: 11px; left: 11px; }
.status-badge.new, .status-badge.pending { color: #866239; background: #f6ecd0; }
.status-badge .icon { width: 9px; height: 9px; }
.cover-play { position: absolute; bottom: 12px; right: 12px; width: 33px; height: 33px; padding: 0; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.91); color: var(--primary); border-radius: 50%; box-shadow: 0 2px 9px rgba(20,36,30,.08); transition: transform .18s; }
.cover-play:hover { transform: scale(1.1); }
.cover-play .icon { width: 14px; height: 14px; }
.card-body { padding: 15px 14px 11px; }
.card-title { font-size: 13px; font-weight: 650; letter-spacing: -.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-title button, button.card-title { max-width: 100%; text-align: left; display: block; font-size: inherit; font-weight: inherit; letter-spacing: inherit; color: inherit; padding: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: transparent; }
.card-title button:hover { color: var(--primary); }
.card-artist { color: var(--muted); font-size: 10px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 12px; min-height: 19px; }
.badge { border-radius: 4px; padding: 2px 5px; background: var(--surface-soft); color: #5d6c51; font-size: 8px; line-height: 1.5; font-weight: 500; white-space: nowrap; }
.badge.difficulty { color: #7c643d; background: #f6f0e0; }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 7px; padding-top: 9px; margin-top: 10px; border-top: 1px solid var(--border); min-height: 33px; }
.part-preview { display: flex; flex-wrap: wrap; gap: 3px; }
.part-pill { display: inline-flex; align-items: center; justify-content: center; border-radius: 4px; padding: 2px 4px; background: var(--surface-soft); color: #5a6951; font-size: 8px; line-height: 1.5; min-width: 19px; }
.part-pill.my-part, .part-pill.active { color: var(--primary); background: var(--primary-soft); font-weight: 650; }
.favorite-button { display: inline-flex; align-items: center; justify-content: center; padding: 5px; margin-right: -4px; background: transparent; color: #718064; border-radius: 50%; }
.favorite-button .icon { width: 15px; height: 15px; }
.favorite-button:hover, .favorite-button.active, .favorite-button[aria-pressed="true"] { color: #947139; }
.favorite-button[aria-pressed="true"] .icon { fill: currentColor; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 32px; }
.quick-panel { border-radius: 12px; border: 1px solid var(--border); padding: 22px 23px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.quick-panel.sage { background: var(--sage); border-color: #dfe7d6; }
.quick-panel.sand { background: var(--sand); border-color: #eee5d1; }
.quick-panel h3 { font-size: 13px; font-weight: 650; letter-spacing: -.3px; }
.quick-panel p { color: var(--muted); font-size: 10px; margin-top: 3px; }
.quick-panel .icon { margin-right: 6px; width: 15px; height: 15px; }
.quick-panel .button { min-height: 32px; font-size: 10px; padding: 7px 11px; background: rgba(255,255,255,.55); border-color: rgba(149,162,137,.25); }
.part-select { min-width: 96px; max-width: 100%; color: var(--primary); background: rgba(255,255,255,.5); border: 1px solid #c6d4bd; border-radius: 7px; padding: 7px 11px; font-size: 11px; }
.recent-list { border-top: 1px solid var(--border); }
.recent-row { display: flex; align-items: center; gap: 13px; padding: 13px 1px; border-bottom: 1px solid var(--border); }
.recent-art { width: 42px; height: 42px; border-radius: 6px; object-fit: cover; flex: 0 0 auto; }
.recent-info { min-width: 0; flex: 1; }
.recent-info h3, .recent-info strong { display: block; font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-info p, .recent-info small { display: block; font-size: 9px; margin-top: 2px; color: var(--muted); }
.recent-part { color: var(--muted); font-size: 9px; margin-right: 14px; }
.recent-row-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.recent-play { display: flex; align-items: center; justify-content: center; height: 30px; width: 30px; border: 1px solid var(--border); border-radius: 50%; color: var(--primary); background: var(--surface); }
.recent-play .icon { width: 12px; height: 12px; }

.app-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 0 4px; margin-top: 10px; border-top: 1px solid var(--border); color: #65715f; font-size: 9px; }
.app-footer a:hover { color: var(--primary); }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 11px 18px; min-height: 42px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 8px; color: var(--primary); font-size: 12px; font-weight: 600; line-height: 1.4; white-space: nowrap; transition: background .18s, border-color .18s, transform .18s; }
.button:hover { background: var(--surface-soft); border-color: #a9b9a2; }
.button.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.button.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.button.secondary { background: var(--surface); }
.button.ghost { background: transparent; border-color: transparent; }
.button.small { min-height: 34px; padding: 7px 12px; font-size: 11px; }
.button.danger { background: #bd4236; border-color: #bd4236; color: #fff; }
.button.danger:hover { background: #a3352b; border-color: #a3352b; }
.button.danger-text, .text-button.danger-text { color: #c94a38; }
.button.danger-text:hover, .text-button.danger-text:hover { color: #a3352b; background: rgba(201, 74, 56, .08); }
.icon-button-tiny { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border); background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; transition: all .15s ease; flex-shrink: 0; }
.icon-button-tiny:hover { background: rgba(201, 74, 56, .12); color: #c94a38; border-color: #e59990; }
.icon-button-tiny .icon { width: 13px; height: 13px; }
.button .icon { width: 16px; height: 16px; }
.notice, .demo-banner { border: 1px solid var(--border); background: var(--surface-soft); border-radius: 9px; padding: 12px 15px; display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted-strong); margin-bottom: 20px; }
.notice.warning, .demo-banner { background: #f9f1df; border-color: #eddfbc; color: #765f36; }
.notice .icon { width: 16px; height: 16px; }
.demo-banner a { text-decoration: underline; text-underline-offset: 3px; }
.empty-state, .error-state, .loading-state { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 280px; border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 40px 20px; text-align: center; background: var(--surface); }
.empty-state > .icon, .error-state > .icon, .loading-state > .icon { color: #9baa92; width: 34px; height: 34px; margin-bottom: 18px; }
.empty-state h2, .empty-state h3, .error-state h2, .loading-state h2 { font-size: 17px; font-weight: 600; }
.empty-state p, .error-state p, .loading-state p { font-size: 12px; color: var(--muted); margin-top: 8px; max-width: 370px; }
.empty-state .button, .error-state .button { margin-top: 20px; }
.loading-state::before { content: ""; width: 26px; height: 26px; border: 2px solid var(--border); border-top-color: var(--primary); border-radius: 50%; margin-bottom: 20px; animation: spin 1s linear infinite; }
.page-heading { margin-bottom: 27px; }
.page-heading .eyebrow { margin-bottom: 5px; }
.filter-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 19px 21px; margin-bottom: 23px; }
.filter-row { display: flex; align-items: center; gap: 15px; margin-bottom: 13px; }
.filter-row:last-of-type { margin-bottom: 0; }
.filter-label { flex: 0 0 44px; color: var(--muted-strong); font-size: 11px; font-weight: 600; }
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { background: var(--surface-soft); border: 1px solid var(--border); color: var(--muted); border-radius: 8px; font-size: 12px; font-weight: 500; padding: 6px 13px; min-height: 34px; display: inline-flex; align-items: center; justify-content: center; transition: border-color .18s, color .18s, background .18s; white-space: nowrap; user-select: none; }
.chip:hover { color: var(--primary); border-color: var(--border-strong); background: var(--primary-soft); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.filter-selects { display: flex; flex-wrap: wrap; gap: 14px; padding-top: 15px; margin-top: 16px; border-top: 1px solid var(--border); }
.filter-selects label { display: flex; gap: 9px; align-items: center; color: var(--muted); font-size: 11px; }
.filter-selects select, .settings-panel select, .settings-panel input, .settings-panel textarea { border: 1px solid var(--border); border-radius: 6px; color: var(--ink); background: var(--bg); padding: 7px 10px; min-height: 34px; max-width: 100%; font-size: 11px; }
.filter-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 16px; font-size: 11px; color: var(--muted); }
.filter-summary strong { color: var(--primary); }
.filter-summary .text-button { padding: 0; }
.back-link { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-size: 11px; margin-bottom: 23px; min-height: 32px; }
.back-link .icon { width: 14px; height: 14px; }
.detail-layout { display: grid; grid-template-columns: minmax(200px, 310px) 1fr; gap: 34px; align-items: start; margin-bottom: 35px; }
.detail-layout.no-cover { grid-template-columns: 1fr; margin-bottom: 24px; }
.detail-cover { overflow: hidden; border-radius: 14px; background: var(--primary-soft); box-shadow: var(--shadow); }
.detail-cover img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.detail-content { padding-top: 4px; min-width: 0; }
.detail-content h1 { font-size: 29px; letter-spacing: -1.15px; font-weight: 700; line-height: 1.45; }
.detail-content > p { color: var(--muted); margin-top: 8px; font-size: 13px; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 10px 18px; font-size: 11px; color: var(--muted-strong); margin-top: 20px; }
.detail-meta .icon { width: 14px; height: 14px; margin-right: 4px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 17px; }
.tag { font-size: 10px; color: var(--muted-strong); background: var(--surface-soft); border: 1px solid var(--border); border-radius: 5px; padding: 3px 8px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 25px; }
.part-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 26px; }
.part-button { padding: 17px 10px; min-height: 95px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; font-size: 12px; color: var(--ink); font-weight: 650; text-align: center; transition: border-color .18s, background .18s, transform .18s; }
.part-button:hover { background: var(--primary-soft); border-color: #a2b69a; transform: translateY(-2px); }
.part-button.my-part { border-color: #769975; background: var(--primary-soft); color: var(--primary); }
.part-button .icon { display: block; margin: 0 auto 9px; width: 19px; height: 19px; color: var(--primary); }
.part-subtitle { display: block; color: var(--muted); font-size: 9px; font-weight: 400; margin-top: 5px; }
.part-button:disabled { opacity: .4; }
.memo-panel, .progress-panel { border: 1px solid var(--border); background: var(--surface); border-radius: 12px; padding: 22px 24px; margin-bottom: 22px; }
.memo-panel h2, .memo-panel h3, .progress-panel h2, .progress-panel h3 { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.memo-panel p { color: var(--muted-strong); font-size: 12px; line-height: 1.9; white-space: pre-line; }
.progress-panel > div:first-child { display: flex; justify-content: space-between; gap: 10px; }
.progress-panel small { color: var(--muted); font-size: 11px; }
.progress-track { height: 5px; background: var(--surface-soft); overflow: hidden; border-radius: 10px; margin-top: 12px; }
.progress-fill { height: 100%; background: #6b9875; border-radius: 10px; transition: width .3s; }
.practice-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.practice-heading h1 { font-size: 25px; letter-spacing: -.8px; }
.practice-heading p { color: var(--muted); font-size: 11px; margin-top: 5px; }
.part-indicator { border: 1px solid #b2c4a8; background: var(--primary-soft); color: var(--primary); border-radius: 7px; padding: 7px 11px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.practice-layout { margin-bottom: 23px; }
.player-panel { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #172a25; border-radius: 14px; overflow: hidden; }
.player-panel iframe { width: 100%; height: 100%; border: 0; display: block; }
.player-placeholder { width: 100%; height: 100%; position: relative; }
.player-placeholder > img { height: 100%; width: 100%; object-fit: cover; opacity: .62; }
.player-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: rgba(10,30,23,.38); color: #fff; text-align: center; padding: 30px; }
.player-overlay h2 { font-size: 21px; font-weight: 600; }
.player-overlay p { color: #d0dac9; font-size: 12px; max-width: 460px; }
.player-overlay > .icon { width: 44px; height: 44px; }
.player-overlay .button { background: #eef0df; color: #254d3f; border-color: #eef0df; }
.player-actions { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 13px; }
.player-actions > div { display: flex; align-items: center; gap: 8px; }
.player-actions .button { font-size: 11px; min-height: 35px; padding: 8px 12px; }
.player-actions > p { font-size: 10px; color: var(--muted); }
.practice-content { display: grid; grid-template-columns: 1.25fr 1fr; gap: 20px; }
.checklist-panel, .timer-panel { border: 1px solid var(--border); background: var(--surface); border-radius: 12px; padding: 23px; }
.checklist-panel h2, .timer-panel h2 { font-size: 14px; font-weight: 600; }
.checklist-panel > p, .timer-panel > p { color: var(--muted); font-size: 10px; margin: 5px 0 18px; }
.check-item { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 12px; cursor: pointer; }
.check-item input { accent-color: var(--primary); width: 15px; height: 15px; margin: 0; cursor: pointer; }
.check-item input:checked + span { color: var(--muted); text-decoration: line-through; }
.timer-panel { text-align: center; }
.timer-value { font-variant-numeric: tabular-nums; font-size: 43px; line-height: 1.5; color: var(--primary); letter-spacing: 2px; font-weight: 500; margin: 14px 0 20px; }
.timer-controls { display: flex; justify-content: center; gap: 8px; }
.timer-controls .button { min-width: 85px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.settings-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 24px; }
.settings-panel h2 { font-size: 15px; font-weight: 650; margin-bottom: 5px; }
.settings-panel > p { color: var(--muted); font-size: 11px; margin-bottom: 20px; }
.setting-options, .theme-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.choice-button { min-height: 43px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--muted-strong); padding: 10px 8px; font-size: 11px; }
.choice-button:hover { border-color: var(--border-strong); color: var(--primary); }
.choice-button.active { border-color: #9eb796; background: var(--primary-soft); color: var(--primary); font-weight: 650; }
.choice-button .icon { display: block; margin: 0 auto 6px; }
.settings-panel .setting-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 12px; }
.settings-panel .setting-row:last-child { border: 0; }
.settings-panel .setting-row small { display: block; color: var(--muted); font-size: 10px; margin-top: 3px; }
.settings-panel .button { margin-top: 16px; }

.bottom-nav { display: none; }
.toast { position: fixed; bottom: 25px; left: calc(50% + var(--sidebar-width) / 2); transform: translateX(-50%); max-width: min(480px, calc(100vw - 40px)); z-index: 100; display: flex; align-items: center; gap: 8px; padding: 12px 19px; background: #243e33; color: #eff3e9; border-radius: 9px; font-size: 12px; box-shadow: 0 8px 30px rgba(15,35,25,.2); }
.toast .icon { width: 15px; height: 15px; }
dialog:not([open]) { display: none !important; }
dialog[open].memory-lightbox-dialog { display: flex !important; flex-direction: column !important; }
.dialog-close-x, .share-dialog .dialog-close-x { width: 32px; height: 32px; border: 0; background: transparent; font-size: 16px; color: var(--muted); border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; flex-shrink: 0; }
.dialog-close-x:hover, .share-dialog .dialog-close-x:hover { background: var(--surface-soft); color: var(--ink); }

dialog.share-dialog { width: min(440px, calc(100vw - 36px)); margin: auto; background: var(--surface); color: var(--ink); border: 1px solid var(--border); padding: 28px; border-radius: 15px; box-shadow: 0 15px 70px rgba(18,39,27,.15); }
dialog::backdrop { background: rgba(17,38,28,.35); backdrop-filter: blur(3px); }
.share-dialog h2 { font-size: 19px; margin-bottom: 8px; letter-spacing: -.5px; }
.share-dialog p { font-size: 12px; color: var(--muted); margin-bottom: 20px; }
.share-input { display: flex; gap: 8px; }
.share-input input { min-width: 0; width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: 11px; background: var(--bg); color: var(--ink); }
.share-input .button { flex-shrink: 0; }
.share-dialog .dialog-actions { display: flex; justify-content: flex-end; margin-top: 15px; }
.share-dialog > .icon-button { position: absolute; top: 15px; right: 15px; width: 30px; height: 30px; }

/* Admin pages share the same calm, compact visual language. */
.admin-shell { max-width: 1100px; margin: 0 auto; padding: 40px 28px; }
.admin-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.admin-header h1 { font-size: 25px; letter-spacing: -.8px; }
.admin-header p { color: var(--muted); font-size: 12px; margin-top: 5px; }
.admin-panel, .form-panel { padding: 24px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); margin-bottom: 20px; }
.admin-panel h2, .form-panel h2 { font-size: 16px; margin-bottom: 17px; }
.admin-panel label, .form-panel label, .form-field label { display: block; font-size: 11px; font-weight: 600; margin-bottom: 6px; }
.admin-panel input, .admin-panel select, .admin-panel textarea, .form-panel input, .form-panel select, .form-panel textarea, .form-field input, .form-field select, .form-field textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 7px; background: var(--bg); color: var(--ink); font-size: 12px; }
.admin-panel textarea, .form-panel textarea { min-height: 100px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-field { margin-bottom: 15px; min-width: 0; }
.form-field small, .form-help { display: block; font-size: 10px; color: var(--muted); margin-top: 5px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.admin-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 11px; }
.admin-table th { color: var(--muted); font-weight: 600; padding: 12px 10px; background: var(--surface-soft); }
.admin-table td { padding: 13px 10px; border-bottom: 1px solid var(--border); }
.table-wrap { overflow-x: auto; }
.admin-table .button { min-height: 30px; padding: 5px 9px; font-size: 10px; }

/* App-specific compositions. */
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 200; padding: 10px 16px; border-radius: 8px; background: var(--primary); color: var(--bg); font-weight: 600; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.brand { flex-wrap: nowrap; margin-left: 1px; margin-right: 0; }
.brand > span { display: flex; flex-direction: column; min-width: 0; }
.brand-caption { margin-top: 6px; padding-left: 0; font-size: 9px; line-height: 1.5; letter-spacing: .1px; }
.brand-dot { color: var(--amber); }
.brand-mark { flex-shrink: 0; }
.my-part-mini { display: grid; grid-template-columns: 18px minmax(0,1fr); gap: 6px 9px; align-items: start; }
.my-part-mini > .icon { width: 16px; height: 16px; margin-top: 2px; color: var(--primary); }
.my-part-mini span { font-size: 10px; }
.my-part-mini strong { font-size: 12px; line-height: 1.6; }
.my-part-mini .text-button { grid-column: 2; min-height: 26px; padding: 0; justify-content: flex-start; font-size: 10px; }
.home-intro h1 span { color: var(--primary); }
.search-bar > .icon { width: 17px; height: 17px; color: #899285; }
.hero-art > .hero-cover { width: 175px; height: 175px; object-fit: cover; border-radius: 9px; box-shadow: 0 15px 25px rgba(6,27,19,.2); transform: rotate(7deg); }
.hero-art-label { position: absolute; bottom: 17px; color: #aac0a5; font-size: 8px; letter-spacing: 2px; z-index: 2; }
.section > .hero-panel { margin-bottom: 0; }
.page > .song-grid { margin-top: -7px; margin-bottom: 32px; }
.card-title-row { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.card-title-row .card-title { min-width: 0; flex: 1; }
.title-button { padding: 0; background: transparent; color: inherit; font-size: inherit; font-weight: inherit; text-align: left; }
.title-button:hover { color: var(--primary); }
.card-title-row .favorite-button { flex-shrink: 0; }
.card-meta > span:not(.badge) { font-size: 8px; color: var(--muted); }
.card-meta > span + span { position: relative; }
.card-meta > span:not(.badge) + span:not(.badge)::before { content: "·"; margin-right: 4px; }
.card-footer { flex-direction: column; align-items: stretch; gap: 9px; padding-top: 10px; }
.card-footer > .button { min-height: 30px; padding: 6px 8px; font-size: 9px; background: #eff3e9; border-color: #e0e8d8; color: var(--primary); }
.card-footer > .button:hover { background: var(--primary-soft); }
.card-footer > .button .icon { width: 12px; height: 12px; }
.part-preview { align-items: center; min-height: 15px; }
.part-more, .part-empty { font-size: 8px; color: var(--muted); }
.part-pill.mine { background: var(--primary-soft); color: var(--primary); font-weight: 650; }
.quick-panel { display: grid; grid-template-columns: minmax(0,1fr) auto; column-gap: 18px; row-gap: 5px; }
.quick-panel-title { display: flex; align-items: center; gap: 7px; grid-column: 1; }
.quick-panel-title .icon { margin: 0; }
.quick-panel > p { grid-column: 1; margin: 0; }
.quick-panel > .button { grid-column: 2; grid-row: 1 / span 2; }
.quick-panel:has(.random-result) { grid-template-columns: minmax(0,1fr) auto auto; }
.quick-panel:has(.random-result) > .button:last-child { grid-column: 3; }
.random-result { display: flex; align-items: center; gap: 10px; grid-column: 1; padding-top: 5px; min-width: 0; }
.random-result > div { min-width: 0; }
.random-result strong { font-size: 12px; font-weight: 600; }
.random-result p { font-size: 10px; margin-top: 2px; }
.main-shell > .app-footer { margin: 12px 48px 0; padding-bottom: 25px; max-width: 1440px; }
.detail-content .eyebrow { color: var(--primary); font-size: 10px; margin: 0 0 9px; }
.detail-content .progress-panel { margin-top: 22px; margin-bottom: 0; padding: 15px; background: var(--surface-soft); }
.progress-label { font-size: 11px; color: var(--muted-strong); }
.progress-label strong { color: var(--primary); font-weight: 650; }
.my-part-callout { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 25px; padding: 16px 20px; background: var(--primary-soft); border: 1px solid var(--border-strong); border-radius: 10px; }
.my-part-callout .eyebrow { margin: 0; }
.back-button { padding-left: 0; margin-bottom: 18px; }
.part-button > strong { display: block; }
.part-button > .icon { margin-top: 10px; margin-bottom: 0; width: 14px; height: 14px; }
.memo-panel { font-size: 12px; color: var(--muted-strong); line-height: 1.9; white-space: pre-line; }
.player-panel { aspect-ratio: auto; background: transparent; overflow: visible; border-radius: 0; }
.player-screen { aspect-ratio: 16 / 9; background: #16362c; border-radius: 12px; overflow: hidden; position: relative; }
.player-frame { height: 100%; width: 100%; border: 0; display: block; }
.player-play { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 15px; background: #16362c; padding: 0; color: #fff; overflow: hidden; }
.player-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; transition: opacity .2s; }
.player-play:hover .player-poster { opacity: .7; }
.player-play-icon { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; padding-left: 4px; width: 64px; height: 64px; border-radius: 50%; background: #f3f2de; color: #28563c; box-shadow: 0 4px 24px rgba(0,0,0,.2); font-size: 20px; }
.player-play-label { position: relative; z-index: 1; color: #fff; font-size: 13px; text-shadow: 0 1px 8px #132f20; }
.player-external { margin-top: 13px; }
.player-help { margin: 8px 0 16px; font-size: 10px; color: var(--muted); }
.player-empty, .player-error { display: flex; align-items: center; justify-content: center; padding: 30px; color: #bbcbbb; font-size: 13px; text-align: center; }

/* --- 모바일 가로 확대 / 전체 화면 시어터 모드 (Landscape Theater) --- */
.player-expand-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  background: rgba(22, 54, 44, 0.88);
  color: #f1f8f3;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
  transition: background 0.18s, transform 0.15s, box-shadow 0.18s;
  user-select: none;
}
.player-expand-btn:hover {
  background: rgba(35, 77, 60, 0.96);
  color: #fff;
  transform: scale(1.04);
}
.player-expand-btn:active {
  transform: scale(0.97);
}
.player-expand-btn .expand-icon {
  font-size: 12px;
}

.theater-exit-btn,
.theater-rotate-btn {
  display: none;
}

body.has-landscape-player {
  overflow: hidden !important;
  touch-action: none;
}

.player-screen.theater-landscape {
  position: fixed !important;
  z-index: 9999999 !important;
  inset: auto !important;
  top: 50% !important;
  left: 50% !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: #000000 !important;
  aspect-ratio: auto !important;
  width: 100vh !important;
  height: 100vw !important;
  width: 100dvh !important;
  height: 100dvw !important;
  transform: translate(-50%, -50%) rotate(var(--theater-rotate-angle, 90deg)) !important;
  transform-origin: center center !important;
  box-shadow: none !important;
}

.player-screen.theater-landscape .player-frame {
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  border-radius: 0 !important;
}

.player-screen.theater-landscape .player-expand-btn {
  display: none !important;
}

.player-screen.theater-landscape .theater-exit-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 10000000;
  background: rgba(15, 25, 20, 0.85);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.55);
  transition: background 0.18s, transform 0.15s;
  user-select: none;
}

.player-screen.theater-landscape .theater-rotate-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10000000;
  background: rgba(15, 25, 20, 0.85);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.55);
  transition: background 0.18s, transform 0.15s;
  user-select: none;
}

.player-screen.theater-landscape .theater-exit-btn:hover,
.player-screen.theater-landscape .theater-rotate-btn:hover {
  background: rgba(30, 58, 44, 0.95);
  transform: scale(1.05);
}

.player-screen.theater-landscape .theater-exit-btn:active,
.player-screen.theater-landscape .theater-rotate-btn:active {
  transform: scale(0.96);
}

@media (orientation: landscape) {
  .player-screen.theater-landscape {
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    width: 100dvw !important;
    height: 100dvh !important;
    transform: none !important;
  }
  .player-screen.theater-landscape .theater-rotate-btn {
    display: none !important;
  }
}
.player-actions { justify-content: flex-start; margin-top: 0; }
.player-actions .favorite-button { margin-left: auto; }
.part-switcher { display: flex; align-items: center; justify-content: space-between; gap: 15px; border-top: 1px solid var(--border); margin: 21px 0 24px; padding-top: 18px; }
.part-switcher > span { color: var(--muted); font-size: 11px; }
.part-switcher .button { min-height: 36px; padding: 8px 12px; font-size: 11px; }
.checklist-panel .eyebrow, .timer-panel .eyebrow { color: var(--primary); margin: 0 0 7px; }
.checklist-panel .progress-panel { padding: 13px; margin: 16px 0 12px; background: var(--bg); }
.timer-panel > .icon { width: 22px; height: 22px; color: var(--primary); margin: 0 0 10px; }
.timer-panel > .timer-value { color: var(--primary); font-size: 43px; margin: 18px 0 3px; }
.timer-panel > .timer-status { margin: 0 0 18px; font-size: 10px; color: var(--muted); }
.settings-panel > .icon { width: 22px; height: 22px; color: var(--primary); margin-bottom: 13px; }
.setting-options .choice-button { min-height: 65px; }
.setting-options .choice-button strong { display: block; font-weight: 600; }
.setting-options .choice-button span { display: block; font-size: 8px; margin-top: 5px; font-weight: 400; opacity: .8; }
.danger { color: #955747; }
.share-dialog > label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 6px; }
input.share-input { width: 100%; display: block; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); padding: 11px 12px; font-size: 12px; color: var(--ink); }
.share-dialog form { text-align: right; margin-top: 18px; }

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #18221e;
  --surface: #202d26;
  --surface-soft: #2a372d;
  --sidebar: #15221c;
  --ink: #e1e8dc;
  --muted: #9ba895;
  --muted-strong: #b0bda8;
  --primary: #abcba3;
  --primary-hover: #bfd8b8;
  --primary-soft: #354a34;
  --border: #344435;
  --border-strong: #4a6048;
  --sage: #293a2b;
  --sand: #383529;
  --shadow: 0 8px 24px rgba(0,0,0,.12);
}
html[data-theme="dark"] .brand-mark, html[data-theme="dark"] .nav-link.active, html[data-theme="dark"] .button.primary, html[data-theme="dark"] .chip.active { color: #1c3524; }
html[data-theme="dark"] .nav-link:hover { background: #2a372d; }
html[data-theme="dark"] .my-part-mini { background: #1c2c22; }
html[data-theme="dark"] .hero-panel { background: #234737; }
html[data-theme="dark"] .hero-actions .button.primary { background: #e5e1bf; }
html[data-theme="dark"] .search-bar button, html[data-theme="dark"] .avatar { background: #344333; }
html[data-theme="dark"] .cover-play { background: #dae5cf; color: #254d3f; }
html[data-theme="dark"] .quick-panel.sage, html[data-theme="dark"] .quick-panel.sand { border-color: var(--border); }
html[data-theme="dark"] .quick-panel .button, html[data-theme="dark"] .part-select { background: rgba(22,35,24,.35); border-color: var(--border-strong); }
html[data-theme="dark"] .badge.difficulty { background: #403c2b; color: #c4b787; }
html[data-theme="dark"] .notice.warning, html[data-theme="dark"] .demo-banner { color: #d0be90; background: #373223; border-color: #4c4430; }
html[data-theme="dark"] .choice-button.active, html[data-theme="dark"] .part-button.my-part, html[data-theme="dark"] .part-indicator { border-color: #6c8a5f; }
html[data-theme="dark"] .card-footer > .button { background: #2b3b2b; border-color: var(--border-strong); color: var(--primary); }
html[data-theme="dark"] .card-footer > .button:hover { background: var(--primary-soft); }

@media (min-width: 1650px) {
  .song-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .hero-panel { min-height: 250px; }
}
@media (max-width: 1240px) {
  :root { --sidebar-width: 204px; }
  .sidebar { padding-left: 17px; padding-right: 17px; }
  .brand { margin-left: 7px; }
  .topbar { padding-left: 32px; padding-right: 32px; }
  .page { padding-left: 32px; padding-right: 32px; }
  .song-grid { gap: 14px; }
  .card-body { padding: 13px 11px 9px; }
  .hero-copy { padding-left: 26px; padding-right: 20px; }
  .hero-title { font-size: 25px; }
  .part-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .quick-panel { padding: 19px; }
}
@media (max-width: 1023px) {
  :root { --sidebar-width: 190px; }
  .sidebar { padding-left: 13px; padding-right: 13px; }
  .brand { margin-left: 6px; gap: 8px; }
  .brand-name { font-size: 21px; }
  .brand-mark { width: 32px; height: 32px; }
  .brand-caption { font-size: 9px; padding-left: 40px; }
  .nav-link { padding-left: 13px; }
  .topbar { min-height: 84px; padding: 20px 25px; }
  .page { padding: 28px 25px 22px; }
  .song-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
  .home-intro h1, .page-heading h1 { font-size: 25px; }
  .intro-date { display: none; }
  .hero-panel { grid-template-columns: 1.4fr 1fr; }
  .hero-copy { padding: 26px; }
  .hero-title { font-size: 23px; }
  .hero-art { padding: 15px; }
  .rhythm-bars { gap: 5px; }
  .rhythm-bars span { width: 8px; }
  .quick-grid { gap: 15px; }
  .quick-panel { align-items: flex-start; }
  .quick-panel p { font-size: 9px; }
  .quick-panel .part-select { min-width: 90px; }
  .detail-layout { grid-template-columns: 230px 1fr; gap: 24px; }
  .detail-content h1 { font-size: 25px; }
  .practice-content { grid-template-columns: 1fr 1fr; gap: 15px; }
  .settings-grid { gap: 16px; }
  .settings-panel { padding: 20px; }
}
@media (max-width: 767px) {
  :root { --sidebar-width: 0px; }
  body { font-size: 15px; }
  .sidebar { display: none; }
  .main-shell { margin-left: 0; padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); padding-bottom: max(88px, calc(76px + env(safe-area-inset-bottom, 16px))); }
  .topbar { min-height: 78px; padding: 17px 22px; }
  .topbar-kicker { font-size: 9px; }
  .topbar-title { font-size: 17px; color: var(--primary); letter-spacing: -.5px; }
  .topbar-actions { gap: 8px; }
  .topbar-actions > span { display: none; }
  .icon-button { width: 38px; height: 38px; }
  .page { padding: 25px 22px 22px; }
  .home-intro { margin-bottom: 21px; }
  .home-intro h1, .page-heading h1 { font-size: 25px; }
  .home-intro p, .page-heading p { font-size: 11px; margin-top: 6px; }
  .eyebrow { font-size: 9px; }
  .search-bar, .search-input-wrap { height: 46px; margin-bottom: 16px; padding: 0 13px; }
  .search-bar input, .search-input-wrap .search-input, .search-input { font-size: 12px; }
  .search-hint { display: none; }
  .hero-panel { min-height: 222px; margin-bottom: 26px; grid-template-columns: 1.65fr 1fr; }
  .hero-copy { padding: 24px; }
  .hero-title { font-size: 24px; }
  .hero-text { font-size: 10px; }
  .hero-tag { font-size: 8px; margin-bottom: 10px; }
  .hero-actions { margin-top: 18px; gap: 7px; }
  .hero-art { padding: 10px; }
  .hero-art::before { width: 170px; height: 170px; }
  .hero-art::after { width: 220px; height: 220px; }
  .rhythm-bars { height: 95px; gap: 4px; }
  .rhythm-bars span { width: 7px; }
  .hero-art .art-caption { font-size: 7px; letter-spacing: 2px; bottom: 30px; }
  .section { margin-bottom: 27px; }
  .section-heading { margin-bottom: 14px; }
  .section-heading h2 { font-size: 15px; }
  .section-note { font-size: 9px; }
  .section-heading > div { gap: 8px; }
  .text-button { min-height: 38px; }
  .song-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
  .cover-wrap { aspect-ratio: 1.25; }
  .card-body { padding: 14px 13px 10px; }
  .card-title { font-size: 13px; }
  .card-artist { font-size: 10px; }
  .favorite-button { min-width: 36px; min-height: 36px; margin: -4px -7px; }
  .favorite-button .icon { width: 16px; height: 16px; }
  .cover-play { width: 36px; height: 36px; }
  .quick-grid { gap: 13px; margin-bottom: 26px; }
  .quick-panel { padding: 17px; gap: 13px; }
  .quick-panel h3 { font-size: 12px; }
  .quick-panel .part-select { min-height: 38px; font-size: 10px; }
  .recent-row { gap: 11px; padding: 12px 0; }
  .recent-art { width: 40px; height: 40px; }
  .recent-part { margin-right: 3px; font-size: 9px; }
  .recent-play { width: 36px; height: 36px; }
  .bottom-nav { display: flex; justify-content: flex-start; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; position: fixed; inset: auto 0 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--border); padding: 7px 8px calc(16px + env(safe-area-inset-bottom, 0px)); padding-bottom: max(16px, calc(10px + env(safe-area-inset-bottom, 0px))); box-shadow: 0 -3px 20px rgba(22,43,24,.025); }
  .bottom-nav::-webkit-scrollbar { display: none; }
  .bottom-nav .nav-link { min-height: 50px; min-width: 58px; flex: 0 0 auto; width: auto; padding: 5px 6px 6px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 3px; font-size: 11px; line-height: 1.35; border-radius: 10px; white-space: nowrap; }
  .bottom-nav .nav-link span { display: block; line-height: 1.35; padding-bottom: 1px; }
  .bottom-nav .nav-link .icon { width: 19px; height: 19px; }
  .bottom-nav .nav-link .nav-icon-img { width: 20px; height: 20px; object-fit: contain; flex-shrink: 0; }
  .bottom-nav .nav-link.active { background: var(--primary-soft); color: var(--primary); box-shadow: none; }
  .toast { left: 50%; bottom: calc(94px + env(safe-area-inset-bottom, 0px)); bottom: max(94px, calc(84px + env(safe-area-inset-bottom, 0px))); font-size: 11px; padding: 11px 16px; width: max-content; }
  .page-heading { margin-bottom: 23px; }
  .filter-panel { padding: 17px 15px; margin-bottom: 19px; }
  .filter-row { align-items: flex-start; gap: 8px; margin-bottom: 12px; }
  .filter-label { flex-basis: 36px; padding-top: 7px; font-size: 10px; }
  .chip-group { gap: 6px; }
  .chip { font-size: 11px; padding: 6px 10px; min-height: 33px; }
  .filter-selects { gap: 12px; }
  .filter-selects label { font-size: 10px; gap: 7px; }
  .filter-selects select { font-size: 10px; min-height: 36px; }
  .back-link { margin-bottom: 18px; }
  .detail-layout { grid-template-columns: 170px 1fr; gap: 21px; margin-bottom: 27px; }
  .detail-content h1 { font-size: 24px; }
  .detail-content > p { font-size: 11px; margin-top: 5px; }
  .detail-meta { font-size: 10px; margin-top: 13px; gap: 8px 12px; }
  .tag-list { margin-top: 11px; }
  .tag { font-size: 9px; }
  .detail-actions { margin-top: 16px; gap: 7px; }
  .detail-actions .button { padding: 9px 11px; min-height: 38px; font-size: 10px; }
  .part-grid { gap: 9px; }
  .part-button { min-height: 88px; padding: 14px 8px; font-size: 11px; }
  .memo-panel, .progress-panel { padding: 19px; }
  .practice-heading { align-items: flex-start; }
  .practice-heading h1 { font-size: 22px; }
  .part-indicator { padding: 6px 9px; font-size: 10px; margin-top: 4px; }
  .player-panel { border-radius: 11px; }
  .player-overlay { gap: 8px; padding: 18px; }
  .player-overlay h2 { font-size: 17px; }
  .player-overlay p { font-size: 10px; }
  .player-overlay > .icon { width: 28px; height: 28px; }
  .player-overlay .button { min-height: 36px; padding: 8px 12px; font-size: 11px; }
  .practice-content { gap: 13px; }
  .checklist-panel, .timer-panel { padding: 18px; }
  .check-item { font-size: 11px; min-height: 39px; }
  .timer-value { font-size: 36px; }
  .timer-controls .button { min-width: 65px; font-size: 10px; padding: 9px; }
  .settings-grid { gap: 15px; }
  .setting-options, .theme-options { gap: 6px; }
  .settings-panel { padding: 19px; }
  .choice-button { font-size: 10px; padding: 10px 5px; }
  .app-footer { font-size: 8px; padding-top: 17px; flex-wrap: wrap; }
  .admin-shell { padding: 28px 20px 40px; }
  .admin-panel, .form-panel { padding: 20px; }
}
@media (max-width: 479px) {
  .topbar { padding-left: 19px; padding-right: 19px; }
  .page { padding: 23px 19px 20px; }
  .home-intro h1, .page-heading h1 { font-size: 23px; }
  .home-intro p { font-size: 10px; }
  .hero-panel { grid-template-columns: 1fr; min-height: 227px; }
  .hero-copy { padding: 25px 23px; }
  .hero-title { font-size: 25px; }
  .hero-text { max-width: 240px; font-size: 10px; }
  .hero-art { position: absolute; inset: 40px -62px 14px auto; width: 190px; opacity: .25; transform: rotate(7deg); }
  .hero-art .art-caption { display: none; }
  .hero-actions { gap: 7px; position: relative; }
  .hero-actions .button.primary, .hero-actions .button.secondary, .hero-actions .button.ghost { padding: 10px 12px; min-height: 38px; }
  .hero-bottom { font-size: 9px; }
  .section-heading > div { gap: 5px; }
  .section-note { display: none; }
  .song-grid { gap: 12px; }
  .cover-wrap { aspect-ratio: 1.14; }
  .card-body { padding: 12px 10px 8px; }
  .card-title { font-size: 12px; }
  .card-artist { font-size: 9px; }
  .card-meta { margin-top: 10px; gap: 4px; }
  .badge { font-size: 7px; padding: 2px 4px; }
  .status-badge { font-size: 7px; }
  .cover-wrap .status-badge { top: 9px; left: 9px; }
  .cover-play { width: 31px; height: 31px; right: 9px; bottom: 9px; }
  .card-footer { gap: 3px; margin-top: 8px; }
  .part-preview { gap: 2px; }
  .part-pill { font-size: 7px; min-width: 16px; padding: 2px 3px; }
  .favorite-button { width: 31px; min-width: 31px; }
  .quick-grid { grid-template-columns: 1fr; gap: 10px; }
  .quick-panel { flex-wrap: nowrap; padding: 17px 19px; align-items: center; }
  .quick-panel h3 { font-size: 13px; }
  .quick-panel p { font-size: 10px; }
  .quick-panel .part-select { min-width: 104px; }
  .recent-info h3, .recent-info strong { font-size: 10px; }
  .recent-part { max-width: 57px; }
  .filter-selects { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
  .filter-selects label { flex-direction: column; align-items: stretch; gap: 5px; }
  .filter-selects select { min-width: 0; width: 100%; }
  .detail-layout { grid-template-columns: 1fr; gap: 23px; }
  .detail-cover { max-width: 280px; width: 100%; margin: 0 auto; }
  .detail-content h1 { font-size: 27px; }
  .detail-content > p { font-size: 12px; }
  .detail-meta { font-size: 11px; }
  .detail-actions .button { min-height: 41px; font-size: 11px; padding: 10px 14px; }
  .practice-heading h1 { font-size: 20px; }
  .practice-content { grid-template-columns: 1fr; }
  .player-actions .button { font-size: 10px; padding: 8px 10px; }
  .player-overlay h2 { font-size: 16px; }
  .player-overlay p { font-size: 9px; }
  .player-overlay > .icon { display: none; }
  .settings-grid { grid-template-columns: 1fr; }
  .choice-button { font-size: 11px; padding: 12px 7px; }
  .settings-panel { padding: 23px; }
  .bottom-nav { padding-left: 4px; padding-right: 4px; }
  .bottom-nav .nav-link { padding-left: 6px; padding-right: 6px; font-size: 11px; }
  .form-grid { grid-template-columns: 1fr; }
  .admin-header { align-items: flex-start; flex-direction: column; gap: 12px; }
}
@media (max-width: 359px) {
  .page { padding-left: 14px; padding-right: 14px; }
  .topbar { padding-left: 15px; padding-right: 15px; }
  .hero-title { font-size: 23px; }
  .hero-copy { padding: 23px 20px; }
  .song-grid { grid-template-columns: 1fr; }
  .cover-wrap { aspect-ratio: 1.5; }
  .card-title { font-size: 14px; }
  .card-artist { font-size: 11px; }
  .card-body { padding: 16px; }
  .badge { font-size: 9px; }
  .part-pill { font-size: 9px; }
  .recent-part { display: none; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .brand > span .brand-caption { padding-left: 0; font-size: 8px; }
  .brand { gap: 7px; }
  .brand-name { font-size: 20px; }
}
@media (max-width: 1240px) {
  .main-shell > .app-footer { margin-left: 32px; margin-right: 32px; }
}
@media (max-width: 1023px) {
  .main-shell > .app-footer { margin-left: 25px; margin-right: 25px; }
}
@media (max-width: 767px) {
  .icon-button, .cover-play, .favorite-button, .recent-play { width: 44px; height: 44px; min-width: 44px; min-height: 44px; }
  .button, .hero-actions .button.primary, .hero-actions .button.secondary, .hero-actions .button.ghost, .card-footer > .button, .quick-panel .button, .player-actions .button, .part-switcher .button, .detail-actions .button, .timer-controls .button, .text-button, .chip, .choice-button, .part-select, .search-bar button, .filter-selects select { min-height: 44px; }
  .card-title button { min-height: 44px; }
  .cover-play { bottom: 9px; right: 9px; }
  .card-title-row .favorite-button { margin-top: -3px; margin-bottom: -3px; }
  .card-title-row { min-height: 38px; }
  .card-title-row .card-title { white-space: normal; }
  .card-title button { white-space: normal; line-height: 1.55; text-overflow: initial; }
  .card-footer > .button { font-size: 10px; }
  .card-footer > .button .icon { width: 14px; height: 14px; }
  .quick-panel { column-gap: 12px; row-gap: 7px; }
  .quick-panel:has(.random-result) { grid-template-columns: minmax(0,1fr) auto; }
  .quick-panel:has(.random-result) > .button:last-child { grid-column: 2; grid-row: 3; }
  .random-result strong { font-size: 11px; }
  .main-shell > .app-footer { margin-left: 22px; margin-right: 22px; }
  .back-button { margin-bottom: 15px; }
  .player-actions { gap: 8px; }
  .player-actions .favorite-button { margin-left: 0; }
  .player-play-icon { width: 52px; height: 52px; font-size: 17px; }
  .player-play-label { font-size: 11px; }
  .check-item { min-height: 44px; }
  .timer-panel > .timer-value { font-size: 36px; }
  .checklist-panel .progress-panel { padding: 11px; }
  .settings-panel .text-button { justify-content: flex-start; }
}
@media (max-width: 479px) {
  .main-shell > .app-footer { margin-left: 19px; margin-right: 19px; }
  .quick-panel { grid-template-columns: minmax(0,1fr); }
  .quick-panel > .button { grid-column: 1; grid-row: auto; margin-top: 6px; justify-self: start; }
  .quick-panel:has(.random-result) { grid-template-columns: minmax(0,1fr); }
  .quick-panel:has(.random-result) > .button:last-child { grid-column: 1; grid-row: auto; }
  .quick-panel:has(.random-result) > .button { justify-self: stretch; }
  .hero-art > .hero-cover { width: 160px; height: 160px; }
  .card-title { font-size: 12px; }
  .card-title-row { gap: 0; }
  .card-title-row .favorite-button { min-width: 44px; width: 44px; margin-right: -8px; }
  .part-switcher .button { padding-left: 10px; padding-right: 10px; font-size: 10px; }
  .part-switcher > span { font-size: 10px; }
  .player-actions .button { flex-grow: 1; }
  .player-actions .favorite-button { order: 1; }
  .practice-heading .eyebrow { font-size: 8px; }
}
/* Readable content sizes and theme-aware contrast across compact layouts. */
.topbar-brand-wrap { display: none; }
.mobile-brand { display: none; }
.mobile-settings-btn { display: none; }
.brand-caption, .brand > span .brand-caption { font-size: 12px; line-height: 1.55; letter-spacing: -.25px; }
.sidebar-bottom > p { font-size: 12px; line-height: 1.75; }
.my-part-mini span, .my-part-mini .text-button { font-size: 12px; }
.home-intro > div > p:not(.eyebrow), .page-heading > p:not(.eyebrow),
.section-note, .intro-date, .text-button, .search-bar input, .search-bar button,
.hero-text, .hero-bottom, .hero-actions .button.primary, .hero-actions .button.secondary, .hero-actions .button.ghost,
.card-artist, .card-footer > .button, .card-meta > span:not(.badge), .part-more, .part-empty,
.quick-panel p, .quick-panel .button, .part-select, .recent-info p, .recent-info small, .recent-part,
.notice, .demo-banner, .filter-label, .chip, .filter-selects label, .filter-selects select, .filter-summary,
.detail-meta, .tag, .part-subtitle, .part-indicator, .progress-label, .progress-panel small,
.practice-heading p:not(.eyebrow), .player-actions .button, .player-help, .player-play-label,
.part-switcher > span, .part-switcher .button, .check-item, .timer-controls .button,
.checklist-panel > p:not(.eyebrow), .timer-panel > .timer-status, .settings-panel > p,
.choice-button, .setting-options .choice-button span, .settings-panel .setting-row small,
.app-footer, .share-dialog > label, .toast, .button.small {
  font-size: 12px;
  line-height: 1.6;
}
.card-title { font-size: 15px; line-height: 1.55; }
.card-artist { font-size: 12px; }
.badge, .status-badge, .part-pill { font-size: 11px; line-height: 1.5; }
.part-preview { min-height: 22px; }
.recent-info h3, .recent-info strong, .random-result strong { font-size: 14px; }
.random-result p { font-size: 12px; }
.quick-panel h3 { font-size: 15px; }
.part-button { font-size: 14px; }
.setting-options .choice-button span { opacity: 1; color: var(--muted); }
.eyebrow, .home-intro .eyebrow, .page-heading .eyebrow, .detail-content .eyebrow,
.practice-heading .eyebrow, .checklist-panel .eyebrow, .timer-panel .eyebrow { font-size: 10px; }
.hero-tag, .hero-art-label, .hero-art .art-caption { font-size: 10px; }
.search-bar label, .search-bar > .icon { color: var(--muted); }
.hero-art-label, .hero-art .art-caption { color: #d0dfc8; }
.card-body { display: flex; flex-direction: column; flex: 1; }
.song-card { display: flex; flex-direction: column; }
.card-footer { margin-top: auto; padding-top: 12px; }
.card-meta { padding-bottom: 12px; }
html[data-theme="dark"] .badge, html[data-theme="dark"] .part-pill,
html[data-theme="dark"] .nav-link:not(.active), html[data-theme="dark"] .sidebar-label,
html[data-theme="dark"] .sidebar-bottom > p, html[data-theme="dark"] .app-footer,
html[data-theme="dark"] .favorite-button { color: var(--muted-strong); }
html[data-theme="dark"] .favorite-button.active, html[data-theme="dark"] .favorite-button[aria-pressed="true"] { color: #d2b16f; }
html[data-theme="dark"] .badge.difficulty { color: #c4b787; }
html[data-theme="dark"] .part-pill.mine, html[data-theme="dark"] .part-pill.active { color: var(--primary); }
html[data-theme="dark"] .danger { color: #dfaa97; }
html[data-theme="dark"] .sidebar { scrollbar-color: rgba(255, 255, 255, 0.2) transparent; }
html[data-theme="dark"] .sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); }
html[data-theme="dark"] .sidebar::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.35); }

/* QR Dialog */
.qr-dialog { text-align: center; }
.qr-preview-box { display: flex; justify-content: center; align-items: center; padding: 14px; background: #fff; border: 1px solid var(--border); border-radius: 14px; margin: 16px auto; width: fit-content; box-shadow: 0 4px 16px rgba(0,0,0,.05); }
.qr-preview-box img { width: 200px; height: 200px; display: block; border-radius: 6px; }
.qr-target-title { font-weight: 650; font-size: 13px; color: var(--primary); margin: 6px 0 16px; word-break: keep-all; }
.qr-actions { display: flex; justify-content: center; gap: 10px; margin-top: 10px; }

/* Pitch Pipe Dialog */
dialog.pitch-dialog { width: min(480px, calc(100vw - 32px)); margin: auto; background: var(--surface); color: var(--ink); border: 1px solid var(--border); padding: 26px 24px; border-radius: 18px; box-shadow: 0 16px 70px rgba(18,39,27,.2); }
.pitch-dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.pitch-dialog-header h2 { font-size: 20px; font-weight: 700; letter-spacing: -.6px; }
.pitch-dialog-desc { font-size: 12px; color: var(--muted); margin-bottom: 16px; }
.pitch-status-card { display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--surface-soft); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; text-align: center; }
.pitch-now-label { font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.pitch-now-note { font-size: 24px; color: var(--primary); font-weight: 750; letter-spacing: -.5px; }
.pitch-now-freq { font-size: 11px; color: var(--muted-strong); margin-top: 2px; }

.pitch-octave-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.pitch-bar-label { font-size: 11px; font-weight: 600; color: var(--muted); }
.pitch-octave-bar .chip-group { display: flex; gap: 6px; }

.pitch-keyboard { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 20px; }
.pitch-key { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 56px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--ink); transition: background .15s, border-color .15s, transform .1s; font-size: 13px; font-weight: 600; padding: 6px 4px; user-select: none; }
.pitch-key:hover { border-color: var(--border-strong); background: var(--surface-soft); }
.pitch-key:active { transform: scale(0.96); }
.pitch-key.accidental { background: var(--bg); color: var(--ink); border-color: var(--border); }
.pitch-key.accidental:hover { background: var(--surface-soft); border-color: var(--border-strong); }
.pitch-key.active,
.pitch-key.active.accidental { background: #111814 !important; color: #ffffff !important; border-color: #050806 !important; box-shadow: 0 0 0 3px rgba(17,24,20,.3) !important; font-weight: 700; transform: scale(0.98); }
.pitch-key.active .pitch-key-note,
.pitch-key.active .pitch-key-kr,
.pitch-key.active .pitch-key-freq { color: #ffffff !important; }
.pitch-key-note { font-size: 15px; line-height: 1.2; font-weight: 700; }
.pitch-key-kr { font-size: 10px; opacity: .85; margin-top: 2px; font-weight: 500; }
.pitch-key-freq { font-size: 9px; opacity: .65; margin-top: 1px; }

.pitch-dialog-footer { display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--border); padding-top: 14px; }
.pitch-presets { display: flex; gap: 8px; flex-wrap: wrap; }
.pitch-footer-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.dialog-close-x { width: 32px; height: 32px; border: 0; background: transparent; font-size: 16px; color: var(--muted); border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.dialog-close-x:hover { background: var(--surface-soft); color: var(--ink); }

/* Big Practice Player Controller */
.practice-controller-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px 20px; margin: 14px 0 16px; box-shadow: var(--shadow); }
.practice-control-row { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.practice-btn-big { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 18px; border-radius: 11px; font-size: 13px; font-weight: 650; border: 1px solid var(--border); background: var(--surface-soft); color: var(--ink); transition: background .15s, border-color .15s, transform .1s; }
.practice-btn-big:hover { background: #e3ebd8; border-color: var(--border-strong); color: var(--primary); }
.practice-btn-big:active { transform: scale(0.97); }
.practice-btn-big.primary-play { min-width: 140px; background: var(--primary); color: #fff; border-color: var(--primary); font-size: 14px; box-shadow: 0 4px 14px rgba(25,77,70,.2); }
.practice-btn-big.primary-play:hover { background: var(--primary-hover); }
.practice-btn-big .icon { width: 18px; height: 18px; }

.practice-subrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 12px; font-size: 11px; }
.practice-speed-group { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.practice-speed-label { color: var(--muted); font-weight: 600; font-size: 11px; letter-spacing: .5px; margin-right: 2px; }
.practice-rate-chip { padding: 6px 12px; min-height: 34px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--muted-strong); font-size: 12px; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s; }
.practice-rate-chip:hover { border-color: var(--border-strong); color: var(--primary); }
.practice-rate-chip.active { background: var(--primary-soft); color: var(--primary); border-color: #9eb796; font-weight: 700; }
.practice-pitch-btn { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }

/* A-B Section Loop Controller */
.practice-loop-panel {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.practice-loop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.practice-loop-title-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.practice-loop-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.practice-loop-title .icon {
  width: 15px;
  height: 15px;
}
.loop-status-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--muted);
  border: 1px solid var(--border);
  transition: all .15s ease;
}
.loop-status-badge.ready {
  color: var(--primary);
  border-color: #9eb796;
}
.loop-status-badge.active {
  background: #e1efe6;
  color: #194d46;
  border-color: #72a98f;
  font-weight: 700;
  box-shadow: 0 0 0 2px rgba(25, 77, 70, 0.12);
}
.practice-loop-presets {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.loop-preset-label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}
.loop-preset-chip {
  padding: 4px 10px;
  min-height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
}
.loop-preset-chip:hover {
  border-color: var(--border-strong);
  color: var(--primary);
}
.loop-preset-chip:active {
  transform: scale(0.97);
}

.practice-loop-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--surface-soft);
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.loop-controls-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.loop-point-unit {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--surface);
  padding: 4px 6px;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.loop-point-btn {
  padding: 4px 8px;
  min-height: 30px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s ease;
}
.loop-point-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.loop-time-tag {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  min-width: 42px;
  text-align: center;
  padding: 0 4px;
}
.loop-nudge-btn {
  padding: 2px 6px;
  min-height: 26px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted-strong);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
}
.loop-nudge-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.loop-separator {
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
}
.loop-controls-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.loop-btn-toggle {
  padding: 6px 14px;
  min-height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.loop-btn-toggle .icon {
  width: 14px;
  height: 14px;
}
.loop-btn-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.loop-btn-toggle.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(25,77,70,.25);
}
.loop-btn-toggle.active:hover {
  background: var(--primary-hover);
}
.loop-btn-sub {
  padding: 6px 10px;
  min-height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
}
.loop-btn-sub:hover {
  border-color: var(--border-strong);
  color: var(--ink);
}
.loop-btn-sub.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}
.loop-btn-sub.ghost:hover {
  background: var(--surface);
  color: var(--danger, #c53030);
}

/* Starting Pitch Panel (파트별 첫 음) */
.starting-pitch-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 20px;
  margin: 14px 0 18px;
  box-shadow: var(--shadow);
  transition: border-color .2s, box-shadow .2s;
}
.starting-pitch-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.starting-pitch-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.starting-pitch-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 18px;
  flex-shrink: 0;
}
.starting-pitch-title {
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.4px;
  margin: 0;
  color: var(--ink);
}
.starting-pitch-desc {
  font-size: 12px;
  color: var(--muted);
  margin: 2px 0 0;
}
.starting-pitch-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pitch-key-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
}
.part-pitch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.part-pitch-chip {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 6px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
  user-select: none;
  transition: all .15s ease-in-out;
  text-align: center;
}
.part-pitch-chip:hover {
  background: var(--surface-soft);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}
.part-pitch-chip:active {
  transform: scale(0.97);
}
.part-pitch-chip.current-part {
  border-color: var(--primary);
  background: var(--surface-soft);
  box-shadow: 0 0 0 2px var(--primary-soft);
}
.part-pitch-chip.playing {
  background: #111814 !important;
  color: #ffffff !important;
  border-color: #050806 !important;
  box-shadow: 0 0 0 3px rgba(17,24,20,.35) !important;
  transform: scale(1.02);
  animation: pulse-pitch 1.5s infinite;
}
html[data-theme="dark"] .part-pitch-chip.playing {
  background: #000000 !important;
  color: #ffffff !important;
  border-color: #4a6858 !important;
  box-shadow: 0 0 0 3px rgba(255,255,255,.35) !important;
}
@keyframes pulse-pitch {
  0% { box-shadow: 0 0 0 2px rgba(45,133,94,.4); }
  50% { box-shadow: 0 0 0 6px rgba(45,133,94,.7); }
  100% { box-shadow: 0 0 0 2px rgba(45,133,94,.4); }
}
.part-pitch-role {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  opacity: .8;
  margin-bottom: 3px;
}
.part-pitch-singer {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 8px;
  margin-bottom: 4px;
  border-radius: 999px;
  background: rgba(45,133,94,.12);
  color: inherit;
}
.part-pitch-note {
  font-size: 19px;
  font-weight: 800;
  line-height: 1.2;
}
.part-pitch-solfege {
  font-size: 12px;
  font-weight: 600;
  opacity: .88;
  margin-top: 2px;
}
.part-pitch-freq {
  font-size: 10px;
  opacity: .6;
  margin-top: 1px;
}
.part-pitch-chip.playing .part-pitch-role,
.part-pitch-chip.playing .part-pitch-singer,
.part-pitch-chip.playing .part-pitch-note,
.part-pitch-chip.playing .part-pitch-solfege,
.part-pitch-chip.playing .part-pitch-freq {
  color: #ffffff !important;
  opacity: 1 !important;
}
.current-part-pill {
  position: absolute;
  top: -8px;
  right: 8px;
  background: var(--primary);
  color: #ffffff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 8px;
  letter-spacing: -.2px;
  box-shadow: 0 2px 4px rgba(0,0,0,.15);
}
.starting-pitch-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.pitch-action-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pitch-action-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.chord-play-btn.playing {
  background: #111814 !important;
  color: #ffffff !important;
  border-color: #050806 !important;
}
html[data-theme="dark"] .chord-play-btn.playing {
  background: #000000 !important;
  color: #ffffff !important;
}

/* Stage Performances Tab & List View */
.stage-controls-panel { margin-bottom: 24px; position: relative; z-index: 10; }
.stage-tabs-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.stage-view-tabs { display: inline-flex; align-items: center; background: var(--surface-soft); padding: 4px; border-radius: 12px; border: 1px solid var(--border); gap: 4px; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; position: relative; z-index: 10; }
.stage-view-tabs::-webkit-scrollbar { display: none; }
.stage-tab-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; flex-shrink: 0; transition: all .15s ease; touch-action: manipulation; user-select: none; -webkit-tap-highlight-color: transparent; }
.stage-tab-btn:hover { color: var(--ink); background: rgba(0,0,0,.04); }
.stage-tab-btn.active { background: var(--surface); color: var(--primary); font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.stage-sub-toggle-btn { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: all .15s ease; touch-action: manipulation; }
.stage-sub-toggle-btn:hover { color: var(--ink); background: var(--surface-soft); }
.stage-sub-toggle-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 700; }
.stage-summary-text { font-size: 13px; font-weight: 650; color: var(--muted); }

/* Stage List */
.stage-list { display: flex; flex-direction: column; gap: 14px; }
.stage-list-item { display: flex; align-items: stretch; gap: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.stage-list-item:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.08); border-color: #abbca5; }
.stage-list-thumb { position: relative; width: 180px; min-width: 180px; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000; cursor: pointer; flex-shrink: 0; }
.stage-list-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; display: block; }
.stage-list-item:hover .stage-list-thumb img { transform: scale(1.05); }
.stage-thumb-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.32); color: #fff; font-size: 22px; transition: background .2s ease; }
.stage-list-item:hover .stage-thumb-play { background: rgba(25,77,70,.65); }
.stage-thumb-badge { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.75); color: #fff; font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 4px; backdrop-filter: blur(4px); }
.stage-list-content { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.stage-list-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.stage-list-title { font-size: 15.5px; font-weight: 700; color: var(--ink); line-height: 1.4; margin-bottom: 6px; cursor: pointer; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.stage-list-title:hover { color: var(--primary); }
.stage-list-setlist { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; font-size: 12px; }
.stage-setlist-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; background: var(--surface-soft); border: 1px solid var(--border); border-radius: 6px; font-size: 11.5px; color: var(--ink); }
.stage-setlist-chip strong { color: var(--primary); font-weight: 650; }
.stage-list-actions { display: flex; flex-direction: column; justify-content: center; gap: 8px; flex-shrink: 0; min-width: 110px; }

/* Stage Video Theater Modal */
.stage-modal-dialog { border: 0; border-radius: 16px; padding: 0; max-width: 860px; width: 94vw; background: var(--surface); color: var(--ink); box-shadow: 0 20px 48px rgba(0,0,0,.32); overflow: hidden; margin: auto; }
.stage-modal-dialog::backdrop { background: rgba(15,23,20,.75); backdrop-filter: blur(4px); }
.stage-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); gap: 12px; }
.stage-modal-header h3 { font-size: 16px; font-weight: 700; margin: 0; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.stage-modal-body { padding: 20px; max-height: 80vh; overflow-y: auto; }
.stage-modal-player { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; margin-bottom: 16px; }

@media (max-width: 767px) {
  .stage-list-item { flex-direction: column; padding: 14px; gap: 12px; }
  .stage-list-thumb { width: 100%; min-width: 0; }
  .stage-list-actions { flex-direction: row; width: 100%; }
  .stage-list-actions > button, .stage-list-actions > a { flex: 1; justify-content: center; }
}

.stage-grid { display: flex; flex-direction: column; gap: 24px; }
.stage-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.stage-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.stage-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; font-size: 12px; color: var(--muted); }
.stage-player-host { margin: 16px 0 20px; }
.stage-desc { font-size: 13px; color: var(--ink); line-height: 1.6; margin-bottom: 18px; }
.stage-setlist-box { background: var(--surface-soft); border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; }
.stage-setlist-title { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 10px; }
.stage-setlist-items { display: flex; flex-direction: column; gap: 8px; }
.setlist-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid rgba(0,0,0,.04); }
.setlist-item:last-child { border-bottom: 0; }
.setlist-song-name { font-weight: 650; font-size: 13px; color: var(--ink); }
.setlist-time { font-size: 11px; color: var(--muted); margin-left: 6px; font-variant-numeric: tabular-nums; }

/* Rehearsal & Feedback Hub */
.rehearsal-grid { display: flex; flex-direction: column; gap: 28px; }
.rehearsal-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.rehearsal-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.rehearsal-song-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 6px; background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 650; }
.rehearsal-notes { font-size: 13px; color: var(--ink); margin-bottom: 16px; background: var(--bg); padding: 12px 16px; border-radius: 8px; border-left: 3px solid var(--primary); }
.rehearsal-media-box { margin: 16px 0 20px; }

/* In-app Audio Player for Rehearsal Audio */
.audio-player-card { background: var(--surface-soft); border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin: 12px 0; }
.audio-player-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 12px; font-weight: 600; color: var(--primary); }
.audio-controls-row { display: flex; align-items: center; gap: 12px; }
.audio-progress-wrap { flex: 1; display: flex; align-items: center; gap: 10px; }
.audio-progress-wrap input[type=range] { flex: 1; accent-color: var(--primary); cursor: pointer; }
.audio-time-label { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

@media (max-width: 600px) {
  .audio-controls-row { flex-wrap: wrap; gap: 8px; }
  .audio-progress-wrap { width: 100%; order: 2; margin-top: 6px; }
}

/* Collaborative Feedback Section */
.feedback-section { border-top: 1px solid var(--border); padding-top: 18px; margin-top: 18px; }
.feedback-section-title { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.feedback-form-box { background: var(--surface-soft); border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.feedback-form-row { display: flex; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.feedback-input-sm { min-width: 120px; flex: 1; padding: 8px 10px; font-size: 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--ink); }
.feedback-textarea { width: 100%; min-height: 60px; padding: 10px 12px; font-size: 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--ink); resize: vertical; margin-bottom: 10px; box-sizing: border-box; }
.feedback-form-actions { display: flex; justify-content: space-between; align-items: center; }

.feedback-feed { display: flex; flex-direction: column; gap: 10px; }
.feedback-bubble { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; transition: transform .1s; }
.feedback-bubble-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: 11px; flex-wrap: wrap; gap: 6px; }
.feedback-author { font-weight: 700; color: var(--primary); }
.feedback-time-group { display: inline-flex; align-items: center; gap: 5px; }
.feedback-time-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; background: var(--surface); border: 1px solid var(--border); border-radius: 5px; font-size: 10px; font-weight: 700; color: var(--primary); cursor: pointer; }
.feedback-time-chip:hover { background: var(--primary); color: #fff; }
.feedback-loop-chip { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; background: var(--primary-soft); border: 1px solid var(--border); border-radius: 5px; font-size: 10px; font-weight: 700; color: var(--primary); cursor: pointer; transition: all .15s ease; }
.feedback-loop-chip:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.feedback-loop-chip .icon { width: 10px; height: 10px; }
.feedback-text { font-size: 12.5px; color: var(--ink); line-height: 1.5; word-break: keep-all; }
.feedback-bottom-row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 10px; color: var(--muted); }
.feedback-like-btn { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 5px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-size: 11px; color: var(--muted-strong); }
.feedback-like-btn.liked { color: #d64545; border-color: #f0a8a8; background: #fff1f1; font-weight: 700; }

/* In-app Audio Loop Bar */
.audio-loop-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.audio-loop-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.audio-loop-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
@media (max-width: 600px) {
  .audio-loop-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .audio-loop-right {
    justify-content: flex-start;
  }
}

/* Starting Pitch Sequence */
.pitch-seq-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--primary-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  margin: 10px 0 12px;
  animation: pitch-pulse-border 1.5s infinite ease-in-out;
}
.seq-play-btn {
  font-weight: 700;
}
.seq-play-btn.playing {
  background: var(--primary-hover);
  animation: pitch-pulse-subtle 1.2s infinite ease-in-out;
}
@keyframes pitch-pulse-border {
  0%, 100% { border-color: var(--border); box-shadow: 0 0 0 rgba(25,77,70,0); }
  50% { border-color: var(--primary); box-shadow: 0 0 8px rgba(25,77,70,.18); }
}
@keyframes pitch-pulse-subtle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(0.98); }
}

/* Practice Room A/B Audio Switcher */
.ab-switcher-box { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--surface-soft); border: 1px solid var(--border); border-radius: 10px; margin-bottom: 12px; }
.ab-label { font-size: 11px; font-weight: 700; color: var(--muted); margin-right: 4px; }
.ab-chip { padding: 6px 14px; border-radius: 7px; border: 1px solid var(--border); background: var(--bg); font-size: 12px; font-weight: 600; cursor: pointer; transition: background .15s; }
.ab-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 700; }

/* Scores Archive (악보 창고) */
.score-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.score-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease; }
.score-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(18, 38, 26, 0.08); }
.score-top { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 12px; }
.score-icon-badge { width: 44px; height: 44px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.score-icon-badge .icon { width: 24px; height: 24px; }
.score-info { flex: 1; min-width: 0; }
.score-badges { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.score-title { font-size: 16px; font-weight: 700; color: var(--ink); line-height: 1.4; margin-bottom: 4px; word-break: keep-all; }
.score-arranger { font-size: 12px; color: var(--muted); }
.score-memo { font-size: 12.5px; color: var(--muted-strong); background: var(--bg); padding: 10px 12px; border-radius: 8px; margin: 12px 0; line-height: 1.5; border-left: 3px solid var(--primary); }
.score-meta-row { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--muted); margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); }
.score-actions { display: flex; gap: 8px; align-items: center; margin-top: 12px; flex-wrap: wrap; }

/* Memories & Moments (우리들의 기록) */
.memory-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.memory-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease; }
.memory-card:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(18, 38, 26, 0.1); }
.memory-media-wrap { position: relative; width: 100%; aspect-ratio: 16 / 10; background: #000; cursor: pointer; overflow: hidden; }
.memory-media-wrap.is-shorts { aspect-ratio: 9 / 12; }
.memory-thumb { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.memory-media-wrap:hover .memory-thumb { transform: scale(1.04); }
.memory-type-pill { position: absolute; top: 10px; left: 10px; background: rgba(0, 0, 0, 0.72); color: #fff; padding: 4px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; backdrop-filter: blur(4px); z-index: 2; }
.memory-play-btn { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.2); transition: background .15s ease; z-index: 2; }
.memory-media-wrap:hover .memory-play-btn { background: rgba(0, 0, 0, 0.4); }
.memory-play-circle { width: 48px; height: 48px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35); transition: transform .15s ease; }
.memory-media-wrap:hover .memory-play-circle { transform: scale(1.12); }
.memory-body { padding: 16px 18px; display: flex; flex-direction: column; flex: 1; }
.memory-card-title { font-size: 15.5px; font-weight: 700; color: var(--ink); line-height: 1.45; margin-bottom: 8px; cursor: pointer; }
.memory-card-title:hover { color: var(--primary); }
.memory-card-desc { font-size: 12.5px; color: var(--muted-strong); line-height: 1.55; margin-bottom: 12px; word-break: keep-all; }
.memory-tags-row { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.memory-tag { font-size: 11px; color: var(--primary); background: var(--primary-soft); padding: 2px 7px; border-radius: 4px; font-weight: 600; }
.memory-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border); font-size: 11px; color: var(--muted); }
.memory-like-button { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-size: 12px; color: var(--muted-strong); transition: all .15s ease; }
.memory-like-button.liked { color: #e03b3b; border-color: #f7a6a6; background: #fff0f0; font-weight: 700; }

/* Educational Resources (아카펠라 교육 자료) */
.edu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.edu-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease; }
.edu-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(18, 38, 26, 0.08); }
.edu-top { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 12px; }
.edu-icon-badge { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 20px; }
.edu-icon-badge.ppt { background: #fff1e5; color: #d9621e; }
.edu-icon-badge.pdf { background: #feebeb; color: #dc2626; }
.edu-icon-badge.video { background: #e0f2fe; color: #0284c7; }
.edu-icon-badge.audio { background: #ecfdf5; color: #059669; }
.edu-icon-badge.other { background: var(--primary-soft); color: var(--primary); }
.edu-info { flex: 1; min-width: 0; }
.edu-badges { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.edu-badges .status-badge, .score-badges .status-badge { position: static !important; }
.edu-title { font-size: 16px; font-weight: 700; color: var(--ink); line-height: 1.45; margin-bottom: 4px; word-break: keep-all; }
.edu-author { font-size: 12px; color: var(--muted); }
.edu-desc { font-size: 12.5px; color: var(--muted-strong); background: var(--bg); padding: 10px 13px; border-radius: 8px; margin: 10px 0; line-height: 1.55; border-left: 3px solid #2a6f62; word-break: keep-all; }
.edu-meta-row { display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; color: var(--muted); margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); }
.edu-actions { display: flex; gap: 8px; align-items: center; margin-top: 14px; flex-wrap: wrap; }

/* Practice Videos & Acapella Appreciation (연습 영상 & 아카펠라 감상) */
.video-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; }
.custom-video-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease; }
.custom-video-card:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(18, 38, 26, 0.1); }
.custom-video-thumb-wrap { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #121815; cursor: pointer; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.custom-video-thumb { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.custom-video-thumb-wrap:hover .custom-video-thumb { transform: scale(1.04); }
.custom-video-play-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.28); transition: background .15s ease; z-index: 2; }
.custom-video-thumb-wrap:hover .custom-video-play-overlay { background: rgba(0, 0, 0, 0.45); }
.custom-video-play-btn { width: 48px; height: 48px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4); transition: transform .15s ease; }
.custom-video-thumb-wrap:hover .custom-video-play-btn { transform: scale(1.12); }
.custom-video-badge { position: absolute; top: 10px; left: 10px; background: rgba(0, 0, 0, 0.72); color: #fff; padding: 4px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; backdrop-filter: blur(4px); z-index: 2; }
.custom-video-source-pill { position: absolute; top: 10px; right: 10px; background: rgba(0, 0, 0, 0.72); color: #8ae6c7; padding: 3px 8px; border-radius: 6px; font-size: 10.5px; font-weight: 600; backdrop-filter: blur(4px); z-index: 2; }
.custom-video-body { padding: 16px 18px; display: flex; flex-direction: column; flex: 1; }
.custom-video-title { font-size: 15.5px; font-weight: 700; color: var(--ink); line-height: 1.45; margin-bottom: 8px; cursor: pointer; word-break: keep-all; }
.custom-video-title:hover { color: var(--primary); }
.custom-video-footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border); font-size: 11px; color: var(--muted); }
.custom-video-footer > span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.custom-video-actions { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
.custom-video-footer .button, .custom-video-actions .button { white-space: nowrap !important; flex-shrink: 0; min-height: 32px; padding: 6px 11px; }

/* Dark Theme Overrides */
html[data-theme="dark"] .qr-preview-box { background: #fff; }
html[data-theme="dark"] dialog.pitch-dialog { background: var(--surface); color: var(--ink); border-color: var(--border); }
html[data-theme="dark"] .pitch-key,
html[data-theme="dark"] .pitch-key.accidental { background: #23332a; border-color: var(--border); color: var(--ink); }
html[data-theme="dark"] .pitch-key.active,
html[data-theme="dark"] .pitch-key.active.accidental { background: #000000 !important; color: #ffffff !important; border-color: #4a6858 !important; box-shadow: 0 0 0 3px rgba(255,255,255,.3) !important; }
html[data-theme="dark"] .practice-controller-panel { background: var(--surface); border-color: var(--border); }
html[data-theme="dark"] .practice-btn-big { background: var(--surface-soft); border-color: var(--border); color: var(--ink); }
html[data-theme="dark"] .practice-btn-big.primary-play { background: var(--primary); color: #1c3524; border-color: var(--primary); }
html[data-theme="dark"] .practice-rate-chip.active { background: var(--primary-soft); color: var(--primary); }
html[data-theme="dark"] .practice-loop-panel { border-color: var(--border); }
html[data-theme="dark"] .practice-loop-body { background: var(--surface-soft); border-color: var(--border); }
html[data-theme="dark"] .loop-point-unit { background: var(--surface); border-color: var(--border); }
html[data-theme="dark"] .loop-point-btn,
html[data-theme="dark"] .loop-nudge-btn,
html[data-theme="dark"] .loop-preset-chip,
html[data-theme="dark"] .loop-btn-toggle,
html[data-theme="dark"] .loop-btn-sub { background: var(--surface); border-color: var(--border); color: var(--ink); }
html[data-theme="dark"] .loop-status-badge.active { background: #1c3524; color: #a3e635; border-color: #2e5a3c; }
html[data-theme="dark"] .loop-btn-toggle.active { background: var(--primary); color: #1c3524; border-color: var(--primary); }
html[data-theme="dark"] .stage-card,
html[data-theme="dark"] .stage-list-item,
html[data-theme="dark"] .stage-modal-dialog,
html[data-theme="dark"] .rehearsal-card,
html[data-theme="dark"] .score-card,
html[data-theme="dark"] .memory-card,
html[data-theme="dark"] .custom-video-card,
html[data-theme="dark"] .edu-card { background: var(--surface); border-color: var(--border); }
html[data-theme="dark"] .stage-setlist-box,
html[data-theme="dark"] .audio-player-card,
html[data-theme="dark"] .feedback-form-box,
html[data-theme="dark"] .ab-switcher-box { background: var(--surface-soft); border-color: var(--border); }
html[data-theme="dark"] .rehearsal-notes,
html[data-theme="dark"] .score-memo,
html[data-theme="dark"] .custom-video-desc,
html[data-theme="dark"] .edu-desc { background: #1c2b23; color: var(--ink); }

html[data-theme="dark"] .edu-icon-badge.ppt { background: #3d2315; color: #ff9858; }
html[data-theme="dark"] .edu-icon-badge.pdf { background: #3d1717; color: #ff7878; }
html[data-theme="dark"] .edu-icon-badge.video { background: #162c3d; color: #5bc4ff; }
html[data-theme="dark"] .memory-like-button.liked { background: #3b1919; color: #ff7878; border-color: #662b2b; }
html[data-theme="dark"] .feedback-bubble { background: #1a2721; border-color: var(--border); }
html[data-theme="dark"] .feedback-time-chip { background: #23342c; color: var(--primary); border-color: var(--border-strong); }
html[data-theme="dark"] .feedback-time-chip:hover { background: var(--primary); color: #1c3524; }
html[data-theme="dark"] .feedback-like-btn { background: #23342c; border-color: var(--border); color: var(--muted-strong); }
html[data-theme="dark"] .feedback-like-btn.liked { background: #3b2222; color: #ff8e8e; border-color: #6a3434; }

@media (max-width: 767px) {
  .practice-control-row { display: grid; grid-template-columns: 1fr 1.3fr 1fr; gap: 8px; }
  .practice-btn-big { min-height: 48px; padding: 10px 8px; font-size: 12px; }
  .practice-btn-big.primary-play { min-width: auto; }
  .practice-subrow { flex-direction: column; align-items: stretch; gap: 10px; }
  .practice-speed-group { justify-content: space-between; width: 100%; }
  .pitch-keyboard { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .topbar-brand-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 4px;
    flex-shrink: 0;
  }
  .mobile-settings-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: transparent;
    color: var(--muted-strong);
    cursor: pointer;
    transition: all .18s;
  }
  .mobile-settings-btn:hover {
    background: var(--surface);
    color: var(--primary);
    border-color: var(--border-strong);
  }
  .mobile-settings-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
  }
  .mobile-settings-btn .icon {
    width: 17px;
    height: 17px;
  }
  .desktop-settings-btn {
    display: none !important;
  }
  .mobile-brand { display: flex; align-items: center; gap: 8px; min-height: 34px; color: var(--primary); text-decoration: none; }
  .mobile-brand img { width: 32px; height: 32px; flex-shrink: 0; }
  .mobile-brand strong { font-size: 20px; line-height: 1; letter-spacing: -.8px; font-weight: 750; }
  .topbar-copy { display: none; }
  .topbar { gap: 10px; }
  .bottom-nav .nav-link { font-size: 11px; padding-left: 5px; padding-right: 5px; }
  .card-title { font-size: 14px; }
  .card-title button {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    width: 100%;
    min-height: 44px;
    max-height: 44px;
    line-height: 22px;
    white-space: normal;
    overflow: hidden;
    overflow-wrap: anywhere;
    text-overflow: ellipsis;
  }
  .badge, .status-badge, .part-pill { font-size: 12px; }
  .part-preview { min-height: 42px; align-content: flex-start; }
  .recent-info h3, .recent-info strong { font-size: 13px; }
  .recent-part { max-width: 78px; }
  .filter-label { flex-basis: 38px; }
  .chip-group { min-width: 0; }
  .filter-selects select { min-width: 0; }
}
@media (max-width: 479px) {
  .hero-art-label { display: none; }
  .quick-panel p { font-size: 12px; }
  .card-artist { font-size: 12px; }
  .part-switcher > span { white-space: nowrap; }
  .part-switcher { gap: 8px; }
  .part-switcher .button { padding-left: 9px; padding-right: 9px; }
}
@media (max-width: 767px) {
  .page {
    padding-bottom: calc(96px + env(safe-area-inset-bottom, 20px));
    padding-bottom: max(96px, calc(86px + env(safe-area-inset-bottom, 20px)));
  }
  dialog {
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  /* Prevent iOS Safari auto-zoom on input focus */
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  select,
  textarea,
  .feedback-input-sm,
  .feedback-textarea,
  .search-bar input,
  .filter-selects select {
    font-size: 16px !important;
  }
  .topbar {
    padding: 10px 14px;
    gap: 8px;
  }
  .topbar-actions {
    gap: 4px;
  }
  .topbar-actions .button.small {
    padding: 6px 8px;
    font-size: 11px;
    white-space: nowrap;
  }
  .topbar-actions .icon-button {
    width: 34px;
    height: 34px;
  }
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes page-enter { from { opacity: .3; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* Pocket Mode / Screen Lock Veil */
.pocket-mode-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: #000000;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: calc(env(safe-area-inset-top, 24px) + 36px) 24px calc(env(safe-area-inset-bottom, 24px) + 36px);
  color: #ffffff;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  box-sizing: border-box;
}

.pocket-top {
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.65;
  font-size: 13px;
  font-weight: 600;
}

.pocket-lock-icon { font-size: 18px; }

.pocket-center {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: 380px;
}

.pocket-song-title {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  opacity: 0.9;
  letter-spacing: -0.3px;
}

.pocket-part-label {
  font-size: 13px;
  font-weight: 600;
  color: #34d399;
  margin: 0;
  opacity: 0.9;
}

.pocket-pulse-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 12px;
  color: #9ca3af;
}

.pocket-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  animation: pulse-dot 1.8s infinite;
}

.pocket-hint {
  font-size: 12px;
  color: #6b7280;
  margin-top: 28px;
  line-height: 1.5;
  transition: color 0.25s, transform 0.25s;
}

.pocket-hint.highlight {
  color: #facc15;
  font-weight: 700;
  transform: scale(1.05);
}

.pocket-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.pocket-unlock-button {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  padding: 12px 34px;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.15s, transform 0.1s;
}

.pocket-unlock-button:active {
  background: rgba(255, 255, 255, 0.28);
  transform: scale(0.97);
}

@keyframes pulse-dot {
  0%, 100% { opacity: 0.3; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.3); }
}

body.in-pocket-mode {
  overflow: hidden !important;
  overscroll-behavior: none !important;
  touch-action: none;
}

@media (max-height: 520px) {
  .pocket-mode-overlay {
    padding: 14px 20px;
    gap: 8px;
  }
  .pocket-center {
    gap: 4px;
  }
  .pocket-hint {
    margin-top: 8px;
    font-size: 11px;
  }
  .pocket-song-title {
    font-size: 16px;
  }
  .pocket-unlock-button {
    padding: 8px 24px;
    font-size: 13px;
  }
}

.player-pocket-btn {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 5;
  background: rgba(18, 48, 38, 0.9);
  color: #fffae8;
  border: 1px solid rgba(255, 215, 100, 0.45);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 11.5px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.4);
  transition: background 0.18s, transform 0.15s, box-shadow 0.18s;
  user-select: none;
}
.player-pocket-btn:hover {
  background: rgba(28, 70, 55, 0.98);
  color: #fff;
  border-color: rgba(255, 225, 120, 0.7);
  transform: scale(1.04);
}
.player-pocket-btn:active {
  transform: scale(0.96);
}
.player-screen.theater-landscape .player-pocket-btn {
  display: none !important;
}

/* --- 모바일 백그라운드 & 절전 설정 패널 --- */
.setting-toggle-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-top: 10px;
}
.setting-toggle-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.setting-toggle-info strong {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}
.setting-toggle-info p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  line-height: 1.45;
}
.setting-toggle-card .button {
  flex-shrink: 0;
  min-width: 100px;
  justify-content: center;
  font-weight: 650;
  font-size: 12.5px;
}
@media (max-width: 480px) {
  .setting-toggle-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .setting-toggle-card .button {
    align-self: flex-end;
  }
}

/* ==========================================================================
   Stage Live Mode (무대 전용 큐시트 & 공연 관리)
   ========================================================================== */
.stage-live-shell {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 860px;
  margin: 0 auto;
  padding: 16px;
  background: #0f1614;
  color: #e5ece8;
  border-radius: 20px;
  border: 1px solid rgba(45, 212, 191, 0.2);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
}

.stage-live-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  width: 100%;
  box-sizing: border-box;
}

.stage-header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stage-live-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.stage-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.stage-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  animation: stage-pulse 1.6s infinite;
}

@keyframes stage-pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.stage-wake-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  background: rgba(45, 212, 191, 0.15);
  color: #2dd4bf;
  border: 1px solid rgba(45, 212, 191, 0.3);
  cursor: pointer;
  border: none;
}

.stage-wake-pill.inactive {
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.stage-event-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.stage-perf-nav-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 3px 6px;
  margin-left: 6px;
}

.stage-perf-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid transparent;
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  touch-action: manipulation;
}

@media (hover: hover) {
  .stage-perf-nav-btn:hover:not(:disabled) {
    background: rgba(45, 212, 191, 0.18);
    color: #2dd4bf;
    border-color: rgba(45, 212, 191, 0.35);
  }
}

.stage-perf-nav-btn:active:not(:disabled) {
  background: #2dd4bf;
  color: #0f1614;
}

.stage-perf-nav-btn:disabled {
  opacity: 0.32;
  cursor: not-allowed;
  color: #64748b;
}

.stage-perf-nav-count-btn {
  font-size: 11px;
  font-weight: 750;
  color: #2dd4bf;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(45, 212, 191, 0.12);
  border: 1px solid rgba(45, 212, 191, 0.28);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  touch-action: manipulation;
}

@media (hover: hover) {
  .stage-perf-nav-count-btn:hover {
    background: rgba(45, 212, 191, 0.25);
    color: #ffffff;
    border-color: #2dd4bf;
  }
}

.stage-perf-nav-count-btn:focus:not(:focus-visible),
.stage-perf-nav-btn:focus:not(:focus-visible) {
  outline: none;
}

.stage-event-title {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin: 0;
}

.stage-event-meta {
  font-size: 12.5px;
  color: #94a3b8;
  margin-top: 2px;
}

.stage-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.stage-header-actions .button {
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  min-height: 38px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  touch-action: manipulation;
  transition: all 0.18s ease;
}

.stage-header-actions .button:hover,
.stage-header-actions .button:active {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.32);
}

.stage-header-actions .button.icon-only {
  padding: 6px 12px;
  font-size: 15px;
}

/* Setlist Bar */
.stage-setlist-bar {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 6px 2px 10px;
  margin-top: 2px;
  width: 100%;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(45, 212, 191, 0.3) transparent;
}

.stage-setlist-bar::-webkit-scrollbar {
  height: 4px;
}

.stage-setlist-bar::-webkit-scrollbar-thumb {
  background: rgba(45, 212, 191, 0.3);
  border-radius: 4px;
}

.stage-chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: all 0.2s ease;
  cursor: pointer;
  min-height: 38px;
  touch-action: manipulation;
}

.stage-chip-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.stage-chip-btn.active {
  background: #194d46;
  color: #2dd4bf;
  border-color: #2dd4bf;
  font-weight: 700;
  box-shadow: 0 0 14px rgba(45, 212, 191, 0.35);
}

.stage-chip-btn.completed {
  color: #94a3b8;
  border-color: rgba(255, 255, 255, 0.08);
}

/* Hero Section */
.stage-hero-card {
  padding: 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stage-hero-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

.stage-hero-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.stage-practice-video-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(45, 212, 191, 0.12);
  border: 1px solid rgba(45, 212, 191, 0.35);
  color: #2dd4bf;
  font-size: 12.5px;
  font-weight: 750;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  touch-action: manipulation;
}

.stage-practice-video-btn:hover {
  background: #2dd4bf;
  color: #0f1614;
  border-color: #2dd4bf;
  box-shadow: 0 0 14px rgba(45, 212, 191, 0.5);
  transform: translateY(-1px);
}

.stage-practice-video-btn:active {
  transform: translateY(0);
}

.stage-hero-badge {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(45, 212, 191, 0.15);
  color: #2dd4bf;
}

.stage-hero-title {
  font-size: 24px;
  font-weight: 850;
  color: #ffffff;
  letter-spacing: -0.03em;
  line-height: 1.3;
}

.stage-hero-artist {
  font-size: 14px;
  color: #94a3b8;
  margin-top: 4px;
}

/* Pitch Section */
.stage-pitch-card {
  padding: 18px;
  border-radius: 16px;
  background: rgba(25, 77, 70, 0.18);
  border: 1px solid rgba(45, 212, 191, 0.3);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stage-pitch-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stage-pitch-title {
  font-size: 15px;
  font-weight: 750;
  color: #2dd4bf;
  display: flex;
  align-items: center;
  gap: 6px;
}

.stage-pitch-play-all-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, #194d46 0%, #155d54 100%);
  color: #ffffff;
  font-size: 15px;
  font-weight: 750;
  border: 1px solid rgba(45, 212, 191, 0.4);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(25, 77, 70, 0.3);
}

.stage-pitch-play-all-btn:hover {
  background: linear-gradient(135deg, #1f5f56 0%, #1a7166 100%);
  border-color: #2dd4bf;
  box-shadow: 0 0 18px rgba(45, 212, 191, 0.4);
}

.stage-pitch-play-all-btn.playing {
  background: linear-gradient(135deg, #be185d 0%, #9d174d 100%);
  border-color: #f472b6;
  box-shadow: 0 0 20px rgba(244, 114, 182, 0.4);
}

.stage-pitch-parts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 8px;
}

.stage-part-sound-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  cursor: pointer;
  transition: all 0.15s ease;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
  .stage-part-sound-btn:hover {
    background: rgba(45, 212, 191, 0.15);
    border-color: #2dd4bf;
  }
}

.stage-part-sound-btn:focus:not(:focus-visible) {
  outline: none;
}

.stage-part-sound-btn.active,
.stage-part-sound-btn.playing {
  background: #2dd4bf;
  color: #0f1614;
  border-color: #2dd4bf;
  font-weight: 800;
  box-shadow: 0 0 16px rgba(45, 212, 191, 0.6);
}

.stage-part-singer {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(45, 212, 191, .15);
  color: #5eead4;
}
.stage-part-name {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #94a3b8;
}

.stage-part-sound-btn.active .stage-part-name,
.stage-part-sound-btn.playing .stage-part-name {
  color: #0f1614;
}

.stage-part-note {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* AI MC Comment Card */
.stage-mc-card {
  padding: 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stage-mc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.stage-mc-title {
  font-size: 14.5px;
  font-weight: 750;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 6px;
}

.stage-tone-tabs {
  display: flex;
  gap: 6px;
}

.stage-tone-btn {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.15s ease;
}

.stage-tone-btn:hover {
  color: #ffffff;
}

.stage-tone-btn.active {
  background: rgba(45, 212, 191, 0.2);
  color: #2dd4bf;
  border-color: #2dd4bf;
  font-weight: 700;
}

.stage-speech-bubble {
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14.5px;
  line-height: 1.65;
  color: #f1f5f9;
  outline: none;
  min-height: 56px;
  cursor: text;
  word-break: keep-all;
  overflow-wrap: break-word;
  white-space: pre-line;
}

.stage-speech-bubble:focus {
  border-color: #2dd4bf;
  background: rgba(0, 0, 0, 0.5);
}

.stage-mc-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Navigation Bar */
.stage-nav-bar {
  display: flex;
  gap: 12px;
  padding-top: 4px;
}

.stage-nav-btn {
  flex: 1;
  padding: 14px 20px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 750;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.stage-nav-btn.prev {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border-color: rgba(255, 255, 255, 0.14);
}

.stage-nav-btn.prev:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.14);
}

.stage-nav-btn.next {
  background: #2dd4bf;
  color: #0f1614;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 4px 16px rgba(45, 212, 191, 0.35);
}

.stage-nav-btn.next:hover:not(:disabled) {
  background: #14b8a6;
  box-shadow: 0 0 20px rgba(45, 212, 191, 0.55);
}

.stage-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* History Modal Cards */
.stage-history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 4px;
}

.stage-history-card {
  padding: 16px;
  border-radius: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.15s ease;
}

.stage-history-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.stage-history-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.stage-history-title {
  font-size: 16px;
  font-weight: 750;
  color: var(--ink);
  margin: 0;
}

.stage-history-date {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.stage-history-songs-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.stage-history-song-tag {
  font-size: 11.5px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--sage);
  color: var(--primary);
  font-weight: 600;
}

.stage-history-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

/* Setlist Editor */
.stage-edit-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 45vh;
  overflow-y: auto;
  margin: 12px 0;
  padding-right: 4px;
}

.stage-edit-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.stage-edit-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.stage-edit-num {
  font-weight: 800;
  color: var(--primary);
  font-size: 13.5px;
  width: 22px;
}

.stage-edit-name {
  font-weight: 650;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stage-edit-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Fields grid in setlist editor */
.stage-edit-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

/* Stage Focus vs Overview Mode Switcher */
.stage-live-mode-switch {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 2px;
  gap: 2px;
}

.stage-mode-btn {
  border: 0;
  background: transparent;
  color: #94a3b8;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  touch-action: manipulation;
}

.stage-mode-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.stage-mode-btn.active {
  background: #2dd4bf;
  color: #0f1614;
  font-weight: 800;
  box-shadow: 0 2px 10px rgba(45, 212, 191, 0.4);
}

/* Stage Overview Mode Container & Cards */
.stage-focus-view-area {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.stage-overview-view-area {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.stage-overview-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
}

.stage-overview-top-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.stage-overview-hint-text {
  font-size: 12px;
  color: #94a3b8;
}

.stage-overview-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stage-overview-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stage-overview-card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.18s ease;
  position: relative;
}

.stage-overview-card:hover {
  border-color: rgba(45, 212, 191, 0.35);
  background: rgba(255, 255, 255, 0.055);
}

.stage-overview-card.is-current {
  border-color: rgba(45, 212, 191, 0.7);
  border-left: 5px solid #2dd4bf;
  background: rgba(45, 212, 191, 0.06);
  box-shadow: 0 0 24px rgba(45, 212, 191, 0.12);
}

/* 1행: 상단 곡 정보 밴드 (순번, 곡명, Key뱃지, 메모, 상태, 1곡 보기 버튼) */
.stage-overview-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.stage-overview-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}

.stage-overview-num-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(45, 212, 191, 0.15);
  color: #2dd4bf;
  font-size: 14.5px;
  font-weight: 800;
  flex-shrink: 0;
  border: 1px solid rgba(45, 212, 191, 0.3);
}

.stage-overview-card.is-current .stage-overview-num-badge {
  background: #2dd4bf;
  color: #0f1614;
  box-shadow: 0 0 10px rgba(45, 212, 191, 0.5);
}

.stage-overview-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.stage-overview-song-title {
  font-size: 16.5px;
  font-weight: 750;
  color: #ffffff;
  margin: 0;
  cursor: pointer;
  line-height: 1.35;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: break-word;
  transition: color 0.15s ease;
}

.stage-overview-song-title:hover {
  color: #2dd4bf;
}

.stage-overview-song-meta {
  font-size: 12.5px;
  color: #94a3b8;
  margin: 0;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.stage-key-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.35);
  white-space: nowrap;
}

.stage-note-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  background: rgba(234, 179, 8, 0.2);
  color: #fde047;
  border: 1px solid rgba(234, 179, 8, 0.4);
  white-space: nowrap;
}

.stage-current-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
  white-space: nowrap;
}

.stage-overview-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.stage-overview-video-btn {
  white-space: nowrap;
  border-color: rgba(45, 212, 191, 0.35);
  color: #2dd4bf;
  touch-action: manipulation;
}

.stage-overview-video-btn:hover {
  border-color: #2dd4bf;
  color: #ffffff;
  background: rgba(45, 212, 191, 0.15);
}

.stage-overview-focus-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

/* 2행: 하단 무대 컨트롤 밴드 (좌측: 조율음 바 / 우측: MC 멘트) */
.stage-overview-card-body {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: stretch;
  gap: 12px;
  width: 100%;
}

.stage-overview-pitch-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.28);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  min-height: 44px;
  box-sizing: border-box;
}

.stage-overview-pitch-label {
  font-size: 11.5px;
  font-weight: 700;
  color: #94a3b8;
  margin-right: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.stage-overview-pitch-label .icon {
  width: 13px;
  height: 13px;
  color: #2dd4bf;
}

.stage-overview-pitch-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
}

.stage-overview-pitch-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f1f5f9;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}

.stage-overview-pitch-chip strong {
  color: #2dd4bf;
  font-weight: 800;
  font-size: 11px;
}

@media (hover: hover) {
  .stage-overview-pitch-chip:hover {
    background: rgba(45, 212, 191, 0.2);
    border-color: #2dd4bf;
    color: #ffffff;
    transform: translateY(-1px);
  }
}

.stage-overview-pitch-chip:focus:not(:focus-visible) {
  outline: none;
}

.stage-overview-pitch-chip:active,
.stage-overview-pitch-chip.playing {
  background: #2dd4bf;
  color: #0f1614;
  border-color: #2dd4bf;
}

.stage-overview-pitch-chip.playing strong {
  color: #0f1614;
}

.stage-overview-chord-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 6px;
  background: linear-gradient(135deg, #194d46 0%, #155d54 100%);
  border: 1px solid rgba(45, 212, 191, 0.35);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-left: auto;
  white-space: nowrap;
  flex-shrink: 0;
}

.stage-overview-chord-btn:hover {
  background: linear-gradient(135deg, #1f5f56 0%, #1a7166 100%);
  border-color: #2dd4bf;
}

.stage-overview-chord-btn.playing {
  background: linear-gradient(135deg, #be185d 0%, #9d174d 100%);
  border-color: #f472b6;
}

.stage-overview-mc-box {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  color: #cbd5e1;
  line-height: 1.55;
  background: rgba(0, 0, 0, 0.22);
  padding: 8px 12px;
  border-radius: 10px;
  border-left: 3px solid #2dd4bf;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  word-break: keep-all;
  white-space: pre-line;
  min-height: 44px;
  box-sizing: border-box;
}

.stage-overview-mc-text {
  flex: 1;
  min-width: 0;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.stage-overview-mc-refresh-btn {
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  flex-shrink: 0;
  transition: all 0.2s ease;
  min-width: 34px;
  min-height: 34px;
  touch-action: manipulation;
}

.stage-overview-mc-refresh-btn:hover {
  color: #2dd4bf;
  background: rgba(45, 212, 191, 0.15);
  transform: rotate(45deg);
}

.stage-overview-mc-box .icon {
  width: 14px;
  height: 14px;
  color: #2dd4bf;
  flex-shrink: 0;
  margin-top: 2px;
}

@media (max-width: 860px) {
  .stage-overview-card-body {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* Stage Modals (History & Setlist Editor) */
.stage-modal-dialog {
  width: min(640px, calc(100vw - 28px));
  max-width: 640px;
  max-height: 85vh;
  margin: auto;
  padding: 22px 24px;
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45);
  box-sizing: border-box;
}

.stage-modal-dialog::backdrop {
  background: rgba(10, 16, 14, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.stage-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.stage-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 750;
  color: var(--ink);
}

.stage-modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stage-practice-video-modal {
  width: min(720px, calc(100vw - 28px));
  max-width: 720px;
}

.stage-practice-player-host {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #000000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.stage-video-part-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.stage-video-part-chip {
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  touch-action: manipulation;
}

.stage-video-part-chip:hover {
  background: rgba(45, 212, 191, 0.18);
  color: #ffffff;
  border-color: #2dd4bf;
}

.stage-video-part-chip.active {
  background: #2dd4bf;
  color: #0f1614;
  border-color: #2dd4bf;
  font-weight: 750;
  box-shadow: 0 0 12px rgba(45, 212, 191, 0.4);
}

.stage-video-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.stage-live-shell:fullscreen,
.stage-live-shell:-webkit-full-screen {
  max-width: 100vw;
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  border-radius: 0;
  border: 0;
  overflow-y: auto;
  padding: 16px env(safe-area-inset-right, 16px) calc(20px + env(safe-area-inset-bottom, 0px)) env(safe-area-inset-left, 16px);
  box-sizing: border-box;
}

@media (max-width: 860px) {
  .stage-overview-card-body {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

@media (max-width: 600px) {
  .page.stage-live-page {
    padding: 8px 10px 16px;
  }
  .stage-live-shell {
    padding: 12px;
    border-radius: 16px;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
  }
  .stage-live-header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    width: 100%;
  }
  .stage-header-left {
    width: 100%;
  }
  .stage-live-badge-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    width: 100%;
  }
  .stage-live-mode-switch {
    width: 100%;
    display: flex;
    box-sizing: border-box;
    margin-top: 2px;
  }
  .stage-mode-btn {
    flex: 1 1 50%;
    text-align: center;
    justify-content: center;
    padding: 7px 8px;
    font-size: 12px;
  }
  .stage-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* 숨은 가로 스크롤 대신 줄바꿈: 휴대폰에서 버튼이 화면 밖에 숨지 않게 */
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    padding: 2px 1px 6px;
  }
  .stage-header-actions::-webkit-scrollbar {
    display: none;
  }
  .stage-header-actions .button {
    min-height: 38px;
    padding: 6px 12px;
    font-size: 12.5px;
    flex-shrink: 0;
  }
  .stage-setlist-bar {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 6px 1px 10px;
    margin-top: 2px;
    margin-bottom: 2px;
    scrollbar-width: none;
  }
  .stage-setlist-bar::-webkit-scrollbar {
    display: none;
  }
  .stage-chip-btn {
    min-height: 38px;
    padding: 6px 12px;
    font-size: 12.5px;
    flex-shrink: 0;
  }
  .stage-event-title {
    font-size: 18px;
  }
  .stage-perf-nav-wrap {
    margin-left: 0;
    margin-top: 2px;
  }
  .stage-perf-nav-btn {
    padding: 3px 8px;
    font-size: 11px;
  }
  .stage-perf-nav-count-btn {
    padding: 2px 6px;
    font-size: 10.5px;
  }
  .stage-hero-card {
    padding: 12px;
  }
  .stage-hero-title {
    font-size: 19px;
    line-height: 1.25;
  }
  .stage-pitch-card {
    padding: 12px;
    gap: 10px;
  }
  .stage-pitch-play-all-btn {
    padding: 10px 12px;
    font-size: 14px;
  }
  .stage-pitch-parts-grid {
    grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
    gap: 6px;
  }
  .stage-part-sound-btn {
    padding: 8px 4px;
  }
  .stage-part-note {
    font-size: 15px;
  }
  .stage-mc-card {
    padding: 12px;
    gap: 10px;
  }
  .stage-speech-bubble {
    font-size: 13.5px;
    line-height: 1.55;
    padding: 10px 12px;
    min-height: 48px;
  }
  .stage-nav-btn {
    padding: 12px 14px;
    font-size: 14.5px;
    min-height: 48px;
  }
  .stage-edit-fields-grid {
    grid-template-columns: 1fr;
  }
  .stage-edit-fields-grid label {
    grid-column: span 1 !important;
  }
  .stage-edit-item {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .stage-edit-actions {
    justify-content: space-between;
    width: 100%;
  }
  .stage-edit-actions input {
    flex: 1;
    min-width: 80px;
  }
  .stage-modal-body input,
  .stage-modal-body select {
    font-size: 16px !important;
  }
  .stage-overview-card {
    padding: 12px 14px;
  }
  .stage-overview-card-body {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .stage-overview-card-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .stage-overview-header-actions {
    width: 100%;
    display: flex;
    gap: 8px;
  }
  .stage-overview-header-actions .button {
    flex: 1 1 50%;
    justify-content: center;
    min-height: 38px;
  }
  .stage-practice-video-btn {
    padding: 6px 11px;
    font-size: 12px;
    min-height: 34px;
  }
  .stage-video-modal-footer {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .stage-video-modal-footer .button {
    width: 100%;
    justify-content: center;
    min-height: 40px;
  }
  .stage-overview-chord-btn {
    margin-left: 0;
    width: 100%;
    justify-content: center;
    min-height: 40px;
  }
  .stage-overview-pitch-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 8px 10px;
  }
  .stage-overview-pitch-chip {
    padding: 6px 10px;
    min-height: 36px;
    font-size: 12.5px;
  }
  .stage-overview-top-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .stage-overview-top-actions {
    width: 100%;
  }
  .stage-overview-top-actions .button {
    width: 100%;
    justify-content: center;
  }
  .stage-history-container {
    -webkit-overflow-scrolling: touch;
  }
  .stage-history-actions {
    flex-wrap: wrap;
    justify-content: stretch;
    gap: 6px;
  }
  .stage-history-actions .button:first-child {
    flex: 1 1 auto;
    justify-content: center;
  }
  .stage-modal-dialog {
    width: calc(100vw - 20px);
    max-width: 100vw;
    padding: 16px 14px;
    border-radius: 14px;
  }
}

/* Protected Sections (악보 창고 & 교육 자료) Lock Screen */
.protected-lock-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 44px 24px;
  text-align: center;
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
  max-width: 520px;
  margin: 32px auto;
}
.protected-lock-icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(234, 179, 8, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-bottom: 18px;
}
.protected-lock-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--ink);
}
.protected-lock-desc {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 18px;
  max-width: 420px;
}
.protected-notice-badge {
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(234, 179, 8, 0.35);
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}
.protected-lock-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
html[data-theme="dark"] .protected-notice-badge {
  background: #373223;
  color: #f3dfa2;
  border-color: #554826;
}
html[data-theme="dark"] .protected-lock-icon {
  background: #3a321e;
}

@media (max-width: 600px) {
  .protected-lock-state {
    padding: 30px 16px;
    margin: 16px auto;
    min-height: 280px;
    border-radius: 14px;
  }
  .protected-lock-icon {
    width: 56px;
    height: 56px;
    font-size: 26px;
    margin-bottom: 14px;
  }
  .protected-lock-title {
    font-size: 18px;
  }
  .protected-lock-desc {
    font-size: 12.5px;
    margin-bottom: 14px;
  }
  .protected-notice-badge {
    padding: 8px 12px;
    font-size: 12px;
    margin-bottom: 18px;
    text-align: left;
  }
  .protected-lock-actions {
    width: 100%;
  }
  .protected-lock-actions .button {
    flex: 1;
    min-width: 120px;
    justify-content: center;
  }

  .starting-pitch-panel {
    padding: 14px 12px;
    margin: 12px 0 16px;
  }
  .starting-pitch-header {
    margin-bottom: 10px;
    gap: 8px;
  }
  .starting-pitch-title {
    font-size: 15px;
  }
  .part-pitch-grid {
    grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
    gap: 8px;
    margin-bottom: 10px;
  }
  .part-pitch-chip {
    padding: 10px 4px;
    border-radius: 10px;
  }
  .part-pitch-role {
    font-size: 10px;
  }
  .part-pitch-note {
    font-size: 17px;
  }
  .part-pitch-solfege {
    font-size: 11px;
  }
  .part-pitch-freq {
    font-size: 9.5px;
  }
  .starting-pitch-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .pitch-action-left, .pitch-action-right {
    width: 100%;
    display: flex;
    gap: 6px;
  }
  .pitch-action-left .button, .pitch-action-right .button {
    flex: 1;
    justify-content: center;
    padding: 8px 8px;
    font-size: 11.5px;
    white-space: nowrap;
  }
}

@media (max-width: 479px) {
  dialog.share-dialog {
    padding: 20px 16px;
    width: calc(100vw - 24px);
    border-radius: 14px;
  }
}


@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ===== 다가오는 공연 카드 (홈) ===== */
.upcoming-stage { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px; margin: 4px 0 22px; box-shadow: var(--shadow); }
.upcoming-stage-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.upcoming-stage-head h2 { font-size: 18px; font-weight: 700; margin: 2px 0 4px; line-height: 1.4; }
.upcoming-stage-meta { font-size: 12px; color: var(--muted); }
.dday-badge { flex: none; background: var(--primary); color: #fff; font-weight: 800; font-size: 14px; border-radius: 999px; padding: 6px 12px; }
.setlist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin-top: 14px; }
.setlist-item { display: grid; min-height: 0; grid-template-columns: 26px 1fr; grid-template-rows: auto auto; column-gap: 8px; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--primary-soft); cursor: pointer; color: inherit; font: inherit; }
.setlist-item:hover { border-color: var(--primary); }
.setlist-num { grid-row: span 2; align-self: center; width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.setlist-title { font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.setlist-part { font-size: 11px; color: var(--muted); }
.upcoming-stage-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.setlist-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 14px; padding: 10px 12px; border-radius: 12px; background: var(--primary-soft); }
.setlist-nav-label { font-size: 12px; font-weight: 700; text-align: center; flex: 1; min-width: 0; }

/* ===== 파트 선택 카드: 이름·첫 음 ===== */
.part-button .part-singer { font-size: 12px; font-weight: 700; padding: 1px 9px; border-radius: 999px; background: rgba(45,133,94,.12); }
.part-button .part-first-note { font-size: 11px; font-weight: 700; color: var(--muted-strong, var(--muted)); }
.name-options .choice-button { min-width: 72px; justify-content: center; }

/* ===== 큰 버튼 연습 모드 ===== */
.big-mode-row { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.big-mode-toggle.active { background: var(--primary); color: #fff; }
.big-practice-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; display: grid; grid-template-columns: repeat(4, 1fr) 44px; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(16, 32, 29, .96); box-shadow: 0 -6px 20px rgba(0,0,0,.25); }
.big-practice-bar[hidden] { display: none; }
.big-bar-btn { min-height: 64px; border-radius: 14px; border: 0; background: rgba(255,255,255,.12); color: #fff; font: inherit; font-size: 14px; font-weight: 700; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; }
.big-bar-btn .icon { width: 24px; height: 24px; }
.big-bar-btn.primary { background: #2dd4bf; color: #06201c; }
.big-bar-btn.active { outline: 3px solid #2dd4bf; }
.big-bar-btn:disabled { opacity: .4; }
.big-bar-close { border: 0; border-radius: 12px; background: transparent; color: #cbd5e1; cursor: pointer; }
body.big-practice-on { padding-bottom: 96px; }
body.big-practice-on .mobile-nav, body.big-practice-on #mobile-nav { display: none !important; }

/* ===== 상단 더보기 메뉴 ===== */
.topbar-more-btn { display: none; }
.topbar-more-menu { position: absolute; right: 12px; top: calc(100% + 6px); z-index: 950; display: flex; flex-direction: column; gap: 6px; min-width: 170px; padding: 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.topbar-more-menu[hidden] { display: none; }
.topbar-more-menu .button { width: 100%; justify-content: flex-start; }
@media (max-width: 767px) {
  .topbar-actions .topbar-extra { display: none !important; }
  .topbar-more-btn { display: inline-flex; }
  #topbar-actions { position: relative; }
  .upcoming-stage { padding: 14px; }
  .setlist-grid { grid-template-columns: 1fr; gap: 6px; }
  .setlist-item { padding: 8px 10px; }
  .setlist-nav .button { padding: 8px 10px; }
}

/* ===== 모바일 점검 보정 ===== */
/* 곡 카드 제목: 한 줄 말줄임 대신 두 줄까지 표시 (태블릿 2열 카드에서 제목 잘림 방지) */
.card-title, .card-title button, button.card-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; word-break: keep-all; }
@media (pointer: coarse), (max-width: 767px) {
  /* 터치 대상 최소 크기 */
  .icon-button-tiny { min-width: 36px; min-height: 36px; }
}
@media (max-width: 400px) {
  .big-practice-bar { gap: 6px; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); grid-template-columns: repeat(4, 1fr) 36px; }
  .big-bar-btn { min-height: 58px; font-size: 12px; white-space: nowrap; border-radius: 12px; }
  .big-bar-btn .icon { width: 22px; height: 22px; }
  body.big-practice-on { padding-bottom: 84px; }
}

/* 셋리스트 곡별 첫 음 전체 화음 버튼 */
.setlist-row { display: flex; align-items: stretch; gap: 6px; min-width: 0; }
.setlist-row .setlist-item { flex: 1; min-width: 0; }
.setlist-chord-btn { flex: none; width: 52px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.setlist-chord-btn .icon { width: 22px; height: 22px; }
.setlist-chord-btn.playing { background: var(--primary); color: #fff; border-color: var(--primary); }
.setlist-chord-btn { flex-direction: column; gap: 2px; font-size: 11px; font-weight: 700; }

/* ===== 휴대폰 맨 윗줄: [설정] ……… [앱설치][QR] / 둘째 줄: [AcaRaca] ……… [첫 음 잡기][검색][⋯] ===== */
@media (max-width: 767px) {
  header.topbar { flex-wrap: wrap; position: relative; row-gap: 6px; }
  header.topbar .topbar-brand-wrap, header.topbar #topbar-actions { display: contents; }
  header.topbar .mobile-settings-btn { order: 1; }
  header.topbar .topbar-key { order: 2; }
  header.topbar .topbar-key:first-of-type, header.topbar #topbar-actions > .topbar-key:not(.topbar-key + .topbar-key) { margin-left: auto; }
  header.topbar::after { content: ""; order: 3; flex-basis: 100%; height: 0; }
  header.topbar .mobile-brand { order: 4; }
  header.topbar #topbar-actions > :not(.topbar-key) { order: 5; }
  header.topbar #topbar-actions > .topbar-pitch { margin-left: auto; }
  header.topbar .topbar-more-menu { top: 100%; }
  header.topbar { column-gap: 6px; }
}
@media (max-width: 380px) {
  header.topbar { column-gap: 4px; padding-left: 12px; padding-right: 12px; }
  header.topbar .mobile-brand { gap: 6px; }
  header.topbar .mobile-brand img { width: 28px; height: 28px; }
  header.topbar .mobile-brand strong { font-size: 18px; }
  header.topbar .topbar-pitch { padding-left: 7px; padding-right: 7px; }
}
@media (max-width: 340px) {
  header.topbar .topbar-pitch .icon { display: none; }
}

/* 피치파이프 대표음 배지 (셋리스트·무대 큐시트) */
.pitchpipe-badge { flex: none; width: 64px; border-radius: 12px; border: 1px dashed var(--primary); background: var(--surface); color: var(--primary); display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; cursor: pointer; padding: 6px 2px; font: inherit; line-height: 1.15; }
.pitchpipe-badge .pp-label { font-size: 9.5px; font-weight: 700; opacity: .75; letter-spacing: -.2px; }
.pitchpipe-badge strong { font-size: 18px; font-weight: 800; }
.pitchpipe-badge .pp-kor { font-size: 11px; font-weight: 600; opacity: .85; }
.pitchpipe-badge:active { background: var(--primary); color: #fff; }
.stage-overview-pitchpipe { display: inline-flex; align-items: center; gap: 4px; border: 1px dashed #2dd4bf; border-radius: 999px; padding: 4px 10px; background: rgba(45,212,191,.1); color: #5eead4; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.stage-pitchpipe-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px dashed #2dd4bf; border-radius: 999px; padding: 6px 12px; background: rgba(45,212,191,.12); color: #5eead4; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
@media (max-width: 400px) {
  .pitchpipe-badge { width: 56px; }
  .pitchpipe-badge strong { font-size: 16px; }
}
