body {
  color:#fcfce9;
  background-color: #1e4131;
  font-size:13pt;
}

a {
  text-decoration: none;
}

/* The row with the drawn card */
#card_display_row {
  text-align: center;
  margin-top: 2rem;
  filter: drop-shadow(#00000055 0.5vw 0.5vw 1vw);
  flex-direction: column;
}

.awarness, .spirit, .fitness, .focus {
  color:#FFFFFF;
  background-repeat: no-repeat;
  background-position: center;
  background-size:contain;
}

.awarness {
  background-color: #7bbf55;
  background-image: url("awareness.png"), linear-gradient(#7bbf55, #458845);
}

.spirit {
  background-color: #ebc53a;
  background-image: url("spirit.png"), linear-gradient(#ebc53a, #c59837);
}

.fitness {
  background-color: #de4429;
  background-image: url("fit.png"), linear-gradient(#de4429, #943533);
}

.focus {
  background-color: #5995d1;
  background-image: url("focus.png"), linear-gradient(#5995d1, #3472bc);
}

#draw_result {
  position: relative;
  clear:both;
  width: 40%;
  border-radius: 0rem;
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
  margin: auto;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  float:left;  
}

#draw_result .draw_main {
  font-size: 24vw;
  line-height: 1;
}

#draw_result .draw_others {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

#draw_result .draw_other {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1;
  min-width: 2.4rem;
  padding: 0.15rem 0.4rem;
  border-radius: 0.4rem;
  box-shadow: #00000044 0.05vw 0.05vw 0.15vw;
}

/* Small attribute chips shouldn't carry the big attribute icon background,
   just the attribute's color. */
#draw_result .draw_other.awarness,
#draw_result .draw_other.spirit,
#draw_result .draw_other.fitness,
#draw_result .draw_other.focus {
  background-image: none;
}

#draw_challenge {
  width: 40%;
  border-radius: 0rem;
  border-bottom-left-radius: 1rem;
  border-bottom-right-radius: 1rem;
  margin: auto;
  padding: 1rem;
}

#draw_challenge_icon {
  height: 13vw !important;
}

/* Restrict card size when screen width is over 600px */
@media screen and (min-width: 600px) {
  #draw_result {
    width: 15rem;
  }

  #draw_result .draw_main {
    font-size: 9rem;
  }

  #draw_result .draw_others {
    gap: 0.65rem;
  }

  #draw_result .draw_other {
    font-size: 1.1rem;
  }

  #draw_challenge {
    width: 15rem;
  }

  #draw_challenge_icon {
    height: 5rem !important;
  }
}

#odds_awarness, #odds_spirit, #odds_fitness, #odds_focus {
  border-radius: 0.5rem;
}

.odds_row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: 0.25rem;
}

.odds_cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.odds_mod {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  opacity: 0.75;
}

.odds_pct {
  font-size: 1.4rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-shadow: #00000044 0.05vw 0.05vw 0.15vw;
}

#odds_awarness {
  background-image: linear-gradient(#7bbf55, #458845);
}

#odds_spirit {
  background-image: linear-gradient(#ebc53a, #c59837);
}

#odds_fitness {
  background-image: linear-gradient(#de4429, #943533);
}

#odds_focus {
  background-image: linear-gradient(#5995d1, #3472bc);
}

.sun {
  background-color: #ecbe2a;
}

.road {
  background-color: #de4429;
}

.mountain {
  background-color: #5995d1;
}

.missing {
  background-color: #474747;
}

#previous_result, #previous_challenge {
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem;
}

#previous_result {
  border-radius: 0.5rem 0 0 0.5rem;
  box-shadow: #00000055 -0.15vw 0.1vw 0.35vw;
}

#previous_result.awarness {
  background-image: linear-gradient(#7bbf55, #458845);
}

#previous_result.spirit {
  background-image: linear-gradient(#ebc53a, #c59837);
}

#previous_result.fitness {
  background-image: linear-gradient(#de4429, #943533);
}

#previous_result.focus {
  background-image: linear-gradient(#5995d1, #3472bc);
}

#previous_challenge {
  border-radius: 0 0.5rem 0.5rem 0;
  box-shadow: #00000055 0.15vw 0.1vw 0.35vw;
}

#previous_challenge_icon {
  height: 1.75rem;
  filter: drop-shadow(#00000055 0.05vw 0.05vw 0.15vw);
}

