/* inoff. Match Hub — Public Spectator Stylesheet
   Follows docs/brand-inoff.md: cream foundation, orange accents, dusty-blue selection, Oswald + Sora */

:root {
  --color-cream: #f3efe6;
  --color-surface: #fdf9f0;
  --color-surface-high: #ece8df;
  --color-card: #ffffff;
  --color-border: #d8d0c0;
  --color-ink: #292d2b;
  --color-muted: #64748b;

  --color-orange: #f36a36;
  --color-orange-hover: #e05a26;
  --color-orange-soft: #ffdbcf;
  --color-orange-ink: #822800;

  --color-dusty-deep: #47626c;
  --color-dusty-blue: #8da9b4;
  --color-dusty-soft: #cae7f3;
  --color-white: #ffffff;

  --color-error: #ba1a1a;

  --font-display: 'Oswald', 'Arial Narrow', system-ui, sans-serif;
  --font-ui: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(41, 45, 43, 0.06), 0 1px 2px rgba(41, 45, 43, 0.04);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100dvh;
  background-color: var(--color-surface);
  color: var(--color-ink);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button {
  font-family: inherit;
  color: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--color-dusty-deep);
  outline-offset: 2px;
}

.hidden {
  display: none !important;
}

/* Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(253, 249, 240, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-ink);
}

.wordmark-dot {
  color: var(--color-orange);
}

.header-dot {
  width: 4px;
  height: 4px;
  border-radius: var(--radius-full);
  background: var(--color-dusty-blue);
}

.header-stage {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-dusty-deep);
}

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: var(--color-cream);
  border: 1px solid var(--color-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover {
  background: var(--color-surface-high);
  border-color: var(--color-dusty-blue);
}

.btn-refresh {
  min-height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-full);
  background: var(--color-cream);
  border: 1px solid var(--color-border);
  font-size: 12px;
  font-weight: 600;
  color: var(--color-ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.15s, border-color 0.15s;
}

.btn-refresh:hover {
  background: var(--color-surface-high);
  border-color: var(--color-dusty-blue);
}

.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-sm {
  width: 15px;
  height: 15px;
}

/* Main Container */
.main-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}

.stack-xs {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stack-sm {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stack-md {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stack-lg {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* Typography */
.label-caps {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-dusty-deep);
}

.headline-lg {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.01em;
}

.title-md {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-ink);
}

.muted {
  color: var(--color-muted);
  font-size: 13px;
}

.intro-banner {
  border-left: 3px solid var(--color-orange);
  padding-left: 12px;
}

/* Segmented Filter (Standard inoff. Interaction Palette) */
.segmented {
  display: flex;
  padding: 4px;
  border-radius: var(--radius-lg);
  background: var(--color-surface-high);
  gap: 4px;
  max-width: 420px;
}

.seg-btn {
  flex: 1;
  min-height: 40px;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-cream);
  color: var(--color-ink);
  font-size: 13px;
  font-weight: 600;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.seg-btn:hover:not(.active) {
  background: var(--color-surface-high);
  border-color: var(--color-dusty-blue);
}

.seg-btn.active {
  background: var(--color-dusty-deep);
  border-color: var(--color-dusty-deep);
  color: var(--color-white);
  box-shadow: var(--shadow-sm);
}

/* Cards & Buttons */
.card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.card-lg {
  padding: 20px;
}

.btn {
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: var(--color-orange);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-orange-hover);
}

/* Pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--color-cream);
  border: 1px solid var(--color-border);
  color: var(--color-ink);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pill-live {
  background: var(--color-orange-soft);
  border-color: var(--color-orange);
  color: var(--color-orange-ink);
}

.pill-paused {
  background: var(--color-dusty-soft);
  border-color: var(--color-dusty-blue);
  color: var(--color-dusty-deep);
}

.pill-upcoming {
  background: var(--color-cream);
  border-color: var(--color-dusty-blue);
  color: var(--color-dusty-deep);
}

.pill-completed {
  background: var(--color-dusty-deep);
  border-color: var(--color-dusty-deep);
  color: var(--color-white);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.schedule-versus { font: 600 14px var(--font-ui); color: var(--color-dusty-deep); }

/* Detail View */
.score-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px 0;
}

