/* Drift's final compact application shell. Loaded last on purpose. */
main#main {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  width: min(1600px, calc(100% - 24px));
  margin: 0 auto;
  padding: 12px 0 max(88px, env(safe-area-inset-bottom));
}

.drift-player-view,
.drift-lab-view {
  grid-column: 2;
  min-width: 0;
}

.drift-rail {
  position: sticky;
  top: 88px;
  grid-column: 1;
  display: flex;
  align-self: start;
  flex-direction: column;
  gap: 7px;
  max-height: calc(100svh - 100px);
  padding: 9px;
  overflow-y: auto;
  border: 1px solid var(--native-border);
  border-radius: 20px;
  background: color-mix(in srgb, var(--native-surface) 90%, transparent);
  box-shadow: 0 16px 44px rgba(0, 0, 0, .17);
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
  backdrop-filter: blur(18px) saturate(1.12);
  scrollbar-width: none;
}

.drift-rail::-webkit-scrollbar {
  display: none;
}

.rail-tool {
  --rail-colour: var(--action-blue);
  display: grid;
  min-height: 48px;
  padding: 6px 4px;
  place-items: center;
  gap: 3px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  color: color-mix(in srgb, var(--rail-colour) 72%, var(--muted));
  text-decoration: none;
}

.rail-tool svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.rail-player svg {
  fill: currentColor;
  stroke: none;
}

.rail-tool span {
  display: none;
  font: 7px/1.2 var(--mono);
  letter-spacing: .03em;
}

.rail-tool:is(:hover, :focus-visible) {
  border-color: color-mix(in srgb, var(--rail-colour) 54%, transparent);
  background:
    radial-gradient(circle at 50% 32%, color-mix(in srgb, var(--rail-colour) 28%, transparent), transparent 72%),
    color-mix(in srgb, var(--rail-colour) 9%, var(--native-raised));
  box-shadow: 0 0 24px color-mix(in srgb, var(--rail-colour) 28%, transparent);
  color: var(--rail-colour);
  transform: translateY(-2px);
}

.rail-tool:is(:hover, :focus-visible) span {
  display: block;
}

.rail-player { --rail-colour: var(--action-green); }
.rail-sources { --rail-colour: var(--action-blue); }
.rail-playground { --rail-colour: var(--action-gold); }
.rail-lyrics { --rail-colour: var(--action-red); }
.rail-theme { --rail-colour: var(--action-earth); }
.rail-sandbox { --rail-colour: #b99af2; }
.rail-artist { --rail-colour: var(--action-green); }

.player-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 10px 16px;
  width: 100%;
  max-width: none;
  padding: 8px;
}

.player-shell > :is(.welcome, .modes, .player-service-orbit, .now-playing, .player-media-shell, .transport, .actions, .direction-panel, .reason, .support, .drift-system-reveal) {
  grid-column: 1;
}

.player-shell > .lyrics-section {
  position: sticky;
  top: 88px;
  grid-column: 2;
  grid-row: 1 / span 8;
  align-self: start;
  min-height: 340px;
  max-height: calc(100svh - 110px);
  overflow: hidden;
  padding: 13px;
  border: 1px solid var(--native-border);
  border-radius: 18px;
  background: color-mix(in srgb, var(--native-surface) 86%, transparent);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.player-shell .welcome {
  padding: 12px 0 8px;
}

.player-shell .welcome .eyebrow {
  margin-bottom: 6px;
}

.player-shell .welcome h1 {
  max-width: none;
  margin-bottom: 7px;
  font-size: clamp(30px, 3.2vw, 43px);
  line-height: .95;
}

.player-shell .welcome .intro {
  max-width: none;
  font-size: 11px;
  line-height: 1.5;
}

.player-shell .install-note-entry {
  margin-top: 8px;
}

.player-shell .modes {
  gap: 6px;
  padding-bottom: 5px;
}

.player-shell .mode {
  min-height: 54px;
  padding: 10px;
  border-radius: 12px;
}

.player-shell .mode b {
  font-size: 11px;
}

.player-shell .mode small {
  font-size: 8px;
}

.player-service-orbit {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

.service-orbit-tool {
  --orbit-colour: var(--action-blue);
  display: grid;
  min-width: 0;
  min-height: 48px;
  padding: 7px 5px;
  place-items: center;
  gap: 3px;
  border: 1px solid color-mix(in srgb, var(--orbit-colour) 30%, var(--native-border));
  border-radius: 12px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--orbit-colour) 7%, transparent), transparent),
    color-mix(in srgb, var(--native-surface) 88%, transparent);
  color: color-mix(in srgb, var(--orbit-colour) 76%, var(--muted));
}

