/* Steam page adapter for halo-plugin-steam, styled for halo-theme-hao DIY */
#body-wrap.steam-body-wrap #content-inner {
  padding-top: 1rem;
}

.steam-page {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  color: var(--heo-fontcolor);
}

.steam-page a {
  color: inherit;
  text-decoration: none;
}

.steam-card,
.steam-game-card,
.steam-stat-card,
.steam-empty,
.steam-alert {
  background: var(--heo-card-bg);
  border: var(--style-border);
  box-shadow: var(--heo-shadow-border);
  border-radius: 18px;
  transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease, background .25s ease;
}

[data-theme="dark"] .steam-card,
[data-theme="dark"] .steam-game-card,
[data-theme="dark"] .steam-stat-card,
[data-theme="dark"] .steam-empty,
[data-theme="dark"] .steam-alert {
  background: rgba(29, 30, 34, .78);
  border: 1px solid rgba(255, 255, 255, .10);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .22);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(18px);
}

.steam-card:hover,
.steam-game-card:hover,
.steam-stat-card:hover {
  border-color: var(--heo-main);
  box-shadow: var(--heo-shadow-main);
}

.steam-hero {
  position: relative;
  overflow: hidden;
  padding: 1.2rem;
  margin-bottom: 1rem;
}

.steam-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 18%, rgba(102, 192, 244, .20), transparent 28%),
    radial-gradient(circle at 90% 15%, rgba(27, 40, 56, .28), transparent 34%);
  opacity: .9;
}

.steam-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.steam-profile {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.steam-avatar-wrap {
  position: relative;
  width: 92px;
  height: 92px;
  flex: 0 0 auto;
}

.steam-avatar {
  width: 92px;
  height: 92px;
  object-fit: cover;
  border-radius: 16px;
  border: 2px solid rgba(102, 192, 244, .55);
  background: rgba(102, 192, 244, .08);
}

.steam-status-dot {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 3px solid var(--heo-card-bg);
  background: #8f98a0;
}

.steam-status-dot.is-online {
  background: #66c0f4;
}

.steam-profile-info {
  min-width: 0;
}

.steam-kicker {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-bottom: .35rem;
  font-size: .78rem;
  color: var(--heo-secondtext);
}

.steam-title {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.2;
  color: var(--heo-fontcolor);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.steam-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  align-items: center;
  margin-top: .55rem;
  color: var(--heo-secondtext);
  font-size: .7rem;
}

.steam-pill {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 .65rem;
  border-radius: 999px;
  background: var(--heo-gray-op);
  color: var(--heo-fontcolor);
  white-space: nowrap;
}

.steam-pill.level {
  color: #fff;
  background: linear-gradient(135deg, #2a475e, #66c0f4);
}

.steam-action {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 118px;
  height: 42px;
  padding: 0 1rem;
  border-radius: 12px;
  color: #fff !important;
  background: linear-gradient(135deg, #2a475e, #66c0f4);
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(102, 192, 244, .20);
}

.steam-action:hover {
  transform: translateY(-2px);
}

.steam-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3rem;
  margin-bottom: 1rem;
}

.steam-stat-card {
  padding: 0.8rem;
  text-align: center;
}

.steam-stat-value {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--heo-main);
}

.steam-stat-label {
  display: block;
  margin-top: .35rem;
  color: var(--heo-secondtext);
  font-size: .75rem;
}

.steam-section {
  margin-top: 1rem;
}

.steam-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  margin: .35rem .15rem .7rem;
}

.steam-section-title {
  display: flex;
  align-items: center;
  gap: .45rem;
  margin: 0;
  font-size: .9rem;
  font-weight: 800;
  color: var(--heo-fontcolor);
}

.steam-section-desc {
  color: var(--heo-secondtext);
  font-size: .82rem;
  white-space: nowrap;
}

.steam-alert {
  margin-bottom: 1rem;
  padding: .9rem 1rem;
  color: #ffcf6a;
  background: rgba(255, 207, 106, .12);
  border-color: rgba(255, 207, 106, .26);
}

.steam-games-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .9rem;
}

