/* ============================================================================
   MiNiGAME home page stylesheet. home.css

   Loads AFTER site/css/minigame.css and only on index.html. It carries the
   six picks made on proposals.html and nothing else:

     01 Hero          option A, promo art lit, dimmed down from A toward prod
     02 Play button   option C, the button IS the address, no icon on it
     03 Features      option A, bento, the wide tile carries the A to Z ladder
     05 Connect       option B, join in three steps
     06 New sections  the live strip under the hero, and the vote callout

   WHAT IS NOT IN HERE
     - Nothing from .v2-nav, .v2-nav--icons, .v2-nav-right, .v2-nav-play,
       .v2-dot or .v2-nav-online. Those are ported into minigame.css by the
       shell package and duplicating them here would fight that port.
     - No sticky phone Copy IP bar. With pick 02 the hero button is already
       the copy point, so a second one pinned to the thumb is noise.

   Class names are the board's own (.v2-*), so a rule here lines up one to one
   with the block it came from in site/css/ideas.css. ideas.css itself is never
   loaded by this page.

   Layout. ideas.css used container queries against a `v2` container. This file
   uses plain media queries at the site breakpoints, 375 / 768 / 1024 / 1440,
   mobile first, the same way minigame.css does. Every `cqw` became `vw`.

   Tokens come from minigame.css: --ground --panel --stone --line --gold --ore
   --torch --edge --money --tokens --blue --ink --body --r --dur --ease.
   ========================================================================= */


/* ===========================================================================
   0. Display face. Mirrors minigame.css so a font switch stays one change
      there and one here.
   ========================================================================= */

.v2-hero-logo,
.v2-btn-ip,
.v2-ip-pill,
.v2-tile h3,
.v2-ladder span,
.v2-step h3,
.v2-step::before,
.v2-live-val,
.v2-vote h3,
.v2-conn b {
  font-family: var(--font-display);
  font-weight: 400;
}


/* ===========================================================================
   1. HERO  ·  pick 01, option A, "Promo art, actually lit"
   ========================================================================= */

.v2-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 40px 16px 44px;
  text-align: center;
  background-color: var(--ground);
}
.v2-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  max-width: 980px;
  margin-inline: auto;
}
.v2-hero-logo {
  width: 100%;
  max-width: 760px;
  margin: 0;
  /* The wordmark is never cropped and never squashed: its own ratio, held
     before the image decodes so the buttons below do not jump. */
  aspect-ratio: 2802 / 724;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 44px rgba(255, 154, 31, 0.3));
}
.v2-hero-logo img { display: block; width: 100%; height: auto; }

.v2-tagline {
  max-width: 52ch;
  margin: 0;
  font-size: clamp(16px, 1.9vw, 20px);
  line-height: 1.5;
  color: #E2D9C9;
  text-wrap: pretty;
}
.v2-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

@media (min-width: 768px) {
  .v2-hero { padding: 56px 24px 60px; }
  .v2-hero-inner { gap: 22px; }
}
@media (min-width: 1024px) {
  .v2-hero { padding: 68px 32px 72px; }
}

/* ---- The art itself.

   THE DIM. Three settings exist and this is the third:

     live today   brightness(0.42) with grayscale .78 and sepia .4, under a
                  0.50 to 0.80 vertical wash. The art reads as mud.
     board, A     brightness(0.82) saturate(0.85), under a wash that drops to
                  0.18 in the middle. The characters fight the wordmark.
     here         brightness(0.66) saturate(0.88), and every stop of the wash
                  pulled up roughly 0.14 to 0.17 from A.

   0.66 sits between the two and closer to A, which is what was asked. The
   art reads as a backdrop and the wordmark stays the subject. Worst case for
   contrast is the brightest pixel of the art at the lightest point of the
   wash: that composites to about #454545, and the tagline at #E2D9C9 holds
   6.8:1 on it. Everywhere else on the hero is darker, so nothing on this
   section is under 4.5:1.

   The art is pinned to its bottom edge so its own headline is cropped off the
   top, and the side stops of the first gradient are heavy enough to swallow
   the art's "+100% SELL BOOSTER" callout on the right. */
