/* Event Guide — CREDITS tab, re-skinned in the Gen-3 FRLG window language
   (2026-07-24, Marshall: the guide "isn't Pokemon themed and isn't good UX").
   The panel is a gen3-frame1 paper window (border-image family in styles.css)
   over the FRLG title backdrop; provider entries are white sticker windows
   with PokeText chrome, PokeDialogue values, the #D0D0C8 text shadow, and the
   red ▶ selection cursor on the active tab. This file also carries the guide
   chrome shared by the PRIZES and SCHEDULE tabs (.event-guide-nav, status
   chips, masthead/close patterns) — all three stylesheets load globally.
   `--u` is the logical GBA pixel the gen3-frame classes scale from. */

.hackathon-credits-open {
  position: absolute;
  top: 10px;
  right: 118px;
  z-index: 58;
  min-width: 112px;
  min-height: 36px;
  padding: 7px 10px;
  color: #102f44;
  font: 800 12px/1 'PokeText', ui-monospace, monospace;
  letter-spacing: .04em;
  background: #F8F8F8;
  border: 2px solid #102f44;
  border-radius: 4px;
  box-shadow: inset 0 0 0 2px #DED5DE, 3px 3px 0 #102f44;
  cursor: pointer;
}

.hackathon-credits-open::before {
  content: "★";
  margin-right: 5px;
  color: #E82010;
}

.hackathon-credits-open:focus-visible,
.hackathon-credits button:focus-visible,
.hackathon-credits a:focus-visible {
  outline: 3px solid #ffcd4c;
  outline-offset: 2px;
}

/* FRLG title-screen backdrop: black caps + dark-red bars + deep teal, with
   the soft scanline sheen — same treatment as the attendee profile. */
.hackathon-credits {
  --u: 2px;
  position: absolute;
  inset: 0;
  z-index: 60;
  padding: clamp(8px, 2vw, 20px);
  overflow: hidden;
  color: #606060;
  font-family: 'PokeDialogue', 'PokeText', "Courier New", monospace;
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(255, 255, 255, .05) 3px 4px),
    linear-gradient(180deg,
      #000 0 4%,
      #7a1818 4% 9%,
      #10283A 9% 91%,
      #7a1818 91% 96%,
      #000 96% 100%);
}

/* The panel is one big Gen-3 paper window (gen3-frame1 border-image). */
.credits-panel {
  position: relative;
  width: min(100%, 1040px);
  height: 100%;
  margin: 0 auto;
  padding: clamp(10px, 2vw, 20px);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: #7373AC #DED5DE;
}

.credits-masthead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 12px;
  border-bottom: 3px double #B8B8B0;
}

.credits-kicker {
  margin: 0 0 4px;
  color: #C74637;
  font: 800 9px/1.2 'PokeText', ui-monospace, monospace;
  letter-spacing: .18em;
}

.credits-masthead h2 {
  margin: 0;
  color: #424242;
  font-family: 'PokeText', ui-monospace, monospace;
  font-size: clamp(17px, 2.8vw, 26px);
  line-height: 1.15;
  letter-spacing: .03em;
  text-shadow: 2px 2px 0 #D0D0C8;
}

.credits-intro {
  max-width: 66ch;
  margin: 8px 0 0;
  color: #606060;
  font-size: clamp(12px, 1.6vw, 14px);
  line-height: 1.5;
  text-shadow: 1px 1px 0 #E8E8E0;
}

/* Red A-button close, shared silhouette with the profile's icon button. */
.credits-close {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  padding: 0;
  color: #F8F8F8;
  font: 900 26px/28px system-ui, sans-serif;
  background: #E82010;
  border: 2px solid #293131;
  border-radius: 50%;
  box-shadow: 2px 2px 0 #293131;
  cursor: pointer;
}

/* ---- shared guide tab bar: a Gen-3 menu strip with the ▶ cursor ---------- */

.event-guide-nav {
  position: sticky;
  top: calc(clamp(10px, 2vw, 20px) * -1 - 2px);
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin: 12px 0 2px;
  padding: 4px;
  background: #F8F8F8;
  border: 2px solid #293131;
  border-radius: 4px;
  box-shadow: inset 0 0 0 2px #DED5DE, 0 3px 0 rgba(41, 49, 49, .18);
}

.event-guide-nav button {
  position: relative;
  min-height: 32px;
  padding: 6px 6px 6px 16px;
  color: #606060;
  font: 800 10px/1 'PokeText', ui-monospace, monospace;
  letter-spacing: .04em;
  text-align: center;
  text-shadow: 1px 1px 0 #D0D0C8;
  background: transparent;
  border: 2px solid transparent;
  border-radius: 3px;
  cursor: pointer;
}