.service-orbit-tool svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.service-orbit-tool span {
  overflow: hidden;
  max-width: 100%;
  font: 7px/1.2 var(--mono);
  letter-spacing: .03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-trail { --orbit-colour: var(--action-green); }
.service-albums { --orbit-colour: var(--action-gold); }
.service-import { --orbit-colour: var(--action-blue); }
.service-lyrics { --orbit-colour: var(--action-red); }
.service-theme { --orbit-colour: var(--action-earth); }
.service-sandbox { --orbit-colour: #b99af2; }

.service-orbit-tool:is(:hover, :focus-visible) {
  border-color: var(--orbit-colour);
  background:
    radial-gradient(circle at 50% 20%, color-mix(in srgb, var(--orbit-colour) 27%, transparent), transparent 68%),
    color-mix(in srgb, var(--orbit-colour) 10%, var(--native-raised));
  box-shadow: 0 0 24px color-mix(in srgb, var(--orbit-colour) 28%, transparent);
  color: var(--orbit-colour);
  transform: translateY(-2px);
}

.player-shell .now-playing {
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 13px;
  padding: 14px;
  border-radius: 16px;
}

.player-shell .art {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 1px solid rgba(228, 189, 123, .4);
  cursor: pointer;
}

.player-shell .art img {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-shell .art.has-artwork span {
  display: none;
}

.player-shell .art::after {
  content: "PLAY / PAUSE";
  position: absolute;
  z-index: 4;
  right: 6px;
  bottom: 6px;
  left: 6px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, .36);
  border-radius: 999px;
  background: rgba(5, 16, 15, .58);
  color: #fff;
  font: 6px/1.2 var(--mono);
  letter-spacing: .06em;
  text-align: center;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .2s ease, transform .2s ease;
}

.player-shell .art:is(:hover, :focus-visible)::after {
  opacity: 1;
  transform: translateY(0);
}

.video-close-button {
  position: absolute;
  z-index: 5;
  top: 16px;
  right: 16px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 999px;
  background: rgba(5, 16, 15, .58);
  color: #fff;
  font: 8px/1.2 var(--mono);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.video-close-button:is(:hover, :focus-visible) {
  border-color: var(--action-red);
  background: var(--action-red);
}

.video-master-blob {
  display: grid;
  place-items: center;
  position: absolute;
  z-index: 8;
  bottom: max(16px, env(safe-area-inset-bottom));
  right: max(16px, env(safe-area-inset-right));
  left: auto;
  width: 54px;
  height: 54px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  isolation: isolate;
  transform: none;
}

.video-master-aura,
.video-master-core {
  position: absolute;
  border-radius: 50%;
}

.video-master-aura {
  inset: -13px;
  background: radial-gradient(circle, rgba(65, 157, 255, .76), rgba(65, 157, 255, .18) 48%, transparent 72%);
  filter: blur(7px);
  animation: lyric-blob-breathe 2.7s ease-in-out infinite;
}

.video-master-core {
  inset: 8px;
  border: 1px solid rgba(222, 242, 255, .72);
  background: linear-gradient(145deg, #4aa9ff, #155fc6);
  box-shadow: 0 0 20px rgba(54, 149, 255, .72);
}

.video-master-blob[aria-expanded="true"] .video-master-aura {
  background: radial-gradient(circle, rgba(255, 72, 72, .78), rgba(255, 72, 72, .18) 48%, transparent 72%);
  animation: none;
}

.video-master-blob[aria-expanded="true"] .video-master-core {
  border-color: rgba(255, 224, 224, .75);
  background: linear-gradient(145deg, #ff5d5d, #b51f2c);
  box-shadow: 0 0 20px rgba(255, 64, 64, .72);
}

.video-master-blob.is-dormant .video-master-aura {
  opacity: 0;
  animation: none;
}

.video-master-blob.is-dormant .video-master-core {
  border-color: rgba(200, 228, 255, .72);
  background: transparent;
  box-shadow: 0 0 7px rgba(54, 149, 255, .16);
}

.video-master-blob[aria-expanded="true"].is-dormant .video-master-core {
  border-color: rgba(255, 210, 210, .72);
  box-shadow: 0 0 7px rgba(255, 64, 64, .16);
}

.player-media-shell:fullscreen .video-close-button,
.player-media-shell.video-focus-fallback .video-close-button {
  opacity: 0;
  pointer-events: none;
}

.player-media-shell:fullscreen,
.player-media-shell.video-focus-fallback {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #000;
}

.player-media-shell:fullscreen #playerEmbed,
.player-media-shell.video-focus-fallback #playerEmbed {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  aspect-ratio: auto;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #000;
  box-shadow: none;
}

.player-media-shell:fullscreen iframe,
.player-media-shell.video-focus-fallback iframe {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border-radius: 0;
}

.player-media-shell:fullscreen .video-master-blob,
.player-media-shell.video-focus-fallback .video-master-blob {
  top: auto;
  bottom: max(16px, env(safe-area-inset-bottom));
  right: max(16px, env(safe-area-inset-right));
  left: auto;
}

.player-media-shell:fullscreen .embedded-lyric-overlay,
.player-media-shell.video-focus-fallback .embedded-lyric-overlay {
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  left: max(20px, env(safe-area-inset-left));
}

body.video-fullscreen-active {
  overflow: hidden;
}

body.video-fullscreen-active :is(
  .skip-link,
  .drift-header,
  .drift-rail,
  .site-map,
  .nyarindo-thread-footer,
  .lyric-edit-blob,
  .drift-nav-blob,
  .drift-nav-panel,
  .video-close-button
) {
  display: none !important;
}

body.video-fullscreen-active button:not(.video-master-blob) {
  visibility: hidden !important;
  pointer-events: none !important;
}

body.video-fullscreen-active .video-master-blob {
  visibility: visible !important;
  pointer-events: auto !important;
}

.player-shell .now-playing::after {
  inset: 5px;
  border-radius: 12px;
}

.player-shell .track-info h2 {
  font-size: clamp(24px, 2.8vw, 35px);
}

.player-shell .track-info .path {
  margin-top: 5px;
}

.player-shell .official-source-link {
  margin-top: 7px;
}

.player-shell .transport {
  padding: 7px;
  border-radius: 14px;
}

.player-shell .transport button {
  min-height: 38px;
}

.player-shell .transport .transport-play {
  width: 44px;
  min-height: 44px;
  flex-basis: 44px;
}

.player-shell .actions {
  padding: 7px 0;
}

.player-shell .actions button {
  min-height: 38px;
  padding: 9px 12px;
  border-radius: 999px;
}

.player-shell .reason {
  margin: 7px 0;
  padding: 9px 11px;
}

.player-shell .lyrics-heading {
  gap: 7px;
}

.player-shell .lyrics-toggle {
  padding: 5px 0 10px;
}

.player-shell .lyrics {
  padding-bottom: 0;
}

.player-shell .lyrics-window {
  height: min(45vh, 360px);
}

.player-shell .lyrics-lines {
  gap: 8px;
  padding: 90px 0;
}

.player-shell .lyric-line {
  font-size: 17px;
}

.player-shell .support {
  padding-top: 7px;
}

.player-shell .support button {
  min-height: 38px;
  padding: 9px;
}

.player-shell .drift-system-reveal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 10px;
  padding: 13px 15px;
  border-radius: 17px;
  text-align: left;
}

.player-shell .drift-system-reveal .eyebrow {
  display: none;
}

.player-shell .drift-system-reveal h2 {
  margin: 0;
  font: 400 19px/1.15 var(--serif);
}

.player-shell .drift-system-button {
  min-width: 190px;
  min-height: 43px;
  flex: none;
  padding: 10px 14px;
}

.drift-lab-view .lab-return-bar {
  top: 76px;
  margin-top: 2px;
  padding: 9px 13px;
}

.drift-lab-view .drift-hero {
  min-height: 0;
  padding: 28px 0 22px;
  gap: 22px;
}

.drift-lab-view .drift-hero h1 {
  margin-bottom: 12px;
  font-size: clamp(38px, 5vw, 60px);
  line-height: .9;
}

.drift-lab-view .hero-copy > p:not(.eyebrow, .install-note-entry) {
  font-size: 12px;
  line-height: 1.55;
}

.drift-lab-view .source-grid {
  gap: 10px;
  padding-bottom: 34px;
}

.drift-lab-view .source-card {
  padding: 16px;
  border-radius: 17px;
}

.drift-lab-view .source-card h2 {
  font-size: clamp(29px, 3.4vw, 46px);
}

.drift-lab-view .trail-strip {
  gap: 18px;
  padding: 24px 0;
}

.drift-lab-view .playground-shell {
  margin-top: 34px;
  margin-bottom: 48px;
  padding: 18px;
}

.drift-lab-view .playground-header {
  padding-bottom: 14px;
}

.drift-lab-view .playground-header h2,
.drift-lab-view .artist-updates h2,
.drift-lab-view .rights-strip h2 {
  font-size: clamp(31px, 4vw, 48px);
}

.drift-lab-view .artist-updates {
  padding: 34px 0;
}

.drift-lab-view .rights-strip {
  margin-bottom: 42px;
  padding: 22px;
}

.playground-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 9px;
}

.playground-card {
  --card-colour: var(--action-blue);
  position: relative;
  min-height: 106px;
  max-height: 120px;
  padding: 15px;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--card-colour) 28%, var(--native-border));
  cursor: pointer;
  transition: max-height .34s ease, min-height .34s ease, border-color .22s ease, box-shadow .22s ease, transform .22s ease;
}