.score-player {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.score-player-right {
  text-align: right;
  align-items: flex-end;
}

.player-name {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.score-player-right .hub-player-link { text-align: right; }
.player-name .hub-player-link { color: inherit; text-decoration-color: var(--color-dusty-blue); }
.player-name.is-winner { color: var(--color-orange-ink); }

.hub-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.hub-header-actions { display: flex; align-items: center; gap: 6px; }
.hub-header-actions button { min-height: 44px; white-space: nowrap; }
.hub-header-actions .btn-refresh { min-width: 44px; justify-content: center; }
.hub-header-title .hub-updated-note { line-height: 1.2; }
#detail-secondary-actions { position: absolute; inset: calc(100% + 6px) 0 auto auto; min-width: 160px; }

.hub-video-tile {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--color-ink);
  text-decoration: none;
}
.hub-video-tile:hover { border-color: var(--color-dusty-blue); }
.hub-video-preview {
  position: relative;
  width: clamp(148px, 38%, 280px);
  aspect-ratio: 16 / 9;
  flex: none;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--color-dusty-blue);
}
.hub-video-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hub-video-play {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-cream);
  color: var(--color-orange-ink);
}
.hub-video-play svg { width: 24px; height: 24px; }
.hub-video-caption { display: grid; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.hub-video-caption .muted { font-size: 0.8rem; }

@media (max-width: 600px) {
  .hub-header-actions #btn-refresh span { display: none; }
  .hub-header-actions #btn-detail-edit { padding-inline: 12px; }
}

.score-digits {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-ink);
}

.score-sep {
  color: var(--color-dusty-blue);
  font-size: 28px;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--color-cream);
}

@media (min-width: 680px) {
  .meta-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meta-val {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-ink);
}

.match-comments {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--color-cream);
  font-size: 13px;
  color: var(--color-ink);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.stat-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 14px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--color-ink);
}

/* Frame History */
.frame-row {
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--color-cream);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.frame-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.frame-num {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-dusty-deep);
  min-width: 30px;
}

.tag-badge {
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tag-bnd {
  background: var(--color-orange-soft);
  color: var(--color-orange-ink);
}

.tag-rd {
  background: var(--color-dusty-soft);
  color: var(--color-dusty-deep);
}

/* Video Links */
.video-link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--color-cream);
  border: 1px solid var(--color-border);
  text-decoration: none;
  color: var(--color-ink);
  transition: border-color 0.15s, background-color 0.15s;
}

.video-link-card:hover {
  background: var(--color-surface-high);
  border-color: var(--color-orange);
}