.steam-games-grid.recent {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.steam-game-card {
  overflow: hidden;
  display: block;
}

.steam-game-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 460 / 215;
  overflow: hidden;
  background: var(--heo-gray-op);
}

.steam-game-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}

.steam-game-card:hover .steam-game-cover img {
  transform: scale(1.04);
}

.steam-game-badge {
  position: absolute;
  left: .55rem;
  top: .55rem;
  padding: .2rem .45rem;
  border-radius: 999px;
  color: #fff;
  font-size: .72rem;
  background: rgba(0, 0, 0, .46);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.steam-game-content {
  padding: .78rem .85rem .9rem;
}

.steam-game-name {
  min-height: 2.4em;
  margin: 0 0 .45rem;
  color: var(--heo-fontcolor);
  font-size: .85rem;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.steam-game-time {
  display: inline-flex;
  align-items: center;
  padding: .18rem .45rem;
  border-radius: 999px;
  color: var(--heo-main);
  background: var(--heo-gray-op);
  font-size: .6rem;
}

.steam-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--heo-secondtext);
}

.steam-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin: 1rem 0 .2rem;
}

.steam-page-btn,
.steam-page-num {
  min-width: 38px;
  height: 38px;
  padding: 0 .8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--heo-card-bg);
  border: var(--style-border);
  color: var(--heo-fontcolor) !important;
}

.steam-page-btn:hover,
.steam-page-num.current {
  background: var(--heo-main);
  border-color: var(--heo-main);
  color: #fff !important;
}

.steam-page-btn.disabled {
  opacity: .45;
  pointer-events: none;
}

.steam-heatmap-card {
  padding: 1rem;
}

.steam-heatmap-scroll {
  overflow-x: auto;
  padding-bottom: .25rem;
}

.steam-heatmap-grid {
  display: grid;
  grid-template-rows: repeat(7, 12px);
  grid-auto-flow: column;
  grid-auto-columns: 12px;
  gap: 4px;
  min-height: 108px;
  align-content: start;
}

.steam-heatmap-cell {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: rgba(142, 152, 160, .14);
}

.steam-heatmap-cell.blank {
  background: transparent !important;
}

.steam-heatmap-cell[data-level="1"] { background: rgba(102, 192, 244, .25); }
.steam-heatmap-cell[data-level="2"] { background: rgba(102, 192, 244, .45); }
.steam-heatmap-cell[data-level="3"] { background: rgba(102, 192, 244, .70); }
.steam-heatmap-cell[data-level="4"] { background: rgba(102, 192, 244, 1); }

.steam-heatmap[data-theme="github"] .steam-heatmap-cell[data-level="1"] { background: rgba(76, 175, 80, .25); }
.steam-heatmap[data-theme="github"] .steam-heatmap-cell[data-level="2"] { background: rgba(76, 175, 80, .45); }
.steam-heatmap[data-theme="github"] .steam-heatmap-cell[data-level="3"] { background: rgba(76, 175, 80, .70); }
.steam-heatmap[data-theme="github"] .steam-heatmap-cell[data-level="4"] { background: rgba(76, 175, 80, 1); }

.steam-heatmap[data-theme="fire"] .steam-heatmap-cell[data-level="1"] { background: rgba(255, 183, 77, .28); }
.steam-heatmap[data-theme="fire"] .steam-heatmap-cell[data-level="2"] { background: rgba(255, 152, 0, .50); }
.steam-heatmap[data-theme="fire"] .steam-heatmap-cell[data-level="3"] { background: rgba(255, 87, 34, .72); }
.steam-heatmap[data-theme="fire"] .steam-heatmap-cell[data-level="4"] { background: rgba(244, 67, 54, 1); }

.steam-heatmap[data-theme="purple"] .steam-heatmap-cell[data-level="1"] { background: rgba(149, 117, 205, .28); }
.steam-heatmap[data-theme="purple"] .steam-heatmap-cell[data-level="2"] { background: rgba(126, 87, 194, .50); }
.steam-heatmap[data-theme="purple"] .steam-heatmap-cell[data-level="3"] { background: rgba(103, 58, 183, .75); }
.steam-heatmap[data-theme="purple"] .steam-heatmap-cell[data-level="4"] { background: rgba(94, 53, 177, 1); }

