#stock-list .stock-card-head {
  --stock-card-min-h: clamp(72px, calc(13.6px + 16vw), 80px);
  --stock-pad-block: clamp(9px, calc(-4.6px + 4vw), 11px);
  --stock-pad-inline: clamp(5px, calc(-8px + 4vw), 10px);
  --stock-logo-w: clamp(58px, calc(-6px + 20vw), 72px);
  --stock-content-h: clamp(43px, calc(-14.4px + 16vw), 52px);
  --stock-price-w: clamp(88px, calc(-76px + 44vw), 112px);
  --stock-gap: clamp(2px, calc(-25.6px + 8vw), 8px);
  --stock-title-h: clamp(19px, calc(-3.4px + 6vw), 22px);
  --stock-sub-h: clamp(12px, calc(-2.6px + 4vw), 14px);
  --stock-meta-h: clamp(12px, calc(-8.4px + 6vw), 16px);
  --stock-name-size: clamp(13px, calc(2.14px + 2.8vw), 15px);
  --stock-sub-size: clamp(10.8px, calc(-1.5px + 3vw), 11.5px);
  --stock-price-size: clamp(13px, calc(-10.8px + 7vw), 17.5px);
  --stock-change-size: clamp(12px, calc(-3.66px + 4.4vw), 14.5px);
  --stock-change-line-h: calc(var(--stock-content-h) - var(--stock-title-h));
  box-sizing: border-box !important;
  min-height: var(--stock-card-min-h) !important;
  padding: var(--stock-pad-block) var(--stock-pad-inline) !important;
  grid-template-columns: var(--stock-logo-w) minmax(0, 1fr) var(--stock-price-w) 10px !important;
  grid-template-rows: var(--stock-content-h) !important;
  grid-template-areas: "logo name price toggle" !important;
  column-gap: var(--stock-gap) !important;
  align-items: start !important;
}

#stock-list .stock-card .stock-logo,
#stock-list .stock-card.is-expanded .stock-logo {
  box-sizing: border-box !important;
  width: var(--stock-logo-w) !important;
  height: auto !important;
  aspect-ratio: 3 / 2;
  margin: 0 !important;
  align-self: center !important;
}

#stock-list .stock-card .stock-name-block,
#stock-list .stock-card:not(.is-expanded) .stock-name-block {
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: var(--stock-content-h) !important;
  height: var(--stock-content-h) !important;
  grid-template-rows: var(--stock-title-h) var(--stock-sub-h) var(--stock-meta-h) !important;
  grid-template-areas: "title" "ticker" "dividend" !important;
  align-content: start !important;
  align-self: start !important;
  gap: 0 !important;
  overflow: visible !important;
}

#stock-list .stock-card .stock-title-line,
#stock-list .stock-card .stock-title-line.is-compact,
#stock-list .stock-card .stock-title-line.is-ultra-compact {
  display: flex !important;
  width: 100% !important;
  min-width: 0 !important;
  height: var(--stock-title-h) !important;
  grid-area: title !important;
  align-items: center !important;
  gap: clamp(2px, calc(-6px + 2.5vw), 3px) !important;
  overflow: visible !important;
  white-space: nowrap !important;
}

#stock-list .stock-card .stock-title-line .stock-name,
#stock-list .stock-card .stock-title-line.is-compact .stock-name,
#stock-list .stock-card .stock-title-line.is-ultra-compact .stock-name,
#stock-list .stock-card .stock-name.is-long-name {
  flex: 0 0 auto !important;
  align-self: start !important;
  min-width: 0 !important;
  overflow: visible !important;
  font-size: var(--stock-name-size) !important;
  font-weight: 850 !important;
  line-height: var(--stock-title-h) !important;
  white-space: nowrap !important;
}

