.tme-amp,
.tme-amp * { box-sizing: border-box; }

.tme-amp {
  --tme-amp-accent: #214c6e;
  --tme-amp-max-width: 100%;
  --tme-amp-list-height: auto;
  --tme-amp-card-height: auto;
  width: 100%;
  max-width: var(--tme-amp-max-width);
  margin: 22px 0;
  font-family: Montserrat, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.tme-amp-shell {
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(180deg, #2c5678 0%, #092136 100%);
  box-shadow: 0 22px 60px rgba(0,0,0,.24);
}

.tme-amp-topbar {
  padding: 16px 16px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.tme-amp-folder-pill,
.tme-amp-chip,
.tme-amp-control,
.tme-amp-mini-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  border-radius: 999px;
}

.tme-amp-folder-pill,
.tme-amp-chip {
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.16);
  color: #fff;
}

.tme-amp-folder-pill {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 800;
}

.tme-amp-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tme-amp-chip {
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
}

.tme-amp-chip.is-active { background:#fff; color:#163b57; }

.tme-amp-hero {
  position: relative;
  padding: 16px;
}

.tme-amp-hero.has-bg {
  background-size: cover;
  background-position: center;
}

.tme-amp-hero-overlay { display:none; }
.tme-amp-hero.has-bg .tme-amp-hero-overlay {
  display:block;
  position:absolute;
  inset:0;
  background: linear-gradient(90deg, rgba(0,0,0,.72), rgba(0,0,0,.38) 60%, rgba(0,0,0,.66));
}

.tme-amp-hero-inner {
  position:relative;
  z-index:1;
  display:grid;
  gap:16px;
  align-items:start;
}

.tme-amp-cover-box {
  width:100%;
  border-radius:18px;
  overflow:hidden;
  background:#000;
  aspect-ratio:1.35 / 1;
}
.tme-amp-cover-box img {
  width:100%; height:100%; object-fit:cover; display:block;
}

.tme-amp-player-card {
  border-radius:24px;
  background: rgba(255,255,255,.93);
  color:#17374f;
  padding:18px;
  box-shadow:0 14px 34px rgba(0,0,0,.16);
}

.tme-amp-player-head {
  display:grid;
  grid-template-columns:60px 1fr;
  gap:12px;
  align-items:center;
}

.tme-amp-current-art {
  width:60px; height:60px; border-radius:16px;
  background:#1c4767 center/cover no-repeat;
  overflow:hidden;
}
.tme-amp-current-art.is-fallback {
  display:flex; align-items:center; justify-content:center; color:#fff; font-size:18px; font-weight:900;
}

.tme-amp-current-meta { min-width:0; }
.tme-amp-main-title,
.tme-amp-current-title,
.tme-amp-current-sub,
.tme-amp-compact-heading,
.tme-amp-wide-subtitle { display:block; }

.tme-amp-main-title {
  font-size: clamp(24px, 3vw, 40px);
  line-height:1.08; font-weight:800; color:#fff; margin-bottom:8px;
}
.tme-amp-current-title {
  font-size:17px; line-height:1.15; font-weight:800; color:#17374f;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.tme-amp-current-sub,
.tme-amp-wide-subtitle {
  margin-top:4px; font-size:13px; color:#6a7a89;
}
.tme-amp-compact-heading {
  margin-top:8px; font-size:14px; color:#5a6e80; font-weight:700;
}

.tme-amp-controls-row {
  display:grid;
  grid-template-columns:auto auto 1fr auto auto auto;
  gap:8px; align-items:center; margin-top:16px;
}

.tme-amp-control {
  min-width:40px; height:40px; padding:0 12px; border:0; cursor:pointer;
  background:#f0f4f8; color:#17374f; font:inherit; font-weight:800;
}
.tme-amp-control--play {
  width:52px; min-width:52px; height:52px; border-radius:50%; background:var(--tme-amp-accent); color:#fff; font-size:18px;
}
.tme-amp-control--download { text-decoration:none !important; }

.tme-amp-progress-wrap {
  display:grid; grid-template-columns:auto 1fr auto; gap:10px; align-items:center;
}
.tme-amp-time {
  font-size:12px; font-weight:700; color:#687a8c; min-width:38px; text-align:center;
}
.tme-amp-progress { width:100%; accent-color:var(--tme-amp-accent); }

.tme-amp-list-panel { padding:0 16px 16px; }
.tme-amp-list-toolbar {
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:0 2px 12px;
}
.tme-amp-list-title {
  color:#fff; font-weight:800; font-size:14px; letter-spacing:.02em;
}
.tme-amp-search {
  display:flex; align-items:center; gap:8px; background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.14); border-radius:999px; padding:8px 12px; min-width:170px;
}
.tme-amp-search-icon { color:#fff; font-size:14px; opacity:.85; }
.tme-amp-search input {
  width:100%; border:0; outline:0; background:transparent; color:#fff; font:inherit; font-size:13px;
}
.tme-amp-search input::placeholder { color:rgba(255,255,255,.74); }

.tme-amp-list {
  list-style:none; margin:0; padding:0; border-radius:22px; overflow:hidden;
  background:rgba(255,255,255,.92); max-height:var(--tme-amp-list-height); overflow-y:auto;
}
.tme-amp-track {
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:12px 16px; border-bottom:1px solid rgba(23,55,79,.08);
}
.tme-amp-track:last-child { border-bottom:0; }
.tme-amp-track.is-active { background:rgba(33,76,110,.08); }
.tme-amp-track-select {
  display:grid; grid-template-columns:18px 44px 1fr; gap:12px; align-items:center;
  width:100%; text-align:left; border:0; background:transparent; padding:0; cursor:pointer; min-width:0;
}
.tme-amp-track-no {
  font-size:13px; color:#6a7a89; font-weight:700; text-align:center;
}
.tme-amp-track-art {
  width:44px; height:44px; border-radius:12px; overflow:hidden; background:#204866; color:#fff;
}
.tme-amp-track-art img { width:100%; height:100%; object-fit:cover; display:block; }
.tme-amp-track-art--fallback {
  display:flex; align-items:center; justify-content:center; font-weight:800; font-size:14px;
}
.tme-amp-track-meta { min-width:0; }
.tme-amp-track-meta strong,
.tme-amp-track-meta span {
  display:block; overflow:hidden; white-space:nowrap; text-overflow:ellipsis;
}
.tme-amp-track-meta strong { color:#17374f; font-size:16px; line-height:1.15; font-weight:800; }
.tme-amp-track-meta span { margin-top:3px; color:#6a7a89; font-size:13px; }
.tme-amp-track-actions {
  flex:0 0 auto; display:flex; align-items:center; gap:8px;
}
.tme-amp-mini-action {
  width:34px; height:34px; background:#f0f4f8; color:#17374f; font-size:16px; border:0; cursor:pointer;
}
.tme-amp-mini-action.is-fav { background:#ffeef3; color:#d14a6c; }

.tme-amp-empty { background:#fff; color:#17374f; padding:18px; border-radius:18px; }

/* Compact: mix of example 2 and 3 */
.tme-amp--compact .tme-amp-switcher,
.tme-amp--compact .tme-amp-main-title,
.tme-amp--compact .tme-amp-wide-subtitle,
.tme-amp--compact .tme-amp-list-title { display:none; }
.tme-amp--compact .tme-amp-topbar { justify-content:flex-start; }
.tme-amp--compact .tme-amp-folder-pill { width:100%; justify-content:flex-start; }
.tme-amp--compact .tme-amp-cover-box { aspect-ratio:1.1 / 1; }
.tme-amp--compact .tme-amp-player-card {
  background:#f2f3f5; color:#17374f;
}
.tme-amp--compact .tme-amp-search {
  min-width:100%; background:#fff; border-color:#d9dde2;
}
.tme-amp--compact .tme-amp-search-icon,
.tme-amp--compact .tme-amp-search input,
.tme-amp--compact .tme-amp-search input::placeholder { color:#6a7a89; }
.tme-amp--compact .tme-amp-list {
  background:#fff;
}
.tme-amp--compact .tme-amp-track {
  padding:12px 14px;
}
.tme-amp--compact .tme-amp-track-actions [data-share],
.tme-amp--compact .tme-amp-track-actions [data-info] { display:none; }
.tme-amp--compact .tme-amp-control--download { display:none; }

/* Auto */
.tme-amp--auto .tme-amp-main-title { color:#fff; }

/* Wide/editorial closer to ref 4 */
.tme-amp--wide .tme-amp-shell { background:#000; }
.tme-amp--wide .tme-amp-topbar { display:none; }
.tme-amp--wide .tme-amp-hero { padding:0; }
.tme-amp--wide .tme-amp-hero.has-bg .tme-amp-hero-overlay { display:block; }
.tme-amp--wide .tme-amp-hero-inner {
  grid-template-columns:220px 1fr; gap:0; align-items:stretch;
}
.tme-amp--wide .tme-amp-cover-box {
  border-radius:0; aspect-ratio:auto; min-height:260px;
}
.tme-amp--wide .tme-amp-player-card {
  border-radius:0; background:transparent; color:#fff; box-shadow:none; padding:28px;
}
.tme-amp--wide .tme-amp-main-title,
.tme-amp--wide .tme-amp-current-title,
.tme-amp--wide .tme-amp-current-sub,
.tme-amp--wide .tme-amp-wide-subtitle,
.tme-amp--wide .tme-amp-time,
.tme-amp--wide .tme-amp-search-icon,
.tme-amp--wide .tme-amp-search input,
.tme-amp--wide .tme-amp-search input::placeholder,
.tme-amp--wide .tme-amp-list-title { color:#fff; }
.tme-amp--wide .tme-amp-current-sub,
.tme-amp--wide .tme-amp-wide-subtitle,
.tme-amp--wide .tme-amp-time,
.tme-amp--wide .tme-amp-search input::placeholder { opacity:.82; }
.tme-amp--wide .tme-amp-controls-row { grid-template-columns:auto auto 1fr auto auto auto; }
.tme-amp--wide .tme-amp-control {
  background:rgba(255,255,255,.1); color:#fff;
}
.tme-amp--wide .tme-amp-control--play { background:#fff; color:#000; }
.tme-amp--wide .tme-amp-list-panel { padding:18px 28px 28px; background:#e9e9e9; }
.tme-amp--wide .tme-amp-list-toolbar { padding:0 0 16px; }
.tme-amp--wide .tme-amp-search {
  background:#fff; border:1px solid #d9dde2;
}
.tme-amp--wide .tme-amp-search-icon,
.tme-amp--wide .tme-amp-search input,
.tme-amp--wide .tme-amp-search input::placeholder { color:#6a7a89; }
.tme-amp--wide .tme-amp-list {
  background:transparent; border-radius:0;
}
.tme-amp--wide .tme-amp-track {
  background:#f1f1f1; padding:16px 18px; margin-bottom:10px; border-bottom:0;
}
.tme-amp--wide .tme-amp-track.is-active { background:#fff; }
.tme-amp--wide .tme-amp-track-select { grid-template-columns:56px 1fr; }
.tme-amp--wide .tme-amp-track-no { display:none; }
.tme-amp--wide .tme-amp-track-art {
  width:56px; height:56px; border-radius:0; background:#222;
}
.tme-amp--wide .tme-amp-track-meta strong { font-size:17px; }
.tme-amp--wide .tme-amp-track-meta span { font-size:14px; }
.tme-amp--wide .tme-amp-mini-action { background:#fff; }

/* Single */
.tme-amp--single .tme-amp-topbar { display:none; }
.tme-amp--single .tme-amp-hero { min-height:max(230px, var(--tme-amp-card-height)); }
.tme-amp--single .tme-amp-hero-inner { min-height:inherit; }
.tme-amp--single .tme-amp-player-card {
  background:rgba(255,255,255,.12); backdrop-filter:blur(4px); color:#fff;
}
.tme-amp--single .tme-amp-current-title,
.tme-amp--single .tme-amp-current-sub,
.tme-amp--single .tme-amp-time { color:#fff; }
.tme-amp--single .tme-amp-current-sub,
.tme-amp--single .tme-amp-time { opacity:.88; }
.tme-amp--single .tme-amp-control { background:rgba(255,255,255,.16); color:#fff; }
.tme-amp--single .tme-amp-control--play { background:#fff; color:#000; }

@media (max-width: 860px) {
  .tme-amp--wide .tme-amp-hero-inner,
  .tme-amp--single .tme-amp-hero-inner { grid-template-columns:1fr; }
  .tme-amp--wide .tme-amp-cover-box { min-height:200px; }
}

@media (max-width: 760px) {
  .tme-amp-controls-row,
  .tme-amp--wide .tme-amp-controls-row,
  .tme-amp--compact .tme-amp-controls-row { grid-template-columns:auto auto 1fr auto auto; }
  .tme-amp-control--download { display:none; }
  .tme-amp-list-toolbar { flex-direction:column; align-items:stretch; }
  .tme-amp-search { min-width:100%; }
}

@media (max-width: 560px) {
  .tme-amp-shell { border-radius:24px; }
  .tme-amp-player-card,
  .tme-amp-list { border-radius:20px; }
  .tme-amp-hero,
  .tme-amp-list-panel,
  .tme-amp-topbar { padding-left:14px; padding-right:14px; }
  .tme-amp-hero { padding-top:14px; }
  .tme-amp-list-panel { padding-bottom:14px; }
  .tme-amp-controls-row,
  .tme-amp--wide .tme-amp-controls-row,
  .tme-amp--compact .tme-amp-controls-row { grid-template-columns:auto 1fr auto auto; }
  .tme-amp-control[data-action="back"] { display:none; }
  .tme-amp-track-actions [data-info] { display:none; }
}
