:root {
  --bg: #121212;
  --panel: #181818;
  --panel2: #202020;
  --text: #f4f4f4;
  --muted: #b3b3b3;
  --green: #f97316;
  --red: #e24a4a;
  --border: rgba(255, 255, 255, 0.08);
  --scroll-track: rgba(255, 255, 255, 0.06);
  --scroll-thumb: rgba(249, 115, 22, 0.85);
  --scroll-thumb-hover: rgba(249, 115, 22, 1);
}

html,
body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  font-family: IRANSans, tahoma, serif;
  overflow: hidden;
}

.shg-queue-list,
.shg-search-results,
.shg-playlists-list,
.shg-collection-list {
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
}

.shg-queue-list::-webkit-scrollbar,
.shg-search-results::-webkit-scrollbar,
.shg-playlists-list::-webkit-scrollbar,
.shg-collection-list::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.shg-queue-list::-webkit-scrollbar-track,
.shg-search-results::-webkit-scrollbar-track,
.shg-playlists-list::-webkit-scrollbar-track,
.shg-collection-list::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 999px;
}

.shg-queue-list::-webkit-scrollbar-thumb,
.shg-search-results::-webkit-scrollbar-thumb,
.shg-playlists-list::-webkit-scrollbar-thumb,
.shg-collection-list::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border-radius: 999px;
  border: 2px solid rgba(0, 0, 0, 0);
  background-clip: padding-box;
}

.shg-queue-list::-webkit-scrollbar-thumb:hover,
.shg-search-results::-webkit-scrollbar-thumb:hover,
.shg-playlists-list::-webkit-scrollbar-thumb:hover,
.shg-collection-list::-webkit-scrollbar-thumb:hover {
  background: var(--scroll-thumb-hover);
  border: 2px solid rgba(0, 0, 0, 0);
  background-clip: padding-box;
}

.shg-queue-list::-webkit-scrollbar-corner,
.shg-search-results::-webkit-scrollbar-corner,
.shg-playlists-list::-webkit-scrollbar-corner,
.shg-collection-list::-webkit-scrollbar-corner {
  background: transparent;
}

.shg-player {
  box-sizing: border-box;
  height: 100vh;
  min-height: 100vh;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: IRANSans, tahoma, serif;
  overflow: hidden;
}

.shg-player,
.shg-player * {
  font-family: IRANSans, tahoma, serif !important;
}

.shg-shell {
  height: 100%;
  display: flex;
  direction: ltr; /* keep navbar on the physical left */
  min-height: 0;
  overflow: hidden;
}

@supports (height: 100dvh) {
  .shg-player {
    height: 100dvh;
    min-height: 100dvh;
  }
  .shg-shell {
    height: 100dvh;
  }
}

.shg-nav {
  width: 64px;
  flex: 0 0 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 8px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--panel);
  border-right: 1px solid var(--border);
  box-sizing: border-box;
  min-height: 0;
}

.shg-nav-spacer {
  flex: 1 1 auto;
}

.shg-nav-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.shg-nav-btn {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 140ms ease, border-color 140ms ease,
    transform 90ms ease, box-shadow 140ms ease;
}

.shg-nav-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12) inset;
  transform: translateY(-1px);
}

.shg-nav-btn:active {
  transform: translateY(0) scale(0.98);
}

.shg-nav-btn:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.shg-nav-btn.is-active {
  border-color: var(--green);
  background: rgba(255, 255, 255, 0.06);
}

.shg-nav-btn svg {
  width: 22px;
  height: 22px;
  display: block;
}

@media (max-height: 640px), (max-width: 520px) {
  .shg-nav {
    width: 58px;
    flex: 0 0 58px;
    padding: 8px 6px;
    padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));
    gap: 6px;
  }
  .shg-nav-stack {
    gap: 6px;
  }
  .shg-nav-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }
  .shg-nav-btn svg {
    width: 20px;
    height: 20px;
  }
}

.shg-main {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px;
  box-sizing: border-box;
  direction: rtl;
  min-height: 0;
  overflow: auto;
}

.shg-main.is-searching {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.shg-view {
  display: none;
}

.shg-view.is-active {
  display: block;
}

.shg-sticky-controls {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  padding-bottom: 10px;
}

.shg-sticky-controls::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 16px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.35));
}

