body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f7f7f7;
  text-align: center;
}
a {
  color:#000;
}
.non-submit .hide-non-submit {
  display:none;
}
.non-submit #tab3,
.non-submit #tab2,
.non-submit #tab-btn-tab2,
.non-submit #tab-btn-tab3,
#tab5,
#tab-btn-tab5 {
  display:none !important;
}
.leaderboard.non-submit #tab5.is-active,
.leaderboard.non-submit #tab-btn-tab5 {
  display:block !important;
}
.bit {
    font-family: "Press Start 2P", system-ui;
    font-weight: 400;
    font-style: normal;
    line-height: 1.25;
  }
.no-bit,
.no-bit * {
  font-family: system-ui;
  font-weight: 400;
  font-style: normal;
  line-height: 1.25;
  font-size: 1rem !important;
}
.bit p {
  font-family: system-ui;
  font-size:1rem;
  line-height:1.75;
}
#campaign-title {
  margin: 20px 0;
}

/* LEADERBOARD */
.leaderboard {
  min-height:20rem;
  text-align: left;
  max-width: 800px;
  margin: 20px auto;
  background-color: white;
  background-image: url("./assets/images/bottom.png");
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: contain;
  border-radius: 14px;
  padding: 2rem 1rem 5rem 1rem;
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
  font-size: 0.85rem;
  line-height:1.25;
}
.leaderboard-container {
  padding-right: 10px;
  /*background-image: url("./assets/images/canada-goose.png");*/
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  @container (min-width: 28rem) {
    max-height: 200px; /* shows 10 results, scrollable */
    column-count: 2;
    column-fill: auto; /* balance the columns */
    column-gap: 40px;

  }
}

.leaderboard-container::-webkit-scrollbar {
  width: 8px;
}

.leaderboard-container::-webkit-scrollbar-thumb {
  background-color: rgba(0,0,0,0.3);
  border-radius: 4px;
}

.leaderboard-container::-webkit-scrollbar-track {
  background: transparent;
}

.leaderboard li {
  padding: 6px 0;
  font-size:0.75rem;
}

.leaderboard h2 {
  margin-top: 0;
}

.leaderboard ol {
  margin-left: 25px;
  text-align: left;
}

.campaign-dates {
  font-size: 14px;
  color: #777;
}

/* COLLECTIBLE POP */
.collectible {
  font-size: 30px;
}

.uw-honk {
  container-type: inline-size;
}

.uw-honk-wrapper {
  display: flex;
  /*text-align: center;*/
  /*flex-direction: column;*/
  /*align-items: center;*/
  /*justify-content: center;*/
  margin: 0 auto;
  max-width: 800px;
  width: calc(100vw - 46px);
  position:relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
  border: 12px solid #fff;
  border-radius: 12px;
}
.uw-honk-wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: none;
  z-index: 8;
  transition: background-color 160ms ease;
}
.uw-honk-wrapper.game-over {
  border: 12px solid #fdd54f;
  width: calc(100vw - 46px);
}
.uw-honk-wrapper.game-over::before {
  background: rgba(0, 0, 0, 0.45);
}
.game-canvas {
  background-repeat: repeat;
  image-rendering: auto;
}

.game-over .game-canvas {

}

.game-hud {
  position: absolute;
  top: 12px;
  left: 12px;
  right: auto;
  z-index: 12;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0.45rem;
  width: max-content;
  pointer-events: none;
}

.score-panel {
  pointer-events: none;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid #111;
  border-radius: 6px;
  padding: 0.55rem 0.7rem 0.48rem 0.7rem;
  color: #111;
  font-size: 0.75rem;
  line-height: 1.15;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
  display: grid;
  gap: 0.42rem;
}

.score-panel__value {
  white-space: nowrap;
}

.score-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
  align-items: center;
  font-size: 0.56rem;
}

.score-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 0.24rem;
  white-space: nowrap;
}

.score-legend__item img {
  width: 14px;
  height: 14px;
  display: block;
}

/* Firefox: avoid ghosted shadow artifacts on the tiny +points HUD text. */
@supports (-moz-appearance: none) {
  .score-panel,
  .score-panel__value,
  .score-legend,
  .score-legend__item {
    text-shadow: none  !important;
    color: #000 !important;
  }
}