.playground-card:not(.is-expanded) h3 {
  max-height: 2.25em;
  overflow: hidden;
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.06;
  overflow-wrap: anywhere;
}

.playground-card::after {
  content: "Open tool  +";
  position: absolute;
  right: 14px;
  bottom: 12px;
  color: var(--card-colour);
  font: 8px/1.2 var(--mono);
  letter-spacing: .06em;
}

.playground-card:is(:hover, :focus-within) {
  border-color: color-mix(in srgb, var(--card-colour) 60%, var(--native-border));
  box-shadow: 0 0 26px color-mix(in srgb, var(--card-colour) 20%, transparent);
  transform: translateY(-2px);
}

.playground-card:not(.is-expanded) > :not(.eyebrow):not(h3) {
  display: none !important;
}

.playground-card.is-expanded {
  grid-column: 1 / -1;
  min-height: 0;
  max-height: 1500px;
  padding: clamp(18px, 2.5vw, 27px);
  cursor: default;
  transform: none;
}

.playground-card.is-expanded::after {
  content: "Active tool";
}

.profile-card,
#trail { --card-colour: var(--action-green); }
#collections { --card-colour: var(--action-gold); }
#import { --card-colour: var(--action-blue); }
#lyricLab { --card-colour: var(--action-red); }
#theme { --card-colour: var(--action-earth); }
#sandbox { --card-colour: #b99af2; }

.adaptive-tools {
  gap: 6px;
  padding-top: 11px;
}

.adaptive-tools button {
  --tool-colour: var(--action-blue);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  color: color-mix(in srgb, var(--tool-colour) 78%, var(--muted));
}

.adaptive-tools button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.adaptive-tools button[data-tool="trail"] { --tool-colour: var(--action-green); }
.adaptive-tools button[data-tool="collections"] { --tool-colour: var(--action-gold); }
.adaptive-tools button[data-tool="import"] { --tool-colour: var(--action-blue); }
.adaptive-tools button[data-tool="lyricLab"] { --tool-colour: var(--action-red); }
.adaptive-tools button[data-tool="theme"] { --tool-colour: var(--action-earth); }
.adaptive-tools button[data-tool="sandbox"] { --tool-colour: #b99af2; }

.adaptive-tools button:is(:hover, :focus-visible) {
  border-color: var(--tool-colour);
  background: color-mix(in srgb, var(--tool-colour) 11%, transparent);
  box-shadow: 0 0 20px color-mix(in srgb, var(--tool-colour) 23%, transparent);
  color: var(--tool-colour);
}

.profile-button {
  position: relative;
  border: 1px solid rgba(255, 255, 255, .65);
  background: conic-gradient(from 30deg, #f1d04e, #62b36e, #5bb8e8, #b99af2, #eb4b3c, #f1d04e);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .12), 0 0 20px rgba(91, 184, 232, .38);
  color: #07120c;
}

.profile-button::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 18%, rgba(255, 255, 255, .2) 19% 21%, transparent 22% 43%, rgba(255, 255, 255, .14) 44% 46%, transparent 47%);
  pointer-events: none;
  opacity: 0;
  transition: opacity .24s ease;
}

