:root {
  --sidebar-width: 14rem;
  --player-height: 5rem;
  --bg-app: #f6f3ec;
  --surface: #fffdf9;
  --surface-raised: #fff;
  --hairline: rgba(28, 44, 38, 0.06);
  --green-900: #1f4f42;
  --green-700: #2f6152;
  --green-600: #3a6b5a;
  --green-500: #4a8069;
  --green-100: #dbe8db;
  --green-050: #eef4ec;
  --ink-serif: #1b2130;
  --ink: #232b3a;
  --text: #33404f;
  --text-muted: #6b7583;
  --text-faint: #97a0ab;
  --gold: #b0894e;
  --gold-soft: #cdb083;
  --blue-500: #4479d0;
  --radius-pill: 999px;
  --radius-card: 1rem;
  --radius-player: 1.25rem;
  --radius-thumb: 0.625rem;
  --radius-nav: 0.75rem;
  --shadow-sm:
    0 1px 2px rgba(30, 45, 40, 0.04), 0 2px 8px rgba(30, 45, 40, 0.05);
  --shadow-pill: 0 1px 3px rgba(28, 44, 38, 0.08);
  --shadow-card: 0 6px 20px rgba(28, 44, 38, 0.08);
  --shadow-player: 0 -2px 24px rgba(28, 44, 38, 0.1);
  --shadow-play: 0 4px 14px rgba(47, 97, 82, 0.35);
  --bs-primary: var(--green-600);
  --bs-success: var(--green-600);
  --bs-success-rgb: 58, 107, 90;
  --bs-body-bg: var(--bg-app);
  --bs-body-color: var(--text);
  --bs-emphasis-color: var(--ink);
  --bs-secondary-color: var(--text-muted);
  --bs-tertiary-bg: var(--green-050);
  --bs-border-color: var(--hairline);
  --bs-link-color: var(--green-700);
  --bs-border-radius: 0.75rem;
  --bs-border-radius-sm: 0.5rem;
  --bs-border-radius-lg: 1rem;
  --bs-font-sans-serif:
    "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --brand: var(--green-600);
  --brand-soft: var(--green-100);
  --page-bg: var(--bg-app);
}
* {
  box-sizing: border-box;
}
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}
body {
  min-width: 20rem;
  background: var(--bg-app) !important;
  color: var(--text);
  font-family: var(--bs-font-sans-serif);
}
button,
input,
select {
  font: inherit;
}
button {
  border: 0;
  transition:
    background-color 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}
button:not(:disabled) {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--green-500);
  outline-offset: 2px;
}
.font-script {
  font-family: "Caveat", "Segoe Script", cursive;
}
.skip-link {
  position: fixed;
  z-index: 1100;
  top: -5rem;
  left: 1rem;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-pill);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  color: var(--green-700);
}
.skip-link:focus {
  top: 1rem;
}
.icon {
  display: inline-block;
  line-height: 1;
}

@media (min-width: 768px) {
  .cover-wrap .playlist-overlay {
    padding: 0;
    border: 0;
    background: transparent;
  }
}

/* App shell and navigation */
.sidebar {
  position: fixed;
  z-index: 1030;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  overflow: hidden;
  padding: 1.75rem 0.75rem 6.25rem;
  background: var(--bg-app);
}
.sidebar > *:not(.sidebar-leaf) {
  position: relative;
  z-index: 1;
}
.brand {
  color: var(--ink-serif);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}