.video-cta {
  color: var(--color-orange);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

/* States */
.state-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.error-text {
  color: var(--color-error);
  font-weight: 600;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-orange);
  border-radius: var(--radius-full);
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Shared compact match lists */
.hub-history {
  --hub-filter-surface: var(--color-card, #ffffff);
  display: grid;
  gap: 10px;
  min-width: 0;
}
.hub-history [hidden],
#directory-record-name:empty,
.hub-history-status:empty { display: none; }
.hub-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.hub-history-header h3 { margin: 0; }
.hub-history .btn { min-height: 44px; }
.hub-history-filter-toggle {
  display: inline-flex;
  min-width: 44px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--hub-filter-surface);
  color: var(--color-dusty-deep);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(28, 28, 22, 0.05);
}
.hub-history-filter-toggle.has-active {
  border-color: var(--color-orange);
  color: var(--color-ink);
}
.hub-history-filter-count[hidden] { display: none !important; }
.hub-history-filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  background: var(--color-orange);
  color: #ffffff;
  font-size: .74rem;
  font-weight: 700;
}
.hub-history-status { margin: 4px 0; }
.hub-history-list { display: grid; gap: 8px; }
.hub-history-recent,
.hub-history-group-rows {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(28, 28, 22, 0.04);
  overflow: hidden;
}
.hub-history-recent:empty,
.hub-history-group-rows:empty { display: none; }
.hub-history .inoff-acc {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.hub-history .hub-history-row + .hub-history-row { border-top: 1px dotted var(--color-border); }
.hub-history .hub-history-toggle {
  display: grid;
  width: 100%;
  min-height: 44px;
  align-items: stretch;
  gap: 0 8px;
  padding: 0 10px 0 12px;
  border-radius: 0;
  text-align: left;
}
.hub-history-row > .hub-history-toggle {
  grid-template-columns: 44px minmax(0, 1fr) auto 14px;
}
.hub-history-row.is-head-to-head:not(.has-status) > .hub-history-toggle {
  grid-template-columns: 44px minmax(0, 1fr) 14px;
}
.hub-history-row[data-scheduled="true"] > .hub-history-toggle {
  grid-template-columns: minmax(66px, 86px) minmax(0, 1fr) 14px;
}
@media (max-width: 375px) {
  .hub-history-row > .hub-history-toggle,
  .hub-history-row.is-head-to-head:not(.has-status) > .hub-history-toggle {
    grid-template-columns: minmax(0, 1fr) auto 14px;
    grid-template-areas: "date result chevron" "names result chevron";
    align-items: center;
    gap: 1px 8px;
    padding: 5px 10px 5px 12px;
  }
  .hub-history-row .hub-history-date { grid-area: date; flex-direction: row; gap: 3px; }
  .hub-history-row .hub-history-names { grid-area: names; }
  .hub-history-row .hub-history-outcome { grid-area: result; }
  .hub-history-row .hub-history-chevron { grid-area: chevron; }
}
.hub-history-date {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6px 0;
  font-size: .7rem;
  font-weight: 500;
  line-height: 1.15;
  color: #7b868b;
  font-variant-numeric: tabular-nums;
}
.hub-history-date.is-stacked .hub-date-dm {
  font-size: .72rem;
  font-weight: 600;
  color: #5c686e;
  white-space: nowrap;
}
.hub-history-date.is-stacked .hub-date-yr {
  font-size: .64rem;
  color: #8a9499;
}
.hub-history-names {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 6px 0;
  font-size: .84rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-ink);
  overflow-wrap: anywhere;
}
.hub-history-score {
  font-family: var(--font-display, 'Oswald', sans-serif);
  font-size: 1.06rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  text-align: center;
  white-space: nowrap;
  color: var(--color-ink);
}
.hub-history-outcome {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  padding: 0 9px;
  background: #f6f3eb;
  white-space: nowrap;
}
.hub-history-row.is-head-to-head .hub-history-outcome {
  background: transparent;
  padding: 0;
}
.hub-history-outcome:empty { display: none; }
.hub-history-wld {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 9999px;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  color: #ffffff;
  flex-shrink: 0;
  letter-spacing: 0;
}
.hub-history-wld.is-win { background: #24824f; }
.hub-history-wld.is-loss { background: #cf4343; }
.hub-history-wld.is-draw { background: #7b8a91; }

/* Two-player (head-to-head) rows: seamless full-height score column centered between names */
.hub-history-names.is-h2h {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  align-items: stretch;
  column-gap: 12px;
  padding: 0;
}
.hub-history-portrait-reveal {
  grid-column: 1 / -1;
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows var(--inoff-acc-duration, 240ms) var(--inoff-acc-ease, ease),
    visibility 0s var(--inoff-acc-duration, 240ms);
}
.hub-history-row.is-open .hub-history-portrait-reveal {
  grid-template-rows: 1fr;
  visibility: visible;
  transition-delay: 0s;
}
.hub-history-portraits {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
  padding: 6px 0 4px;
}
.hub-history-portraits > :first-child { justify-self: end; }
.hub-history-portraits > :last-child { grid-column: 3; justify-self: start; }
.hub-history-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--color-dusty-blue, #8da9b4);
  color: var(--color-ink, #1c1c16);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.hub-history-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hub-history-row.is-open.is-head-to-head > .hub-history-toggle {
  grid-template-columns: 14px minmax(0, 1fr) 14px;
  grid-template-areas:
    ". date chevron"
    "names names names";
  align-items: center;
  gap: 2px 8px;
  padding: 10px 12px 6px;
}
.hub-history-row.is-open.is-head-to-head > .hub-history-toggle .hub-history-date {
  grid-area: date;
  flex-direction: row;
  justify-content: center;
  align-items: baseline;
  gap: 5px;
  padding: 0;
  text-align: center;
}
.hub-history-row.is-open.is-head-to-head > .hub-history-toggle .hub-history-names {
  grid-area: names;
}
.hub-history-row.is-open.is-head-to-head > .hub-history-toggle .hub-history-outcome {
  grid-area: date;
  justify-self: start;
}
.hub-history-row.is-open.is-head-to-head > .hub-history-toggle .hub-history-chevron {
  grid-area: chevron;
  align-self: center;
  min-height: 20px;
}
.hub-history-row.is-open.is-head-to-head > .hub-history-toggle .hub-history-mid.has-score {
  min-height: 36px;
}
@media (min-width: 440px) {
  .hub-history-names.is-h2h,
  .hub-history-portraits {
    column-gap: 18px;
  }
}
.hub-history-p1,
.hub-history-p2 {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 6px 0;
  overflow-wrap: anywhere;
}
.hub-history-p1 {
  justify-content: flex-end;
  text-align: right;
}
.hub-history-p2 {
  justify-content: flex-start;
  text-align: left;
}
.hub-history-mid {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hub-history-mid.has-score {
  min-width: 44px;
  padding: 0 8px;
  background: #f6f3eb;
}
.hub-history-vs {
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1;
  text-transform: lowercase;
  color: var(--color-dusty-deep);
}
.hub-history-chevron { display: flex; align-items: center; color: #8a9499; }
.hub-history-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 6px 13px 14px;
  background: transparent;
}
.hub-history-details dl {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 2px 12px;
  font-size: .82rem;
  overflow-wrap: anywhere;
}
.hub-history-details dl.hub-history-context {
  padding: 12px;
  border-radius: 12px;
  background: var(--color-cream, #f3efe6);
}
.hub-history-details dl > div {
  display: grid;
  grid-template-columns: minmax(96px, 40%) minmax(0, 1fr);
  align-items: baseline;
  gap: 8px 12px;
}
.hub-history-details dt {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
}
.hub-history-details dd {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-ink);
}
.hub-history-details-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
.hub-history-open-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid var(--inoff-shell-primary-accent, var(--color-orange));
  background: var(--inoff-shell-primary-accent, var(--color-orange));
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.hub-history-open-btn:hover {
  background: var(--inoff-shell-primary, var(--color-orange-hover));
  border-color: var(--inoff-shell-primary, var(--color-orange-hover));
}
.hub-venue-link {
  color: var(--color-dusty-deep);
  text-decoration: underline;
  text-decoration-color: var(--color-dusty-blue);
  text-underline-offset: 2px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
}
.hub-venue-link:hover {
  color: var(--color-orange-ink);
  text-decoration-color: var(--color-orange);
}
/* Venue Profile Hero (#112) */
.hub-venue-hero {
  padding: 0;
  overflow: hidden;
}
.hub-venue-banner {
  width: 100%;
  aspect-ratio: 16 / 7;
  max-height: 200px;
  background: var(--color-surface-high);
  border-bottom: 1px solid var(--color-border);
  overflow: hidden;
}
.hub-venue-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hub-venue-hero-body {
  padding: 16px 18px 18px;
}
.hub-venue-details {
  display: grid;
  gap: 6px;
  margin: 4px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--color-cream, #f3efe6);
  font-size: 0.82rem;
}
.hub-venue-details > div {
  display: grid;
  grid-template-columns: minmax(76px, 28%) minmax(0, 1fr);
  gap: 6px 10px;
  align-items: baseline;
}
.hub-venue-details dt {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
}
.hub-venue-details dd {
  margin: 0;
  font-weight: 600;
  color: var(--color-ink);
  overflow-wrap: anywhere;
}
.hub-venue-details dd a {
  color: var(--color-dusty-deep);
  text-decoration: underline;
  text-decoration-color: var(--color-dusty-blue);
}
.hub-venue-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}
.hub-venue-link-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 9999px;
  border: 1px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-dusty-deep);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
}
.hub-venue-link-chip:hover {
  border-color: var(--color-orange);
  color: var(--color-orange-ink);
}
.hub-history-group > .hub-history-toggle {
  grid-template-columns: minmax(0, 1fr) auto 14px;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid rgba(216, 208, 192, 0.75);
  border-radius: 10px;
  background: var(--color-cream);
  color: var(--color-dusty-deep);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.2;
  transition: background-color 0.14s ease, border-color 0.14s ease;
}
.hub-history-group > .hub-history-toggle:hover,
.hub-history-group > .hub-history-toggle:focus-visible,
.hub-history-group.is-open > .hub-history-toggle {
  background: var(--color-surface-high);
  border-color: var(--color-border);
}
.hub-history-group-count {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-dusty-deep);
  font-variant-numeric: tabular-nums;
}
.hub-history-group > .inoff-acc-panel > .inoff-acc-clip { padding-inline: 0; }
.hub-history-group.is-open > .inoff-acc-panel > .inoff-acc-clip > :first-child { margin-top: 6px; }
.hub-history-year .hub-history-group + .hub-history-group { margin-top: 6px; }
.hub-history-more { margin: 6px 0; }

