/* ========================================================================
   GAMEOVER-CARD.CSS — the one game-over card every game uses (Fruit Slice,
   Memory Challenge, Lane Dash), so they share the exact same layout:

     cheerful title
     ─────────────── hairline
     BIG SCORE
     [ SUBMIT ]
     error/status line (only when there is one)
     note
       — after submitting, replaced by the claim panel (engine/score-claim.js):
     "You're on the leaderboard as Player K7Q2X"
     [ ENTER YOUR DETAILS ] → Microsoft Form (fan PII never touches FanForge)
     note
     ─────────────── hairline
     brand logo (row hidden when no logo is configured)

   Layout, sizes and spacing live here only. Each game themes the card by
   setting the --go-* variables on its game-over screen element, so a
   game's palette never needs to touch this file.
======================================================================== */
.go-card {
  box-sizing: border-box;
  width: min(360px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  margin: auto;
  padding: 24px 22px 20px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
  border-radius: 24px;
  background: var(--go-card-bg, rgba(255, 255, 255, 0.06));
  border: 1px solid var(--go-card-border, rgba(255, 255, 255, 0.1));
  box-shadow: var(--go-card-shadow, 0 20px 50px rgba(0, 0, 0, 0.35));
  color: var(--go-text, #fff);
  font-family: var(--go-font, inherit);
}

.go-card .go-title {
  margin: 0;
  font-family: var(--go-title-font, inherit);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.2px;
  text-transform: none;
  color: var(--go-title, inherit);
}

.go-card .go-hairline {
  flex: none;
  height: 1px;
  margin: 14px 0;
  border: 0;
  background: var(--go-hairline, rgba(255, 255, 255, 0.14));
}

.go-card .go-big-score {
  margin: 2px 0 18px;
  font-family: var(--go-score-font, inherit);
  font-size: clamp(56px, 17vw, 72px);
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--go-score, #ffd166);
}

.go-card .go-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
}
.go-card .go-form.hidden { display: none; }

.go-card .go-input {
  box-sizing: border-box;
  width: 100%;
  height: 48px;
  margin: 0;
  padding: 0 18px;
  border-radius: 999px;
  border: 2px solid var(--go-input-border, rgba(255, 255, 255, 0.18));
  background: var(--go-input-bg, rgba(255, 255, 255, 0.07));
  color: var(--go-input-text, #fff);
  /* 16px is deliberate: anything smaller and iOS Safari zooms the page on
     focus, pushing the form under the keyboard. */
  font-family: var(--go-font, inherit);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  outline: none;
  transition: border-color 0.15s ease;
}
.go-card .go-input::placeholder {
  color: var(--go-placeholder, rgba(255, 255, 255, 0.45));
  font-size: 13px;
  font-weight: 400;
}
.go-card .go-input:focus { border-color: var(--go-accent-solid, #ffd166); }

.go-card .go-consent {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 6px;
  font-size: 11.5px;
  line-height: 1.4;
  text-align: justify;
  color: var(--go-muted, rgba(255, 255, 255, 0.75));
  cursor: pointer;
}
.go-card .go-consent input[type="checkbox"] {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0;
  padding: 0;
  accent-color: var(--go-accent-solid, #ffd166);
}
.go-card .go-consent span { flex: 1 1 auto; min-width: 0; }

.go-card .go-submit {
  width: 100%;
  height: 52px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--go-font, inherit);
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.4px;
  color: var(--go-accent-text, #1a1224);
  background: var(--go-accent, #ffd166);
  box-shadow: var(--go-accent-shadow, 0 8px 20px rgba(0, 0, 0, 0.25));
  transition: opacity 0.15s ease, transform 0.1s ease;
}
.go-card .go-submit:disabled { opacity: 0.35; box-shadow: none; cursor: not-allowed; }
.go-card .go-submit:active:not(:disabled) { transform: scale(0.97); }

/* Error / "Submitting…" line — takes no space until it has text. */
.go-card .go-status {
  margin: -2px 0 0;
  min-height: 0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--go-error, #ff8a8a);
}
.go-card .go-status.go-hint { color: var(--go-muted, rgba(255, 255, 255, 0.75)); font-weight: 600; }
.go-card .go-status:empty { display: none; }

.go-card .go-note {
  margin: -2px 0 0;
  font-size: 10.5px;
  line-height: 1.4;
  text-align: center;
  text-wrap: balance;
  opacity: 1;
  color: var(--go-note, rgba(255, 255, 255, 0.5));
}
.go-card .go-note a { color: var(--go-link, var(--go-accent-solid, #ffd166)); text-decoration: underline; }

/* Post-submit claim panel (engine/score-claim.js). */
.go-card .claim-panel { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.go-card .claim-panel[hidden] { display: none; }
.go-card .claim-handle {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--go-muted, rgba(255, 255, 255, 0.75));
}
.go-card .claim-handle strong { color: var(--go-text, #fff); font-weight: 800; white-space: nowrap; }
.go-card .claim-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 15px;
}

/* Closing hairline + logo. The row disappears when no brand logo is set
   (no src), so a game without one doesn't end on an empty divider. */
.go-card .go-brand { display: flex; flex-direction: column; align-items: stretch; }
.go-card .go-brand:not(:has(img[src]:not([src=""]))) { display: none; }
.go-card .go-brand img {
  display: block;
  width: auto;
  height: auto;
  max-width: 60%;
  max-height: 56px;
  margin: 0 auto;
  object-fit: contain;
}