.brand-mark {
  width: 2rem;
  height: 2rem;
  flex: none;
  fill: var(--green-700);
}
.side-nav .nav-link,
.settings .nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: var(--radius-nav);
  padding: 0.7rem 0.8rem;
  background: transparent;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
}
.side-nav .nav-link .icon,
.settings .nav-link i {
  width: 1.25rem;
  font-size: 1.22rem;
  text-align: center;
}
.side-nav .nav-link:hover,
.settings .nav-link:hover {
  background: var(--green-050);
  color: var(--green-900);
}
.side-nav .nav-link.active {
  background: var(--green-100);
  color: var(--green-900);
  font-weight: 600;
}
.sidebar-playlists {
  border-top: 1px solid var(--hairline);
}
.sidebar-playlists-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.4rem 0.35rem;
}
.sidebar-playlists-label p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.sidebar-new-playlist {
  display: inline-grid;
  width: 1.75rem;
  height: 1.75rem;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  color: var(--green-700);
  font-size: 1.35rem;
}
.sidebar-new-playlist:hover {
  background: var(--green-100);
}
.playlist-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.58rem 0.5rem;
  border: 0;
  border-radius: 0.6rem;
  background: transparent;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 500;
  text-align: left;
}
.playlist-nav:hover {
  background: var(--green-050);
  color: var(--green-900);
}
.playlist-nav .icon {
  width: 1.25rem;
  font-size: 1.2rem;
  text-align: center;
}
.category-work,
.category-gym {
  color: var(--green-700);
}
.category-sleep {
  color: var(--blue-500);
}
.category-study {
  color: #cf9a3c;
}
.sidebar-leaf {
  position: absolute;
  z-index: 0;
  right: -3rem;
  bottom: 5.6rem;
  width: 14rem;
  max-width: none;
  opacity: 0.45;
  pointer-events: none;
}
.sidebar-message {
  margin: 1.9rem 0.75rem 0;
  color: var(--text);
}
.sidebar-message p {
  margin: 0;
  line-height: 1.08;
  font-size: 1.48rem;
  letter-spacing: 0.01em;
}
.sidebar-flourish {
  display: block;
  width: 9.25rem;
  height: auto;
  margin: 0.15rem -0.1rem 0;
  color: var(--gold-soft);
}
.settings {
  margin-top: auto;
}
.settings .nav-link {
  color: var(--ink);
  font-size: 0.88rem;
}
.mobile-header {
  display: flex;
  min-height: 4rem;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-app);
}
.mobile-header .brand {
  font-size: 1.1rem;
}
.mobile-header .brand-mark {
  width: 1.8rem;
  height: 1.8rem;
}
.mobile-upload {
  display: grid;
  width: 2.3rem;
  height: 2.3rem;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  color: var(--green-900);
  font-size: 1.45rem;
}
.mobile-upload:hover {
  background: var(--green-100);
}

/* Header, hero and filters */
.main {
  display: flex;
  flex-direction: column;
  width: calc(100% - var(--sidebar-width));
  max-width: none;
  min-height: 100dvh;
  margin-left: var(--sidebar-width);
  padding: 1.5rem 2.5rem calc(var(--player-height) + 3rem);
}
.toolbar {
  order: 1;
  margin-bottom: 0.8rem;
}
.toolbar > * {
  flex: none;
}
.search {
  display: flex;
  flex: 1;
  align-items: center;
  min-width: 0;
  height: 2.75rem;
  padding: 0 0.95rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  background: var(--surface);
  box-shadow: var(--shadow-pill);
  color: var(--text-faint);
}
.search > span {
  display: grid;
  place-items: center;
  margin-right: 0.65rem;
  font-size: 1.25rem;
}
.search .form-control {
  min-width: 0;
  padding: 0;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--ink);
  font-size: 0.93rem;
}
.search .form-control::placeholder {
  color: var(--text-faint);
  opacity: 1;
}
.import-audio {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  height: 2.75rem;
  padding: 0 1.1rem;
  border: 1.5px solid #93ada0;
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--green-900);
  font-size: 0.9rem;
  font-weight: 600;
}
.import-audio i {
  font-size: 1.2rem;
}
.import-audio:hover {
  background: var(--green-100);
  border-color: var(--green-700);
}
.avatar {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border-radius: 50%;
  background: var(--green-100);
  box-shadow:
    0 0 0 3px var(--surface),
    var(--shadow-sm);
  color: var(--green-900);
  font-size: 0.78rem;
  font-weight: 700;
}
.hero {
  order: 2;
  position: relative;
  isolation: isolate;
  min-height: clamp(14.5rem, 23vw, 19.5rem);
  margin: -0.4rem -1rem 0;
  padding: 2.7rem 1rem 1rem;
  overflow: hidden;
}
.hero-media {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: #e9ede4 url("/assets/hero/biblioteca.webp") center right/cover
    no-repeat;
}
.hero-media::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(180deg, var(--bg-app) 0%, rgba(246, 243, 236, 0) 24%),
    linear-gradient(90deg, var(--bg-app) 0%, rgba(246, 243, 236, 0) 28%),
    linear-gradient(0deg, var(--bg-app) 0%, rgba(246, 243, 236, 0) 17%);
}
.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 48rem;
}
.hero h1 {
  margin: 0;
  color: var(--ink-serif);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2.5rem, 4vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.05;
}
#library-count {
  margin: 0.18rem 0 0;
  color: var(--text-muted);
  font-size: 0.94rem;
}
.hero-tagline {
  margin: 0.45rem 0 0;
  color: var(--text-muted);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.04rem;
  font-style: italic;
  font-weight: 500;
}
.hero-kicker {
  position: absolute;
  z-index: 1;
  top: 3rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  color: rgba(60, 70, 70, 0.72);
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.31em;
  line-height: 1.8;
  text-align: right;
  text-transform: uppercase;
}
.hero-kicker i {
  display: block;
  width: 3.1rem;
  height: 1px;
  margin-top: 0.55rem;
  background: var(--gold-soft);
  transform: rotate(-10deg);
}
.hero:not(.is-library) .hero-tagline,
.hero:not(.is-library) .hero-kicker {
  display: none;
}
.filters {
  position: relative;
  z-index: 2;
  order: 3;
  margin-top: -2.55rem;
  scrollbar-width: none;
}
.filters::-webkit-scrollbar {
  display: none;
}
.filter {
  height: 2.25rem;
  padding: 0 1.18rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--surface);
  box-shadow: var(--shadow-pill);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
}
.filter:hover {
  background: var(--green-050);
}
.filter.active,
.filter.is-active {
  background: var(--green-600);
  box-shadow: 0 3px 8px rgba(47, 97, 82, 0.23);
  color: #fff;
}
.filters-more {
  display: none;
}
.content {
  order: 4;
  margin-top: 1.35rem;
}

