:root {
  --jukebox-wallet-control-size: 44px;
  --jukebox-wallet-gap: 6px;
  --jukebox-wallet-stack-gap: 4px;
  --jukebox-balance-panel-bg: #ffffff;
  --jukebox-balance-panel-border: #d8d8d8;
  --jukebox-balance-panel-text: #000000;
  --jukebox-balance-panel-subtext: #5f6570;
  --jukebox-balance-panel-height: 56px;
  --jukebox-balance-panel-separator: #e7e7e7;
}

.wallet-col-right {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}

.wallet-jukebox {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-sizing: border-box;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

.wallet-jukebox-main {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  min-height: var(--jukebox-wallet-control-size);
  row-gap: var(--jukebox-wallet-stack-gap);
}

.wallet-jukebox-actions {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  gap: var(--jukebox-wallet-gap);
  margin: 0;
  padding: 0;
}

.jukebox-action-btn {
  width: var(--jukebox-wallet-control-size);
  min-width: var(--jukebox-wallet-control-size);
  height: var(--jukebox-wallet-control-size);
  border-radius: 8px;
  border: 1px solid #ccc;
  background: #ffffff;
  color: #222;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  line-height: 1;
  font-weight: 900;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  box-sizing: border-box;
  transition: none !important;
  animation: none !important;
  box-shadow: none !important;
}

.jukebox-action-icon {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.jukebox-action-icon::before,
.jukebox-action-icon::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: currentColor;
  border-radius: 999px;
}

.jukebox-action-icon-plus::before,
.jukebox-action-icon-minus::before {
  width: 16px;
  height: 3px;
}

.jukebox-action-icon-plus::after {
  width: 3px;
  height: 16px;
}

.jukebox-action-icon-minus::after {
  display: none;
}

.jukebox-action-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.jukebox-action-btn:active {
  background-color: #ff8c00 !important;
  border-color: #ff8c00 !important;
  color: #ffffff !important;
  transform: scale(0.98) translateZ(0);
}

.wallet-jukebox-balances {
  width: calc((var(--jukebox-wallet-control-size) * 3) + (var(--jukebox-wallet-gap) * 2));
  min-width: calc((var(--jukebox-wallet-control-size) * 3) + (var(--jukebox-wallet-gap) * 2));
  max-width: calc((var(--jukebox-wallet-control-size) * 3) + (var(--jukebox-wallet-gap) * 2));
  min-height: var(--jukebox-balance-panel-height);
  height: var(--jukebox-balance-panel-height);
  display: grid;
  grid-template-rows: 20px 14px 14px;
  align-items: stretch;
  text-align: left;
  gap: 0;
  padding: 3px 0 2px;
  margin-top: 0;
  align-self: flex-end;
  box-sizing: border-box;
  border: 1px solid var(--jukebox-balance-panel-border);
  border-radius: 8px;
  background: var(--jukebox-balance-panel-bg);
  user-select: none;
  -webkit-user-select: none;
  transition: none !important;
  animation: none !important;
  box-shadow: none !important;
  background-clip: padding-box;
  font-variant-numeric: tabular-nums;
  text-rendering: auto;
}

.wallet-jukebox-line {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: end;
  gap: 6px;
  min-height: 0;
  height: 20px;
  padding: 0;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  color: var(--jukebox-balance-panel-text);
  white-space: nowrap;
  transform: none !important;
  box-sizing: border-box;
  margin-top: 1px;
}

.wallet-jukebox-line::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--jukebox-balance-panel-separator);
}

.wallet-jukebox-label,
#jukeboxTonBalance {
  color: inherit;
}

.wallet-jukebox-k,
.wallet-jukebox-v {
  display: inline-block;
}

.wallet-jukebox-k {
  color: inherit;
  flex: 0 0 auto;
  padding-left: 8px;
}

.wallet-jukebox-v,
#jukeboxTonBalance {
  color: inherit;
  margin-left: auto;
  padding-right: 8px;
  text-align: right;
  min-width: 0;
  justify-self: end;
}

.wallet-jukebox-meta .wallet-jukebox-k,
.wallet-jukebox-status .wallet-jukebox-k {
  font-size: 10px;
  font-weight: 700;
}

.wallet-jukebox-meta:empty,
.wallet-jukebox-status:empty {
  min-height: 0;
}

.wallet-jukebox-meta,
.wallet-jukebox-status {
  position: relative;
  min-height: 0;
  height: 14px;
  margin: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: end;
  gap: 6px;
  padding: 0;
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
  color: var(--jukebox-balance-panel-subtext);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: none;
  -webkit-user-select: none;
  transform: none !important;
  box-sizing: border-box;
}

.wallet-jukebox-meta::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--jukebox-balance-panel-separator);
}

.wallet-jukebox-line .wallet-jukebox-k,
.wallet-jukebox-line .wallet-jukebox-v,
.wallet-jukebox-line #jukeboxTonBalance {
  position: relative;
  top: 0;
}

.wallet-jukebox-meta .wallet-jukebox-k,
.wallet-jukebox-meta .wallet-jukebox-v {
  position: relative;
  top: -2px;
}

.wallet-jukebox-status .wallet-jukebox-k,
.wallet-jukebox-status .wallet-jukebox-v {
  position: relative;
  top: -3px;
}

.wallet-jukebox-meta {
  margin-top: -2px;
}

.wallet-jukebox-status {
  margin-top: -1px;
}

html[data-theme="dark"] .wallet-jukebox-balances,
body.dark .wallet-jukebox-balances,
.theme-transition-overlay .dark-scope .wallet-jukebox-balances {
  --jukebox-balance-panel-bg: #2a2c31;
  --jukebox-balance-panel-border: #3a3c42;
  --jukebox-balance-panel-text: #f1f1f1;
  --jukebox-balance-panel-subtext: #bfc4cf;
  --jukebox-balance-panel-separator: #45484f;
}

.theme-transition-overlay .light-scope .wallet-jukebox-balances {
  --jukebox-balance-panel-bg: #ffffff;
  --jukebox-balance-panel-border: #d8d8d8;
  --jukebox-balance-panel-text: #000000;
  --jukebox-balance-panel-subtext: #5f6570;
  --jukebox-balance-panel-height: 56px;
  --jukebox-balance-panel-separator: #e7e7e7;
}