.steam-heatmap-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: .35rem;
  margin-top: .65rem;
  color: var(--heo-secondtext);
  font-size: .78rem;
}

.steam-heatmap-loading,
.steam-heatmap-error,
.steam-heatmap-empty {
  padding: 1.5rem .8rem;
  text-align: center;
  color: var(--heo-secondtext);
}

@media screen and (max-width: 980px) {
  .steam-games-grid,
  .steam-games-grid.recent {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 768px) {
  #body-wrap.steam-body-wrap #content-inner {
    padding: .6rem .7rem;
  }

  .steam-hero-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .steam-action {
    width: 100%;
  }

  .steam-stat-grid {
    grid-template-columns: 1fr;
  }

  .steam-section-header {
    align-items: flex-start;
    flex-direction: column;
    gap: .25rem;
  }

  .steam-section-desc {
    white-space: normal;
  }
}

@media screen and (max-width: 520px) {
  .steam-avatar-wrap,
  .steam-avatar {
    width: 72px;
    height: 72px;
  }

  .steam-title {
    font-size: 1.35rem;
  }

  .steam-games-grid,
  .steam-games-grid.recent {
    grid-template-columns: 1fr;
  }
}

.steam-game-cover-placeholder {
    width: 100%;
    height: 100%;
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.42);
    background: rgba(255,255,255,.06);
    font-weight: 700;
}

#steam-alert[hidden],
#steam-pagination[hidden] {
    display: none !important;
}

/* v3: server-side Steam data + plugin-style pagination + ECharts heatmap */
.steam-badge-list {
  display: flex;
  align-items: center;
  gap: .45rem;
  margin-top: .65rem;
  flex-wrap: wrap;
}

.steam-badge-item {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: .76rem;
  font-weight: 700;
  color: #fff !important;
  background: linear-gradient(135deg, rgba(42,71,94,.95), rgba(102,192,244,.65));
  border: 1px solid rgba(102,192,244,.35);
}

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

.steam-badge-item.more {
  text-decoration: none;
  background: rgba(102, 192, 244, .16);
  color: var(--heo-fontcolor) !important;
}

.steam-game-link {
  display: block;
  color: inherit !important;
  text-decoration: none !important;
}

.steam-game-last {
  display: block;
  margin-top: .35rem;
  color: var(--heo-secondtext);
  font-size: .72rem;
  line-height: 1.35;
}

.steam-heatmap-card {
  min-height: 260px;
}

.steam-heatmap {
  position: relative;
  min-height: 224px;
}

.steam-heatmap-chart {
  width: 100%;
  height: 224px;
}

.steam-heatmap-chart[hidden],
#steam-heatmap-empty[hidden],
#steam-heatmap-error[hidden],
#steam-heatmap-loading[hidden] {
  display: none !important;
}

.steam-heatmap-scroll {
  width: 100%;
}

.steam-heatmap-grid {
  width: max-content;
  min-width: max-content;
  margin: 0 auto;
}

.steam-pagination.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  margin: 1.2rem 0 .2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(142, 152, 160, .14);
}

.pagination__btn.steam-page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 .72rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--heo-card-bg);
  border: var(--style-border);
  color: var(--heo-fontcolor) !important;
  line-height: 1;
}

[data-theme="dark"] .pagination__btn.steam-page-btn {
  background: rgba(29, 30, 34, .72);
  border-color: rgba(255, 255, 255, .10);
}

.pagination__btn.steam-page-btn:hover,
.pagination__btn.steam-page-btn.active {
  background: var(--heo-main);
  border-color: var(--heo-main);
  color: #fff !important;
}

.pagination__btn.steam-page-btn.disabled {
  opacity: .42;
  pointer-events: none;
}

.pagination__ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 36px;
  color: var(--heo-secondtext);
  font-size: .85rem;
}

@media screen and (max-width: 768px) {
  .steam-heatmap-card,
  .steam-heatmap {
    min-height: 235px;
  }

  .steam-heatmap-chart {
    height: 205px;
  }

  .steam-pagination.pagination {
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: .25rem;
  }
}