.shg-main::-webkit-scrollbar {
  width: 0;
  height: 0;
}

@media (hover: hover) and (pointer: fine) {
  /* Desktop: show a visible scrollbar for the main scroll area. */
  .shg-main {
    scrollbar-width: thin;
    scrollbar-color: var(--scroll-thumb) var(--scroll-track);
  }
  .shg-main::-webkit-scrollbar {
    width: 10px;
    height: 10px;
  }
  .shg-main::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 999px;
  }
  .shg-main::-webkit-scrollbar-thumb {
    background: var(--scroll-thumb);
    border-radius: 999px;
    border: 2px solid rgba(0, 0, 0, 0);
    background-clip: padding-box;
  }
  .shg-main::-webkit-scrollbar-thumb:hover {
    background: var(--scroll-thumb-hover);
  }
  .shg-main::-webkit-scrollbar-corner {
    background: transparent;
  }
}

.shg-settings-head {
  padding: 8px 2px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.shg-settings-title {
  font-size: 16px;
  font-weight: 900;
}

.shg-settings-sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.shg-playlists-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.shg-playlists-title {
  font-size: 13px;
  font-weight: 900;
}

.shg-playlists-sub {
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
}

.shg-playlists-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.shg-home-sections {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#shg-view-player.is-searching .shg-home-sections {
  display: none;
}

#shg-view-player.is-searching .shg-search {
  margin-top: 0;
  border-top: 0;
  padding-top: 0;
}

#shg-view-player.is-searching {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

#shg-view-player.is-searching .shg-search.is-open {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

#shg-view-player.is-searching .shg-search-results {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
}

#shg-view-player.is-searching #shg-btn-search {
  background: rgba(249, 115, 22, 0.16);
  border-color: var(--green);
  color: var(--green);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12) inset;
}

.shg-strip-box {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  padding: 10px;
  overflow: hidden;
}

.shg-strip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.shg-strip-head--compact {
  justify-content: flex-start;
  margin-bottom: 6px;
  direction: rtl;
}

.shg-strip-title {
  font-size: 12px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.shg-strip-head--compact .shg-strip-title {
  font-size: 11px;
  font-weight: 800;
}

.shg-strip {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 2px;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.shg-strip:active {
  cursor: grabbing;
}

.shg-strip::-webkit-scrollbar {
  display: none;
}

.shg-track-card {
  flex: 0 0 auto;
  width: 140px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  padding: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
  cursor: pointer;
  user-select: none;
  direction: rtl;
  position: relative;
}

.shg-track-card:hover {
  background: rgba(255, 255, 255, 0.04);
}

.shg-track-card.is-nowplaying {
  background: rgba(255, 255, 255, 0.035);
  border-color: var(--green);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12) inset;
}

.shg-track-card.is-playing {
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12) inset,
    0 0 0 1px rgba(255, 255, 255, 0.04);
}

.shg-track-card-cover {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel2);
  overflow: hidden;
  flex: 0 0 auto;
  position: relative;
}

.shg-track-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}

.shg-liked-card {
  flex: 0 0 auto;
  width: 220px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.08),
      rgba(255, 255, 255, 0.02)
    ),
    var(--panel);
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  direction: rtl;
}

.shg-liked-card:hover {
  background: linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.12),
      rgba(255, 255, 255, 0.03)
    ),
    var(--panel);
}

.shg-liked-card:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.shg-liked-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  flex: 0 0 auto;
}

.shg-liked-card-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.shg-liked-card-main {
  min-width: 0;
  flex: 1 1 auto;
}

.shg-liked-card-title {
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}

.shg-liked-card-sub {
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}

.shg-btn.shg-like-btn {
  color: rgba(255, 255, 255, 0.55);
}

.shg-btn.shg-like-btn.is-liked {
  color: var(--green);
}

.shg-btn.shg-like-btn--cover {
  position: absolute;
  left: 4px;
  top: 4px;
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.28);
  box-shadow: none;
}

.shg-btn.shg-like-btn--cover:not(:disabled):hover {
  background: rgba(0, 0, 0, 0.38);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: none;
  transform: none;
}

.shg-btn.shg-like-btn--cover svg {
  width: 14px;
  height: 14px;
}

.shg-eq {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 16px;
  height: 16px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  padding: 3px;
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease;
}