.profile-button.is-playing::after {
  opacity: 1;
  animation: drift-profile-disc 7s linear infinite;
}

.profile-button.is-playing > :is(span, img) {
  animation: drift-profile-disc 7s linear infinite;
}

.nav-live-visual {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 38px;
  height: 32px;
  padding: 0 6px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 999px;
  background: color-mix(in srgb, var(--native-raised) 70%, transparent);
  box-shadow: inset 0 0 12px rgba(91, 184, 232, .12);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
}

.nav-live-visual i {
  display: block;
  width: 2px;
  height: 5px;
  border-radius: 99px;
  background: linear-gradient(180deg, #f1d04e, #62b36e 52%, #5bb8e8);
  box-shadow: 0 0 5px rgba(91, 184, 232, .44);
  transform-origin: center;
}

body.player-is-playing .nav-live-visual i {
  animation: drift-nav-equalizer .72s ease-in-out infinite alternate;
}

body.player-is-playing .nav-live-visual i:nth-child(2) { animation-delay: -.46s; animation-duration: .58s; }
body.player-is-playing .nav-live-visual i:nth-child(3) { animation-delay: -.18s; animation-duration: .82s; }
body.player-is-playing .nav-live-visual i:nth-child(4) { animation-delay: -.61s; animation-duration: .64s; }
body.player-is-playing .nav-live-visual i:nth-child(5) { animation-delay: -.29s; animation-duration: .9s; }
body.player-is-playing .nav-live-visual i:nth-child(6) { animation-delay: -.72s; animation-duration: .55s; }

@keyframes drift-profile-disc {
  to {
    transform: rotate(360deg);
  }
}

@keyframes drift-nav-equalizer {
  from {
    height: 5px;
    opacity: .56;
  }
  to {
    height: 20px;
    opacity: 1;
  }
}

html[data-theme="light"] .quiet-action {
  border-color: rgba(33, 112, 153, .34);
  background: linear-gradient(135deg, rgba(255, 249, 222, .95), rgba(186, 229, 242, .84));
  color: #173e4e;
}

.mode:is(:hover, :focus-visible) {
  border-color: var(--mode-colour);
  background:
    radial-gradient(circle at 100% 0, color-mix(in srgb, var(--mode-colour) 24%, transparent), transparent 54%),
    color-mix(in srgb, var(--mode-colour) 12%, var(--native-raised));
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--mode-colour) 12%, transparent),
    0 0 30px color-mix(in srgb, var(--mode-colour) 28%, transparent);
}

.suno-art,
.suno-art img {
  aspect-ratio: 1 / 1;
}

.suno-art img {
  object-fit: cover;
}

.drift-header {
  background-position: center 50%;
  background-repeat: no-repeat;
  background-size: cover;
}

:is(.rail-tool, .adaptive-tools button, .transport button, .source-action, .soft-button, .directions button, .support button, .drift-system-button, .fullscreen-button, .profile-button):not(:disabled):hover {
  filter: saturate(1.28) brightness(1.07);
  transform: translateY(-2px);
}

@media (max-width: 1080px) {
  .drift-header {
    position: sticky;
    z-index: 70;
    top: 0;
  }

  .nav-live-visual {
    width: 34px;
    padding-inline: 5px;
  }

  main#main {
    grid-template-columns: 1fr;
    width: calc(100% - 16px);
    padding-top: 8px;
  }

  .drift-rail {
    position: sticky;
    top: 82px;
    grid-column: 1;
    flex-direction: row;
    width: 100%;
    max-height: none;
    padding: 7px;
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 0 0 16px 16px;
  }

  .rail-tool {
    min-width: 46px;
    min-height: 42px;
  }

  .rail-tool span {
    display: none !important;
  }

  .drift-player-view,
  .drift-lab-view {
    grid-column: 1;
  }

  .player-shell {
    grid-template-columns: 1fr;
  }

  .player-shell > .lyrics-section {
    position: relative;
    top: auto;
    grid-column: 1;
    grid-row: auto;
    min-height: 0;
    max-height: none;
  }

  .drift-lab-view .lab-return-bar {
    top: 130px;
  }
}