.v2-hero--art::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: url("../../assets/hero/minigame-hero-1920.jpg") center 100% / cover no-repeat;
  filter: brightness(0.66) saturate(0.88);
}
.v2-hero--art::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(13, 11, 9, 0.95) 0%, rgba(13, 11, 9, 0.52) 22%, rgba(13, 11, 9, 0.38) 50%, rgba(13, 11, 9, 0.68) 78%, rgba(13, 11, 9, 0.99) 100%),
    linear-gradient(180deg, rgba(13, 11, 9, 0.74) 0%, rgba(13, 11, 9, 0.42) 35%, rgba(13, 11, 9, 0.8) 78%, var(--ground) 100%);
}
@media (max-width: 767px) {
  /* A phone frame is taller than it is wide, so `cover` would start showing
     the art's own headline. Oversize it and keep it pinned to the bottom. */
  .v2-hero--art::before { background-size: auto 140%; }
}
.v2-hero--art .v2-tagline {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9), 0 0 18px rgba(0, 0, 0, 0.8);
}


/* ===========================================================================
   2. THE PLAY BUTTON  ·  pick 02, option C, "The button is the address"

   No icon rides in front of the label at any size. The old pickaxe glyph is
   gone from this button and does not come back at a breakpoint. The small
   copy glyph after the address is a UI mark, not an item: items.js never
   swaps it, and it is the only thing in the button besides the address.
   ========================================================================= */

