#pageMarket {
  padding: 0;
  display: flex;
  flex-direction: column;
}
.market-toolbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #0b0e11;
  border-bottom: 1px solid #1f252b;
  gap: 8px;
}
.reset-btn {
  background: none;
  border: none;
  color: #848e9c;
  font-size: 14px;
  padding: 6px 8px;
  cursor: pointer;
  flex-shrink: 0;
  min-width: 44px;
  text-align: left;
}
.reset-btn:active {
  color: #f0b90b;
}
.segmented {
  display: flex;
  background: #161a1e;
  border-radius: 8px;
  padding: 3px;
  border: 1px solid #262b31;
  flex: 1;
  max-width: 220px;
  margin: 0 auto;
}
.seg-btn {
  flex: 1;
  padding: 6px 0;
  border: none;
  background: none;
  color: #848e9c;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}
.seg-btn.active {
  background: #f0b90b;
  color: #0b0e11;
}
.seg-btn:not(.active):active {
  background: #1f252b;
}
.manage-btn {
  background: none;
  border: none;
  color: #eaecef;
  font-size: 20px;
  padding: 6px 8px;
  cursor: pointer;
  flex-shrink: 0;
  min-width: 44px;
  text-align: right;
}
.manage-btn:active {
  transform: scale(0.85);
}
.manage-btn.active {
  color: #f6465d;
}
.manage-btn.hidden {
  visibility: hidden;
  pointer-events: none;
}
.market-panel-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-height: 0;
}
.market-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  will-change: opacity;
}
.market-panel.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}
.list-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 12px 12px 12px;
  min-height: 0;
}
.list-scroll::-webkit-scrollbar {
  width: 0;
}
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: #161a1e;
  border-radius: 12px;
  margin-bottom: 8px;
  border: 1px solid #1f252b;
  contain: content;
  min-height: 64px;
  transition: background 0.15s, border-color 0.3s;
}
.row:active {
  background: #1f252b;
}
.batch-mode .row {
  border-color: rgba(246, 70, 93, 0.35);
}
.row-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.row-rank {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #0b0e11;
  background: #474d57;
  flex-shrink: 0;
}
.panel-gainers .row-rank.r1 {
  background: linear-gradient(135deg, #ffd700, #ffb800);
}
.panel-gainers .row-rank.r2 {
  background: linear-gradient(135deg, #c0c0c0, #a8a8a8);
}
.panel-gainers .row-rank.r3 {
  background: linear-gradient(135deg, #cd7f32, #b87333);
}
.row-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.row-symbol {
  font-size: 15px;
  font-weight: 600;
  color: #eaecef;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-qv {
  font-size: 11px;
  color: #848e9c;
  font-variant-numeric: tabular-nums;
}
.row-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
  margin-left: 10px;
}
.row-change {
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.row-change.up {
  color: #0ecb81;
}
.row-change.down {
  color: #f6465d;
}
body.theme-red-up .row-change.up {
  color: #f6465d;
}
body.theme-red-up .row-change.down {
  color: #0ecb81;
}
.row-price {
  font-size: 12px;
  color: #848e9c;
  font-variant-numeric: tabular-nums;
}
.remove-x {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f6465d, #d9364a);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-left: 10px;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(246, 70, 93, 0.4);
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.batch-mode .remove-x {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}
.remove-x:active {
  transform: scale(0.85);
}
.sentinel {
  height: 40px;
}
