:root {
  --page-bg: #edf3fb;
  --page-bg-strong: #e5eefb;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: #ffffff;
  --surface-soft: rgba(245, 249, 255, 0.94);
  --line: rgba(127, 157, 211, 0.18);
  --line-strong: rgba(73, 116, 196, 0.22);
  --text: #182235;
  --muted: #66738f;
  --accent: #2f6df6;
  --accent-soft: rgba(47, 109, 246, 0.11);
  --accent-strong: #184fcb;
  --success: #1f9d68;
  --warning: #cf8b1d;
  --danger: #d64045;
  --shadow-lg: 0 26px 60px rgba(59, 89, 152, 0.12);
  --shadow-md: 0 14px 34px rgba(59, 89, 152, 0.08);
  --shadow-sm: 0 8px 18px rgba(59, 89, 152, 0.06);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(77, 135, 255, 0.18), transparent 34%),
    radial-gradient(circle at top right, rgba(199, 225, 255, 0.66), transparent 36%),
    linear-gradient(180deg, #f8fbff 0%, var(--page-bg) 42%, var(--page-bg-strong) 100%);
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

[hidden] {
  display: none !important;
}

.app-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 26px;
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
}

.sidebar {
  position: sticky;
  top: 18px;
  align-self: start;
  max-height: calc(100vh - 36px);
}

.sidebar-inner {
  display: grid;
  gap: 20px;
  height: calc(100vh - 36px);
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(246, 250, 255, 0.95));
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(22px);
}

.brand-block {
  display: grid;
  gap: 16px;
}

.brand-row {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.brand-actions {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 10px;
  flex: 0 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
  font-size: 1.72rem;
  font-weight: 750;
}

.brand span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), #7ec4ff);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.brand-copy {
  display: grid;
  gap: 8px;
}

.brand-copy h1 {
  margin: 0;
  font-size: 1.72rem;
  line-height: 1.05;
}

.sidebar-kicker {
  margin: 0;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.favorites-rail {
  min-height: 0;
  min-width: 0;
}

.favorites-list {
  display: grid;
  gap: 12px;
  width: 100%;
  min-width: 0;
  max-height: 100%;
  overflow: auto;
  padding-right: 4px;
}

.favorites-list::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.favorites-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(89, 129, 212, 0.26);
}

.favorite-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 88px;
  padding: 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  box-shadow: var(--shadow-sm);
  color: inherit;
  overflow: hidden;
  text-align: left;
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    border-color 140ms ease,
    background 140ms ease;
}

.favorite-card:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
}

.favorite-card.is-active {
  border-color: rgba(47, 109, 246, 0.28);
  background:
    linear-gradient(180deg, rgba(240, 246, 255, 0.98), rgba(233, 241, 255, 0.96));
  box-shadow: 0 16px 32px rgba(47, 109, 246, 0.12);
}

.favorite-card.is-active .favorite-star {
  color: var(--accent);
}

.favorite-card--add {
  border-style: dashed;
  border-color: rgba(47, 109, 246, 0.26);
  background: rgba(247, 250, 255, 0.9);
}

.favorite-card--editable {
  grid-template-columns: 54px minmax(0, 1fr) auto;
  cursor: default;
}

.favorites-list.is-editing .favorite-card {
  border-color: rgba(47, 109, 246, 0.18);
}

.favorite-order-controls {
  display: grid;
  gap: 7px;
  align-self: stretch;
  align-content: center;
}

.order-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(47, 109, 246, 0.2);
  border-radius: 14px;
  background: rgba(237, 244, 255, 0.92);
  color: var(--accent);
  font-size: 1.08rem;
  font-weight: 850;
  box-shadow: none;
}

.order-button--remove {
  border-color: rgba(214, 64, 69, 0.22);
  background: rgba(255, 241, 242, 0.92);
  color: var(--danger);
}

.order-button:disabled {
  cursor: default;
  opacity: 0.38;
}

.order-icon {
  display: inline-grid;
  place-items: center;
  line-height: 1;
}

.order-icon--mobile {
  display: none;
}

.favorite-card--skeleton {
  pointer-events: none;
  border-color: rgba(127, 157, 211, 0.14);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: none;
}

.skeleton-avatar,
.skeleton-pill {
  background:
    linear-gradient(90deg, rgba(220, 231, 248, 0.78), rgba(255, 255, 255, 0.95), rgba(220, 231, 248, 0.78));
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
}

.skeleton-avatar {
  box-shadow: none;
}

.skeleton-pill {
  display: block;
  width: 72%;
  height: 13px;
  border-radius: 999px;
}

.skeleton-pill.is-wide {
  width: 88%;
}

.skeleton-pill.is-mid {
  width: 62%;
}

.skeleton-pill.is-short {
  width: 44%;
}

.favorite-avatar--add {
  background: linear-gradient(135deg, var(--accent), #4f93ff);
  font-size: 1.8rem;
}

.favorite-avatar,
.hero-avatar,
.entity-chip-avatar,
.event-team-avatar,
.series-team-avatar {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.avatar-fallback {
  position: relative;
  z-index: 1;
}

.has-media .avatar-fallback {
  opacity: 0;
  visibility: hidden;
}

.avatar-media {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.94);
}

.favorite-avatar.is-team .avatar-media,
.favorite-avatar.is-league .avatar-media,
.hero-avatar.is-team .avatar-media,
.hero-avatar.is-league .avatar-media,
.entity-chip-avatar.is-team .avatar-media,
.entity-chip-avatar.is-league .avatar-media,
.event-team-avatar.is-team .avatar-media,
.series-team-avatar.is-team .avatar-media {
  object-fit: contain;
  padding: 10px;
}

.favorite-avatar {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.favorite-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.favorite-title-row h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.favorite-star {
  margin-left: auto;
  color: rgba(86, 110, 154, 0.42);
  font-size: 1rem;
}

.favorite-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.favorite-meta p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.32;
  overflow-wrap: anywhere;
}

.sidebar-footer {
  display: none;
  gap: 12px;
  margin-top: auto;
}

@media (min-width: 961px) {
  .sidebar-footer {
    display: grid;
  }
}

.sidebar-footer .add-button {
  display: none;
}

.add-button,
.primary-button,
.ghost-button,
.action-link,
.chip-link,
.modal-close,
.suggestion-card,
.order-button {
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    background 140ms ease,
    border-color 140ms ease;
}

.add-button,
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 18px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent), #4f93ff);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 18px 30px rgba(47, 109, 246, 0.22);
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  font-weight: 650;
}

