:root {
  color-scheme: light;
  --bg: #f2f7fc;
  --ink: #07111f;
  --muted: #5d6b7d;
  --surface: #ffffff;
  --surface-soft: #f7fbff;
  --table-header: #e7f5ff;
  --table-even: #f8fbff;
  --table-hover: #eaf8ff;
  --cell-line: #deebf5;
  --line: #c9d8e8;
  --header: #03070e;
  --header-soft: #0759ce;
  --accent: #11bff3;
  --accent-strong: #0759ce;
  --accent-warm: #ff7a1a;
  --accent-red: #ef4e2f;
  --warn: #bd5d09;
  --tooltip-bg: #f8fbff;
  --tooltip-ink: #07111f;
  --tooltip-line: #c9d8e8;
  --shadow: 0 20px 56px rgb(6 35 65 / 14%);
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #07101b;
  --ink: #f4f8fb;
  --muted: #a7bad0;
  --surface: #0d1725;
  --surface-soft: #132236;
  --table-header: #112c46;
  --table-even: #0f1d2d;
  --table-hover: #17385a;
  --cell-line: #213750;
  --line: #284159;
  --header: #020407;
  --header-soft: #096be8;
  --accent: #38d5ff;
  --accent-strong: #8aeaff;
  --accent-warm: #ff8a24;
  --accent-red: #ff6547;
  --warn: #ffb05e;
  --tooltip-bg: #f4f8fb;
  --tooltip-ink: #07101b;
  --tooltip-line: #8aa9c8;
  --shadow: 0 22px 64px rgb(0 0 0 / 42%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgb(17 191 243 / 8%), transparent 320px),
    var(--bg);
  color: var(--ink);
}

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(180deg, rgb(17 191 243 / 12%), transparent 320px),
    color-mix(in srgb, var(--bg) 92%, var(--surface));
}

.loading-overlay[hidden] {
  display: none;
}

.loading-card {
  display: grid;
  gap: 14px;
  width: min(420px, 100%);
  border: 1px solid rgb(17 191 243 / 26%);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 22px;
}

.loading-card img {
  width: 112px;
  height: auto;
  filter: drop-shadow(0 12px 18px rgb(6 35 65 / 24%));
}

.loading-card h2 {
  font-size: 22px;
}

.loading-card p {
  margin-top: 4px;
  color: var(--muted);
}

.loading-progress {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}

.loading-progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-strong), var(--accent), var(--accent-warm));
  transition: width 180ms ease;
}

.loading-card strong {
  color: var(--accent-strong);
  font-size: 13px;
}

.app-header {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px clamp(16px, 3vw, 36px);
  background:
    linear-gradient(135deg, rgb(5 89 206 / 72%) 0 18%, transparent 18% 38%, rgb(255 122 26 / 82%) 38% 42%, transparent 42%),
    linear-gradient(90deg, rgb(56 213 255 / 12%) 0 1px, transparent 1px 34px),
    var(--header);
  color: #ffffff;
}

.app-header::after {
  position: absolute;
  inset: auto -80px -58px auto;
  width: min(520px, 45vw);
  height: 150px;
  content: "";
  background:
    linear-gradient(135deg, transparent 0 16%, rgb(17 191 243 / 32%) 16% 42%, transparent 42% 56%, rgb(255 122 26 / 22%) 56% 62%, transparent 62%),
    linear-gradient(90deg, rgb(7 89 206 / 42%), transparent);
  clip-path: polygon(9% 0, 100% 0, 84% 100%, 0 100%);
  pointer-events: none;
}

.brand-lockup {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.4vw, 22px);
  min-width: 0;
}

.brand-logo {
  display: block;
  flex: 0 0 auto;
  width: clamp(96px, 11vw, 160px);
  line-height: 0;
  filter: drop-shadow(0 18px 24px rgb(0 0 0 / 42%));
}

.brand-logo img {
  display: block;
  width: 100%;
  height: auto;
}

.brand-copy {
  min-width: 0;
}

.header-actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.02;
  font-weight: 850;
  text-shadow: 0 4px 18px rgb(0 0 0 / 34%);
}

h2 {
  font-size: 21px;
  line-height: 1.2;
}

h3 {
  font-size: 17px;
  line-height: 1.25;
}

.app-header p,
.section-head p {
  margin-top: 8px;
}

.app-header p {
  color: #d9f6ff;
}

.section-head p {
  color: var(--muted);
}

.status {
  min-width: 168px;
  padding: 9px 12px;
  border: 1px solid rgb(56 213 255 / 32%);
  border-radius: var(--radius);
  color: #e7f8ff;
  background: rgb(3 7 14 / 42%);
  backdrop-filter: blur(12px);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.header-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid rgb(56 213 255 / 36%);
  border-radius: var(--radius);
  background: rgb(3 7 14 / 46%);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  padding: 8px 12px;
  backdrop-filter: blur(12px);
  text-decoration: none;
}

.header-button:hover,
.header-button:focus-visible {
  border-color: rgb(255 122 26 / 74%);
  background: rgb(7 89 206 / 56%);
  color: #ffffff;
  text-decoration: none;
}

.issue-link {
  border-color: rgb(255 122 26 / 58%);
  background: rgb(255 122 26 / 18%);
}

.issue-link::before {
  content: "!";
  display: inline-grid;
  width: 18px;
  height: 18px;
  margin-right: 7px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 42%);
  border-radius: 999px;
  color: #ffffff;
  font-size: 11px;
  line-height: 1;
}

.status.is-ready {
  color: #eafff8;
  border-color: rgb(56 213 255 / 65%);
  background: rgb(7 89 206 / 44%);
}

.status.is-error {
  color: #fff3f0;
  border-color: rgb(255 138 95 / 78%);
  background: rgb(239 78 47 / 34%);
}

.app-shell {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 16px clamp(16px, 3vw, 36px) 40px;
  min-width: 0;
}

.primary-tabs,
.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.primary-tabs {
  padding: 2px 0 8px;
}

.tabs {
  padding: 0 0 10px;
}

.nav-group-tab,
.tab,
.matchup-form button {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  min-height: 36px;
  padding: 8px 11px;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgb(6 35 65 / 6%);
}

.nav-group-tab {
  min-height: 42px;
  padding: 10px 14px;
  border-color: rgb(17 191 243 / 26%);
  background:
    linear-gradient(90deg, rgb(17 191 243 / 8%), transparent 58%),
    var(--surface);
  font-size: 15px;
}

.sub-tabs {
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
}

.sub-tabs .tab {
  min-height: 32px;
  padding: 7px 10px;
  font-size: 13px;
}