/* Playlists */
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}
.section-heading h2,
.drawer h2,
.dialog-head h2 {
  margin: 0;
  color: var(--ink-serif);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}
.text-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0;
  background: transparent;
  color: var(--green-700);
  font-size: 0.87rem;
  font-weight: 600;
}
.text-btn:hover {
  color: var(--green-900);
}
.text-btn .icon {
  font-size: 1.18rem;
}
.playlists-grid {
  margin-bottom: 0;
}
.playlist-card .card {
  overflow: hidden;
  border: 0 !important;
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-card) !important;
  transition:
    box-shadow 0.18s ease,
    transform 0.18s ease;
}
.playlist-card .card:hover {
  box-shadow: 0 10px 24px rgba(28, 44, 38, 0.13) !important;
  transform: translateY(-2px);
}
.cover-wrap {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--green-050);
}
.playlist-open {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  background: transparent;
}
.playlist-cover {
  width: 100%;
  height: 100%;
  background: var(--green-050);
}
.art {
  position: relative;
  display: block;
  overflow: hidden;
  isolation: isolate;
  background: var(--green-050);
}
.art-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
}
#player-art > .art {
  width: 100%;
  height: 100%;
}
.playlist-cover-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(12, 20, 16, 0.8) 0%,
    rgba(12, 20, 16, 0.38) 30%,
    rgba(12, 20, 16, 0) 62%
  );
}
.playlist-overlay {
  position: absolute;
  right: 4.4rem;
  bottom: 0.85rem;
  left: 0.95rem;
  z-index: 1;
  min-width: 0;
  color: #fff;
  text-align: left;
}
.playlist-overlay .card-title,
.playlist-overlay .card-meta {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-title {
  font-size: 0.94rem;
  font-weight: 600;
}
.card-meta {
  margin-top: 0.16rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.75rem;
}
.mobile-meta {
  display: none;
}
.cover-menu,
.cover-play {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
}
.cover-menu {
  top: 0.65rem;
  right: 0.65rem;
  width: 2rem;
  height: 2rem;
  background: transparent;
  font-size: 1.35rem;
}
.cover-menu:hover {
  background: rgba(20, 28, 22, 0.28);
}
.cover-play {
  right: 0.78rem;
  bottom: 0.72rem;
  width: 3.35rem;
  height: 3.35rem;
  border: 2px solid rgba(255, 255, 255, 0.92);
  background: rgba(20, 28, 22, 0.34);
  backdrop-filter: blur(3px);
  font-size: 1.1rem;
}
.cover-play:hover {
  background: rgba(20, 28, 22, 0.55);
  transform: scale(1.04);
}

/* Tracks */
.tracks-section {
  margin-top: 1.6rem;
}
.sort-wrap {
  position: relative;
}
.sort-wrap > i {
  position: absolute;
  top: 50%;
  right: 0.7rem;
  z-index: 1;
  pointer-events: none;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
}
.sort {
  height: 2rem;
  padding: 0.1rem 2rem 0.1rem 0.85rem !important;
  border: 1px solid var(--hairline) !important;
  border-radius: var(--radius-pill) !important;
  appearance: none;
  background: var(--surface) !important;
  box-shadow: var(--shadow-pill) !important;
  color: var(--ink) !important;
  font-size: 0.76rem;
}
.sort:focus {
  border-color: var(--green-500) !important;
}
.table-responsive {
  max-width: 100%;
  overflow-x: auto;
  border: 0 !important;
  border-radius: var(--radius-card) !important;
  background: var(--surface) !important;
  box-shadow: var(--shadow-card);
}
.tracks-table {
  margin: 0 !important;
  color: var(--text);
  font-size: 0.9rem;
}
.tracks-table > :not(caption) > * > * {
  border-bottom-color: var(--hairline);
  box-shadow: none;
}
.tracks-table thead {
  background: transparent !important;
}
.tracks-table th {
  padding: 0.78rem 0.75rem;
  color: var(--text-faint);
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tracks-table td {
  padding: 0.48rem 0.75rem;
  vertical-align: middle;
}
.tracks-table tbody tr:last-child > * {
  border-bottom: 0;
}
.tracks-table tbody tr:hover > * {
  background: rgba(28, 44, 38, 0.03);
}
.tracks-table .track-row.active > * {
  background: rgba(58, 107, 90, 0.06) !important;
}
.tracks-table .track-row.active .track-name {
  color: var(--green-700);
}
.track-grip {
  width: 2rem;
  padding-right: 0 !important;
  color: var(--text-faint);
  font-size: 1.1rem;
  text-align: center;
}
.track-cell {
  min-width: 16rem;
}
.track-cell-inner {
  display: flex;
  align-items: center;
  gap: 0.62rem;
}
.track-play {
  display: grid;
  width: 2.1rem;
  height: 2.1rem;
  flex: none;
  place-items: center;
  border-radius: 50%;
  background: #f4f3ee;
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  font-size: 0.85rem;
}
.track-play:hover {
  background: var(--green-100);
  color: var(--green-700);
}
.track-main {
  min-width: 0;
  padding: 0 !important;
  background: transparent !important;
  color: var(--ink) !important;
}
.track-main:hover {
  color: var(--green-700) !important;
}
.track-thumb {
  width: 2.75rem;
  height: 2.75rem;
  flex: none;
  border-radius: var(--radius-thumb);
}
.track-info {
  min-width: 0;
}
.track-name {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.93rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.track-sub {
  overflow: hidden;
  color: var(--text-muted) !important;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.track-category,
.track-duration {
  font-size: 0.84rem;
  white-space: nowrap;
}
.track-duration {
  font-variant-numeric: tabular-nums;
}
.cat-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.29rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.79rem;
  font-weight: 500;
  line-height: 1;
}
.cat-badge[data-cat="Trabalho"] {
  background: #d5e8da;
  color: #2f5a43;
}
.cat-badge[data-cat="Academia"] {
  background: #f5e6cd;
  color: #7c5327;
}
.cat-badge[data-cat="Sono"] {
  background: #e0e6f9;
  color: #41539f;
}
.cat-badge[data-cat="Estudo"] {
  background: #e3efe7;
  color: #3c5a48;
}
.cat-badge:not([data-cat="Trabalho"]):not([data-cat="Academia"]):not(
    [data-cat="Sono"]
  ):not([data-cat="Estudo"]) {
  background: var(--green-050);
  color: var(--green-700);
}
.icon-btn {
  display: inline-grid;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 !important;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.16rem;
}
.icon-btn:hover {
  background: var(--green-050);
  color: var(--green-700);
}
.favorite.is-favorite {
  color: var(--gold) !important;
}
.favorite.is-favorite:hover {
  background: #f7f0e4;
  color: var(--gold) !important;
}
.empty {
  padding: 2rem !important;
  border: 1px solid var(--hairline) !important;
  border-radius: var(--radius-card) !important;
  background: var(--surface) !important;
  box-shadow: var(--shadow-sm);
  color: var(--text-muted);
}

/* Player, queue, context menu and dialogs */
.player {
  position: fixed;
  z-index: 1035;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  display: grid;
  grid-template-columns: minmax(15rem, 1fr) minmax(20rem, 1.15fr) minmax(
      14rem,
      1fr
    );
  gap: 1.25rem;
  align-items: center;
  height: var(--player-height);
  padding: 0.7rem 1.35rem;
  border-radius: var(--radius-player);
  background: var(--surface);
  box-shadow: var(--shadow-player);
}
.now-playing-open {
  min-width: 0;
  color: var(--ink) !important;
}
.now-playing .track-thumb {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.75rem;
}
.now-playing .track-info {
  max-width: 16rem;
}
.now-playing .track-name {
  font-size: 0.9rem;
}
.now-playing .track-sub {
  font-size: 0.75rem;
}
.now-playing .favorite {
  color: var(--text-muted);
}
.transport {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.18rem;
}
.transport-buttons {
  gap: 0.05rem !important;
}
.transport .icon-btn {
  color: var(--ink);
}
.transport .icon-btn.selected {
  color: var(--green-600);
  background: var(--green-050);
}
.play-toggle {
  display: grid;
  width: 3.25rem;
  height: 3.25rem;
  place-items: center;
  border-radius: 50%;
  background: var(--green-600);
  box-shadow:
    0 0 0 6px rgba(255, 253, 249, 0.65),
    var(--shadow-play);
  color: #fff;
  font-size: 1.25rem;
}
.play-toggle:hover {
  background: var(--green-700);
  transform: scale(1.04);
}
.seek-row {
  width: 100%;
  font-variant-numeric: tabular-nums;
}
.seek-row span {
  min-width: 2.15rem;
  color: var(--text-muted) !important;
  font-size: 0.7rem;
}
.range {
  min-width: 0;
  accent-color: var(--green-600);
}
.seek {
  flex: 1;
  height: 4px;
  border-radius: var(--radius-pill);
  background:
    linear-gradient(var(--green-600) 0 0) 0 / var(--progress, 0%) 100% no-repeat,
    #e7e3d9;
}
.seek::-webkit-slider-thumb,
.volume-range::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--green-600);
  box-shadow: var(--shadow-sm);
  appearance: none;
}
.seek::-moz-range-thumb,
.volume-range::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--green-600);
  box-shadow: var(--shadow-sm);
}
.volume {
  gap: 0.2rem;
}
.volume .range {
  width: 5rem;
  height: 4px;
  background:
    linear-gradient(var(--green-600) 0 0) 0 / var(--progress, 65%) 100%
      no-repeat,
    #e7e3d9;
  border-radius: var(--radius-pill);
}
.tool-divider {
  width: 1px;
  height: 1.5rem;
  background: rgba(28, 44, 38, 0.1);
}
.player-tool {
  padding: 0.4rem;
  background: transparent;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 600;
}
.player-tool:hover,
.player-tool.selected {
  color: var(--green-700);
}
.player-tool i {
  font-size: 1.14rem;
}
.drawer {
  position: fixed;
  right: 1rem;
  bottom: calc(var(--player-height) + 2.2rem);
  z-index: 1050;
  width: 23rem;
  max-width: calc(100vw - 2rem);
  max-height: 65dvh;
  overflow: auto;
  padding: 1rem;
  border: 0 !important;
  border-radius: var(--radius-card) !important;
  background: var(--surface) !important;
  box-shadow: var(--shadow-card) !important;
}
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.drawer h2 {
  font-size: 1.25rem;
}
.queue-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-top: 1px solid var(--hairline);
}
.queue-item .track-main {
  flex: 1;
}
.queue-item .track-thumb {
  width: 2.5rem;
  height: 2.5rem;
}
.queue-item.active {
  color: var(--green-700);
}
.context-menu {
  position: fixed;
  z-index: 1060;
  min-width: 13rem;
  padding: 0.35rem;
  border: 0 !important;
  border-radius: 0.75rem !important;
  background: var(--surface) !important;
  box-shadow: var(--shadow-card) !important;
}
.context-menu button {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  min-height: 2.35rem;
  padding: 0.45rem 0.65rem;
  border-radius: 0.45rem;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-size: 0.875rem;
}
.context-menu button:hover {
  background: var(--green-050);
}
.danger {
  color: var(--bs-danger) !important;
}
.danger-primary {
  background: var(--bs-danger) !important;
  border-color: var(--bs-danger) !important;
}
.toast {
  position: fixed;
  bottom: calc(var(--player-height) + 2.25rem);
  left: 50%;
  z-index: 1080;
  width: max-content;
  max-width: calc(100% - 2rem);
  margin: 0;
  padding: 0.7rem 1rem !important;
  border: 0 !important;
  border-radius: var(--radius-pill) !important;
  background: var(--surface) !important;
  box-shadow: var(--shadow-card) !important;
  color: var(--green-700) !important;
  transform: translateX(-50%);
  font-size: 0.875rem;
}
dialog {
  width: min(31rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 0;
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  color: var(--text);
}
dialog::backdrop {
  background: rgba(20, 44, 33, 0.35);
  backdrop-filter: blur(2px);
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid var(--hairline);
}
.dialog-head h2 {
  font-size: 1.35rem;
}
.dialog-description {
  padding: 0 1rem;
  margin: 1rem 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 1rem;
}
.primary,
.secondary {
  min-height: 2.35rem;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
}
.primary {
  background: var(--green-600);
  color: #fff;
}
.primary:hover {
  background: var(--green-700);
}
.secondary {
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--ink);
}
.secondary:hover {
  background: var(--green-050);
}
.field {
  display: block;
  padding: 0 1rem;
  margin-top: 0.85rem;
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 600;
}
.field input,
.field select {
  display: block;
  width: 100%;
  height: 2.35rem;
  padding: 0.375rem 0.75rem;
  margin-top: 0.35rem;
  border: 1px solid var(--hairline);
  border-radius: 0.6rem;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.875rem;
}
.file-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin: 1rem;
  padding: 1.25rem;
  border: 1px dashed #93ada0;
  border-radius: var(--radius-card);
  background: var(--green-050);
  color: var(--green-700);
  text-align: center;
  font-size: 0.875rem;
}
.file-zone input {
  max-width: 100%;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.file-zone small {
  color: var(--text-muted);
}
.check-list {
  display: grid;
  max-height: 17.5rem;
  margin: 1rem;
  overflow: auto;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.6rem;
  border: 0;
  border-radius: 0.45rem;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-size: 0.875rem;
}
.check-row:hover {
  background: var(--green-050);
}
.check-row input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--green-600);
}
.timer-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  padding: 0 1rem;
}
.timer-options button {
  min-height: 2.4rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--ink);
}
.timer-options button:hover {
  background: var(--green-050);
  color: var(--green-700);
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border-top: 1px solid var(--hairline);
  font-size: 0.875rem;
}
.settings-row select {
  max-width: 10rem;
  border: 1px solid var(--hairline);
  border-radius: 0.6rem;
  padding: 0.3rem;
  background: var(--surface);
}
.form-error {
  padding: 0 1rem;
  color: var(--bs-danger);
  font-size: 0.8125rem;
}
.full-player {
  text-align: center;
  padding: 1rem;
}
.full-player .art {
  width: 6rem;
  aspect-ratio: 1;
  border-radius: 0.75rem;
  margin: 0 auto 1rem;
}
.full-player h3 {
  color: var(--ink-serif);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.4rem;
}
.full-player p {
  color: var(--text-muted);
  font-size: 0.875rem;
}
.full-player .transport {
  margin-top: 1rem;
}
.full-player .player-extras {
  justify-content: center;
  margin-top: 1rem;
}

