/* 「声音」开关：左下角常驻药丸（右下角是站点反馈按钮），悬停或键盘聚焦时向上展开「音乐」「环境」两条竖滑块。照灵隐寺 bgm.css，换成针脚页的纸色和墨色。 */
.snd { --seal: #a8382a; position: fixed; left: 16px; bottom: 16px; z-index: 5; color: var(--ink, #1d1d1b);
  font-family: -apple-system, "PingFang SC", "Helvetica Neue", sans-serif; }
.snd button { font: inherit; color: inherit; }
.snd :focus-visible { outline: 2px solid #3267c4; outline-offset: 3px; }
.snd .ic { display: block; flex: none; }
.snd .ic .x { display: none; }
.snd[data-on="false"] .ic .w, .snd[data-mute="true"] .ic .w { display: none; }
.snd[data-on="false"] .ic .x { display: inline; }

.snd-tg { height: 44px; padding: 0 16px 0 12px; display: flex; align-items: center; gap: 8px; cursor: pointer;
  border: 1px solid var(--line, #deddd6); border-radius: 22px; background: rgba(251, 251, 249, 0.94);
  font-size: 14px; font-weight: 600; line-height: 1; box-shadow: 0 1px 4px rgba(40, 36, 28, 0.08); }
.snd-tg:hover { background: #f1f0ea; }
.snd-tg .st { font-weight: 400; color: var(--ink-2, #74736d); }
.snd[data-on="true"] .snd-tg .st { color: var(--seal); font-weight: 600; }

/* 浮层用透明度显隐，不用 display:none，否则键盘 Tab 时不可聚焦 */
.snd-hit { position: absolute; left: 0; bottom: 100%; padding-bottom: 8px; opacity: 0; pointer-events: none; transition: opacity 0.15s; }
@media (hover: hover) { .snd:hover .snd-hit { opacity: 1; pointer-events: auto; } }
.snd:has(:focus-visible) .snd-hit { opacity: 1; pointer-events: auto; }
.snd-pop { padding: 12px 3px 6px; display: flex; gap: 2px; border: 1px solid var(--line, #deddd6); border-radius: 12px;
  background: rgba(251, 251, 249, 0.97); box-shadow: 0 2px 10px rgba(40, 36, 28, 0.1); }
.snd-col { width: 44px; display: flex; flex-direction: column; align-items: center; }
.snd-col .pct { font-size: 13px; line-height: 1; font-variant-numeric: tabular-nums; }
.snd-col .nm { font-size: 13px; font-weight: 600; line-height: 1; color: var(--ink-2, #74736d); margin-top: 2px; }
.snd-sl { position: relative; width: 44px; height: 128px; }
.snd-sl .rng { position: absolute; left: 50%; top: 50%; width: 128px; transform: translate(-50%, -50%) rotate(-90deg); }
.snd .rng { -webkit-appearance: none; appearance: none; margin: 0; height: 44px; background: transparent; cursor: pointer; --fill: var(--ink, #1d1d1b); --rail: var(--line, #deddd6); }
.snd .rng::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--fill) var(--p, 50%), var(--rail) var(--p, 50%)); }
.snd .rng::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 50%; background: #fff; border: 2px solid var(--ink, #1d1d1b); box-sizing: border-box; }
.snd .rng::-moz-range-track { height: 4px; border-radius: 2px; background: var(--rail); }
.snd .rng::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--fill); }
.snd .rng::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 2px solid var(--ink, #1d1d1b); box-sizing: border-box; }

/* 窄屏：只留图标圆钮，免得压住滑块和按钮 */
@media (max-width: 760px) {
  .snd { left: 10px; bottom: 10px; }
  .snd-tg { width: 44px; padding: 0; justify-content: center; border-radius: 50%; }
  .snd-tg :is(.lbl, .st) { display: none; }
}
@media (prefers-reduced-motion: reduce) { .snd * { transition-property: opacity !important; } }