.tab[hidden] {
  display: none;
}

.nav-group-tab:hover,
.tab:hover {
  border-color: rgb(17 191 243 / 55%);
  background: var(--surface-soft);
}

.nav-group-tab.is-active,
.tab.is-active,
.matchup-form button {
  background:
    linear-gradient(135deg, var(--header-soft), #043d92 72%),
    var(--header-soft);
  border-color: var(--header-soft);
  color: #ffffff;
  box-shadow: 0 8px 18px rgb(7 89 206 / 22%);
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(140px, 190px) minmax(150px, 210px) minmax(150px, 210px) minmax(145px, 190px) minmax(240px, 1fr);
  align-items: start;
  gap: 12px;
  margin: 8px 0 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgb(17 191 243 / 6%), transparent 42%),
    var(--surface);
  box-shadow: 0 12px 30px rgb(6 35 65 / 9%);
}

.toolbar.is-cinema-hidden {
  display: none;
}

label {
  display: grid;
  align-content: start;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.toolbar-hint {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  text-transform: none;
}

.toolbar-label-with-help {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.toolbar-help {
  flex: 0 0 auto;
  transform: translateY(-1px);
}

select,
input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--ink);
  font: inherit;
  min-height: 34px;
  padding: 6px 9px;
}

select:focus,
input:focus,
.tab:focus-visible,
.nav-group-tab:focus-visible,
.matchup-form button:focus-visible {
  outline: 3px solid rgb(17 191 243 / 24%);
  outline-offset: 1px;
  border-color: var(--accent);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.person-summary-grid {
  grid-template-columns: repeat(8, minmax(0, 1fr));
}

.summary-card,
.metric {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 22px rgb(6 35 65 / 8%);
}

.summary-card {
  position: relative;
  overflow: visible;
  display: grid;
  gap: 5px;
  padding: 11px 13px;
}

.summary-card::before {
  width: 46px;
  height: 3px;
  content: "";
  background: var(--header-soft);
}

.summary-card:nth-child(2) {
  border-top: 3px solid var(--accent);
}

.summary-card:nth-child(3) {
  border-top: 3px solid var(--accent-red);
}

.summary-card:nth-child(4) {
  border-top: 3px solid var(--accent-warm);
}

.summary-card:nth-child(2)::before {
  background: var(--accent);
}

.summary-card:nth-child(3)::before {
  background: var(--accent-red);
}

.summary-card:nth-child(4)::before {
  background: var(--accent-warm);
}

.summary-card span,
.metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.summary-card strong {
  font-size: 22px;
  line-height: 1;
}

.highlight-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.highlight-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, color-mix(in srgb, var(--surface) 86%, var(--accent-soft)), var(--surface));
  box-shadow: var(--shadow-soft);
  padding: 14px;
}

.highlight-card-head,
.highlight-card-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.highlight-card-head span,
.highlight-card-stats span {
  color: var(--muted);
  font-size: 12px;
}

.highlight-card-head strong {
  color: var(--accent-strong);
  font-size: 24px;
}

.highlight-card h3 {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  margin: 0;
  font-size: 18px;
  line-height: 1.15;
  justify-content: center;
}

.highlight-match-title .link-button {
  display: inline-block;
  min-width: 0;
  max-width: 46%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.highlight-card h3 > span,
.highlight-vs {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
  text-transform: uppercase;
}

.highlight-video-previews {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.highlight-video-preview {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.highlight-video-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 160ms ease, filter 160ms ease;
}

.highlight-video-preview span {
  position: absolute;
  inset: auto 8px 7px auto;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: rgb(0 0 0 / 68%);
  color: white;
  font-size: 11px;
  line-height: 1;
  box-shadow: 0 6px 16px rgb(0 0 0 / 24%);
}

.highlight-video-preview:hover img,
.highlight-video-preview:focus-visible img {
  transform: scale(1.04);
  filter: saturate(1.08);
}

.highlight-card-stats {
  align-items: stretch;
}

.highlight-card-stats span {
  flex: 1;
  min-width: 0;
}

.highlight-card-stats strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 15px;
  overflow-wrap: anywhere;
}

.highlight-badges,
.highlight-card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.highlight-badges span {
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-soft) 70%, transparent);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
}

.highlight-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: 16px;
}

.highlight-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
  padding: 0;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 94%, var(--accent-soft)), var(--surface) 44%),
    var(--surface);
}

.highlight-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 14px 16px 0;
}

.highlight-rank {
  display: inline-grid;
  min-width: 38px;
  height: 30px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  border-radius: 7px;
  background: color-mix(in srgb, var(--accent-soft) 78%, var(--surface));
  color: var(--accent-strong);
  font-weight: 900;
}

.highlight-card-meta {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.highlight-card-head strong {
  display: grid;
  justify-items: end;
  color: var(--accent-strong);
  font-size: 22px;
  line-height: 1;
}

.highlight-card-head strong small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.highlight-card h3 {
  padding: 0 16px;
  font-size: 21px;
  line-height: 1.25;
}

.highlight-match-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
  padding-bottom: 2px;
}

.highlight-match-title .link-button {
  display: block;
  flex: 0 1 auto;
  min-width: 0;
  max-width: calc((100% - 34px) / 2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: inherit;
}

.highlight-vs {
  display: inline-block;
  flex: 0 0 auto;
  align-self: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  margin: 0;
  overflow: visible;
  line-height: inherit;
  text-transform: uppercase;
  vertical-align: baseline;
}

.highlight-media {
  position: relative;
  display: grid;
  min-height: 184px;
  margin: 0 16px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--surface-soft), color-mix(in srgb, var(--surface) 76%, var(--accent-soft)));
}

.highlight-media.is-empty {
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.highlight-media-main,
.highlight-media-main img {
  display: block;
  width: 100%;
  height: 100%;
}

.highlight-media-main img,
.highlight-media-secondary img {
  object-fit: cover;
  transition: transform 160ms ease, filter 160ms ease;
}

.highlight-media-main:hover img,
.highlight-media-main:focus-visible img,
.highlight-media-secondary:hover img,
.highlight-media-secondary:focus-visible img {
  transform: scale(1.035);
  filter: saturate(1.08);
}

.highlight-play {
  position: absolute;
  inset: auto auto 12px 12px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: rgb(0 0 0 / 70%);
  color: white;
  font-size: 0;
  line-height: 0;
  box-shadow: 0 8px 20px rgb(0 0 0 / 28%);
}

.highlight-play::before {
  width: 0;
  height: 0;
  content: "";
  transform: translateX(1px);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid currentColor;
}

.highlight-media-secondary {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: block;
  width: min(34%, 150px);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 2px solid color-mix(in srgb, var(--surface) 84%, white);
  border-radius: 7px;
  background: var(--surface-soft);
  box-shadow: 0 10px 24px rgb(0 0 0 / 24%);
}

.highlight-media-secondary img {
  width: 100%;
  height: 100%;
}

.highlight-media-secondary span {
  position: absolute;
  inset: auto 6px 5px auto;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgb(0 0 0 / 72%);
  color: white;
  font-size: 11px;
  font-weight: 900;
}

.highlight-card-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-block: 1px solid var(--line);
}

