/* Compact TodahPlay playback dock. Controls stay visible while the player floats above the page. */
#todah-media-player {
  position: fixed;
  z-index: 80;
  left: 50%;
  right: auto;
  bottom: max(14px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  box-sizing: border-box;
  width: min(690px, calc(100vw - 36px));
  min-height: 66px;
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(250px, 1.2fr) minmax(125px, .8fr);
  align-items: center;
  gap: 16px;
  padding: 11px 16px;
  border: 1px solid rgb(226 205 153 / 22%);
  border-radius: 16px;
  background: linear-gradient(135deg, rgb(29 31 35 / 97%), rgb(19 21 24 / 97%));
  color: #f7f5ef;
  box-shadow: 0 14px 38px rgb(0 0 0 / 40%), 0 2px 8px rgb(0 0 0 / 20%);
  backdrop-filter: blur(18px);
  font-family: Inter, system-ui, sans-serif;
}
#todah-media-player *, #todah-media-player *::before, #todah-media-player *::after { box-sizing: border-box; }
#todah-media-player .tmp-info { display: flex; align-items: center; gap: 10px; min-width: 0; }
#todah-media-player .tmp-disc {
  width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center;
  border: 1px solid rgb(255 255 255 / 12%); border-radius: 10px;
  background: linear-gradient(145deg, #d8bd79, #9e7935); color: #17191c; font-size: 19px;
}
#todah-media-player .tmp-copy { display: grid; gap: 3px; min-width: 0; }
#todah-media-player .tmp-copy strong, #todah-media-player .tmp-copy span, #todah-media-player .tmp-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#todah-media-player .tmp-copy strong { color: #fff; font-size: 12px; font-weight: 600; line-height: 1.3; }
#todah-media-player .tmp-copy span { color: #c0c0bd; font-size: 10px; line-height: 1.3; }
#todah-media-player .tmp-copy small { color: #d7bd79; font-size: 9px; line-height: 1.3; }
#todah-media-player .tmp-main { min-width: 0; display: grid; gap: 7px; }
#todah-media-player .tmp-tools { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: nowrap; }
#todah-media-player button {
  min-width: 28px; min-height: 28px; display: inline-grid; place-items: center;
  padding: 0; border: 0; border-radius: 8px; background: transparent;
  color: #c3c3c0; font: inherit; font-size: 14px; line-height: 1; cursor: pointer;
  transition: color .16s ease, background-color .16s ease, transform .16s ease;
}
#todah-media-player button:hover { color: #fff; background: rgb(255 255 255 / 9%); }
#todah-media-player button:focus-visible, #todah-media-player input:focus-visible { outline: 2px solid #dfc478; outline-offset: 2px; }
#todah-media-player .tmp-tools button[aria-pressed="true"] { color: #e0c77f; }
#todah-media-player .tmp-play { width: 32px; height: 32px; border-radius: 50%; background: #e5d29e; color: #17191c; font-weight: 700; }
#todah-media-player .tmp-play:hover { background: #f2dfaa; color: #111; transform: scale(1.04); }
#todah-media-player .tmp-seek { display: grid; grid-template-columns: 31px minmax(45px, 1fr) 31px; align-items: center; gap: 7px; }
#todah-media-player .tmp-current, #todah-media-player .tmp-duration { color: #a9aaa8; font-size: 9px; font-variant-numeric: tabular-nums; text-align: center; }
#todah-media-player input[type="range"]:not(.tmp-volume) { width: 100%; height: 4px; margin: 0; border-radius: 99px; accent-color: #d9bd75; cursor: pointer; }
#todah-media-player .tmp-extras { display: flex; align-items: center; justify-content: flex-end; gap: 5px; min-width: 0; }
#todah-media-player .tmp-extras button { font-size: 13px; }
/* The volume control lives in a floating popover, never in the player's layout. */
#todah-media-player .tmp-volume { display: none; width: 76px; max-width: 76px; min-width: 76px; height: 14px; padding: 8px 10px; border: 1px solid rgb(226 205 153 / 22%); border-radius: 999px; background: #202226; box-shadow: 0 6px 20px rgb(0 0 0 / 35%); }
#todah-media-player .tmp-extras.tmp-volume-open .tmp-volume { display: block; }
#todah-media-player .tmp-mute { width: 28px; min-width: 28px; }
#todah-media-player .tmp-rate { min-width: 34px; color: #d4d1c8; font-size: 10px; }
#todah-media-player .tmp-close { width: 26px; min-width: 26px; color: #aaa9a5; font-size: 19px; }
#todah-media-player .tmp-queue {
  position: absolute; right: 12px; bottom: calc(100% + 9px); width: min(320px, calc(100vw - 30px));
  max-height: min(280px, 50vh); overflow: auto; padding: 13px 15px;
  border: 1px solid rgb(226 205 153 / 22%); border-radius: 12px;
  background: #202226; box-shadow: 0 10px 35px rgb(0 0 0 / 42%);
}
#todah-media-player .tmp-queue[hidden] { display: none !important; }
#todah-media-player .tmp-queue h3 { margin: 0 0 8px; color: #fff; font-size: 12px; }
#todah-media-player .tmp-queue ol { margin: 0; padding-left: 20px; color: #c1c1be; font-size: 11px; }
#todah-media-player .tmp-queue li { padding: 5px 0; }
@media (max-width: 760px) {
  /* One compact horizontal row: identity | transport + seek | utility actions. */
  #todah-media-player {
    bottom: max(8px, env(safe-area-inset-bottom)); width: calc(100vw - 20px); min-height: 0;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto;
    grid-template-rows: auto; gap: 3px; padding: 6px 7px; border-radius: 13px;
  }
  #todah-media-player .tmp-info { grid-column: 1; grid-row: 1; gap: 6px; min-width: 0; align-self: center; }
  #todah-media-player .tmp-disc { width: 32px; height: 32px; flex-basis: 32px; border-radius: 8px; font-size: 15px; }
  #todah-media-player .tmp-info .tmp-copy { display: flex; gap: 2px; align-items: center; }
  #todah-media-player .tmp-copy strong { max-width: 72px; font-size: 10px; }
  #todah-media-player .tmp-copy span { max-width: 52px; font-size: 8px; }
  #todah-media-player .tmp-copy small { display: none; }
  #todah-media-player .tmp-main { grid-column: 2; grid-row: 1; display: grid; grid-template-columns: auto minmax(12px, .55fr); align-items: center; gap: 2px; }
  #todah-media-player .tmp-tools { justify-content: center; gap: 0; }
  #todah-media-player .tmp-tools button { min-width: 19px; min-height: 22px; font-size: 9px; }
  #todah-media-player .tmp-play { width: 22px; height: 22px; min-width: 22px !important; font-size: 9px !important; }
  #todah-media-player .tmp-seek { grid-row: 1; grid-column: 2; grid-template-columns: 17px minmax(12px, 1fr) 17px; gap: 1px; }
  #todah-media-player .tmp-current, #todah-media-player .tmp-duration { font-size: 6px; }
  #todah-media-player .tmp-seek input { height: 3px; }
  #todah-media-player .tmp-extras { position: relative; grid-column: 3; grid-row: 1; gap: 1px; align-self: center; }
  #todah-media-player .tmp-extras button { min-width: 22px; min-height: 25px; font-size: 11px; }
  #todah-media-player .tmp-mute { width: 22px; min-width: 22px; }
  #todah-media-player .tmp-rate { min-width: 25px !important; font-size: 8px !important; }
  #todah-media-player .tmp-close { width: 20px; min-width: 20px; font-size: 16px; }
  #todah-media-player .tmp-extras .tmp-volume { display: none; position: absolute; right: 18px; bottom: calc(100% + 7px); z-index: 2; width: 76px; max-width: 76px; min-width: 76px; height: 14px; padding: 8px 10px; border: 1px solid rgb(226 205 153 / 22%); border-radius: 999px; background: #202226; box-shadow: 0 6px 20px rgb(0 0 0 / 35%); }
  #todah-media-player .tmp-extras.tmp-volume-open .tmp-volume { display: block; }
  #todah-media-player .tmp-queue { grid-row: auto; grid-column: 1 / -1; right: 0; bottom: calc(100% + 8px); }
}
@media (max-width: 360px) {
  #todah-media-player { width: calc(100vw - 12px); padding: 6px; gap: 4px; }
  #todah-media-player .tmp-disc { width: 27px; height: 27px; flex-basis: 27px; font-size: 13px; }
  #todah-media-player .tmp-copy strong { font-size: 9px; }
  #todah-media-player .tmp-copy span { display: none; }
  #todah-media-player .tmp-extras button { min-width: 19px; }
  #todah-media-player .tmp-mute { width: 19px; min-width: 19px; }
  #todah-media-player .tmp-rate { min-width: 22px !important; }
  #todah-media-player .tmp-close { width: 18px; min-width: 18px; }
  #todah-media-player .tmp-tools button { min-width: 19px; }
  #todah-media-player .tmp-play { width: 24px; height: 24px; min-width: 24px !important; }
  #todah-media-player .tmp-seek { grid-template-columns: 17px minmax(18px, 1fr) 17px; gap: 1px; }
  #todah-media-player .tmp-current, #todah-media-player .tmp-duration { font-size: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  #todah-media-player button { transition: none; }
}