#stock-list .stock-card .stock-theme,
#stock-list .stock-card .stock-title-line.is-compact .stock-theme,
#stock-list .stock-card .stock-title-line.is-ultra-compact .stock-theme {
  display: inline-flex;
  flex: 0 0 auto !important;
  height: var(--stock-title-h) !important;
  align-self: start !important;
  padding: 0 !important;
  color: #6b7684 !important;
  font-size: var(--stock-sub-size) !important;
  font-weight: 700 !important;
  line-height: var(--stock-title-h) !important;
  white-space: nowrap !important;
}

#stock-list .stock-card .stock-ticker,
#stock-list .stock-card:not(.is-expanded) .stock-name-block > .stock-ticker {
  grid-area: ticker !important;
  width: auto !important;
  min-width: 0 !important;
  height: var(--stock-sub-h) !important;
  margin: 0 !important;
  padding-left: 0 !important;
  align-self: start !important;
  overflow: visible !important;
  font-size: var(--stock-sub-size) !important;
  line-height: var(--stock-sub-h) !important;
  white-space: nowrap !important;
}

#stock-list .stock-card .stock-name-block > .stock-meta-row,
#stock-list .stock-card .stock-name-block > .stock-meta-row > span {
  box-sizing: border-box !important;
  height: var(--stock-meta-h) !important;
  margin: 0 !important;
  padding: 0 !important;
  align-items: center !important;
  font-size: var(--stock-sub-size) !important;
  line-height: var(--stock-meta-h) !important;
  white-space: nowrap !important;
}

#stock-list .stock-card .stock-name-block > .stock-meta-row {
  grid-area: dividend !important;
  width: 100% !important;
  overflow: visible !important;
}

#stock-list .stock-card .stock-name-block > .stock-meta-row .div-badge-slot {
  display: none !important;
}

#stock-list .stock-card .stock-logo span {
  font-size: 8px !important;
}

#stock-list .stock-card .stock-price-block {
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: var(--stock-content-h) !important;
  height: var(--stock-content-h) !important;
  grid-template-rows: var(--stock-title-h) var(--stock-change-line-h) !important;
  align-content: start !important;
  justify-items: end !important;
  align-self: start !important;
  overflow: visible !important;
}

#stock-list .stock-card .stock-price-line {
  display: grid !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: var(--stock-title-h) !important;
  min-height: 0 !important;
  max-height: var(--stock-title-h) !important;
  grid-template-columns: 10px minmax(0, 1fr) !important;
  align-items: center !important;
  justify-content: end !important;
  justify-self: end !important;
  align-self: start !important;
  overflow: visible !important;
  transform: none !important;
}

#stock-list .stock-card .stock-price {
  display: inline-flex !important;
  box-sizing: border-box !important;
  width: fit-content !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: var(--stock-title-h) !important;
  min-height: 0 !important;
  max-height: var(--stock-title-h) !important;
  padding: 0 2px !important;
  align-items: center !important;
  justify-content: flex-end !important;
  justify-self: end !important;
  overflow: hidden !important;
  border-radius: 4px !important;
  font-size: var(--stock-price-size) !important;
  font-weight: 850 !important;
  line-height: var(--stock-title-h) !important;
  white-space: nowrap !important;
}

#stock-list .stock-card .stock-change {
  width: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: var(--stock-change-line-h) !important;
  justify-self: end !important;
  overflow: visible !important;
  font-size: var(--stock-change-size) !important;
  line-height: var(--stock-change-line-h) !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
}

#stock-list .stock-card .tick-arrow {
  display: inline-block !important;
  box-sizing: border-box !important;
  width: 7px !important;
  min-width: 7px !important;
  height: 7px !important;
  margin: 0 2px 0 0 !important;
  align-self: center !important;
  overflow: visible !important;
  font-size: 0 !important;
}

#stock-list .tick-arrow.show-up::before,
#stock-list .tick-arrow.show-down::before {
  content: "" !important;
  display: block !important;
  box-sizing: border-box !important;
  width: 8px !important;
  height: 6px !important;
  border: 0 !important;
  background: currentColor !important;
  clip-path: polygon(50% 0, 100% 100%, 0 100%) !important;
  font-size: 0 !important;
}

#stock-list .tick-arrow.show-up::before {
  transform: none !important;
}