.highlight-card-stats span {
  padding: 10px 12px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.highlight-card-stats span:last-child {
  border-right: 0;
}

.highlight-card-stats strong {
  margin-top: 3px;
  color: var(--ink);
  font-size: 16px;
  text-transform: none;
}

.highlight-card-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0 16px;
}

.highlight-card-reasons span {
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-soft) 52%, transparent);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.15;
  padding: 5px 9px;
}

.highlight-card-details {
  margin: 0 16px;
  color: var(--muted);
  font-size: 12px;
}

.highlight-card-details summary {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-soft) 42%, transparent);
  color: var(--accent-strong);
  cursor: pointer;
  font-weight: 850;
  line-height: 1.2;
  list-style: none;
  padding: 0 11px;
}

.highlight-card-details summary::-webkit-details-marker {
  display: none;
}

.highlight-card-details div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 8px;
}

.highlight-card-details span {
  color: var(--muted);
}

.highlight-source-actions {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding: 0 16px 16px;
}

.highlight-watch-link,
.highlight-source-menu summary {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.highlight-watch-link {
  padding: 0 13px;
  background: var(--accent);
  color: white;
}

.highlight-source-menu {
  display: grid;
  position: relative;
}

.highlight-source-menu summary {
  cursor: pointer;
  border: 1px solid var(--line);
  padding: 0 11px;
  color: var(--accent-strong);
  list-style: none;
}

.highlight-source-menu summary::-webkit-details-marker {
  display: none;
}

.highlight-source-menu div {
  position: static;
  z-index: 5;
  display: grid;
  min-width: 130px;
  gap: 6px;
  margin-top: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.highlight-source-menu a {
  font-size: 13px;
  font-weight: 800;
}

.compact-filter-panel {
  margin: 0 0 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgb(17 191 243 / 7%), transparent 52%),
    var(--surface);
  box-shadow: 0 12px 30px rgb(6 35 65 / 9%);
}

.compact-filter-panel > summary {
  display: flex;
  min-height: 38px;
  align-items: center;
  cursor: pointer;
  list-style-position: inside;
  padding: 8px 12px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 900;
}

.cinema-filter-grid {
  display: grid;
  grid-template-columns: minmax(120px, 150px) minmax(145px, 190px) minmax(145px, 190px) minmax(130px, 170px) minmax(120px, 150px) minmax(150px, 185px) minmax(190px, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 0 12px 12px;
}

.cinema-filter-actions {
  display: flex;
  align-self: end;
  align-items: end;
  min-height: 34px;
}

.cinema-filter-actions .table-action {
  min-height: 34px;
  white-space: nowrap;
}

.cinema-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
  gap: 12px;
  margin-top: 14px;
}

.cinema-screen {
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid rgb(17 191 243 / 24%);
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 0%, rgb(17 191 243 / 12%), transparent 44%),
    linear-gradient(180deg, #020407, #07111f 74%);
  box-shadow: var(--shadow);
}

.cinema-player-card {
  display: grid;
  overflow: hidden;
  background: transparent;
}

.cinema-player {
  display: grid;
  position: relative;
  height: clamp(420px, 62vh, 680px);
  background: #020407;
}

.cinema-player iframe,
.cinema-player-empty {
  width: 100%;
  height: 100%;
  border: 0;
}

.cinema-player-empty {
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 900;
}

.cinema-player-info {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 16px 18px;
  border-top: 1px solid rgb(255 255 255 / 10%);
  background:
    linear-gradient(90deg, rgb(17 191 243 / 9%), transparent 52%),
    var(--surface);
}

.cinema-player-info > span,
.cinema-card-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.cinema-player-info h3 {
  display: flex;
  grid-column: 1;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  color: var(--accent-strong);
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.1;
}

.cinema-player-info p {
  grid-column: 1;
  color: var(--ink);
  font-weight: 750;
  line-height: 1.35;
}

.cinema-meta-row {
  grid-column: 1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.cinema-meta-row span,
.cinema-card-stats span {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.cinema-meta-row strong,
.cinema-card-stats strong {
  color: var(--ink);
  font-size: 14px;
  text-transform: none;
}

.cinema-actions {
  grid-column: 2;
  grid-row: 1 / span 5;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.cinema-playback-controls {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.cinema-nav-button {
  position: absolute;
  top: 50%;
  width: 56px;
  height: 56px;
  border: 1px solid rgb(255 255 255 / 24%);
  border-radius: 999px;
  background: rgb(2 4 7 / 78%);
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  padding: 0;
  pointer-events: auto;
  transform: translateY(-50%);
  box-shadow: 0 14px 34px rgb(0 0 0 / 26%);
  backdrop-filter: blur(12px);
}

.cinema-nav-icon {
  position: relative;
  display: block;
  width: 30px;
  height: 30px;
  font-size: 0;
}

.cinema-nav-icon::before,
.cinema-nav-icon::after {
  position: absolute;
  top: 50%;
  content: "";
  background: currentColor;
}

.cinema-nav-icon::before {
  right: 5px;
  width: 13px;
  height: 13px;
  border-top: 3px solid currentColor;
  border-right: 3px solid currentColor;
  background: transparent;
  transform: translateY(-50%) rotate(45deg);
}

.cinema-nav-icon::after {
  left: 50%;
  width: 22px;
  height: 3px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
}

.cinema-nav-button--previous .cinema-nav-icon::before {
  right: auto;
  left: 5px;
  transform: translateY(-50%) rotate(-135deg);
}

.cinema-nav-button--previous {
  left: 16px;
}

.cinema-nav-button--next {
  right: 16px;
}

.cinema-nav-button:hover:not(:disabled) {
  border-color: rgb(17 191 243 / 78%);
  transform: translateY(-50%) scale(1.03);
}

.cinema-nav-button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
  transform: translateY(-50%);
}

.cinema-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 22px rgb(6 35 65 / 8%);
}

.cinema-card.is-active {
  border-color: var(--accent-warm);
  box-shadow: 0 0 0 3px rgb(255 122 26 / 15%), 0 12px 28px rgb(6 35 65 / 12%);
}

.cinema-card button {
  position: relative;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  min-height: 138px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  padding: 10px;
  text-align: left;
}

.cinema-card button:hover,
.cinema-card button:focus-visible {
  background: color-mix(in srgb, var(--accent-soft) 24%, transparent);
  outline: none;
}

.cinema-card-rank {
  position: absolute;
  top: 7px;
  left: 7px;
  z-index: 1;
  display: inline-grid;
  min-width: 28px;
  height: 24px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 50%);
  border-radius: 999px;
  background: rgb(3 7 14 / 72%);
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 5px 12px rgb(0 0 0 / 24%);
}

.cinema-card img {
  width: 76px;
  height: 76px;
  border: 1px solid var(--line);
  border-radius: 7px;
  object-fit: cover;
  background: var(--surface-soft);
}

.cinema-card-body {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
}

.cinema-card-body strong {
  color: var(--accent-strong);
  font-size: 18px;
  line-height: 1.15;
}

.cinema-card-body > span:last-child {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

.cinema-card-stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.person-summary-grid .summary-card strong {
  overflow-wrap: anywhere;
}

.view {
  display: none;
  min-width: 0;
}

.view.is-active {
  display: block;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 9px;
}

.table-wrap {
  position: relative;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 4px 8px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgb(17 191 243 / 8%), transparent 52%),
    var(--surface-soft);
}

.table-action-group,
.table-scroll-hint {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.table-scroll-hint {
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
}

.table-scroll-hint[hidden] {
  display: none;
}

.table-scroll-label {
  white-space: nowrap;
}

.table-scroll-controls {
  display: inline-flex;
  gap: 4px;
}

.table-scroll-button:disabled {
  border-color: transparent;
  background: color-mix(in srgb, var(--surface-soft) 84%, var(--surface));
  color: var(--muted);
}

.table-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
  padding: 3px 8px;
  text-decoration: none;
}

.table-action.table-scroll-button {
  min-width: 76px;
  min-height: 26px;
  border-color: transparent;
  padding: 3px 7px;
}

.table-action:hover,
.table-action:focus-visible {
  border-color: var(--accent-warm);
  color: var(--accent-strong);
  box-shadow: 0 0 0 3px rgb(255 122 26 / 14%);
}

.table-action:disabled {
  cursor: default;
  opacity: 0.48;
  box-shadow: none;
}

.table-action.is-active {
  background: var(--accent-warm);
  border-color: var(--accent-warm);
  color: #17110b;
}

.table-host {
  position: relative;
  height: clamp(480px, 68vh, 880px);
  min-height: 420px;
  max-height: 1120px;
  min-width: 0;
  overflow: hidden;
  resize: vertical;
}

.table-host::after {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 14px;
  height: 14px;
  border-right: 2px solid color-mix(in srgb, var(--muted) 48%, transparent);
  border-bottom: 2px solid color-mix(in srgb, var(--muted) 48%, transparent);
  content: "";
  pointer-events: none;
  opacity: 0.8;
}

.table-tabulator {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.table-host.is-native-table {
  overflow: auto;
}

.table-wrap.is-short-table .table-host {
  height: auto;
  min-height: 0;
  max-height: none;
  resize: none;
}

.table-wrap.is-short-table .table-host::after {
  display: none;
}

.table-wrap.has-horizontal-overflow .table-host {
  box-shadow: inset -28px 0 22px -24px color-mix(in srgb, var(--ink) 28%, transparent);
}

.table-select-filter {
  display: inline-flex;
  align-items: center;
  grid-auto-flow: column;
  gap: 7px;
  min-height: 34px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.table-select-filter select {
  min-width: 150px;
  min-height: 34px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 800;
}

.stacked-table {
  margin-top: 12px;
}

.roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
  margin: 0 0 12px;
}

.roster-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.roster-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgb(17 191 243 / 10%), transparent 62%),
    var(--surface-soft);
}

.roster-card-head h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
}