#deck_progress {
  height: 3rem;
  padding: 0;
  border-radius: 0.5rem;
  box-shadow: #00000055 0.15vw 0.1vw 0.35vw;
}

:root {
  --bs-border-color: #223322;
}

/* Mini card shown for each peeked card in the top/bottom reorder panel */
.peek_card_visual {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: #00000055 0.25vw 0.25vw 0.5vw;
}

.peek_challenge {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.peek_challenge_icon {
  height: 2.75rem;
}

.peek_attributes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.peek_attr {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0;
  font-weight: bold;
  font-size: 1rem;
  color: #FFFFFF;
  background-image: none;
}

.peek_index {
  flex: 0 0 auto;
  width: 1.75rem;
  text-align: right;
  opacity: 0.8;
  font-size: 0.85rem;
}

#peek_panel .row > [class^="col-"] {
  min-width: 0;
}

.peek_card_wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: grab;
  max-width: 100%;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  border-top: 3px solid transparent;
  border-bottom: 3px solid transparent;
  transition: border-color 0.05s ease-in-out;
}

.peek_card_wrap.dragging {
  opacity: 0.4;
}

/* Shown on the card currently under the pointer, to make it obvious exactly
   where the dragged card will land relative to it. */
.peek_drop_before {
  border-top-color: #7bbf55;
}

.peek_drop_after {
  border-bottom-color: #7bbf55;
}

.peek_drag_ghost {
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1000;
  opacity: 0.9;
  box-shadow: #00000088 0.3vw 0.3vw 0.8vw;
}

.peek_attr {
  min-width: 0;
}

.peek_card_visual {
  flex: 1 1 auto;
  min-width: 0;
}

#peek_top_list, #peek_bottom_list {
  min-height: 5rem;
  border-radius: 0.5rem;
  transition: outline 0.1s ease-in-out;
}

#peek_top_list:empty, #peek_bottom_list:empty {
  border: 2px dashed #2f5c40;
  display: flex;
  align-items: center;
  justify-content: center;
}

#peek_top_list:empty::after, #peek_bottom_list:empty::after {
  content: "Drop cards here";
  color: #7bbf55;
  font-size: 0.85rem;
  opacity: 0.8;
}

#peek_top_list.drag-over, #peek_bottom_list.drag-over {
  outline: 2px dashed #7bbf55;
  outline-offset: -2px;
}

/* Shuffle cards trigger a reset of the deck when drawn - make them stand out */
.peek_shuffle {
  outline: 3px solid #ecbe2a;
  outline-offset: 2px;
  box-shadow: 0 0 0.75rem 0.1rem #ecbe2a99;
}

.peek_shuffle_badge {
  position: absolute;
  bottom: 0.3rem;
  right: 0.3rem;
  z-index: 1;
  background-color: #cfcfcf;
  color: #1e1e1e;
  font-size: 0.7rem;
  font-weight: bold;
  padding: 0.1rem 0.5rem;
  border-radius: 1rem;
  box-shadow: #00000055 0.1vw 0.1vw 0.3vw;
}

/* Shuffle icon shown on the drawn card itself (replaces the old "*") */
.draw_shuffle_badge {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  background-color: #cfcfcf;
  color: #1e1e1e;
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.2rem 0.4rem;
  border-radius: 50%;
  box-shadow: #00000055 0.1vw 0.1vw 0.3vw;
}

/* "Look at top N cards" trigger control */
.peek_trigger {
  background-color: #16301f;
  border: 1px solid #2f5c40;
  border-radius: 1rem;
  padding: 0.85rem 1.25rem;
  margin: 0 auto;
  max-width: 22rem;
  gap: 0.6rem;
}

.peek_trigger label {
  font-weight: bold;
}

.peek_n_input {
  width: 4rem;
  text-align: center;
  border-radius: 0.5rem;
  border: 1px solid #2f5c40;
  background-color: #0f2417;
  color: #fcfce9;
  padding: 0.25rem;
}

.peek_n_input:focus {
  outline: none;
  border-color: #7bbf55;
  box-shadow: 0 0 0 0.15rem #7bbf5566;
}

.peek_trigger_btn {
  border-radius: 0.5rem;
}

/* Reorder panel */
#peek_panel > .col-12 {
  background-color: #16301f;
  border: 1px solid #2f5c40 !important;
  border-radius: 1rem;
  padding: 1rem;
}
