/* The home sound journal is deliberately scoped away from embedded/video players. */
.sound-section {
  --sound-accent: #ded18a;
  --sound-ink: #f3f3e9;
  --sound-muted: #afb8a9;
  --sound-line: #45513f;
  --sound-surface: #20291f;
  container: sounds / inline-size;
  color: var(--sound-ink);
  padding: 8px 0;
  min-width: 0;
}
.sound-section *, .sound-section p, .sound-section span, .sound-section h2,
.sound-section h3, .sound-section li {
  text-align: left;
  text-align-last: auto;
}
.with-shadow:has(> .sound-section) { background: #1b231b; }
.with-shadow:has(> .sound-section):hover { transform: none; }
.with-shadow:has(> .sound-section):focus-within {
  border-color: var(--card-border);
  box-shadow: 0 8px 22px var(--shadow-dark);
}
.sound-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.sound-section .sound-eyebrow {
  color: var(--sound-accent);
  font: 500 11px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .12em;
  margin: 0 0 14px;
}
.sound-eyebrow span { opacity: .45; margin: 0 8px; }
.sound-section h2 {
  color: var(--sound-ink);
  font-size: clamp(1.75rem, 3vw, 2.15rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: .015em;
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  text-shadow: none;
}
.sound-section h2::before, .sound-section h2::after { content: none; }
.sound-section .sound-intro { font-size: .92rem; color: var(--sound-muted); margin: 0; line-height: 1.8; }
.sound-emblem { display: flex; flex: 0 0 64px; height: 56px; align-items: center; justify-content: center; gap: 4px; opacity: .7; }
.sound-emblem i { width: 3px; height: 18px; background: var(--sound-accent); border-radius: 3px; }
.sound-emblem i:nth-child(2), .sound-emblem i:nth-child(6) { height: 32px; }
.sound-emblem i:nth-child(3), .sound-emblem i:nth-child(5) { height: 44px; }
.sound-emblem i:nth-child(4) { height: 56px; }
.sound-library-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: 26px 0 0; padding-bottom: 16px; border-bottom: 1px solid var(--sound-line); }
.sound-filters { display: flex; gap: 4px; flex-wrap: wrap; }
.sound-section .sound-filter {
  min-height: 40px;
  min-width: 0;
  padding: 8px 12px;
  margin: 0;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--sound-muted);
  font-size: .85rem;
  font-weight: 500;
  line-height: 1.5;
  font-family: inherit;
  cursor: pointer;
  transition: color .16s, background .16s, border-color .16s;
}
.sound-section .sound-filter:hover { color: var(--sound-ink); background: #303a2b; }
.sound-section .sound-filter[aria-pressed="true"] { color: var(--sound-accent); border-color: #676446; background: #353a27; }
.sound-count { color: var(--sound-muted); font: 12px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: nowrap; }
.sound-section .sound-help { padding: 0; margin: 0 0 20px; border: 0; border-radius: 0; background: transparent; }
.sound-help summary { background: transparent; padding: 0; margin: 0; border: 0; display: flex; gap: 8px; align-items: center; min-height: 44px; width: fit-content; cursor: pointer; color: var(--sound-muted); font-size: 12px; list-style: none; border-radius: 4px; }
.sound-help summary::-webkit-details-marker { display: none; }
.sound-help summary:hover { color: var(--sound-accent); }
.sound-help summary svg { width: 17px; height: 17px; }
.sound-help summary > span { font-size: 18px; margin-left: 4px; transition: transform .18s; }
.sound-help[open] summary > span { transform: rotate(45deg); }
.sound-help-body { padding: 16px; margin-bottom: 8px; background: #252f23; border: 1px solid var(--sound-line); border-radius: 10px; }
.sound-help-body p { color: var(--sound-muted); font-size: 12px; margin: 0 0 14px; }
.sound-help dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin: 0; }
.sound-help dl > div { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.sound-help dt { min-width: 105px; color: var(--sound-muted); font-size: 12px; }
.sound-help dd { font-size: 12px; color: var(--sound-ink); margin: 0; }
.sound-section kbd { display: inline-block; color: var(--sound-ink); background: #354031; border: 1px solid #53604b; border-bottom-width: 2px; border-radius: 4px; padding: 2px 5px; font: 11px/1.4 ui-monospace, monospace; vertical-align: middle; }
#soundList { width: 100%; padding: 0; margin: 0; display: grid; gap: 14px; list-style: none; }
#soundList > .sound-track {
  position: relative;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 20px 22px 12px;
  border: 1px solid #3e4b38;
  border-radius: 12px;
  background: var(--sound-surface) !important;
  box-shadow: 0 2px 5px #00000010;
  transition: background .18s, border-color .18s, box-shadow .18s;
  overflow: visible;
}
#soundList > .sound-track::before { content: none; }
#soundList > .sound-track[hidden] { display: none !important; }
#soundList > .sound-track:hover { border-color: #758069; background: #253022 !important; }
#soundList > .sound-track:focus-visible,
#soundList > .sound-track:has(:focus-visible) { outline: 2px solid var(--sound-accent); outline-offset: 3px; }
#soundList > .sound-track[data-state="playing"],
#soundList > .sound-track[data-state="loading"] { border-color: #a59e63; background: linear-gradient(110deg, #303825, #242e21) !important; box-shadow: inset 3px 0 0 var(--sound-accent), 0 4px 18px #00000018; }
#soundList > .sound-track[data-state="error"] { border-color: #ba8972; }
.sound-track-top, .sound-track-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sound-track-top { justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sound-track-identity { flex-wrap: wrap; gap: 6px 10px; }
.sound-track-number { color: #a0ad97; font: 12px ui-monospace, SFMono-Regular, Consolas, monospace; }
.sound-category { color: var(--sound-accent); background: #373e29; border-radius: 4px; padding: 2px 7px; font-size: 11px; font-weight: 500; line-height: 1.6; white-space: nowrap; }
[data-category="field"] .sound-category { color: #b7d3b1; background: #2e4030; }
[data-category="sound"] .sound-category { color: #e5bba4; background: #463b2c; }
.sound-date { color: var(--sound-muted); font-size: 11px; }
.sound-state { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 6px; font-size: 11px; color: var(--sound-muted); }
[data-state="playing"] .sound-state { color: var(--sound-accent); }
[data-state="error"] .sound-state { color: #f0b5a0; }
.sound-meter { display: flex; align-items: center; gap: 2px; height: 14px; }
.sound-meter i { display: block; width: 2px; height: 3px; border-radius: 1px; background: currentColor; }
[data-state="playing"] .sound-meter i { height: 10px; animation: sound-meter .8s ease-in-out infinite alternate; }
[data-state="playing"] .sound-meter i:nth-child(2) { animation-delay: -.5s; height: 14px; }
[data-state="playing"] .sound-meter i:nth-child(3) { animation-delay: -.25s; height: 8px; }
.sound-track-main { display: flex; gap: 16px; align-items: center; margin-bottom: 12px; }
.sound-track-copy { min-width: 0; flex: 1; }
.sound-section .sound-track-copy h3 { margin: 0 0 6px; padding: 0; font-size: 1.12rem; line-height: 1.45; font-weight: 600; color: var(--sound-ink); text-shadow: none; overflow-wrap: anywhere; }
.sound-section .sound-track-copy p { margin: 0; color: var(--sound-muted); font-size: .82rem; line-height: 1.7; }
.sound-section .sound-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 40px;
  min-width: 40px;
  min-height: 44px;
  padding: 9px;
  margin: 0;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #bdc7b6;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: background .15s, color .15s, transform .15s, box-shadow .15s;
}
.sound-section .sound-button svg { width: 19px; height: 19px; display: block; flex: 0 0 auto; }
.sound-section .sound-button:hover { color: var(--sound-ink); background: #414b35; }
.sound-section .sound-button:active { transform: scale(.92); background: #505b40; }
.sound-section .sound-button[aria-pressed="true"]:not(.sound-play) { color: var(--sound-accent); background: #41462c; border-color: #656447; }
.sound-section .sound-play {
  width: 54px;
  height: 54px;
  min-width: 54px;
  border-radius: 50%;
  color: #20291b;
  background: var(--sound-accent);
  border: 1px solid var(--sound-accent);
}
.sound-section .sound-play svg { width: 26px; height: 26px; }
.sound-section .sound-play:hover { background: #f1e4a3; color: #182015; box-shadow: 0 0 0 5px #ded18a18; transform: scale(1.04); }
.sound-section .sound-play:active { transform: scale(.94); }
.sound-section :is(button, select, summary):focus-visible { outline: 2px solid var(--sound-accent); outline-offset: 3px; }
.sound-section :is(button, select, summary, input):focus { box-shadow: none; }
.sound-button::after {
  display: none;
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translate(-50%, 3px);
  padding: 6px 9px;
  border: 1px solid #6d795f;
  border-radius: 5px;
  background: #10180f;
  color: var(--sound-ink);
  font: 11px/1.4 sans-serif;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .15s, transform .15s;
  z-index: 4;
}
.sound-button:is(:hover, :focus-visible)::after { display: block; opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.sound-play::after, .sound-transport .sound-button:first-child::after { left: 0; transform: translate(0, 3px); }
.sound-play:is(:hover, :focus-visible)::after, .sound-transport .sound-button:first-child:is(:hover, :focus-visible)::after { transform: translate(0, 0); }
.sound-options .sound-button::after { left: auto; right: 0; transform: translateY(3px); }
.sound-options .sound-button:is(:hover, :focus-visible)::after { transform: translateY(0); }
.sound-spinner { width: 21px; height: 21px; border: 2px solid #20291b50; border-top-color: #20291b; border-radius: 50%; animation: sound-spin .75s linear infinite; }
.sound-timeline { --progress: 0%; --buffered: 0%; position: relative; height: 56px; width: 100%; margin-top: 8px; cursor: pointer; border-radius: 4px; }
.sound-waveform { display: flex; align-items: center; justify-content: space-between; gap: 2px; height: 44px; padding-top: 3px; pointer-events: none; }
.sound-waveform > span { display: block; flex: 1; min-width: 1px; max-width: 5px; height: var(--bar-height); background: #64735a; border-radius: 1.5px; transition: background-color .12s; }
.sound-waveform > .is-played { background: var(--sound-accent); }
.sound-timeline:hover .sound-waveform > span:not(.is-played), .sound-timeline:focus-within .sound-waveform > span:not(.is-played) { background: #829173; }
.sound-seek-line { position: absolute; bottom: 5px; left: 0; right: 0; height: 3px; background: #384332; border-radius: 3px; overflow: hidden; }
.sound-seek-line::before { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--buffered); background: #758064; }
.sound-seek-line > span { display: block; position: relative; width: var(--progress); height: 100%; background: var(--sound-accent); }
.sound-seek-cursor { position: absolute; left: clamp(5px, var(--progress), calc(100% - 5px)); bottom: 2px; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; background: var(--sound-accent); transition: box-shadow .15s; pointer-events: none; }
.sound-timeline:is(:hover, :focus-within) .sound-seek-cursor, .is-scrubbing .sound-seek-cursor { box-shadow: 0 0 0 5px #ded18a25; }
.sound-section .sound-seek { position: absolute; inset: 0; display: block; width: 100%; height: 100%; padding: 0; margin: 0; cursor: pointer; opacity: 0; touch-action: pan-y; }
.sound-timeline:has(:focus-visible) { outline: 2px solid var(--sound-accent); outline-offset: 4px; }
.sound-seek-preview { position: absolute; bottom: calc(100% + 3px); left: var(--preview-x, 25px); transform: translateX(-50%); background: #e7dda9; color: #20291b; border-radius: 4px; font: 11px/1.5 ui-monospace, monospace; padding: 3px 7px; opacity: 0; transition: opacity .12s; pointer-events: none; z-index: 2; }
.sound-timeline:hover .sound-seek-preview, .is-scrubbing .sound-seek-preview { opacity: 1; }
.sound-timeline-plain { height: 32px; }
.sound-time-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-height: 24px; font: 11px/1.8 ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--sound-muted); }
.sound-current { color: var(--sound-accent); }
.sound-duration { margin-left: auto; }
.sound-feedback { opacity: 0; transform: translateY(3px); transition: opacity .16s, transform .16s; font-family: inherit; color: var(--sound-accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center !important; }
.has-feedback .sound-feedback { opacity: 1; transform: none; }
.sound-track-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 7px; padding-top: 7px; border-top: 1px solid #3c493533; }
.sound-transport, .sound-options, .sound-volume-group { display: flex; align-items: center; gap: 3px; }
.sound-volume-group { margin-left: auto; min-width: 0; }
.sound-section .sound-volume { --volume: 100%; appearance: none; -webkit-appearance: none; width: 72px; min-width: 36px; max-width: 120px; height: 32px; margin: 0; padding: 0; border: 0; background: transparent; cursor: pointer; }
.sound-section input.sound-volume::-webkit-slider-runnable-track { height: 3px; background: linear-gradient(to right, #bbc79c var(--volume), #4e5b43 var(--volume)); border-radius: 3px; }
.sound-section input.sound-volume::-moz-range-track { height: 3px; background: linear-gradient(to right, #bbc79c var(--volume), #4e5b43 var(--volume)); border-radius: 3px; }
.sound-section input.sound-volume::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; height: 10px; width: 10px; border: 0; border-radius: 50%; background: #d5debc; margin-top: -3.5px; transition: box-shadow .15s; }
.sound-section input.sound-volume::-moz-range-thumb { height: 10px; width: 10px; border: 0; border-radius: 50%; background: #d5debc; }
.sound-section input.sound-volume:hover::-webkit-slider-thumb { box-shadow: 0 0 0 4px #ded18a20; }
.sound-volume:focus-visible { outline: 2px solid var(--sound-accent); outline-offset: 2px; border-radius: 4px; }
.sound-volume-value { color: var(--sound-muted); font: 10px ui-monospace, monospace; min-width: 33px; text-align: right !important; }
.sound-options { margin-left: 6px; }
.sound-section .sound-speed { width: 66px; height: 44px; min-width: 0; padding: 8px 20px 8px 8px; margin: 0; color: var(--sound-ink); font: 12px ui-monospace, monospace; border-radius: 7px; border: 1px solid transparent; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='m1 1 4 4 4-4' stroke='%23afb8a9' fill='none'/%3E%3C/svg%3E") right 7px center / 10px 6px no-repeat; appearance: none; -webkit-appearance: none; cursor: pointer; }
.sound-section .sound-speed:hover { background-color: #414b35; }
.sound-speed option { background: #283323; color: var(--sound-ink); }
#soundList > .sound-placeholder { padding: 28px 16px; margin: 0; border: 1px dashed #59654c; background: transparent !important; box-shadow: none; color: var(--sound-muted) !important; font-size: 14px; }
.sound-placeholder p { margin: 0 0 12px; }
.sound-section .sound-retry { margin: 0; background: var(--sound-accent); color: #20291b; }
.sound-section .sound-footnote { text-align: center; font-size: 12px; color: var(--sound-muted); margin: 22px 0 0; }
@keyframes sound-spin { to { transform: rotate(360deg); } }
@keyframes sound-meter { to { transform: scaleY(.35); } }
@container sounds (max-width: 550px) {
  .sound-emblem { flex-basis: 42px; gap: 3px; transform: scale(.8); }
  .sound-track-top { align-items: flex-start; flex-wrap: wrap; gap: 6px; }
  #soundList > .sound-track { padding: 16px 14px 10px; }
  .sound-track-main { gap: 12px; }
  .sound-track-tools { display: grid; grid-template-columns: 1fr auto; gap: 0; }
  .sound-volume-group { grid-column: 1 / -1; grid-row: 2; margin: 2px 0 0; padding-top: 2px; border-top: 1px solid #3c493533; }
  .sound-section .sound-volume { flex: 1; width: auto; max-width: none; margin-right: 10px; }
  .sound-options { grid-column: 2; grid-row: 1; margin: 0; }
  .sound-volume-value { min-width: 38px; padding-right: 7px; }
  .sound-section .sound-filter { padding: 8px 9px; font-size: 12px; }
  .sound-help dl { grid-template-columns: 1fr; }
  .sound-waveform { gap: 1.5px; }
  .sound-state { font-size: 10px; }
}
@container sounds (max-width: 320px) {
  .sound-emblem { display: none; }
  .sound-section .sound-eyebrow { font-size: 10px; letter-spacing: .04em; }
  .sound-eyebrow span { margin: 0 3px; }
  .sound-track-identity { gap: 5px; }
  .sound-track-main { align-items: flex-start; }
  .sound-section .sound-play { width: 46px; height: 46px; min-width: 46px; }
  .sound-section .sound-track-copy h3 { font-size: 1.05rem; }
  .sound-waveform > span:nth-child(even) { display: none; }
}
@container sounds (max-width: 260px) {
  .sound-transport { grid-column: 1 / -1; justify-content: space-between; }
  .sound-options { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; }
  .sound-volume-group { grid-row: 3; }
  .sound-help dt { min-width: 0; }
}
@media (max-width: 640px) {
  .container:has(.sound-section) { padding-inline: 0; }
  .with-shadow:has(> .sound-section) { padding-inline: 12px; }
}
@media (hover: none) {
  .sound-button::after { display: none; }
  .sound-timeline:hover .sound-seek-preview { opacity: 0; }
  .is-scrubbing .sound-timeline .sound-seek-preview { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .sound-section *, .sound-section *::before, .sound-section *::after { animation: none !important; transition: none !important; }
  .sound-spinner { border-style: dotted; }
}
@media (forced-colors: active) {
  #soundList > .sound-track { border-color: CanvasText; }
  .sound-section .sound-play, .sound-section [aria-pressed="true"] { border: 2px solid Highlight; }
  .sound-waveform > span { background: GrayText; forced-color-adjust: none; }
  .sound-waveform > .is-played, .sound-seek-cursor, .sound-seek-line > span { background: Highlight; forced-color-adjust: none; }
  .sound-section :focus-visible { outline-color: Highlight; }
}
