.cs-store-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(132px, 152px);
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 12px;
  overflow: hidden;
  border: 2px solid #6f4b1d;
  background:
    linear-gradient(135deg, rgba(95, 24, 18, 0.42), rgba(95, 24, 18, 0) 36%),
    linear-gradient(180deg, #332315 0%, #21170e 58%, #120d08 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 216, 128, 0.24),
    inset 0 -1px 0 rgba(0, 0, 0, 0.65);
}

.cs-store-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(90deg, rgba(255, 212, 112, 0.04) 0, rgba(255, 212, 112, 0.04) 1px, transparent 1px, transparent 18px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.1), rgba(68, 98, 36, 0.12), rgba(0, 0, 0, 0.1));
}

.cs-store-hero__main,
.cs-store-hero__loot,
.cs-store-balance {
  position: relative;
  z-index: 1;
}

.cs-store-hero__main {
  min-width: 0;
  padding: 2px 0 0 2px;
}

.cs-store-hero__kicker {
  display: inline-block;
  margin-bottom: 4px;
  padding: 3px 7px;
  border: 1px solid #745a1d;
  background: #0e0a05;
  color: #d6e589;
  font-size: 11px;
  font-weight: bold;
}

.cs-store-hero h1 {
  margin: 0 0 4px;
  color: #ffd470;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  line-height: 1.1;
  text-shadow: 1px 1px 0 #000;
}

.cs-store-hero p {
  max-width: 560px;
  margin: 0;
  color: #f0e1bf;
  line-height: 1.45;
}

.cs-store-hero__scoreboard {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.cs-store-hero__scoreboard span {
  display: inline-block;
  min-height: 22px;
  padding: 4px 7px;
  border: 1px solid #5a3a14;
  background: rgba(14, 10, 5, 0.88);
  color: #d8c49a;
  font-size: 11px;
}

.cs-store-hero__scoreboard strong {
  color: #fff2a8;
  margin-right: 3px;
}

.cs-store-hero__loot {
  display: grid;
  grid-template-columns: repeat(3, 54px);
  align-content: center;
  gap: 6px;
  min-width: 174px;
  padding: 7px;
  border: 1px solid #6f4b1d;
  background: rgba(14, 10, 5, 0.9);
}

.cs-store-hero__loot-item {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid #382418;
  background:
    linear-gradient(180deg, rgba(98, 70, 26, 0.42), rgba(14, 10, 5, 0.72)),
    #0e0a05;
  text-decoration: none;
}

.cs-store-hero__loot-item.is-featured {
  border-color: #b18a25;
  box-shadow: inset 0 0 0 1px rgba(255, 212, 112, 0.18);
}

.cs-store-hero__loot-item:hover {
  border-color: #d6e589;
  background:
    linear-gradient(180deg, rgba(68, 98, 36, 0.5), rgba(14, 10, 5, 0.75)),
    #0e0a05;
}

.cs-store-balance {
  display: grid;
  align-content: center;
  justify-items: center;
  min-width: 132px;
  min-height: 82px;
  padding: 8px;
  border: 1px solid #8a6f1a;
  background:
    linear-gradient(180deg, rgba(126, 91, 27, 0.26), rgba(14, 10, 5, 0.85)),
    #0e0a05;
  text-align: center;
}

.cs-store-balance img {
  display: block;
  margin-bottom: 4px;
  image-rendering: pixelated;
}

.cs-store-balance span {
  color: #ffd470;
  font-weight: bold;
}

.cs-store-balance small {
  display: block;
  color: #aaa;
  margin-top: 2px;
}

.cs-store-disabled {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.cs-store-programs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.cs-store-program {
  padding: 8px;
  background: #1c1610;
  border-color: #5a3a14;
}

.cs-store-program h2 {
  margin: 0 0 6px;
  color: #ffd470;
  font-size: 14px;
}

.cs-store-program p {
  margin: 0 0 8px;
  color: #f0e1bf;
}

.cs-store-program__muted,
.cs-store-program small {
  display: block;
  color: #aaa;
  margin-top: 6px;
}

.cs-store-referral {
  display: block;
}

.cs-store-referral span {
  display: block;
  color: #aaa;
  font-size: 11px;
  margin-bottom: 3px;
}

.cs-store-referral input {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid #5a3a14;
  background: #0e0a05;
  color: #ffd470;
  padding: 5px 6px;
  font: 12px monospace;
}

.cs-store-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.cs-store-tabs a {
  display: inline-block;
  padding: 5px 9px;
  border: 1px solid #5a3a14;
  background: #1c1610;
  color: #ffd470;
  text-decoration: none;
  font-weight: bold;
}

.cs-store-tabs a.is-active,
.cs-store-tabs a:hover {
  background: #382418;
  color: #fff8c2;
}

.cs-store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 8px;
}

.cs-store-card {
  display: grid;
  grid-template-columns: 64px 1fr 118px;
  gap: 8px;
  align-items: center;
  min-height: 104px;
  padding: 8px;
  border: 1px solid #382418;
  background: #1c1610;
}

.cs-store-card--featured {
  border-color: #8a6f1a;
  background: linear-gradient(90deg, rgba(201, 162, 39, 0.12), #1c1610 42%);
}

.cs-store-card__sprite {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  background: #0e0a05;
  border: 1px solid #382418;
}

.cs-store-card__body h2 {
  margin: 0 0 4px;
  font-size: 14px;
  line-height: 1.2;
}

.cs-store-card__body p {
  margin: 0 0 5px;
  color: #f0e1bf;
  font-size: 12px;
}

.cs-store-card__stats,
.cs-store-card__status {
  display: block;
  color: #aaa;
  font-size: 11px;
}

.cs-store-card__buy {
  text-align: center;
  border-left: 1px solid #382418;
  padding-left: 8px;
}

.cs-store-card__buy strong,
.cs-store-purchase strong {
  display: block;
  color: #ffd470;
  font-size: 16px;
}

.cs-store-card__buy span,
.cs-store-purchase span {
  display: block;
  color: #aaa;
  font-size: 11px;
  margin-bottom: 6px;
}

.cs-store-detail {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 12px;
  align-items: stretch;
}

.cs-store-model,
.cs-store-detail__main,
.cs-store-panels .cs-panel {
  border: 2px solid #382418;
  background: #1c1610;
  color: #f0e1bf;
}

.cs-store-model {
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 280px;
  text-align: center;
  overflow: hidden;
}

.cs-store-model__stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 240px;
  background:
    radial-gradient(circle at center, rgba(255, 212, 112, 0.12), transparent 48%),
    linear-gradient(180deg, #22180d, #0e0a05);
}

.cs-store-model__stage--interactive {
  min-height: 360px;
  overflow: hidden;
}

.cs-store-model__preview {
  position: relative;
  width: 100%;
  height: 360px;
  min-height: 360px;
}

.cs-store-model__preview canvas {
  width: 100%;
  height: 100%;
}

.cs-store-model__fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.cs-store-model__glow {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  border: 1px solid rgba(255, 212, 112, 0.28);
}

.cs-store-model__fallback img {
  position: relative;
  z-index: 1;
  transform: scale(1.25);
}

.cs-store-model span {
  padding: 7px;
  border-top: 1px solid #382418;
  color: #aaa;
  font-size: 12px;
}

.cs-store-detail__main {
  padding: 10px;
}

.cs-store-detail__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 12px;
}

.cs-store-detail__meta span {
  padding: 4px 7px;
  border: 1px solid #5a3a14;
  background: #0e0a05;
  color: #f0e1bf;
  font-size: 12px;
}

.cs-store-purchase {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 320px;
  padding: 8px;
  border: 1px solid #5a3a14;
  background: #0e0a05;
}

.cs-store-panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.cs-store-statgrid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  padding: 8px;
}