#stock-list .tick-arrow.show-down::before {
  transform: rotate(180deg) !important;
}

#panel-stocks #action-buttons {
  justify-content: center !important;
}

#panel-stocks #action-buttons button,
#panel-stocks #action-buttons button.action-primary {
  display: grid !important;
  min-height: 68px !important;
  padding: 6px !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: 32px auto auto !important;
  row-gap: 2px !important;
  place-content: center !important;
  place-items: center !important;
  overflow: hidden !important;
  border-color: #e5e8eb !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

#panel-stocks #action-buttons button::before,
#panel-stocks #action-buttons button.action-primary::before,
#panel-stocks #free-cash-btn.glow::before,
#panel-stocks #boost-btn.glow::before {
  content: "" !important;
  display: block !important;
  width: 32px !important;
  min-width: 32px !important;
  height: 32px !important;
  grid-column: 1 !important;
  grid-row: 1 !important;
  align-self: center !important;
  justify-self: center !important;
  margin: 0 !important;
  position: static !important;
  left: auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: var(--button-icon) center / contain no-repeat !important;
  background-color: transparent !important;
  filter: none !important;
  box-shadow: none !important;
}

#panel-stocks #action-buttons button::after,
#panel-stocks #action-buttons button.action-primary::after {
  display: none !important;
}

#panel-stocks #action-buttons .action-label,
#panel-stocks #action-buttons .action-status {
  grid-column: 1 !important;
  width: max-content !important;
  max-width: 100% !important;
  justify-self: center !important;
  text-align: center !important;
  white-space: nowrap !important;
  position: static !important;
  left: auto !important;
}

#panel-stocks #action-buttons .action-label {
  grid-row: 2 !important;
  align-self: center !important;
  font-size: 13.5px !important;
  line-height: 16px !important;
}

#panel-stocks #action-buttons button.has-status .action-label {
  grid-row: 2 !important;
  align-self: center !important;
}

#panel-stocks #action-buttons .action-status {
  grid-row: 3 !important;
  align-self: center !important;
  font-size: 10.5px !important;
  line-height: 13px !important;
}

#panel-stocks #action-buttons .action-status:empty {
  display: none !important;
}

#offline-double-btn,
#sell-reward-double-btn,
#daytrade-double-btn {
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

#bottom-nav .nav-btn.active,
body #bottom-nav .nav-btn.active {
  border-color: transparent !important;
  background: transparent !important;
  color: #191f28 !important;
  box-shadow: none !important;
}

#bottom-nav .nav-btn.active .nav-icon {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #191f28 !important;
  box-shadow: none !important;
}

.item-story-thumb {
  display: block;
  width: 52px;
  min-width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border: 0;
  border-radius: 8px;
  object-fit: cover;
  object-position: center;
  background: #edf5fb;
  box-shadow: none;
}

.milestone-emoji.item-story-thumb {
  width: 56px;
  min-width: 56px;
  height: 56px;
  flex-basis: 56px;
}

.scene-collection-thumb {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 7px;
  object-fit: cover;
}

#splash-start-btn {
  border: 0 !important;
}

#splash-start-btn:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.95) !important;
  outline-offset: 3px !important;
}

@media (min-width: 720px) {
  #panel-stocks #action-buttons {
    width: min(100%, 760px) !important;
    margin-inline: auto !important;
  }

  #panel-stocks #action-buttons .action-label {
    font-size: 14.5px !important;
  }
}

/* Two-column tablet cards are narrower than phone cards despite the wider viewport. */
@media (min-width: 720px) and (max-width: 899px) {
  #stock-list .stock-card-head {
    --stock-logo-w: 66px;
    --stock-content-h: 50px;
    --stock-price-w: 96px;
    --stock-gap: 4px;
    --stock-title-h: 20px;
    --stock-sub-h: 14px;
    --stock-meta-h: 16px;
    --stock-name-size: 14px;
    --stock-sub-size: 11px;
    --stock-price-size: 16px;
    --stock-change-size: 13.5px;
  }
}