@media (min-width: 768px) and (max-width: 1199.98px) {
  .main {
    padding-inline: 1.5rem;
  }
  .hero-kicker {
    right: 1rem;
  }
  .player {
    grid-template-columns: minmax(11rem, 1fr) minmax(15rem, 1fr) auto;
    gap: 0.75rem;
    padding-inline: 1rem;
  }
  .player-extras .volume,
  .player-extras .tool-divider {
    display: none;
  }
  .player-tool span {
    display: none;
  }
}
@media (max-width: 767.98px) {
  :root {
    --player-height: 4.35rem;
    --mobile-nav: 4.25rem;
  }
  .main {
    width: 100%;
    margin-left: 0;
    padding: 0 1rem calc(var(--player-height) + var(--mobile-nav) + 1.35rem);
  }
  .toolbar {
    order: 3;
    margin: 0.15rem 0 0.8rem;
  }
  .toolbar .import-audio,
  .toolbar .avatar {
    display: none;
  }
  .search {
    width: 100%;
    height: 2.5rem;
  }
  .search .form-control {
    font-size: 0.84rem;
  }
  .hero {
    order: 1;
    min-height: 11.6rem;
    margin: 0 -1rem;
    padding: 1.1rem 1rem 0.8rem;
  }
  .hero-media {
    background-position: 68% center;
  }
  .hero-media::after {
    background:
      linear-gradient(
        180deg,
        var(--bg-app) 0%,
        rgba(246, 243, 236, 0.08) 65%,
        var(--bg-app) 100%
      ),
      linear-gradient(90deg, var(--bg-app) 0%, rgba(246, 243, 236, 0) 62%);
  }
  .hero h1 {
    max-width: 21rem;
    font-size: 2.1rem;
  }
  .hero-tagline {
    max-width: 22rem;
    margin-top: 0.38rem;
    font-size: 0.83rem;
    line-height: 1.3;
  }
  .hero-kicker {
    display: none;
  }
  .hero:not(.is-library) {
    min-height: 8rem;
  }
  .filters {
    order: 4;
    margin: 0 -0.15rem 0.15rem;
    padding-right: 2.7rem !important;
  }
  .filter {
    height: 2rem;
    padding: 0 0.95rem;
    font-size: 0.79rem;
  }
  .filters-more {
    position: absolute;
    z-index: 3;
    right: 0.9rem;
    display: grid;
    width: 1.8rem;
    height: 1.8rem;
    place-items: center;
    border-radius: 50%;
    background: var(--surface);
    box-shadow: var(--shadow-pill);
    color: var(--ink);
    font-size: 0.9rem;
  }
  .content {
    order: 5;
    margin-top: 0.85rem;
  }
  .section-heading {
    margin-bottom: 0.55rem;
  }
  .section-heading h2 {
    font-size: 1.35rem;
  }
  .text-btn {
    padding-right: 0.1rem;
  }
  .text-btn span {
    display: none;
  }
  .playlists-grid {
    --bs-gutter-x: 0.55rem;
    --bs-gutter-y: 0.55rem;
  }
  .playlist-card .card {
    border-radius: 0.7rem;
  }
  .cover-wrap {
    aspect-ratio: 16/10;
    overflow: visible;
  }
  .playlist-cover {
    overflow: hidden;
    border-radius: 0.7rem 0.7rem 0 0;
  }
  .playlist-cover-scrim {
    display: none;
  }
  .playlist-overlay {
    position: static;
    min-height: 2.85rem;
    padding: 0.45rem 0.48rem 0.55rem;
    background: var(--surface);
    color: var(--ink);
  }
  .playlist-overlay .card-title {
    font-size: 0.78rem;
  }
  .playlist-overlay .card-meta {
    margin-top: 0.07rem;
    color: var(--text-muted);
    font-size: 0.67rem;
  }
  .desktop-meta {
    display: none;
  }
  .mobile-meta {
    display: block;
  }
  .cover-menu {
    top: 0.35rem;
    right: 0.3rem;
    width: 1.75rem;
    height: 1.75rem;
    font-size: 1.15rem;
  }
  .cover-play {
    right: 0.36rem;
    bottom: -0.05rem;
    width: 2.35rem;
    height: 2.35rem;
    border-width: 1.5px;
    font-size: 0.82rem;
  }
  .playlist-card .card:hover {
    transform: none;
  }
  .tracks-section {
    margin-top: 1.25rem;
  }
  .tracks-section .section-heading {
    align-items: center;
  }
  .sort {
    height: 1.8rem;
    font-size: 0.68rem;
  }
  .sort-wrap > i {
    right: 0.55rem;
    font-size: 0.75rem;
  }
  .tracks-table thead,
  .tracks-table .track-category {
    display: none;
  }
  .tracks-table,
  .tracks-table tbody,
  .tracks-table tr,
  .tracks-table td {
    display: block;
    width: 100%;
  }
  .tracks-table tr {
    position: relative;
    min-height: 3.55rem;
    border-top: 1px solid var(--hairline);
  }
  .tracks-table tr:first-child {
    border-top: 0;
  }
  .tracks-table td {
    border: 0 !important;
  }
  .tracks-table .track-grip {
    position: absolute;
    top: 50%;
    left: 0.12rem;
    z-index: 1;
    width: 1.4rem;
    padding: 0 !important;
    transform: translateY(-50%);
    font-size: 0.95rem;
  }
  .tracks-table .track-cell {
    min-width: 0;
    padding: 0.35rem 7.3rem 0.35rem 1.55rem;
  }
  .track-play {
    display: none;
  }
  .track-main .track-thumb {
    width: 2.45rem;
    height: 2.45rem;
  }
  .track-name {
    font-size: 0.77rem;
  }
  .track-sub {
    font-size: 0.65rem;
  }
  .tracks-table .track-duration,
  .tracks-table td:nth-last-child(2),
  .tracks-table td:last-child {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: auto;
    padding: 0;
    transform: translateY(-50%);
  }
  .tracks-table .track-duration {
    right: 5.15rem;
    font-size: 0.67rem;
  }
  .tracks-table td:nth-last-child(2) {
    right: 2.35rem;
  }
  .tracks-table td:last-child {
    right: 0.12rem;
  }
  .tracks-table .icon-btn {
    width: 2rem;
    min-width: 2rem;
    height: 2rem;
    font-size: 1.05rem;
  }
  .player {
    right: 0.6rem;
    bottom: calc(var(--mobile-nav) + 0.5rem);
    left: 0.6rem;
    display: flex;
    gap: 0.4rem;
    height: var(--player-height);
    padding: 0.45rem 0.6rem;
    border-radius: 1.125rem;
    box-shadow: var(--shadow-card);
  }
  .now-playing {
    flex: 1;
    min-width: 0;
  }
  .now-playing .track-thumb {
    width: 2.75rem;
    height: 2.75rem;
  }
  .now-playing .track-name {
    font-size: 0.78rem;
  }
  .now-playing .track-sub {
    font-size: 0.65rem;
  }
  .now-playing .favorite,
  .player > .transport,
  .player > .player-extras {
    display: none !important;
  }
  .mobile-player-controls {
    display: flex !important;
  }
  .mobile-player-controls .play-toggle {
    width: 2.65rem;
    height: 2.65rem;
    background: var(--green-100);
    box-shadow: none;
    color: var(--green-700);
    font-size: 1.08rem;
  }
  .mobile-player-controls .icon-btn {
    color: var(--ink);
  }
  .mobile-progress {
    position: absolute;
    top: 0;
    right: 0.8rem;
    left: 0.8rem;
    height: 3px;
    overflow: hidden;
    border-radius: 0 0 999px 999px;
    background: var(--hairline);
  }
  .mobile-progress span {
    display: block;
    height: 100%;
    background: var(--green-600);
  }
  .bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1035;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    height: var(--mobile-nav);
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--bg-app);
    border-top: 1px solid var(--hairline);
  }
  .bottom-nav button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.72rem;
  }
  .bottom-nav button.active {
    color: var(--green-700);
    font-weight: 600;
  }
  .bottom-nav .icon {
    font-size: 1.25rem;
  }
  .drawer {
    right: 0.6rem;
    bottom: calc(var(--player-height) + var(--mobile-nav) + 1.1rem);
    left: 0.6rem;
    width: auto;
    max-width: none;
  }
  .toast {
    bottom: calc(var(--player-height) + var(--mobile-nav) + 1.1rem);
  }
  .playlist-detail-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .playlist-detail-tools .primary,
  .playlist-detail-tools .secondary {
    font-size: 0.8125rem;
  }
}
@media (min-width: 768px) {
  .hero {
    min-height: 16rem;
    padding-top: 3.35rem;
  }
  .view-back {
    color: var(--green-700);
  }
  .playlist-overlay .mobile-meta {
    display: none;
  }
}
@media (max-width: 767.98px) {
  .cover-wrap {
    aspect-ratio: auto;
    overflow: visible;
  }
  .playlist-open {
    height: auto;
    aspect-ratio: 16/10;
  }
  .playlist-cover {
    aspect-ratio: 16/10;
  }
  .cover-play {
    bottom: 2.85rem;
  }
  .playlist-overlay {
    display: block;
    width: 100%;
  }
  .playlist-overlay.desktop-meta {
    display: none;
  }
  .playlist-overlay .desktop-meta {
    display: none;
  }
  .playlist-overlay .mobile-meta {
    display: block;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* Desktop amplo: preserva a escala do mockup em vez de ampliar os cards
   proporcionalmente à largura de monitores grandes. */
@media (min-width: 1400px) {
  :root {
    --sidebar-width: 12.5rem;
    --player-height: 4.5rem;
  }

  .sidebar {
    padding: 1.25rem 0.65rem 5.5rem;
  }

  .sidebar-message {
    margin-top: 1.35rem;
  }

  .main {
    padding: 1rem 1.5rem calc(var(--player-height) + 2.25rem);
  }

  .toolbar {
    margin-bottom: 0.45rem;
  }

  .toolbar,
  .hero,
  .filters,
  .content {
    width: 100%;
    max-width: none;
  }

  .search,
  .import-audio,
  .avatar {
    height: 2.45rem;
  }

  .hero {
    min-height: 13.5rem;
    margin-top: -0.2rem;
    padding-top: 2.7rem;
  }

  .hero h1 {
    font-size: 2.8rem;
  }

  .hero-tagline {
    font-size: 0.94rem;
  }

  .hero-kicker {
    top: 2.4rem;
  }

  .filters {
    margin-top: -2.05rem;
  }

  .filter {
    height: 2rem;
    padding-inline: 1rem;
    font-size: 0.82rem;
  }

  .content {
    margin-top: 0.9rem;
  }

  .section-heading {
    margin-bottom: 0.6rem;
  }

  .section-heading h2 {
    font-size: 1.42rem;
  }

  .playlists-grid {
    --bs-gutter-x: 0.8rem;
    --bs-gutter-y: 0.8rem;
  }

  .cover-wrap {
    height: clamp(10rem, 10vw, 11.5rem);
    aspect-ratio: auto;
  }

  .card-title {
    font-size: 0.86rem;
  }

  .card-meta {
    font-size: 0.69rem;
  }

  .cover-play {
    width: 2.8rem;
    height: 2.8rem;
    font-size: 0.95rem;
  }

  .tracks-section {
    margin-top: 1.2rem;
  }

  .tracks-table th {
    padding: 0.58rem 0.65rem;
    font-size: 0.62rem;
  }

  .tracks-table td {
    padding: 0.34rem 0.65rem;
  }

  .track-cell {
    min-width: 13rem;
  }

  .track-thumb {
    width: 2.35rem;
    height: 2.35rem;
  }

  .track-play {
    width: 1.85rem;
    height: 1.85rem;
    font-size: 0.75rem;
  }

  .track-name {
    font-size: 0.82rem;
  }

  .track-sub,
  .track-category,
  .track-duration {
    font-size: 0.72rem;
  }

  .cat-badge {
    padding: 0.25rem 0.64rem;
    font-size: 0.7rem;
  }

  .player {
    right: 0.75rem;
    bottom: 0.75rem;
    left: 0.75rem;
    gap: 1rem;
    padding: 0.55rem 1rem;
  }

  .now-playing .track-thumb {
    width: 3rem;
    height: 3rem;
  }

  .play-toggle {
    width: 2.9rem;
    height: 2.9rem;
    font-size: 1.1rem;
  }
}