.cs-store-statgrid span {
  color: #aaa;
}

.cs-store-statgrid strong {
  color: #ffd470;
}

.cs-store-history {
  margin-top: 10px;
}

.cs-store-history table {
  width: 100%;
  border-collapse: collapse;
}

.cs-store-history th,
.cs-store-history td {
  padding: 5px 6px;
  border-bottom: 1px solid #382418;
}

.cs-store-history th {
  color: #ffd470;
  text-align: left;
}

@media (max-width: 720px) {
  body.site2006.site2006-store div#body,
  body.site2006.site2006-store #cs-game-shell,
  body.site2006.site2006-store #cs-quicknav {
    box-sizing: border-box;
    width: auto;
    max-width: calc(100vw - 12px);
    margin-left: 6px;
    margin-right: 6px;
  }

  body.site2006.site2006-store .frame,
  body.site2006.site2006-store .cs-store-frame {
    box-sizing: border-box;
    width: auto;
    max-width: 100%;
  }

  body.site2006.site2006-store .cs-store-frame > div {
    box-sizing: border-box;
  }

  .cs-store-detail,
  .cs-store-purchase {
    display: block;
  }

  .cs-store-hero {
    grid-template-columns: 1fr;
  }

  .cs-store-balance,
  .cs-store-model,
  .cs-store-purchase {
    margin-top: 8px;
  }

  .cs-store-model__stage--interactive,
  .cs-store-model__preview {
    min-height: 320px;
    height: 320px;
  }

  .cs-store-panels {
    grid-template-columns: 1fr;
  }

  .cs-store-balance {
    justify-self: start;
    width: 132px;
  }

  .cs-store-hero__loot {
    grid-template-columns: repeat(3, 54px);
    justify-content: start;
    min-width: 0;
    width: max-content;
    max-width: 100%;
  }

  .cs-store-card {
    grid-template-columns: 56px 1fr;
  }

  .cs-store-card__buy {
    grid-column: 1 / -1;
    border-left: 0;
    border-top: 1px solid #382418;
    padding: 8px 0 0;
  }
}