.roster-card-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.roster-card-head > strong {
  color: var(--accent-strong);
  font-size: 24px;
  line-height: 1;
}

.roster-variant-tabs,
.roster-variant-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.roster-variant-tabs {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.roster-variant-button {
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 850;
  padding: 4px 9px;
}

.roster-variant-button:hover,
.roster-variant-button:focus-visible {
  border-color: var(--accent-warm);
  color: var(--accent-strong);
}

.roster-variant-button.is-active {
  border-color: var(--accent-warm);
  background: rgb(255 122 26 / 16%);
  color: var(--accent-strong);
}

.roster-rank {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  min-height: 32px;
  border: 1px solid rgb(17 191 243 / 28%);
  border-radius: 6px;
  background: rgb(17 191 243 / 12%);
  color: var(--accent-strong);
  font-weight: 900;
}

.roster-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.roster-metrics > span {
  padding: 9px 10px;
  border-right: 1px solid var(--cell-line);
}

.roster-metrics > span:last-child {
  border-right: 0;
}

.roster-metrics small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.roster-metrics strong {
  display: block;
  margin-top: 2px;
  font-size: 16px;
}

.roster-pokemon-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 10px;
}

.roster-pokemon-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  padding: 3px 7px 3px 4px;
}

.roster-pokemon-chip .pokemon-cell {
  min-width: 0;
}

.roster-pokemon-chip .link-button {
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roster-pokemon-chip small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.roster-detail-link {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: calc(100% - 20px);
  min-height: 40px;
  margin: 10px 10px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgb(17 191 243 / 12%), transparent 58%),
    var(--surface-soft);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
  padding: 0 12px;
  text-decoration: none;
}

.roster-detail-link::after {
  content: ">";
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgb(17 191 243 / 14%);
  color: var(--accent-strong);
}

.roster-detail-link:hover,
.roster-detail-link:focus-visible {
  border-color: var(--accent-warm);
  color: var(--accent-warm);
  outline: none;
}

.roster-detail-link:hover::after,
.roster-detail-link:focus-visible::after {
  background: rgb(255 122 26 / 16%);
  color: var(--accent-warm);
}

.roster-detail-focus {
  margin-bottom: 12px;
}

.roster-detail-hero {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  justify-content: space-between;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(115deg, rgb(17 191 243 / 18%), transparent 48%),
    linear-gradient(255deg, rgb(255 122 26 / 12%), transparent 44%),
    var(--surface);
  box-shadow: var(--shadow);
}

.roster-detail-hero > div:first-child {
  min-width: 0;
}