.sync-button {
  flex: 0 0 auto;
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 14px;
  box-shadow: none;
}

.reorder-button {
  flex: 0 0 auto;
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 14px;
  box-shadow: none;
}

.admin-button {
  flex: 0 0 auto;
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 14px;
  box-shadow: none;
}

.logout-button {
  flex: 0 0 auto;
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 14px;
  box-shadow: none;
}

.reorder-button.is-active {
  border-color: rgba(47, 109, 246, 0.32);
  background: rgba(47, 109, 246, 0.1);
  color: var(--accent);
}

.admin-button.is-active {
  border-color: rgba(47, 109, 246, 0.32);
  background: rgba(47, 109, 246, 0.1);
  color: var(--accent);
}

.app-icon {
  display: inline-block;
  width: 21px;
  height: 21px;
  color: currentColor;
  flex: 0 0 auto;
  transform-origin: center;
}

.sync-button.is-syncing {
  cursor: wait;
  opacity: 0.88;
}

.sync-button.is-syncing .app-icon {
  animation: sync-spin 900ms linear infinite;
  color: var(--accent);
}

.add-button:hover,
.primary-button:not(:disabled):hover,
.ghost-button:hover,
.action-link:hover,
.chip-link:hover,
.modal-close:hover,
.suggestion-card:hover,
.order-button:not(:disabled):hover {
  transform: translateY(-1px);
}

.sidebar-note,
.modal-note,
.modal-text,
.empty-copy p,
.section-description,
.event-supporting,
.status-note,
.link-group p,
.skeleton-note,
.table-meta,
.hero-summary {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.sidebar-note,
.modal-note {
  font-size: 0.92rem;
}

.main-content {
  min-width: 0;
  padding: 6px 0 24px;
}

.main-view {
  display: grid;
  gap: 14px;
  justify-items: stretch;
  max-width: 100%;
  overflow-x: clip;
}

.main-view > .hero-card,
.main-view > .content-card,
.main-view > .content-columns {
  width: 100%;
  max-width: 100%;
  justify-self: stretch;
}

.content-columns {
  display: grid;
  grid-template-columns:
    minmax(280px, 0.92fr)
    minmax(340px, 1fr)
    minmax(380px, 1.08fr);
  gap: 14px;
  align-items: start;
}

.content-columns--wide-profile {
  grid-template-columns: minmax(280px, 0.86fr) minmax(420px, 1.14fr);
}

.content-column {
  display: grid;
  gap: 14px;
  align-content: start;
  min-width: 0;
}

.content-column > .content-card {
  grid-column: auto;
  width: 100%;
}

.content-column--support .content-card--table {
  min-height: 0;
}

.content-card.content-card--standings-wide {
  justify-self: stretch;
  width: 100%;
  inline-size: 100%;
  max-width: 100%;
  min-width: 0;
  padding: clamp(18px, 2vw, 24px);
  overflow: hidden;
}

.status-banner {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(214, 64, 69, 0.18);
  background: rgba(255, 239, 241, 0.95);
  color: #8c2830;
  box-shadow: var(--shadow-sm);
}

.status-banner--success {
  border-color: rgba(28, 132, 85, 0.2);
  background: rgba(235, 250, 242, 0.96);
  color: #236344;
}

.hero-card,
.content-card,
.empty-stage,
.skeleton-stage {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px);
}

.hero-card {
  position: relative;
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr) minmax(210px, 0.52fr);
  gap: 22px;
  width: 100%;
  max-width: 100%;
  padding: 26px;
  overflow: hidden;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: auto -14% -34% auto;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 109, 246, 0.18), transparent 70%);
  pointer-events: none;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.68) 44%, rgba(255, 255, 255, 0.2) 100%);
  pointer-events: none;
}

.hero-card > * {
  position: relative;
  z-index: 1;
}

.hero-avatar {
  width: 108px;
  height: 108px;
  border-radius: 30px;
  font-size: 2rem;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.24),
    0 18px 38px rgba(47, 109, 246, 0.16);
}

.hero-copy-wrap {
  display: grid;
  gap: 14px;
  align-content: start;
  min-width: 0;
}

.hero-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.hero-title-row h2 {
  min-width: 0;
  margin: 0;
  font-size: clamp(2rem, 3vw, 3.15rem);
  line-height: 1.02;
  overflow-wrap: anywhere;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(96, 127, 187, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  overflow-wrap: anywhere;
}

.hero-provider-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-provider-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(236, 242, 255, 0.94);
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.24;
  overflow-wrap: anywhere;
  white-space: normal;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(105, 130, 178, 0.3);
}

.status-dot.is-connected,
.status-pill.is-live {
  background: var(--success);
}

.status-dot.is-idle {
  background: var(--warning);
}

.status-dot.is-error {
  background: var(--danger);
}

.hero-side {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 18px;
  border: 1px solid rgba(106, 136, 192, 0.14);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.74);
}

.hero-side-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-side-value {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.hero-side-stack {
  display: grid;
  gap: 10px;
}

.source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  max-width: 100%;
  padding: 0 14px;
  border: 1px solid rgba(88, 122, 190, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
}

.main-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: start;
}

.content-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  align-self: start;
  height: auto;
  min-height: 0;
}

.section-head > div,
.next-event,
.event-kicker,
.event-meta,
.event-teams,
.entity-chip,
.event-actions,
.event-links,
.hero-side,
.hero-side-stack,
.event-score-stack,
.metric-row,
.post-card {
  min-width: 0;
}

.content-card--next {
  grid-column: span 4;
}

.content-card--results {
  grid-column: span 4;
}

.content-card--table {
  grid-column: span 4;
}

.content-card--posts {
  grid-column: span 6;
}

.content-card--stats {
  grid-column: span 3;
}

.content-card--wide {
  grid-column: span 12;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.section-head h3 {
  margin: 0;
  font-size: 1.28rem;
  line-height: 1.08;
}

.section-head p {
  margin-top: 5px;
}

.section-head .status-pill {
  flex: 0 0 auto;
}

.inline-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(113, 140, 194, 0.12);
  color: var(--text);
  font-weight: 700;
}

.status-pill.is-upcoming {
  background: rgba(47, 109, 246, 0.11);
  color: var(--accent);
}

.status-pill.is-finished {
  background: rgba(31, 157, 104, 0.1);
  color: var(--success);
}

.status-pill.is-live {
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(31, 157, 104, 0.22);
}