#soundToggle {
  pointer-events: auto;
  width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.7rem 0.48rem 0.7rem;
  font-size: 0.75rem;
  cursor: pointer;
  border-radius: 6px;
  border: 1px solid #111;
  font-family: "Press Start 2P", system-ui;
  font-weight: 400;
  font-style: normal;
  line-height: 1.25;
  background: rgba(255, 255, 255, 0.92);
  color: #111;
}

#soundToggle.sound-off {
  background-color: #ccc;
}

@media (max-width: 560px) {
  .game-hud {
    top: 8px;
    left: 8px;
    right: auto;
  }

  .score-panel,
  #soundToggle {
    font-size: 0.62rem;
    padding: 0.42rem 0.5rem 0.4rem 0.5rem;
  }

  .score-legend {
    font-size: 0.5rem;
    gap: 0.35rem 0.5rem;
  }

  .score-legend__item img {
    width: 12px;
    height: 12px;
  }
}
/* Style for the button */
.start-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  padding: 10px;
  @media (min-width: 560px) {
    padding: 14px 20px;
    font-size: 16px;
  }

  border: none;
  border-radius: 4px;
  background-color: #fdd54ffa;
  color: #000;
  border:1px solid #000;
  cursor: pointer;
  z-index: 10; /* Ensure button is on top */
  font-family: "Press Start 2P", system-ui;
  font-weight: 400;
  font-style: normal;
  line-height: 1.25;
}

.game-intro-card[hidden] {
  display: none !important;
}

.game-intro-card {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 13;
  width: min(85%, 30rem);
  max-height: calc(100% - 2rem);
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #111;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
  padding: 1rem;
  text-align: left;
}

.game-intro-card__title {
  margin: 0 0 0.8rem 0;
  font-size: 0.95rem;
}

.game-intro-card p {
  margin: 0 0 1rem 0;
  font-size: 0.9rem;
  line-height: 1.55;
}

.game-intro-card__closing {
  margin-bottom: 0.75rem;
  text-align: center;
  font-weight: 700;
}

.game-intro-card__btn {
  display: block;
  margin: 0 auto;
  font-family: "Press Start 2P", system-ui;
  font-size: 0.7rem;
  line-height: 1.2;
  padding: 0.65rem 0.8rem;
  border: 1px solid #111;
  border-radius: 6px;
  background: #fdd54f;
  color: #111;
  cursor: pointer;
}

.game-intro-card__btn:hover {
  background: #f6c82e;
}

@media (max-width: 560px) {
  .game-intro-card {
    width: calc(100% - 1rem);
    max-height: calc(100% - 1rem);
    padding: 0.8rem;
  }

  .game-intro-card__title {
    font-size: 0.76rem;
  }

  .game-intro-card p {
    font-size: 0.82rem;
    line-height: 1.45;
  }
}

.hidden {
  display: none;
}
h1 {text-align:center;
}

/* -----------------------------
 * Leaderboard Tabs
 * ----------------------------- */
.leaderboard .tabs-nav {
  display: flex;
  gap: 0.35rem;
  margin: 0 0 3rem 0;
  padding: 0.35rem;
  flex-wrap: wrap;
  width: fit-content;
  max-width: 100%;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 20px;
  background: linear-gradient(140deg, #f5f5f5 0%, #e6e6e6 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 8px 18px rgba(0, 0, 0, 0.08);
}

.leaderboard .tabs-nav__btn {
  appearance: none;
  border: none;
  background: transparent;
  color: #525252;
  font-weight: 600;
  padding:1rem 1.125rem;
  border-radius: 20px;
  font-size: .75rem;
  min-height: 3rem;
  font-family: "Press Start 2P", system-ui;
  font-weight: 400;
  font-style: normal;
  line-height: 1.25;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.leaderboard .tabs-nav__btn:hover {
  background: rgba(255, 255, 255, 0.85);
  color: #171717;
}

.leaderboard .tabs-nav__btn:focus-visible {
  outline: 2px solid #4b5563;
  outline-offset: 2px;
}

.leaderboard .tabs-nav__btn[aria-selected="true"] {
  background: linear-gradient(140deg, #4b5563 0%, #1f2937 100%);
  color: #fff;
  box-shadow: 0 6px 16px rgba(17, 24, 39, 0.35);
  transform: translateY(-1px);
}

.leaderboard .tab {
  display: none;
  min-height:200px;
}

.leaderboard .goose_results:not(.tabs-ready) .tab:first-of-type {
  display: block;
  margin-top:100px;
}
.leaderboard .goose_results.tabs-ready .tab:first-of-type{
  margin-top:0;
}
.leaderboard .tab.is-active {
  display: block;
  animation: tab-fade-in 220ms ease;
}

.final_results_wrapper {
  margin-top: 1rem;
  overflow-x: auto;
}

#final_results .final-results-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #111;
}

#final_results .final-results-table th,
#final_results .final-results-table td {
  border: 1px solid #111;
  padding: 0.5rem 0.75rem;
  text-align: left;
}

#final_results .final-results-table th {
  background: #f5f5f5;
}