html[data-theme="dark"] .wallet-jukebox-line,
body.dark .wallet-jukebox-line {
  color: var(--jukebox-balance-panel-text);
}

html[data-theme="dark"] .wallet-jukebox-meta,
html[data-theme="dark"] .wallet-jukebox-status,
body.dark .wallet-jukebox-meta,
body.dark .wallet-jukebox-status {
  color: var(--jukebox-balance-panel-subtext);
}

html[data-theme="dark"] .jukebox-action-btn,
body.dark .jukebox-action-btn {
  background: #2a2c31;
  border-color: #3a3c42;
  color: #f1f1f1;
}

body:not(.wallet-connected) .wallet-row {
  align-items: flex-start;
}

body:not(.wallet-connected) .wallet-col-left {
  flex: 0 0 calc(50% - 5px);
  max-width: calc(50% - 5px);
}

body:not(.wallet-connected) .wallet-btn {
  width: 100%;
  min-width: 0;
}

body:not(.wallet-connected) .wallet-col-right {
  display: none !important;
}

html.wallet-known body:not(.wallet-connected) .wallet-col-right,
html.wallet-known body:not(.wallet-connected) .wallet-jukebox {
  display: flex !important;
}

.wallet-jukebox,
.wallet-jukebox *,
.jukebox-action-btn,
.jukebox-action-btn *,
.theme-transition-overlay .wallet-jukebox,
.theme-transition-overlay .wallet-jukebox *,
.theme-transition-overlay .jukebox-action-btn,
.theme-transition-overlay .jukebox-action-btn * {
  animation: none !important;
  transition-property: none !important;
  transition-duration: 0s !important;
  will-change: auto !important;
}

.theme-transition-overlay .wallet-col-right,
.theme-transition-overlay .wallet-jukebox,
.theme-transition-overlay .wallet-jukebox-main,
.theme-transition-overlay .wallet-jukebox-actions,
.theme-transition-overlay .wallet-jukebox-balances {
  opacity: 1 !important;
  visibility: visible !important;
}

.theme-transition-overlay .light-scope .jukebox-action-btn {
  background: #ffffff !important;
  border-color: #ccc !important;
  color: #222 !important;
}

.theme-transition-overlay .dark-scope .jukebox-action-btn {
  background: #2a2c31 !important;
  border-color: #3a3c42 !important;
  color: #f1f1f1 !important;
}

.theme-transition-overlay .light-scope .wallet-jukebox-line {
  color: #000 !important;
}

.theme-transition-overlay .dark-scope .wallet-jukebox-line {
  color: #f1f1f1 !important;
}

.theme-transition-overlay .light-scope .wallet-jukebox-meta,
.theme-transition-overlay .light-scope .wallet-jukebox-status {
  color: #5f6570 !important;
}

.theme-transition-overlay .dark-scope .wallet-jukebox-meta,
.theme-transition-overlay .dark-scope .wallet-jukebox-status {
  color: #bfc4cf !important;
}

body.theme-animating .wallet-jukebox,
body.theme-animating .wallet-jukebox *,
body.theme-animating .jukebox-action-btn,
body.theme-animating .jukebox-action-btn * {
  transition: none !important;
  animation: none !important;
}

.no-select,
.no-select *,
#nowPlaying,
#nowPlaying *,
#jukeboxBalancePanel,
#jukeboxBalancePanel * {
  user-select: none !important;
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
}

@media (max-width: 480px) {
  :root {
    --jukebox-wallet-control-size: 44px;
    --jukebox-wallet-gap: 6px;
    --jukebox-wallet-stack-gap: 4px;
  }

  .wallet-jukebox-main {
    min-height: var(--jukebox-wallet-control-size);
    row-gap: var(--jukebox-wallet-stack-gap);
  }

  .wallet-jukebox-actions {
    gap: var(--jukebox-wallet-gap);
  }

  .jukebox-action-btn {
    width: var(--jukebox-wallet-control-size) !important;
    min-width: var(--jukebox-wallet-control-size) !important;
    height: var(--jukebox-wallet-control-size) !important;
    flex: 0 0 var(--jukebox-wallet-control-size);
  }

  .jukebox-action-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
  }
}



/* Override layout: balances aligned with wallet button, actions above on separate row */
.wallet-col-right{
  position: relative;
  align-items: flex-start !important;
}

.wallet-jukebox{
  position: relative;
  width: 100%;
  overflow: visible;
}

.wallet-jukebox-main{
  display: block !important;
  min-height: var(--jukebox-wallet-control-size);
}

