/* Match detail — style gallery (dev mockup) */
.gmd-gallery-fab {
  position: fixed;
  right: 14px;
  bottom: 246px;
  z-index: 90;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(0, 230, 118, 0.45);
  background: linear-gradient(145deg, rgba(8, 28, 18, 0.95), rgba(6, 14, 10, 0.98));
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45), 0 0 20px rgba(0, 230, 118, 0.12);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.gmd-gallery-fab:active { transform: scale(0.94); }
body:not(.theme-home) .gmd-gallery-fab { display: none; }

.gmd-gallery-overlay {
  position: fixed;
  inset: 0;
  z-index: 950;
  background: rgba(0, 0, 0, 0);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.28s ease, background 0.28s ease;
}
.gmd-gallery-overlay.open {
  pointer-events: all;
  opacity: 1;
  background: rgba(4, 6, 10, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.gmd-gallery-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  transform: translateY(12px);
  opacity: 0;
  transition: transform 0.32s cubic-bezier(0.22, 1.2, 0.5, 1), opacity 0.28s ease;
}
.gmd-gallery-overlay.open .gmd-gallery-panel {
  transform: translateY(0);
  opacity: 1;
}

.gmd-gallery-top {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.gmd-gallery-back {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
  cursor: pointer;
}
.gmd-gallery-top-title { flex: 1; min-width: 0; }
.gmd-gallery-badge {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 8px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #00e676;
}
.gmd-gallery-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.1;
}

.gmd-gallery-tabs {
  flex-shrink: 0;
  display: flex;
  gap: 6px;
  padding: 10px 14px 0;
}
.gmd-gallery-tab {
  flex: 1;
  padding: 9px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}
.gmd-gallery-tab.active {
  border-color: rgba(0, 230, 118, 0.35);
  background: rgba(0, 230, 118, 0.08);
  color: #00e676;
}

.gmd-gallery-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 14px 8px;
}
.gmd-gallery-sub {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 8.5px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  text-align: center;
  margin-bottom: 14px;
  line-height: 1.55;
}
.gmd-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 420px) {
  .gmd-gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

.gmd-gallery-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 10px 8px 9px;
  border-radius: 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.gmd-gallery-card--picked {
  border-color: rgba(0, 230, 118, 0.55);
  background: rgba(0, 230, 118, 0.06);
}
.gmd-gallery-card-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 8px;
  color: rgba(255, 255, 255, 0.28);
  text-align: center;
}
.gmd-gallery-phone {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #090c14;
  overflow: hidden;
  min-height: 148px;
  pointer-events: none;
  --gmd-home: #006400;
  --gmd-away: #cc2200;
}
.gmd-gallery-phone-head {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 6px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
  text-align: center;
}
.gmd-gallery-phone-body {
  padding: 6px;
  transform: scale(0.92);
  transform-origin: top center;
}

.gmd-gallery-card-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
  text-align: center;
}
.gmd-gallery-card-desc {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 7px;
  letter-spacing: 0.4px;
  color: rgba(255, 255, 255, 0.32);
  text-align: center;
  line-height: 1.45;
}

.gmd-gallery-foot {
  flex-shrink: 0;
  display: flex;
  gap: 10px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(6, 8, 14, 0.96);
}
.gmd-gallery-btn {
  flex: 1;
  padding: 11px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.75);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
}
.gmd-gallery-btn--primary {
  border-color: rgba(0, 230, 118, 0.4);
  background: rgba(0, 230, 118, 0.1);
  color: #00e676;
}