[data-shg-postid].is-nowplaying .shg-eq {
  opacity: 0.85;
}

[data-shg-postid].is-playing .shg-eq {
  opacity: 1;
}

.shg-eq i {
  width: 2px;
  height: 100%;
  background: var(--green);
  border-radius: 2px;
  transform-origin: bottom;
  animation: shgEq 900ms ease-in-out infinite;
}

.shg-eq i:nth-child(2) {
  animation-delay: 120ms;
}

.shg-eq i:nth-child(3) {
  animation-delay: 240ms;
}

[data-shg-postid].is-nowplaying:not(.is-playing) .shg-eq i {
  animation-play-state: paused;
  transform: scaleY(0.55);
}

@keyframes shgEq {
  0%,
  100% {
    transform: scaleY(0.25);
  }
  50% {
    transform: scaleY(1);
  }
}

@keyframes shgSpin {
  to {
    transform: rotate(360deg);
  }
}

.shg-muted-dot {
  color: rgba(255, 255, 255, 0.45);
  font-weight: 400;
}

.shg-track-card-main {
  min-width: 0;
  flex: 1 1 auto;
}

.shg-track-card-title {
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}

.shg-track-card-sub {
  display: block;
  width: 100%;
  margin-top: 1px;
  font-size: 10px;
  line-height: 1.2;
  color: var(--muted);
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}

.shg-track-card-album {
  display: block;
  width: 100%;
  margin-top: 1px;
  font-size: 10px;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}

.shg-mini-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  padding: 7px 10px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  transition: background 140ms ease, border-color 140ms ease,
    transform 90ms ease, box-shadow 140ms ease;
}

.shg-mini-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12) inset;
  transform: translateY(-1px);
}

.shg-mini-btn:active {
  transform: translateY(0) scale(0.98);
}

.shg-mini-btn:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.shg-playlists-list {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.01);
  max-height: calc(100vh - 260px);
  overflow: auto;
  padding: 10px;
  display: flex;
  direction: ltr;
  flex-direction: row-reverse;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 10px;
  scrollbar-width: none;
  cursor: grab;
}

.shg-playlists-list.is-dragging {
  cursor: grabbing;
}

.shg-playlists-list::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.shg-playlists-list.is-detail {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  cursor: grab;
}

.shg-pl-detail-head {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(18, 18, 18, 0.92);
  backdrop-filter: blur(6px);
}

.shg-pl-detail-head-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.shg-pl-detail-head-main {
  min-width: 0;
  flex: 1 1 auto;
  text-align: right;
}

.shg-pl-detail-title {
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shg-pl-detail-sub {
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shg-pl-tracklist {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.shg-pl-track-empty {
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.01);
  color: var(--muted);
  text-align: right;
}

.shg-pl-track {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  user-select: none;
}

.shg-pl-track:hover {
  background: rgba(255, 255, 255, 0.04);
}

.shg-pl-track.is-nowplaying {
  border-color: var(--green);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12) inset;
}

.shg-pl-track.is-dragging {
  opacity: 0.65;
}

.shg-pl-track-cover {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel2);
  overflow: hidden;
  flex: 0 0 auto;
  position: relative;
}

.shg-pl-track-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.shg-pl-track-main {
  min-width: 0;
  flex: 1 1 auto;
  text-align: right;
}

.shg-pl-track-title {
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shg-pl-track-sub {
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shg-pl-track-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.shg-pl-track-grip {
  cursor: grab;
}

.shg-playlists-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
}

.shg-playlists-list:not(.is-detail) .shg-playlists-item {
  flex: 1 1 220px;
}

.shg-playlists-item.is-current {
  border-color: var(--green);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12) inset;
}

.shg-playlists-empty {
  display: block;
  text-align: right;
  width: 100%;
  flex: 0 0 100%;
}

.shg-playlists-empty .shg-btn {
  margin-top: 10px;
}

.shg-playlists-item-main {
  min-width: 0;
  flex: 1 1 auto;
}

.shg-playlists-item-title {
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}

.shg-playlists-item-sub {
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}

.shg-playlists-item-actions {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: auto;
}

.shg-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.shg-tab {
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.shg-tab.is-active {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--green);
  color: var(--text);
}

.shg-panel {
  display: none;
}

.shg-panel.is-active {
  display: block;
}

.shg-field {
  padding: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 14px;
}