/* Responsive 2-column landscape layout for Match Hub lists (two equal continuous white columns, 10px cream gutter, full-width expanded card, #124) */
@media (orientation: landscape) and (min-width: 600px) {
  .hub-history-recent,
  .hub-history-group-rows,
  .hub-entity-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-flow: dense;
    align-items: start;
    column-gap: 10px;
    row-gap: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
  }

  .hub-history .hub-history-row,
  .hub-entity-list > .hub-entity-card {
    background: var(--color-card);
    border: 0;
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
    border-radius: 0;
    overflow: hidden;
  }

  .hub-history .hub-history-row + .hub-history-row,
  .hub-entity-list > .hub-entity-card + .hub-entity-card {
    border-top: 0;
  }

  .hub-history .hub-history-row:nth-child(-n + 2),
  .hub-entity-list > .hub-entity-card:nth-child(-n + 2) {
    border-top: 1px solid var(--color-border);
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
  }

  .hub-history .hub-history-row:nth-child(n + 3),
  .hub-entity-list > .hub-entity-card:nth-child(n + 3) {
    border-top: 1px dotted var(--color-border);
  }

  .hub-history .hub-history-row:nth-last-child(-n + 2),
  .hub-entity-list > .hub-entity-card:nth-last-child(-n + 2) {
    border-bottom: 1px solid var(--color-border);
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
  }

  /* Expanded match spans both columns cleanly with horizontal non-wrapping layout */
  .hub-history .hub-history-row.is-open {
    grid-column: 1 / -1;
    border: 1px solid var(--color-dusty-deep);
    border-radius: 14px;
    margin-block: 6px;
    box-shadow: 0 4px 14px rgba(28, 28, 22, 0.08);
  }

  .hub-history .hub-history-row.is-open .hub-history-details {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) auto auto;
    align-items: center;
    gap: 10px 18px;
    padding: 8px 16px 14px;
  }

  .hub-history .hub-history-row.is-open .hub-history-context > div {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 6px 12px;
  }

  .hub-history .hub-history-row.is-open .hub-history-context dt {
    white-space: nowrap;
  }

  .hub-history .hub-history-row.is-open .hub-history-match-details {
    display: grid;
    grid-template-columns: repeat(2, auto);
    justify-content: start;
    gap: 6px 18px;
    padding: 0;
  }

  .hub-history .hub-history-row.is-open .hub-history-match-details > div {
    grid-template-columns: auto auto;
    gap: 0 8px;
    white-space: nowrap;
  }

  .hub-history .hub-history-row.is-open .hub-history-details-actions {
    align-self: end;
  }
}