.v2-btn-ip {
  gap: 12px;
  min-height: 60px;
  padding: 12px 26px;
  font-size: clamp(20px, 4.6vw, 28px);
  letter-spacing: 0.01em;
}
/* The address can never wrap or be cut. It is the thing people came to read. */
.v2-btn-ip > [data-copy-label] { white-space: nowrap; }
.v2-btn-ip .mg-icon { flex: none; color: #16130F; }
.v2-btn-ip.is-copied { background-image: linear-gradient(180deg, #5BD63C 0%, var(--money) 60%, #249108 100%); }


/* ===========================================================================
   3. THE ADDRESS PILL  ·  used once, inside step 1 of the join card.
      Sizing lives in section 6 with the steps, because the overflow this
      fixes was a step layout problem, not a pill problem.
   ========================================================================= */

.v2-ip-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: 100%;
  min-height: 48px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid #5A4514;
  background-color: var(--stone);
  background-image: linear-gradient(180deg, rgba(252, 186, 3, 0.1), rgba(0, 0, 0, 0.25));
  box-shadow: inset 0 1px 0 rgba(252, 186, 3, 0.22), 0 3px 0 #000, 0 0 30px -10px rgba(255, 154, 31, 0.55);
  color: var(--ore);
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-shadow: 0 0 16px rgba(255, 213, 43, 0.3);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
/* NOTE, this is half of the overflow fix. ideas.css had
   `.v2-ip-pill > span { min-width: 0 }`, which lets a nowrap label be squeezed
   below its own min-content and paint straight through the rounded border.
   Leaving min-width at its flex default of auto means the label can never be
   squeezed at all, so the only way to fit a narrow column is a smaller face,
   which is what the clamp in section 6 does. */
.v2-ip-pill > [data-copy-label] {
  white-space: nowrap;
  overflow: visible;
}
.v2-ip-pill .mg-icon { flex: none; color: var(--gold); }
@media (hover: hover) {
  .v2-ip-pill:hover { border-color: var(--gold); background-color: #2B241B; }
}
.v2-ip-pill:focus-visible { outline: 3px solid var(--ore); outline-offset: 3px; }
.v2-ip-pill:active,
.v2-ip-pill.is-pressed {
  transform: translateY(2px);
  box-shadow: inset 0 1px 0 rgba(252, 186, 3, 0.22), 0 1px 0 #000;
}
.v2-ip-pill.is-copied { border-color: var(--money); color: var(--money); text-shadow: none; }
.v2-ip-pill.is-copied .mg-icon { color: var(--money); }


/* ===========================================================================
   4. LIVE STRIP  ·  pick 06. Four tiles, every number already on the wire.
   ========================================================================= */

.v2-live {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.v2-live-tile {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 14px 16px;
}
.v2-live-tile > * { display: block; min-width: 0; }
.v2-live-label { font-size: 16px; letter-spacing: 0.03em; color: #BDB3A4; }
.v2-live-val {
  overflow: hidden;
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.15;
  color: var(--ore);
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 0 14px rgba(255, 213, 43, 0.28);
}
.v2-live-val.is-money { color: var(--money); text-shadow: none; }
.v2-live-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  font-size: 16px;
  color: #CFC6B8;
  white-space: nowrap;
}
.v2-live-sub a { overflow: hidden; color: var(--ink); text-decoration: none; text-overflow: ellipsis; }
.v2-live-sub a:hover { color: var(--gold); text-decoration: underline; }
.v2-live-sub a:focus-visible { outline: 2px solid var(--ore); outline-offset: 2px; }
/* The head renders are 64px source art, drawn at an exact half. */
.v2-live-sub .mg-head {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 3px;
  image-rendering: pixelated;
}
@media (min-width: 1024px) {
  .v2-live { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .v2-live-tile { padding: 16px 20px; }
}


/* ===========================================================================
   5. BENTO  ·  pick 03, option A, "the wide tile earns its width"
   ========================================================================= */

/* Shared tile surface: raised block, gold hairline on top, black under it. */
.v2-tile,
.v2-step,
.v2-live-tile {
  border-radius: 10px;
  border: 1px solid var(--line);
  background-color: var(--panel);
  background-image:
    linear-gradient(180deg, rgba(255, 154, 31, 0.06) 0%, rgba(0, 0, 0, 0) 42%),
    linear-gradient(180deg, rgba(0, 0, 0, 0) 56%, rgba(0, 0, 0, 0.42) 100%);
  box-shadow:
    inset 0 1px 0 rgba(252, 186, 3, 0.16),
    inset 0 -1px 0 rgba(0, 0, 0, 0.65),
    0 2px 0 rgba(0, 0, 0, 0.55),
    0 16px 30px -20px rgba(0, 0, 0, 0.95);
}

.v2-bento {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.v2-bento > li { min-width: 0; display: flex; }
.v2-bento .v2-lead { grid-column: span 2; }
.v2-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  padding: 16px;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
@media (hover: hover) {
  .v2-tile:hover { transform: translateY(-2px); }
}
.v2-tile .mg-icon { flex: none; }
.v2-tile h3 { margin: 0; font-size: 18px; line-height: 1.12; color: var(--ink); }
.v2-tile p { margin: 0; font-size: 16px; line-height: 1.5; color: #CFC6B8; }

.v2-lead-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; width: 100%; }
.v2-lead-text { display: flex; flex-direction: column; gap: 10px; }

/* The A to Z ladder. DECORATION. The plugin sends no per viewer rank, so this
   never claims to be yours: the markup carries role="img" and a label that
   says what it is, the mine ladder, and no span is bound to a stat. */
.v2-ladder {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.v2-ladder span {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 4px;
  border: 1px solid #0A0806;
  background: #0E0B08;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8);
  color: #9C927F;
  font-size: 16px;
}
.v2-ladder span.is-done {
  color: #16130F;
  background: var(--gold);
  border-color: #9B7103;
  box-shadow: 0 2px 0 var(--edge);
}
.v2-ladder span.is-now {
  color: var(--ore);
  background: #2B241B;
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(252, 186, 3, 0.35), 0 0 12px rgba(255, 154, 31, 0.5);
}
.v2-ladder span.v2-prestige {
  width: auto;
  padding: 0 10px;
  gap: 6px;
  grid-auto-flow: column;
  color: var(--ore);
  background: #2B241B;
  border-color: var(--edge);
}

@media (min-width: 768px) {
  .v2-bento { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .v2-tile h3 { font-size: 20px; }
  .v2-lead-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
}
@media (min-width: 1024px) {
  .v2-bento { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .v2-tile { padding: 20px; }
}


/* ===========================================================================
   6. JOIN IN THREE STEPS  ·  pick 05, option B

   THE BUG THAT WAS REPORTED, and why it happened.

   On the board the address stuck out past the gold pill. Three things stacked
   up to cause it, and all three are fixed here, not papered over:

     1. The step reserves a 66px left gutter for its number badge, so the pill
        was laid out inside a box 82px narrower than the card. At the three up
        tier that left roughly 155px of room for an address that needs about
        295px at 22px. The widest thing in the card was being given the
        narrowest box in the card.
     2. `.v2-ip-pill` carried `max-width: 100%`, which clamps the border box,
        while `.v2-ip-pill > span { min-width: 0 }` let the nowrap label shrink
        below its own min-content. The box stopped at the column edge and the
        glyphs kept going, so the text painted outside the border. That is the
        exact thing that was visible.
     3. The face was a flat 22px that took no account of how wide the column
        actually was.

   The fix:
     - the 66px gutter now applies to the heading and the paragraph only, so
       the badge still has its lane but the pill gets the full card width;
     - the label keeps the flex default `min-width: auto`, so it can never be
       squeezed below its own text (see section 3);
     - the face is a clamp tuned so the pill's max-content always fits the
       column it is in, with margin to spare at 375, 768, 1024 and 1440;
     - the steps go three up only from 1024px. Below that one column, because
       a third of a 768px page is genuinely too narrow for this address at a
       readable size, and shrinking the address to 14px to win an argument
       with the grid is not a fix.

   The address is never truncated, never ellipsised and never wrapped.
   ========================================================================= */

.v2-steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: v2step;
}
.v2-step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 16px;
}
.v2-step::before {
  counter-increment: v2step;
  content: counter(v2step);
  position: absolute;
  top: 16px;
  left: 16px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: var(--gold);
  box-shadow: 0 3px 0 var(--edge);
  color: #16130F;
  font-size: 20px;
}
/* The badge's lane. Text clears it, the pill does not have to. */
.v2-step > h3,
.v2-step > p { padding-left: 50px; }
.v2-step h3 { margin: 0; font-size: 19px; line-height: 1.15; color: var(--ink); }
.v2-step p { margin: 0; font-size: 16px; line-height: 1.5; color: #CFC6B8; }

.v2-step .v2-ip-pill {
  align-self: stretch;
  justify-content: center;
  margin-top: 4px;
  /* One column tier. At 375 the card gives the pill about 311px and its
     max-content at this size is about 290px. */
  font-size: clamp(18px, 5.8vw, 22px);
}
@media (min-width: 1024px) {
  .v2-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  /* Three up tier. At 1024 the card gives the pill about 277px and its
     max-content at 1.95vw, which is 20px there, is about 274px. */
  .v2-step .v2-ip-pill { font-size: clamp(18px, 1.95vw, 22px); }
}

/* Java and Bedrock, kept from the connect panel this section replaces. */
.v2-conn {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 16px;
  color: #CFC6B8;
}
.v2-conn li { display: inline-flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.v2-conn b {
  color: var(--gold);
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}


/* ===========================================================================
   7. VOTE CALLOUT  ·  pick 06. One row, one button, links to vote.html.
   ========================================================================= */

.v2-vote {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 20px;
  border-radius: 10px;
  border: 1px solid #6B5014;
  background:
    radial-gradient(60% 100% at 0% 50%, rgba(255, 154, 31, 0.22) 0%, transparent 70%),
    linear-gradient(135deg, #2A2012 0%, #16130F 60%);
  box-shadow: inset 0 1px 0 rgba(252, 186, 3, 0.22), 0 2px 0 rgba(0, 0, 0, 0.55), 0 16px 30px -20px rgba(0, 0, 0, 0.95);
}
/* 64px, a whole 4x of the 16px trial key texture items.js drops in here. */
.v2-vote .mg-icon {
  width: 64px;
  height: 64px;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.7));
}
.v2-vote-text { min-width: 0; }
.v2-vote h3 { margin: 0; font-size: clamp(20px, 2.4vw, 26px); line-height: 1.12; color: var(--ink); }
.v2-vote p { margin: 4px 0 0; font-size: 16px; line-height: 1.5; color: #CFC6B8; }
.v2-vote .btn3d { justify-self: start; }
@media (min-width: 768px) {
  .v2-vote { grid-template-columns: auto minmax(0, 1fr) auto; padding: 24px 28px; gap: 24px; }
  .v2-vote .btn3d { justify-self: end; }
}


/* ===========================================================================
   8. Kept from the old page scoped block: one update card, centred.
   ========================================================================= */

.mg-wrap .mg-updates { --od-cols: 1; max-width: 680px; margin-inline: auto; }


/* ===========================================================================
   9. Motion. Everything above is a transition on a hover or a press, so
      switching them off costs the page nothing.
   ========================================================================= */

@media (prefers-reduced-motion: reduce) {
  .v2-tile,
  .v2-ip-pill,
  .v2-btn-ip { transition: none; }
  .v2-tile:hover { transform: none; }
}
