/* 할리갈리 메뉴: 내 효과음 */
.custom-sounds { display: grid; gap: 10px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--seam); }
.custom-sounds-head { display: grid; gap: 2px; }
.custom-sounds-head h3 { margin: 0; font-size: var(--text-md); }
.custom-sounds-head p { color: var(--ink-soft); font-size: var(--text-xs); }
.custom-sound-list { display: grid; gap: var(--seam-width); border: var(--seam-width) solid var(--seam); border-radius: var(--radius); background: var(--seam); }
.custom-sound {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  background: var(--sheet);
}
.custom-sound.is-custom { background: var(--gardenia-tint); }
.custom-sound-info { display: grid; min-width: 0; }
.custom-sound-info b { font-size: var(--text-sm); white-space: nowrap; }
.custom-sound-info span { overflow: hidden; color: var(--ink-soft); font-size: var(--text-xs); text-overflow: ellipsis; white-space: nowrap; }
.custom-sound .btn { min-height: 36px; padding: 0 10px; white-space: nowrap; }
.custom-sound .btn[hidden] { display: none; }
.custom-sound-pick { cursor: pointer; }
.custom-sound-pick:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
.custom-sound-busy { grid-column: 1 / -1; color: var(--ink-soft); font-size: var(--text-xs); }
.custom-sound-status { font-size: var(--text-sm); font-weight: 650; color: var(--mugwort); }
.custom-sound-status.error { color: var(--safflower); }

/* 좁은 화면: 이름 줄 아래로 버튼을 한 줄에 */
@media (max-width: 480px) {
  .custom-sound { grid-template-columns: repeat(3, auto) minmax(0, 1fr); }
  .custom-sound-info { grid-column: 1 / -1; }
}

/* 메뉴 안의 보관함 자리(#mySounds) */
.my-sounds { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--seam); }
.my-sounds:empty { display: none; }

/* ---------- 대기실: 이 테이블의 효과음 (과일 사진과 같은 규칙) ---------- */
.sound-settings { display: grid; gap: 12px; }
#soundHelp { margin-top: 2px; color: var(--ink-soft); font-size: var(--text-sm); }
#soundStatus { min-height: 1.4em; color: var(--ink-soft); font-size: var(--text-sm); }
#soundStatus:empty { min-height: 0; }
/* 줄 끝이 비지 않도록 flex로 채웁니다(마지막 줄 칸이 남은 폭을 나눠 가짐). */
.sound-options { display: flex; flex-wrap: wrap; }
.sound-option { flex: 1 1 240px; display: grid; align-content: start; gap: 10px; min-width: 0; padding: 14px 16px; }
.sound-option.is-custom { background: var(--gardenia-tint); }
.sound-option.is-tied { background: var(--safflower-tint, var(--gardenia-tint)); }
.sound-current { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sound-label { display: grid; gap: 2px; min-width: 0; text-align: left; }
.sound-label strong { font-weight: 760; }
.sound-label span { overflow: hidden; color: var(--ink-soft); font-size: var(--text-sm); text-overflow: ellipsis; white-space: nowrap; }
.sound-play {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--sheet);
  color: var(--ink);
  font-size: 16px;
  cursor: pointer;
  transition: transform .12s ease, background-color .12s ease;
}
.sound-play:hover { background: var(--gardenia); transform: scale(1.06) rotate(-4deg); }
.sound-play:active { transform: scale(.94); }
.sound-play.mini { width: 34px; height: 34px; font-size: 12px; }
.sound-option.is-custom > .sound-current .sound-play { background: var(--ink); color: var(--gardenia); }
.sound-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.sound-tools .btn, .sound-tools button { min-height: 38px; padding: 0 12px; font-size: var(--text-sm); }
.sound-tools .quiet { color: var(--ink-soft); }
.sound-upload { display: inline-flex; align-items: center; cursor: pointer; }
.sound-upload:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
.sound-upload:has(input:disabled) { opacity: .55; cursor: default; }
.sound-mine { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sound-candidates { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.sound-candidate { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px 10px; padding: 8px; background: var(--cloth); }
.sound-candidate.selected { background: var(--gardenia-tint); box-shadow: inset 4px 0 0 var(--gardenia); }
.sound-who { display: grid; min-width: 0; }
.sound-who b, .sound-who small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sound-who small { color: var(--ink-soft); font-size: var(--text-xs); }
.sound-votes { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.sound-votes button { min-height: 36px; padding: 0 10px; font-size: var(--text-sm); }
.sound-votes button[aria-pressed='true'] { background: var(--indigo); color: var(--on-dye, #fff); }

/* ---------- 관리자 전용 "테스트" ---------- */
.header-tools .admin-test { background: var(--ink); color: var(--gardenia); }
.header-tools .admin-test:hover { background: var(--indigo); }
.header-tools .admin-test[hidden] { display: none; }
.halli-dialog .admin-badge { margin-left: 6px; padding: 0 6px; border-radius: var(--radius-small); background: var(--ink); color: var(--gardenia); font-size: var(--text-xs); font-style: normal; font-weight: 800; vertical-align: middle; }
.sound-preview h3 + .test-note { margin: -6px 0 10px; color: var(--ink-soft); font-size: var(--text-xs); }
.sound-preview > h3:not(:first-child) { margin-top: 18px; }
