/* EloTracker Game Story — Editorial Interactive View & Poster Styles */
.gs-page {
  max-width: 1080px;
  margin: 0 auto 40px;
  padding: 6px 0 24px;
}
.gs-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 14px;
}
.gs-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 0.8125rem;
}
.gs-back-link,
.gs-hub-link {
  color: #475569;
  text-decoration: none;
  font-weight: 600;
}
.gs-back-link:hover,
.gs-hub-link:hover {
  color: #047857;
  text-decoration: underline;
}
.dark .gs-back-link,
.dark .gs-hub-link {
  color: #cbd5e1;
}
.dark .gs-back-link:hover,
.dark .gs-hub-link:hover {
  color: #34d399;
}
.gs-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.gs-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.14s ease, border-color 0.14s ease, opacity 0.14s ease;
}
.gs-btn:hover:not(:disabled) {
  background: #f1f5f9;
  border-color: #94a3b8;
}
.gs-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.gs-btn-primary {
  background: #047857;
  border-color: #047857;
  color: #ffffff;
}
.gs-btn-primary:hover:not(:disabled) {
  background: #065f46;
  border-color: #065f46;
}
.dark .gs-btn {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}
.dark .gs-btn:hover:not(:disabled) {
  background: #334155;
  border-color: #475569;
}
.dark .gs-btn-primary {
  background: #059669;
  border-color: #059669;
  color: #ffffff;
}
.dark .gs-btn-primary:hover:not(:disabled) {
  background: #047857;
}

.gs-poster-sheet {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 28px 32px 26px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  color: #111827;
}
.dark .gs-poster-sheet {
  background: #111827;
  border-color: #1f2937;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  color: #f3f4f6;
}

.gs-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}
.gs-serif-title {
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  font-size: clamp(1.65rem, 3.2vw, 2.55rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: #0f172a;
  margin: 0 0 10px;
}
.dark .gs-serif-title {
  color: #f8fafc;
}
.gs-standfirst {
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: 0.98rem;
  line-height: 1.56;
  color: #475569;
  margin: 0;
  max-width: 72ch;
}
.dark .gs-standfirst {
  color: #cbd5e1;
}
.gs-brand-mark {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
  text-align: right;
}
.gs-brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.dark .gs-brand-badge {
  background: rgba(6, 78, 59, 0.45);
  border-color: rgba(52, 211, 153, 0.4);
  color: #6ee7b7;
}
.gs-brand-meta {
  font-size: 0.74rem;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}
.dark .gs-brand-meta {
  color: #94a3b8;
}

.gs-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 18px;
}
.gs-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-variant-numeric: tabular-nums;
}
.gs-chip strong {
  color: #0f172a;
}
.gs-chip.is-accent {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}
.gs-chip.is-accent strong {
  color: #c2410c;
}
.gs-chip.is-emerald {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}
.dark .gs-chip {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}
.dark .gs-chip strong {
  color: #f8fafc;
}
.dark .gs-chip.is-accent {
  background: rgba(154, 52, 18, 0.25);
  border-color: rgba(251, 146, 60, 0.4);
  color: #fdba74;
}
.dark .gs-chip.is-emerald {
  background: rgba(6, 78, 59, 0.35);
  border-color: rgba(52, 211, 153, 0.35);
  color: #6ee7b7;
}

.gs-chart-wrap {
  position: relative;
  margin: 6px 0 18px;
}
.gs-chart-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.gs-tooltip {
  position: absolute;
  pointer-events: none;
  z-index: 20;
  min-width: 185px;
  max-width: 240px;
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(15, 23, 42, 0.94);
  color: #f8fafc;
  font-size: 0.75rem;
  line-height: 1.45;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.28);
  font-variant-numeric: tabular-nums;
}
.gs-tooltip strong {
  color: #ffffff;
}
.gs-tooltip-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.gs-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 18px 0 8px;
}
.gs-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}
.dark .gs-section-title {
  color: #f1f5f9;
}
.gs-section-title .gs-hl-elo {
  color: #c2410c;
}
.gs-section-title .gs-hl-sf {
  color: #64748b;
}
.dark .gs-section-title .gs-hl-elo {
  color: #fb923c;
}
.dark .gs-section-title .gs-hl-sf {
  color: #94a3b8;
}
.gs-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.74rem;
  color: #64748b;
}
.dark .gs-legend {
  color: #94a3b8;
}
.gs-legend-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  margin-right: 4px;
  vertical-align: -1px;
}

.gs-matrix-scroll {
  overflow-x: auto;
  padding-bottom: 4px;
}
.gs-matrix-svg {
  display: block;
  width: 100%;
  min-width: 680px;
  height: auto;
}

.gs-tp-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}
.gs-tp-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border-radius: 10px;
  padding: 6px;
  margin: -6px;
  transition: background-color 0.14s ease, transform 0.14s ease;
}
.gs-tp-card:hover {
  background: #f8fafc;
  transform: translateY(-2px);
}
.dark .gs-tp-card:hover {
  background: #1e293b;
}
.gs-tp-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.72rem;
  color: #475569;
  margin: 2px 1px;
  font-variant-numeric: tabular-nums;
}
.dark .gs-tp-bar {
  color: #94a3b8;
}
.gs-tp-bar .gs-clk-low {
  color: #dc2626;
  font-weight: 700;
}
.dark .gs-tp-bar .gs-clk-low {
  color: #f87171;
}
.gs-tp-board {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
}
.dark .gs-tp-board {
  border-color: #334155;
}
.gs-tp-heading {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0 4px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
}
.dark .gs-tp-heading {
  color: #f8fafc;
}
.gs-tp-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #c2410c;
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 700;
  flex-shrink: 0;
}
.gs-tp-caption {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.76rem;
  line-height: 1.45;
  color: #475569;
  margin: 0;
}
.dark .gs-tp-caption {
  color: #cbd5e1;
}

.gs-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 22px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
  font-size: 0.74rem;
  color: #64748b;
}
.dark .gs-footer {
  border-top-color: #1f2937;
  color: #94a3b8;
}

.gs-loading {
  padding: 20px 6px;
}
.gs-spinner-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  font-size: 0.875rem;
  color: #475569;
}
.dark .gs-spinner-row {
  color: #94a3b8;
}
.gs-spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid #cbd5e1;
  border-top-color: #047857;
  border-radius: 999px;
  animation: gs-spin 0.8s linear infinite;
}
@keyframes gs-spin {
  to { transform: rotate(360deg); }
}

.gs-error {
  padding: 20px;
  border-radius: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 0.9rem;
}
.dark .gs-error {
  background: rgba(127, 29, 29, 0.25);
  border-color: rgba(248, 113, 113, 0.4);
  color: #fecaca;
}

@media (max-width: 900px) {
  .gs-poster-sheet {
    padding: 20px 16px;
  }
  .gs-tp-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}
@media (max-width: 540px) {
  .gs-header {
    flex-direction: column;
    gap: 10px;
  }
  .gs-brand-mark {
    align-items: flex-start;
    text-align: left;
  }
  .gs-tp-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