.hub-history-feed { display: grid; gap: 6px; min-width: 0; }
.hub-history-feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 6px 0 2px;
}
.hub-history-feed-head h3 { margin: 0; }
.hub-history-completed-heading { margin: 6px 0 2px; }
.hub-history-feed[hidden], .hub-history-quiet[hidden] { display: none; }
.hub-history-match-status {
  border-radius: 4px;
  padding: 2px 5px;
  font-size: .67rem;
  line-height: 1.3;
  font-weight: 700;
}

/* Dedicated Match Hub Filter Modal (#111) */
.hub-filter-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(28, 28, 22, 0.54);
  backdrop-filter: blur(2px);
  padding: 16px;
}
.hub-filter-backdrop[hidden],
.hub-filter-backdrop [hidden] { display: none !important; }
.hub-filter-modal {
  display: flex;
  flex-direction: column;
  width: min(100%, 540px);
  max-height: min(92dvh, 720px);
  background: var(--color-cream, #f3efe6);
  color: var(--color-ink, #1c1c16);
  border: 1px solid var(--color-border, #d8d0c0);
  border-radius: 18px;
  box-shadow: 0 24px 56px rgba(28, 28, 22, 0.26);
  overflow: hidden;
}
@media (max-width: 639px) {
  .hub-filter-backdrop {
    padding: 0;
    align-items: stretch;
  }
  .hub-filter-modal {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
}
@media (max-height: 480px) and (min-width: 520px) {
  .hub-filter-backdrop { padding: 8px; }
  .hub-filter-modal {
    max-height: calc(100dvh - 16px);
    width: min(100%, 620px);
  }
}
.hub-filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(11px + env(safe-area-inset-top, 0px)) 16px 11px;
  background: var(--color-card, #ffffff);
  border-bottom: 1px solid var(--color-border, #d8d0c0);
  flex-shrink: 0;
}
.hub-filter-title {
  margin: 0;
  font-family: var(--font-display, 'Oswald', sans-serif);
  font-size: 1.32rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.hub-filter-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-border, #d8d0c0);
  border-radius: 9999px;
  background: var(--color-surface, #fdf9f0);
  color: var(--color-ink, #1c1c16);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}
.hub-filter-close:hover { background: var(--color-cream, #f3efe6); }
.hub-filter-body {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 16px 20px;
  display: grid;
  gap: 14px;
  align-content: start;
}
.hub-filter-section {
  background: var(--color-card, #ffffff);
  border: 1px solid var(--color-border, #d8d0c0);
  border-radius: 14px;
  padding: 13px 14px;
  display: grid;
  gap: 10px;
  min-width: 0;
  box-shadow: 0 2px 6px rgba(28, 28, 22, 0.04);
}
.hub-filter-section-list {
  padding-bottom: 4px;
}
.hub-filter-section-title {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-dusty-deep, #47626c);
}

/* 4-option single-row Date segmented bar */
.hub-filter-segmented {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: 9999px;
  background: var(--color-cream, #f3efe6);
  border: 1px solid rgba(216, 208, 192, 0.85);
}
.hub-filter-seg-btn {
  min-height: 44px;
  padding: 6px 6px;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  color: var(--color-ink, #1c1c16);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
  white-space: nowrap;
}
.hub-filter-seg-btn:hover { background: rgba(255, 255, 255, 0.65); }
.hub-filter-seg-btn.is-selected {
  background: var(--color-dusty-deep, #47626c);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(71, 98, 108, 0.28);
}

/* Multi-select Result type pills inside Explore filter modal (#116) */
.hub-filter-type-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hub-filter-type-chip {
  min-height: 40px;
  padding: 7px 14px;
  border-radius: 9999px;
  border: 1px solid rgba(216, 208, 192, 0.95);
  background: var(--color-cream, #f3efe6);
  color: var(--color-ink, #1c1c16);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
  white-space: nowrap;
}
.hub-filter-type-chip:hover {
  background: #ffffff;
  border-color: var(--color-dusty-deep, #47626c);
}
.hub-filter-type-chip.is-selected {
  background: var(--color-dusty-deep, #47626c);
  border-color: var(--color-dusty-deep, #47626c);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(71, 98, 108, 0.24);
}

/* Compact app-style picker rows */
.hub-filter-rows {
  display: grid;
}
.hub-filter-row-wrap {
  border-top: 1px solid rgba(216, 208, 192, 0.6);
}
.hub-filter-rows > .hub-filter-row-wrap:first-child {
  border-top: 0;
}
.hub-filter-custom-date {
  border-top: 1px solid rgba(216, 208, 192, 0.6);
  padding-top: 4px;
}
.hub-filter-row-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 8px 2px;
  border: 0;
  background: transparent;
  color: var(--color-ink, #1c1c16);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.hub-filter-row-label {
  font-size: 0.92rem;
  font-weight: 600;
  flex-shrink: 0;
}
.hub-filter-row-right {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.hub-filter-active-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-orange, #f36a36);
  flex-shrink: 0;
}
.hub-filter-row-value {
  font-size: 0.88rem;
  color: #6b767b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hub-filter-row-value.is-active {
  color: var(--color-dusty-deep, #47626c);
  font-weight: 700;
}
.hub-filter-row-chev {
  display: inline-flex;
  color: #7a868b;
  transition: transform 0.18s ease;
  flex-shrink: 0;
}
.hub-filter-row-wrap.is-open .hub-filter-row-chev {
  transform: rotate(180deg);
  color: var(--color-dusty-deep, #47626c);
}
.hub-filter-picker-panel {
  margin: 0 0 10px;
  padding: 8px;
  border: 1px solid var(--color-border, #d8d0c0);
  border-radius: 12px;
  background: var(--color-surface, #fdf9f0);
  display: grid;
  gap: 6px;
}
.hub-filter-modal input,
.hub-filter-modal select,
.hub-filter-modal textarea {
  font-size: 16px;
}
.hub-filter-search-input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--color-border, #d8d0c0);
  border-radius: 10px;
  background: #ffffff;
  color: var(--color-ink, #1c1c16);
  font: inherit;
  font-size: 16px;
}
.hub-filter-search-input:focus {
  outline: 2px solid var(--color-dusty-deep, #47626c);
  outline-offset: 1px;
}
.hub-filter-picker-list {
  max-height: 176px;
  overflow-y: auto;
  display: grid;
  gap: 2px;
}
.hub-filter-picker-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--color-ink, #1c1c16);
  font: inherit;
  font-size: 0.88rem;
  text-align: left;
  cursor: pointer;
}
.hub-filter-picker-option:hover { background: var(--color-cream, #f3efe6); }
.hub-filter-picker-option.is-selected {
  background: var(--color-dusty-deep, #47626c);
  color: #ffffff;
  font-weight: 600;
}
.hub-filter-empty-note { margin: 6px 8px; font-size: 0.82rem; }

/* Nearby switch row */
.hub-filter-nearby-block {
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(216, 208, 192, 0.6);
  display: grid;
  gap: 4px;
}
.hub-filter-nearby-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  cursor: pointer;
}
.hub-filter-nearby-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}
.hub-filter-nearby-label {
  font-size: 0.92rem;
  font-weight: 600;
}
.hub-filter-switch {
  position: relative;
  flex-shrink: 0;
  width: 48px;
  height: 28px;
}
.hub-filter-switch input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.hub-filter-switch-track {
  display: block;
  width: 48px;
  height: 28px;
  border-radius: 9999px;
  background: #cdc5b6;
  transition: background-color 0.18s ease;
}
.hub-filter-switch-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.24);
  transition: transform 0.18s ease;
}
.hub-filter-switch input:checked + .hub-filter-switch-track {
  background: var(--color-orange, #f36a36);
}
.hub-filter-switch input:checked + .hub-filter-switch-track::after {
  transform: translateX(20px);
}
.hub-filter-switch input:disabled + .hub-filter-switch-track { opacity: 0.45; }
.hub-filter-switch input:focus-visible + .hub-filter-switch-track {
  outline: 2px solid var(--color-dusty-deep, #47626c);
  outline-offset: 2px;
}
.hub-filter-nearby-note {
  margin: 0;
  font-size: 0.78rem;
  color: var(--color-muted, #59413a);
}
.hub-filter-nearby-note a {
  color: var(--color-dusty-deep, #47626c);
  font-weight: 600;
}

/* Sticky Elevated 2-Button Footer */
.hub-filter-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--color-card, #ffffff);
  border-top: 1px solid var(--color-border, #d8d0c0);
  box-shadow: 0 -6px 20px rgba(28, 28, 22, 0.07);
  flex-shrink: 0;
}
.hub-filter-footer .btn {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 9999px;
  font-weight: 600;
}
.hub-filter-clear-btn {
  border: 1px solid var(--color-border, #d8d0c0);
  background: var(--color-surface, #fdf9f0);
  color: var(--color-ink, #1c1c16);
}
.hub-filter-clear-btn:hover { background: var(--color-cream, #f3efe6); }
.hub-filter-apply-btn {
  margin-left: auto;
  padding: 0 22px;
  border: 1px solid var(--color-orange, #f36a36);
  background: var(--color-orange, #f36a36);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(243, 106, 54, 0.28);
}
.hub-filter-apply-btn:hover {
  background: var(--color-orange-hover, #d95726);
  border-color: var(--color-orange-hover, #d95726);
}