/* v4: profile badge visual parity + achievement progress + metadata alignment */
.steam-badge-list {
  gap: .7rem;
}

.steam-badge-item {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 9px;
  overflow: visible;
  box-shadow: inset 0 -10px 18px rgba(0, 0, 0, .16), 0 8px 18px rgba(0, 0, 0, .14);
}

.steam-badge-item.has-img {
  overflow: hidden;
}

.steam-badge-item.has-img .steam-badge-level {
  right: 2px;
  bottom: 2px;
}

.steam-badge-item.no-img {
  background: linear-gradient(135deg, #26c686 0%, #37d28f 52%, #15966a 100%);
}

.steam-badge-item.badge-color-1.no-img {
  background: linear-gradient(135deg, #d8a92e 0%, #f3ba36 52%, #9b681a 100%);
}

.steam-badge-item.badge-color-2.no-img {
  background: linear-gradient(135deg, #d28a1d 0%, #f0ad2f 52%, #9d5b16 100%);
}

.steam-badge-item.badge-color-3.no-img {
  background: linear-gradient(135deg, #b61f6a 0%, #d33584 52%, #7c184c 100%);
}

.steam-badge-medal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 1.08rem;
  line-height: 1;
  transform: translateY(-1px);
  text-shadow: 0 1px 4px rgba(0, 0, 0, .28);
}

.steam-badge-level {
  position: absolute;
  right: -5px;
  bottom: -5px;
  min-width: 18px;
  height: 16px;
  padding: 0 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  color: #fff;
  background: #26c9d8;
  border: 1px solid rgba(255, 255, 255, .55);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
}

.steam-badge-item.more {
  overflow: hidden;
}

.steam-game-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  min-height: 28px;
}

.steam-game-meta-row .steam-game-time {
  flex: 0 0 auto;
}

.steam-game-achievement {
  display: inline-flex;
  align-items: center;
  gap: .22rem;
  color: var(--heo-secondtext);
  font-size: .76rem;
  line-height: 1;
  white-space: nowrap;
}

.steam-game-achievement[hidden] {
  display: none !important;
}

.steam-game-achievement-icon {
  font-size: .82rem;
  transform: translateY(-1px);
}

.library-meta-row {
  align-items: center;
}

.steam-game-last {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  margin-top: 0;
  color: var(--heo-secondtext);
  font-size: .6rem;
  line-height: 1.35;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media screen and (max-width: 640px) {
  .library-meta-row {
    align-items: flex-start;
    flex-direction: column;
    gap: .35rem;
  }

  .steam-game-last {
    justify-content: flex-start;
    text-align: left;
    white-space: normal;
  }
}


/* v5: profile card matches plugin default wording/placement */
.steam-profile {
  align-items: center;
}

.steam-profile-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.steam-kicker {
  display: none !important;
}

.steam-status-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2.5rem;
  margin-top: .3rem;
  color: var(--heo-secondtext);
  font-size: .75rem;
  line-height: 1.35;
}

.steam-status-text.is-online,
.steam-status-text.is-playing {
  color: #66c0f4;
}

.steam-last-online {
  color: var(--heo-secondtext);
}

.steam-profile-info .steam-meta {
  margin-top: .45rem;
}

.steam-pill-badges {
  gap: .25rem;
}

.steam-pill-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .86rem;
  line-height: 1;
  transform: translateY(-1px);
}

.steam-action {
  gap: .4rem;
  min-width: 140px;
}

.steam-action-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

@media screen and (max-width: 520px) {
  .steam-status-row {
    font-size: .78rem;
  }
}

/* v6: default-plugin-like heatmap loader and empty calendar grid */
.steam-section-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: .25rem;
  font-weight: 700;
}

.steam-heatmap-card {
  padding: 1rem 1.25rem 1.2rem;
  min-height: 220px;
}

.steam-heatmap {
  position: relative;
  min-height: 196px;
}

.steam-heatmap-loading,
.steam-heatmap-error,
.steam-heatmap-empty {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  padding: 2rem 1rem;
  color: var(--heo-secondtext);
  background: transparent;
  text-align: center;
}

