/* =====================================
   Tn² LL — AUDIO SHORTS
===================================== */

:root {
  color-scheme: dark;

  --background: #222;
  --surface: rgba(20, 30, 40, .88);
  --surface-solid: #31343c;

  --primary: #0097d9;
  --primary-dark: #00568c;

  --text: #fff;
  --muted: #a9b0b8;

  --shadow: 0 12px 34px rgba(0, 0, 0, .48);

  --header-height: 56px;
  --bar-max: 76px;
}


/* =====================================
   RESET
===================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;

  margin: 0;
  padding: 0;

  background-color: var(--background);
  color: var(--text);

  font-family: "Poppins", Arial, sans-serif;

  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}


/* =====================================
   MATERIAL ICONS
===================================== */

.material-symbols-rounded {
  font-family: "Material Symbols Rounded";
  font-weight: normal;
  font-style: normal;

  font-size: 24px;
  line-height: 1;

  letter-spacing: normal;
  text-transform: none;

  display: inline-block;
  white-space: nowrap;

  direction: ltr;
  font-feature-settings: "liga";

  -webkit-font-smoothing: antialiased;
  user-select: none;
}


/* =====================================
   HEADER
===================================== */

.top-bar-wrap {
  position: fixed;
  z-index: 30;

  top: 0;
  left: 0;

  width: 100%;
  height: 100px;

  display: flex;
  align-items: center;
  justify-content: center;

  pointer-events: none;
}

.site-header {
  height: 55px;
  width: 80%;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 0;
  padding: 0;

  border: 0;
  border-radius: 15px;

  background: #31343cf2;

  box-shadow: 0 5px 20px rgba(0, 0, 0, .34);

  pointer-events: auto;

  animation: slideDownZoomIn .75s ease-out both;

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;

  flex: 0 0 auto;

  width: 55px;
  height: 55px;
}

.brand img {
  display: block;

  width: 55px;
  height: 55px;

  object-fit: cover;

  border-radius: 15px;
}

.quote-trigger,
.home-link {
  min-height: 40px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 0;
  border-radius: 10px;

  background: transparent;
  color: #234970;

  cursor: pointer;

  transition:
    background-color .2s ease,
    transform .2s ease;
}

.quote-trigger {
  padding: 8px;

  font-size: 15px;
  font-weight: 900;
}

.home-link {
  flex: 0 0 40px;
  width: 40px;
  margin-right: 10px;
}

.quote-trigger:hover,
.home-link:hover {
  background: #000;
  font-size: 18px;
}

.quote-trigger:active,
.home-link:active {
  transform: scale(.96);
}

.quote-trigger:focus-visible,
.home-link:focus-visible,
.control-btn:focus-visible {
  outline: 2px solid #8bdcff;
  outline-offset: 3px;
}


/* =====================================
   TOP FADE
===================================== */

.top-fade {
  position: fixed;
  z-index: 20;

  inset: 0 0 auto;

  height: 118px;

  pointer-events: none;

  background:
    linear-gradient(
      180deg,
      #222 12%,
      rgba(34, 34, 34, .78) 52%,
      transparent 100%
    );
}


/* =====================================
   SHORTS CONTAINER
===================================== */