.wallet-jukebox-balances{
  align-self: auto !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.wallet-jukebox-actions{
  position: absolute;
  right: 0;
  top: calc(-1 * (var(--jukebox-wallet-control-size) + 8px));
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  gap: 6px;
  margin: 0;
  z-index: 2;
}

@media (max-width: 480px) {
  .wallet-jukebox-actions{
    gap: 6px;
    top: calc(-1 * (var(--jukebox-wallet-control-size) + 8px));
  }
}



/* Final row layout fix: balances and action buttons on the same line */
.wallet-col-right{
  align-items:flex-start !important;
}

.wallet-jukebox{
  width:100% !important;
  overflow:visible !important;
}

.wallet-jukebox-main{
  display:flex !important;
  flex-direction:row !important;
  align-items:flex-start !important;
  justify-content:space-between !important;
  column-gap:12px !important;
  row-gap:0 !important;
  min-height:var(--jukebox-wallet-control-size) !important;
}

.wallet-jukebox-balances{
  order:0 !important;
  flex:1 1 auto !important;
  align-self:flex-start !important;
  margin:0 !important;
  padding:0 !important;
  min-width:0 !important;
}

.wallet-jukebox-actions{
  position:static !important;
  order:1 !important;
  flex:0 0 auto !important;
  display:flex !important;
  align-items:stretch !important;
  justify-content:flex-end !important;
  gap:8px !important;
  margin:0 0 0 auto !important;
  top:auto !important;
  right:auto !important;
  z-index:auto !important;
}

@media (max-width: 480px) {
  .wallet-jukebox-main{
    column-gap:10px !important;
  }

  .wallet-jukebox-actions{
    gap:8px !important;
  }
}



/* Jukebox wallet panel should respect the same site boundaries */
.wallet-col-right,
.wallet-jukebox,
.wallet-jukebox-main {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.wallet-jukebox-actions {
  justify-content: flex-end;
}



/* Wallet details should fill the right half fully so minus reaches the site edge */
.wallet-jukebox,
.wallet-jukebox-main {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.wallet-jukebox-main {
  display: grid !important;
  grid-template-columns: 1fr auto !important;
  align-items: start !important;
  column-gap: 8px !important;
}

.wallet-jukebox-balances {
  grid-column: 1 / 2 !important;
  width: 100% !important;
  max-width: 100% !important;
  align-self: start !important;
}

.wallet-jukebox-actions {
  grid-column: 2 / 3 !important;
  align-self: start !important;
  justify-self: end !important;
  display: flex !important;
  gap: 6px !important;
  margin: 0 !important;
}

.jukebox-action-btn:last-child {
  margin-right: 0 !important;
}

.jukebox-action-icon-history {
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 999px;
  box-sizing: border-box;
}

.jukebox-action-icon-history::before,
.jukebox-action-icon-history::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  background: currentColor;
  border-radius: 999px;
  transform-origin: center bottom;
}

.jukebox-action-icon-history::before {
  width: 2px;
  height: 6px;
  transform: translate(-50%, -100%) rotate(0deg);
}

.jukebox-action-icon-history::after {
  width: 2px;
  height: 5px;
  transform: translate(-15%, -85%) rotate(55deg);
}

.history-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  z-index: 1600;
}

.history-panel {
  position: fixed;
  left: 50%;
  top: max(10px, env(safe-area-inset-top, 0px));
  bottom: calc(8px + var(--safe-b));
  width: min(94vw, 560px);
  max-width: calc(100vw - 24px);
  max-height: none;
  height: auto;
  min-height: calc(100dvh - max(10px, env(safe-area-inset-top, 0px)) - (8px + var(--safe-b)));
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(15, 18, 25, 0.08);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
  transform: translate3d(-50%, calc(100% + 32px), 0) scale(0.985);
  opacity: 0;
  pointer-events: none;
  transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 160ms linear, top 220ms ease, max-height 220ms ease;
  z-index: 1601;
  overflow: hidden;
  touch-action: pan-y;
}

.history-panel,
.history-list,
.history-panel-header,
.history-panel-actions,
.history-item-title,
.history-item-amount,
.history-item-meta,
.history-item-ref,
.history-item-hint,
.history-item-status {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.history-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.history-panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-panel-actions button {
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.history-search-wrap {
  display: block;
  overflow: visible;
  max-height: 0;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  margin-top: 0;
  padding: 2px 8px 0 0;
  transition: max-height 220ms ease, opacity 180ms ease, transform 220ms ease, margin-top 220ms ease, padding-top 220ms ease;
}

.history-search-wrap.open {
  max-height: 72px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  margin-top: 8px;
  padding-top: 6px;
}

.history-search-field {
  position: relative;
}

.history-search-input {
  width: 100%;
  min-width: 0;
  height: 42px;
  box-sizing: border-box;
  border: 1px solid #d9dce3;
  border-radius: 12px;
  background: #ffffff;
  color: #0d1118;
  padding: 0 42px 0 14px;
  font-size: 14px;
}

.history-search-input:focus {
  outline: none;
  border-color: #3b82f6;
}

.history-search-input::-webkit-search-cancel-button,
.history-search-input::-webkit-search-decoration,
.history-search-input::-webkit-search-results-button,
.history-search-input::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.history-search-input::-ms-clear,
.history-search-input::-ms-reveal {
  display: none;
  width: 0;
  height: 0;
}

.history-search-clear-btn {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #6b7280;
  font-size: 20px;
  line-height: 1;
  display: none;
}

.history-search-wrap.has-value .history-search-clear-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.history-search-toggle-btn {
  font-size: 18px;
}

.history-panel-title {
  font-size: 16px;
  line-height: 1.1;
  font-weight: 900;
  color: #0d1118;
}

.history-close-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border: 1px solid #d9dce3;
  border-radius: 10px;
  background: #ffffff;
  color: #0d1118;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease, transform 0.08s ease;
}

.history-close-btn:focus,
.history-close-btn:focus-visible,
.history-search-toggle-btn:focus,
.history-search-toggle-btn:focus-visible {
  outline: none;
  box-shadow: none;
}

.history-close-btn:active,
.history-search-toggle-btn:active {
  background: #ff8c00 !important;
  border-color: #ff8c00 !important;
  color: #ffffff !important;
  transform: scale(0.97);
}

.history-list {
  list-style: none;
  margin: 0;
  padding: 0 8px 0 0;
  overflow: auto;
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  gap: 8px;
}


.history-item {
  list-style: none;
}

.history-item-card {
  position: relative;
}

.history-item-btn {
  padding-right: 54px;
}

.history-item-copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  min-width: 32px;
  border: 1px solid #d9dce3;
  border-radius: 10px;
  background: #ffffff;
  color: #0d1118;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease, transform 0.08s ease;
}

.history-item-copy-btn svg {
  width: 16px;
  height: 16px;
  display: block;
}

.history-item-copy-btn:focus,
.history-item-copy-btn:focus-visible {
  outline: none;
  box-shadow: none;
}

.history-item-copy-btn:active,
.history-item-copy-btn.is-copied {
  background: #ff8c00 !important;
  border-color: #ff8c00 !important;
  color: #ffffff !important;
  transform: scale(0.97);
}
.history-item-btn {
  width: 100%;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  text-align: left;
  border: 1px solid #d8dde6;
  border-radius: 14px;
  background: #ffffff;
  color: #0d1118;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: default;
  opacity: 1 !important;
  position: relative;
  overflow: hidden;
  transition: border-color 0.18s ease, background-color 0.18s ease;
  outline: none;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-focus-ring-color: transparent;
}

.history-item-btn:focus,
.history-item-btn:active,
.history-item-btn:focus-visible {
  outline: none;
  box-shadow: none;
}

.history-item-resumable {
  cursor: pointer;
}

.history-item-resumable:hover,
.history-item-resumable:focus-visible,
.history-item-resumable:active,
.history-item-resumable.is-active {
  border-color: #3b82f6;
  background: #ffffff;
  box-shadow: none;
}

.history-item-title {
  font-size: 14px;
  font-weight: 900;
  line-height: 1.15;
}

.history-kind-positive {
  color: #16a34a;
}

.history-kind-withdraw-request {
  color: #8b5cf6;
}

.history-kind-review {
  color: #b8860b;
}

.history-kind-info {
  color: #2563eb;
}

.history-kind-neutral {
  color: #10b981;
}

.history-item-amount {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.15;
  color: #ff8c00;
}

.history-item-meta,
.history-item-ref,
.history-item-hint,
.history-item-empty {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  color: #667085;
}

.history-item-status {
  font-weight: 800;
}

.history-status-pending,
.history-status-failed {
  color: #dc2626;
}

.history-status-completed {
  color: #16a34a;
}

.history-item-hint {
  display: block;
  margin-top: -1px;
  color: #b8860b;
}

.history-item-ref {
  display: block;
  margin-top: -1px;
}

.history-item-empty {
  padding: 8px 2px 2px;
}

.history-search-mark {
  background: rgba(255, 228, 104, 0.7);
  color: inherit;
  border-radius: 4px;
  padding: 0 2px;
}

body.history-open,
html.history-open {
  overflow: hidden;
  overscroll-behavior-y: none;
}

body.history-open .history-overlay {
  opacity: 1;
  pointer-events: auto;
}

body.history-open .history-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(-50%, 0, 0) scale(1);
}