.roster-detail-kicker {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.roster-detail-hero h3 {
  margin: 4px 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1;
}

.roster-detail-hero p {
  margin: 0;
  color: var(--muted);
  font-weight: 750;
}

.roster-detail-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.roster-detail-actions .roster-variant-tabs {
  padding: 0;
  border: 0;
  background: transparent;
}

.roster-detail-visual {
  margin-bottom: 12px;
}

.roster-detail-summary-grid {
  margin: 12px 0 14px;
}

.roster-detail-flags {
  margin: 12px 16px 16px;
  border: 1px solid rgb(255 122 26 / 28%);
  border-radius: var(--radius);
  background: rgb(255 122 26 / 10%);
  color: var(--warn);
  overflow: hidden;
}

.roster-detail-flags > summary {
  cursor: pointer;
  list-style-position: inside;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 900;
}

.roster-detail-flags > p {
  margin: 0;
  padding: 0 12px 12px;
  font-size: 12px;
  font-weight: 800;
}

.roster-teamsheet {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.roster-teamsheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(115deg, rgb(17 191 243 / 16%), transparent 48%),
    linear-gradient(255deg, rgb(255 122 26 / 11%), transparent 44%),
    var(--surface);
}

.roster-teamsheet-head span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.roster-teamsheet-head h3 {
  margin: 3px 0 4px;
  color: var(--accent-strong);
  font-size: clamp(24px, 4vw, 36px);
  line-height: 1;
}

.roster-teamsheet-head p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.roster-teamsheet-score {
  display: grid;
  place-items: center;
  min-width: 128px;
  min-height: 96px;
  padding: 10px;
  border: 1px solid rgb(17 191 243 / 34%);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgb(17 191 243 / 18%), transparent 58%),
    var(--surface-soft);
  text-align: center;
}

.roster-teamsheet-score small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.roster-teamsheet-score strong {
  color: var(--accent-strong);
  font-size: 40px;
  line-height: 1;
}

.roster-teamsheet-grid {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  min-height: clamp(620px, 58vw, 760px);
  padding: clamp(18px, 3vw, 34px);
  background:
    radial-gradient(circle at 50% 50%, rgb(255 255 255 / 22%), transparent 44%),
    linear-gradient(90deg, rgb(7 17 31 / 12%), transparent 42%, rgb(255 122 26 / 9%)),
    linear-gradient(180deg, rgb(255 255 255 / 4%), rgb(7 17 31 / 14%)),
    var(--roster-bg-image);
  background-position: center;
  background-size: cover;
}

.roster-teamsheet-row {
  display: flex;
  justify-content: center;
  gap: 14px;
}

.roster-teamsheet-row-1 .roster-teamsheet-tile {
  flex-basis: 164px;
}

.roster-teamsheet-row-2 .roster-teamsheet-tile {
  flex-basis: 154px;
}

.roster-teamsheet-row-3 .roster-teamsheet-tile {
  flex-basis: 148px;
}

.roster-teamsheet-tile {
  position: relative;
  flex: 0 1 148px;
  display: grid;
  grid-template-rows: 112px auto;
  justify-items: center;
  align-items: start;
  gap: 3px;
  min-height: 156px;
  padding: 6px 7px 8px;
  border: 1px solid rgb(255 255 255 / 72%);
  border-radius: 10px;
  background: radial-gradient(circle at 50% 37%, rgb(255 255 255 / 20%), transparent 56%);
  box-shadow:
    0 14px 24px rgb(6 35 65 / 16%),
    inset 0 0 0 1px rgb(17 191 243 / 20%),
    inset 0 0 24px rgb(255 255 255 / 18%);
  backdrop-filter: saturate(1.08);
  text-shadow:
    0 2px 0 rgb(255 255 255 / 80%),
    0 6px 12px rgb(6 35 65 / 28%);
}

.roster-teamsheet-rank {
  position: absolute;
  top: 5px;
  left: 5px;
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  min-height: 22px;
  border: 1px solid rgb(17 191 243 / 36%);
  border-radius: 999px;
  background: rgb(226 247 255 / 64%);
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 6px 12px rgb(6 35 65 / 13%);
}

.roster-teamsheet-tile .pokemon-sprite-frame,
.roster-teamsheet-tile .pokemon-sprite {
  width: 112px;
  height: 112px;
}

.roster-teamsheet-tile h4 {
  margin: 0;
  max-width: 100%;
  padding: 2px 8px 3px;
  border: 1px solid rgb(255 255 255 / 36%);
  border-radius: 999px;
  background: rgb(242 247 252 / 42%);
  box-shadow: 0 8px 18px rgb(6 35 65 / 10%);
  font-size: 15px;
  line-height: 1.15;
  text-align: center;
}

.roster-teamsheet-tile h4 .link-button {
  color: var(--accent-strong);
  text-align: center;
  text-shadow:
    0 1px 0 rgb(255 255 255 / 95%),
    0 4px 9px rgb(6 35 65 / 22%);
  white-space: normal;
}

[data-theme="dark"] .roster-teamsheet-grid {
  background:
    radial-gradient(circle at 50% 50%, rgb(255 255 255 / 6%), transparent 44%),
    linear-gradient(90deg, rgb(7 16 27 / 26%), rgb(7 16 27 / 10%) 48%, rgb(40 28 20 / 20%)),
    linear-gradient(180deg, rgb(7 17 31 / 8%), rgb(7 17 31 / 30%)),
    var(--roster-bg-image);
  background-position: center;
  background-size: cover;
}

[data-theme="dark"] .roster-teamsheet-tile {
  border-color: rgb(255 255 255 / 24%);
  background: radial-gradient(circle at 50% 37%, rgb(255 255 255 / 10%), transparent 56%);
  box-shadow:
    0 14px 24px rgb(0 0 0 / 28%),
    inset 0 0 0 1px rgb(17 191 243 / 16%),
    inset 0 0 24px rgb(255 255 255 / 8%);
  text-shadow: 0 2px 8px rgb(0 0 0 / 78%);
}

[data-theme="dark"] .roster-teamsheet-rank {
  background: rgb(17 191 243 / 18%);
}

[data-theme="dark"] .roster-teamsheet-tile h4 {
  border-color: rgb(255 255 255 / 14%);
  background: rgb(13 23 37 / 42%);
}

[data-theme="dark"] .roster-teamsheet-tile h4 .link-button {
  text-shadow: 0 3px 10px rgb(0 0 0 / 80%);
}

.score-formula,
.roster-card-head > strong,
.roster-pokemon-chip small,
.roster-teamsheet-score,
.roster-teamsheet-tile {
  cursor: help;
}