.shg-label {
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 10px;
}

.shg-row2 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.shg-color {
  width: 46px;
  height: 38px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
}

.shg-swatches {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.shg-swatch {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--green);
  cursor: pointer;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.15);
}

.shg-swatch[data-color] {
  background: var(--swatch, var(--green));
}

.shg-radio {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 700;
}

.shg-radio input {
  accent-color: var(--green);
}

.shg-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.shg-cover {
  width: 62px;
  height: 62px;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--border);
  overflow: hidden;
  flex: 0 0 auto;
  position: relative;
}

.shg-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.shg-cover.is-loading img {
  opacity: 0;
}

.shg-cover.is-loading::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    rgba(255, 255, 255, 0.06) 0%,
    rgba(255, 255, 255, 0.02) 40%,
    rgba(255, 255, 255, 0.06) 80%
  );
  background-size: 200% 100%;
  animation: shgShimmer 1.1s linear infinite;
}

.shg-cover.is-loading::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-left: -8px;
  margin-top: -8px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: var(--green);
  animation: shgspin 0.9s linear infinite;
}

@keyframes shgShimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.shg-meta {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.shg-title {
  font-size: 14px;
  font-weight: 900;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shg-artist {
  display: block;
  width: 100%;
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shg-album {
  display: block;
  width: 100%;
  margin-top: 3px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shg-album-label {
  font-weight: 400;
}

.shg-album-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
}

.shg-album-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: var(--green);
  flex: 0 0 auto;
}

.shg-album-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.shg-album-name {
  font-weight: 900;
}

.shg-loading-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.shg-loading-icon {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  animation: shgSpin 900ms linear infinite;
  box-sizing: border-box;
}

.shg-loading-text {
  color: inherit;
}

.shg-meta-link,
.shg-inline-link {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  font-family: inherit;
  text-align: inherit;
  cursor: pointer;
}

.shg-meta-link:hover,
.shg-inline-link:hover {
  color: var(--green);
  text-decoration: none;
}

.shg-meta-link:focus-visible,
.shg-inline-link:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  border-radius: 8px;
}

.shg-collection-box {
  margin-top: 0;
}

.shg-collection-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.shg-collection-actions {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}

.shg-collection-list {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  max-height: 240px;
  overflow: auto;
  direction: rtl;
}

.shg-collection-list .shg-search-item {
  cursor: pointer;
}

.shg-collection-list .shg-pl-track-actions {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 52%;
  overflow-x: auto;
  overflow-y: hidden;
  flex-wrap: nowrap;
  scrollbar-width: none;
  direction: ltr;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.shg-collection-list .shg-pl-track-actions::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.shg-collection-list .shg-pl-track-actions > * {
  flex: 0 0 auto;
}

.shg-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  direction: ltr;
}

.shg-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--panel2);
  color: var(--text);
  font-family: inherit;
  border-radius: 10px;
  padding: 8px;
  cursor: pointer;
  user-select: none;
  transition: background 140ms ease, border-color 140ms ease,
    transform 90ms ease, box-shadow 140ms ease, color 140ms ease;
}

.shg-btn:not(:disabled):hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12) inset;
  transform: translateY(-1px);
}

.shg-btn:not(:disabled):active {
  transform: translateY(0) scale(0.98);
}

.shg-btn:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.shg-btn--icon {
  padding: 8px;
  line-height: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

#shg-btn-speed {
  height: 38px;
  min-width: 38px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-sizing: border-box;
}

.shg-btn--icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.shg-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.shg-btn--primary {
  background: var(--green);
  border-color: rgba(0, 0, 0, 0.15);
  color: #0b0b0b;
}

.shg-btn--primary:not(:disabled):hover {
  background: var(--green);
  border-color: rgba(0, 0, 0, 0.22);
  filter: brightness(1.02);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12) inset;
}

.shg-btn--primary:not(:disabled):active {
  background: var(--green);
  border-color: rgba(0, 0, 0, 0.28);
  filter: brightness(0.98);
}

.shg-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}

.shg-mid {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
  direction: ltr;
}

.shg-lyric {
  margin-top: 6px;
  display: none;
  gap: 8px;
  align-items: center;
  direction: rtl;
  font-family: IRANSans, tahoma, serif;
}

.shg-lyric.is-active {
  display: flex;
  animation: shgFadeUp 180ms ease-out both;
}