.leaderboard-placeholder {
  color: #525252;
  font-style: italic;
}

.rules-icon-list {
  margin: 0.5rem 0 0.9rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.4rem;
}

.rules-icon-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.94rem;
  line-height: 1.35;
}

.rules-icon-item img {
  width: 22px;
  height: 22px;
  display: block;
  object-fit: contain;
}

.rules-icon-strip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.rules-icon-pair {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.rules-pipe-gap-arrow {
  display: inline-block;
  margin: 0.25rem 0;
  font-family: "Press Start 2P", system-ui;
  font-size: 0.58rem;
  line-height: 1;
  color: #1f2937;
  white-space: nowrap;
}

.rules-icon-coins {
  display: inline-flex;
  align-items: center;
  gap: 0.26rem;
}

.rules-icon-item--pipe .rules-icon-pair img {
  width: 72px;
  height: 96px;
}

.rules-icon-item--pipe .rules-icon-coins img {
  width: 24px;
  height: 24px;
}

@keyframes tab-fade-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 560px) {
  .leaderboard .tabs-nav {
    width: 100%;
  }

  .leaderboard .tabs-nav__btn {
    flex: 1 1 48%;
    text-align: center;
  }
}

/* -----------------------------
 * Donation Pie Chart
 * ----------------------------- */
#top_scores {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  font-size:0.75rem;
}

@media (min-width: 700px) {
  #top_scores {
    grid-template-columns: 320px 1fr;
    align-items: start;
  }
}

.pie-chart {
  width: 100%;
  max-width: 320px;
  height: auto;
  font-family: system-ui;
  font-size:0.75rem;
  line-height:1.75;
}
.pie-chart-wrap {
  position: relative;
  width: 100%;
  max-width: 320px;
  transition: transform 140ms ease, filter 140ms ease;
  /*filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.18));*/
}

.pie-chart-wrap .pie-chart {
  display: block;
  border-radius: 8px;
  /*background: rgba(255, 255, 255, 0.35);*/
  /*box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.18), 3px 3px 0 rgba(0, 0, 0, 0.2);*/
  transition: box-shadow 140ms ease, transform 140ms ease;
}

.pie-chart-wrap:hover {
  transform: translateY(-1px);
  filter: drop-shadow(3px 3px 0 rgba(0, 0, 0, 0.24));
}

.pie-chart-wrap:hover .pie-chart {
  /*box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.2), 5px 5px 0 rgba(0, 0, 0, 0.22);*/
}

.pie-chart-tooltip {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  pointer-events: none;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 100ms ease, transform 100ms ease;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  border-radius: 6px;
  padding: 0.5rem;
  font-size: 1rem;
  line-height: 1.25;
  white-space: nowrap;
}

.pie-chart-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.pie-chart-tooltip__swatch {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  flex: 0 0 auto;
  background: #787878;
}

.pie-chart-tooltip__label {
  display: inline-block;
}

.pie-legend-pane {
  display: grid;
  gap: 0.65rem;
  align-content: start;
}

.pie-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.pie-controls__toggle {
  appearance: none;
  border: 1px solid rgba(0, 0, 0, 0.35);
  background: #fff;
  color: #111;
  border-radius: 999px;
  padding: 0.36rem 0.65rem;
  font-size: 0.65rem;
  line-height: 1.2;
  cursor: pointer;
  font-family: "Press Start 2P", system-ui;
}