.shorts-container {
  position: fixed;
  inset: 0;

  width: 100%;

  height: 100vh;
  height: 100dvh;

  overflow-x: hidden;
  overflow-y: auto;

  scroll-snap-type: y mandatory;
  /* Keep loop repositioning instant; smooth scroll is set explicitly by controls. */
  scroll-behavior: auto;

  overscroll-behavior-y: contain;
  scrollbar-width: none;

  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.shorts-container::-webkit-scrollbar {
  display: none;
}


/* =====================================
   SHORT CARD
===================================== */

.short-card {
  position: relative;
  isolation: isolate;

  width: 100%;

  height: 100vh;
  height: 100dvh;

  min-height: 520px;

  display: flex;
  flex-direction: column;
  justify-content: flex-end;

  padding:
    calc(var(--header-height) + 42px)
    22px
    max(24px, env(safe-area-inset-bottom));

  overflow: hidden;

  scroll-snap-align: start;
  scroll-snap-stop: always;

  background:
    radial-gradient(
      ellipse at 50% 43%,
      rgba(0, 86, 140, .17),
      transparent 42%
    ),
    linear-gradient(
      135deg,
      #1b1f23 0%,
      #121212 100%
    );
}

.short-card::before {
  content: "";

  position: absolute;
  z-index: -1;
  inset: 0;

  pointer-events: none;

  background:
    radial-gradient(
      ellipse at 50% 50%,
      rgba(0, 151, 217, .08),
      transparent 62%
    );
}


/* VINYL + LIVE EQ ANIMATIONS */
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes eqPulse { from { width: 5px; } to { width: var(--eq-bar-max, var(--bar-max, 76px)); } }

/* =====================================
   VINYL
===================================== */

.audio-art {
  position: absolute;
  z-index: 0;

  inset: 0;

  display: grid;
  place-items: center;

  padding-bottom: 5vh;

  pointer-events: none;
}

.disc-shell {
  position: relative;

  width: clamp(172px, 26vw, 268px);
  aspect-ratio: 1;

  display: grid;
  place-items: center;

  border-radius: 50%;
  background: #111;

  border: 6px solid #1a1a1a;

  box-shadow:
    0 15px 40px rgba(0, 0, 0, .6),
    0 0 30px rgba(0, 151, 217, .14);

  transition: box-shadow .35s ease;
}

.album-disc {
  display: block;

  width: 100%;
  height: 100%;

  border-radius: 50%;

  object-fit: cover;

  animation: spin 10s linear infinite;
  animation-play-state: paused;
}

.short-card.is-playing .album-disc {
  animation-play-state: running;
}

.short-card.is-playing .disc-shell {
  box-shadow:
    0 15px 40px rgba(0, 0, 0, .6),
    0 0 42px rgba(0, 151, 217, .45);
}


/* Fallback if 2L.png is missing */

.disc-fallback {
  display: none;

  position: absolute;

  width: 100%;
  height: 100%;

  border-radius: 50%;

  align-items: center;
  justify-content: center;

  color: #80d8ff;

  font-size: 1.5rem;
  font-weight: 800;

  background:
    repeating-radial-gradient(
      circle,
      #252525 0 3px,
      #101010 4px 7px
    );
}

.disc-shell.art-missing .disc-fallback {
  display: flex;
}

.disc-shell.art-missing .album-disc {
  display: none;
}


/* =====================================
   PLAYER PANEL
===================================== */

.short-content {
  position: relative;
  z-index: 3;

  width: min(500px, 100%);

  margin: 0 auto;
  padding: 21px 22px 20px;

  border: 1px solid rgba(255, 255, 255, .055);
  border-radius: 24px;

  background: var(--surface);

  box-shadow: var(--shadow);

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.audio-title {
  margin: 0;

  color: #fff;

  font-size: clamp(1.15rem, 2.5vw, 1.42rem);
  line-height: 1.35;

  font-weight: 600;

  overflow-wrap: anywhere;
}

.audio-desc {
  margin: 6px 0 18px;

  color: var(--muted);

  font-size: .86rem;
  line-height: 1.55;
}


/* =====================================
   CONTROLS
===================================== */

.audio-controls {
  display: grid;

  grid-template-columns: 52px minmax(0, 1fr) 48px;

  align-items: center;
  gap: 13px;
}

.control-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 48px;
  height: 48px;

  padding: 0;

  border: 0;
  border-radius: 50%;

  color: #fff;

  background: rgba(255, 255, 255, .06);

  cursor: pointer;

  flex: 0 0 auto;

  transition:
    transform .18s ease,
    background .18s ease,
    box-shadow .18s ease;
}

.control-btn .material-symbols-rounded {
  font-size: 23px;
}

.control-btn:hover {
  background: rgba(255, 255, 255, .13);
  transform: translateY(-2px);
}

.control-btn:active {
  transform: scale(.95);
}

.play-btn {
  width: 52px;
  height: 52px;

  background:
    linear-gradient(
      135deg,
      var(--primary),
      var(--primary-dark)
    );

  box-shadow: 0 5px 15px rgba(0, 151, 217, .28);
}

.play-btn:hover {
  background:
    linear-gradient(
      135deg,
      #16b4f6,
      #0069a8
    );

  box-shadow: 0 6px 20px rgba(0, 151, 217, .4);
}

.speed-btn {
  width: 48px;
  height: 48px;

  font-size: .88rem;
  font-weight: 700;

  font-variant-numeric: tabular-nums;
}

.speed-btn.fast {
  color: #7bd4ff;
}


/* =====================================
   SEEK BAR
===================================== */

.seek-control {
  min-width: 0;
}

.time-row {
  display: flex;
  justify-content: space-between;

  gap: 8px;

  margin-bottom: 8px;

  color: #aeb4bb;

  font-size: .7rem;
  font-variant-numeric: tabular-nums;
}

.range-wrapper {
  position: relative;

  height: 18px;

  display: flex;
  align-items: center;
}

.player-seek {
  appearance: none;
  -webkit-appearance: none;

  position: relative;
  z-index: 2;

  width: 100%;
  height: 18px;

  margin: 0;

  background: transparent;

  cursor: pointer;
  touch-action: pan-y;
}

.player-seek:disabled {
  cursor: default;
}

.player-seek::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .14);
}