@media (max-width: 620px) {
  main#main {
    width: calc(100% - 12px);
  }

  .drift-rail {
    top: 94px;
  }

  .player-shell {
    padding: 4px;
  }

  .player-shell .welcome h1 {
    font-size: 31px;
  }

  .player-shell .modes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .player-shell .now-playing {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .player-service-orbit {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .player-shell .drift-system-reveal {
    align-items: stretch;
    flex-direction: column;
  }

  .playground-card {
    min-height: 122px;
    max-height: 122px;
  }

  .playground-card:not(.is-expanded) h3 {
    font-size: 21px;
    line-height: 1.04;
  }

  .playground-card.is-expanded {
    max-height: 2600px;
  }

  .public-track-actions {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-button.is-playing::after,
  .profile-button.is-playing > :is(span, img),
  body.player-is-playing .nav-live-visual i {
    animation: none;
  }
}

/* Linear coherence: identity at the top, direction in the middle, motion at the bottom. */
html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

body > .site-map,
body > .nyarindo-thread-footer,
body > .nyarindo-palette-strip {
  display: none;
}

body > .drift-header {
  grid-row: 1;
}

main#main {
  grid-row: 2;
  height: 100%;
  min-height: 0;
  padding: 8px 0;
  overflow: hidden;
}

.drift-player-view,
.drift-lab-view {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.player-shell {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-content: stretch;
  height: 100%;
  min-height: 0;
  gap: 8px;
  padding: 7px;
  overflow: hidden;
}

.player-shell > :is(.welcome, .modes, .actions, .direction-panel, .reason, .support, .drift-system-reveal, .lyrics-section) {
  display: none !important;
}

.player-shell > .now-playing {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  min-height: clamp(170px, 23vh, 225px);
}

.player-shell > .player-service-orbit {
  grid-column: 1;
  grid-row: 2;
  align-self: center;
}

.player-shell > .player-media-shell:not([hidden]) {
  grid-column: 1;
  grid-row: 2;
}

.player-shell:has(.player-media-shell:not([hidden])) > .player-service-orbit {
  display: none;
}

.player-shell > .transport {
  grid-column: 1;
  grid-row: 3;
  align-self: end;
  margin-top: 0;
}

.player-shell .now-playing {
  grid-template-columns: clamp(92px, 13vh, 148px) minmax(0, 1fr);
  align-items: center;
  height: auto;
  padding: clamp(14px, 2.2vh, 24px);
  overflow: hidden;
}

.player-shell .track-info {
  min-width: 0;
}

.player-shell .track-info h2 {
  display: -webkit-box;
  overflow: hidden;
  font-size: clamp(29px, 4.2vh, 52px);
  line-height: .98;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.player-shell .track-info #trackArtist {
  margin-top: 7px;
  font-size: clamp(11px, 1.6vh, 15px);
}

.player-shell .track-info .path {
  display: none;
}

.player-shell .track-info .album {
  margin-top: 4px;
}

.player-shell .player-service-orbit {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.player-shell .transport {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(180px, .8fr) auto;
  gap: 8px;
  padding: 8px;
  border-color: color-mix(in srgb, var(--action-green) 24%, var(--native-border));
}

.transport-cluster {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 4px 7px;
  border: 1px solid color-mix(in srgb, var(--cluster-colour, var(--action-green)) 28%, var(--native-border));
  border-radius: 12px;
  background: color-mix(in srgb, var(--cluster-colour, var(--action-green)) 5%, transparent);
}

.track-controls {
  --cluster-colour: var(--action-green);
}

.playlist-controls {
  --cluster-colour: var(--action-blue);
}

.playlist-controls.is-unavailable {
  opacity: .58;
}

.transport-kicker {
  color: var(--cluster-colour, var(--action-green));
  font: 7px/1 var(--mono);
  letter-spacing: .09em;
}

.transport-row,
.transport-utility {
  display: flex;
  min-width: 0;
  gap: 6px;
}

.transport-row button {
  min-width: 0;
  min-height: 37px;
  flex: 1;
  padding: 7px 9px;
}

.transport-row button span {
  font-size: 7px;
}

.transport-row .transport-play {
  flex: 0 0 42px;
}

.transport-utility {
  align-items: stretch;
}

.transport-utility button {
  min-height: 37px;
  flex: 1;
  padding: 7px 9px;
  white-space: nowrap;
}

.drift-lab-view {
  overflow-y: auto;
  scrollbar-width: thin;
}

/* Full-screen lyrics are only lyrics, with the chosen room visible underneath. */
body.immersive {
  background: var(--night);
}

body.immersive main#main {
  display: block;
  width: 100%;
  height: 100svh;
  padding: 0;
}

body.immersive .drift-rail,
body.immersive .now-playing,
body.immersive .player-service-orbit,
body.immersive .transport,
body.immersive .player-media-shell,
body.immersive .nyarindo-palette-strip,
body.immersive .nyarindo-palette-nav {
  display: none !important;
}

body.immersive .drift-player-view {
  position: fixed;
  inset: 0;
  height: 100svh;
  overflow: hidden;
}

body.immersive .player-shell {
  display: block;
  height: 100%;
  padding: 0;
}

body.immersive .lyrics-section {
  position: absolute;
  inset: 0;
  display: block !important;
  width: 100% !important;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
}

body.immersive .lyrics {
  --immersive-pad: clamp(24px, 5vw, 84px);
  position: absolute;
  inset: 0;
  display: grid !important;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: 100% !important;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  gap: 10px;
  padding: var(--immersive-pad);
  overflow: hidden;
  background: transparent !important;
  box-shadow: none !important;
}

body.immersive .lyrics-section::after {
  display: none !important;
}

body.immersive .lyrics::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 24%, rgba(2, 8, 9, .5) 100%),
    color-mix(in srgb, var(--lyric-background, #08100d) 20%, transparent);
  pointer-events: none;
}

.immersive-lyric-atmosphere {
  position: absolute;
  z-index: -2;
  inset: -2%;
  background-position: center;
  background-size: cover;
  filter: saturate(.88) contrast(1.03);
  opacity: 0;
  transform: scale(1.04);
  pointer-events: none;
}

.immersive-lyric-atmosphere.has-image {
  opacity: var(--lyric-image-opacity, .34);
}

body.immersive .lyrics > :not(.immersive-lyric-atmosphere) {
  position: relative;
  z-index: 1;
}

body.immersive .lyrics-source-label,
body.immersive #lyricsSourceLabel {
  display: none;
}

body.immersive .lyrics-theme-switcher {
  display: none;
}

body.immersive .lyrics-window {
  height: auto;
  min-height: 0;
}

body.immersive .lyrics-lines {
  gap: clamp(14px, 2vw, 25px);
  padding: 38vh 0 52vh;
  text-align: center;
}

body.immersive .lyric-line {
  color: color-mix(in srgb, var(--lyric-text, #f7f4ea) 42%, transparent);
  font-family: var(--lyric-font, var(--serif));
  font-size: clamp(18px, calc(4.2vw * var(--lyric-scale, 1)), 72px);
  line-height: 1.16;
  text-shadow: 0 2px 16px rgba(0, 0, 0, .45);
}

body.immersive .lyric-line.active {
  color: var(--lyric-current-colour, var(--yellow));
  text-shadow: 0 0 32px color-mix(in srgb, var(--lyric-current-colour, var(--yellow)) 58%, transparent), 0 2px 18px rgba(0, 0, 0, .64);
}

.immersive-player-controls button {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid color-mix(in srgb, var(--lyric-text, #f7f4ea) 30%, transparent);
  border-radius: 999px;
  background: rgba(5, 14, 17, .34);
  color: var(--lyric-text, #f7f4ea);
  font: 8px/1.2 var(--mono);
  letter-spacing: .05em;
  backdrop-filter: blur(12px);
}

.lyric-edit-blob {
  position: fixed;
  z-index: 210;
  bottom: max(16px, env(safe-area-inset-bottom));
  right: max(18px, env(safe-area-inset-right));
  left: auto;
  width: 58px;
  height: 58px;
  display: none;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  isolation: isolate;
  transform: none;
}

body.immersive .lyric-edit-blob {
  display: grid;
}

.drift-nav-blob,
.drift-nav-panel {
  display: none;
}

html.nyarindo-node-view .drift-header nav {
  display: none !important;
}

html.nyarindo-node-view .drift-nav-blob {
  position: fixed;
  z-index: 214;
  bottom: max(16px, env(safe-area-inset-bottom));
  right: max(18px, env(safe-area-inset-right));
  left: auto;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  isolation: isolate;
  transform: none;
}

.drift-nav-aura,
.drift-nav-core {
  position: absolute;
  display: block;
  border-radius: 50%;
}

.drift-nav-aura {
  inset: -10px;
  background: radial-gradient(circle, rgba(65, 157, 255, .76), rgba(65, 157, 255, .18) 48%, transparent 72%);
  filter: blur(7px);
  animation: lyric-blob-breathe 2.7s ease-in-out infinite;
}

.drift-nav-core {
  inset: 7px;
  border: 1px solid rgba(222, 242, 255, .72);
  background:
    radial-gradient(circle at 33% 27%, rgba(255, 255, 255, .56), transparent 24%),
    linear-gradient(145deg, #4aa9ff, #155fc6);
  box-shadow: 0 0 18px rgba(54, 149, 255, .74);
}

.drift-nav-blob.is-expanded .drift-nav-aura {
  background: radial-gradient(circle, rgba(255, 72, 72, .78), rgba(255, 72, 72, .18) 48%, transparent 72%);
  animation: none;
}

.drift-nav-blob.is-expanded .drift-nav-core {
  border-color: rgba(255, 224, 224, .76);
  background:
    radial-gradient(circle at 33% 27%, rgba(255, 255, 255, .58), transparent 24%),
    linear-gradient(145deg, #ff5d5d, #b51f2c);
  box-shadow: 0 0 18px rgba(255, 64, 64, .72);
}

.drift-nav-blob.is-dormant .drift-nav-aura {
  display: none;
}

.drift-nav-blob.is-dormant .drift-nav-core {
  border-color: rgba(207, 224, 234, .68);
  background: transparent;
  box-shadow: none;
}

.drift-nav-blob:focus {
  outline: none;
}

.drift-nav-blob:focus-visible .drift-nav-core {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .28), 0 0 18px rgba(54, 149, 255, .64);
}

html.nyarindo-node-view .drift-nav-panel:not([hidden]) {
  position: fixed;
  z-index: 213;
  right: max(18px, env(safe-area-inset-right));
  bottom: 148px;
  width: min(220px, calc(100vw - 36px));
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 18px;
  background: rgba(7, 17, 20, .86);
  box-shadow: 0 18px 55px rgba(0, 0, 0, .4);
  backdrop-filter: blur(20px) saturate(1.1);
}

body.immersive .drift-nav-blob,
body.immersive .drift-nav-panel {
  display: none !important;
}

.drift-nav-panel :is(button, a) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 11px;
  background: rgba(255, 255, 255, .045);
  color: #f7f4ea;
  font: 9px/1.25 var(--mono);
  letter-spacing: .055em;
  text-align: left;
}

.drift-nav-panel :is(button, a):is(:hover, :focus-visible) {
  border-color: rgba(91, 184, 232, .62);
  background: rgba(91, 184, 232, .12);
  outline: none;
}

.drift-nav-panel span {
  color: #78bdff;
  font-size: 7px;
}

@media (max-width: 620px) {
  html.nyarindo-node-view .drift-nav-blob {
    bottom: max(12px, env(safe-area-inset-bottom));
    right: 12px;
    left: auto;
    width: 42px;
    height: 42px;
  }

  html.nyarindo-node-view .drift-nav-panel:not([hidden]) {
    right: 10px;
    bottom: 143px;
    width: min(205px, calc(100vw - 20px));
  }
}

.lyric-edit-aura,
.lyric-edit-core {
  position: absolute;
  display: block;
  border-radius: 50%;
}

.lyric-edit-aura {
  inset: -14px;
  background: radial-gradient(circle, rgba(65, 157, 255, .8), rgba(65, 157, 255, .2) 47%, transparent 72%);
  filter: blur(8px);
  animation: lyric-blob-breathe 2.7s ease-in-out infinite;
}

.lyric-edit-core {
  inset: 8px;
  border: 1px solid rgba(222, 242, 255, .72);
  background:
    radial-gradient(circle at 33% 27%, rgba(255, 255, 255, .58), transparent 24%),
    linear-gradient(145deg, #4aa9ff, #155fc6);
  box-shadow:
    inset 0 1px 8px rgba(255, 255, 255, .38),
    0 0 18px rgba(54, 149, 255, .82),
    0 0 44px rgba(54, 149, 255, .44);
}

.lyric-edit-blob.is-expanded .lyric-edit-aura {
  background: radial-gradient(circle, rgba(255, 72, 72, .8), rgba(255, 72, 72, .2) 47%, transparent 72%);
  animation: none;
}

.lyric-edit-blob.is-expanded .lyric-edit-core {
  border-color: rgba(255, 224, 224, .75);
  background:
    radial-gradient(circle at 33% 27%, rgba(255, 255, 255, .6), transparent 24%),
    linear-gradient(145deg, #ff5d5d, #b51f2c);
  box-shadow:
    inset 0 1px 8px rgba(255, 255, 255, .4),
    0 0 18px rgba(255, 64, 64, .76),
    0 0 44px rgba(255, 64, 64, .38);
}

.lyric-edit-blob.is-dormant .lyric-edit-aura {
  opacity: 0;
  animation: none;
}

.lyric-edit-blob.is-dormant .lyric-edit-core {
  border-color: rgba(200, 228, 255, .72);
  background: transparent;
  box-shadow: 0 0 7px rgba(54, 149, 255, .16);
}

.lyric-edit-blob.is-expanded.is-dormant .lyric-edit-core {
  border-color: rgba(255, 210, 210, .72);
  box-shadow: 0 0 7px rgba(255, 64, 64, .16);
}

.lyric-edit-blob:focus {
  outline: none;
}

.lyric-edit-blob:focus-visible .lyric-edit-core {
  box-shadow:
    inset 0 1px 8px rgba(255, 255, 255, .4),
    0 0 0 4px rgba(255, 255, 255, .3),
    0 0 26px rgba(54, 149, 255, .9);
}

.immersive-lyrics-editor {
  position: fixed;
  z-index: 80;
  top: max(18px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
  bottom: max(82px, calc(env(safe-area-inset-bottom) + 82px));
  width: min(440px, calc(100vw - 36px));
  display: none;
  align-content: start;
  gap: 10px;
  padding: 18px;
  overflow-y: auto;
  border: 1px solid color-mix(in srgb, var(--lyric-text, #f7f4ea) 28%, transparent);
  border-radius: 20px;
  background: rgba(5, 13, 16, .8);
  color: var(--lyric-text, #f7f4ea);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .45);
  backdrop-filter: blur(22px) saturate(1.12);
}

body.immersive .immersive-lyrics-editor:not([hidden]) {
  display: grid;
}

.immersive-lyrics-editor > label {
  color: color-mix(in srgb, var(--lyric-text, #f7f4ea) 72%, transparent);
  font: 8px/1.4 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.immersive-lyrics-editor textarea {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 13px;
  background: rgba(255, 255, 255, .06);
  color: inherit;
  font: 15px/1.65 var(--serif);
}

.immersive-timing-status {
  margin: 0;
  color: color-mix(in srgb, var(--lyric-text, #f7f4ea) 64%, transparent);
  font: 8px/1.55 var(--mono);
}

.immersive-theme-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.immersive-theme-controls[hidden] {
  display: none;
}

.immersive-theme-controls label {
  display: grid;
  gap: 5px;
  color: color-mix(in srgb, var(--lyric-text, #f7f4ea) 68%, transparent);
  font: 7px/1.4 var(--mono);
  letter-spacing: .05em;
  text-transform: uppercase;
}

.immersive-theme-controls input[type="color"] {
  width: 100%;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
}

.immersive-theme-controls input[type="range"],
.immersive-theme-controls input[type="file"] {
  width: 100%;
}

.immersive-theme-controls .immersive-file-control,
.immersive-theme-controls .text-button {
  grid-column: 1 / -1;
}

.immersive-player-controls {
  position: fixed;
  z-index: 75;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: 50%;
  display: none;
  gap: 7px;
  transform: translateX(-50%);
}

body.immersive .immersive-player-controls {
  display: flex;
}

.immersive-player-controls button {
  min-width: 42px;
}

body.immersive .immersive-exit {
  position: fixed;
  z-index: 210;
  top: max(17px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 13px;
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 999px;
  background: rgba(5, 14, 17, .34);
  color: #fff;
  font: 8px/1.2 var(--mono);
  letter-spacing: .05em;
  backdrop-filter: blur(12px);
}

html.nyarindo-node-view body.immersive .immersive-exit {
  top: 58px;
}

@media (max-width: 1080px) {
  main#main {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .drift-rail {
    grid-row: 1;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .drift-player-view,
  .drift-lab-view {
    grid-row: 2;
  }

  .player-shell {
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  .transport {
    grid-template-columns: minmax(0, 1fr) minmax(0, .9fr);
  }

  .transport-utility {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  main#main {
    padding: 5px 0;
  }

  .player-shell {
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 5px;
    padding: 3px;
  }

  .player-shell > .now-playing {
    min-height: 150px;
  }

  .player-shell .now-playing {
    grid-template-columns: 82px minmax(0, 1fr);
    padding: 11px;
  }

  .player-shell .track-info h2 {
    font-size: clamp(24px, 6.5vw, 34px);
  }

  .player-shell .track-info .album {
    display: none;
  }

  .player-service-orbit {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
  }

  .service-orbit-tool {
    min-height: 39px;
    padding: 4px;
  }

  .service-orbit-tool svg {
    width: 15px;
    height: 15px;
  }

  .transport {
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 5px;
  }

  .transport-cluster {
    grid-template-columns: 42px minmax(0, 1fr);
    padding: 3px 5px;
  }

  .transport-row button {
    min-height: 34px;
  }

  .transport-row button span {
    display: none;
  }

  body.immersive .lyrics {
    --immersive-pad: 54px 15px 74px;
    gap: 5px;
  }

  body.immersive .lyrics-source-label,
  body.immersive .lyrics-theme-switcher {
    display: none;
  }

  body.immersive .lyric-line {
    font-size: clamp(16px, calc(6.7vw * var(--lyric-scale, 1)), 48px);
  }

  body.immersive .lyrics-lines {
    padding: 38vh 0 52vh;
    text-align: center;
  }

  .immersive-lyrics-editor {
    top: auto;
    right: 8px;
    bottom: 74px;
    left: 8px;
    width: auto;
    max-height: 68svh;
  }
}

@keyframes lyric-blob-breathe {
  0%,
  100% {
    opacity: .68;
    transform: scale(.92);
  }
  50% {
    opacity: 1;
    transform: scale(1.14);
  }
}

@media (prefers-reduced-motion: reduce) {
  .lyric-edit-aura {
    animation: none;
  }
}

/* Inline video playback owns the centre; identity and transport become support rails. */
body.video-inline-playing main#main {
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 8px;
}

body.video-inline-playing .drift-rail {
  padding: 5px;
  gap: 4px;
  border-radius: 14px;
}

body.video-inline-playing .rail-tool {
  min-height: 38px;
  padding: 3px;
  border-radius: 10px;
}

body.video-inline-playing .rail-tool svg {
  width: 18px;
  height: 18px;
}

body.video-inline-playing .player-shell {
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 5px;
  padding: 5px;
}

body.video-inline-playing .player-shell > .now-playing {
  min-height: 0;
  grid-template-columns: minmax(0, 1fr);
  padding: 7px 11px;
  border-radius: 11px;
}

body.video-inline-playing .now-playing .art,
body.video-inline-playing .track-info .playback-format-row,
body.video-inline-playing .track-info .album,
body.video-inline-playing .track-info .path,
body.video-inline-playing .track-info .official-source-link {
  display: none;
}

body.video-inline-playing .track-info {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 12px;
}

body.video-inline-playing .track-info .eyebrow {
  grid-column: 1;
  margin: 0 0 3px;
  font-size: 6px;
}

body.video-inline-playing .track-info h2 {
  grid-column: 1;
  margin: 0;
  font-size: clamp(18px, 2.2vw, 28px);
  line-height: 1.02;
  -webkit-line-clamp: 1;
}

body.video-inline-playing .track-info #trackArtist {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  margin: 0;
  font: 8px/1.3 var(--mono);
  letter-spacing: .05em;
  text-transform: uppercase;
}

body.video-inline-playing .player-media-shell {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 14px;
  background: #000;
  container-type: size;
}

body.video-inline-playing .player-media-shell #playerEmbed {
  width: min(100cqw, 177.778cqh);
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 16 / 9;
}

body.video-inline-playing .player-media-shell #playerEmbed iframe {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border-radius: 0;
}

body.video-inline-playing .player-media-shell .video-master-blob {
  bottom: 11px;
  right: 11px;
  width: 42px;
  height: 42px;
}

body.video-inline-playing .player-shell > .transport {
  grid-template-columns: minmax(0, 1.35fr) minmax(0, .8fr) auto;
  gap: 4px;
  padding: 4px;
  border-radius: 11px;
}

body.video-inline-playing .transport-cluster {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  padding: 2px 4px;
  border-radius: 8px;
}

body.video-inline-playing .transport-kicker {
  display: none;
}

body.video-inline-playing .transport-row,
body.video-inline-playing .transport-utility {
  gap: 3px;
}

body.video-inline-playing .transport-row button,
body.video-inline-playing .transport-utility button {
  min-height: 29px;
  padding: 3px 6px;
  font-size: 9px;
}

body.video-inline-playing .transport-row .transport-play {
  min-height: 31px;
  flex-basis: 34px;
}

@media (max-width: 1080px) {
  body.video-inline-playing main#main {
    grid-template-columns: minmax(0, 1fr);
  }

  body.video-inline-playing .drift-rail {
    padding: 3px 5px;
  }

  body.video-inline-playing .rail-tool {
    min-height: 32px;
  }
}

@media (max-width: 620px) {
  body.video-inline-playing .player-shell {
    gap: 3px;
    padding: 2px;
  }

  body.video-inline-playing .player-shell > .now-playing {
    padding: 6px 8px;
  }

  body.video-inline-playing .track-info h2 {
    font-size: clamp(16px, 5.4vw, 23px);
  }

  body.video-inline-playing .track-info #trackArtist {
    max-width: 34vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.video-inline-playing .player-shell > .transport {
    grid-template-columns: minmax(0, 1fr) minmax(142px, .72fr);
  }

  body.video-inline-playing .playlist-controls {
    display: none;
  }

  body.video-inline-playing .transport-utility {
    grid-column: auto;
  }

  body.video-inline-playing .transport-utility button {
    padding-inline: 5px;
  }
}

/* Failed media resolves into the Drift palette instead of a browser-broken image. */
.drift-image-fallback {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 24% 20%, rgba(241, 208, 78, .92), transparent 30%),
    radial-gradient(circle at 82% 72%, rgba(98, 179, 110, .78), transparent 38%),
    linear-gradient(145deg, #4aa9ff, #275f78 52%, #123d32) !important;
}

.drift-image-fallback img[data-drift-fallback="true"] {
  display: none !important;
}

.drift-image-fallback.art::before {
  content: "";
  position: absolute;
  inset: 16%;
  border: 1px solid rgba(255, 255, 255, .46);
  border-radius: 50%;
}
