:root {
  --bg-a: #ffffff;
  --bg-b: #f6f8fc;
  --bg-c: #eef3fb;
  --text: #1b2533;
  --muted: #5f6e81;
  --accent: #d6203f;
  --accent-soft: #fce8ec;
  --line: #dbe3ef;
  --panel: #ffffff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--text);
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, #ffffff 0%, var(--bg-b) 38%, transparent 58%),
    radial-gradient(circle at 100% 100%, #ffffff 0%, var(--bg-c) 35%, transparent 64%),
    linear-gradient(160deg, #ffffff 0%, var(--bg-b) 60%, var(--bg-c) 100%);
  font-family: "Segoe UI", "Trebuchet MS", sans-serif;
}

.orb { display: none; }

.topbar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.8rem 1rem 0.85rem;
}

.brand-lockup {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(110deg, #ffffff 0%, #f8fbff 48%, #eef4ff 100%);
  box-shadow: 0 16px 28px rgba(39, 56, 83, 0.11);
  padding: 0.72rem 0.8rem 0.62rem;
}

.brand-main-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-main {
  display: flex;
  align-items: center;
  gap: 0.62rem;
}

.brand-tagline {
  color: #6a7d96;
  font-size: 0.86rem;
  font-weight: 600;
  text-align: right;
  max-width: 420px;
}

.brand-logo {
  width: 62px;
  height: 62px;
  border-radius: 12px;
  box-shadow: 0 9px 16px rgba(18, 34, 58, 0.18);
}

.brand-name {
  margin: 0;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  letter-spacing: 0.25px;
  color: #1c2b43;
}

.brand-sub {
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.48rem;
  padding-left: 0.02rem;
  border-top: 1px solid #e4ebf6;
  padding-top: 0.44rem;
}

.smarttickets-mark {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 2px solid #d6203f;
  background: radial-gradient(circle at 34% 34%, #ffe4e9, #ee8ea0);
  box-shadow: inset 0 0 0 2px #fff;
}

.smarttickets-name {
  color: #9f1630;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.smarttickets-chip {
  margin-left: 0.2rem;
  border: 1px solid #f1c6cf;
  border-radius: 999px;
  background: #fff6f8;
  color: #a51c34;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  padding: 0.2rem 0.48rem;
  text-transform: uppercase;
}

.shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem 1.1rem;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  padding: 0.85rem;
  box-shadow: 0 8px 18px rgba(26, 40, 63, 0.08);
}

.standings-panel {
  margin-bottom: 0.7rem;
}

.standings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
  margin-bottom: 0.6rem;
}

.standings-tab {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #35506f;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.32rem 0.62rem;
  cursor: pointer;
}

.standings-tab.active {
  border-color: #9fd8c2;
  background: #effcf6;
  color: #15634e;
}

.standings-table-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f9fbff);
  padding: 0.55rem;
}

.standing-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f9fbff);
  padding: 0.5rem;
}

.standing-card h3 {
  margin: 0 0 0.4rem;
  font-size: 0.9rem;
}

.standing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.73rem;
}

.standing-table th,
.standing-table td {
  padding: 0.2rem 0.15rem;
  border-bottom: 1px solid #edf2f9;
  text-align: left;
}

.standing-table th:last-child,
.standing-table td:last-child {
  text-align: right;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0.1rem 0 0.75rem;
}

.tab {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 10px;
  padding: 0.62rem 0.75rem;
  cursor: pointer;
  text-align: center;
  font-weight: 600;
}

.tab.active {
  border-color: #eab3be;
  background: var(--accent-soft);
  color: #8f132a;
}

.hidden { display: none; }

.stats-modal.hidden {
  display: none;
}

.fixtures-daybar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.42rem;
  margin-bottom: 0.7rem;
}

.day-pill {
  border: 1px solid var(--line);
  background: #fff;
  color: #31445e;
  border-radius: 10px;
  padding: 0.42rem 0.35rem;
  cursor: pointer;
  font-size: 0.76rem;
  text-align: center;
}

.day-pill.active {
  border-color: #eab3be;
  background: var(--accent-soft);
  color: #8f132a;
  font-weight: 700;
}

.fixtures-list {
  display: grid;
  gap: 0.42rem;
}

.fixture-league-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f9fbff);
  overflow: hidden;
}

.fixture-league-head {
  width: 100%;
  border: none;
  border-bottom: 1px solid #e7edf7;
  background: #fff;
  color: #1f3655;
  padding: 0.56rem 0.62rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  cursor: pointer;
}

.fixture-league-title {
  font-size: 0.86rem;
  font-weight: 700;
}

.fixture-league-count {
  font-size: 0.72rem;
  color: #5f7290;
  font-weight: 700;
}

.fixture-league-body {
  display: grid;
  gap: 0.35rem;
  padding: 0.42rem;
}

.fixtures-slicers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.fixture-row {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 0.48rem 0.58rem;
  display: grid;
  grid-template-columns: 94px 1fr auto;
  gap: 0.55rem;
  align-items: center;
}

.fixture-time {
  color: #5c6f88;
  font-size: 0.82rem;
  font-weight: 700;
}

.fixture-main strong {
  display: block;
  font-size: 0.92rem;
}

.fixture-main span {
  color: #607089;
  font-size: 0.78rem;
}