.player-seek::-moz-range-track {
  height: 4px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .14);
}

.player-seek::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;

  width: 12px;
  height: 12px;

  margin-top: -4px;

  border: 0;
  border-radius: 50%;

  background: #fff;

  box-shadow: 0 1px 4px rgba(0, 0, 0, .4);
}

.player-seek::-moz-range-thumb {
  width: 12px;
  height: 12px;

  border: 0;
  border-radius: 50%;

  background: #fff;
}

.range-fill {
  position: absolute;
  z-index: 1;

  left: 0;
  top: 50%;

  width: 0;
  height: 4px;

  border-radius: 10px;

  transform: translateY(-50%);

  background: var(--primary);

  pointer-events: none;
}

.player-status {
  min-height: 1em;

  margin-top: 9px;

  color: #ffb5a8;

  font-size: .72rem;
  line-height: 1.4;
}

.player-status:empty {
  display: none;
}


/* =====================================
   EQUALIZERS
===================================== */

.eq-sidebar {
  --bar-max: 76px;

  position: fixed;
  z-index: 2;

  top: 50%;

  width: 90px;
  height: min(60vh, 570px);

  display: flex;
  flex-direction: column;
  justify-content: space-around;

  pointer-events: none;

  transform: translateY(-50%);
  opacity: .95;
}

.eq-left {
  left: 0;
  align-items: flex-start;
}

.eq-right {
  right: 0;
  align-items: flex-end;
}

.eq-bar {
  display: block;

  width: 5px;
  height: 8px;
  min-width: 3px;
  will-change: width;

  border-radius: 0 4px 4px 0;

  background:
    linear-gradient(
      90deg,
      var(--primary-dark),
      var(--primary)
    );

  box-shadow: 0 0 10px rgba(0, 151, 217, .25);

  animation: eqPulse calc(var(--eq-duration, 620ms) * var(--eq-random-speed, 1)) ease-in-out infinite alternate;
  animation-play-state: paused;
}

.eq-right .eq-bar {
  border-radius: 4px 0 0 4px;
}

.eq-sidebar.is-playing .eq-bar {
  animation-play-state: running;
}


/* =====================================
   DAILY QUOTE — ORIGINAL HOMEPAGE DESIGN
===================================== */

.quote-overlay[hidden] {
  display: none !important;
}

.quote-overlay {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
  background: rgba(0, 0, 0, .8);
}

