.reward-navigation {
  position: absolute;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  z-index: 50;
  font-family: rbx, 'Trebuchet MS', sans-serif;
}

.reward-menu-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 42px;
  height: 42px;
  margin-left: auto;
  padding: 0;
  border: 2px solid #1a89d2;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 34%),
    linear-gradient(180deg, #1bb8f2 0%, #087fd7 58%, #0265bd 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.35),
    inset 0 -4px 0 rgba(0, 70, 145, 0.28),
    0 2px 0 #01518f,
    0 4px 7px rgba(0, 38, 77, 0.26);
  cursor: pointer;
}

.reward-menu-toggle span {
  display: block;
  width: 16px;
  height: 3px;
  margin-left: 6px;
  border-radius: 999px;
  background: #fff;
  box-shadow:
    0 1px 0 rgba(0, 66, 135, 0.55),
    0 0 2px rgba(255, 255, 255, 0.75);
  position: relative;
  transition: transform .18s, opacity .18s;
}

.reward-menu-toggle span::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 0;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    0 1px 0 rgba(0, 66, 135, 0.55),
    0 0 2px rgba(255, 255, 255, 0.75);
}

.reward-menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: none; }
.reward-menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 1; }
.reward-menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: none; }

.reward-menu {
  position: absolute;
  top: 62px;
  right: 0;
  box-sizing: border-box;
  width: min(250px, calc(100vw - 28px));
  padding: 10px;
  border: 3px solid #e5c994;
  border-radius: 18px;
  background: linear-gradient(120deg, #fff8df, #f9eac5);
  box-shadow: inset 0 0 0 3px #fff4d7, 0 4px 0 #b5793c, 0 12px 24px #56371940;
}

.reward-menu[hidden] { display: none; }

.reward-menu-heading {
  display: block;
  padding: 8px 10px 12px;
  color: #8d653b;
  font-size: 14px;
  font-weight: 700;
}

.reward-menu a {
  display: block;
  padding: 12px 10px;
  border-radius: 10px;
  color: #345f87;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.reward-menu a:hover { background: #dceeff; }
.reward-menu-toggle:hover { filter: brightness(1.06); }
.reward-menu-toggle:focus-visible,
.reward-menu a:focus-visible { outline: 3px solid #236aba; outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .reward-menu-toggle span { transition: none; }
}

/* Two columns stay consistent on mobile and desktop. */
.reward-shop.content-wrapper {
  box-sizing: border-box;
  width: 90%;
  margin: 20px auto 0;
  padding: 0 15px 22px;
  overflow: visible;
  border: 3px solid #e5c994;
  border-top: 0;
  border-radius: 25px 25px 23px 23px;
  background: linear-gradient(100deg, #fff0cb, #f9eac5 55%, #ffefcc);
  box-shadow: inset 0 0 0 4px #fff4d7, inset 0 -8px 0 #eed8ab, 0 4px 0 #b5793c, 0 7px 12px #96571d55;
  font-family: rbx, 'Trebuchet MS', sans-serif;
  font-weight: 700
}

.reward-shop::after {
  content: '';
  position: absolute;
  inset: 42px 7px 7px;
  border: 1px solid #dfc797;
  border-top: 0;
  border-radius: 0 0 16px 16px;
  pointer-events: none
}

.reward-shop-title {
    position: relative;
    margin: 0 -18px 13px;
    padding: 10px 24px 10px;
    border-radius: 25px 25px 0 0;
    border-top: 3px solid #b2d9ff;
    border-bottom: 3px solid #548ecc;
    background: linear-gradient(#77baf3, #61a7e5);
    color: white;
    font: 700 21px / 1 rbx, 'Trebuchet MS', sans-serif;
    text-align: center;
    text-shadow: 0 2px 1px #284b6a;
    font-size: 18px;
}

.reward-shop-title::before,
.reward-shop-title::after {
  content: '';
  position: absolute;
  top: 14px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f5f2da, #aebcbf);
  box-shadow: 0 2px 1px #487a9e
}

.reward-shop-title::before {
  left: 19px
}

.reward-shop-title::after {
  right: 19px
}

.reward-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px 12px
}

.reward-card {
  text-decoration: none;
  position: relative;
  box-sizing: border-box;
  height: 185px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  padding: 5px 7px 0;
  border:4px solid #b1cfee;
  border-bottom-width: 3px;
  border-radius: 20px 20px 13px 13px;
  background: linear-gradient(120deg, #fffdf0, #fff7df);
  box-shadow: 0 3px 2px #c2aa79, inset 0 2px 2px white;
  cursor: pointer;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
  transition: transform .15s, filter .15s
}

.reward-card:hover {
  filter: brightness(1.05);
  transform: translateY(-2px)
}

.reward-card:active {
  transform: translateY(2px)
}

.reward-card:focus-visible {
  outline: 3px solid #236aba;
  outline-offset: 4px
}

.reward-art {
  display: block;
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  height: 0;
  object-fit: contain;
  
}

.reward-info {
  position: absolute;
  right: -8px;
  top: -8px;
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.reward-stock {
 flex-shrink: 0;
    width: 92%;
    border-radius: 6px;
    background: #d1cdd0;
    color: #64617f;
    font-size: 18px;
    line-height: 1.15;
    padding: 4px;
    text-align: center;
}

/* The SVG draws a gently bowed outline, bevel, gloss and lower lip. */
.reward-price {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  gap: 12px;
  box-sizing: border-box;
  min-height: 50px;
  margin: 3px -10px -5px;
  padding: 0 10px 5px;
  border: 0;
  background: url(../img/shop_btn.png) center / 100% 100% no-repeat;
  color: #fffef5;
  font-size: 20px;
  text-shadow: 0 2px 1px #356735, 1px 0 #356735, -1px 0 #356735;
  transition: transform .15s;
}

.reward-card:active .reward-price {
  transform: translateY(1px);
}

.reward-gem {
  display: inline-block;
  flex: 0 0 auto;
  width: 19px;
  height: 18px;
  clip-path: polygon(28% 0, 83% 4%, 100% 38%, 72% 100%, 8% 82%, 0 39%);
  background: conic-gradient(from 35deg at 48% 43%, #ffbbc9, #ff416b 20%, #cf1249 32%, #ff5181 50%, #ffcadb 51%, #fff5f5 66%, #ff6b99 67%, #f92864);
  transform: rotate(12deg)
}

.reward-refresh {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 18px 3px 0;
  padding: 4px 6px;
  border-top: 2px solid #db9959;
  border-bottom: 2px solid #fff6d9;
  border-radius: 8px 8px 15px 15px;
  background: #edb16e;
  color: #fffdf1;
  font-size: 13px;
  line-height: 1
}

.reward-timer {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  line-height: 1;
  white-space: nowrap
}

.reward-timer>span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #278ddf;
  font-size: 18px;
  line-height: 1
}

.reward-refresh-cost {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 7px;
  border: 1px solid #4884ae;
  border-radius: 5px;
  background: linear-gradient(#a6dcff, #4b9be0);
  box-shadow: inset 0 1px #e5f7ff, 0 1px #c08f5b;
  text-shadow: 0 1px #32609a;
  font-size: 16px
}

.reward-refresh-cost .reward-gem {
  width: 14px;
  height: 14px
}

@media(max-width:375px) {
  .reward-shop.content-wrapper {
    margin-top: -38px;
    padding: 0 12px 18px
  }

  .reward-shop-title {
    margin-left: -15px;
    margin-right: -15px
  }

  .reward-grid {
    gap: 13px 10px
  }

  .reward-card {
    border-width: 4px
  }

  .reward-stock {
    font-size: 15px
  }

  .reward-refresh {
    gap: 4px;
    font-size: 11px;
    margin-left: 0;
    margin-right: 0
  }
}

@media(prefers-reduced-motion:reduce) {

  .reward-card,
  .reward-price {
    transition: none
  }
}


.clock{
  display: block;
  width: 20px;
  height: 20px;
  padding: 0;
}