.shg-lyric-side {
  flex: 0 0 24%;
  max-width: 24%;
  appearance: none;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  border-radius: 0;
  padding: 0 6px;
  font-size: 12px;
  font-family: IRANSans, tahoma, serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  text-align: right;
}

.shg-lyric-side:hover {
  color: rgba(255, 255, 255, 0.75);
}

.shg-lyric-side:disabled {
  opacity: 0.25;
  cursor: default;
}

.shg-lyric.is-flow .shg-lyric-side {
  display: none;
}

.shg-lyric-current {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  --p: 0%;
  border: none;
  background: transparent;
  box-shadow: inset 0 -1px var(--border);
  border-radius: 0;
  padding: 4px 15px 10px 15px;
  overflow: hidden;
  text-align: center;
}

.shg-lyric.is-flow .shg-lyric-current {
  text-align: right;
}

.shg-lyric-current::before,
.shg-lyric-current::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 18px;
  pointer-events: none;
  z-index: 2;
}

.shg-lyric-current::before {
  right: 0;
  background: linear-gradient(to left, #0f0f0f 0%, rgba(24, 24, 24, 0));
}

.shg-lyric-current::after {
  left: 0;
  background: linear-gradient(to right, #0f0f0f 0%, rgba(24, 24, 24, 0));
}

.shg-lyric-current-text {
  display: inline-block;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1px;
  font-family: IRANSans, tahoma, serif;
  will-change: transform;
  transform: translateX(0);
  background-image: linear-gradient(to left, var(--green), var(--green)),
    linear-gradient(
      to left,
      rgba(255, 255, 255, 0.92),
      rgba(255, 255, 255, 0.92)
    );
  background-size: var(--p) 100%, 100% 100%;
  background-repeat: no-repeat;
  background-position: right center, right center;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.shg-lyric-current-text.is-fade-in {
  animation: shgLyricFadeIn 140ms ease-out both;
}

.shg-lyric-current-text.is-idle {
  color: rgba(255, 255, 255, 0.6);
  font-weight: 700;
  letter-spacing: 2px;
  animation: shgPulse 1100ms ease-in-out infinite alternate;
}

@keyframes shgLyricFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes shgFadeUp {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shgPulse {
  from {
    opacity: 0.45;
    transform: translateX(0);
  }
  to {
    opacity: 0.95;
    transform: translateX(2px);
  }
}

.shg-main.is-lyrics-full {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.shg-main.is-lyrics-full .shg-view.is-active {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.shg-main.is-lyrics-full #shg-home-sections {
  display: none;
}

.shg-main.is-lyrics-full .shg-lyric {
  display: none !important;
}

.shg-lyrics-full {
  display: none;
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.shg-main.is-lyrics-full .shg-lyrics-full {
  display: flex;
  flex-direction: column;
}

.shg-lyrics-full-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 35vh 0;
  direction: rtl;
}

.shg-lyrics-full-line {
  width: 100%;
  appearance: none;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  padding: 10px 8px;
  font-size: 14px;
  line-height: 1.7;
  cursor: pointer;
  font-family: IRANSans, tahoma, serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.shg-lyrics-full-line:hover {
  color: rgba(255, 255, 255, 0.78);
}

.shg-lyrics-full-line:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  border-radius: 10px;
}

.shg-lyrics-full-line.is-active {
  --p: 0%;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 900;
  font-size: 15px;
}

.shg-lyrics-full-text {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.shg-lyrics-full-line.is-active .shg-lyrics-full-text {
  background-image: linear-gradient(to left, var(--green), var(--green)),
    linear-gradient(
      to left,
      rgba(255, 255, 255, 0.92),
      rgba(255, 255, 255, 0.92)
    );
  background-size: var(--p) 100%, 100% 100%;
  background-repeat: no-repeat;
  background-position: right center, right center;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.shg-lyrics-full-gap {
  padding: 8px 8px;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.2);
  user-select: none;
}

.shg-lyrics-full-gap-text {
  display: inline-block;
  letter-spacing: 2px;
  transform: translateZ(0);
}

.shg-lyrics-full-line.is-active.is-hold {
  color: var(--green);
  animation: shgLyricsFullHoldToWhite 5s linear forwards;
}

.shg-lyrics-full-line.is-active.is-hold .shg-lyrics-full-text {
  background-image: none;
  -webkit-background-clip: initial;
  -webkit-text-fill-color: currentColor;
}

@keyframes shgLyricsFullHoldToWhite {
  0% {
    color: var(--green);
  }
  100% {
    color: rgba(255, 255, 255, 0.92);
  }
}

.shg-time {
  font-size: 11px;
  color: var(--muted);
  min-width: 42px;
  text-align: center;
  direction: ltr;
  font-variant-numeric: tabular-nums;
}

.shg-range {
  width: 100%;
  --seek-p: 0%;
  --seek-b: 0%;
  --seek-fill: var(--green);
  --seek-buffer: rgba(255, 255, 255, 0.22);
  --seek-track: rgba(255, 255, 255, 0.1);

  appearance: none;
  -webkit-appearance: none;
  height: 6px;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.shg-range:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 4px;
  border-radius: 999px;
}

.shg-range::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--seek-fill) 0,
    var(--seek-fill) var(--seek-p),
    var(--seek-buffer) var(--seek-p),
    var(--seek-buffer) var(--seek-b),
    var(--seek-track) var(--seek-b),
    var(--seek-track) 100%
  );
}

.shg-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--seek-fill);
  border: 2px solid rgba(0, 0, 0, 0.28);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  margin-top: -4px;
}

.shg-range::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--seek-fill) 0,
    var(--seek-fill) var(--seek-p),
    var(--seek-buffer) var(--seek-p),
    var(--seek-buffer) var(--seek-b),
    var(--seek-track) var(--seek-b),
    var(--seek-track) 100%
  );
}