body.history-search-open .history-panel,
html.history-search-open .history-panel {
  top: max(10px, env(safe-area-inset-top, 0px));
  bottom: calc(8px + var(--safe-b));
  max-height: none;
}

@media (max-width: 640px) {
  body.history-search-open .history-panel,
  html.history-search-open .history-panel {
    top: max(10px, env(safe-area-inset-top, 0px));
    bottom: calc(8px + var(--safe-b));
  }
}

body.history-opening .history-panel,
html.history-opening .history-panel {
  transition-duration: 320ms, 220ms;
}

body.history-closing .history-panel,
html.history-closing .history-panel {
  pointer-events: none;
  transition-duration: 220ms, 160ms;
}

body.history-opening .history-overlay,
html.history-opening .history-overlay {
  transition-duration: 220ms;
}

body.history-closing .history-overlay,
html.history-closing .history-overlay {
  pointer-events: none;
  transition-duration: 180ms;
}

html[data-theme="dark"] .history-panel,
body.dark .history-panel {
  background: rgba(28, 31, 37, 0.96);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.42);
}


html[data-theme="dark"] .history-panel-title,
body.dark .history-panel-title,
html[data-theme="dark"] .history-item-btn,
body.dark .history-item-btn,

html[data-theme="dark"] .history-item-copy-btn,
body.dark .history-item-copy-btn {
  background: #2a2c31;
  border-color: #3a3c42;
  color: #f5f7fb;
}

html[data-theme="dark"] .history-close-btn,
body.dark .history-close-btn {
  color: #f5f7fb;
}

html[data-theme="dark"] .history-close-btn,
body.dark .history-close-btn,
html[data-theme="dark"] .history-item-btn,
body.dark .history-item-btn,
html[data-theme="dark"] .history-search-input,
body.dark .history-search-input {
  background: #2a2c31;
  border-color: #3a3c42;
}

html[data-theme="dark"] .history-item-meta,
html[data-theme="dark"] .history-item-ref,
html[data-theme="dark"] .history-item-hint,
html[data-theme="dark"] .history-item-empty,
body.dark .history-item-meta,
body.dark .history-item-ref,
body.dark .history-item-hint,
body.dark .history-item-empty {
  color: #bfc4cf;
}

body.history-open #tracksToggle,
body.history-open #playlistsToggle {
  z-index: 1500;
}

@media (max-width: 640px) {
  .history-panel {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    top: max(8px, env(safe-area-inset-top, 0px));
    bottom: calc(8px + var(--safe-b));
    min-height: calc(100dvh - max(8px, env(safe-area-inset-top, 0px)) - (8px + var(--safe-b)));
    padding: 12px;
    border-radius: 18px 18px 16px 16px;
  }
}


/* final wallet/history layout overrides */
.wallet-col-right {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: flex-end !important;
}

.wallet-col-right .wallet-jukebox {
  width: 100% !important;
  min-width: 0 !important;
}

.wallet-col-right .wallet-jukebox-main {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  justify-content: flex-start !important;
  row-gap: 6px !important;
  column-gap: 0 !important;
  width: 100% !important;
  min-height: 0 !important;
}

.wallet-col-right .wallet-jukebox-actions {
  position: static !important;
  order: 1 !important;
  display: flex !important;
  align-items: stretch !important;
  justify-content: flex-end !important;
  gap: 6px !important;
  width: calc((var(--jukebox-wallet-control-size) * 3) + 12px) !important;
  max-width: calc((var(--jukebox-wallet-control-size) * 3) + 12px) !important;
  margin: 2px 0 0 auto !important;
  top: auto !important;
  right: auto !important;
}

.wallet-col-right .wallet-jukebox-balances,
.wallet-col-right #jukeboxBalancePanel {
  order: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  justify-content: flex-start !important;
  align-self: flex-end !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 0 0 auto !important;
  padding: 0 !important;
  text-align: right !important;
}

.wallet-col-right .wallet-jukebox-line {
  justify-content: flex-end !important;
}

.history-panel {
  width: var(--site-visual-width) !important;
  max-width: var(--site-max-width) !important;
  box-sizing: border-box !important;
}


/* align labels to the left edge of the history button while values stay on the right */
.wallet-col-right .wallet-jukebox-balances,
.wallet-col-right #jukeboxBalancePanel {
  width: calc((var(--jukebox-wallet-control-size) * 3) + 12px) !important;
  max-width: calc((var(--jukebox-wallet-control-size) * 3) + 12px) !important;
  margin: 0 0 2px auto !important;
}

.wallet-col-right .wallet-jukebox-line,
.wallet-col-right .wallet-jukebox-meta,
.wallet-col-right .wallet-jukebox-status {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: center !important;
  justify-content: stretch !important;
  text-align: left !important;
}