.steam-heatmap-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(142, 152, 160, .22);
  border-top-color: var(--heo-main);
  border-radius: 50%;
  animation: steamHeatSpin .9s linear infinite;
}

.steam-heatmap-loading-text {
  font-size: .92rem;
}

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

.steam-heatmap-rendered {
  width: 100%;
}

.steam-heatmap-scroll {
  width: 100%;
  overflow-x: auto;
  padding: .1rem 0 .25rem;
}

.steam-heatmap-board {
  --steam-heatmap-cell: 14px;
  --steam-heatmap-gap: 3px;
  --steam-heatmap-label: 34px;
  width: max-content;
  min-width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: var(--steam-heatmap-label) max-content;
  grid-template-rows: 24px max-content;
  column-gap: .4rem;
  align-items: start;
  justify-content: center;
}

.steam-heatmap-months {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  grid-template-columns: repeat(var(--steam-heatmap-weeks), var(--steam-heatmap-cell));
  gap: var(--steam-heatmap-gap);
  min-width: max-content;
  color: var(--heo-secondtext);
  font-size: .82rem;
  line-height: 1;
  opacity: .92;
}

.steam-heatmap-month {
  white-space: nowrap;
  align-self: end;
}

.steam-heatmap-weekdays {
  grid-column: 1;
  grid-row: 2;
  display: grid;
  grid-template-rows: repeat(7, var(--steam-heatmap-cell));
  gap: var(--steam-heatmap-gap);
  justify-items: end;
  padding-right: .35rem;
  color: var(--heo-secondtext);
  font-size: .82rem;
  line-height: var(--steam-heatmap-cell);
  opacity: .92;
}

.steam-heatmap-grid {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  grid-template-rows: repeat(7, var(--steam-heatmap-cell));
  grid-auto-flow: column;
  grid-auto-columns: var(--steam-heatmap-cell);
  gap: var(--steam-heatmap-gap);
  width: max-content;
  min-width: max-content;
  min-height: auto;
  align-content: start;
}

.steam-heatmap-cell {
  width: var(--steam-heatmap-cell, 14px);
  height: var(--steam-heatmap-cell, 14px);
  border-radius: 3px;
  background: rgba(142, 152, 160, .14);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.025);
}

[data-theme="dark"] .steam-heatmap-cell {
  background: rgba(40, 48, 64, .78);
  box-shadow: inset 0 0 0 1px rgba(102, 192, 244, .08);
}

.steam-heatmap-cell.blank {
  background: transparent !important;
  box-shadow: none !important;
}

.steam-heatmap-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .42rem;
  margin-top: .9rem;
  color: var(--heo-secondtext);
  font-size: .82rem;
}