.score-explainer {
  margin: 10px 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(36, 130, 255, 0.08), rgba(255, 255, 255, 0.7));
  overflow: hidden;
}

[data-theme="dark"] .score-explainer {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.14), rgba(15, 23, 42, 0.8));
}

.score-explainer > summary {
  cursor: pointer;
  padding: 11px 14px;
  color: var(--accent);
  font-weight: 900;
}

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

.score-explainer-grid > div {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.score-explainer-grid > div:first-child {
  grid-column: 1 / -1;
}

.score-explainer-grid strong {
  display: block;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
}

.score-explainer-grid p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.roster-flags {
  margin: 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.roster-flags > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  padding: 7px 10px;
  cursor: pointer;
  font-weight: 850;
  list-style: none;
}

.roster-flags > summary::-webkit-details-marker {
  display: none;
}

.roster-flags > summary::after {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--accent-strong);
}

.roster-flags[open] > summary::after {
  content: "-";
}

.roster-flags > p {
  margin: 0;
  padding: 0 10px 10px;
  color: var(--warn);
  font-weight: 800;
}

.show-more-button {
  align-self: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
  grid-column: 1 / -1;
  justify-self: center;
  padding: 0.7rem 1.1rem;
}

.show-more-button:hover,
.show-more-button:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.subsection-head {
  margin: 16px 0 8px;
}

.detail-table-section {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.detail-table-section[hidden],
.person-focus[hidden],
.pokemon-focus[hidden] {
  display: none !important;
}

.detail-table-section > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgb(17 191 243 / 8%), transparent 52%),
    var(--surface-soft);
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  list-style: none;
  text-transform: uppercase;
}

.detail-table-section > summary::-webkit-details-marker {
  display: none;
}

.detail-table-section > summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent-strong);
  font-size: 13px;
  line-height: 1;
}

.detail-table-section[open] > summary::before {
  content: "-";
}

.detail-table-section:not([open]) > summary {
  border-bottom: 0;
}

.detail-table-section > .table-wrap {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.roster-matchday-matrix {
  padding: 12px;
}

.roster-matchday-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.roster-matchday-toolbar > span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  gap: 5px;
}

.roster-matchday-toolbar strong {
  color: var(--accent-strong);
  font-size: 14px;
}

.roster-matchday-toolbar .roster-matchday-source {
  margin-left: auto;
}

.roster-matchday-scroll {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.roster-matchday-table {
  width: 100%;
  min-width: 820px;
  border-collapse: separate;
  border-spacing: 0;
}

.roster-matchday-table th,
.roster-matchday-table td {
  padding: 8px 9px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
  white-space: nowrap;
}

.roster-matchday-table thead th {
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.roster-matchday-table tr:last-child th,
.roster-matchday-table tr:last-child td {
  border-bottom: 0;
}

.roster-matchday-table th:last-child,
.roster-matchday-table td:last-child {
  border-right: 0;
}

.roster-matchday-pokemon {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 220px;
  background: var(--surface);
  text-align: left !important;
}

.roster-matchday-table thead .roster-matchday-pokemon {
  z-index: 3;
  background: var(--surface-soft);
}

.roster-week-result {
  min-width: 42px;
  font-size: 13px !important;
}

.roster-week-result.is-win {
  background: rgb(39 174 96 / 18%);
  color: var(--success);
}

.roster-week-result.is-loss {
  background: rgb(255 86 86 / 16%);
  color: var(--danger);
}

.roster-week-result.is-draw,
.roster-week-result.is-not_played {
  background: rgb(106 119 136 / 12%);
  color: var(--muted);
}

.roster-matchday-cell {
  min-width: 42px;
  color: var(--muted);
}

.roster-matchday-cell.is-used {
  background:
    linear-gradient(135deg, rgb(17 191 243 / 12%), transparent 58%),
    var(--surface);
  color: var(--ink);
  font-weight: 900;
}

.roster-matchday-cell.is-zero {
  color: var(--muted);
}

.roster-matchday-total {
  background: var(--surface-soft);
  color: var(--accent-strong);
  font-weight: 950;
}

.person-focus {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgb(255 122 26 / 10%), transparent 50%),
    var(--surface-soft);
  color: var(--ink);
  font-weight: 800;
}

.pokemon-focus {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgb(17 191 243 / 12%), transparent 58%),
    var(--surface-soft);
  color: var(--ink);
  font-weight: 800;
}

.pokemon-focus-card {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pokemon-focus-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.pokemon-focus-card strong {
  display: block;
  font-size: 24px;
}

.pokemon-sprite-frame {
  position: relative;
  display: block;
  width: 96px;
  height: 96px;
  flex: 0 0 auto;
}

.pokemon-sprite {
  display: block;
  width: 96px;
  height: 96px;
  object-fit: contain;
  filter: drop-shadow(0 10px 14px rgb(6 35 65 / 22%));
}

.pokemon-sprite-img {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: transparent;
}

.pokemon-sprite-animated {
  background: transparent;
}

.pokemon-sprite-fallback {
  display: grid;
  place-items: center;
  border: 1px solid rgb(17 191 243 / 28%);
  border-radius: var(--radius);
  background: rgb(17 191 243 / 10%);
  color: var(--accent-strong);
  font-size: 24px;
  font-weight: 900;
}

.pokemon-cell {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.pokemon-icon,
.pokemon-icon-fallback {
  display: inline-block;
  flex: 0 0 auto;
  width: 40px;
  height: 30px;
  vertical-align: middle;
}

.pokemon-icon-fallback {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgb(17 191 243 / 12%);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
}

.person-focus .header-button {
  width: auto;
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface);
}

.pokemon-focus .header-button {
  width: auto;
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface);
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--accent-strong);
  cursor: pointer;
  font: inherit;
  font-weight: 850;
  padding: 0;
  text-align: left;
  text-decoration: none;
}

.link-button:hover,
.link-button:focus-visible {
  color: var(--accent-warm);
  text-decoration: underline;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--table-header);
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

tbody tr:hover {
  background: var(--table-hover);
}

.tabulator {
  border: 0;
  background: var(--surface);
  font-size: 13px;
}

.tabulator .tabulator-header {
  border-bottom: 1px solid var(--line);
  background: var(--table-header);
  color: var(--ink);
}

.tabulator .tabulator-header .tabulator-col {
  border-right: 1px solid var(--line);
  background: var(--table-header);
  min-height: 34px;
}