/* ── Variant: events minimal ── */
.gmg-ev-minimal .gmg-ev-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 10px;
  font-weight: 600;
  color: #e8ecf4;
}
.gmg-ev-minimal .gmg-ev-min { font-family: 'Bebas Neue', sans-serif; font-size: 12px; color: #5a6a8a; min-width: 22px; }

/* ── Variant: events stripe ── */
.gmg-ev-stripe .gmg-ev-row {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 5px 4px 7px;
  margin-bottom: 3px;
  border-radius: 5px;
  background: #0d1119;
  border: 1px solid #161c2e;
  font-size: 9px;
  font-weight: 600;
  font-family: 'Barlow Condensed', sans-serif;
  color: #e8ecf4;
  border-left-width: 3px;
}
.gmg-ev-stripe .gmg-ev-row.goal { border-left-color: #00e676; }
.gmg-ev-stripe .gmg-ev-row.card { border-left-color: #ffd700; }
.gmg-ev-stripe .gmg-ev-row.chance { border-left-color: #ff9100; }
.gmg-ev-stripe .gmg-ev-row.sub { border-left-color: #4fc3f7; }

/* ── Variant: events stacked ── */
.gmg-ev-stacked .gmg-ev-row {
  padding: 5px 6px;
  margin-bottom: 3px;
  border-radius: 6px;
  background: #0d1119;
  border: 1px solid #161c2e;
}
.gmg-ev-stacked .gmg-ev-top {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: #e8ecf4;
}
.gmg-ev-stacked .gmg-ev-sub {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 7px;
  color: #9aadc8;
  margin-top: 2px;
  padding-left: 26px;
}

/* ── Variant: events timeline ── */
.gmg-ev-timeline { position: relative; padding-left: 14px; }
.gmg-ev-timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: linear-gradient(180deg, #00e676, #4fc3f7, #ff9100);
  opacity: 0.45;
}
.gmg-ev-timeline .gmg-ev-row {
  position: relative;
  padding: 3px 0 6px 8px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 9px;
  font-weight: 600;
  color: #e8ecf4;
}
.gmg-ev-timeline .gmg-ev-row::before {
  content: '';
  position: absolute;
  left: -11px;
  top: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0d1119;
  border: 1.5px solid #00e676;
}

/* ── Variant: events badges ── */
.gmg-ev-badges .gmg-ev-row {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  padding: 4px 5px;
  margin-bottom: 3px;
  border-radius: 6px;
  background: #0d1119;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 9px;
  font-weight: 600;
  color: #e8ecf4;
}
.gmg-ev-badges .gmg-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 6px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 2px 4px;
  border-radius: 3px;
}
.gmg-tag-goal { background: rgba(0, 230, 118, 0.15); color: #00e676; }
.gmg-tag-ast { background: rgba(255, 145, 0, 0.12); color: #ff9100; }
.gmg-tag-card { background: rgba(255, 215, 0, 0.12); color: #ffd700; }

/* ── Variant: stats compact ── */
.gmg-st-compact .gmg-st-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 4px;
  padding: 5px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 14px;
  letter-spacing: 0.5px;
}
.gmg-st-compact .gmg-st-h { color: #00e676; text-align: right; }
.gmg-st-compact .gmg-st-a { color: #4fc3f7; }
.gmg-st-compact .gmg-st-lbl {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 6px;
  text-transform: uppercase;
  color: #9aadc8;
  text-align: center;
}

/* ── Variant: stats dominant bar ── */
.gmg-st-bars .gmg-st-row { padding: 5px 0; }
.gmg-st-bars .gmg-st-meta {
  display: flex;
  justify-content: space-between;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 11px;
  margin-bottom: 3px;
}
.gmg-st-bars .gmg-st-h { color: #00e676; }
.gmg-st-bars .gmg-st-a { color: #4fc3f7; }
.gmg-st-bars .gmg-st-lbl {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 6px;
  text-transform: uppercase;
  color: #9aadc8;
  text-align: center;
  flex: 1;
}
.gmg-st-bars .gmg-bar {
  height: 4px;
  border-radius: 2px;
  background: #1e2840;
  overflow: hidden;
  display: flex;
}
.gmg-st-bars .gmg-bar-h { background: #00e676; opacity: 0.75; }
.gmg-st-bars .gmg-bar-a { background: #4fc3f7; opacity: 0.75; }

/* ── Variant: stats cards ── */
.gmg-st-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.gmg-st-cards .gmg-st-card {
  padding: 5px;
  border-radius: 6px;
  background: #0d1119;
  border: 1px solid #161c2e;
  text-align: center;
}
.gmg-st-cards .gmg-st-card-lbl {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 6px;
  text-transform: uppercase;
  color: #9aadc8;
  margin-bottom: 3px;
}
.gmg-st-cards .gmg-st-card-vals {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 12px;
  letter-spacing: 0.5px;
}
.gmg-st-cards .gmg-st-h { color: #00e676; }
.gmg-st-cards .gmg-st-sep { color: #5a6a8a; font-size: 10px; }
.gmg-st-cards .gmg-st-a { color: #4fc3f7; }

/* ── Variant: stats momentum hero ── */
.gmg-st-momhero .gmg-mom-mini {
  height: 44px;
  border-radius: 6px;
  background: #0a0e16;
  border: 1px solid #161c2e;
  margin-bottom: 6px;
  position: relative;
  overflow: hidden;
}
.gmg-st-momhero .gmg-mom-mini svg { width: 100%; height: 100%; display: block; }
.gmg-st-momhero .gmg-st-row {
  display: flex;
  justify-content: space-between;
  padding: 3px 2px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 7px;
  color: #9aadc8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.gmg-st-momhero .gmg-st-row b { font-family: 'Bebas Neue', sans-serif; font-size: 11px; }
.gmg-st-momhero .gmg-st-h { color: #00e676; }
.gmg-st-momhero .gmg-st-a { color: #4fc3f7; }

/* Scale down production gmd classes inside phone */
.gmd-gallery-phone .gmd-slbl { font-size: 7px; margin-bottom: 5px; }
.gmd-gallery-phone .gmd-eitem { padding: 5px 6px; gap: 6px; margin-bottom: 3px; }
.gmd-gallery-phone .gmd-emin { font-size: 12px; min-width: 22px; }
.gmd-gallery-phone .gmd-eico { font-size: 11px; }
.gmd-gallery-phone .gmd-ename { font-size: 10px; }
.gmd-gallery-phone .gmd-goal-lbl { font-size: 7px; }
.gmd-gallery-phone .gmd-goal-score { font-size: 11px; }
.gmd-gallery-phone .gmd-mom { margin-bottom: 6px; }
.gmd-gallery-phone .gmd-mom-chart { height: 52px; }
.gmd-gallery-phone .gmd-ss-cell { padding: 4px 3px; }
.gmd-gallery-phone .gmd-ss-vh, .gmd-gallery-phone .gmd-ss-va { font-size: 12px; }
.gmd-gallery-phone .gmd-ss-ico-lbl { font-size: 5.5px; min-width: 36px; }