.fixture-tickets {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.fixture-tickets a {
  text-decoration: none;
  border: 1px solid #d5e1f0;
  border-radius: 999px;
  background: #fff;
  color: #2b405c;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.24rem 0.52rem;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: center;
}

h2 {
  margin: 0;
  font-size: 1.08rem;
}

.chip {
  border-radius: 999px;
  font-size: 0.72rem;
  padding: 0.25rem 0.52rem;
  border: 1px solid #ebc1c9;
  color: #a51634;
  background: #fff4f6;
}

.hint {
  margin: 0.42rem 0 0.76rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.fabrizio {
  border: 1px solid #b7ebda;
  background: linear-gradient(150deg, #f6fffb 0%, #eafaf4 48%, #dcf5ea 100%);
  border-radius: 12px;
  padding: 0.65rem;
  margin-bottom: 0.8rem;
  box-shadow: inset 0 0 0 1px rgba(30, 168, 119, 0.08);
}

.fabrizio-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.fabrizio h3 {
  margin: 0;
  font-size: 0.98rem;
  color: #0e6a50;
}

.chat-log {
  max-height: 240px;
  overflow-y: auto;
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
}

.msg {
  border-radius: 10px;
  padding: 0.48rem 0.58rem;
  font-size: 0.84rem;
  line-height: 1.34;
}

.msg.user {
  border: 1px solid #9fe5ca;
  background: #e8fbf2;
}

.msg.bot {
  border: 1px solid #bfeede;
  background: #f4fff9;
}

.msg-sources {
  margin-top: 0.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.msg-sources a {
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid #a9e7d1;
  background: #ffffff;
  color: #136349;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.46rem;
}

.chat-input {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem;
}

.filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  align-items: end;
  margin-bottom: 0.7rem;
}

.wide-filter {
  display: block;
  margin-bottom: 0.7rem;
}

label {
  color: #43556f;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.7px;
}

input,
select,
.ghost {
  width: 100%;
  margin-top: 0.22rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  padding: 0.55rem 0.62rem;
}

.ghost {
  width: auto;
  cursor: pointer;
  padding: 0.62rem 0.9rem;
  background: #e8fbf2;
  border-color: #9fe5ca;
  color: #0f6f53;
  font-weight: 700;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.65rem;
}

.card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f9fbff);
  padding: 0.7rem;
}

.card.clickable,
.row.clickable {
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.card.clickable:hover,
.row.clickable:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(38, 63, 99, 0.12);
}

.card h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.card p {
  margin: 0.2rem 0;
  color: #4f627d;
  font-size: 0.86rem;
}

.card .small {
  font-size: 0.78rem;
  color: #73859e;
}

.links {
  margin-top: 0.45rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.links a {
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid #d5e1f0;
  background: #fff;
  color: #2b405c;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 0.3rem 0.58rem;
}

.table-list {
  display: grid;
  gap: 0.42rem;
}

.row {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 0.55rem 0.62rem;
}

.stats-modal {
  position: fixed;
  inset: 0;
  background: rgba(22, 33, 52, 0.45);
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.stats-dialog {
  width: min(860px, 100%);
  max-height: 85vh;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 22px 45px rgba(20, 31, 49, 0.25);
  padding: 1rem;
}

.stats-body {
  display: grid;
  gap: 0.75rem;
}

.stats-section {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f7faff);
  padding: 0.7rem;
}

.stats-section h3 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: #1e2e45;
}

.stats-section p {
  margin: 0.3rem 0;
  color: #334760;
  line-height: 1.38;
  font-size: 0.9rem;
}

.stats-section p strong {
  color: #182a43;
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.stats-table th,
.stats-table td {
  padding: 0.36rem 0.34rem;
  border-bottom: 1px solid #e7edf6;
  text-align: left;
}

.stats-table th {
  color: #4c607c;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stats-table tr:last-child td {
  border-bottom: none;
}

.stats-table th:last-child,
.stats-table td:last-child {
  text-align: right;
}

.fc-card {
  border: 1px solid #d7e1ef;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff 0%, #f4f8ff 55%, #eef4ff 100%);
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 0.85rem;
  padding: 0.8rem;
}

.fc-portrait-wrap {
  border: 1px solid #d7e1ef;
  border-radius: 12px;
  background: linear-gradient(160deg, #f7fbff, #edf4ff);
  min-height: 220px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.fc-portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fc-info h3 {
  margin: 0 0 0.25rem;
  font-size: 1.35rem;
  color: #1a2a42;
}

.fc-subline {
  margin: 0;
  color: #5c6f88;
  font-size: 0.9rem;
}

.fc-attrs {
  margin-top: 0.7rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.fc-attrs div {
  border: 1px solid #d7e1ef;
  border-radius: 10px;
  padding: 0.4rem 0.45rem;
  background: #ffffff;
}

.fc-attrs span {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #6e8098;
}

.fc-attrs strong {
  display: block;
  margin-top: 0.15rem;
  color: #1f314c;
  font-size: 0.92rem;
}

.fc-bio {
  margin: 0.7rem 0 0;
  border: 1px solid #d7e1ef;
  border-radius: 10px;
  background: #ffffff;
  padding: 0.5rem 0.55rem;
  color: #415673;
  line-height: 1.4;
  font-size: 0.88rem;
}

.row strong { font-size: 0.95rem; }
.row span { color: #4f627d; font-size: 0.84rem; }

.empty {
  color: #73859e;
  font-style: italic;
}

@media (max-width: 860px) {
  .brand-main-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }
  .brand-tagline {
    text-align: left;
    max-width: 100%;
  }
  .brand-sub {
    flex-wrap: wrap;
  }
  .filters { grid-template-columns: 1fr; }
  .tabs { grid-template-columns: 1fr 1fr; }
  .fixtures-slicers { grid-template-columns: 1fr; }
  .fixtures-daybar { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .fixture-row { grid-template-columns: 1fr; }
  .fixture-tickets { justify-content: flex-start; }
  .fc-card { grid-template-columns: 1fr; }
  .fc-portrait-wrap { min-height: 180px; }
  .fc-attrs { grid-template-columns: 1fr 1fr; }
}