.tabulator .tabulator-col-title {
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.column-header-with-help {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.column-help {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid color-mix(in srgb, var(--accent-strong) 52%, var(--line));
  border-radius: 50%;
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  text-transform: none;
  cursor: help;
}

.summary-card .column-help,
.metric .column-help {
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  text-transform: none;
}

.app-tooltip {
  position: fixed;
  z-index: 2000;
  max-width: min(320px, calc(100vw - 24px));
  padding: 8px 10px;
  border: 1px solid var(--tooltip-line);
  border-radius: 6px;
  background: var(--tooltip-bg);
  box-shadow: 0 12px 32px rgb(0 0 0 / 30%);
  color: var(--tooltip-ink);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  text-transform: none;
  transition: opacity 120ms ease;
  white-space: normal;
}

.app-tooltip[hidden] {
  display: none;
}

.app-tooltip.is-visible {
  opacity: 1;
}

.tabulator .tabulator-col-sorter .tabulator-arrow {
  border-bottom-color: var(--accent-strong);
  border-top-color: var(--accent-strong);
}

.tabulator .tabulator-header-filter input,
.tabulator .tabulator-header-filter select {
  min-height: 28px;
  border-radius: 6px;
  background: var(--surface);
  font-size: 12px;
  padding: 5px 7px;
}

.tabulator .table-sticky-identity-header,
.tabulator .table-sticky-identity-cell {
  position: sticky;
  left: 0;
  box-shadow: 1px 0 0 var(--line), 14px 0 18px -18px color-mix(in srgb, var(--ink) 36%, transparent);
}

.tabulator .table-sticky-identity-header {
  z-index: 8;
  background: var(--table-header);
}

.tabulator .tabulator-header .table-sticky-identity-header {
  position: sticky;
  left: 0;
  z-index: 8;
  background: var(--table-header);
}

.tabulator .table-sticky-identity-cell {
  z-index: 3;
  background: inherit;
  font-weight: 800;
}

.tabulator .table-sticky-identity-cell[tabulator-field="title"] {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tabulator .table-sticky-identity-cell[tabulator-field="title"] a {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tabulator .tabulator-row {
  background: var(--surface);
  border-bottom: 1px solid var(--cell-line);
  color: var(--ink);
}

.tabulator .tabulator-row.tabulator-row-odd {
  background: var(--surface);
}

.tabulator .tabulator-row.tabulator-row-even {
  background: var(--table-even);
}

.tabulator .tabulator-row:hover {
  background: var(--table-hover);
}

.tabulator .tabulator-cell {
  border-right: 1px solid var(--cell-line);
  color: var(--ink);
  padding: 7px 9px;
}

.tabulator .tabulator-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-height: 40px;
  padding: 5px 8px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-soft) 72%, var(--surface));
}

.tabulator .tabulator-footer-contents {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  min-width: 0;
}

.tabulator .tabulator-paginator {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 4px;
  width: 100%;
}

.tabulator .tabulator-paginator label {
  display: inline;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.tabulator .tabulator-pages {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tabulator .tabulator-footer .tabulator-page-size {
  min-height: 28px;
  max-width: 158px;
  border: 1px solid transparent;
  border-color: transparent;
  border-radius: 5px;
  background: color-mix(in srgb, var(--surface) 82%, var(--surface-soft));
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 7px;
}

.tabulator .tabulator-footer .tabulator-page {
  min-height: 28px;
  border-radius: 5px;
  border: 1px solid transparent;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  padding: 3px 7px;
}

.tabulator .tabulator-footer .tabulator-page.active {
  background: color-mix(in srgb, var(--header-soft) 14%, var(--surface));
  color: var(--accent-strong);
  box-shadow: inset 0 -2px 0 var(--header-soft);
}

.tabulator .tabulator-footer .tabulator-page:not(:disabled):hover,
.tabulator .tabulator-footer .tabulator-page:not(:disabled):focus-visible,
.tabulator .tabulator-footer .tabulator-page-size:focus-visible {
  border-color: color-mix(in srgb, var(--header-soft) 34%, transparent);
  background: var(--surface);
  color: var(--accent-strong);
  box-shadow: none;
}

.tabulator .tabulator-footer .tabulator-page:disabled {
  cursor: default;
  opacity: 0.48;
  box-shadow: none;
}

.muted {
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  background: rgb(17 191 243 / 12%);
  color: var(--accent-strong);
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 850;
}

.badge.warn {
  background: rgb(255 122 26 / 14%);
  color: var(--warn);
}

.empty {
  padding: 24px;
  color: var(--muted);
}

.matchup-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.result-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  min-height: 88px;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 16px;
  box-shadow: 0 10px 28px rgb(6 35 65 / 9%);
}

.result-box .table-wrap {
  margin-top: 14px;
  box-shadow: none;
}

.bracket-board {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.bracket-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgb(17 191 243 / 7%), transparent 48%),
    var(--surface);
  box-shadow: 0 10px 28px rgb(6 35 65 / 8%);
  overflow: hidden;
}

.bracket-section.is-muted {
  padding: 18px;
  color: var(--muted);
}

.bracket-section.is-muted p {
  margin: 0;
}

.bracket-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.bracket-section-head h3,
.bracket-round h4,
.group-panel h4,
.group-week h5 {
  margin: 0;
}

.bracket-section-head span {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  min-height: 26px;
  border-radius: 999px;
  background: rgb(17 191 243 / 14%);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
}

.bracket-rounds {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  align-items: start;
  padding: 14px;
}

.bracket-round {
  position: relative;
  display: grid;
  gap: 10px;
  min-width: 0;
}

.bracket-round h4,
.group-panel h4 {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.bracket-match-list,
.group-week-list {
  display: grid;
  gap: 10px;
}

.bracket-match {
  position: relative;
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent-strong);
  border-radius: 8px;
  background: var(--surface);
  padding: 9px;
}

.bracket-match.is-compact {
  border-left-color: var(--accent-warm);
}

.bracket-match-kicker {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.25;
}

.bracket-participant {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 30px;
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--ink);
  padding: 5px 7px;
}

.bracket-participant span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bracket-participant strong {
  font-size: 13px;
}

.bracket-participant.is-winner {
  background: rgb(17 191 243 / 16%);
  color: var(--accent-strong);
  font-weight: 900;
}

.bracket-participant.is-empty {
  color: var(--muted);
  font-style: italic;
}

.bracket-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 2px;
  font-size: 12px;
  font-weight: 850;
}

.group-phase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 12px;
  padding: 14px;
}

.group-panel {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.group-week {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(255 255 255 / 48%);
  padding: 9px;
}

[data-theme="dark"] .group-week {
  background: rgb(6 35 65 / 24%);
}

.group-week h5 {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 12px;
}

.metric {
  padding: 12px;
}

.metric strong {
  display: block;
  font-size: 24px;
}

.entry-shell code {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-soft);
  padding: 2px 5px;
}