.steam-heatmap-footer .steam-heatmap-cell {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

@media screen and (max-width: 768px) {
  .steam-heatmap-board {
    justify-content: start;
  }
}

.steam-heatmap-rendered[data-theme="github"] .steam-heatmap-cell[data-level="1"] { background: rgba(76, 175, 80, .25); }
.steam-heatmap-rendered[data-theme="github"] .steam-heatmap-cell[data-level="2"] { background: rgba(76, 175, 80, .45); }
.steam-heatmap-rendered[data-theme="github"] .steam-heatmap-cell[data-level="3"] { background: rgba(76, 175, 80, .70); }
.steam-heatmap-rendered[data-theme="github"] .steam-heatmap-cell[data-level="4"] { background: rgba(76, 175, 80, 1); }
.steam-heatmap-rendered[data-theme="fire"] .steam-heatmap-cell[data-level="1"] { background: rgba(255, 183, 77, .28); }
.steam-heatmap-rendered[data-theme="fire"] .steam-heatmap-cell[data-level="2"] { background: rgba(255, 152, 0, .50); }
.steam-heatmap-rendered[data-theme="fire"] .steam-heatmap-cell[data-level="3"] { background: rgba(255, 87, 34, .72); }
.steam-heatmap-rendered[data-theme="fire"] .steam-heatmap-cell[data-level="4"] { background: rgba(244, 67, 54, 1); }
.steam-heatmap-rendered[data-theme="purple"] .steam-heatmap-cell[data-level="1"] { background: rgba(149, 117, 205, .28); }
.steam-heatmap-rendered[data-theme="purple"] .steam-heatmap-cell[data-level="2"] { background: rgba(126, 87, 194, .50); }
.steam-heatmap-rendered[data-theme="purple"] .steam-heatmap-cell[data-level="3"] { background: rgba(103, 58, 183, .75); }
.steam-heatmap-rendered[data-theme="purple"] .steam-heatmap-cell[data-level="4"] { background: rgba(94, 53, 177, 1); }


/* v7: heatmap layout closer to plugin default */
.steam-heatmap-panel {
  padding: 0;
  overflow: hidden;
}

.steam-heatmap-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.steam-heatmap-panel-body {
  padding: 1rem 1.25rem 1.15rem;
}

.steam-heatmap-panel .steam-section-title,
.steam-heatmap-panel .steam-section-desc {
  margin: 0;
}

.steam-heatmap-panel .steam-section-desc {
  color: var(--heo-secondtext);
}

.steam-heatmap-card {
  min-height: auto;
}

.steam-heatmap {
  min-height: 300px;
}

.steam-heatmap-loading,
.steam-heatmap-error,
.steam-heatmap-empty {
  padding-top: 2.5rem;
}

.steam-heatmap-rendered {
  width: 100%;
}

.steam-heatmap-scroll {
  width: 100%;
  overflow-x: auto;
  padding: .15rem 0 .4rem;
}

.steam-heatmap-board {
  width: 100%;
  min-width: 100%;
  margin: 0;
  justify-content: stretch;
  align-items: start;
}

.steam-heatmap-months,
.steam-heatmap-grid {
  width: max-content;
}

.steam-heatmap-months {
  min-width: 100%;
  font-size: 1.02rem;
  color: var(--heo-fontcolor);
}

.steam-heatmap-weekdays {
  font-size: 1rem;
  color: var(--heo-fontcolor);
}

.steam-heatmap-grid {
  min-width: 100%;
}

.steam-heatmap-cell {
  border-radius: 4px;
}

.steam-heatmap-footer {
  justify-content: flex-end;
  gap: .4rem;
  margin-top: .8rem;
  padding-right: .15rem;
  color: var(--heo-secondtext);
  font-size: 1rem;
}

.steam-heatmap-footer .steam-heatmap-cell {
  width: 14px;
  height: 14px;
}

.steam-heatmap-footer .legend-text {
  line-height: 1;
}

.steam-heatmap-rendered[data-theme="steam"] .steam-heatmap-cell[data-level="5"] { background: rgba(32, 95, 255, 1); }
.steam-heatmap-rendered[data-theme="github"] .steam-heatmap-cell[data-level="5"] { background: rgba(56, 142, 60, 1); }
.steam-heatmap-rendered[data-theme="fire"] .steam-heatmap-cell[data-level="5"] { background: rgba(198, 40, 40, 1); }
.steam-heatmap-rendered[data-theme="purple"] .steam-heatmap-cell[data-level="5"] { background: rgba(74, 20, 140, 1); }

.steam-heatmap-rendered[data-theme="steam"] .steam-heatmap-cell[data-level="1"] { background: rgba(102, 192, 244, .16); }
.steam-heatmap-rendered[data-theme="steam"] .steam-heatmap-cell[data-level="2"] { background: rgba(102, 192, 244, .3); }
.steam-heatmap-rendered[data-theme="steam"] .steam-heatmap-cell[data-level="3"] { background: rgba(102, 192, 244, .48); }
.steam-heatmap-rendered[data-theme="steam"] .steam-heatmap-cell[data-level="4"] { background: rgba(102, 192, 244, .72); }

@media screen and (max-width: 900px) {
  .steam-heatmap-panel-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .steam-heatmap-panel-body {
    padding: .95rem .85rem 1rem;
  }
  .steam-heatmap {
    min-height: 250px;
  }
  .steam-heatmap-months {
    font-size: .9rem;
  }
  .steam-heatmap-weekdays,
  .steam-heatmap-footer {
    font-size: .88rem;
  }
}


/* v8: heatmap no-scroll, tighter height, plugin-like clipping */
.steam-heatmap-card.steam-heatmap-panel {
  padding: 0;
}

.steam-heatmap-panel-head {
  padding: 1rem 1.25rem .9rem;
}

.steam-heatmap-panel-body {
  padding: .9rem 1.1rem .85rem;
}

.steam-heatmap {
  min-height: 205px;
}

.steam-heatmap-loading,
.steam-heatmap-error,
.steam-heatmap-empty {
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

.steam-heatmap-rendered {
  width: 100%;
}

.steam-heatmap-scroll {
  width: 100%;
  overflow: hidden;
  padding: .05rem 0 .2rem;
  display: flex;
  justify-content: flex-end;
}

.steam-heatmap-board {
  width: auto;
  min-width: 0;
  max-width: none;
  margin: 0;
  grid-template-columns: var(--steam-heatmap-label) auto;
  grid-template-rows: 22px auto;
  column-gap: .55rem;
}

.steam-heatmap-months {
  width: auto;
  min-width: 0;
  font-size: .96rem;
  color: var(--heo-fontcolor);
}

.steam-heatmap-month {
  min-width: 2.2em;
  text-align: left;
}

.steam-heatmap-weekdays {
  width: var(--steam-heatmap-label);
  min-width: var(--steam-heatmap-label);
  justify-items: center;
  align-items: center;
  padding-right: 0;
  font-size: .94rem;
  color: var(--heo-fontcolor);
}

.steam-heatmap-weekdays span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.2em;
  height: 1.2em;
  line-height: 1;
  white-space: nowrap;
}

.steam-heatmap-grid {
  width: auto;
  min-width: 0;
}

.steam-heatmap-cell {
  border-radius: 4px;
}

.steam-heatmap-footer {
  justify-content: flex-end;
  margin-top: .55rem;
  padding-right: .2rem;
  font-size: .92rem;
}

.steam-heatmap-footer .steam-heatmap-cell {
  width: 13px;
  height: 13px;
}

@media screen and (max-width: 900px) {
  .steam-heatmap-panel-head {
    padding: .9rem .95rem .8rem;
  }
  .steam-heatmap-panel-body {
    padding: .8rem .8rem .75rem;
  }
  .steam-heatmap {
    min-height: 190px;
  }
}


/* v9: use ECharts calendar like plugin default; no manual scrollbar */
.steam-heatmap-panel-head {
  padding: 1rem 1.25rem .9rem;
}

.steam-heatmap-panel-body {
  padding: .75rem 1.05rem .75rem;
}

.steam-heatmap {
  min-height: 200px;
}

.steam-heatmap-chart {
  width: 100%;
  height: 200px;
}

.steam-heatmap-chart:not([hidden]) {
  display: block !important;
}

.steam-heatmap-scroll {
  overflow: hidden !important;
}

.steam-heatmap-echart-legend {
  position: absolute;
  right: 1.25rem;
  bottom: .25rem;
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  color: var(--heo-fontcolor);
  font-size: .95rem;
  line-height: 1;
  z-index: 3;
  pointer-events: none;
}

.steam-heatmap-echart-legend i {
  display: inline-block;
  width: 13px;
  height: 13px;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
}

.steam-heatmap-rendered {
  width: 100%;
}

.steam-heatmap-rendered .steam-heatmap-board {
  justify-content: stretch;
}

@media screen and (max-width: 900px) {
  .steam-heatmap-panel-body {
    padding: .65rem .75rem .7rem;
  }
  .steam-heatmap,
  .steam-heatmap-chart {
    min-height: 190px;
    height: 190px;
  }
  .steam-heatmap-echart-legend {
    right: .85rem;
    bottom: .2rem;
    font-size: .86rem;
  }
}


/* v10: ECharts-only heatmap and theme-aware label colors */
.steam-heatmap-chart canvas {
  display: block;
}

html:not([data-theme="dark"]) .steam-heatmap-echart-legend,
body:not(.dark) .steam-heatmap-echart-legend {
  color: #3f4652;
}

html[data-theme="dark"] .steam-heatmap-echart-legend,
body.dark .steam-heatmap-echart-legend {
  color: #f5f7fa;
}
