/* ── Medisounds card ──────────────────────────────────────────────────────────
   Brass body + green-CRT screen + Cinzel, matching weather.css / sky.css.
   One row per sleep sound: a checkbox, the sound's icon + label, and a per-sound
   volume slider. Token-driven greens read back the CRT palette (--nw-fg) so the
   color picker recolors everything.
   ──────────────────────────────────────────────────────────────────────────── */

#medisounds-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 60;
  width: 560px;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 24px);
  font-size: 1.18rem;
}
#medisounds-panel.hidden { display: none; }

.ms-body {
  background:
    linear-gradient(168deg, rgba(255,180,90,0.12) 0%, rgba(0,0,0,0.16) 52%, rgba(0,0,0,0.40) 100%),
    url('/nightwatch/images/wood-walnut.svg');
  background-size: cover, 400px 220px;
  background-repeat: no-repeat, repeat;
  border-radius: 14px 14px 10px 10px;
  border: 1.5px solid #5a2e10;
  box-shadow:
    0 0 0 2px #2a1206,
    inset 0 1px 0 rgba(255,160,80,0.12),
    inset 0 -1px 0 rgba(0,0,0,0.5),
    0 12px 40px rgba(0,0,0,0.78),
    0 4px 14px rgba(0,0,0,0.55);
  padding: 16px 20px 8px;
  position: relative;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 24px);
}

.ms-top {
  display: flex; align-items: center; margin-bottom: 12px; gap: 10px;
}
.ms-brand {
  display: flex; flex-direction: column; align-items: flex-start;
  flex: 1; gap: 1px;
}
.ms2-main {
  font-family: 'Cinzel Decorative', 'Trajan Pro', 'Palatino Linotype', serif;
  font-size: 0.82rem; letter-spacing: 0.08em; font-weight: 700;
  color: rgba(255,215,120,1); text-transform: uppercase; line-height: 1.15;
  text-shadow: 0 0 10px rgba(255,180,60,0.5);
}
.ms2-sub {
  font-family: 'Cinzel', 'Trajan Pro', 'Palatino Linotype', serif;
  font-size: 0.5rem; letter-spacing: 0.3em;
  color: rgba(210,165,80,0.85); text-transform: uppercase; line-height: 1.1;
}
#medisounds-close-btn {
  background: none; border: none;
  color: rgba(180,100,60,0.5); font-size: 0.85rem;
  cursor: pointer; padding: 2px 4px; border-radius: 3px;
  transition: color 0.12s; flex-shrink: 0;
}
#medisounds-close-btn:hover { color: rgba(255,160,80,0.9); }

.ms-screen {
  background: color-mix(in srgb, var(--nw-fg) 5%, #000);
  border-radius: 6px;
  border: 1.5px solid color-mix(in srgb, var(--nw-fg) 22%, transparent);
  box-shadow:
    inset 0 0 14px rgba(0,0,0,0.75),
    inset 0 0 4px rgba(0,60,20,0.4),
    0 0 8px color-mix(in srgb, var(--nw-fg) 7%, transparent);
  padding: 12px 14px;
  overflow-y: auto;
  font-family: 'Courier New', monospace;
  color: var(--nw-fg);
}

.ms-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.82em; letter-spacing: 0.08em; font-weight: 700;
  color: color-mix(in srgb, var(--nw-fg) 72%, #fff 28%);
  text-shadow: 0 0 8px color-mix(in srgb, var(--nw-fg) 50%, transparent);
  margin-bottom: 8px; text-transform: uppercase;
}
.ms-head-icon { color: #ffd24a; text-shadow: 0 0 8px rgba(255,200,70,0.6); }

.ms-blurb {
  font-size: 0.62em; letter-spacing: 0.02em; line-height: 1.5;
  color: color-mix(in srgb, var(--nw-fg) 60%, transparent);
  margin: 0 0 10px;
}

/* ── sound rows ── */
.ms-rows { display: flex; flex-direction: column; gap: 6px; }

.ms-row {
  display: flex; align-items: center; gap: 12px;
  background: rgba(0,30,12,0.5);
  border: 1px solid color-mix(in srgb, var(--nw-fg) 16%, transparent);
  border-radius: 6px;
  padding: 10px 12px;
  cursor: pointer;
}

.ms-check {
  flex: 0 0 auto;
  width: 1.2em; height: 1.2em;
  accent-color: var(--nw-fg);
  cursor: pointer;
}

.ms-icon {
  flex: 0 0 auto; font-size: 1.25em; line-height: 1;
  width: 1.4em; text-align: center;
  filter: saturate(0.9);
}

.ms-label {
  flex: 1 1 auto; min-width: 0;
  font-size: 0.74em; letter-spacing: 0.03em;
  color: color-mix(in srgb, var(--nw-fg) 75%, #fff 25%);
  text-shadow: 0 0 6px color-mix(in srgb, var(--nw-fg) 35%, transparent);
}

.ms-vol {
  flex: 0 0 42%;
  accent-color: var(--nw-fg);
  cursor: pointer;
  height: 1.4em;
}

/* Nameplate (matches wx-model-label / radio-model-label) */
.ms-model-label {
  background: linear-gradient(90deg, #7a5510 0%, #c8902a 28%, #e8b840 50%, #c8902a 72%, #7a5510 100%);
  border-top: 1px solid rgba(255,220,120,0.35);
  border-radius: 0 0 9px 9px;
  margin: 10px -20px -8px;
  padding: 6px 12px 8px;
  text-align: center;
  font-family: 'Cinzel', 'Trajan Pro', 'Palatino Linotype', serif;
  font-size: 0.68rem; letter-spacing: 0.6em;
  color: rgba(15,5,0,0.95); font-weight: 700;
  text-transform: lowercase;
  text-shadow: 0 1px 0 rgba(255,245,170,0.7), 0 -1px 0 rgba(80,30,0,0.3);
  user-select: none;
  flex-shrink: 0;
}
