:root {
  --visitor-bg: #100e0a;
  --visitor-panel: #16130e;
  --visitor-line: rgba(255, 255, 255, 0.1);
  --visitor-gold: #d6ad61;
  --visitor-gold-soft: #f1d698;
  --visitor-muted: #a6ada7;
  --visitor-display: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
}

body.visitor-face {
  background: var(--visitor-bg);
  color: #f7f3ea;
}

body.visitor-face .shell {
  max-width: 430px;
  min-height: 100dvh;
  padding: 0 15px 72px;
}

body.visitor-face .top {
  position: sticky;
  top: 0;
  z-index: 40;
  margin: 0 -15px;
  padding: max(10px, env(safe-area-inset-top)) 15px 12px;
  background: var(--visitor-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: none;
  isolation: isolate;
}

body.visitor-face .topin { max-width: none; }

.visitor-ribbon {
  display: block;
}

.visitor-brand-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 40px;
}

.visitor-crest {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: none;
  border: 0;
  box-shadow: none;
}

.visitor-crest img { display: block; width: 40px; height: 40px; object-fit: contain; }
.visitor-wordmark {
  display: block;
  color: #fff6df;
  font-family: var(--visitor-display);
  font-size: clamp(19px, 5.25vw, 21px);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 0.95;
  white-space: nowrap;
  text-transform: uppercase;
}

.visitor-advance-rail {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  margin-top: 7px;
  padding: 6px 0 4px;
  border-top: 1px solid rgba(214, 173, 97, 0.24);
  border-bottom: 0;
  background: none;
}

