/* Listening (web/core/listen.mjs): the queue's Listen shelf, the item page's control and the
   Integrations section. Self-contained like shared.css. Same six colours, one accent. */
.listen { margin: 1.5rem 0 1rem; }
.deck { margin: .6rem 0 .4rem; }
.deck[hidden] { display: none; }
.deck .now { margin: 0 0 .7rem; font-size: 15px; color: var(--dim); display: flex; flex-direction: column; gap: .15rem; }
.deck .now b { color: var(--text); font-weight: 600; font-size: 17px; line-height: 1.3; }
.deck .now span { font-size: 13px; }
/* The scrubber: a hairline track that fills with the accent up to where you are. Full width,
   with a thumb big enough for a thumb. */
.deck input[type=range] {
  display: block; width: 100%; appearance: none; -webkit-appearance: none; height: 4px; border-radius: 2px; margin: .4rem 0; padding: 0; border: 0;
  background: linear-gradient(to right, var(--accent) var(--at, 0%), var(--line) var(--at, 0%));
  cursor: pointer;
}
.deck input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--text); border: 0; }
.deck input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--text); border: 0; }
.deck input[type=range]:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--accent); }
/* The now-playing art (web/core/dither.mjs), centred over the title like a podcast's cover. */
.deck > .dither { margin: .5rem auto 1.25rem; }
/* Tabular numerals keep the clock from jittering as the seconds tick. */
.deck .times { display: flex; justify-content: space-between; color: var(--dim); font-size: 12px; font-variant-numeric: tabular-nums; }
/* The transport: one big play in the accent, the jumps either side, next at the end. */
.deck .transport { display: flex; align-items: center; justify-content: center; gap: 1.4rem; margin: .6rem 0 .2rem; }
button.icon {
  position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0;
  background: none; border: 0; border-radius: 50%; color: var(--text); cursor: pointer;
}
button.icon:disabled { opacity: .3; cursor: default; }
button.icon:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--accent); }
button.icon .n { position: absolute; font-size: 8px; font-weight: 700; line-height: 1; top: 50%; left: 50%; transform: translate(-50%, -50%); font-variant-numeric: tabular-nums; }
.deck button.icon.play { width: 64px; height: 64px; background: var(--accent); color: var(--bg); }
.deck .offline { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; justify-content: center; margin-top: .5rem; }
.deck button.quiet {
  background: none; border: 1px solid var(--line); border-radius: 999px; padding: .3rem .8rem;
  font: inherit; font-size: 12px; color: var(--dim); cursor: pointer;
}
.deck button.quiet:hover:not(:disabled) { color: var(--text); border-color: var(--accent); }
.deck button.quiet:disabled { opacity: .35; cursor: default; }
.deck .offline .kept { color: var(--dim); font-size: 12px; flex-basis: 100%; text-align: center; }

/* The mini player: on every tab, above the tab bar, while something is loaded. */
.mini {
  position: fixed; left: 0; right: 0; bottom: var(--tabbar, 0px); z-index: 30;
  display: flex; align-items: center; gap: .25rem; padding: .35rem .6rem .35rem 1rem;
  /* The bar spans the window but its contents line up with the page's column (index.html's
     main: 46rem less its 1.25rem gutters); the right side gives back the icon button's own
     inset, so the glyph and not the hit area meets the column's edge. */
  padding-left: max(1rem, calc((100% - 43.5rem) / 2));
  padding-right: max(.6rem, calc((100% - 43.5rem) / 2 - .7rem));
  background: var(--surface); border-top: 1px solid var(--line);
}
.mini[hidden] { display: none; }
.mini .progress { position: absolute; top: -1px; left: 0; height: 2px; background: var(--accent); width: 0; }
.mini .what {
  flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: .2rem 0; color: var(--text);
  font: inherit; cursor: pointer; display: flex; flex-direction: column;
}
.mini .what b { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini .what span { color: var(--dim); font-size: 11px; font-variant-numeric: tabular-nums; }
.mini button.icon.play { color: var(--accent); }
.listen .next { color: var(--dim); font-size: 13px; margin: .5rem 0 0; }
.listen .upnext-head { margin: 1.6rem 0 0; padding-bottom: .6rem; border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--dim); }
.listen ol.upnext { list-style: none; margin: 0; padding: 0; }
/* Listen is a .shelf, and .shelf li is a flex row with its own padding and rule: undone here,
   because the button inside is the row and carries all of that itself. */