.wallet-col-right .wallet-jukebox-line .wallet-jukebox-label,
.wallet-col-right .wallet-jukebox-k {
  justify-self: start !important;
  text-align: left !important;
}

.wallet-col-right #jukeboxTonBalance,
.wallet-col-right .wallet-jukebox-v {
  justify-self: end !important;
  text-align: right !important;
}

.wallet-col-right .wallet-jukebox-meta,
.wallet-col-right .wallet-jukebox-status {
  gap: 6px !important;
}




/* balance panel spacing and separators */
.wallet-jukebox-balances,
#jukeboxBalancePanel {
  --jukebox-balance-panel-separator: rgba(95, 101, 112, 0.18);
}


.wallet-jukebox-line .wallet-jukebox-k,
.wallet-jukebox-line .wallet-jukebox-v,
.wallet-jukebox-line #jukeboxTonBalance {
  position: relative;
  top: 0;
}

.wallet-jukebox-meta .wallet-jukebox-k,
.wallet-jukebox-meta .wallet-jukebox-v,
.wallet-jukebox-status .wallet-jukebox-k,
.wallet-jukebox-status .wallet-jukebox-v {
  position: relative;
}

.wallet-jukebox-line {
  margin-top: 1px;
}

.wallet-jukebox-line::after {
  bottom: 0;
}

.wallet-jukebox-meta {
  margin-top: -2px;
}

.wallet-jukebox-meta::after {
  bottom: 0;
}

.wallet-jukebox-meta .wallet-jukebox-k,
.wallet-jukebox-meta .wallet-jukebox-v {
  top: -2px;
}

.wallet-jukebox-status {
  margin-top: -1px;
}

.wallet-jukebox-status .wallet-jukebox-k,
.wallet-jukebox-status .wallet-jukebox-v {
  top: -3px;
}

html[data-theme="dark"] .wallet-jukebox-balances,
body.dark .wallet-jukebox-balances,
.theme-transition-overlay .dark-scope .wallet-jukebox-balances {
  --jukebox-balance-panel-separator: rgba(191, 196, 207, 0.16);
}

.theme-transition-overlay .light-scope .wallet-jukebox-balances {
  --jukebox-balance-panel-separator: rgba(95, 101, 112, 0.18);
}

.wallet-col-right .wallet-jukebox-balances,
.wallet-col-right #jukeboxBalancePanel {
  padding: 6px 10px !important;
}

.wallet-col-right .wallet-jukebox-line,
.wallet-col-right .wallet-jukebox-meta,
.wallet-col-right .wallet-jukebox-status {
  padding: 3px 2px !important;
  box-sizing: border-box !important;
}

.wallet-col-right .wallet-jukebox-meta,
.wallet-col-right .wallet-jukebox-status {
  border-top: 1px solid var(--jukebox-balance-panel-separator) !important;
}


.wallet-btn {
  min-height: var(--jukebox-balance-panel-height) !important;
  height: var(--jukebox-balance-panel-height) !important;
  padding: 0 14px !important;
  font-size: 16px !important;
  line-height: 1 !important;
  box-sizing: border-box !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: none !important;
  animation: none !important;
  -webkit-font-smoothing: antialiased;
}

.wallet-btn,
.wallet-btn * {
  transition: none !important;
  animation: none !important;
  will-change: auto !important;
}

@media (max-width: 480px) {
  .wallet-btn {
    font-size: 15px !important;
    padding: 0 14px !important;
  }
}


/* precise internal spacing for TON / Frozen / Pending */
.wallet-col-right .wallet-jukebox-balances,
.wallet-col-right #jukeboxBalancePanel {
  padding: 0 !important;
  display: grid !important;
  grid-template-rows: 20px 18px 18px !important;
  align-content: stretch !important;
}

.wallet-col-right .wallet-jukebox-line,
.wallet-col-right .wallet-jukebox-meta,
.wallet-col-right .wallet-jukebox-status {
  position: relative !important;
  min-height: 0 !important;
  height: 100% !important;
  padding-left: 10px !important;
  padding-right: 10px !important;
  box-sizing: border-box !important;
  transform: none !important;
  -webkit-transform: none !important;
  line-height: 1 !important;
  border-bottom: 0 !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  gap: 6px !important;
}

.wallet-col-right .wallet-jukebox-line {
  align-items: end !important;
  padding-top: 0 !important;
  padding-bottom: 1px !important;
}

.wallet-col-right .wallet-jukebox-meta {
  align-items: end !important;
  padding-top: 0 !important;
  padding-bottom: 2px !important;
}

.wallet-col-right .wallet-jukebox-status {
  align-items: end !important;
  padding-top: 0 !important;
  padding-bottom: 4px !important;
}

.wallet-col-right .wallet-jukebox-line::after,
.wallet-col-right .wallet-jukebox-meta::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  height: 1px;
  background: var(--jukebox-balance-panel-separator);
  pointer-events: none;
}

.wallet-col-right .wallet-jukebox-line::after {
  bottom: -1px !important;
}

.wallet-col-right .wallet-jukebox-meta::after {
  bottom: 2px !important;
}

.wallet-col-right .wallet-jukebox-meta,
.wallet-col-right .wallet-jukebox-status {
  border-top: 0 !important;
  margin-top: 0 !important;
}

.wallet-col-right .wallet-jukebox-line .wallet-jukebox-label,
.wallet-col-right .wallet-jukebox-k,
.wallet-col-right #jukeboxTonBalance,
.wallet-col-right .wallet-jukebox-v {
  align-self: end !important;
  line-height: 1 !important;
}

.wallet-col-right .wallet-jukebox-line .wallet-jukebox-k,
.wallet-col-right .wallet-jukebox-line #jukeboxTonBalance {
  position: relative !important;
  top: 1px !important;
}

.wallet-col-right .wallet-jukebox-meta .wallet-jukebox-k,
.wallet-col-right .wallet-jukebox-meta .wallet-jukebox-v {
  position: relative !important;
  top: -2px !important;
}