.event-guide-nav button:hover { color: #E00808; }

/* Selected tab reads like a Gen-3 menu row: red window highlight + ▶. */
.event-guide-nav button.is-active {
  color: #E00808;
  background: #FFFDF2;
  border-color: #F86858;
  box-shadow: inset 0 0 0 1px #FFD8D0;
}

.event-guide-nav button.is-active::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 50%;
  width: 0;
  height: 0;
  margin-top: -4px;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 5px solid #E00808;
  filter: drop-shadow(1px 1px 0 #D0D0C8);
}

/* ---- shared status chips (READY / COMING) --------------------------------- */

.credits-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 0 4px;
}

.personal-credit-bundle {
  display: grid;
  grid-template-columns: minmax(12rem, .7fr) minmax(0, 1.3fr);
  gap: 16px;
  margin: 12px 0 18px;
  padding: 16px;
  background: linear-gradient(135deg, #FFF9D8, #FFFDF2);
  border: 4px solid #173F69;
  box-shadow: 5px 5px 0 #D8A030;
}

.personal-credit-bundle h3 {
  margin: 4px 0 8px;
  color: #173F69;
}

.personal-credit-status {
  margin: 0;
  color: #40576B;
  font-size: 13px;
  line-height: 1.45;
}

.personal-credit-items {
  display: grid;
  gap: 10px;
}

.personal-credit-item {
  min-width: 0;
  padding: 10px;
  background: #FFF;
  border: 2px solid #6D8293;
}

.personal-credit-item > span {
  display: block;
  margin-bottom: 7px;
  color: #173F69;
  font-size: 11px;
  font-weight: 900;
}

.personal-credit-item > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.personal-credit-item code,
.personal-credit-item a {
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
}

.credit-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  padding: 5px 8px 4px;
  font: 800 9px/1 'PokeText', ui-monospace, monospace;
  letter-spacing: .06em;
  border: 2px solid #293131;
  border-radius: 3px;
  box-shadow: 2px 2px 0 rgba(41, 49, 49, .16);
  white-space: nowrap;
}

.credit-status i {
  width: 7px;
  height: 7px;
  background: currentColor;
  border: 1px solid #293131;
}

.credit-status-ready {
  color: #205838;
  background: #B8ECC0;
}

.credit-status-coming {
  color: #8B6420;
  background: #F8E8A0;
}

/* ---- provider entries: white Gen-3 sticker windows ------------------------- */

.credit-provider-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 1.8vw, 16px);
  padding-top: 12px;
}

.credit-provider-card {
  position: relative;
  min-width: 0;
  padding: 13px;
  background: #FFFFFF;
  border: 3px solid #293131;
  border-radius: 8px;
  box-shadow: 4px 5px 0 rgba(41, 49, 49, .2);
}

