/* Ceuta — a Spanish city on the Moroccan shore.
   Sunlit scene, dark game chrome around it. */

:root {
  --ink: #1a1410;
  --chrome: #16110e;
  --chrome-raised: #241b15;
  --chrome-line: #3b2c22;
  --chrome-line-lit: #5a4432;

  --text: #f6ecdd;
  --text-dim: #bda98f;
  --text-faint: #8a7660;

  --gold: #f1bf00;
  --gold-deep: #b98d00;
  --es-red: #aa151b;
  --ma-green: #00814a;
  --sea: #1f6fa8;
  --danger: #e0483d;

  --radius: 16px;
  --display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: ui-sans-serif, system-ui, "Segoe UI", Inter, Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 400px at 50% -5%, #2a1e16, transparent 70%),
    var(--chrome);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ================= HUD ================= */

.hud {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(14px, 3vw, 36px);
  background: linear-gradient(180deg, #1e1710, #16110e);
  border-bottom: 2px solid var(--chrome-line);
  position: sticky;
  top: 0;
  z-index: 40;
}

.hud-brand { display: flex; align-items: baseline; gap: 12px; }
.hud-brand h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.4rem, 3.4vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--gold);
  text-shadow: 0 2px 0 #6b4f00, 0 3px 8px rgb(0 0 0 / 0.6);
}
.hud-sub {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.hud-sub em { font-style: normal; opacity: 0.6; }

.flag { width: 30px; height: 21px; border-radius: 3px; align-self: center; box-shadow: 0 0 0 1px #0006, 0 2px 6px #0008; }
.flag-es { background: linear-gradient(to bottom, var(--es-red) 0 25%, var(--gold) 25% 75%, var(--es-red) 75%); }

/* The badge is pixel art, so it is scaled with nearest-neighbour — smoothing
   turns crisp blocks into mush at these sizes. */
.hud-logo {
  width: 38px;
  height: 38px;
  align-self: center;
  image-rendering: pixelated;
  filter: drop-shadow(0 2px 5px #000a);
}

.hud-right { display: flex; align-items: center; gap: 12px; }

.purse {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  background: #100c09;
  border: 2px solid var(--chrome-line-lit);
  font-family: var(--mono);
  box-shadow: inset 0 2px 6px #0009;
}
.purse strong { color: var(--gold); font-size: 1rem; }
.purse-unit { font-size: 0.7rem; color: var(--text-faint); }
/* the $PESO balance wears the token's own badge rather than a generic coin */
.coin {
  width: 19px; height: 19px;
  background: url("logo.png") center / contain no-repeat;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 6px #f1bf0055);
}

/* ================= buttons ================= */

.btn {
  font: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 10px 18px;
  border-radius: 11px;
  border: 2px solid var(--chrome-line-lit);
  background: linear-gradient(180deg, #35271d, #241b15);
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 3px 0 #100b08;
  transition: transform 0.1s, box-shadow 0.1s, filter 0.15s;
}
.btn:hover:not(:disabled) { filter: brightness(1.16); }
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 0 0 #100b08; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.btn-gold {
  background: linear-gradient(180deg, #ffd54a, var(--gold) 45%, var(--gold-deep));
  border-color: #7d5f00;
  color: #3a2b00;
  box-shadow: 0 3px 0 #6b5000;
  text-shadow: 0 1px 0 #ffe9a0;
}
.btn-danger { border-color: #7a2c26; color: #ffbdb6; background: linear-gradient(180deg, #40211d, #2b1613); }
.btn-big { width: 100%; padding: 14px; font-size: 1rem; }
.btn-step { padding: 8px 15px; font-size: 1.15rem; line-height: 1; }

/* ================= layout ================= */

main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px clamp(12px, 3vw, 36px) 60px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ================= the world ================= */

.world {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 3px solid #4a3524;
  box-shadow: 0 26px 60px -26px #000, inset 0 0 0 2px #ffffff10;
  background: #8fc6ec;
  min-height: 320px;
}

.scene { display: block; width: 100%; height: clamp(320px, 42vw, 520px); }

/* --- ambient motion --- */
.sun { animation: pulse 7s ease-in-out infinite; transform-origin: 1010px 96px; }
@keyframes pulse { 50% { opacity: 0.82; transform: scale(1.05); } }

.cloud-a { animation: drift 74s linear infinite; }
.cloud-b { animation: drift 96s linear infinite; }
.cloud-c { animation: drift 120s linear infinite; }
@keyframes drift {
  from { transform: translateX(-260px); }
  to { transform: translateX(1360px); }
}

.wave-1 { animation: swell 9s ease-in-out infinite; }
.wave-2 { animation: swell 11s ease-in-out infinite reverse; }
.wave-3 { animation: swell 13s ease-in-out infinite; }
@keyframes swell { 50% { transform: translateX(60px); } }

.boat { animation: sail 58s linear infinite; }
@keyframes sail {
  from { transform: translate(-80px, 258px); }
  to { transform: translate(1260px, 250px); }
}

.fronds { animation: sway 5.5s ease-in-out infinite; transform-origin: 4px -60px; }
.fronds-b { animation-duration: 6.8s; }
@keyframes sway { 50% { transform: rotate(5deg); } }

.banner-cloth { animation: ripple 3.4s ease-in-out infinite; transform-origin: 518px 110px; }
@keyframes ripple { 50% { transform: scaleX(0.9) skewY(-3deg); } }

.flag-far { animation: ripple 4.2s ease-in-out infinite; transform-origin: 234px 130px; }

/* --- the plaza where staked citizens stand --- */

.plaza {
  position: absolute;
  left: 0; right: 0;
  bottom: 6%;
  min-height: 108px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  padding: 10px clamp(12px, 3vw, 40px);
  transition: background 0.18s, box-shadow 0.18s;
}
.plaza.drop-ready {
  background: linear-gradient(180deg, transparent, #f1bf0033);
  box-shadow: inset 0 -5px 0 var(--gold);
}

.plaza-hint {
  margin: 0;
  align-self: center;
  text-align: center;
  font-size: 0.86rem;
  font-weight: 600;
  color: #2c2114;
  background: #ffffffcc;
  border: 2px solid #00000018;
  border-radius: 12px;
  padding: 9px 16px;
  backdrop-filter: blur(3px);
  max-width: 34rem;
}
.plaza-hint span { font-weight: 400; font-size: 0.78rem; color: #5c4a33; }

/* a citizen standing in the plaza */
.pawn {
  position: relative;
  width: clamp(52px, 6vw, 68px);
  cursor: pointer;
  animation: bob 3.4s ease-in-out infinite;
  transition: transform 0.14s;
}
.pawn:nth-child(3n) { animation-duration: 4.1s; }
.pawn:nth-child(3n + 1) { animation-duration: 3.7s; animation-delay: -1.2s; }
@keyframes bob { 50% { transform: translateY(-6px); } }

.pawn:hover { transform: scale(1.09); z-index: 3; }
.pawn img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: 50% 22%;
  border-radius: 50%;
  image-rendering: pixelated;
  background: #d9bf92;
  border: 3px solid var(--gold);
  box-shadow: 0 6px 12px -4px #00000090;
}
.pawn.moroccan img { border-color: #35d68a; }
.pawn.selected img { box-shadow: 0 0 0 4px #ffffffcc, 0 6px 14px -4px #000; }
.pawn.settling { opacity: 0.55; filter: grayscale(0.4); }

.pawn::after {
  content: attr(data-label);
  position: absolute;
  left: 50%;
  bottom: -17px;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 700;
  white-space: nowrap;
  padding: 1px 7px;
  border-radius: 999px;
  background: #150f0bd9;
  color: var(--gold);
}
.pawn.moroccan::after { color: #6ef0b0; }

/* --- overlaid stats --- */

.world-stats {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.wstat {
  background: #150f0bd0;
  border: 2px solid #ffffff26;
  border-radius: 10px;
  padding: 5px 11px;
  text-align: center;
  backdrop-filter: blur(4px);
  min-width: 62px;
}
.wstat b { display: block; font-family: var(--mono); font-size: 0.95rem; color: var(--gold); }
.wstat span {
  display: block;
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-faint);
}

.world-wrap { position: relative; }

.plaza-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  max-width: 60%;
}

/* ================= settling overlay ================= */

.settling {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  background: #0b0806cc;
  backdrop-filter: blur(5px);
  padding: 20px;
}
.settling-card {
  max-width: 26rem;
  text-align: center;
  background: linear-gradient(180deg, #241b15, #17110d);
  border: 3px solid var(--chrome-line-lit);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 30px 70px -20px #000;
}
.settling-card h3 { margin: 4px 0 6px; font-family: var(--display); font-size: 1.4rem; color: var(--gold); }
.settling-card p { margin: 0 0 14px; color: var(--text-dim); font-size: 0.9rem; }
.settling-note { font-size: 0.74rem !important; color: var(--text-faint) !important; margin: 14px 0 0 !important; }

.dice { display: flex; gap: 8px; justify-content: center; margin-bottom: 12px; }
.dice span {
  width: 16px; height: 16px; border-radius: 4px;
  background: var(--gold);
  animation: tumble 1.1s ease-in-out infinite;
}
.dice span:nth-child(2) { animation-delay: 0.14s; background: #fff0b8; }
.dice span:nth-child(3) { animation-delay: 0.28s; }
@keyframes tumble {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-13px) rotate(180deg); }
}

.progress { height: 8px; border-radius: 999px; background: #0d0906; overflow: hidden; border: 1px solid #00000080; }
.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--es-red), var(--gold));
  transition: width 0.4s ease;
}

/* ================= roster + mint ================= */

.lower {
  display: grid;
  /* minmax(0, …) so the roster's wide contents scroll inside their own column
     instead of stretching the grid and pushing the page sideways */
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}
@media (max-width: 900px) { .lower { grid-template-columns: minmax(0, 1fr); } }

.roster, .mint-panel {
  min-width: 0;
  background: linear-gradient(180deg, #241b15, #1b1410);
  border: 3px solid var(--chrome-line);
  border-radius: var(--radius);
  padding: 16px;
}

.roster-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.roster h2, .mint-panel h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.15rem;
  color: var(--gold);
  letter-spacing: 0.01em;
}
.roster-count { font-family: var(--mono); font-size: 0.76rem; color: var(--text-faint); }

.roster-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  min-height: 150px;
  scrollbar-width: thin;
}
.roster-strip::-webkit-scrollbar { height: 8px; }
.roster-strip::-webkit-scrollbar-thumb { background: var(--chrome-line-lit); border-radius: 99px; }

.empty { margin: auto; color: var(--text-faint); font-size: 0.88rem; }

/* a citizen card in the roster */
.card {
  flex: none;
  width: 106px;
  border-radius: 12px;
  overflow: hidden;
  background: #120d09;
  border: 3px solid var(--chrome-line-lit);
  cursor: grab;
  transition: transform 0.13s, border-color 0.13s;
  position: relative;
}
.card:hover { transform: translateY(-4px); border-color: var(--gold); }
.card:active { cursor: grabbing; }
.card.dragging { opacity: 0.4; }
.card.selected { border-color: var(--gold); box-shadow: 0 0 0 3px #f1bf0044; }
.card.moroccan.selected { border-color: #35d68a; box-shadow: 0 0 0 3px #35d68a44; }

.card img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: 50% 18%;
  image-rendering: pixelated;
  background: #2a2119;
}
.card-body { padding: 6px 8px 8px; }
.card-title { font-family: var(--mono); font-size: 0.72rem; font-weight: 700; }
.card-sub { font-size: 0.62rem; color: var(--text-faint); font-family: var(--mono); }
.card.moroccan .card-sub { color: #6ef0b0; }

.ribbon {
  position: absolute;
  top: 7px; left: -22px;
  transform: rotate(-38deg);
  background: var(--es-red);
  color: #fff;
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 26px;
  box-shadow: 0 1px 4px #0008;
}
.card.moroccan .ribbon { background: var(--ma-green); }

/* --- mint panel --- */

.mint-panel { display: flex; flex-direction: column; gap: 12px; }
.amount-row { display: flex; gap: 8px; }
.amount-row input {
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: 1.3rem;
  text-align: center;
  padding: 8px;
  border-radius: 10px;
  border: 2px solid var(--chrome-line-lit);
  background: #100c09;
  color: var(--text);
}
.amount-row input::-webkit-outer-spin-button,
.amount-row input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.amount-row input { -moz-appearance: textfield; }

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  border-top: 2px solid var(--chrome-line);
  border-bottom: 2px solid var(--chrome-line);
  color: var(--text-dim);
  font-size: 0.85rem;
}
.price-row strong { font-family: var(--mono); font-size: 1.05rem; color: var(--gold); }

.checkbox { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; font-size: 0.82rem; color: var(--text-dim); }
.checkbox input { margin-top: 3px; accent-color: var(--es-red); flex: none; }

.odds { margin: 0; font-size: 0.72rem; color: var(--text-faint); text-align: center; }
.odds b { color: var(--text-dim); }

/* ================= banner ================= */

.banner {
  margin: 14px clamp(12px, 3vw, 36px) 0;
  padding: 12px 16px;
  border-radius: 12px;
  border: 2px solid var(--chrome-line-lit);
  background: var(--chrome-raised);
  font-size: 0.87rem;
}
.banner.error { border-color: #7a2c26; background: #2b1613; color: #ffbdb6; }
.banner.success { border-color: #1d6b48; background: #12291f; color: #9ff0c6; }
.banner.info { border-color: #7d6320; background: #2a2210; color: #ffe6a0; }

/* an inline fix-it button, so a wrong network is one tap rather than a hunt
   through the wallet's settings */
.banner-action {
  margin-left: 4px;
  padding: 5px 12px;
  border-radius: 8px;
  border: 2px solid currentColor;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.banner-action:hover { background: rgba(255, 255, 255, 0.1); }

/* ================= footer ================= */

footer {
  border-top: 2px solid var(--chrome-line);
  padding: 22px clamp(12px, 3vw, 36px) 40px;
  color: var(--text-faint);
  font-size: 0.78rem;
  max-width: 1240px;
  margin: 0 auto;
}
footer p { margin: 0 0 8px; max-width: 70ch; }
.addresses {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 2px 20px;
  font-family: var(--mono);
  font-size: 0.68rem;
  max-width: none;
}
.addresses span { display: flex; gap: 8px; }
.addresses b { color: var(--text-dim); min-width: 5.5em; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
}

/* ================= how it works ================= */

.explain {
  background: linear-gradient(180deg, #241b15, #1b1410);
  border: 3px solid var(--chrome-line);
  border-radius: var(--radius);
  padding: clamp(18px, 3vw, 28px);
}
.explain h2 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 1.25rem;
  color: var(--gold);
}
.explain-lede { margin: 0 0 20px; color: var(--text-dim); max-width: 62ch; font-size: 0.92rem; }

/* ================= the "who you might get" gallery ================= */

/* The set is always exactly five, so the column count is stated outright.
   auto-fit was laying out more tracks than there were cards and squeezing them
   to a third of the available width. */
.gallery {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 1000px) {
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.gcard {
  margin: 0;
  background: #100c09;
  border: 2px solid var(--chrome-line-lit);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.gcard img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  object-position: top center;
  display: block;
  /* the art is pixel art; smoothing it on upscale muddies the outlines */
  image-rendering: pixelated;
  border-bottom: 2px solid var(--chrome-line);
}
.gcard figcaption {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.gcard figcaption > b {
  font-family: var(--display);
  color: var(--gold);
  font-size: 1rem;
}
.gcard-odds {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--text-faint);
  letter-spacing: 0.02em;
}
.gcard-note { font-size: 0.78rem; color: var(--text-dim); line-height: 1.45; }

.gcard-spanish { border-color: #7a5c00; }
.gcard-rare { border-color: #7a2c26; box-shadow: 0 0 18px #aa151b33; }
.gcard-odds-rare { color: #ff9d94; }

.gallery-foot {
  margin: 16px 0 0;
  font-size: 0.82rem;
  color: var(--text-faint);
  max-width: 74ch;
  line-height: 1.55;
}
.explain-lede em { color: var(--gold); font-style: normal; font-weight: 700; }

.steps {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}
.steps li {
  position: relative;
  background: #120d09;
  border: 2px solid var(--chrome-line-lit);
  border-radius: 12px;
  padding: 16px 16px 14px;
}
.steps h3 { margin: 0 0 5px; font-size: 0.95rem; color: var(--text); }
.steps p { margin: 0; font-size: 0.82rem; color: var(--text-dim); line-height: 1.5; }
.steps b { color: var(--gold); }

.step-n {
  position: absolute;
  top: -13px;
  left: 14px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffd54a, var(--gold-deep));
  color: #3a2b00;
  font-family: var(--mono);
  font-weight: 800;
  font-size: 0.82rem;
  border: 2px solid #7d5f00;
}

.explain-why {
  margin: 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: #100c09;
  border-left: 4px solid var(--es-red);
  font-size: 0.84rem;
  color: var(--text-dim);
  line-height: 1.6;
  max-width: 82ch;
}
.explain-why b { color: var(--text); }

/* ================= how to play ================= */

.sides {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.side {
  background: #120d09;
  border: 2px solid var(--chrome-line-lit);
  border-radius: 12px;
  padding: 16px 18px;
}
.side-es { border-top: 4px solid var(--gold); }
.side-ma { border-top: 4px solid #35d68a; }

.side h3 {
  margin: 0 0 10px;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pip { width: 11px; height: 11px; border-radius: 3px; flex: none; }
.pip-es { background: linear-gradient(to bottom, var(--es-red) 0 30%, var(--gold) 30% 70%, var(--es-red) 70%); }
.pip-ma { background: linear-gradient(to bottom, var(--ma-red, #c1272d) 0 45%, #35d68a 45%); }

.side ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 7px; }
.side li { font-size: 0.83rem; color: var(--text-dim); line-height: 1.5; }
.side b { color: var(--gold); }
.side-ma b { color: #6ef0b0; }

/* ================= mint phase ================= */

.mint-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.phase {
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgb(241 191 0 / 0.16);
  color: var(--gold);
  border: 1px solid rgb(241 191 0 / 0.4);
  white-space: nowrap;
}
.phase-peso { background: rgb(53 214 138 / 0.14); color: #6ef0b0; border-color: rgb(53 214 138 / 0.4); }

.gen0 { display: flex; flex-direction: column; gap: 5px; }
.gen0-track {
  height: 7px;
  border-radius: 999px;
  background: #0d0906;
  border: 1px solid #00000080;
  overflow: hidden;
}
.gen0-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--es-red), var(--gold));
  transition: width 0.4s ease;
}
.gen0-note { margin: 0; font-size: 0.72rem; color: var(--text-faint); font-family: var(--mono); }

/* ================= claimable + countdown ================= */

.claimable {
  align-self: center;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--gold);
  background: #150f0bd9;
  border: 2px solid rgb(241 191 0 / 0.4);
  border-radius: 999px;
  padding: 5px 12px;
  backdrop-filter: blur(4px);
  white-space: nowrap;
}

/* A bar beneath the scene, not an overlay on it — the bottom of the world is
   already the plaza's, and two absolutely-positioned boxes sharing a corner
   collide the moment either one wraps. */
.countdown {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 9px;
  margin-top: 10px;
  background: #150f0be6;
  border: 2px solid rgb(241 191 0 / 0.45);
  border-radius: 12px;
  padding: 9px 16px;
}
.countdown b { font-family: var(--mono); font-size: 1.05rem; color: var(--gold); }
.countdown span { font-size: 0.76rem; color: var(--text-dim); }

/* ================= odds tables ================= */

.tables {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.tbl {
  background: #120d09;
  border: 2px solid var(--chrome-line-lit);
  border-radius: 12px;
  padding: 14px 16px;
  overflow-x: auto;
}
.tbl h3 { margin: 0 0 10px; font-size: 0.92rem; color: var(--text); }
.tbl table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.tbl th {
  text-align: left;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  font-weight: 700;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--chrome-line);
}
.tbl td { padding: 5px 0; color: var(--text-dim); font-family: var(--mono); }
.tbl td:first-child { font-family: var(--sans); color: var(--text); }
.tbl tr.rare td { color: var(--gold); }
.tbl .ma { color: #6ef0b0; }
.tbl-note { margin: 10px 0 0; font-size: 0.74rem; color: var(--text-faint); }
.tbl-note b { color: var(--text-dim); }

/* ================= narrow screens ================= */

/* Below this the scene is too tight to float controls over it, so the action
   bar drops underneath and everything shrinks to thumb size. */
@media (max-width: 720px) {
  main { padding: 12px 12px 40px; gap: 12px; }

  .hud { padding: 10px 12px; gap: 10px; }
  .hud-brand { gap: 8px; }
  .hud-brand h1 { font-size: 1.25rem; }
  .hud-sub { display: none; }
  .flag { width: 24px; height: 17px; }
  .purse { padding: 6px 11px; }
  .purse strong { font-size: 0.9rem; }

  /* touch targets stay comfortable even as type shrinks */
  .btn { padding: 11px 14px; font-size: 0.85rem; min-height: 42px; }
  .btn-step { padding: 8px 14px; min-height: 42px; }
  #connect { padding: 11px 12px; font-size: 0.8rem; }

  .scene { height: clamp(260px, 56vw, 340px); }

  .world-stats { top: 8px; left: 8px; gap: 4px; }
  .wstat { padding: 4px 8px; min-width: 52px; }
  .wstat b { font-size: 0.8rem; }
  .wstat span { font-size: 0.5rem; letter-spacing: 0.05em; }

  /* out from over the scene, into its own row */
  .plaza-actions {
    position: static;
    max-width: none;
    margin-top: 10px;
    justify-content: stretch;
  }
  .plaza-actions .btn { flex: 1; }
  .claimable {
    flex-basis: 100%;
    text-align: center;
    order: -1;
    font-size: 0.8rem;
  }

  .plaza { bottom: 3%; gap: 7px; min-height: 84px; padding: 8px 10px; }
  .pawn { width: clamp(44px, 13vw, 58px); }
  .pawn::after { font-size: 0.55rem; bottom: -15px; padding: 1px 5px; }

  .plaza-hint { font-size: 0.76rem; padding: 7px 12px; }
  .plaza-hint span { font-size: 0.68rem; }

  .countdown { padding: 7px 12px; gap: 4px 6px; }
  .countdown b { font-size: 0.92rem; }
  .countdown span { font-size: 0.68rem; }

  .roster, .mint-panel, .explain { padding: 14px; }
  .card { width: 92px; } /* roster card, not the gallery card */
  .roster-strip { min-height: 132px; }

  .settling-card { padding: 22px 18px; }
  footer { padding: 18px 12px 32px; }
  .addresses { grid-template-columns: 1fr; font-size: 0.62rem; }
  .addresses span { flex-wrap: wrap; }
}

/* very small phones: let the buttons stack rather than squeeze */
@media (max-width: 420px) {
  .hud-brand h1 { font-size: 1.1rem; }
  .plaza-actions { flex-direction: column; }
  .plaza-actions .btn { width: 100%; }
  .amount-row input { font-size: 1.15rem; }
  .wstat { min-width: 46px; padding: 3px 6px; }
  .pawn { width: 42px; }
  .card { width: 84px; } /* roster card, not the gallery card */
}

/* ================= wallet picker ================= */

.wallet-card { max-width: 22rem; text-align: left; }
.wallet-card h3 { text-align: center; }
.wallet-card > p { text-align: center; }

.wallet-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.wallet-row {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px 13px;
  border-radius: 11px;
  border: 2px solid var(--chrome-line-lit);
  background: #120d09;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.14s, transform 0.1s;
}
.wallet-row:hover { border-color: var(--gold); transform: translateY(-1px); }
.wallet-row:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.wallet-row.recent { border-color: rgb(241 191 0 / 0.5); }

.wallet-row img,
.wallet-blank {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  flex: none;
  background: #241b15;
  object-fit: contain;
}

.wallet-name { flex: 1; }
.wallet-tag {
  font-family: var(--mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
  background: rgb(241 191 0 / 0.14);
  border-radius: 999px;
  padding: 2px 8px;
}

#walletCancel { width: 100%; }