.visitor-advance-label {
  color: #a9a18f;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.visitor-advance-rail time {
  min-width: 0;
  color: var(--visitor-gold);
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.visitor-advance-timer {
  min-width: 58px;
  text-align: right;
}

.visitor-advance-timer strong {
  display: block;
  color: #fff1c9;
  font-family: var(--visitor-display);
  font-size: 15px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
  line-height: 1;
  white-space: nowrap;
}

.visitor-ribbon-stage {
  padding-left: 9px;
  border-left: 1px solid rgba(214, 173, 97, 0.28);
  text-align: right;
}

.visitor-ribbon-stage b {
  display: block;
  color: #efd49c;
  font-family: var(--visitor-display);
  font-size: 19px;
  font-weight: 400;
  letter-spacing: 0.06em;
}

.visitor-ribbon-stage span {
  display: block;
  margin-top: 2px;
  color: #c9c0aa;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body.visitor-face .nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  max-width: none;
  margin-top: 12px;
}

body.visitor-face .nav button {
  min-height: 54px;
  padding: 8px 3px;
  border: 1px solid #30362f;
  border-radius: 13px;
  background: #0c0f0d;
  color: #d5d8d4;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
}

body.visitor-face .nav button.active {
  border-color: #efd28f;
  background: linear-gradient(180deg, #e1be73, #b98b34);
  box-shadow: none;
  color: #111;
}

body.visitor-face .page { padding-top: 16px; }
.visitor-legacy-deadline,
body.visitor-face .regular-schedule,
body.visitor-face .rewind-controls,
body.visitor-face .rewind-results { display: none !important; }

body.visitor-face .rewind {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}

body.visitor-face .rewind-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}

body.visitor-face .rewind-head h2 {
  margin: 0;
  color: var(--visitor-gold);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

body.visitor-face .rewind-head span { color: var(--visitor-muted); font-size: 11px; }
body.visitor-face .rewind-viewport {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  padding: 0 15px 4px;
  margin: 0 -15px;
}

body.visitor-face .rewind-story {
  flex: 0 0 78%;
  min-width: 0;
  scroll-snap-align: start;
  padding: 14px 14px 16px;
  border: 1px solid rgba(225, 189, 107, 0.32);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(34, 28, 18, 0.92), rgba(12, 10, 8, 0.94));
}

body.visitor-face .rewind-story h3 {
  margin: 0;
  color: #fff6df;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

body.visitor-face .rewind-score {
  margin: 6px 0 8px;
  color: var(--visitor-gold-soft);
  font-size: 13px;
  font-weight: 800;
}

body.visitor-face .rewind-story p { margin: 0; color: #c3c9c3; font-size: 12px; line-height: 1.4; }
body.visitor-face .rewind-label { display: none; }

.visitor-social-banner {
  appearance: none;
  width: 100%;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(225, 189, 107, 0.5);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(40, 32, 18, 0.95), rgba(16, 12, 8, 0.98));
  color: inherit;
  text-align: left;
}

.visitor-social-banner strong {
  color: var(--visitor-gold-soft);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.visitor-live-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #baf0ca;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.visitor-live-label::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #55d88a;
  box-shadow: 0 0 0 4px rgba(85, 216, 138, 0.16);
}

body.visitor-face .game-center { margin-top: 18px; }
body.visitor-face .game-center-head { align-items: flex-end; margin-bottom: 12px; }
body.visitor-face .game-center-head .section-kicker { display: none; }
body.visitor-face .game-center-head h2 { font-size: 22px; letter-spacing: -0.03em; }
body.visitor-face .game-center-head > span { max-width: 180px; font-size: 11px; }
body.visitor-face .game-center-stage-tabs {
  margin: 0 0 12px;
  padding: 3px;
  border-color: rgba(225, 189, 107, 0.28);
  border-radius: 13px;
  background: #0c0f0d;
}

body.visitor-face .game-center-stage-tab {
  min-height: 44px;
  border-radius: 10px;
  color: #c9c0aa;
  font-size: 11px;
  letter-spacing: 0.04em;
}

body.visitor-face .game-center-stage-tab[aria-selected="true"] {
  border-color: #efd28f;
  background: linear-gradient(180deg, #e1be73, #b98b34);
  box-shadow: none;
  color: #111;
}

body.visitor-face .matchup-grid { display: grid; gap: 10px; }

.visitor-match-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(16, 14, 10, 0.65), rgba(10, 8, 6, 0.88));
}

.visitor-match-card.game-of-week { border-color: rgba(225, 189, 107, 0.72); }
.visitor-match-card.focused { border-color: rgba(225, 189, 107, 0.58); }
.visitor-gotw {
  min-height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #f2d99d;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.visitor-gotw img { width: 12px; height: 12px; }
.visitor-match-face {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
  min-height: 104px;
}

.visitor-match-card.game-of-week .visitor-match-face { min-height: 128px; }
.visitor-team {
  appearance: none;
  min-width: 0;
  min-height: 104px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 14px 10px 16px;
  border: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--team) 72%, #120f0b), color-mix(in srgb, var(--team) 22%, #100e0a));
  color: inherit;
  transition: opacity 180ms ease, filter 180ms ease;
}

.visitor-team.away { align-items: flex-start; text-align: left; }
.visitor-team.home { align-items: flex-end; text-align: right; }
.visitor-coach {
  color: #fff8e8;
  font-family: var(--visitor-display);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 0.9;
  text-transform: uppercase;
}

.visitor-match-card.game-of-week .visitor-coach { font-size: 36px; }
.visitor-team-name { color: #e4d8bf; font-size: 12px; font-weight: 700; line-height: 1.25; }
.visitor-at { display: grid; place-items: center; }
.visitor-at span {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f3e0a8, #b98b34 62%, #6d5318);
  color: #171108;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.visitor-match-card.focused .visitor-team:not([aria-pressed="true"]) { opacity: 0.38; filter: saturate(0.55); }
.visitor-team[aria-pressed="true"] { background: linear-gradient(165deg, color-mix(in srgb, var(--team) 88%, #000), color-mix(in srgb, var(--team) 28%, #100e0a)); }
.visitor-ticket {
  min-height: 52px;
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 10px 12px;
  color: #b9b09d;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.visitor-ticket strong { color: #f0d38f; font-size: 12px; }
.visitor-card-fact {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.visitor-member-contact {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(225, 189, 107, 0.55);
  border-radius: 12px;
  background: #0b0e0c;
  color: var(--visitor-gold-soft);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: none;
}

.visitor-member-contact {
  border-color: rgba(85, 216, 138, 0.48);
  color: #baf0ca;
}

.visitor-social-header,
.visitor-commission-header { margin: 0 0 12px; }
.visitor-social-header { display: flex; align-items: center; gap: 10px; }
.visitor-social-header img { width: 16px; height: 16px; }
.visitor-social-header strong,
.visitor-commission-header h2 {
  margin: 0;
  color: #fff6df;
  font-family: var(--visitor-display);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
}

.visitor-social-header span,
.visitor-commission-header p { display: block; margin: 4px 0 0; color: #c9c0aa; font-size: 10px; line-height: 1.4; }
.visitor-panel {
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid rgba(225, 189, 107, 0.28);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(28, 22, 14, 0.94), rgba(14, 11, 8, 0.96));
}

.visitor-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.visitor-panel-head span { color: #9ca39e; font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.visitor-wall-copy { padding: 16px 12px 18px; }
.visitor-wall-copy b { color: var(--visitor-gold-soft); font-family: var(--visitor-display); font-size: 22px; font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase; }
.visitor-wall-copy p { margin: 6px 0 0; color: #9ca39e; font-size: 13px; line-height: 1.45; }
.visitor-member-access {
  display: grid;
  gap: 14px;
  margin: 0 0 14px;
  padding: 16px 14px;
  border: 1px solid rgba(85, 216, 138, 0.3);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(12, 45, 27, 0.72), rgba(14, 11, 8, 0.96) 64%);
}

.visitor-member-access h2 {
  margin: 5px 0 0;
  color: #fff6df;
  font-size: 20px;
  line-height: 1.1;
}

.visitor-member-access p { margin: 7px 0 0; color: #aeb5ae; font-size: 12px; line-height: 1.5; }
.visitor-member-access a {
  min-height: 46px;
  display: grid;
  place-items: center;
  padding: 10px 14px;
  border: 1px solid rgba(225, 189, 107, 0.58);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(40, 32, 18, 0.98), rgba(16, 12, 8, 0.98));
  color: var(--visitor-gold-soft);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.visitor-slate { padding: 10px 12px 12px; background: #0c0e10; }
.visitor-slate-empty {
  min-height: 74px;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 14px 10px;
  color: #aeb5ae;
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}
.visitor-slate-card {
  margin-bottom: 8px;
  padding: 12px;
  border: 1px solid rgba(225, 189, 107, 0.2);
  border-radius: 16px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--away) 22%, #12161a), #161b20 46%, color-mix(in srgb, var(--home) 22%, #12161a));
}

.visitor-slate-card:last-child { margin-bottom: 0; }
.visitor-slate-card.focused { border-color: rgba(225, 189, 107, 0.7); }
.visitor-slate-card .visitor-gotw-label { margin-bottom: 6px; color: var(--visitor-gold); font-size: 10px; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; }
.visitor-slate-card p { margin: 0 0 10px; color: #fff6df; font-size: 16px; font-weight: 700; }
.visitor-slate-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #b9b09d; font-size: 9px; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; }
.visitor-slate-line strong { color: #f0d38f; font-size: 12px; }
.visitor-thread-dock {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  border: 1px solid rgba(225, 189, 107, 0.32);
  border-radius: 12px;
  background: #14110c;
  color: var(--visitor-gold-soft);
  font-size: 14px;
  font-weight: 800;
}

.visitor-thread-dock span { color: #9ca39e; font-size: 10px; font-weight: 700; text-align: right; }

.visitor-member-route {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.visitor-member-route h2 { margin: 5px 0 0; color: #fff6df; font-family: var(--visitor-display); font-size: 24px; font-weight: 400; letter-spacing: 0.05em; text-transform: uppercase; }
.visitor-member-route p { margin: 5px 0 0; color: #aeb5ae; font-size: 11px; line-height: 1.4; }
.visitor-member-route nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.visitor-member-route a {
  min-height: 44px;
  display: grid;
  place-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(225, 189, 107, 0.34);
  border-radius: 11px;
  background: #0c0f0d;
  color: var(--visitor-gold-soft);
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

body.visitor-face #contacts .gate {
  margin-top: 0;
  border-color: rgba(225, 189, 107, 0.32);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(40, 32, 18, 0.82), rgba(12, 15, 13, 0.98) 62%);
  box-shadow: none;
}

body.visitor-face #contacts .contacts { margin-top: 12px; }

body.visitor-face #rules > .heading { display: none; }
body.visitor-face #rules .visitor-commission-header { display: block; }
body.visitor-face #rules details {
  margin: 0 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: var(--visitor-panel);
}

body.visitor-face #rules summary { padding: 14px; }
body.visitor-face #rules .rules { padding: 0 14px 14px; }
body.visitor-face #rules .rules li { color: #c3c9c3; font-size: 13px; line-height: 1.5; }
.visitor-disclaimer { margin: 12px 2px 0; color: #aeb5ae; font-size: 11px; line-height: 1.5; }

body.visitor-face #scores > .heading h2 { font-size: 24px; }
body.visitor-face .foot { margin-top: 32px; color: #c9c0aa; font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; }

@media (max-width: 370px) {
  .visitor-wordmark { font-size: 18px; }
  .visitor-advance-label { font-size: 7px; }
  .visitor-advance-rail time { font-size: 9px; }
  .visitor-coach { font-size: 24px; }
  .visitor-match-card.game-of-week .visitor-coach { font-size: 31px; }
  body.visitor-face .nav button { font-size: 10px; }
  .visitor-member-route { display: grid; }
  .visitor-member-route nav { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .visitor-team { transition: none; }
}
