/* tokens
   bg sky blue: #81cbde (sampled off the avatar's own backdrop)
   plate: #3f97b8   panel: #f2fbff   ink: #123047   muted: #4c7186
   accent: #ccff00 (acid lime, the rat's hood color, also the chain's own neon - used as an accent only)
   type: Titan One (name/button/labels - cheap game-asset chunk), Nunito (UI text),
         JetBrains Mono (item id / CA, real case, copyable)
   corner radius: 18px on the panel and button (a plastic game HUD rounds, this is the one place
   rounding is native to the concept, not default AI polish)
   spacing scale: 8 / 12 / 16 / 24 / 32 px
   motion: select button bounce + ring pulse on click only, plate glow is static
*/

@font-face {
  font-family: "Titan One";
  src: url("assets/fonts/titan-one-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("assets/fonts/nunito-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("assets/fonts/nunito-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("assets/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("assets/fonts/jetbrains-mono-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: #81cbde;
  color: #123047;
  font-family: "Nunito", ui-sans-serif, sans-serif;
  overflow: hidden;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 10px 12px 0;
}

.screen {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 6px 0;
}

.card {
  background: #f2fbff;
  border: 4px solid #123047;
  border-radius: 18px;
  box-shadow: 0 8px 0 rgba(18,48,71,0.28);
  width: min(94vw, 360px);
  padding: 12px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.titlebar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.unit-id {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  color: #4c7186;
  letter-spacing: 0.03em;
}

.card h1 {
  margin: 0;
  font-family: "Titan One", cursive;
  font-weight: 400;
  font-size: clamp(20px, 5.6vw, 26px);
  letter-spacing: 0.01em;
  flex: 1;
  text-align: center;
}

.rarity {
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 0.06em;
  color: #123047;
  background: #cfe9f2;
  border: 1px solid #4c7186;
  border-radius: 999px;
  padding: 2px 7px;
}

.stage {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: clamp(120px, 27vh, 190px);
}

.plate {
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 78%;
  height: 26px;
  background: radial-gradient(ellipse at center, #62b6d3 0%, #3f97b8 70%, transparent 100%);
  border-radius: 50%;
  transform: translateX(-50%);
}

.model {
  position: relative;
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 3px rgba(18,48,71,0.22));
}

.stats {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.stats li {
  display: grid;
  grid-template-columns: 66px 1fr 22px;
  align-items: center;
  gap: 6px;
}

.stat-name {
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 0.02em;
  color: #4c7186;
}

.bar {
  display: block;
  height: 7px;
  background: #d7edf4;
  border: 1px solid #123047;
  border-radius: 4px;
  overflow: hidden;
}

.fill {
  display: block;
  height: 100%;
  background: #ccff00;
}

.stat-num {
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  text-align: right;
  color: #123047;
}

.select-btn {
  position: relative;
  margin-top: 6px;
  border: none;
  border-radius: 14px;
  background: #123047;
  color: #f2fbff;
  padding: 11px 0;
  box-shadow: 0 5px 0 #0a1e2e;
  cursor: pointer;
  overflow: visible;
}

.select-btn .label {
  position: relative;
  z-index: 1;
  font-family: "Titan One", cursive;
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.04em;
}

.select-btn .ring {
  position: absolute;
  inset: -6px;
  border-radius: 20px;
  border: 3px solid #ccff00;
  opacity: 0;
  pointer-events: none;
}

.select-btn:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #0a1e2e;
}

.select-btn.bounce .label { animation: bounce 0.42s ease; }
.select-btn.bounce .ring { animation: ring-pulse 0.5s ease-out; }

@keyframes bounce {
  0% { transform: scale(1); }
  35% { transform: scale(1.14); }
  100% { transform: scale(1); }
}

@keyframes ring-pulse {
  0% { opacity: 0.9; transform: scale(0.9); }
  100% { opacity: 0; transform: scale(1.12); }
}

.pick-count {
  margin: 2px 0 0;
  font-size: 10px;
  color: #4c7186;
  text-align: center;
}

.item-row {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 2px dashed #b9d9e4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.item-label {
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 0.05em;
  color: #4c7186;
}

.ca {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 700;
  font-size: 11px;
  color: #123047;
  background: #fff;
  border: 2px solid #123047;
  border-bottom: 3px solid #ccff00;
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
}
.ca:hover { background: #eafff0; }

.chrome {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.55em;
  font-size: 10px;
  letter-spacing: 0.02em;
  color: #123047;
  padding: 6px 0 8px;
}
.ticker { font-family: "JetBrains Mono", monospace; font-weight: 700; }
.chrome a { color: #123047; text-decoration: none; border-bottom: 1px solid rgba(18,48,71,0.4); }
.chrome a:hover { border-bottom-color: #123047; }
.sep { color: rgba(18,48,71,0.35); }
.canary { font-family: "JetBrains Mono", monospace; }

@media (prefers-reduced-motion: reduce) {
  .select-btn.bounce .label,
  .select-btn.bounce .ring { animation: none; }
}

@media (max-width: 400px) {
  html, body { overflow: auto; }
  .card { padding: 10px 12px 12px; }
  .stage { height: clamp(100px, 22vh, 150px); }
}