.shg-range::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--seek-fill);
  border: 2px solid rgba(0, 0, 0, 0.28);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.shg-range::-moz-focus-outer {
  border: 0;
}

.shg-bottom {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.shg-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

.shg-vol-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.shg-vol-pop {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 150px;
  padding: 8px;
  box-sizing: border-box;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  z-index: 60;
}

.shg-vol-wrap.is-open .shg-vol-pop {
  display: flex;
}

.shg-vol {
  width: 120px;
  height: 18px;
  transform: rotate(-90deg);
  transform-origin: center;
  accent-color: var(--green);
}

.shg-queue {
  margin-top: 10px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
  display: none;
  direction: rtl;
}

.shg-queue.is-open {
  display: block;
}

.shg-queue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.shg-queue-title {
  font-size: 12px;
  color: var(--muted);
}

.shg-queue-list {
  max-height: 190px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
}

.shg-queue-item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.shg-queue-item:last-child {
  border-bottom: 0;
}

.shg-queue-item.is-active {
  background: rgba(29, 185, 84, 0.12);
}

.shg-queue-item-cover {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel2);
  overflow: hidden;
  flex: 0 0 auto;
  position: relative;
}

.shg-queue-item-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.shg-queue-item-main {
  min-width: 0;
  flex: 1 1 auto;
}

.shg-queue-item-title {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}

.shg-queue-item-sub {
  display: block;
  width: 100%;
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}

.shg-queue-item-album {
  display: block;
  width: 100%;
  margin-top: 2px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}

.shg-queue-item-actions {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}

.shg-badge {
  font-size: 10px;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 3px 6px;
  border-radius: 999px;
}

.shg-status {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

.shg-status.is-error {
  color: rgba(255, 255, 255, 0.6);
}

.shg-search {
  margin-top: 10px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
  display: none;
  direction: rtl;
}

.shg-search.is-open {
  display: block;
}

.shg-search-row {
  display: flex;
  gap: 8px;
  align-items: center;
  direction: rtl;
  position: relative;
  --shg-search-control: 38px;
  margin-top: 4px;
}

.shg-search-field {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.shg-search-selectbar {
  margin-top: 8px;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  cursor: grab;
  direction: rtl;
  touch-action: pan-y;
}

.shg-search.is-select-mode .shg-search-selectbar {
  display: flex;
}

.shg-search-selectbar::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.shg-search-select-count {
  font-size: 12px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
  flex: 0 0 auto;
}

.shg-search-select-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  margin-right: auto;
}

.shg-search-check {
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.92);
  border-radius: 10px;
  box-sizing: border-box;
  width: 38px;
  height: 38px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  cursor: pointer;
}