.next-event {
  display: grid;
  gap: 14px;
}

.event-kicker {
  display: grid;
  gap: 8px;
}

.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
}

.event-meta span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.event-title {
  margin: 0;
  font-size: clamp(1.24rem, 1.75vw, 1.62rem);
  line-height: 1.12;
}

.event-teams {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.entity-chip {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.entity-chip-avatar {
  width: 68px;
  height: 68px;
  border-radius: 22px;
  font-size: 1.28rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.entity-chip p,
.vs-mark,
.result-score,
.metric-value,
.metric-label,
.result-date,
.row-main,
.row-sub,
.post-meta,
.post-text,
.table-cell {
  margin: 0;
}

.entity-chip p {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.vs-mark {
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
  text-transform: uppercase;
}

.vs-mark.is-score {
  min-width: 68px;
  padding: 7px 12px;
  border-radius: 14px;
  background: rgba(47, 109, 246, 0.1);
  color: var(--text);
  font-size: 1.02rem;
  font-weight: 850;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.event-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  min-width: 196px;
  padding: 0 16px;
  border-radius: 16px;
  text-decoration: none;
  font-weight: 700;
  line-height: 1.14;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

.action-link.is-primary {
  width: min(100%, 220px);
  background: linear-gradient(135deg, var(--accent), #4e8eff);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(47, 109, 246, 0.2);
}

.action-link.is-secondary {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
}

.action-link.is-tertiary {
  border: 1px solid rgba(91, 122, 181, 0.16);
  background: rgba(242, 247, 255, 0.86);
  color: var(--muted);
}

.action-link.is-compact {
  width: auto;
  min-width: 0;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 14px;
  box-shadow: none;
}

.event-list,
.stats-list,
.post-list {
  display: grid;
  gap: 10px;
}

.content-card--stats .stats-list {
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
}

.event-row,
.metric-row,
.post-card {
  padding: 12px 14px;
  border: 1px solid rgba(100, 131, 189, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
}

.event-row {
  display: grid;
  gap: 10px;
}

.event-row--match {
  gap: 12px;
}

.content-card--results .compact-event-row {
  grid-template-columns: 92px minmax(0, 1fr) auto;
  grid-template-areas:
    "date main score"
    ". links links";
  column-gap: 12px;
  row-gap: 8px;
  align-items: start;
}

.content-card--results .compact-event-row--solo {
  grid-template-columns: 92px minmax(0, 1fr);
  grid-template-areas:
    "date main"
    "date score"
    ". links";
}

.content-card--results .compact-event-row .event-row-head {
  display: contents;
}

.content-card--results .compact-event-row .result-date {
  grid-area: date;
  padding-top: 6px;
}

.content-card--results .compact-event-row .event-score-stack {
  grid-area: score;
}

.content-card--results .compact-event-row--solo .event-score-stack {
  justify-items: start;
}

.content-card--results .compact-event-row .event-main {
  grid-area: main;
}

.content-card--results .compact-event-row--solo .event-main {
  align-content: start;
}

.content-card--results .compact-event-row .event-links {
  grid-area: links;
}

.content-card--results .compact-event-row--solo .result-score {
  max-width: 100%;
  justify-content: flex-start;
  font-size: 0.98rem;
  line-height: 1.18;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}

.content-card--results .compact-event-row--solo .result-status {
  text-align: left;
}

.content-card--results .compact-event-row .event-links .action-link {
  min-height: 34px;
  padding: 0 12px;
}

.content-card--results .compact-event-row .event-matchup-line {
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}

.content-card--results .compact-event-row .event-matchup-team:last-child {
  justify-content: flex-start;
  text-align: left;
}

.content-card--results .compact-event-row .event-matchup-vs {
  display: none;
}

.content-card--results .compact-event-row .event-team-avatar {
  width: 34px;
  height: 34px;
  border-radius: 12px;
}

.event-row-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.event-row-top {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.event-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.result-date {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
  white-space: nowrap;
}

.content-card--results .compact-event-row .result-date {
  overflow-wrap: anywhere;
  white-space: normal;
}

.row-main {
  font-weight: 700;
  line-height: 1.38;
  overflow-wrap: anywhere;
}

.row-sub {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.38;
}

.result-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  min-height: 34px;
  padding: 4px 10px;
  border-radius: 12px;
  background: rgba(47, 109, 246, 0.1);
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 800;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.event-score-stack {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.result-status {
  margin: 0;
  max-width: 100%;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.2;
  text-align: right;
  overflow-wrap: anywhere;
}

.event-matchup-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.event-matchup-team {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 750;
  line-height: 1.22;
}

.event-matchup-team:last-child {
  justify-content: flex-end;
  text-align: right;
}

.event-matchup-team span {
  min-width: 0;
  overflow-wrap: break-word;
}

.content-card--results .event-matchup-line {
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
}

.content-card--results .event-matchup-team:last-child {
  justify-content: flex-start;
  text-align: left;
}

.content-card--results .event-matchup-vs {
  display: none;
}

.event-matchup-vs {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.event-team-avatar {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  font-size: 0.78rem;
}

.event-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.event-links .action-link,
.event-actions .action-link {
  flex: 1 1 148px;
  max-width: 100%;
}

.mini-link {
  color: var(--accent);
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
}

.table-wrapper {
  overflow: auto;
  max-width: 100%;
}

.standings-table-wrapper--desktop {
  display: block;
}

.standings-stack {
  display: grid;
  gap: 16px;
}

.standings-block {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(90, 126, 190, 0.14);
  border-radius: 20px;
  background: rgba(250, 252, 255, 0.72);
}

.standings-block--series {
  gap: 14px;
}

.standings-block-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.standings-block-head > div {
  min-width: 0;
}

.standings-block-head .action-link {
  flex: 0 0 auto;
}

.standings-block h4 {
  margin: 0 0 4px;
  color: var(--text);
  font-size: clamp(1.02rem, 1.4vw, 1.22rem);
  overflow-wrap: anywhere;
}

.standings-scroll {
  max-height: min(54vh, 540px);
  overflow: auto;
  max-width: 100%;
  padding-right: 2px;
}

.standings-scroll::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.standings-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(89, 129, 212, 0.24);
}

.table-meta {
  font-size: 0.92rem;
}

.playoff-series-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(241, 247, 255, 0.84));
  border: 1px solid rgba(90, 126, 190, 0.14);
}

.series-eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.series-scoreline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.series-team {
  display: grid;
  gap: 10px;
  justify-items: center;
  min-width: 0;
  color: var(--muted);
  text-align: center;
}

.series-team.is-highlight {
  color: var(--text);
}

.series-team strong {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: 1rem;
  line-height: 1.25;
}

.series-team-avatar {
  width: 62px;
  height: 62px;
  border-radius: 20px;
  font-size: 0.9rem;
}

.series-score {
  display: grid;
  gap: 4px;
  min-width: 96px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(47, 109, 246, 0.1);
  color: var(--accent-strong);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.series-score strong {
  color: var(--text);
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  line-height: 1;
}

.series-score span,
.series-note {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.series-note {
  margin: 0;
  text-align: center;
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.standings-table th,
.standings-table td {
  padding: 10px 10px;
  border-bottom: 1px solid rgba(100, 131, 189, 0.12);
  text-align: left;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.standings-table th {
  color: var(--muted);
  font-weight: 700;
}

.standings-table th:first-child,
.standings-table td:first-child,
.standings-table th:nth-child(n + 3),
.standings-table td:nth-child(n + 3) {
  text-align: right;
}

.standings-table th:nth-child(2),
.standings-table td:nth-child(2) {
  min-width: 180px;
  text-align: left;
}

.standings-table tr.is-highlight {
  background: rgba(47, 109, 246, 0.08);
}

.standings-list {
  display: grid;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
}

.standings-list-row {
  display: grid;
  grid-template-columns: var(--standings-template);
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.74);
}

.standings-list-row span {
  min-width: 0;
  font-size: 0.96rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.standings-list-row span:nth-child(2) {
  font-weight: 650;
}

.standings-list-row span:first-child,
.standings-list-row span:nth-child(n + 3) {
  text-align: right;
  justify-self: end;
}

.standings-list-row--head {
  padding: 0 14px 4px;
  background: transparent;
  color: var(--muted);
}

.standings-list-row--head span {
  font-size: 0.88rem;
  font-weight: 700;
}

.standings-list-row.is-highlight {
  background: rgba(47, 109, 246, 0.08);
}

.standings-compact-list {
  display: none;
  gap: 10px;
}

.standings-compact-header {
  display: none;
}

.standings-compact-row {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(100, 131, 189, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
}

.standings-compact-row.is-highlight {
  border-color: rgba(47, 109, 246, 0.22);
  background: rgba(47, 109, 246, 0.08);
}

.standings-compact-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.standings-position {
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 12px;
  background: rgba(47, 109, 246, 0.1);
  color: var(--accent);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.standings-compact-main strong {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.standings-compact-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.standings-compact-stats span {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px;
  border-radius: 12px;
  background: rgba(247, 250, 255, 0.92);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.standings-compact-stats small {
  min-width: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-card {
  display: grid;
  gap: 12px;
}

.post-meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.post-text {
  line-height: 1.62;
}

.metric-row {
  display: grid;
  gap: 3px;
}

.metric-label {
  color: var(--muted);
  font-size: 0.92rem;
}

.metric-value {
  font-size: 1.22rem;
  font-weight: 750;
  line-height: 1.18;
}

.metric-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.empty-state,
.empty-stage,
.skeleton-stage {
  display: grid;
  place-items: center;
  min-height: 340px;
  padding: 28px;
  text-align: center;
}

.empty-copy,
.skeleton-copy {
  display: grid;
  gap: 16px;
  max-width: 560px;
}

.empty-copy h2,
.skeleton-copy h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.06;
}

.auth-stage {
  min-height: min(680px, calc(100vh - 64px));
  display: grid;
  place-items: center;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-md);
}

.auth-panel {
  display: grid;
  gap: 18px;
  width: min(460px, 100%);
  padding: 28px;
  border: 1px solid rgba(111, 144, 200, 0.18);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-lg);
}

.auth-panel h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.02;
}

.auth-copy,
.auth-note,
.auth-error {
  margin: 0;
  color: var(--muted);
  line-height: 1.52;
}

.auth-error {
  color: var(--danger);
  font-weight: 700;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form label {
  display: grid;
  gap: 8px;
  font-weight: 700;
  text-align: left;
}

.auth-form input {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid rgba(111, 144, 200, 0.24);
  border-radius: 16px;
  background: rgba(247, 250, 255, 0.98);
  color: var(--text);
}

body.is-auth-view .app-shell {
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
}

body.is-auth-view .sidebar {
  display: none;
}

.admin-stage {
  display: grid;
  gap: 14px;
  min-width: 0;
  font-size: 0.94rem;
}

.admin-head,
.admin-panel,
.admin-user-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px);
}

.admin-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
}

.admin-head h2,
.admin-panel h3,
.admin-user-title h4 {
  margin: 0;
}

.admin-head h2 {
  margin-top: 4px;
  font-size: clamp(1.78rem, 2.7vw, 2.42rem);
  line-height: 1.04;
}

.admin-copy,
.admin-panel-head p,
.admin-user-title p,
.admin-empty {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.admin-head-actions,
.admin-user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(0, 1.18fr);
  gap: 14px;
  align-items: start;
}

.admin-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 22px;
}

.admin-panel--wide {
  min-height: 100%;
}

.admin-panel-head {
  display: grid;
  gap: 6px;
}

.admin-stage .primary-button,
.admin-stage .ghost-button {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  font-size: 0.94rem;
}

.admin-form,
.admin-user-form {
  display: grid;
  gap: 11px;
}

.admin-form label,
.admin-user-form label {
  display: grid;
  gap: 6px;
  color: var(--text);
  font-weight: 700;
}

.admin-form input,
.admin-form select,
.admin-user-form input,
.admin-user-form select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(111, 144, 200, 0.24);
  border-radius: 13px;
  background: rgba(247, 250, 255, 0.98);
  color: var(--text);
}

.admin-form input::placeholder,
.admin-user-form input::placeholder {
  color: rgba(102, 115, 143, 0.76);
}

.admin-users {
  display: grid;
  gap: 11px;
}

.admin-user-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}

.admin-user-card--skeleton {
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
}

.admin-user-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.admin-user-avatar {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), #7ec4ff);
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.admin-user-title {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.admin-user-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.admin-user-title h4 {
  font-size: 1rem;
  line-height: 1.25;
}

.role-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(87, 106, 141, 0.1);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.role-pill.is-admin {
  background: rgba(47, 109, 246, 0.12);
  color: var(--accent);
}

.role-pill.is-self {
  background: rgba(28, 132, 85, 0.12);
  color: #236344;
}

.admin-user-form {
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: end;
}

.danger-button {
  color: var(--danger);
}

.danger-button:hover {
  border-color: rgba(214, 64, 69, 0.26);
  background: rgba(255, 239, 241, 0.94);
}

.skeleton-lines {
  display: grid;
  gap: 12px;
}

.skeleton-line {
  height: 16px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(220, 231, 248, 0.7), rgba(255, 255, 255, 0.95), rgba(220, 231, 248, 0.7));
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
}

.skeleton-line.is-long {
  width: min(100%, 460px);
}

.skeleton-line.is-mid {
  width: min(82%, 320px);
}

.skeleton-line.is-short {
  width: min(58%, 220px);
}

.skeleton-note {
  font-size: 0.96rem;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 29, 48, 0.36);
  backdrop-filter: blur(8px);
}

.modal-dialog {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: min(88vh, 820px);
  overflow: auto;
  padding: 24px;
  border: 1px solid rgba(124, 156, 211, 0.2);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 30px 80px rgba(40, 61, 109, 0.18);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(123, 151, 206, 0.18);
  border-radius: 14px;
  background: rgba(246, 249, 255, 0.96);
  color: var(--text);
  font-size: 1.5rem;
}

.modal-head {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}

.modal-head h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.08;
}

.add-form {
  display: grid;
  gap: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.catalog-search {
  display: grid;
  gap: 8px;
}

.add-form label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-weight: 650;
}

.add-form input,
.add-form select {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid rgba(111, 144, 200, 0.24);
  border-radius: 16px;
  background: rgba(247, 250, 255, 0.98);
  color: var(--text);
}

.add-form input::placeholder {
  color: rgba(102, 115, 143, 0.82);
}

.primary-button:disabled {
  cursor: default;
  opacity: 0.52;
  box-shadow: none;
}

.suggestions {
  display: grid;
  gap: 12px;
}

.suggestion-card {
  display: grid;
  gap: 10px;
  width: 100%;
  padding: 16px;
  border: 1px solid rgba(111, 144, 200, 0.18);
  border-radius: 20px;
  background: rgba(248, 251, 255, 0.98);
  color: inherit;
  text-align: left;
}

.suggestion-card.is-active {
  border-color: rgba(47, 109, 246, 0.32);
  background: rgba(237, 244, 255, 0.98);
  box-shadow: 0 14px 24px rgba(47, 109, 246, 0.08);
}

.suggestion-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.suggestion-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.suggestion-copy strong {
  font-size: 1rem;
  line-height: 1.32;
}

.suggestion-copy span,
.suggestion-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.42;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.favorite-card:focus-visible,
.add-button:focus-visible,
.primary-button:focus-visible,
.ghost-button:focus-visible,
.action-link:focus-visible,
.chip-link:focus-visible,
.modal-close:focus-visible,
.suggestion-card:focus-visible,
.order-button:focus-visible,
.mini-link:focus-visible,
.inline-link:focus-visible,
.add-form input:focus-visible,
.add-form select:focus-visible,
.admin-form input:focus-visible,
.admin-form select:focus-visible,
.admin-user-form input:focus-visible,
.admin-user-form select:focus-visible {
  outline: 3px solid rgba(47, 109, 246, 0.34);
  outline-offset: 3px;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

@keyframes sync-spin {
  100% {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sync-button.is-syncing .app-icon {
    animation: none;
  }
}

@media (max-width: 1180px) {
  .hero-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .hero-side {
    grid-column: 1 / -1;
  }

  .content-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-column--support {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    align-items: start;
  }

  .content-card--next,
  .content-card--results,
  .content-card--table {
    grid-column: span 6;
  }

  .content-card--posts {
    grid-column: span 12;
  }

  .content-card--stats {
    grid-column: span 6;
  }

}

@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    width: min(100%, calc(100% - 20px));
    padding-top: 10px;
  }

  .sidebar {
    position: sticky;
    top: 10px;
    z-index: 12;
    max-height: none;
  }

  .sidebar-inner {
    gap: 14px;
    height: auto;
    padding: 14px;
    border-radius: 24px;
  }

  .brand-block {
    gap: 12px;
  }

  .brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
  }

  .brand-actions {
    justify-self: auto;
  }

  .favorites-list {
    display: flex;
    gap: 10px;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
  }

  .favorite-card {
    flex: 0 0 clamp(190px, 30vw, 236px);
  }

  .favorites-list.is-editing .favorite-card {
    flex-basis: clamp(230px, 48vw, 286px);
    grid-template-columns: 54px minmax(0, 1fr);
    grid-template-rows: auto auto;
  }

  .favorites-list.is-editing .favorite-order-controls {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    align-self: auto;
    align-content: stretch;
  }

  .favorites-list.is-editing .order-button {
    width: 100%;
    height: 40px;
  }

  .favorites-list.is-editing .order-icon--desktop {
    display: none;
  }

  .favorites-list.is-editing .order-icon--mobile {
    display: inline-grid;
  }

  .sidebar-footer {
    display: none;
  }

  .sidebar-note {
    display: none;
  }

  .add-button,
  .ghost-button {
    min-height: 44px;
    padding: 0 14px;
    border-radius: 14px;
    font-size: 0.96rem;
  }

  .sync-button,
  .reorder-button,
  .admin-button,
  .logout-button {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 14px;
  }

  .main-view {
    display: grid;
    gap: 16px;
  }

  .content-columns,
  .content-column--support,
  .content-columns--wide-profile {
    grid-template-columns: 1fr;
  }

  .content-card.content-card--standings-wide {
    width: 100%;
  }

  .content-column--support {
    grid-column: auto;
  }

  .hero-card {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .hero-avatar {
    width: 88px;
    height: 88px;
    border-radius: 24px;
  }

  .main-grid {
    grid-template-columns: 1fr;
  }

  .content-card--next,
  .content-card--results,
  .content-card--table,
  .content-card--posts,
  .content-card--stats,
  .content-card--wide {
    grid-column: span 1;
  }

  .event-row-top {
    grid-template-columns: 1fr;
  }

  .content-card--results .compact-event-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "date score"
      "main main"
      "links links";
  }

  .content-card--results .compact-event-row--solo {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "date"
      "main"
      "score"
      "links";
  }

  .result-score {
    text-align: left;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .admin-grid,
  .admin-user-form {
    grid-template-columns: 1fr;
  }

  .admin-head {
    display: grid;
  }

  .admin-head-actions,
  .admin-user-actions {
    justify-content: stretch;
  }

  .admin-head-actions button,
  .admin-user-actions button {
    flex: 1 1 auto;
  }
}

@media (max-width: 640px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .app-shell {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
  }

  .sidebar {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .main-content {
    padding-bottom: 24px;
    overflow-x: hidden;
  }

  .sidebar-inner,
  .hero-card,
  .content-card,
  .modal-dialog {
    border-radius: 22px;
    max-width: 100%;
    overflow-x: hidden;
  }

  .main-view,
  .content-columns,
  .content-column {
    max-width: 100%;
    overflow-x: hidden;
  }

  .favorites-list {
    max-width: 100%;
  }

  .brand-row {
    align-items: flex-start;
    width: 100%;
    gap: 10px;
  }

  .brand {
    flex: 1 1 auto;
    overflow: hidden;
    font-size: 1.54rem;
  }

  .brand-actions {
    gap: 8px;
  }

  .brand span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .sync-button,
  .reorder-button,
  .admin-button,
  .logout-button {
    flex: 0 0 auto;
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 14px;
    box-shadow: none;
  }

  .sync-button {
    margin-left: auto;
  }

  .admin-head,
  .admin-panel {
    padding: 18px;
    border-radius: 22px;
  }

  .admin-user-card {
    padding: 16px;
    border-radius: 20px;
  }

  .admin-head-actions button,
  .admin-user-actions button {
    flex: 1 1 100%;
  }

  .favorite-card {
    flex-basis: min(72vw, 210px);
    min-height: 74px;
    padding: 10px 12px;
    gap: 12px;
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .favorites-list.is-editing .favorite-card {
    flex-basis: min(82vw, 272px);
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .favorite-order-controls {
    gap: 6px;
  }

  .favorites-list.is-editing .order-button {
    width: 100%;
    height: 38px;
    border-radius: 13px;
  }

  .order-button {
    width: 40px;
    height: 40px;
    border-radius: 14px;
  }

  .favorite-avatar {
    width: 48px;
    height: 48px;
    border-radius: 16px;
  }

  .favorite-title-row {
    gap: 6px;
  }

  .favorite-title-row h3 {
    font-size: 0.96rem;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
  }

  .favorite-meta {
    gap: 2px;
  }

  .favorite-meta p {
    font-size: 0.82rem;
  }

  .favorite-meta p:last-child {
    display: none;
  }

  .hero-card {
    gap: 16px;
    grid-template-columns: 72px minmax(0, 1fr);
    padding: 18px;
  }

  .hero-avatar {
    width: 72px;
    height: 72px;
    border-radius: 22px;
  }

  .hero-title-row h2 {
    font-size: clamp(1.72rem, 8vw, 2.18rem);
  }

  .hero-summary {
    font-size: 0.98rem;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .hero-provider-grid,
  .source-links,
  .hero-side {
    display: none;
  }

  .action-link {
    width: 100%;
    min-width: 0;
  }

  .section-head {
    flex-wrap: wrap;
  }

  .section-head .action-link {
    width: auto;
  }

  .standings-list-row {
    gap: 6px;
    padding: 10px 12px;
  }

  .standings-list-row span {
    font-size: 0.84rem;
  }

  .event-teams {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 8px;
  }

  .entity-chip {
    gap: 8px;
  }

  .entity-chip-avatar {
    width: 58px;
    height: 58px;
    border-radius: 18px;
  }

  .entity-chip p {
    font-size: 0.92rem;
    line-height: 1.32;
  }

  .vs-mark {
    justify-self: center;
  }

  .event-links .action-link,
  .event-actions .action-link {
    min-width: min(100%, 148px);
  }

  .section-head .action-link {
    width: 100%;
  }

  .content-card {
    padding: 16px;
    gap: 12px;
  }

  .content-card--table,
  .content-card.content-card--standings-wide {
    padding: 14px;
    gap: 12px;
  }

  .content-card--stats .stats-list {
    grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
  }

  .content-card--table .section-description,
  .content-card--standings-wide .section-description {
    display: -webkit-box;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.94rem;
    line-height: 1.38;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .standings-block {
    gap: 10px;
    padding: 10px;
    border-radius: 16px;
  }

  .standings-block h4 {
    font-size: 1rem;
  }

  .table-meta {
    font-size: 0.82rem;
    line-height: 1.28;
  }

  .standings-scroll {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .standings-table-wrapper--desktop {
    display: none;
  }

  .standings-block-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .standings-block-head .action-link {
    justify-self: start;
    width: auto;
    min-height: 34px;
    padding: 0 12px;
    font-size: 0.85rem;
  }

  .standings-compact-list {
    display: grid;
    gap: 0;
    overflow: hidden;
    border: 1px solid rgba(100, 131, 189, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
  }

  .standings-compact-header,
  .standings-compact-row {
    display: grid;
    grid-template-columns: minmax(116px, 1fr) minmax(0, 1.55fr);
    gap: 8px;
    align-items: center;
  }

  .standings-compact-header {
    padding: 8px 10px;
    background: rgba(238, 245, 255, 0.92);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
  }

  .standings-compact-header-stats,
  .standings-compact-stats {
    display: grid;
    grid-template-columns: repeat(var(--compact-stat-count, 4), minmax(0, 1fr));
    gap: 4px;
    align-items: center;
    min-width: 0;
    text-align: center;
  }

  .standings-compact-header-stats span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .standings-compact-row {
    min-width: 0;
    padding: 9px 10px;
    border: 0;
    border-top: 1px solid rgba(100, 131, 189, 0.1);
    border-radius: 0;
    background: transparent;
  }

  .standings-compact-row.is-highlight {
    border-color: rgba(47, 109, 246, 0.16);
    background: rgba(47, 109, 246, 0.08);
    box-shadow: inset 3px 0 0 rgba(47, 109, 246, 0.52);
  }

  .standings-compact-main {
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 8px;
  }

  .standings-position {
    min-width: 26px;
    height: 26px;
    padding: 0 6px;
    border-radius: 9px;
    font-size: 0.82rem;
  }

  .standings-compact-main strong {
    overflow: hidden;
    font-size: 0.92rem;
    line-height: 1.18;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .standings-compact-stats {
    gap: 4px;
  }

  .standings-compact-stats span {
    padding: 0;
    border-radius: 0;
    background: transparent;
    font-size: clamp(0.74rem, 2.25vw, 0.88rem);
    line-height: 1.15;
  }

  .standings-compact-stats small {
    display: none;
  }

  .playoff-series-card {
    padding: 14px;
  }

  .series-scoreline {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .series-score {
    justify-self: stretch;
    order: -1;
  }

  .modal {
    padding: 10px;
    align-items: end;
  }

  .modal-dialog {
    width: 100%;
    max-height: min(82vh, 760px);
    padding: 20px 18px 16px;
    border-radius: 24px 24px 18px 18px;
  }

  .modal-head {
    gap: 8px;
    margin-bottom: 18px;
  }

  .modal-head h2 {
    font-size: 1.64rem;
  }

  .modal-actions {
    justify-content: stretch;
  }

  .modal-actions button {
    flex: 1 1 100%;
  }
}

@media (max-width: 420px) {
  .app-shell {
    width: calc(100vw - 12px);
    max-width: calc(100vw - 12px);
  }

  .sidebar-inner,
  .hero-card,
  .content-card {
    border-radius: 20px;
  }

  .brand {
    gap: 10px;
    font-size: 1.36rem;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 15px;
  }

  .sync-button,
  .reorder-button,
  .admin-button,
  .logout-button {
    width: 42px;
    min-width: 42px;
    min-height: 42px;
    border-radius: 14px;
  }

  .favorite-card {
    flex-basis: min(78vw, 204px);
  }

  .favorites-list.is-editing .favorite-card {
    flex-basis: min(82vw, 252px);
  }

  .hero-card {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .hero-avatar {
    width: 68px;
    height: 68px;
    border-radius: 20px;
  }

  .hero-title-row h2 {
    font-size: 1.64rem;
  }

  .hero-meta span {
    min-height: 32px;
    padding: 5px 10px;
    line-height: 1.2;
  }

  .content-card {
    padding: 14px;
  }

  .section-head h3 {
    font-size: 1.14rem;
  }

  .standings-compact-header,
  .standings-compact-row {
    grid-template-columns: minmax(104px, 1fr) minmax(0, 1.45fr);
  }
}

@media (min-width: 1200px) and (hover: none) {
  .app-shell {
    grid-template-columns: 340px minmax(0, 1fr);
  }

  .favorite-card {
    min-height: 96px;
  }

  .favorite-title-row h3 {
    font-size: 1.08rem;
  }

  .content-card,
  .hero-card {
    box-shadow: 0 24px 54px rgba(56, 83, 138, 0.12);
  }

  .action-link,
  .chip-link,
  .ghost-button,
  .add-button {
    min-height: 56px;
  }
}

html.tv-mode {
  --tv-layout-width: 1600px;
  --tv-scale: 0.61;
  background:
    radial-gradient(circle at top left, rgba(77, 135, 255, 0.18), transparent 34%),
    radial-gradient(circle at top right, rgba(199, 225, 255, 0.66), transparent 36%),
    linear-gradient(180deg, #f8fbff 0%, var(--page-bg) 42%, var(--page-bg-strong) 100%);
}

html.tv-mode:not(.tv-compact-viewport) {
  --tv-layout-width: 1600px;
  --tv-scale: 0.82;
}

html.tv-mode,
html.tv-mode body {
  min-width: var(--tv-layout-width);
  overflow-x: hidden;
}

@supports (zoom: 1) {
  html.tv-mode body {
    zoom: var(--tv-scale);
  }
}

@supports not (zoom: 1) {
  html.tv-mode body {
    width: calc(100% / var(--tv-scale));
    min-height: calc(100vh / var(--tv-scale));
    transform: scale(var(--tv-scale));
    transform-origin: top left;
  }
}

html.tv-mode .app-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 24px;
  width: min(1480px, calc(var(--tv-layout-width) - 32px));
  max-width: calc(var(--tv-layout-width) - 32px);
  margin: 0 auto;
  padding: 18px 0 28px;
}

html.tv-mode .sidebar {
  position: sticky;
  top: 18px;
  z-index: auto;
  width: auto;
  max-width: none;
  max-height: calc((100vh / var(--tv-scale)) - 36px);
  overflow: visible;
}

html.tv-mode .sidebar-inner {
  display: grid;
  gap: 20px;
  height: calc((100vh / var(--tv-scale)) - 36px);
  max-width: none;
  min-width: 0;
  padding: 22px;
  border-radius: var(--radius-xl);
  overflow: hidden;
}

html.tv-mode .brand-block {
  gap: 16px;
}

html.tv-mode .brand-row {
  display: grid;
  align-items: initial;
  justify-content: initial;
  gap: 12px;
  width: auto;
}

html.tv-mode .brand {
  flex: initial;
  gap: 12px;
  width: 100%;
  font-size: 1.72rem;
}

html.tv-mode .brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 16px;
}

html.tv-mode .brand-actions {
  justify-self: end;
  gap: 10px;
}

html.tv-mode .sidebar-footer,
html.tv-mode .sidebar-note {
  display: block;
}

html.tv-mode .favorites-list {
  display: grid;
  gap: 12px;
  max-width: 100%;
  max-height: 100%;
  overflow: auto;
  padding-right: 4px;
  padding-bottom: 0;
}

html.tv-mode .favorite-card,
html.tv-mode .favorites-list.is-editing .favorite-card {
  flex: initial;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  min-height: 88px;
  padding: 14px;
}

html.tv-mode .favorite-card--editable,
html.tv-mode .favorites-list.is-editing .favorite-card {
  grid-template-columns: 54px minmax(0, 1fr) auto;
  grid-template-rows: none;
}

html.tv-mode .favorites-list.is-editing .favorite-order-controls {
  grid-column: auto;
  display: grid;
  grid-template-columns: none;
  gap: 7px;
  align-self: stretch;
  align-content: center;
}

html.tv-mode .favorite-avatar {
  width: 54px;
  height: 54px;
  border-radius: 18px;
}

html.tv-mode .favorite-title-row h3 {
  display: block;
  font-size: 1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html.tv-mode .favorite-meta p {
  font-size: 0.88rem;
}

html.tv-mode .favorite-meta p:last-child {
  display: block;
}

html.tv-mode .favorites-list.is-editing .order-button,
html.tv-mode .order-button {
  width: 42px;
  height: 42px;
  border-radius: 14px;
}

html.tv-mode .favorites-list.is-editing .order-icon--desktop {
  display: inline-grid;
}

html.tv-mode .favorites-list.is-editing .order-icon--mobile {
  display: none;
}

html.tv-mode .add-button,
html.tv-mode .primary-button {
  min-height: 54px;
  padding: 0 18px;
  border-radius: 18px;
  font-size: 1rem;
}

html.tv-mode .ghost-button {
  min-height: 48px;
  padding: 0 16px;
  border-radius: 16px;
  font-size: 1rem;
}

html.tv-mode .sync-button,
html.tv-mode .reorder-button,
html.tv-mode .admin-button,
html.tv-mode .logout-button {
  width: 48px;
  min-width: 48px;
  min-height: 48px;
  padding: 0;
  border-radius: 16px;
}

html.tv-mode .main-content {
  padding: 6px 0 24px;
  overflow-x: visible;
}

html.tv-mode .main-view {
  display: grid;
  gap: 14px;
  max-width: 100%;
  overflow-x: clip;
}

html.tv-mode .content-columns {
  display: grid;
  grid-template-columns:
    minmax(280px, 0.92fr)
    minmax(340px, 1fr)
    minmax(380px, 1.08fr);
  gap: 14px;
  align-items: start;
}

html.tv-mode .content-columns--wide-profile {
  grid-template-columns: minmax(280px, 0.86fr) minmax(420px, 1.14fr);
}

html.tv-mode .content-column--support {
  grid-column: auto;
  grid-template-columns: none;
}

html.tv-mode .hero-card {
  grid-template-columns: 108px minmax(0, 1fr) minmax(210px, 0.52fr);
  gap: 22px;
  padding: 26px;
}

html.tv-mode .hero-avatar {
  width: 108px;
  height: 108px;
  border-radius: 30px;
}

html.tv-mode .hero-title-row h2 {
  font-size: clamp(2rem, 3vw, 3.15rem);
}

html.tv-mode .hero-summary {
  display: block;
  font-size: 1rem;
  overflow: visible;
}

html.tv-mode .hero-provider-grid,
html.tv-mode .source-links {
  display: flex;
}

html.tv-mode .hero-side {
  display: grid;
}

html.tv-mode .main-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

html.tv-mode .content-card {
  gap: 14px;
  padding: 18px;
}

html.tv-mode .content-card--next,
html.tv-mode .content-card--results,
html.tv-mode .content-card--table {
  grid-column: span 4;
}

html.tv-mode .content-card--posts {
  grid-column: span 6;
}

html.tv-mode .content-card--stats {
  grid-column: span 3;
}

html.tv-mode .content-card--wide {
  grid-column: span 12;
}

html.tv-mode .content-column > .content-card {
  grid-column: auto;
  width: 100%;
}

html.tv-mode .event-row-top {
  grid-template-columns: 92px minmax(0, 1fr) auto;
}

html.tv-mode .content-card--results .compact-event-row {
  grid-template-columns: 92px minmax(0, 1fr) auto;
  grid-template-areas:
    "date main score"
    ". links links";
}

html.tv-mode .content-card--results .compact-event-row--solo {
  grid-template-columns: 92px minmax(0, 1fr);
  grid-template-areas:
    "date main"
    "date score"
    ". links";
}

html.tv-mode .result-score {
  text-align: right;
}

html.tv-mode .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

html.tv-mode .admin-grid {
  grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1.2fr);
}

html.tv-mode .admin-user-form {
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
}

html.tv-mode .standings-table-wrapper--desktop {
  display: block;
}

html.tv-mode .standings-compact-list,
html.tv-mode .standings-compact-header {
  display: none;
}

html.tv-mode .standings-scroll {
  max-height: min(calc((100vh / var(--tv-scale)) - 250px), 540px);
  overflow: auto;
  padding-right: 2px;
}

html.tv-mode .modal {
  place-items: center;
  align-items: center;
  padding: 20px;
}

html.tv-mode .modal-dialog {
  width: min(760px, 100%);
  max-height: min(calc((100vh / var(--tv-scale)) - 80px), 820px);
  padding: 24px;
  border-radius: 28px;
}

html.tv-mode .modal-head {
  gap: 10px;
  margin-bottom: 22px;
}

html.tv-mode .modal-head h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

html.tv-mode .modal-actions {
  justify-content: flex-end;
}

html.tv-mode .modal-actions button {
  flex: 0 1 auto;
}

html.tv-mode .favorite-card,
html.tv-mode .hero-card,
html.tv-mode .content-card,
html.tv-mode .action-link,
html.tv-mode .chip-link,
html.tv-mode .ghost-button,
html.tv-mode .primary-button,
html.tv-mode .modal-close,
html.tv-mode .suggestion-card,
html.tv-mode .order-button,
html.tv-mode .add-form input,
html.tv-mode .admin-form input,
html.tv-mode .admin-form select,
html.tv-mode .admin-user-form input,
html.tv-mode .admin-user-form select {
  scroll-margin: 34px;
}

html.tv-mode .favorite-card:focus,
html.tv-mode .hero-card:focus,
html.tv-mode .content-card:focus,
html.tv-mode .action-link:focus,
html.tv-mode .chip-link:focus,
html.tv-mode .ghost-button:focus,
html.tv-mode .primary-button:focus,
html.tv-mode .modal-close:focus,
html.tv-mode .suggestion-card:focus,
html.tv-mode .order-button:focus,
html.tv-mode .add-form input:focus,
html.tv-mode .admin-form input:focus,
html.tv-mode .admin-form select:focus,
html.tv-mode .admin-user-form input:focus,
html.tv-mode .admin-user-form select:focus {
  outline: 5px solid rgba(47, 109, 246, 0.92);
  outline-offset: 5px;
  box-shadow:
    0 0 0 10px rgba(47, 109, 246, 0.16),
    0 22px 50px rgba(38, 78, 156, 0.18);
}

html.tv-mode .favorite-card:focus,
html.tv-mode .suggestion-card:focus,
html.tv-mode .action-link:focus,
html.tv-mode .chip-link:focus,
html.tv-mode .ghost-button:focus,
html.tv-mode .primary-button:focus,
html.tv-mode .modal-close:focus,
html.tv-mode .order-button:focus {
  transform: translateY(-2px) scale(1.015);
}

html.tv-mode .hero-card:focus,
html.tv-mode .content-card:focus {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(47, 109, 246, 0.36);
}

html.tv-mode .favorite-card:focus {
  border-color: rgba(47, 109, 246, 0.46);
}

html.tv-mode .favorite-card--add:focus {
  border-color: rgba(47, 109, 246, 0.62);
  background: rgba(239, 246, 255, 0.98);
}