.quote-panel {
  position: relative;
  width: 80%;
  max-width: 800px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: visible;
  text-align: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.quote-panel .bg {
  position: absolute;
  z-index: -1;
  inset: 0;
  display: flex;
  max-width: 44em;
  overflow: visible;
  pointer-events: none;
}

.quote-panel .bg > div {
  position: absolute;
  left: 0;
  width: 100%;
  height: 60vh;
  border-radius: 100em;
  scale: 1.2;
  opacity: .6;
  box-shadow:
    inset 0 0 4em 3em rgba(175, 200, 238, .2),
    inset 0 0 2em .4em rgba(175, 200, 238, .2),
    0 0 .1em .1em rgba(175, 200, 238, .2),
    0 0 1em .4em rgba(175, 200, 238, .3);
}

.quote-panel .bg > div:nth-child(1) {
  top: -85vh;
  animation: quoteGlowTop 1s ease-in-out forwards;
}

.quote-panel .bg > div:nth-child(2) {
  bottom: -85vh;
  animation: quoteGlowBottom 1s ease-in-out forwards;
}

.quote-panel .header-text {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none;
  color: #63687d;
  font-size: min(13vw, 11vh);
  font-weight: 600;
  letter-spacing: -.009em;
  line-height: 1.0625;
  text-align: center;
  overflow-wrap: anywhere;
}

.quote-panel .glow-filter {
  position: relative;
  display: inline-grid;
  scale: 1;
  animation: onloadscale 1s ease-out forwards;
  justify-items: center;
}

.quote-panel .glow-filter::before {
  content: attr(data-text);
  position: absolute;
  pointer-events: none;
  color: #63687d;
  background: linear-gradient(0deg, #9FA8DA 0%, #d4d8f0 50%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: url(#glow-4);
  opacity: 0;
  animation: onloadopacity 1s ease-out forwards;
}

.quote-panel .filters {
  position: absolute;
  width: 0;
  height: 0;
}

@keyframes onloadscale {
  24% { scale: 1; }
  100% { scale: 1.02; }
}

@keyframes onloadopacity {
  24% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes quoteGlowTop {
  from { opacity: .3; }
  to { opacity: .8; }
}

@keyframes quoteGlowBottom {
  from { opacity: .3; }
  to { opacity: .8; }
}


/* =====================================
   TABLETS AND PHONES
===================================== */

@media (max-width: 900px) {
  :root {
    --bar-max: 30px;
    --header-height: 52px;
  }

  .top-bar-wrap {
    height: 100px;
    padding-inline: 0;
  }

  .site-header {
    width: 80%;
    padding: 0;
    gap: 0;
  }

  .brand,
  .brand img {
    width: 55px;
    height: 55px;
  }

  .eq-sidebar {
    width: 34px;
    height: 55vh;
    opacity: .7;
  }

  .eq-bar {
    height: 4px;
    width: 4px;
  }

  .short-card {
    min-height: 480px;

    padding:
      calc(var(--header-height) + 32px)
      14px
      max(18px, env(safe-area-inset-bottom));
  }

  .audio-art {
    padding-bottom: 7vh;
  }

  .disc-shell {
    width: clamp(160px, 34vw, 218px);
    border-width: 5px;
  }

  .short-content {
    width: min(480px, calc(100% - 10px));

    padding: 18px 17px 15px;
    border-radius: 21px;
  }

  .audio-desc {
    margin-bottom: 14px;
  }

  .audio-controls {
    grid-template-columns: 46px minmax(0, 1fr) 43px;
    gap: 10px;
  }

  .play-btn,
  .control-btn {
    width: 43px;
    height: 43px;
  }

  .time-row {
    font-size: .65rem;
    margin-bottom: 6px;
  }
}


/* =====================================
   SMALL PHONES
===================================== */

@media (max-width: 420px) {
  .quote-trigger {
    padding: 6px 7px;
    font-size: 11px;
  }

  .home-link {
    width: 36px;
    min-height: 38px;
    flex-basis: 36px;
  }

  .short-card {
    padding-inline: 8px;
  }

  .short-content {
    width: calc(100% - 8px);
    padding: 16px 13px 13px;
  }

  .audio-title {
    font-size: 1.08rem;
  }

  .audio-desc {
    font-size: .78rem;
  }

  .audio-controls {
    grid-template-columns: 42px minmax(0, 1fr) 40px;
    gap: 8px;
  }

  .play-btn,
  .control-btn {
    width: 40px;
    height: 40px;
  }

  .eq-sidebar {
    width: 22px;
    --bar-max: 19px;
    opacity: .48;
  }

}


/* =====================================
   SHORT LANDSCAPE SCREENS
===================================== */

@media (max-height: 640px) {
  .short-card {
    min-height: 0;

    padding-top: 76px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  .audio-art {
    padding-bottom: 8vh;
  }

  .disc-shell {
    width: clamp(130px, 25vh, 190px);
  }

  .short-content {
    padding-top: 13px;
    padding-bottom: 12px;
  }

  .audio-desc {
    margin-bottom: 10px;
  }

  .eq-sidebar {
    height: 49vh;
  }
}


/* =====================================
   REDUCED MOTION
===================================== */

@media (prefers-reduced-motion: reduce) {
  .site-header,
  .quote-panel,
  .quote-panel .bg > div,
  .glow-filter::before {
    animation: none;
  }

  .short-card.is-playing .album-disc {
    animation: spin var(--vinyl-duration, 10s) linear infinite;
  }
}


/* Subtle interaction polish */
.control-btn:hover,
.quote-trigger:hover,
.home-link:hover {
  box-shadow: 0 5px 16px rgba(0, 151, 217, .16);
}
.short-content:hover {
  box-shadow: 0 14px 38px rgba(0, 0, 0, .52), 0 0 18px rgba(0, 151, 217, .07);
}