.shg-search-check:hover {
  background: rgba(255, 255, 255, 0.04);
}

.shg-search-check svg {
  width: 22px;
  height: 22px;
}

.shg-search.is-select-mode .shg-search-item {
  cursor: pointer;
}

.shg-search-item.is-selected {
  border-bottom-color: rgba(29, 185, 84, 0.45);
  box-shadow: 0 0 0 1px rgba(29, 185, 84, 0.16) inset;
  background: rgba(29, 185, 84, 0.06);
}

.shg-cover img[data-shg-cover],
.shg-track-card-cover img[data-shg-cover],
.shg-search-item-cover img[data-shg-cover],
.shg-queue-item-cover img[data-shg-cover],
.shg-pl-track-cover img[data-shg-cover] {
  cursor: zoom-in;
}

.shg-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.shg-lightbox.is-open {
  display: flex;
}

.shg-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  opacity: 0;
  transition: opacity 180ms ease;
}

.shg-lightbox.is-open .shg-lightbox-backdrop {
  opacity: 1;
}

.shg-lightbox-card {
  position: relative;
  width: min(620px, calc(100vw - 44px));
  height: min(620px, calc(100vh - 84px));
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(14, 14, 14, 0.92);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  transform: scale(0.96);
  opacity: 0;
  transition: transform 180ms ease, opacity 180ms ease;
}

.shg-lightbox.is-open .shg-lightbox-card {
  transform: scale(1);
  opacity: 1;
}

.shg-lightbox-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: rgba(0, 0, 0, 0.12);
}

.shg-lightbox-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 140ms ease;
  background: rgba(0, 0, 0, 0.22);
}

.shg-lightbox-card.is-loading .shg-lightbox-loading {
  opacity: 1;
}

.shg-lightbox-card.is-loading .shg-lightbox-img {
  opacity: 0.22;
  filter: blur(10px);
  transform: scale(1.02);
}

.shg-lightbox-loading .shg-spinner {
  width: 28px;
  height: 28px;
  border-width: 3px;
}

.shg-lightbox-close {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
  color: rgba(255, 255, 255, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.shg-lightbox-close:hover {
  background: rgba(29, 185, 84, 0.14);
  border-color: rgba(29, 185, 84, 0.35);
  color: var(--green);
}

.shg-lightbox-close svg {
  width: 18px;
  height: 18px;
}

@media (prefers-reduced-motion: reduce) {
  .shg-lightbox-backdrop,
  .shg-lightbox-card {
    transition: none;
  }
}

.shg-text-input {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
  direction: rtl;
  text-align: right;
  font-family: IRANSans, tahoma, serif;
  font-size: 13px;
  font-weight: 500;
}

.shg-text-input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.shg-pl-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.shg-pl-vis {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.shg-pl-radio {
  margin-top: 0;
  font-size: 12px;
  font-weight: 800;
}

.shg-pl-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.shg-pl-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}

.shg-search-input {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  box-sizing: border-box;
  height: var(--shg-search-control);
  padding: 0 12px;
  padding-left: 42px;
  outline: none;
  direction: rtl;
  text-align: right;
  font-family: IRANSans, tahoma, serif;
  font-size: 13px;
  font-weight: 500;
}

.shg-search-clear {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  box-shadow: none;
  z-index: 2;
}

#shg-search-clear:not(:disabled):hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: transparent;
  box-shadow: none;
  transform: translateY(-50%);
  color: var(--green);
}

#shg-search-clear:not(:disabled):active {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-50%);
}

#shg-search-clear svg {
  width: 16px;
  height: 16px;
  display: block;
}

#shg-search-select-toggle {
  width: var(--shg-search-control);
  height: var(--shg-search-control);
  box-sizing: border-box;
  padding: 0;
  flex: 0 0 auto;
}

.shg-search-input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.shg-search-results,
.shg-collection-list {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  max-height: 240px;
  overflow: auto;
  direction: rtl;
}

.shg-search-results {
  margin-top: 7px;
}

.shg-like-btn--card {
  position: absolute;
  top: 6px;
  left: 6px;
  right: auto;
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.24);
  box-shadow: none;
  flex: 0 0 auto;
  z-index: 3;
}

.shg-like-btn--card:not(:disabled):hover {
  background: rgba(0, 0, 0, 0.32);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: none;
  transform: none;
}

