@font-face {
  font-family: Roboto;
  src: url("/media/roboto.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  font-family: Roboto, Arial, sans-serif;
  background: #0f0f0f;
  color: #fff;
  --nav-height: 56px;
  --red: #ff0033;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 0; }
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.desktop-bar, .desktop-nav, .mobile-header, .mobile-nav, .actions, .details, .next {
  user-select: none;
}

.desktop-bar {
  height: var(--nav-height);
  display: grid;
  grid-template-columns: minmax(156px, 1fr) minmax(260px, 640px) minmax(156px, 1fr);
  align-items: center;
  padding: 0 24px;
  gap: 18px;
}
.brand, .brand span, .search-area, .account-area { display: flex; align-items: center; }
.brand { gap: 22px; }
.brand span { gap: 4px; }
.brand span svg { width: 30px; height: 22px; }
.brand strong { font-size: 22px; font-weight: 800; letter-spacing: -.095em; transform: scaleX(.87); transform-origin: left; }
.search-area { gap: 16px; }
.search-box {
  flex: 1;
  height: 40px;
  border-radius: 24px;
  border: 1px solid #303030;
  color: #aaa;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 16px;
}
.search-end { width: 64px; height: 100%; display: grid; place-items: center; color: #fff; background: #222; border-left: 1px solid #303030; border-radius: 0 24px 24px 0; }
.round { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: #ffffff1a; }
.account-area { justify-content: flex-end; gap: 18px; }
.create { padding: 6px 12px 6px 8px; border-radius: 20px; background: #ffffff1a; display: flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; }

.desktop-nav { width: 72px; position: absolute; left: 0; top: var(--nav-height); display: grid; justify-items: center; padding: 4px; }
.desktop-nav span { width: 64px; min-height: 72px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 10px; border-radius: 10px; }
.desktop-nav .selected { background: #ffffff16; }

.feed {
  min-height: calc(100dvh - var(--nav-height));
  display: grid;
  place-items: center;
  padding: 12px 70px 16px;
}
.short {
  --player-height: min(calc(100dvh - var(--nav-height) - 28px), calc((100vw - 168px) * 16 / 9));
  position: relative;
  isolation: isolate;
  width: calc(var(--player-height) * 9 / 16);
  height: var(--player-height);
  min-height: 0;
  border-radius: 12px;
  background: #080808;
}
.picture {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  background: #080808 url("/media/poster.webp") center / cover no-repeat;
}
.picture iframe {
  position: absolute;
  top: 0;
  left: 50%;
  height: 100%;
  width: calc(var(--player-height) * 16 / 9);
  transform: translateX(-50%);
  pointer-events: none;
  border: 0;
}
.picture::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, #0003, transparent 14%, transparent 67%, #0009);
}
.details {
  position: absolute;
  z-index: 1;
  left: 16px;
  right: 16px;
  bottom: 18px;
  text-shadow: 0 1px 4px #000b;
}
.channel { display: flex; align-items: center; gap: 9px; min-width: 0; }
.channel strong { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.avatar { flex: none; border-radius: 50%; object-fit: cover; }
.subscribe { padding: 7px 12px; border-radius: 22px; background: #fff; color: #0f0f0f; font-size: 12px; font-weight: 700; text-shadow: none; white-space: nowrap; }
.details h1 { margin: 9px 0 0; font-size: 15px; line-height: 1.3; font-weight: 500; }
.audio { display: flex; align-items: center; gap: 5px; width: fit-content; max-width: 100%; margin: 10px 0 0; padding: 5px 8px; border-radius: 18px; background: #ffffff29; font-size: 12px; line-height: 1.2; }
.audio .icon { width: 15px; height: 15px; }

.actions { position: absolute; left: calc(100% + 9px); bottom: 1px; width: 58px; display: grid; justify-items: center; gap: 12px; }
.action { display: grid; justify-items: center; gap: 5px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.action .round { width: 44px; height: 44px; }
.record { border: 2px solid #fff; border-radius: 7px; object-fit: cover; }
.next { position: absolute; right: 24px; top: 50%; width: 48px; height: 48px; }

.timeline { position: absolute; inset: auto 0 0; z-index: 2; height: 3px; overflow: hidden; border-radius: 0 0 12px 12px; background: #ffffff55; pointer-events: none; }
.timeline div { height: 100%; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .22s linear; }
.timeline div.resetting { transition: none; }
.playback-status { position: absolute; z-index: 3; inset: 50% 20px auto; margin: 0; padding: 12px; transform: translateY(-50%); border-radius: 10px; background: #111e; text-align: center; }
.mobile-header, .mobile-nav { display: none; }

@media (min-width: 1120px) {
  .details { left: auto; right: calc(100% + 24px); width: min(clamp(170px, 19vw, 310px), calc((100vw - var(--player-height) * 9 / 16) / 2 - 98px)); bottom: 20px; }
  .details h1 { font-weight: 700; }
  .audio { padding-left: 0; background: transparent; }
  .picture::after { display: none; }
}
@media (min-width: 701px) and (max-height: 660px) {
  .actions { gap: 7px; }
  .action { gap: 3px; font-size: 11px; }
  .action .round { width: 34px; height: 34px; }
  .action .icon { width: 20px; height: 20px; }
  .record { width: 26px; height: 26px; }
}
@media (min-width: 701px) and (max-height: 430px) {
  .action.remix, .record { display: none; }
}
@media (max-width: 700px) {
  :root { background: #000; }
  .desktop-bar, .desktop-nav, .next { display: none; }
  .feed { min-height: 0; padding: 0; }
  .short {
    --player-height: calc(100dvh - 51px - env(safe-area-inset-bottom));
    width: 100%;
    height: var(--player-height);
    border-radius: 0;
  }
  .picture iframe { width: max(100%, calc(var(--player-height) * 16 / 9)); }
  .mobile-header {
    position: absolute;
    z-index: 1;
    inset: max(13px, calc(env(safe-area-inset-top) + 8px)) 13px auto 15px;
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 20px;
  }
  .mobile-header .icon { width: 25px; height: 25px; filter: drop-shadow(0 1px 3px #0009); }
  .details { bottom: 19px; left: 16px; right: 65px; }
  .details h1 { font-size: 15px; }
  .actions { left: auto; right: 7px; bottom: 19px; width: 52px; gap: clamp(11px, 2.4vh, 23px); filter: drop-shadow(0 1px 3px #000c); }
  .action { gap: 5px; font-size: 12px; }
  .action .round { width: 31px; height: 29px; background: transparent; }
  .action .icon { width: 28px; height: 28px; }
  .timeline { border-radius: 0; height: 2px; }
  .mobile-nav {
    min-height: calc(51px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 5px 0 calc(4px + env(safe-area-inset-bottom));
    align-items: start;
    background: #0f0f0f;
  }
  .mobile-nav span { display: grid; gap: 3px; justify-items: center; align-content: center; min-height: 39px; font-size: 9px; white-space: nowrap; }
  .mobile-nav .icon { width: 23px; height: 23px; }
  .mobile-nav .nav-create .icon { width: 33px; height: 33px; padding: 3px; border: 1px solid #fff; border-radius: 50%; }
}
@media (max-width: 700px) and (max-height: 520px) {
  .actions { gap: 6px; }
  .action { gap: 2px; font-size: 10px; }
  .action .round, .action .icon { width: 21px; height: 21px; }
  .record { width: 24px; height: 24px; }
}
