/* SlopHaus trading cards + lane games — mobile first */

:root {
  --card-common: #8f879f;
  --card-uncommon: #00e8ff;
  --card-rare: #ff2bd6;
  --card-epic: #c6ff3d;
  --lane-h: 5.5rem;
}

.game-shell {
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(4.5rem + env(safe-area-inset-bottom));
}

.game-shell--board {
  background: linear-gradient(180deg, #0f1419 0%, #1a1f26 40%, var(--bg) 100%);
}

.game-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  padding-top: max(0.65rem, env(safe-area-inset-top));
  border-bottom: 1px solid var(--border);
  background: rgba(7, 6, 12, 0.92);
  backdrop-filter: blur(14px) saturate(1.15);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 0 rgba(0, 232, 255, 0.1);
}

.game-topbar .brand-sub { font-size: 0.58rem; }

.game-hud {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hud-pill {
  background: var(--surface-elevated);
  border: 1px solid var(--border-light);
  padding: 0.35rem 0.55rem;
  border-radius: var(--radius);
}

.hud-pill strong { color: var(--human); }

/* Trading card frame */
.tcard {
  position: relative;
  width: 100%;
  max-width: 11rem;
  aspect-ratio: 2 / 3;
  border-radius: 6px;
  background: linear-gradient(145deg, #0c0a14 0%, #1a1530 55%, #12101c 100%);
  border: 2px solid var(--border);
  box-shadow: var(--shadow-soft), 0 0 20px rgba(255, 43, 214, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: var(--text);
  font-size: 0.65rem;
  touch-action: manipulation;
  transition: transform 0.15s, box-shadow 0.15s;
}

.tcard:active { transform: scale(0.97); }

.tcard.selected {
  outline: 2px solid var(--human);
  outline-offset: 2px;
  transform: translateY(-4px);
}

.tcard.rarity-common { border-color: var(--card-common); }
.tcard.rarity-uncommon { border-color: var(--card-uncommon); }
.tcard.rarity-rare { border-color: var(--card-rare); }
.tcard.rarity-epic { border-color: var(--card-epic); box-shadow: 0 0 22px rgba(198, 255, 61, 0.28); }
.tcard.rarity-rare { box-shadow: 0 0 18px rgba(255, 43, 214, 0.22); }
.tcard.rarity-uncommon { box-shadow: 0 0 14px rgba(0, 232, 255, 0.18); }

.tcard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.35rem 0.45rem 0.2rem;
  font-family: var(--font-intrusion);
  font-size: 0.5rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tcard-cost {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: var(--human);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.62rem;
}

.tcard-art {
  flex: 1;
  margin: 0 0.35rem;
  border-radius: 3px;
  background: #0f1419;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.tcard-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tcard-text {
  padding: 0.4rem;
  font-size: 0.58rem;
  line-height: 1.35;
  white-space: pre-wrap;
  text-align: left;
  overflow: hidden;
  max-height: 100%;
}

.tcard-footer {
  padding: 0.35rem 0.45rem 0.45rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.tcard-name {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.2;
}

.tcard-power {
  position: absolute;
  bottom: 2.1rem;
  right: 0.35rem;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: var(--ai);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.65rem;
  border: 2px solid var(--border);
}

.tcard.revealed.origin-human { box-shadow: 0 0 0 2px var(--human); }
.tcard.revealed.origin-ai { box-shadow: 0 0 0 2px var(--ai); }

.tcard.revealed.wrong { opacity: 0.55; filter: grayscale(0.4); }

/* Snap board */
.snap-board {
  padding: 0.75rem 0.65rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.lanes-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
}

.lane {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  min-height: var(--lane-h);
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.lane.selected {
  border-color: var(--human);
  background: rgba(255, 77, 109, 0.14);
}

.lane-head {
  font-family: var(--font-intrusion);
  font-size: 0.48rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(242, 239, 250, 0.7);
  line-height: 1.3;
}

.lane-score {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--human);
}

.lane-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  flex: 1;
  align-content: flex-start;
}

.lane-chip {
  font-size: 0.48rem;
  padding: 0.15rem 0.3rem;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 2px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.snap-controls {
  display: flex;
  gap: 0.5rem;
  padding: 0 0.65rem;
  flex-wrap: wrap;
}

.snap-btn {
  flex: 1;
  min-width: 5rem;
  min-height: 44px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.snap-btn--push {
  background: var(--text);
  color: var(--surface-elevated);
  border-color: var(--text);
}

.snap-btn--human {
  border-color: var(--human);
  color: var(--human);
}

.snap-btn--ai {
  border-color: var(--ai);
  color: var(--ai);
}

.snap-btn:disabled { opacity: 0.4; pointer-events: none; }

.hand-row {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.5rem 0.65rem;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.hand-row::-webkit-scrollbar { display: none; }

.hand-row .tcard {
  flex: 0 0 6.5rem;
  scroll-snap-align: center;
}

/* Flash game — mobile-first (IRL hand-the-phone) */
.flash-stage {
  max-width: 24rem;
  margin: 0 auto;
  padding: 1rem 0.85rem 2rem;
  text-align: center;
}

.flash-stage--play {
  /* room for sticky thumb bar */
  padding-bottom: calc(5.75rem + env(safe-area-inset-bottom));
  min-height: calc(100dvh - 4.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.flash-title {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.flash-title--result {
  font-size: 1.75rem;
  margin: 0.25rem 0 0.5rem;
}

.flash-lede {
  font-size: 0.88rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  max-width: 22rem;
  margin-left: auto;
  margin-right: auto;
}

.flash-prompt {
  font-size: 0.78rem;
  margin: 0.35rem 0 0;
}

.flash-irl-hint {
  font-size: 0.72rem;
  margin-top: 0.85rem;
  letter-spacing: 0.02em;
}

.flash-idle-links {
  display: flex;
  justify-content: center;
  gap: 1.1rem;
  margin-top: 1.1rem;
  flex-wrap: wrap;
}

.flash-start-btn {
  min-height: 52px;
  font-size: 0.88rem;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.flash-progress {
  font-family: var(--font-intrusion);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.flash-card-wrap {
  display: flex;
  justify-content: center;
  margin: 0.75rem 0 auto;
  flex: 1 1 auto;
  align-items: center;
  width: 100%;
}

.flash-card-wrap .tcard {
  max-width: min(13rem, 72vw);
  width: 100%;
}

.flash-verdict-list {
  margin: 1rem 0;
  padding: 0;
  width: 100%;
  text-align: left;
}

.flash-verdict {
  list-style: none;
  margin: 0.35rem 0;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius);
  font-size: 0.78rem;
  line-height: 1.45;
}

.flash-verdict.spot {
  background: var(--human-bg);
  border: 1px solid rgba(255, 77, 109, 0.35);
  color: var(--human);
}

.flash-verdict.miss {
  background: var(--ai-bg);
  border: 1px solid rgba(74, 93, 115, 0.25);
  color: var(--ai);
}

/* Sticky thumb zone — IRL handoff on phones */
.flash-actions {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin: 0;
  padding: 0.65rem 0.85rem;
  padding-bottom: max(0.65rem, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent 0%, rgba(7, 6, 12, 0.92) 28%, rgba(7, 6, 12, 0.98) 100%);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(12px) saturate(1.1);
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  width: 100%;
}

.flash-actions button {
  min-height: 52px;
  font-size: 0.88rem;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.flash-actions button:active {
  transform: scale(0.98);
}

.flash-done-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
  margin-top: 0.5rem;
}

.flash-done-actions .primary-btn {
  min-height: 52px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.flash-secondary-cta {
  display: block;
  text-align: center;
  min-height: 48px;
  line-height: 48px;
  padding: 0 1rem;
  touch-action: manipulation;
}

.flash-tertiary-link {
  display: block;
  text-align: center;
  padding: 0.5rem;
  min-height: 44px;
}

@media (min-width: 640px) {
  .flash-stage--play {
    min-height: auto;
    padding-bottom: 2rem;
  }

  .flash-actions {
    position: static;
    border-top: none;
    background: transparent;
    backdrop-filter: none;
    margin-top: 1rem;
    padding: 0;
    max-width: none;
  }
}

/* Games hub */
.games-hub {
  padding-bottom: 1.5rem;
}

.games-hub-hero {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.15rem 1rem 0.35rem;
}

.games-hub-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 7vw, 2.45rem);
  font-weight: 400;
  line-height: 1.1;
  margin: 0 0 0.45rem;
}

.games-hub-lede {
  margin: 0;
  max-width: 34rem;
}

.games-hub-section-label {
  max-width: 640px;
  margin: 0.35rem auto 0;
  padding: 0 1rem;
  font-family: var(--font-mono, "Share Tech Mono", monospace);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.hub-status {
  max-width: 640px;
  margin: 0.85rem auto 0.65rem;
  padding: 0 1rem;
}

.hub-status-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  padding: 0.7rem 0.9rem;
  background: rgba(0, 232, 255, 0.06);
  border: 1px solid rgba(0, 232, 255, 0.22);
  border-radius: var(--radius);
  font-family: var(--font-mono, "Share Tech Mono", monospace);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--text);
  line-height: 1.4;
}

.hub-status-drop {
  color: var(--glitch-cyan, #00e8ff);
  font-weight: 600;
}

.hub-status-sep {
  color: var(--muted);
  opacity: 0.7;
}

.games-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.55rem 1rem 0.35rem;
  max-width: 640px;
  margin: 0 auto;
}

.games-grid--secondary {
  padding-top: 0.35rem;
  padding-bottom: 0.25rem;
}

.game-tile {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.15s, border-color 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-height: 3.25rem;
}

.game-tile::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--glitch-magenta, #ff2bd6), var(--glitch-cyan, #00e8ff), var(--glitch-lime, #c6ff3d));
  opacity: 0.75;
}

.game-tile--primary {
  padding: 1.2rem 1.2rem 1.15rem;
  border-color: rgba(0, 232, 255, 0.28);
  background: linear-gradient(165deg, rgba(0, 232, 255, 0.07) 0%, var(--surface-elevated) 55%);
}

.game-tile--primary::before {
  height: 3px;
  opacity: 0.95;
}

.game-tile--secondary {
  padding: 0.95rem 1.05rem;
  opacity: 0.96;
}

.game-tile--secondary::before {
  opacity: 0.35;
}

.game-tile-kicker {
  font-family: var(--font-mono, "Share Tech Mono", monospace);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--glitch-lime, #c6ff3d);
  margin-bottom: 0.4rem;
}

.game-tile-cta {
  display: inline-block;
  margin-top: 0.75rem;
  font-family: var(--font-mono, "Share Tech Mono", monospace);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--glitch-cyan, #00e8ff);
}

.game-tile:hover {
  border-color: rgba(0, 232, 255, 0.4);
  box-shadow: 0 0 20px rgba(0, 232, 255, 0.15);
  transform: translateY(-2px);
}

.game-tile:active { transform: scale(0.98); }

.game-tile h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin-bottom: 0.35rem;
}

.game-tile--primary h3 {
  font-size: clamp(1.2rem, 4.5vw, 1.4rem);
}

.game-tile p {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.55;
}

.game-tile .tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.65rem;
}

.game-tag {
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  border: 1px solid var(--border);
  color: var(--muted);
}

.game-tag--live {
  border-color: var(--glitch-lime, var(--human));
  color: var(--glitch-lime, var(--human));
  box-shadow: 0 0 10px rgba(198, 255, 61, 0.2);
}

.game-tag--new {
  border-color: var(--glitch-magenta, var(--ai));
  color: var(--glitch-magenta, var(--ai));
}

/* Binder */
.binder-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 1rem;
  max-width: 900px;
  margin: 0 auto;
}

.binder-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.binder-empty-cta {
  margin-top: 1rem;
}

.binder-empty-cta .primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.15rem;
  text-decoration: none;
  touch-action: manipulation;
}

/* Origin Deck page — binder + share-crop set preview */
.deck-page {
  padding-bottom: 2rem;
}

.deck-hero {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.15rem 1rem 0.25rem;
}

.deck-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 7vw, 2.35rem);
  font-weight: 400;
  line-height: 1.1;
  margin: 0 0 0.45rem;
}

.deck-lede {
  margin: 0;
  max-width: 34rem;
  font-size: 0.9rem;
  line-height: 1.55;
}

.deck-status {
  max-width: 640px;
  margin: 0.85rem auto 0.35rem;
  padding: 0 1rem;
}

.deck-section {
  max-width: 900px;
  margin: 0 auto;
  padding-top: 0.35rem;
}

.deck-section--set {
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
  padding-top: 0.85rem;
}

.deck-section-head {
  padding: 0.5rem 1rem 0.15rem;
}

.deck-section-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  margin: 0 0 0.2rem;
}