.shg-like-btn--card svg {
  width: 14px;
  height: 14px;
}

.shg-search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-bottom: 1px solid var(--border);
}

.shg-search-item--loading,
.shg-search-item--hint {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
  justify-content: center;
  text-align: center;
}

.shg-search-item.is-nowplaying:not(.is-selected) {
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12) inset;
}

.shg-search-item:last-child {
  border-bottom: 0;
}

.shg-search-item-cover {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel2);
  overflow: hidden;
  flex: 0 0 auto;
  position: relative;
}

.shg-search-item-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.shg-search-item-main {
  min-width: 0;
  flex: 1 1 auto;
}

.shg-search-item-title {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}

.shg-search-item-title-text {
  display: inline;
}

.shg-hl {
  background: transparent;
  color: var(--green);
  padding: 0;
  border-radius: 0;
  font-weight: 800;
}

.shg-search-item-sub {
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}

.shg-search-item-sub--snippet {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.62);
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.shg-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  animation: shgspin 0.9s linear infinite;
  flex: 0 0 auto;
}

@keyframes shgspin {
  to {
    transform: rotate(360deg);
  }
}

.shg-search-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.shg-search-hint {
  padding: 8px 10px;
  font-size: 10px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.55);
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.shg-search-item-actions {
  display: flex;
  gap: 6px;
  flex: 0 1 auto;
  align-items: center;
  flex-wrap: nowrap;
  min-width: 0;
  max-width: 52%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  touch-action: pan-y;
  direction: ltr;
}

.shg-search-item-actions::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.shg-search-section-head {
  padding: 10px 10px 6px;
  font-size: 11px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  position: sticky;
  top: 0;
  z-index: 1;
}

.shg-search-section-head--tracks {
  margin-top: 4px;
}

.shg-search-albums {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 10px 10px 12px;
  border-bottom: 1px solid var(--border);
  cursor: grab;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  direction: rtl;
}

.shg-search-albums:active {
  cursor: grabbing;
}

.shg-search-albums::-webkit-scrollbar {
  display: none;
}

.shg-search-album-card {
  width: 170px;
}

.shg-split {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--panel2);
}

.shg-split .shg-btn {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.shg-split .shg-btn:hover {
  background: rgba(255, 255, 255, 0.06);
}

.shg-split-tail {
  width: 34px;
  padding-left: 6px;
  padding-right: 6px;
}

.shg-menu {
  position: fixed;
  z-index: 9999;
  min-width: 220px;
  max-width: min(360px, calc(100vw - 16px));
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  direction: rtl;
}

.shg-menu-item {
  width: 100%;
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  border-radius: 10px;
  padding: 10px 10px;
  cursor: pointer;
  text-align: right;
  font-size: 12px;
  font-weight: 900;
}

.shg-menu-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.shg-search-badge {
  font-size: 10px;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 999px;
  margin-left: 6px;
}

/* Compact embed inside Shegerdha shell widget */
body.shg-embed-widget {
  overflow: hidden;
}

body.shg-embed-widget .shg-player {
  height: 100%;
  min-height: 0;
}

body.shg-embed-widget .shg-shell {
  height: 100%;
}

body.shg-embed-widget .shg-nav,
body.shg-embed-widget .shg-home-sections,
body.shg-embed-widget .shg-search,
body.shg-embed-widget .shg-queue,
body.shg-embed-widget .shg-lyrics-full,
body.shg-embed-widget #shg-view-playlists {
  display: none !important;
}

body.shg-embed-widget .shg-main {
  width: 100%;
}

body.shg-embed-widget .shg-sticky-controls {
  padding: 8px 10px 6px;
}

body.shg-embed-widget .shg-row {
  gap: 8px;
}

body.shg-embed-widget .shg-cover img {
  width: 52px;
  height: 52px;
}

body.shg-embed-widget .shg-title {
  font-size: 12px;
}

body.shg-embed-widget .shg-artist,
body.shg-embed-widget .shg-album {
  font-size: 10px;
}

body.shg-embed-widget .shg-lyric {
  display: none;
}

body.shg-embed-widget .shg-bottom .shg-btn:not(#shg-btn-play):not(#shg-btn-prev):not(#shg-btn-next) {
  display: none;
}

body.shg-embed-widget .shg-mid {
  padding: 0 8px 6px;
}