.credit-provider-card[data-status="ready"] { border-top: 6px solid #58B858; }
.credit-provider-card[data-status="coming"] { border-top: 6px solid #D8A030; }

.credit-provider-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 9px;
}

.credit-provider-number {
  display: grid;
  width: 30px;
  height: 30px;
  place-content: center;
  color: #F8F8F8;
  font: 800 11px/1 'PokeText', ui-monospace, monospace;
  background: #E82010;
  border: 2px solid #293131;
  border-radius: 50%;
  box-shadow: inset 0 -4px 0 rgba(41, 49, 49, .2);
}

/* Provider name big in the dialogue face — the strongest thing on the card. */
.credit-provider-heading h3 {
  margin: 0 0 2px;
  color: #424242;
  font-family: 'PokeDialogue', ui-rounded, sans-serif;
  font-size: clamp(18px, 2.4vw, 24px);
  line-height: 1.05;
  text-shadow: 2px 2px 0 #D0D0C8;
}

.credit-amount {
  margin: 0;
  color: #3050C8;
  font-family: 'PokeDialogue', ui-rounded, sans-serif;
  font-size: 14px;
  text-shadow: 1px 1px 0 #D0D0C8;
}

.credit-summary {
  margin: 10px 0 8px;
  color: #606060;
  font-size: 13px;
  line-height: 1.5;
  text-shadow: 1px 1px 0 #E8E8E0;
}

.credit-steps {
  display: grid;
  gap: 7px;
  margin: 8px 0 11px;
  padding-left: 24px;
  color: #606060;
  font-size: 12.5px;
  line-height: 1.45;
  text-shadow: 1px 1px 0 #E8E8E0;
}

.credit-steps li::marker {
  color: #E00808;
  font-weight: 800;
}

/* Taped paper note, like the profile's field tags. */
.credit-notice {
  margin: 10px 0 0;
  padding: 8px 10px;
  color: #8B6420;
  font-size: 11px;
  line-height: 1.45;
  background: #FFF4D8;
  border: 2px solid #D8883C;
  border-radius: 2px;
  box-shadow: 2px 2px 0 rgba(41, 49, 49, .14);
}

/* ---- shared code / claim link rows ---------------------------------------- */

.credit-code-group {
  display: grid;
  gap: 5px;
  margin-top: 10px;
}

.credit-code-group > span {
  color: #C74637;
  font: 800 9px/1 'PokeText', ui-monospace, monospace;
  letter-spacing: .14em;
}

.credit-code-group > div {
  display: flex;
  align-items: stretch;
  gap: 7px;
}

.credit-code-group code {
  display: grid;
  min-width: 0;
  flex: 1;
  place-content: center;
  padding: 9px 10px;
  color: #424242;
  font: 800 clamp(15px, 2.2vw, 19px)/1 'PokeText', ui-monospace, monospace;
  letter-spacing: .08em;
  text-shadow: 1px 1px 0 #D0D0C8;
  background: #F8F8F8;
  border: 2px dashed #293131;
  border-radius: 4px;
}

.credit-claim-link {
  display: grid;
  min-width: 0;
  flex: 1;
  place-content: center;
  padding: 9px 10px;
  color: #E00808;
  font: 800 clamp(11px, 1.6vw, 13px)/1.2 'PokeText', ui-monospace, monospace;
  letter-spacing: .05em;
  text-align: center;
  text-decoration: none;
  text-shadow: 1px 1px 0 #D0D0C8;
  background: #F8F8F8;
  border: 2px solid #293131;
  border-radius: 4px;
  box-shadow: inset 0 0 0 2px #DED5DE, 2px 2px 0 #293131;
}

.credit-claim-link:hover { background: #FFFDF2; }

/* The obvious framed action: A-button yellow, hard shadow, press feedback.
   The JS flips the label to COPIED! for the confirmation beat. */
.credit-copy-button {
  min-width: 96px;
  padding: 8px 10px;
  color: #293131;
  font: 800 10px/1 'PokeText', ui-monospace, monospace;
  letter-spacing: .04em;
  background: #F8D048;
  border: 2px solid #293131;
  border-radius: 4px;
  box-shadow: 2px 2px 0 #293131;
  cursor: pointer;
}

.credit-copy-button:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

/* ---- safety aside: an Emerald message box (gen3-frame-msg) ----------------- */

.credits-help {
  margin-top: 18px;
  padding: 4px 8px 8px;
}

.credits-help h3 {
  margin: 0 0 7px;
  color: #424242;
  font: 800 12px/1.3 'PokeText', ui-monospace, monospace;
  letter-spacing: .06em;
  text-shadow: 1px 1px 0 #D0D0C8;
}

.credits-help ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 19px;
  color: #606060;
  font-size: 12.5px;
  line-height: 1.4;
  text-shadow: 1px 1px 0 #E8E8E0;
}

.credits-help li::marker { color: #E00808; }

.credit-copy-status {
  min-height: 1.2em;
  margin: 7px 0 0;
  color: #205838;
  font-weight: 800;
  font-size: 12px;
}

/* ---- small screens ---------------------------------------------------------- */

@media (max-width: 760px) {
  .hackathon-credits-open {
    top: 10px;
    right: 110px;
    min-width: 102px;
    min-height: 36px;
    padding: 6px 8px;
    font-size: 10px;
  }

  .hackathon-credits { --u: 1.5px; padding: 4px; }

  .credits-panel { padding: 9px 8px 14px; }

  .credits-masthead { gap: 9px; }
  .credits-intro { font-size: 12px; }
  .event-guide-nav { top: -11px; }
  .credit-provider-list { grid-template-columns: 1fr; }
  .personal-credit-bundle { grid-template-columns: 1fr; }
  .personal-credit-item > div { align-items: stretch; flex-direction: column; }

  .credit-provider-heading { grid-template-columns: auto minmax(0, 1fr); }
  .credit-provider-heading .credit-status { grid-column: 2; }
}

@media (max-width: 390px) {
  .hackathon-credits-open::before { display: none; }

  .event-guide-nav button {
    padding-left: 12px;
    font-size: 9px;
  }

  .credit-code-group > div { flex-direction: column; }
  .credit-copy-button { min-height: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  .hackathon-credits *,
  .hackathon-credits-open {
    scroll-behavior: auto !important;
  }
}