.wallet-col-right .wallet-jukebox-status .wallet-jukebox-k,
.wallet-col-right .wallet-col-right .wallet-jukebox-status .wallet-jukebox-v,
.wallet-col-right .wallet-jukebox-status .wallet-jukebox-v {
  position: relative !important;
  top: -1px !important;
}

/* final balance-panel alignment fix */
.wallet-jukebox-balances,
#jukeboxBalancePanel {
  padding: 5px 8px 4px !important;
  box-sizing: border-box !important;
}

.wallet-jukebox-line,
.wallet-jukebox-meta,
.wallet-jukebox-status,
.wallet-col-right .wallet-jukebox-line,
.wallet-col-right .wallet-jukebox-meta,
.wallet-col-right .wallet-jukebox-status {
  width: 100% !important;
  padding: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box !important;
  gap: 6px !important;
}

.wallet-jukebox-line::after,
.wallet-jukebox-meta::after,
.wallet-col-right .wallet-jukebox-line::after,
.wallet-col-right .wallet-jukebox-meta::after {
  left: 0 !important;
  right: 0 !important;
  width: auto !important;
}

.wallet-jukebox-k,
.wallet-col-right .wallet-jukebox-k {
  padding-left: 0 !important;
}

.wallet-jukebox-meta .wallet-jukebox-k,
.wallet-jukebox-status .wallet-jukebox-k,
.wallet-col-right .wallet-jukebox-meta .wallet-jukebox-k,
.wallet-col-right .wallet-jukebox-status .wallet-jukebox-k {
  padding-left: 0 !important;
  margin-left: 0 !important;
  justify-self: start !important;
  text-align: left !important;
  font-size: 10px !important;
  font-weight: 700 !important;
}

.wallet-jukebox-meta .wallet-jukebox-v,
.wallet-jukebox-status .wallet-jukebox-v,
.wallet-col-right .wallet-jukebox-meta .wallet-jukebox-v,
.wallet-col-right .wallet-jukebox-status .wallet-jukebox-v {
  padding-right: 0 !important;
  justify-self: end !important;
  text-align: right !important;
  font-size: 10px !important;
  font-weight: 700 !important;
}

.wallet-jukebox-line {
  margin-top: 1px !important;
}

.wallet-jukebox-meta {
  margin-top: -1px !important;
}

.wallet-jukebox-meta .wallet-jukebox-k,
.wallet-jukebox-meta .wallet-jukebox-v {
  top: -1px !important;
}

.wallet-jukebox-status {
  margin-top: -3px !important;
}

.wallet-jukebox-status .wallet-jukebox-k,
.wallet-jukebox-status .wallet-jukebox-v {
  top: -4px !important;
}

/* absolute full-width separators and row alignment fix */
.wallet-col-right .wallet-jukebox-balances,
.wallet-col-right #jukeboxBalancePanel {
  position: relative !important;
  padding: 5px 8px 4px !important;
  display: grid !important;
  grid-template-rows: 19px 14px 14px !important;
  align-content: start !important;
}

.wallet-col-right .wallet-jukebox-balances::before,
.wallet-col-right .wallet-jukebox-balances::after,
.wallet-col-right #jukeboxBalancePanel::before,
.wallet-col-right #jukeboxBalancePanel::after {
  content: '';
  position: absolute;
  left: 8px;
  right: 8px;
  height: 1px;
  background: var(--jukebox-balance-panel-separator);
  pointer-events: none;
}

.wallet-col-right .wallet-jukebox-balances::before,
.wallet-col-right #jukeboxBalancePanel::before {
  top: 24px;
}

.wallet-col-right .wallet-jukebox-balances::after,
.wallet-col-right #jukeboxBalancePanel::after {
  top: 39px;
}

.wallet-col-right .wallet-jukebox-line::after,
.wallet-col-right .wallet-jukebox-meta::after,
.wallet-col-right .wallet-jukebox-status::after,
.wallet-col-right .wallet-jukebox-line::before,
.wallet-col-right .wallet-jukebox-meta::before,
.wallet-col-right .wallet-jukebox-status::before {
  display: none !important;
  content: none !important;
}

.wallet-col-right .wallet-jukebox-line,
.wallet-col-right .wallet-jukebox-meta,
.wallet-col-right .wallet-jukebox-status {
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-end !important;
  box-sizing: border-box !important;
}

.wallet-col-right .wallet-jukebox-line {
  padding-top: 5px !important;
}

.wallet-col-right .wallet-jukebox-meta {
  padding-top: 2px !important;
}

.wallet-col-right .wallet-jukebox-status {
  padding-top: 0 !important;
  transform: translateY(-2px) !important;
  -webkit-transform: translateY(-2px) !important;
}

.wallet-col-right .wallet-jukebox-label,
.wallet-col-right .wallet-jukebox-k {
  padding-left: 0 !important;
  margin-left: 0 !important;
  text-align: left !important;
  justify-self: start !important;
}

.wallet-col-right #jukeboxTonBalance,
.wallet-col-right .wallet-jukebox-v {
  padding-right: 0 !important;
  margin-right: 0 !important;
  text-align: right !important;
  justify-self: end !important;
}

.wallet-col-right .wallet-jukebox-meta,
.wallet-col-right .wallet-jukebox-status,
.wallet-col-right .wallet-jukebox-meta .wallet-jukebox-k,
.wallet-col-right .wallet-jukebox-status .wallet-jukebox-k,
.wallet-col-right .wallet-jukebox-meta .wallet-jukebox-v,
.wallet-col-right .wallet-jukebox-status .wallet-jukebox-v {
  font-size: 10px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}

/* strict final balance panel geometry */
.wallet-col-right .wallet-jukebox-balances,
.wallet-col-right #jukeboxBalancePanel {
  position: relative !important;
  display: block !important;
  min-height: var(--jukebox-balance-panel-height) !important;
  height: var(--jukebox-balance-panel-height) !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.wallet-col-right .wallet-jukebox-balances::before,
.wallet-col-right .wallet-jukebox-balances::after,
.wallet-col-right #jukeboxBalancePanel::before,
.wallet-col-right #jukeboxBalancePanel::after {
  content: '' !important;
  position: absolute !important;
  left: 8px !important;
  right: 8px !important;
  height: 1px !important;
  background: var(--jukebox-balance-panel-separator) !important;
  pointer-events: none !important;
}

