
.pod {
  min-width: 0;
  font-family: var(--f-sans);
  color: var(--fg);
}
.pod:not(:last-child) { margin-bottom: 10px; }

.pod__tab {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: none;
  color: var(--fg);
  font: inherit;
  font-size: var(--fs-small);
  line-height: 1.2;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}
.pod__tab:hover { border-color: var(--fg-subtle); }
.pod__tab svg { width: 16px; height: 16px; flex: none; color: var(--brand); }
.pod[data-open="1"] .pod__tab { display: none; }

.pod__panel {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
}
.pod__panel[hidden] { display: none; }

.pod__top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pod__cuts {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}
.pod__cuts button {
  display: grid;
  gap: 1px;
  align-content: center;
  justify-items: center;
  min-width: 0;
  min-height: 34px;
  padding: 2px 2px 0;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--fg-subtle);
  font: inherit;
  font-size: var(--fs-small);
  line-height: 1.1;
  white-space: nowrap;
  cursor: pointer;
}
.pod__cuts button:first-child { border-bottom-left-radius: calc(var(--r-sm) - 1px); }
.pod__cuts button:last-child  { border-bottom-right-radius: calc(var(--r-sm) - 1px); }
.pod__cuts button:not(:disabled) ~ button { border-left: 1px solid var(--line); }
.pod__cuts button:hover { color: var(--fg); }
.pod__cuts button[aria-pressed="true"] { color: var(--fg); border-bottom-color: var(--brand); }
.pod__cuts button:disabled { display: none; }
.pod .pod__cuts button:active { filter: none; transform: none; }
.pod__min {
  min-height: 1.1em;
  font-size: var(--fs-kicker);
  color: var(--fg-subtle);
}
.pod__fig {
  font-family: var(--f-mono);
  font-variant-numeric: tabular-nums;
}

.pod__title { display: none; }

.pod__close {
  flex: none;
  width: 36px;
  height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: none;
  color: var(--fg-subtle);
  cursor: pointer;
}
.pod__close:hover { color: var(--fg); border-color: var(--line); }
.pod__close svg { width: 15px; height: 15px; }

.pod__speaker {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--fs-small);
  line-height: 1.3;
  color: var(--fg);
}

.pod__bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 7px;
  min-width: 0;
}
.pod__seek {
  display: block;
  width: 100%;
  min-width: 0;
  height: 16px;
  margin: 0;
  accent-color: var(--brand);
  cursor: pointer;
}
.pod__seek:disabled { cursor: default; }
.pod__now,
.pod__dur {
  min-width: 4ch;
  font-family: var(--f-mono);
  font-size: var(--fs-kicker);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  color: var(--fg-subtle);
  white-space: nowrap;
}
.pod__dur { text-align: right; }

.pod__ctl { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pod__play {
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--brand);
  color: var(--brand-fg);
  cursor: pointer;
}
.pod__play:hover { background: var(--brand-strong); }
.pod__play:disabled {
  border: 1px solid var(--line);
  background: none;
  color: var(--fg-subtle);
  cursor: default;
}
.pod__play svg { width: 18px; height: 18px; }
.pod__i-pause { display: none; }
.pod[data-playing="1"] .pod__i-play  { display: none; }
.pod[data-playing="1"] .pod__i-pause { display: block; }

.pod__rate {
  flex: none;
  min-width: 48px;
  height: 36px;
  padding: 0 2px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: none;
  color: var(--fg);
  font-family: var(--f-mono);
  font-size: var(--fs-small);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.pod__rate:hover { border-color: var(--fg-subtle); }

.pod__open {
  flex: 1 1 0;
  min-width: 0;
  height: 36px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: none;
  color: var(--fg);
  font: inherit;
  font-size: var(--fs-small);
  white-space: nowrap;
  cursor: pointer;
}
.pod__open:hover { border-color: var(--fg-subtle); }
.pod__open[hidden] { display: none; }
.pod__open-l { display: none; }

.pod__note {
  margin: 0;
  font-size: var(--fs-kicker);
  line-height: 1.4;
  color: var(--fg-subtle);
  text-wrap: pretty;
}
.pod[data-in-rail] .pod__note { display: none; }
.pod[data-in-rail] .pod__min,
.pod[data-in-rail] .pod__speaker { display: none; }

@media (pointer: coarse), (max-width: 900px) {
  .pod__tab { min-height: 44px; }
  .pod__cuts button { min-height: 44px; }
  .pod__close { width: 44px; height: 44px; }
  .pod__rate, .pod__open { height: 44px; }
  .pod__seek { height: 44px; }
}

@media (max-width: 900px) {
  .pod {
    position: fixed;
    left: var(--foot-vo, 0px);
    bottom: 0;
    width: var(--foot-pod, 108px);
    z-index: 79;
    margin: 0;
  }
  .pod:not(:last-child) { margin-bottom: 0; }
  .pod__tab,
  .pod__tab:hover {
    justify-content: center;
    gap: 8px;
    height: var(--agx-foot-h, 49px);
    padding: 0 0 env(safe-area-inset-bottom, 0px);
    border: 0;
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
    border-radius: 0;
    background: var(--surface);
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1;
  }
  .pod__tab svg { width: 20px; height: 20px; }
  .pod__tab-x { display: none; }

  .pod[data-open="1"] { z-index: 96; }
  .pod__panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 96;
    max-height: calc(100dvh - var(--dk-top, 0px));
    overflow-y: auto;
    gap: 10px;
    padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px));
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    background: var(--surface);
  }
  .pod__top { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; }
  .pod__title {
    display: block;
    grid-column: 1;
    grid-row: 1;
    margin: 0;
    font-family: var(--f-display);
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.02em;
  }
  .pod__close { grid-column: 2; grid-row: 1; margin-right: -8px; }
  .pod__cuts { grid-column: 1 / -1; grid-row: 2; }
  .pod__ctl { flex-wrap: wrap; gap: 8px; }
  .pod__rate { min-width: 60px; padding: 0 8px; }
  .pod__open { flex: 1 1 170px; padding: 0 12px; }
  .pod__open-l { display: inline; }
  .pod__open-s { display: none; }

  .drail.is-hidden ~ .pod { visibility: hidden; }
  .drail.is-hidden ~ .pod[data-playing="1"],
  .drail.is-hidden ~ .pod[data-open="1"] { visibility: visible; }
}
@media (max-width: 349px) {
  .pod__tab-t {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }
}

@media print {
  .pod { display: none !important; }
}