.entry-toolbar {
  grid-template-columns: minmax(160px, 220px) minmax(220px, 1fr) minmax(280px, 1.2fr) auto;
}

.entry-checkbox {
  align-self: end;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-height: 36px;
}

.entry-checkbox input {
  width: auto;
  min-height: 0;
}

.entry-actions {
  margin-bottom: 0;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
}

.entry-table select {
  min-width: 260px;
}

.entry-table .numeric {
  text-align: right;
  font-weight: 850;
}

.entry-muted {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.graphics-toolbar {
  grid-template-columns: minmax(160px, 220px) minmax(220px, 1fr) minmax(280px, 1.2fr) auto;
}

.graphics-groups {
  display: grid;
  gap: 14px;
}

.graphics-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.graphics-group-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgb(17 191 243 / 8%), transparent 52%),
    var(--surface-soft);
}

.graphics-group-head p {
  margin-top: 4px;
  color: var(--muted);
}

.graphics-group-team {
  width: min(360px, 100%);
}

.graphics-slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
  padding: 12px;
}

.graphics-slot {
  display: grid;
  gap: 9px;
  min-width: 0;
  border: 1px solid var(--cell-line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 9px;
}

.graphics-crop {
  overflow: hidden;
  border: 3px solid #ffffff;
  border-radius: var(--radius);
  background-repeat: no-repeat;
  box-shadow: 0 8px 18px rgb(6 35 65 / 16%);
}

.graphics-slot-body {
  display: grid;
  gap: 7px;
}

.suggestion-button {
  justify-content: center;
  color: var(--accent-strong);
}

@media (max-width: 1200px) {
  .person-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .summary-grid {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }

  .roster-detail-hero {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .app-header,
  .section-head {
    display: block;
  }

  .brand-lockup {
    align-items: flex-start;
  }

  .brand-logo {
    width: clamp(92px, 30vw, 132px);
  }

  .status {
    margin-top: 14px;
    text-align: left;
  }

  .header-actions {
    justify-content: stretch;
    margin-top: 16px;
  }

  .header-button,
  .status {
    width: 100%;
  }

  .toolbar,
  .entry-toolbar,
  .graphics-toolbar,
  .matchup-form,
  .summary-grid,
  .score-explainer-grid,
  .result-grid {
    grid-template-columns: 1fr;
  }

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

  .roster-teamsheet-head {
    align-items: stretch;
    flex-direction: column;
  }

  .roster-teamsheet-score {
    min-height: 76px;
  }

  .roster-teamsheet-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    min-height: 0;
    padding: 10px;
    background-position: center top;
  }

  .roster-teamsheet-row {
    display: contents;
  }

  .roster-teamsheet-tile {
    flex: none;
    grid-template-rows: 90px auto;
    min-height: 134px;
    padding: 6px;
  }

  .roster-teamsheet-tile .pokemon-sprite-frame,
  .roster-teamsheet-tile .pokemon-sprite {
    width: 90px;
    height: 90px;
  }

  .roster-teamsheet-tile h4 {
    padding-inline: 6px;
    font-size: 13px;
  }

  .graphics-group-head {
    display: block;
  }

  .graphics-group-team {
    margin-top: 10px;
  }

  th,
  td {
    padding: 9px 10px;
  }
}

@media (max-width: 720px) {
  .app-header {
    padding: 10px 12px;
  }

  .brand-lockup {
    gap: 10px;
  }

  .brand-logo {
    width: clamp(70px, 22vw, 96px);
  }

  h1 {
    font-size: 21px;
  }

  .app-header p {
    display: none;
  }

  .header-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-top: 10px;
  }

  .header-button,
  .status {
    width: auto;
    min-height: 32px;
    padding: 6px 9px;
    font-size: 12px;
  }

  .status {
    grid-column: 1 / -1;
  }

  .app-shell {
    padding: 10px 10px 28px;
  }

  .primary-tabs,
  .tabs {
    gap: 6px;
  }

  .nav-group-tab,
  .tab {
    min-height: 31px;
    padding: 6px 9px;
    font-size: 12px;
  }

  .toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 6px 0 10px;
    padding: 8px;
  }

  .toolbar label:last-child {
    grid-column: 1 / -1;
  }

  .toolbar-hint {
    display: none;
  }

  .table-actions {
    flex-wrap: nowrap;
    gap: 5px;
  }

  .table-action-group,
  .table-scroll-hint {
    flex-wrap: nowrap;
  }

  .table-scroll-label {
    display: none;
  }

  .table-action.table-scroll-button {
    min-width: 74px;
    padding-inline: 6px;
  }

  .tabulator .tabulator-footer .tabulator-page[data-page="first"],
  .tabulator .tabulator-footer .tabulator-page[data-page="last"] {
    display: none;
  }

  .tabulator .tabulator-footer .tabulator-page-size {
    max-width: 76px;
  }

  .tabulator .tabulator-footer .tabulator-page[data-page="prev"],
  .tabulator .tabulator-footer .tabulator-page[data-page="next"] {
    width: 28px;
    min-width: 28px;
    padding-inline: 0;
    font-size: 0;
  }

  .tabulator .tabulator-footer .tabulator-page[data-page="prev"]::after {
    content: "<";
    font-size: 13px;
  }

  .tabulator .tabulator-footer .tabulator-page[data-page="next"]::after {
    content: ">";
    font-size: 13px;
  }

  .tabulator .tabulator-paginator {
    gap: 3px;
  }

  .compact-filter-panel > summary {
    min-height: 34px;
    padding: 7px 10px;
  }

  .cinema-filter-grid {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 0 10px 10px;
  }

  .cinema-filter-actions {
    min-height: 0;
  }

  .cinema-player-card {
    grid-template-columns: 1fr;
  }

  .cinema-player {
    height: auto;
    aspect-ratio: 16 / 9;
    min-height: 220px;
  }

  .cinema-player-info {
    grid-template-columns: 1fr;
    padding: 13px;
  }

  .cinema-meta-row {
    grid-template-columns: 1fr;
  }

  .cinema-actions {
    grid-column: 1;
    grid-row: auto;
    justify-content: flex-start;
  }

  .cinema-playback-controls {
    inset: 0;
  }

  .cinema-nav-button {
    width: 44px;
    height: 44px;
    font-size: 28px;
  }

  .cinema-nav-button--previous {
    left: 8px;
  }

  .cinema-nav-button--next {
    right: 8px;
  }
}