/* keep separator spacing, shift pair upward a bit to look centered */
.wallet-col-right .wallet-jukebox-balances::before,
.wallet-col-right #jukeboxBalancePanel::before {
  top: 21px !important;
}

.wallet-col-right .wallet-jukebox-balances::after,
.wallet-col-right #jukeboxBalancePanel::after {
  top: 36px !important;
}

.wallet-col-right .wallet-jukebox-line,
.wallet-col-right .wallet-jukebox-meta,
.wallet-col-right .wallet-jukebox-status,
.wallet-col-right #jukeboxBalancePanel .wallet-jukebox-line,
.wallet-col-right #jukeboxBalancePanel .wallet-jukebox-meta,
.wallet-col-right #jukeboxBalancePanel .wallet-jukebox-status {
  position: absolute !important;
  left: 8px !important;
  right: 8px !important;
  width: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  -webkit-transform: none !important;
  line-height: 1 !important;
}

/* 3px gap from TON text baseline block to separator below */
.wallet-col-right .wallet-jukebox-line,
.wallet-col-right #jukeboxBalancePanel .wallet-jukebox-line {
  top: 7px !important;
  height: 11px !important;
  font-size: 14px !important;
  font-weight: 900 !important;
}

/* 3px gap from Frozen row to separator below */
.wallet-col-right .wallet-jukebox-meta,
.wallet-col-right #jukeboxBalancePanel .wallet-jukebox-meta {
  top: 24px !important;
  height: 9px !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  color: var(--jukebox-balance-panel-subtext) !important;
}

.wallet-col-right .wallet-jukebox-status,
.wallet-col-right #jukeboxBalancePanel .wallet-jukebox-status {
  top: 40px !important;
  height: 10px !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  color: var(--jukebox-balance-panel-subtext) !important;
}

.wallet-col-right .wallet-jukebox-line::before,
.wallet-col-right .wallet-jukebox-line::after,
.wallet-col-right .wallet-jukebox-meta::before,
.wallet-col-right .wallet-jukebox-meta::after,
.wallet-col-right .wallet-jukebox-status::before,
.wallet-col-right .wallet-jukebox-status::after,
.wallet-col-right #jukeboxBalancePanel .wallet-jukebox-line::before,
.wallet-col-right #jukeboxBalancePanel .wallet-jukebox-line::after,
.wallet-col-right #jukeboxBalancePanel .wallet-jukebox-meta::before,
.wallet-col-right #jukeboxBalancePanel .wallet-jukebox-meta::after,
.wallet-col-right #jukeboxBalancePanel .wallet-jukebox-status::before,
.wallet-col-right #jukeboxBalancePanel .wallet-jukebox-status::after {
  display: none !important;
  content: none !important;
}

.wallet-col-right .wallet-jukebox-label,
.wallet-col-right .wallet-jukebox-k,
.wallet-col-right #jukeboxTonBalance,
.wallet-col-right .wallet-jukebox-v,
.wallet-col-right #jukeboxBalancePanel .wallet-jukebox-label,
.wallet-col-right #jukeboxBalancePanel .wallet-jukebox-k,
.wallet-col-right #jukeboxBalancePanel #jukeboxTonBalance,
.wallet-col-right #jukeboxBalancePanel .wallet-jukebox-v {
  display: inline-block !important;
  margin: 0 !important;
  padding: 0 !important;
  position: static !important;
  top: auto !important;
  bottom: auto !important;
  transform: none !important;
  -webkit-transform: none !important;
}

.wallet-col-right .wallet-jukebox-label,
.wallet-col-right .wallet-jukebox-k,
.wallet-col-right #jukeboxBalancePanel .wallet-jukebox-label,
.wallet-col-right #jukeboxBalancePanel .wallet-jukebox-k {
  text-align: left !important;
}

.wallet-col-right #jukeboxTonBalance,
.wallet-col-right .wallet-jukebox-v,
.wallet-col-right #jukeboxBalancePanel #jukeboxTonBalance,
.wallet-col-right #jukeboxBalancePanel .wallet-jukebox-v {
  margin-left: auto !important;
  text-align: right !important;
  justify-self: end !important;
}

/* final nudge: raise Pending row slightly */
.wallet-col-right .wallet-jukebox-status {
  padding-top: 0 !important;
  padding-bottom: 5px !important;
}

.wallet-col-right .wallet-jukebox-status .wallet-jukebox-k,
.wallet-col-right .wallet-jukebox-status .wallet-jukebox-v {
  top: -4px !important;
}

.wallet-jukebox-balances,
.wallet-jukebox-line,
.wallet-jukebox-meta,
.wallet-jukebox-status,
#jukeboxTonBalance {
  text-rendering: auto !important;
  font-kerning: none !important;
}

/* ===== FIREFOX STABILITY FIX FOR JUKEBOX BALANCE BLOCK ===== */
@supports (-moz-appearance: none) {
  .wallet-col-right,
  .wallet-jukebox,
  .wallet-jukebox-main,
  .wallet-jukebox-actions,
  .wallet-jukebox-balances,
  #jukeboxBalancePanel,
  .wallet-jukebox-line,
  .wallet-jukebox-meta,
  .wallet-jukebox-status,
  .jukebox-action-btn,
  .jukebox-action-icon,
  .jukebox-action-icon::before,
  .jukebox-action-icon::after {
    transform: none !important;
    -webkit-transform: none !important;
    backface-visibility: visible !important;
    -webkit-backface-visibility: visible !important;
    will-change: auto !important;
    contain: none !important;
    animation: none !important;
    transition-property: background-color, border-color, color, opacity !important;
    transition-duration: 0s !important;
  }

  .wallet-jukebox-balances,
  #jukeboxBalancePanel,
  .wallet-jukebox-line,
  .wallet-jukebox-meta,
  .wallet-jukebox-status,
  #jukeboxTonBalance {
    text-rendering: auto !important;
    font-kerning: none !important;
  }

  .wallet-jukebox-actions {
    justify-content: stretch !important;
  }

  .wallet-jukebox-line {
    grid-template-columns: 34px minmax(0, 1fr) !important;
    gap: 6px !important;
  }

  .wallet-jukebox-meta,
  .wallet-jukebox-status {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
}