.pie-controls__meta {
  font-size: 0.62rem;
  color: #333;
  line-height: 1.2;
}

.pie-legend {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pie-legend__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.25rem 0;
}

.pie-legend__swatch {
  width: 0.875rem;
  height: 0.875rem;
  border-radius: 2px;
  flex: 0 0 auto;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

.pie-legend__label {
  display: flex;
  justify-content: space-between;
  width: 100%;
  gap: 0.75rem;
  font-size:0.75rem;
  line-height:2;
}

.pie-legend__label strong {
  font-weight: 600;
}

/* -----------------------------
 * Leaderboard entry modal
 * ----------------------------- */
.lb-modal[hidden] {
  display: none !important;
}

.lb-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  font-family: "Press Start 2P", system-ui;
  font-weight: 400;
  font-style: normal;
  overflow-y: auto;
  padding: 0.75rem;
  box-sizing: border-box;
}

.lb-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.lb-modal__dialog {
  text-align: left;
  position: relative;
  width: 80%;
  min-width: min(320px, calc(100vw - 2rem));
  max-width: 42rem;
  margin: 0 auto;
  max-height: calc(100dvh - 1.5rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

@media (min-width: 560px) {
  .lb-modal__dialog {
    margin: 10vh auto 0;
    max-height: calc(100dvh - 12vh);
  }
}
.lb-modal__dialog a {
  color:#000;
}
.lb-modal__title {
  margin: 0 0 0.5rem 0;
}

.lb-modal__desc {
  margin: 1rem 0 2rem 0;
}

.lb-modal__form {
  display: grid;
  gap: 0.5rem;
}

.lb-modal__label {

}

.lb-modal__input,
.lb-modal__select {
  width: 97%;
  font: inherit;
  padding: 0.5rem 0.5rem;
  border: 1px solid rgba(0, 0, 0, 0.25);
  border-radius: 4px;
  margin-bottom: 0.5rem;
}
.lb-modal__select {
  width: 100%;
}
.lb-modal__input--email {
  /*border: 3px solid #d70000;*/
  /*background: #fff3f3;*/
}

.lb-modal__input--email:focus {
  /*outline: 2px solid #d70000;*/
  outline-offset: 1px;
  box-shadow: 0 0 0 3px rgba(215, 0, 0, 0.2);
}

.lb-modal__consent {
  margin: 0.15rem 0 0.35rem 0;
  display: grid;
  gap: 0.45rem;
}

.lb-modal__consent[hidden] {
  display: none !important;
}

.lb-modal__consent-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.65rem;
  line-height: 1.45;
}

.lb-modal__consent-label input[type="checkbox"] {
  margin-top: 0.12rem;
  width: 1rem;
  height: 1rem;
}

.lb-modal__fineprint {
  display: block;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.73rem;
  line-height: 1.35;
  color: #444;
}

.lb-modal__honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.lb-modal__actions {
  display:block;
  margin-top: 0.5rem;

  @media (min-width: 560px) {
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
  }
}

.lb-modal__btn {
  /*display: inline-flex;*/
  display: block;
  font: inherit;
  padding: 0.75rem 0.8rem;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.25);
  cursor: pointer;
  text-decoration: none;
  margin-bottom: 0.5rem;
  text-align: center;
  color: inherit;
  width:100%;
  @media (min-width: 560px) {
    display: inline-flex;
    width: auto;
  }
}
.lb-modal__btn--secondary,
.lb-modal__btn--primary {
  /*align-self: flex-end;*/
}

.lb-modal__btn--donate {
  text-align: center !important;
  background: #fdd54f;
  color: #1a1a1a;
  font-weight: 700;
  width:92%;
  @media (min-width: 560px) {
    display: inline-flex;
    width: auto;
  }
}
.lb-modal__btn--donate:hover {
  background:#a68414;
}
.lb-modal__btn--secondary {
  background: #d9d9d9;
  border-color: #8f8f8f;
  color: #1a1a1a;
}
.lb-modal__btn--secondary:hover {
  background: #000;
  border-color: #000;
  color: #fff;
}
.lb-modal__btn--primary {
  background: #000;
  border-color: #000;
  color: #fff;
}
.lb-modal__btn--primary:hover {
  background: #d9d9d9;
  border-color: #8f8f8f;
  color: #1a1a1a;
}