.deck-section-sub {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.5;
}

.deck-share-note {
  margin: 0.35rem 1rem 0;
  padding: 0.55rem 0.75rem;
  font-family: var(--font-mono, "Share Tech Mono", monospace);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px dashed rgba(0, 232, 255, 0.28);
  border-radius: var(--radius);
  background: rgba(0, 232, 255, 0.04);
}

.set-grid {
  padding-top: 0.65rem;
}

.set-card-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.set-card-wrap .tcard {
  max-width: 11rem;
  width: 100%;
}

.set-card-flavor {
  margin: 0;
  padding: 0 0.15rem;
  font-size: 0.62rem;
  line-height: 1.35;
  color: var(--muted);
  text-align: center;
  max-width: 11rem;
}

.deck-foot {
  max-width: 640px;
  margin: 1.25rem auto 0;
  padding: 0 1rem;
  font-size: 0.78rem;
  line-height: 1.55;
  text-align: center;
}

.data-strip {
  max-width: 640px;
  margin: 0 auto 1rem;
  padding: 0 1rem;
}

.data-strip-inner {
  background: var(--ai-bg);
  border: 1px solid rgba(74, 93, 115, 0.2);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--ai);
}

.data-strip-inner strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text);
}

.nft-whisper {
  display: block;
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  opacity: 0.65;
  text-decoration: none;
}

.nft-whisper:hover { opacity: 1; color: var(--text); }

.footer-nav .nft-whisper-link {
  font-size: 0.68rem;
  opacity: 0.55;
}

@media (min-width: 768px) {
  .binder-grid { grid-template-columns: repeat(4, 1fr); gap: 1rem; }
  .games-grid { display: grid; grid-template-columns: 1fr 1fr; max-width: 900px; }
  .games-grid--secondary { grid-template-columns: repeat(3, 1fr); max-width: 900px; }
  .games-hub-hero,
  .hub-status,
  .deck-hero,
  .deck-status,
  .games-hub-section-label,
  .data-strip { max-width: 900px; }
  .set-grid { grid-template-columns: repeat(4, 1fr); }
  .hand-row .tcard { flex: 0 0 7.5rem; }
  .lane { min-height: 7rem; }
}