/* ===== FIREFOX ICON RENDER FIX (history / plus / minus) ===== */
@supports (-moz-appearance: none) {
  .jukebox-action-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important;
  }

  .jukebox-action-icon {
    position: relative !important;
    display: block !important;
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    flex: 0 0 18px !important;
    box-sizing: border-box !important;
  }

  .jukebox-action-icon::before,
  .jukebox-action-icon::after {
    content: '' !important;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    display: block !important;
    background: currentColor !important;
    border-radius: 999px !important;
    pointer-events: none !important;
  }

  .jukebox-action-icon-plus::before,
  .jukebox-action-icon-minus::before {
    width: 14px !important;
    height: 2px !important;
    transform: translate(-50%, -50%) !important;
  }

  .jukebox-action-icon-plus::after {
    width: 2px !important;
    height: 14px !important;
    transform: translate(-50%, -50%) !important;
  }

  .jukebox-action-icon-minus::after {
    display: none !important;
  }

  .jukebox-action-icon-history {
    border: 2px solid currentColor !important;
    border-radius: 999px !important;
    background: transparent !important;
  }

  .jukebox-action-icon-history::before {
    width: 2px !important;
    height: 5px !important;
    transform: translate(-50%, -95%) !important;
    transform-origin: center bottom !important;
  }

  .jukebox-action-icon-history::after {
    width: 2px !important;
    height: 4px !important;
    transform: translate(-8%, -82%) rotate(55deg) !important;
    transform-origin: center bottom !important;
  }
}

@media (max-width: 600px) {
  html[data-lang="ru"] body:not(.wallet-connected) #walletConnectBtn.wallet-btn {
    font-size: 13px !important;
  }
}
html[data-theme="dark"] .history-item-resumable:hover,
html[data-theme="dark"] .history-item-resumable:focus-visible,
html[data-theme="dark"] .history-item-resumable:active,
html[data-theme="dark"] .history-item-resumable.is-active,
body.dark .history-item-resumable:hover,
body.dark .history-item-resumable:focus-visible,
body.dark .history-item-resumable:active,
body.dark .history-item-resumable.is-active {
  border-color: #ff8c00;
  background: transparent !important;
  box-shadow: none !important;
  filter: none !important;
}

html[data-theme="dark"] .history-item-resumable,
body.dark .history-item-resumable {
  background: transparent;
}

html[data-theme="dark"] .history-search-clear-btn,
body.dark .history-search-clear-btn {
  color: #bfc4cf;
}

html[data-theme="dark"] .history-search-mark,
body.dark .history-search-mark {
  background: rgba(250, 204, 21, 0.32);
}

body.history-opening .history-panel,
html.history-opening .history-panel {
  transform: translate3d(-50%, 0, 0) scale(1);
}

body.history-closing .history-panel,
html.history-closing .history-panel {
  transform: translate3d(-50%, 100dvh, 0) scale(0.985);
  opacity: 0.01;
}


/* v1.0.31 history resumable light theme tint */
html:not([data-theme="dark"]) .history-item-btn.history-item-resumable:not(:disabled),
body:not(.dark) .history-item-btn.history-item-resumable:not(:disabled) {
  background: rgba(15, 18, 25, 0.04);
  border-color: rgba(15, 18, 25, 0.08);
}

html:not([data-theme="dark"]) .history-item-btn.history-item-resumable:not(:disabled):hover,
body:not(.dark) .history-item-btn.history-item-resumable:not(:disabled):hover {
  background: rgba(15, 18, 25, 0.06);
}


/* v3.24 make Connect Wallet width align to GATE right edge */
.wallet-col-left #walletConnectBtn.wallet-btn,
.wallet-col-left #walletConnectBtn {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  box-sizing: border-box !important;
  display: flex !important;
}

.wallet-col-left {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
}

.wallet-col-left .wallet-btn {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
}


/* v3.25 make Connect Wallet right edge align with GATE */
#walletConnectBtn{
  grid-column: 1 / 3 !important;
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box !important;
}





/* v3.27 precise Connect Wallet width behavior */
body.wallet-connected .wallet-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 10px !important;
  align-items: start !important;
}

body.wallet-connected .wallet-col-left {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  grid-column: 1 / 2 !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  align-items: start !important;
}

body.wallet-connected #walletConnectBtn,
body.wallet-connected .wallet-col-left .wallet-btn {
  grid-column: 1 / 3 !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

body:not(.wallet-connected) .wallet-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 10px !important;
  align-items: start !important;
}

body:not(.wallet-connected) .wallet-col-left {
  grid-column: 1 / 2 !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
}

body:not(.wallet-connected) #walletConnectBtn,
body:not(.wallet-connected) .wallet-col-left .wallet-btn {
  grid-column: auto !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}


/* v4.4.47 connected wallet: TON/GATE pair matches Connect Wallet width only when connected */
body.wallet-connected .wallet-col-left .mode-switch-inline,
body.wallet-connected .wallet-col-left .mode-switch {
  align-self: stretch !important;
  justify-self: stretch !important;
  box-sizing: border-box !important;
}

body.wallet-connected .wallet-col-left .mode-switch-inline .mode-btn,
body.wallet-connected .wallet-col-left .mode-switch .mode-btn {
  min-width: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}


/* v4.4.49 connected wallet: TON/GATE pair exactly spans Connect Wallet width with the same inner gap as +/- */
body.wallet-connected .wallet-col-left .mode-switch-inline,
body.wallet-connected .wallet-col-left .mode-switch {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: var(--jukebox-wallet-gap) !important;
  margin-top: 10px !important;
  box-sizing: border-box !important;
}

body.wallet-connected .wallet-col-left .mode-switch-inline .mode-btn,
body.wallet-connected .wallet-col-left .mode-switch .mode-btn {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  box-sizing: border-box !important;
}


/* walletfix9: hide TON/GATE when wallet disconnected */
body:not(.wallet-connected) #tonModeBtn,
body:not(.wallet-connected) #gateModeBtn{
  display:none !important;
}

body:not(.wallet-connected) .mode-switch{
  display:none !important;
}

/* spacing between Connect Wallet and Playlists */
body:not(.wallet-connected) .wallet-btn{
  margin-right:10px !important;
}