.listen ol.upnext li { display: block; padding: 0; border-bottom: 1px solid var(--line); }
.listen ol.upnext li[hidden], .listen ol.upnext[hidden], .listen .upnext-head[hidden] { display: none; }
.listen ol.upnext button {
  display: flex; width: 100%; gap: 1rem; align-items: baseline; justify-content: space-between;
  padding: .75rem 0; background: none; border: 0; font: inherit; color: var(--text); text-align: left; cursor: pointer;
}
.listen ol.upnext button:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }
.listen ol.upnext .title { flex: 1; font-size: 15px; min-width: 0; white-space: normal; overflow: visible; }
.listen ol.upnext .len { color: var(--dim); font-size: 12px; font-variant-numeric: tabular-nums; flex: none; }
.listener button:not(.icon):not(.quiet), .listening button {
  background: var(--surface); border: 1px solid var(--line); border-radius: 4px;
  padding: .2rem .55rem; font: inherit; font-size: 12px; color: var(--text); cursor: pointer; white-space: nowrap;
}
.listener button:not(.icon):not(.quiet):hover, .listening button:hover { border-color: var(--accent); }
.listener button:not(.icon):not(.quiet):focus-visible, .listening button:focus-visible { outline: none; border-color: var(--accent); }
.listen .making, .listener .making { color: var(--dim); font-size: 13px; margin: .6rem 0 0; }
.listener { margin: 1.5rem 0; }
.listener[hidden] { display: none; }
.listener h3 { font-size: 13px; color: var(--dim); font-weight: 600; margin: 0 0 .5rem; border-bottom: 1px solid var(--line); padding-bottom: .6rem; }
.listener .meta { color: var(--dim); font-size: 12px; margin: .3rem 0 0; }
.listener .bad { color: var(--text); border-left: 2px solid var(--accent); padding-left: .6rem; font-size: 13px; }
.listener .say, .listen .say, .listening .say { color: var(--dim); font-size: 13px; margin: .5rem 0 0; }
.listener .say:empty, .listen .say:empty, .listening .say:empty { display: none; }
.listener form.ask { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-top: .5rem; }
.listener .again summary { color: var(--dim); font-size: 12px; cursor: pointer; margin-top: .6rem; }
.listener select, .listening select, .listening textarea {
  background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 4px;
  padding: .2rem .4rem; font: inherit; font-size: 13px;
}
.listener select:focus, .listening select:focus, .listening textarea:focus { outline: none; border-color: var(--accent); }
.listening label { display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-size: 13px; color: var(--dim); margin: .45rem 0; max-width: 24rem; }
.listening input[type=checkbox] { accent-color: var(--accent); width: 1rem; height: 1rem; }
.listening textarea { width: 100%; margin-top: .6rem; resize: vertical; }
.listening .feed, .listening .learned { margin-top: .9rem; }
.listening .feed button + button { margin-left: .4rem; }
.listening ul { margin: .4rem 0; padding-left: 1rem; color: var(--dim); font-size: 12px; }
.listening .feed button, .listening .learned button { margin-top: .6rem; }
.listening .brain, .listening .who { color: var(--dim); font-size: 13px; margin: .9rem 0 0; }
.listening .brain a { color: var(--accent); text-decoration: none; }
.listening .brain a:hover { text-decoration: underline; }
/* shared.css right-aligns a shelf row's buttons on a phone; the player is not a row. */
.listen .deck button { margin-left: 0; }

/* The item page at rest: one row, the play and how long. The deck takes over while it plays. */
.listener .full[hidden], .listener .rest[hidden] { display: none; }
.listener .rest { display: flex; align-items: center; gap: .75rem; padding: .6rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.listener .rest button.icon.play { background: var(--accent); color: var(--bg); flex: none; }
.listener .rest .what { display: flex; flex-direction: column; min-width: 0; }
.listener .rest .what b { font-weight: 600; font-size: 14px; }
.listener .rest .what span { color: var(--dim); font-size: 12px; }
