/* Pikafish Tournament — self-contained, no remote assets. */
:root {
  color-scheme: light;
  --paper: #f6f5f1;
  --surface: #fff;
  --surface-soft: #faf9f6;
  --surface-hover: #f3f1eb;
  --ink: #252b31;
  --muted: #777c81;
  --faint: #a1a5a9;
  --line: #e8e6df;
  --line-strong: #d9d6cc;
  --gold: #f2bc45;
  --gold-dark: #95631a;
  --gold-soft: #fff5d9;
  --red: #bc493e;
  --red-soft: #fff0ed;
  --green: #32735b;
  --green-soft: #edf7f1;
  --blue: #426b98;
  --blue-soft: #eef4fb;
  --sidebar: #1d2228;
  --sidebar-muted: #9a9fa5;
  --radius: 16px;
  --radius-sm: 9px;
  --shadow: 0 4px 18px rgb(31 33 29 / 3%);
  --dialog-shadow: 0 24px 90px rgb(0 0 0 / 20%);
  --focus: #c58b1d;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}
html {
  min-width: 320px;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.65;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
input,
select,
textarea,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}
button,
select {
  touch-action: manipulation;
}
button {
  color: inherit;
}
a {
  color: var(--gold-dark);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
button:focus:not(:focus-visible) {
  outline: 0;
}
img,
svg {
  max-width: 100%;
}
svg {
  flex-shrink: 0;
}
h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}
h1,
h2,
h3,
h4 {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.35;
}
h1 {
  margin-bottom: 9px;
  font-size: clamp(26px, 3vw, 34px);
  letter-spacing: -0.9px;
}
h2 {
  margin-bottom: 13px;
  font-size: 19px;
  letter-spacing: -0.3px;
}
h3 {
  margin-bottom: 10px;
  font-size: 16px;
}
h4 {
  margin-bottom: 8px;
  font-size: 14px;
}
p {
  margin-bottom: 12px;
}
ul,
ol {
  padding-left: 21px;
}
li + li {
  margin-top: 6px;
}
hr {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: 24px 0;
}
code {
  font-size: 0.9em;
  padding: 2px 5px;
  background: var(--surface-hover);
  border-radius: 4px;
}
small {
  font-size: 12px;
}
[hidden] {
  display: none !important;
}
.muted {
  color: var(--muted);
}
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}
.nowrap {
  white-space: nowrap;
}
.text-link {
  border: 0;
  padding: 0;
  background: none;
  color: var(--gold-dark);
  cursor: pointer;
  font-size: inherit;
  font-weight: 600;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.text-link:hover {
  text-decoration: underline;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.mobile-only {
  display: none;
}
.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 999;
  padding: 10px 18px;
  border-radius: 8px;
  color: #171a20;
  background: var(--gold);
}
.skip-link:focus {
  top: 12px;
}

/* Persistent frame */
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
}
.sidebar {
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 540px;
  padding: 28px 17px 20px;
  background: var(--sidebar);
  color: #e9e9e7;
  overflow-y: auto;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 9px;
  margin-bottom: 34px;
  text-decoration: none;
  color: #fff;
}
.brand:hover {
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border: 2px solid #f2bc45;
  border-radius: 50%;
  outline: 1px solid #f2bc4538;
  outline-offset: 4px;
  color: #f2bc45;
  background: #f2bc450a;
  font-size: 23px;
  font-family: "STKaiti", "KaiTi", serif;
  font-weight: 700;
  line-height: 1;
}
.brand-name {
  color: #faf8ee;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.4px;
}
.brand-name small,
.brand-sub {
  display: block;
  margin-top: 6px;
  color: #9b9fa5;
  font-size: 10px;
  font-family: inherit;
  font-weight: 500;
  letter-spacing: 1.7px;
  line-height: 1.5;
  text-transform: uppercase;
}
.sidebar-label {
  padding: 0 14px;
  margin: 8px 0 10px;
  color: #7f8790;
  font-size: 10px;
  letter-spacing: 1.7px;
  font-weight: 700;
  text-transform: uppercase;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 45px;
  padding: 11px 15px;
  border: 0;
  border-radius: 9px;
  color: #b8bdc2;
  background: transparent;
  text-align: left;
  text-decoration: none;
  transition:
    color 0.15s,
    background 0.15s;
  font-weight: 500;
}
.nav-item svg {
  width: 19px;
  height: 19px;
  opacity: 0.8;
}
.nav-item .nav-icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  font-size: 18px;
  line-height: 1;
}
.nav-item:hover {
  color: #fff;
  background: #ffffff0a;
  text-decoration: none;
}
.nav-item.active {
  color: #f7cb70;
  background: #f2bc4519;
  font-weight: 650;
  box-shadow: inset 3px 0 0 #f2bc45;
}
.nav-item.active svg {
  opacity: 1;
}
.nav-item .count {
  margin-left: auto;
  border-radius: 5px;
  padding: 0 6px;
  background: #ffffff0a;
  color: inherit;
  font-size: 10px;
}
.sidebar-foot {
  margin-top: auto;
  padding: 22px 12px 0;
  color: var(--sidebar-muted);
  font-size: 11px;
}
.sidebar-foot::before {
  display: block;
  height: 1px;
  margin-bottom: 18px;
  background: #ffffff12;
  content: "";
}
.sidebar-foot a {
  color: #d0d4d7;
}
.sidebar-foot p {
  margin-bottom: 7px;
}
.sidebar-foot .save-status {
  color: #95bca4;
}
.main-shell {
  min-width: 0;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 74px;
  padding: 14px 36px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}
.breadcrumb strong {
  color: var(--ink);
  font-weight: 600;
}
.breadcrumb .separator {
  opacity: 0.5;
}
.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}
.top-actions select {
  max-width: 240px;
  min-height: 35px;
  padding-top: 6px;
  padding-bottom: 6px;
  border-radius: 8px;
  font-size: 12px;
}
.save-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.save-status::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #559372;
}
.save-status.warning::before {
  background: #c58926;
}
.save-status.error::before {
  background: #bd4c41;
}
.page {
  padding: 32px 36px 48px;
  max-width: 1580px;
  margin: 0 auto;
}
.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 27px;
}
.page-head p {
  margin-bottom: 0;
}
.page-head .muted {
  font-size: 13px;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  color: var(--gold-dark);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.7px;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  display: block;
  width: 15px;
  height: 2px;
  background: var(--gold);
}
.actions,
.toolbar,
.split {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.split {
  justify-content: space-between;
}
.toolbar {
  justify-content: space-between;
  margin-bottom: 17px;
}
.toolbar > .actions {
  margin-left: auto;
}
.offline-banner {
  margin-bottom: 20px;
}

/* Buttons, compact controls and status */
.button,
button.primary,
button.secondary,
button.ghost,
button.danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 39px;
  padding: 8px 15px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.55;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 0.15s,
    background 0.15s,
    box-shadow 0.15s,
    border-color 0.15s;
}
.button:hover,
button.secondary:hover {
  text-decoration: none;
  border-color: #c8c1af;
  background: var(--surface-hover);
}
.button:active:not(:disabled) {
  transform: translateY(1px);
}
.button.primary,
button.primary {
  color: #34270c;
  border-color: var(--gold);
  background: var(--gold);
  box-shadow: 0 2px 4px #b78a2420;
}
.button.primary:hover,
button.primary:hover {
  border-color: #e7ae32;
  background: #eab23b;
  box-shadow: 0 3px 9px #bd8e2129;
}
.button.secondary,
button.secondary {
  border-color: var(--line-strong);
  background: var(--surface);
}
.button.ghost,
button.ghost {
  border-color: transparent;
  box-shadow: none;
  background: transparent;
  color: var(--muted);
}
.button.ghost:hover,
button.ghost:hover {
  color: var(--ink);
  background: var(--surface-hover);
}
.button.danger,
button.danger {
  color: var(--red);
  border-color: #d97b6d55;
  background: var(--red-soft);
  box-shadow: none;
}
.button.danger:hover,
button.danger:hover {
  border-color: #c85c4e;
  background: var(--red-soft);
}
.button.small,
button.small {
  min-height: 30px;
  padding: 5px 10px;
  font-size: 11px;
  border-radius: 7px;
}
.button svg,
.actions svg {
  width: 15px;
  height: 15px;
}
.icon-button {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 35px;
  height: 35px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
}
.icon-button:hover {
  background: var(--surface-hover);
  color: var(--ink);
}
.icon-button.small {
  width: 27px;
  height: 27px;
  min-height: 27px;
  padding: 0;
  font-size: 13px;
}
.badge,
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-shrink: 0;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--surface-hover);
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}
.pill {
  border-radius: 20px;
  padding: 4px 10px;
}
.badge.amber,
.pill.amber {
  background: var(--gold-soft);
  color: var(--gold-dark);
}
.badge.green,
.pill.green {
  background: var(--green-soft);
  color: var(--green);
}
.badge.red,
.pill.red {
  background: var(--red-soft);
  color: var(--red);
}
.badge.gray {
  background: var(--surface-hover);
  color: var(--muted);
}
.badge.blue {
  background: var(--blue-soft);
  color: var(--blue);
}
.notice {
  padding: 12px 16px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}
.notice p:last-child,
.notice ul:last-child {
  margin-bottom: 0;
}
.notice strong {
  font-weight: 650;
}
.notice.warning {
  border-color: #d5aa4545;
  border-left-color: #d6a33c;
  background: var(--gold-soft);
  color: var(--gold-dark);
}
.notice.error {
  border-color: #d27b6d45;
  border-left-color: #c56455;
  background: var(--red-soft);
  color: var(--red);
}
.notice.success {
  border-color: #77a68c45;
  border-left-color: #519270;
  background: var(--green-soft);
  color: var(--green);
}
.notice .actions {
  margin-top: 9px;
}

/* Overview */
.hero-banner {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 178px;
  overflow: hidden;
  margin-bottom: 23px;
  padding: 28px 32px;
  border: 1px solid #eee1b8;
  border-radius: var(--radius);
  background: #f4e9cc;
}
.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 70%;
}
.hero-copy h2 {
  margin: 0 0 9px;
  font-size: clamp(20px, 2.2vw, 27px);
  color: #4c3c20;
  letter-spacing: -0.5px;
}
.hero-copy p {
  margin-bottom: 17px;
  color: #8c7853;
  font-size: 12px;
}
.hero-copy .eyebrow {
  color: #947733;
}
.hero-art {
  position: absolute;
  right: 40px;
  top: -28px;
  width: 230px;
  height: 230px;
  transform: rotate(-12deg);
  border-radius: 50%;
  border: 1px solid #a77a2526;
  background-image:
    linear-gradient(#b0883a26 1px, transparent 1px),
    linear-gradient(90deg, #b0883a26 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: center;
  opacity: 0.75;
}
.hero-art::before,
.hero-art::after {
  display: grid;
  place-items: center;
  position: absolute;
  width: 72px;
  height: 72px;
  border: 2px solid #b88138;
  outline: 1px solid #bc955a;
  outline-offset: -7px;
  border-radius: 50%;
  background: #f8e9c5;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 35px;
  line-height: 1;
  box-shadow: 3px 7px 0 #ac873e26;
}
.hero-art::before {
  content: "帥";
  top: 57px;
  left: 47px;
  color: #aa5140;
}
.hero-art::after {
  content: "將";
  top: 124px;
  left: 125px;
  color: #4b5146;
  background: #eee0bd;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 25px;
}
.stat {
  position: relative;
  padding: 20px 22px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.stat-label {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2px;
}
.stat-value {
  display: flex;
  align-items: baseline;
  gap: 5px;
  color: var(--ink);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.8px;
  font-variant-numeric: tabular-nums;
}
.stat-value small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
}
.stat-note {
  margin-top: 9px;
  color: var(--muted);
  font-size: 10px;
}
.stat .stat-icon {
  position: absolute;
  top: 19px;
  right: 20px;
  color: #bead8a;
  font-size: 18px;
}
.stat.accent {
  background: var(--gold-soft);
  border-color: #e6c15d55;
}
.layout-two {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 22px;
  align-items: start;
}
.panel {
  min-width: 0;
  margin-bottom: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 24px 17px;
  border-bottom: 1px solid var(--line);
}
.panel-head h2,
.panel-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
}
.panel-head .muted {
  font-size: 11px;
}
.panel-body {
  padding: 22px 24px;
}
.panel-body > :last-child {
  margin-bottom: 0;
}
.panel > .toolbar {
  padding: 18px 22px 0;
}
.panel > .notice {
  margin: 17px 22px;
}
.panel.side-panel {
  border-radius: 13px;
}
.side-panel .panel-head {
  padding: 18px 20px 15px;
}
.side-panel .panel-body {
  padding: 18px 20px;
}
.detail-list {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 14px;
  row-gap: 13px;
  margin: 0;
  font-size: 12px;
}
.detail-list dt {
  color: var(--muted);
}
.detail-list dd {
  margin: 0;
  max-width: 230px;
  text-align: right;
  overflow-wrap: anywhere;
}
.detail-list > div {
  display: contents;
}
.progress-track {
  height: 5px;
  border-radius: 99px;
  background: var(--surface-hover);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: var(--gold);
  transition: width 0.3s ease;
}
.progress-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 9px;
  font-size: 11px;
  color: var(--muted);
}
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}
.format-card,
.step-card {
  min-width: 0;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  text-align: left;
}
.format-card {
  position: relative;
  transition:
    background 0.15s,
    border-color 0.15s,
    transform 0.15s;
}
button.format-card:hover {
  transform: translateY(-2px);
  border-color: #d7b865;
  background: var(--gold-soft);
}
.format-card.selected,
.format-card.active {
  border-color: #d6a844;
  background: var(--gold-soft);
  box-shadow: 0 0 0 1px #d6a844;
}
.format-card h3,
.step-card h3 {
  font-size: 14px;
  margin: 10px 0 7px;
}
.format-card p,
.step-card p {
  color: var(--muted);
  font-size: 11px;
  margin: 0;
  line-height: 1.75;
}
.format-card .format-icon,
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  color: var(--gold-dark);
  background: var(--gold-soft);
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
}
.step-number {
  width: 26px;
  height: 26px;
  font-size: 12px;
}
.empty-state {
  padding: 48px 25px;
  text-align: center;
  color: var(--muted);
}
.empty-state .empty-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 27px;
  color: #b7a275;
  background: var(--surface-soft);
}
.empty-state h2,
.empty-state h3 {
  font-size: 16px;
  margin-bottom: 9px;
  color: var(--ink);
}
.empty-state p {
  max-width: 440px;
  margin: 0 auto 20px;
  font-size: 12px;
}
.empty-state .actions {
  justify-content: center;
}
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.timeline-item {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 0 0 20px;
  font-size: 12px;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 21px;
  bottom: 0;
  width: 1px;
  background: var(--line);
}
.timeline-item:last-child {
  padding-bottom: 0;
}
.timeline-item:last-child::before {
  display: none;
}
.timeline-dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  background: var(--surface);
  font-size: 9px;
}
.timeline-item.complete .timeline-dot {
  color: var(--green);
  border-color: #b6d6c4;
  background: var(--green-soft);
}
.timeline-item.active .timeline-dot {
  color: var(--gold-dark);
  border-color: #e0bd66;
  background: var(--gold-soft);
}
.timeline-item small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 2px;
}

/* Results and lists */
.table-wrap {
  max-width: 100%;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
th {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
th:first-child,
td:first-child {
  padding-left: 24px;
}
th:last-child,
td:last-child {
  padding-right: 24px;
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr {
  transition: background 0.1s;
}
tbody tr:hover {
  background: var(--surface-soft);
}
td.num,
th.num {
  text-align: right;
}
td.center,
th.center {
  text-align: center;
}
td .actions {
  gap: 5px;
  flex-wrap: nowrap;
}
td .muted,
td small {
  font-size: 10px;
}
td .text-link {
  color: var(--ink);
  font-weight: 600;
}
.rank-number {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 25px;
  padding: 0 4px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--muted);
}
.rank-number.first,
tbody tr:first-child .rank-number {
  color: #9a6a16;
  background: #fff0c2;
  font-weight: 700;
}
.rank-number.second {
  color: #6b7684;
  background: #eef0f3;
}
.rank-number.third {
  color: #a47550;
  background: #f8eee5;
}
.player-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 115px;
}
.player-cell small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}
.avatar {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 31px;
  height: 31px;
  border-radius: 9px;
  background: #f1eee6;
  color: #91805c;
  font-size: 13px;
  font-weight: 500;
}
.avatar.red {
  background: var(--red-soft);
  color: var(--red);
}
.avatar.green {
  background: var(--green-soft);
  color: var(--green);
}
.red-player {
  color: var(--red);
}
.black-player {
  color: var(--ink);
}
.table-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}
.round-tabs {
  display: flex;
  gap: 6px;
  max-width: 100%;
  overflow-x: auto;
  padding: 2px 2px 14px;
  margin-bottom: 8px;
  scrollbar-width: thin;
}
.round-tab {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.round-tab:hover {
  background: var(--surface-hover);
}
.round-tab.active {
  color: #6d5117;
  border-color: #e5c16c;
  background: var(--gold-soft);
  font-weight: 650;
}
.round-tab.complete::after {
  content: "";
  height: 5px;
  width: 5px;
  border-radius: 50%;
  background: var(--green);
}
.match-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.match-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.match-card.complete {
  border-color: var(--line);
}
.match-card.bye {
  opacity: 0.85;
}
.match-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 17px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  background: var(--surface-soft);
}
.match-head strong {
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
}
.match-players {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 23px 18px 18px;
}
.match-player {
  min-width: 0;
  text-align: center;
}
.match-player strong {
  display: block;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.match-player small {
  display: block;
  margin-top: 5px;
  font-size: 10px;
  color: var(--muted);
}
.match-player .avatar {
  width: 30px;
  height: 30px;
  margin: 0 auto 8px;
  border-radius: 50%;
}
.vs {
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
}
.result-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 17px 15px;
}
.result-buttons > button {
  flex: 1;
  min-height: 32px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.result-buttons > button:hover {
  background: var(--surface-hover);
}
.result-buttons > button.selected {
  color: var(--gold-dark);
  border-color: #dfbd6a;
  background: var(--gold-soft);
  font-weight: 650;
}
.result-buttons > button.red.selected {
  color: var(--red);
  border-color: #d9a198;
  background: var(--red-soft);
}
.match-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 17px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: var(--muted);
}
.match-foot .button {
  min-height: 26px;
  font-size: 10px;
  padding: 3px 8px;
}
.match-foot select {
  width: auto;
  max-width: 155px;
  min-height: 29px;
  font-size: 10px;
  padding: 4px 7px;
}
.match-result {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px 17px;
  color: var(--green);
  font-size: 12px;
}
.audit-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.audit-list li {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.audit-list li:last-child {
  border: 0;
}
.audit-list time,
.audit-list .muted {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 10px;
}
.unit-options {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  font-size: 12px;
}
.unit-options select {
  width: auto;
}
.unit-options input {
  width: 80px;
}

/* Forms and settings */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
select,
textarea {
  width: 100%;
  min-width: 0;
  min-height: 39px;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.5;
  box-shadow: 0 1px 2px rgb(0 0 0 / 1%);
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
select {
  padding-right: 26px;
  cursor: pointer;
}
textarea {
  min-height: 110px;
  resize: vertical;
}
input::placeholder,
textarea::placeholder {
  color: var(--faint);
  opacity: 1;
}
input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
  border-color: #c6a557;
  outline: none;
  box-shadow: 0 0 0 3px #d6b1561a;
}
input[type="checkbox"],
input[type="radio"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #c3912c;
  cursor: pointer;
  flex-shrink: 0;
}
input[readonly] {
  color: var(--muted);
  background: var(--surface-soft);
}
input[type="number"] {
  font-variant-numeric: tabular-nums;
}
input[type="file"] {
  padding: 8px;
}
input[type="file"]::file-selector-button {
  border: 0;
  border-radius: 5px;
  padding: 5px 9px;
  margin-right: 10px;
  background: var(--surface-hover);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}
.form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.field.wide,
.form-grid > .wide {
  grid-column: 1 / -1;
}
.field label,
.field > span:first-child {
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}
.field small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}
.field .required {
  color: var(--red);
}
.field-error {
  margin-top: 3px;
  color: var(--red);
  font-size: 11px;
}
.check-field {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--ink);
  font-size: 12px;
  cursor: pointer;
}
.check-field input {
  margin-top: 3px;
}
.check-field small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 3px;
}
.segmented {
  display: inline-flex;
  padding: 3px;
  gap: 3px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  border-radius: 8px;
}
.segmented button {
  flex: 1;
  min-height: 29px;
  padding: 5px 12px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.segmented button.active,
.segmented button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 4px rgb(0 0 0 / 8%);
  font-weight: 600;
}
.search {
  width: 235px !important;
  max-width: 100%;
  padding-left: 12px;
}
.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: start;
}
.tiebreak-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  margin-bottom: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  font-size: 12px;
}
.tiebreak-row > .number,
.tiebreak-row > span:first-child {
  color: var(--faint);
  min-width: 16px;
  font-size: 10px;
}
.tiebreak-row .actions {
  gap: 4px;
  margin-left: auto;
  flex-wrap: nowrap;
}
.tiebreak-row .icon-button {
  background: var(--surface);
}
.tiebreak-row label {
  display: flex;
  align-items: center;
  gap: 9px;
}
.tiebreak-row .muted {
  font-size: 10px;
}
.board-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 110px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.board-row:last-child {
  border: 0;
}
.board-row > span:first-child {
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}
.board-row input,
.board-row select {
  min-height: 34px !important;
  padding: 6px 8px !important;
  font-size: 11px !important;
}
.help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.help-card {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}
.help-card h3 {
  margin-bottom: 12px;
  font-size: 15px;
}
.help-card p,
.help-card li {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.85;
}
.help-card p:last-child,
.help-card ul:last-child,
.help-card ol:last-child {
  margin-bottom: 0;
}
.help-card a {
  text-underline-offset: 3px;
}
.help-card details {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 12px;
}
details[open] summary {
  margin-bottom: 10px;
}

/* Dialogs and non-blocking feedback */
dialog.modal {
  width: min(680px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--dialog-shadow);
  overflow-y: auto;
  overscroll-behavior: contain;
}
dialog.modal.wide {
  width: min(920px, calc(100vw - 32px));
}
dialog.modal.small {
  width: min(460px, calc(100vw - 32px));
}
dialog.modal::backdrop {
  background: rgb(20 24 28 / 50%);
  backdrop-filter: blur(3px);
}
.dialog-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 21px 25px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.dialog-head h2 {
  margin: 0;
  font-size: 18px;
}
.dialog-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.dialog-body {
  padding: 24px 25px;
}
.dialog-body > :last-child {
  margin-bottom: 0;
}
.dialog-foot {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  padding: 16px 25px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.dialog-foot .muted {
  margin-right: auto;
  font-size: 10px;
}
.dialog-body .notice {
  font-size: 11px;
}
.dialog-body .cards-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.dialog-body .format-card {
  padding: 16px;
}
.toast-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: min(420px, calc(100vw - 32px));
  z-index: 100;
  pointer-events: none;
}
.toast {
  padding: 12px 17px;
  border-radius: 10px;
  border: 1px solid #ffffff12;
  background: #29332e;
  color: #f0f7f0;
  box-shadow: 0 6px 26px rgb(0 0 0 / 16%);
  font-size: 12px;
  line-height: 1.7;
  overflow-wrap: anywhere;
  pointer-events: auto;
  animation: toast-in 0.2s ease-out;
}
.toast.error {
  background: #743f37;
  color: #fff5f1;
}
.toast.warning {
  background: #705a30;
  color: #fff7df;
}
@keyframes toast-in {
  from {
    transform: translateY(5px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
#print-root {
  display: none;
}

/* Dark desk */
[data-theme="dark"] {
  color-scheme: dark;
  --paper: #191d22;
  --surface: #23282f;
  --surface-soft: #272d35;
  --surface-hover: #2d343d;
  --ink: #e9e9e6;
  --muted: #9ba2aa;
  --faint: #737d89;
  --line: #343b44;
  --line-strong: #444d58;
  --gold-dark: #e6bc65;
  --gold-soft: #423a27;
  --red: #e89488;
  --red-soft: #422e2d;
  --green: #8bc5a7;
  --green-soft: #293c35;
  --blue: #92b5df;
  --blue-soft: #2c3948;
  --sidebar: #12161b;
  --sidebar-muted: #8c96a0;
  --shadow: 0 4px 18px rgb(0 0 0 / 6%);
  --focus: #e7b447;
}
[data-theme="dark"] .hero-banner {
  background: #383226;
  border-color: #5f5130;
}
[data-theme="dark"] .hero-copy h2 {
  color: #eed49a;
}
[data-theme="dark"] .hero-copy p {
  color: #c0ac81;
}
[data-theme="dark"] .hero-art {
  opacity: 0.48;
}
[data-theme="dark"] .hero-copy .eyebrow {
  color: #d4af61;
}
[data-theme="dark"] .avatar {
  background: #39382f;
  color: #d2c29c;
}
[data-theme="dark"] .round-tab.active {
  color: #e9c774;
  border-color: #816d3d;
}
[data-theme="dark"] tbody tr:first-child .rank-number {
  background: #574828;
  color: #e7c57a;
}
[data-theme="dark"] .rank-number.second {
  background: #37404b;
  color: #c4cbd5;
}
[data-theme="dark"] .rank-number.third {
  background: #45382f;
  color: #d6ac89;
}
[data-theme="dark"] .button.primary {
  color: #332407;
}
[data-theme="dark"] .notice.warning {
  border-color: #75633a;
  border-left-color: #b48e3d;
}
[data-theme="dark"] .notice.error {
  border-color: #6a433d;
  border-left-color: #bb7165;
}
[data-theme="dark"] .notice.success {
  border-color: #3d6450;
  border-left-color: #629d7c;
}

@media (min-width: 1700px) {
  .app-shell {
    grid-template-columns: 248px minmax(0, 1fr);
  }
  .page {
    padding-top: 40px;
  }
  .sidebar {
    padding-left: 24px;
    padding-right: 24px;
  }
  .match-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 1200px) {
  .app-shell {
    grid-template-columns: 202px minmax(0, 1fr);
  }
  .sidebar {
    padding-left: 12px;
    padding-right: 12px;
  }
  .brand {
    gap: 10px;
    padding-left: 8px;
    padding-right: 0;
  }
  .brand-name {
    font-size: 16px;
  }
  .brand-name small {
    font-size: 9px;
    letter-spacing: 1.4px;
  }
  .brand-mark {
    width: 36px;
    height: 36px;
    font-size: 21px;
  }
  .topbar {
    padding-left: 25px;
    padding-right: 25px;
  }
  .page {
    padding: 27px 25px 40px;
  }
  .layout-two {
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 17px;
  }
  .settings-layout {
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 17px;
  }
  .stats-grid {
    gap: 12px;
  }
  .stat {
    padding: 17px 17px 16px;
  }
  .stat-value {
    font-size: 27px;
  }
  .panel-head {
    padding-left: 20px;
    padding-right: 20px;
  }
  .panel-body {
    padding-left: 20px;
    padding-right: 20px;
  }
  .match-grid {
    gap: 12px;
  }
  .match-players {
    padding-left: 12px;
    padding-right: 12px;
  }
  .match-player strong {
    font-size: 14px;
  }
  .hero-art {
    right: 8px;
  }
  th,
  td {
    padding-left: 12px;
    padding-right: 12px;
  }
}
@media (max-width: 1000px) {
  .layout-two {
    grid-template-columns: minmax(0, 1fr);
  }
  .layout-two > .side-panel {
    margin-bottom: 22px;
  }
  .settings-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .topbar .save-status {
    display: none;
  }
  .top-actions {
    gap: 7px;
  }
  .breadcrumb {
    font-size: 11px;
    gap: 6px;
  }
  .top-actions select {
    max-width: 180px;
  }
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stat {
    padding: 17px 20px;
  }
  .hero-banner {
    padding: 25px;
  }
}
@media (max-width: 760px) {
  html {
    scroll-padding-top: 130px;
  }
  .app-shell {
    display: block;
  }
  .sidebar {
    position: sticky;
    top: 0;
    height: auto;
    min-height: 0;
    padding: 11px 14px 0;
    overflow: visible;
  }
  .brand {
    margin: 0 0 12px;
    padding: 0 5px;
    gap: 11px;
  }
  .brand-mark {
    width: 28px;
    height: 28px;
    font-size: 18px;
    outline-offset: 3px;
    border-width: 1px;
  }
  .brand-name {
    font-size: 15px;
    display: flex;
    align-items: baseline;
    gap: 9px;
  }
  .brand-name small,
  .brand-sub {
    display: inline;
    margin: 0;
    color: #858d97;
    font-size: 9px;
    letter-spacing: 1px;
  }
  .sidebar-label,
  .sidebar-foot {
    display: none;
  }
  .sidebar nav {
    flex-direction: row;
    gap: 1px;
    overflow-x: auto;
    margin: 0 -14px;
    padding: 0 12px;
    scrollbar-width: none;
  }
  .sidebar nav::-webkit-scrollbar {
    display: none;
  }
  .nav-item {
    flex-shrink: 0;
    justify-content: center;
    gap: 5px;
    width: auto;
    min-height: 40px;
    padding: 9px 13px 10px;
    border-radius: 7px 7px 0 0;
    font-size: 11px;
  }
  .nav-item svg {
    width: 15px;
    height: 15px;
  }
  .nav-item .nav-icon {
    width: 17px;
    font-size: 14px;
  }
  .nav-item.active {
    box-shadow: inset 0 -2px 0 var(--gold);
  }
  .nav-item .count {
    font-size: 9px;
    min-width: 16px;
    padding: 0 4px;
  }
  .topbar {
    position: relative;
    top: auto;
    min-height: 56px;
    padding: 10px 20px;
    gap: 10px;
  }
  .breadcrumb {
    gap: 6px;
  }
  .top-actions {
    gap: 7px;
  }
  .top-actions .button {
    min-height: 32px;
    font-size: 11px;
    padding: 6px 10px;
  }
  .top-actions select {
    max-width: 200px;
    min-height: 32px;
  }
  .top-actions .icon-button {
    width: 31px;
    height: 31px;
    font-size: 15px;
  }
  .page {
    padding: 25px 20px 40px;
  }
  .page-head {
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 23px;
  }
  h1 {
    font-size: 27px;
  }
  .page-head .actions {
    gap: 7px;
  }
  .page-head .button {
    font-size: 11px;
    padding: 7px 12px;
    min-height: 35px;
  }
  .hero-banner {
    min-height: 163px;
    padding: 25px;
  }
  .hero-copy {
    max-width: 75%;
  }
  .hero-copy h2 {
    font-size: 23px;
  }
  .hero-art {
    right: -16px;
    top: -22px;
    width: 205px;
    height: 205px;
    opacity: 0.55;
  }
  .hero-art::before,
  .hero-art::after {
    width: 61px;
    height: 61px;
    font-size: 30px;
  }
  .hero-art::after {
    top: 116px;
    left: 116px;
  }
  .stats-grid {
    gap: 12px;
    margin-bottom: 22px;
  }
  .stat-label {
    font-size: 11px;
    margin-bottom: 8px;
  }
  .stat-value {
    font-size: 29px;
  }
  .stat-note {
    font-size: 10px;
    margin-top: 7px;
  }
  .panel {
    border-radius: 12px;
  }
  .panel-head {
    padding: 17px 19px 14px;
  }
  .panel-body {
    padding: 18px 19px;
  }
  .panel-head h2,
  .panel-head h3 {
    font-size: 14px;
  }
  .mobile-only {
    display: initial;
  }
  .help-grid {
    gap: 13px;
  }
  .help-card {
    padding: 19px;
  }
  .dialog-body {
    padding: 22px;
  }
  .dialog-head {
    padding: 18px 22px;
  }
  .dialog-foot {
    padding: 15px 22px;
  }
}
@media (max-width: 540px) {
  .brand-name small,
  .brand-sub {
    font-size: 8px;
  }
  .sidebar {
    padding-top: 12px;
  }
  .brand {
    margin-bottom: 10px;
  }
  .nav-item {
    padding-left: 11px;
    padding-right: 11px;
    font-size: 10px;
  }
  .nav-item svg,
  .nav-item .nav-icon {
    display: none;
  }
  .topbar {
    padding: 9px 15px;
    min-height: 52px;
  }
  .topbar .breadcrumb {
    display: none;
  }
  .top-actions {
    justify-content: space-between;
    width: 100%;
  }
  .top-actions select {
    flex: 1;
    max-width: none;
    min-width: 0;
    font-size: 11px;
  }
  .top-actions select + .button {
    flex-shrink: 0;
  }
  .page {
    padding: 22px 15px 36px;
  }
  .page-head {
    margin-bottom: 19px;
    gap: 15px;
  }
  .page-head > .actions {
    width: 100%;
  }
  h1 {
    font-size: 25px;
  }
  .eyebrow {
    font-size: 9px;
    margin-bottom: 7px;
    letter-spacing: 1.4px;
  }
  .page-head .muted {
    font-size: 11px;
  }
  .hero-banner {
    padding: 23px 20px;
    min-height: 176px;
    margin-bottom: 17px;
  }
  .hero-copy {
    max-width: 83%;
  }
  .hero-copy h2 {
    font-size: 22px;
  }
  .hero-copy p {
    font-size: 11px;
    margin-bottom: 15px;
  }
  .hero-art {
    right: -68px;
    top: -10px;
    opacity: 0.35;
  }
  .hero-copy .actions .button {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 10px;
  }
  .stats-grid {
    gap: 10px;
    margin-bottom: 19px;
  }
  .stat {
    padding: 15px 16px;
    border-radius: 10px;
  }
  .stat-value {
    font-size: 26px;
  }
  .stat-label {
    font-size: 10px;
  }
  .stat-note {
    font-size: 9px;
  }
  .stat .stat-icon {
    top: 16px;
    right: 16px;
    font-size: 16px;
  }
  .panel-head {
    padding: 16px 16px 13px;
    gap: 8px;
  }
  .panel-body {
    padding: 17px 16px;
  }
  .panel-head .button {
    font-size: 10px;
    padding: 5px 8px;
    min-height: 28px;
  }
  .panel-head .actions {
    gap: 5px;
  }
  .panel > .toolbar {
    padding: 15px 16px 0;
  }
  .panel > .notice {
    margin-left: 16px;
    margin-right: 16px;
  }
  .toolbar {
    gap: 10px;
  }
  .toolbar > .actions {
    margin-left: 0;
  }
  .search {
    width: 100% !important;
  }
  .toolbar .search {
    flex-basis: 100%;
  }
  .toolbar .button {
    min-height: 32px;
    font-size: 10px;
    padding: 6px 9px;
  }
  .table-wrap {
    margin-right: 0;
  }
  table {
    font-size: 11px;
  }
  th {
    padding-top: 11px;
    padding-bottom: 11px;
    font-size: 9px;
  }
  td {
    padding-top: 12px;
    padding-bottom: 12px;
  }
  th:first-child,
  td:first-child {
    padding-left: 16px;
  }
  th:last-child,
  td:last-child {
    padding-right: 16px;
  }
  .player-cell {
    min-width: 105px;
    gap: 8px;
  }
  .avatar {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
  .table-footer {
    padding-left: 16px;
    padding-right: 16px;
  }
  .match-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .match-player strong {
    font-size: 16px;
  }
  .match-players {
    padding: 21px 17px 18px;
  }
  .result-buttons {
    padding-bottom: 16px;
  }
  .result-buttons > button {
    min-height: 35px;
    font-size: 12px;
  }
  .match-foot {
    padding-top: 11px;
    padding-bottom: 11px;
  }
  .match-foot select {
    max-width: 150px;
  }
  .round-tabs {
    margin-right: -15px;
    padding-right: 15px;
  }
  .form-grid,
  .form-grid.three {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .form-grid .field.wide {
    grid-column: auto;
  }
  .form-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cards-grid {
    gap: 11px;
  }
  .format-card,
  .step-card {
    padding: 15px;
  }
  .format-card h3,
  .step-card h3 {
    font-size: 12px;
  }
  .format-card p,
  .step-card p {
    font-size: 10px;
  }
  .help-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .help-card {
    padding: 19px;
  }
  .help-card h3 {
    font-size: 14px;
  }
  .help-card p,
  .help-card li {
    font-size: 11px;
  }
  .notice {
    padding: 11px 13px;
    font-size: 11px;
  }
  .audit-list li {
    display: block;
    padding: 11px 0;
  }
  .audit-list time {
    display: block;
    margin-bottom: 3px;
  }
  .unit-options {
    gap: 9px;
    font-size: 11px;
  }
  .unit-options input {
    width: 64px;
  }
  .board-row {
    grid-template-columns: 24px minmax(0, 1fr) 83px minmax(0, 1fr);
    gap: 5px;
  }
  .board-row input,
  .board-row select {
    padding-left: 5px !important;
    padding-right: 5px !important;
    font-size: 10px !important;
  }
  dialog.modal,
  dialog.modal.wide,
  dialog.modal.small {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 24px);
    border-radius: 13px;
  }
  .dialog-head {
    padding: 17px 17px;
  }
  .dialog-head h2 {
    font-size: 17px;
  }
  .dialog-body {
    padding: 19px 17px;
  }
  .dialog-foot {
    padding: 14px 17px;
    flex-wrap: wrap;
  }
  .dialog-foot .muted {
    flex-basis: 100%;
  }
  .dialog-body .cards-grid {
    gap: 10px;
  }
  .dialog-body .format-card {
    padding: 13px;
  }
  .toast-wrap {
    right: 15px;
    bottom: 16px;
  }
  .toast {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
@media print {
  @page {
    size: A4;
    margin: 16mm 12mm;
  }
  :root {
    color-scheme: light;
  }
  html,
  body {
    min-width: 0;
    margin: 0;
    padding: 0;
    background: #fff !important;
    color: #000 !important;
    font-size: 10pt;
  }
  #app,
  .app-shell,
  .sidebar,
  .topbar,
  dialog,
  .toast-wrap,
  .skip-link,
  button,
  .no-print {
    display: none !important;
  }
  #print-root {
    display: block !important;
    color: #000;
    background: #fff;
  }
  #print-root h1 {
    margin: 0 0 8mm;
    color: #000;
    font-size: 19pt;
    text-align: center;
    letter-spacing: 0;
  }
  #print-root h2 {
    margin: 6mm 0 3mm;
    color: #000;
    font-size: 13pt;
  }
  #print-root h3 {
    margin: 5mm 0 3mm;
    color: #000;
    font-size: 11pt;
  }
  #print-root p {
    margin: 0 0 4mm;
    color: #333;
    font-size: 9pt;
  }
  #print-root table {
    width: 100%;
    border-collapse: collapse;
    font-size: 9pt;
  }
  #print-root th,
  #print-root td {
    border: 1px solid #999;
    padding: 2.2mm 2.5mm;
    color: #000;
    background: #fff;
  }
  #print-root th {
    font-weight: 700;
    font-size: 8.5pt;
    white-space: normal;
  }
  #print-root thead {
    display: table-header-group;
  }
  #print-root tr,
  #print-root .print-card {
    break-inside: avoid;
  }
  #print-root .muted {
    color: #555;
  }
  #print-root .print-meta {
    text-align: center;
    margin-bottom: 6mm;
    color: #555;
    font-size: 9pt;
  }
  #print-root .print-footer {
    margin-top: 7mm;
    padding-top: 3mm;
    border-top: 1px solid #aaa;
    font-size: 8pt;
    color: #555;
  }
  #print-root .print-card {
    border: 1px solid #777;
    padding: 6mm;
    margin: 0 0 5mm;
  }
  #print-root .page-break {
    break-before: page;
  }
  #print-root a {
    color: #000;
    text-decoration: none;
  }
}

/* Concrete workbench components shared by the application views. */
.brand-name > span {
  display: block;
  margin-top: 6px;
  color: #9b9fa5;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 1.35px;
  line-height: 1.5;
}
.nav-count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  margin-left: auto;
  padding: 0 5px;
  border-radius: 5px;
  background: #ffffff0b;
  color: inherit;
  font-size: 11px;
  line-height: 1;
}
.sidebar-status {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 11px;
  color: #c2c9c5;
  font-size: 11px;
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #82b496;
  box-shadow: 0 0 0 3px #82b4960d;
}
.sidebar-link {
  display: block;
  margin-top: 10px;
  font-size: 11px;
}
.demo-banner {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-wrap: wrap;
  padding: 10px 14px;
  margin: -4px 0 24px;
  border: 1px solid #e4c57860;
  border-radius: 9px;
  background: var(--gold-soft);
  color: var(--gold-dark);
  font-size: 12px;
}
.demo-banner > .button {
  margin-left: auto;
  color: var(--gold-dark);
}
.demo-banner > .badge {
  background: var(--surface);
}
.page-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}
.hero-kicker {
  margin-bottom: 11px;
  color: #9e8246;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2.1px;
  line-height: 1.3;
}
.button.hero-link {
  border-color: transparent;
  color: #8a703c;
  background: transparent;
  box-shadow: none;
}
.button.hero-link:hover {
  color: #574219;
  background: #b88a2520;
}
.hero-art::before,
.hero-art::after {
  display: none;
}
.hero-art {
  border: 0;
  background: none;
  opacity: 0.85;
  overflow: visible;
}
.hero-board {
  position: relative;
  width: 100%;
  height: 100%;
  border: 1px solid #aa843b3b;
  border-radius: 50%;
  background-image:
    linear-gradient(#b0883a30 1px, transparent 1px),
    linear-gradient(90deg, #b0883a30 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: center;
}
.hero-piece {
  position: absolute;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 2px solid #b98d45;
  outline: 1px solid #b98d45;
  outline-offset: -7px;
  border-radius: 50%;
  background: #f8e9c5;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 36px;
  line-height: 1;
  box-shadow: 3px 7px 0 #9e772527;
}
.hero-piece.red {
  top: 47px;
  left: 43px;
  color: #ad5546;
  transform: rotate(3deg);
}
.hero-piece.black {
  top: 123px;
  left: 126px;
  color: #4b5146;
  background: #eee0bd;
  transform: rotate(8deg);
}
.hero-piece.small-piece {
  top: 150px;
  left: 12px;
  width: 47px;
  height: 47px;
  font-size: 23px;
  outline-offset: -5px;
  color: #9d634b;
  opacity: 0.5;
  transform: rotate(-4deg);
}
.stat-label,
.stat-note {
  display: block;
}
.stat-value.status-value {
  font-size: 26px;
  letter-spacing: -0.6px;
}
.panel-head > div > p {
  margin: 5px 0 0;
  font-size: 11px;
}
.step-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.step-list .step-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 15px 16px;
  background: var(--surface-soft);
  color: var(--ink);
}
.step-list .step-card:hover {
  border-color: #d3b66d;
  background: var(--gold-soft);
}
.step-list .step-card > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}
.step-list .step-card strong {
  font-size: 12px;
  font-weight: 600;
}
.step-list .step-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}
.step-list .step-card > svg {
  width: 15px;
  height: 15px;
  color: var(--faint);
}
.step-number {
  flex-shrink: 0;
}
.step-number.done {
  background: var(--green-soft);
  color: var(--green);
}
.step-number.done svg {
  width: 14px;
  height: 14px;
}
.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 24px 0 9px;
  color: var(--muted);
  font-size: 11px;
}
.progress-meta strong {
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
}
.leader-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.leader-row:first-child {
  padding-top: 0;
}
.leader-row:last-child {
  padding-bottom: 0;
  border: 0;
}
.leader-row .rank-number {
  flex-shrink: 0;
  min-width: 20px;
  font-size: 11px;
}
.leader-name {
  flex: 1;
  min-width: 0;
}
.leader-name strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}
.leader-name small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}
.leader-score {
  flex-shrink: 0;
  color: var(--ink);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}
.leader-score small {
  margin-left: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 400;
}
.rank-number.top-rank {
  background: var(--gold-soft);
  color: var(--gold-dark);
  font-weight: 700;
}
.cell-sub {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}
.align-right {
  text-align: right;
}
.actions.end {
  justify-content: flex-end;
}
.score-column {
  text-align: center;
}
td.score-column {
  color: var(--gold-dark);
  background: color-mix(in srgb, var(--gold-soft) 40%, transparent);
}
.score-column strong {
  font-size: 14px;
}
.table-label {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 650;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.table-label small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
}
.color-dot {
  display: block;
  width: 6px;
  height: 6px;
  margin: 0 auto 10px;
  border-radius: 50%;
}
.red-dot {
  background: var(--red);
  box-shadow: 0 0 0 3px var(--red-soft);
}
.black-dot {
  background: #575f69;
  box-shadow: 0 0 0 3px var(--surface-hover);
}
.red-player .text-link {
  color: var(--red);
}
.black-player .text-link {
  color: var(--ink);
}
.match-grid > .empty-state {
  grid-column: 1 / -1;
}
.panel > .match-grid {
  padding: 20px 22px 22px;
}
.match-card.scored .match-head {
  background: color-mix(in srgb, var(--green-soft) 40%, var(--surface));
}
.result-buttons > .red-result.selected {
  color: var(--red);
  border-color: #d9a198;
  background: var(--red-soft);
}
.team-score {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 0 17px 17px;
  color: var(--muted);
  font-size: 11px;
}
.inline-notice {
  margin-top: 16px;
  margin-bottom: 0;
}
.form-section {
  padding-bottom: 26px;
  margin-bottom: 25px;
  border-bottom: 1px solid var(--line);
}
.form-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}
.form-section > h3 {
  margin-bottom: 17px;
  font-size: 15px;
}
.form-section > p.muted {
  margin-top: -5px;
  margin-bottom: 18px;
  font-size: 12px;
}
.form-section > .split {
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 13px;
}
.form-section > .split .field {
  min-width: 160px;
  max-width: 260px;
}
.rule-fieldset,
.modal fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.rule-fieldset[disabled] {
  opacity: 0.72;
}
.rule-fieldset[disabled] input:disabled,
.rule-fieldset[disabled] select:disabled,
.rule-fieldset[disabled] textarea:disabled {
  opacity: 0.8;
}
.team-board-list {
  display: flex;
  flex-direction: column;
  gap: 17px;
}
.team-board {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
}
.team-board h3 {
  margin-bottom: 0;
  font-size: 13px;
}
.team-board > .split {
  margin-bottom: 16px;
}
.pairing-editor > .board-row {
  grid-template-columns: 42px minmax(0, 1fr) minmax(0, 1fr);
  gap: 13px;
  align-items: end;
  padding: 14px 0;
}
.pairing-editor > .board-row > strong {
  padding-bottom: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}
.pairing-editor .field {
  gap: 5px;
}
.detail-hero {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
}
.detail-hero > div {
  flex: 1;
  min-width: 0;
}
.detail-hero h3 {
  margin-bottom: 5px;
  font-size: 19px;
}
.detail-hero p {
  margin-bottom: 0;
  font-size: 11px;
}
.detail-hero .badge {
  font-size: 13px;
  padding: 7px 11px;
}
.large-avatar {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  font-size: 23px;
}
.source-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 20px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}
.source-links li {
  margin: 0;
  padding: 0;
}
.source-links a {
  display: block;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--gold-dark);
  background: var(--surface-soft);
  font-size: 11px;
}
.source-links a:hover {
  border-color: #d3b66d;
  text-decoration: none;
  background: var(--gold-soft);
}
.audit-list > div {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.audit-list > div:first-child {
  padding-top: 0;
}
.audit-list > div:last-child {
  padding-bottom: 0;
  border: 0;
}
.audit-list > div > span {
  overflow-wrap: anywhere;
}
.help-number {
  display: inline-grid;
  place-items: center;
  width: 31px;
  height: 31px;
  margin-bottom: 15px;
  border: 1px solid #d5bc783d;
  border-radius: 9px;
  color: var(--gold-dark);
  background: var(--gold-soft);
  font-size: 12px;
  font-weight: 650;
}
.help-card h2 {
  font-size: 17px;
}
.help-card dl {
  margin: 16px 0;
  padding: 15px;
  background: var(--surface-soft);
  border-radius: 9px;
}
.help-card dt {
  margin-bottom: 3px;
  font-size: 12px;
  font-weight: 600;
}
.help-card dd {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.75;
}
.help-card dd:last-child {
  margin-bottom: 0;
}
dialog.modal.compact {
  width: min(460px, calc(100vw - 32px));
}
.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  gap: 19px;
  padding: 30px;
  text-align: center;
}
.loading-screen h1 {
  margin-bottom: 0;
  font-size: 26px;
}
.loading-screen p,
.loading-screen noscript {
  color: var(--muted);
  font-size: 13px;
}
.loading-screen .brand-mark {
  width: 56px;
  height: 56px;
  margin-bottom: 5px;
  border-color: #bb8d33;
  color: #ac7e25;
  font-size: 32px;
}
.big-empty {
  padding: 74px 28px;
}
.big-empty > .brand-mark {
  width: 65px;
  height: 65px;
  margin: 0 auto 28px;
  border-color: #c6a35c;
  color: #a77925;
  font-size: 35px;
}
.big-empty h1 {
  font-size: clamp(25px, 4vw, 35px);
}
.button.danger-text,
.danger-text {
  color: var(--red);
}
.button.icon-button {
  min-height: 35px;
  width: 35px;
  padding: 0;
}
.button.icon-button.small {
  min-height: 27px;
  height: 27px;
  width: 27px;
}
.button.icon-button svg {
  width: 16px;
  height: 16px;
}
[data-theme="dark"] .demo-banner {
  border-color: #88713b60;
}
[data-theme="dark"] .hero-kicker {
  color: #c3a464;
}
[data-theme="dark"] .button.hero-link {
  color: #d2b776;
}
[data-theme="dark"] .button.hero-link:hover {
  background: #c5a7591c;
}
[data-theme="dark"] .hero-piece {
  box-shadow: 4px 7px 0 #00000035;
}

@media screen and (max-width: 760px) {
  .brand-name > span {
    display: inline;
    margin: 0;
    font-size: 10px;
  }
  .nav-count {
    min-width: 18px;
    height: 18px;
    font-size: 12px;
  }
  .nav-item {
    font-size: 12px;
  }
  .demo-banner {
    margin-bottom: 21px;
    padding: 10px 12px;
    gap: 8px;
    font-size: 12px;
  }
  .demo-banner > span:not(.badge) {
    flex: 1;
    min-width: 160px;
  }
  .demo-banner .button {
    margin-left: 0;
    font-size: 12px;
  }
  .page-footer {
    margin-top: 29px;
    padding-top: 17px;
    font-size: 12px;
    gap: 8px 16px;
  }
  .page-footer .save-status {
    flex-basis: 100%;
    order: 1;
    font-size: 12px;
    white-space: normal;
  }
  .hero-kicker {
    font-size: 11px;
    letter-spacing: 1.6px;
  }
  .hero-piece {
    width: 63px;
    height: 63px;
    font-size: 31px;
  }
  .hero-piece.black {
    top: 115px;
    left: 117px;
  }
  .hero-piece.small-piece {
    top: 146px;
    left: 15px;
    width: 43px;
    height: 43px;
    font-size: 22px;
  }
  .step-list .step-card strong {
    font-size: 13px;
  }
  .step-list .step-card small {
    font-size: 12px;
  }
  .leader-name strong {
    font-size: 13px;
  }
  .leader-name small,
  .leader-score small,
  .leader-row .rank-number,
  .cell-sub,
  .progress-meta,
  .progress-meta strong {
    font-size: 12px;
  }
  .hero-copy p,
  .panel-head > div > p,
  .panel-head .muted,
  .panel-head .button,
  .panel-head .actions .button,
  .page-head .muted,
  .stat-label,
  .stat-note,
  .stat-value small,
  .page-head .button,
  .eyebrow,
  .button.small,
  button.small,
  .badge,
  .pill,
  .top-actions .button,
  .top-actions select,
  .breadcrumb,
  .round-tab,
  .round-tab small,
  .match-head,
  .match-head strong,
  .table-label small,
  .match-player small,
  .match-foot,
  .match-foot .button,
  .team-score,
  .match-foot select,
  .result-buttons > button,
  .table-footer,
  th,
  td small,
  td .muted,
  .unit-options,
  .rank-number,
  .field small,
  .check-field,
  .check-field small,
  .field label,
  .field > span:first-child,
  .segmented button,
  .tiebreak-row,
  .tiebreak-row .muted,
  .tiebreak-row > .number,
  .form-section > p.muted,
  .help-card p,
  .help-card li,
  .help-card dt,
  .help-card dd,
  .notice,
  .dialog-body .notice,
  .dialog-foot .muted,
  .source-links a,
  .detail-hero p,
  .audit-list time,
  .audit-list .muted,
  .empty-state p,
  .format-card p,
  .step-card p,
  .format-card h3,
  .step-card h3,
  .toast,
  .timeline-item small,
  summary {
    font-size: 12px;
  }
  .button.icon-button {
    min-height: 33px;
    width: 33px;
    height: 33px;
  }
  .button.icon-button.small {
    min-height: 29px;
    width: 29px;
    height: 29px;
  }
  .panel > .match-grid {
    padding: 17px 17px 20px;
  }
  .team-board {
    padding: 16px;
  }
  .team-board h3 {
    font-size: 13px;
  }
  .pairing-editor > .board-row {
    grid-template-columns: 38px minmax(0, 1fr) minmax(0, 1fr);
    gap: 9px;
  }
  .pairing-editor > .board-row > strong {
    font-size: 12px;
  }
  .pairing-editor .board-row select {
    font-size: 12px !important;
  }
}
@media screen and (max-width: 540px) {
  .brand-name {
    gap: 8px;
  }
  .brand-name > span {
    font-size: 9px;
    letter-spacing: 0.8px;
  }
  .nav-item {
    padding-left: 10px;
    padding-right: 10px;
    font-size: 12px;
  }
  .nav-count {
    font-size: 12px;
  }
  .hero-kicker {
    font-size: 10px;
  }
  .hero-copy {
    max-width: 90%;
  }
  .hero-copy h2 {
    font-size: 21px;
    line-height: 1.5;
  }
  .hero-art {
    right: -71px;
    opacity: 0.3;
  }
  .hero-copy .actions {
    gap: 5px;
  }
  .hero-copy .actions .button {
    font-size: 12px;
    min-height: 36px;
  }
  .hero-copy .actions .hero-link {
    padding-left: 6px;
    padding-right: 6px;
  }
  .stat {
    padding: 15px 13px;
  }
  .stat-value.status-value {
    font-size: 24px;
  }
  .stat-label {
    margin-bottom: 8px;
  }
  .stat-note {
    line-height: 1.7;
  }
  .demo-banner .button {
    padding: 5px 0;
    min-height: 29px;
    margin-left: 0;
  }
  .demo-banner > span:not(.badge) {
    min-width: 160px;
  }
  .page-head .button,
  .toolbar .button {
    min-height: 35px;
    font-size: 12px;
  }
  .step-list .step-card {
    padding: 13px 12px;
    gap: 10px;
  }
  .step-list .step-card strong {
    font-size: 13px;
  }
  .leader-row {
    gap: 9px;
  }
  .source-links {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .source-links a {
    font-size: 12px;
  }
  .detail-hero {
    gap: 11px;
    margin-bottom: 20px;
  }
  .detail-hero h3 {
    font-size: 17px;
  }
  .detail-hero p {
    font-size: 12px;
  }
  .large-avatar {
    width: 43px;
    height: 43px;
    font-size: 20px;
  }
  .detail-hero .badge {
    font-size: 12px;
    padding: 5px 7px;
  }
  .audit-list > div {
    display: block;
    padding: 11px 0;
  }
  .audit-list > div time {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
  }
  .audit-list > div > span {
    font-size: 12px;
  }
  .form-section {
    padding-bottom: 22px;
    margin-bottom: 23px;
  }
  .form-section > h3 {
    font-size: 15px;
  }
  .form-section > .split .field {
    width: 100%;
    max-width: none;
  }
  .team-board {
    padding: 15px 13px;
  }
  .team-board > .split {
    gap: 9px;
  }
  .pairing-editor > .board-row {
    grid-template-columns: 28px minmax(0, 1fr) minmax(0, 1fr);
    gap: 7px;
  }
  .pairing-editor > .board-row > strong {
    padding-bottom: 8px;
    font-size: 12px;
  }
  .pairing-editor .board-row select {
    min-height: 38px !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
  }
  .pairing-editor .field label,
  .pairing-editor .field > span:first-child {
    font-size: 12px;
  }
  .panel > .match-grid {
    padding: 15px 13px 18px;
  }
  .panel-head {
    flex-wrap: wrap;
  }
  .panel-head > .actions {
    justify-content: flex-start;
  }
  .round-tab {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
    padding: 7px 11px;
  }
  .round-tab small {
    font-size: 12px;
    font-weight: 400;
  }
  .round-tab.complete::after {
    position: absolute;
    right: 7px;
    top: 8px;
  }
  .match-foot .button {
    min-height: 30px;
    font-size: 12px;
  }
  .match-foot,
  .match-foot .muted {
    font-size: 12px;
  }
  .button.icon-button {
    min-height: 33px;
    width: 33px;
    height: 33px;
  }
  .big-empty {
    padding: 50px 19px;
  }
  .big-empty .actions {
    gap: 9px;
  }
  .big-empty .button {
    font-size: 12px;
  }
  dialog.modal.compact {
    width: calc(100vw - 20px);
  }
  .dialog-head h2 {
    font-size: 17px;
  }
  .dialog-foot .button {
    min-height: 38px;
    font-size: 12px;
  }
  table {
    font-size: 12px;
  }
  .help-card li,
  .help-card p {
    line-height: 1.9;
  }
}

/* Compact rules, readable touch controls and per-field explanations. */
[hidden] {
  display: none !important;
}
.form-section {
  margin-bottom: 18px;
  padding-bottom: 18px;
}
.form-section > h3 {
  margin-bottom: 12px;
}
.form-section h4 {
  margin: 16px 0 10px;
  font-size: 13px;
}
.form-grid {
  gap: 12px 14px;
}
.form-grid > div {
  min-width: 0;
}
.form-grid.compact-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.form-grid.score-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 12px;
}
.field {
  gap: 5px;
}
.field-label,
.section-heading {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
}
.field-label label {
  min-width: 0;
  line-height: 1.4;
}
.section-heading {
  margin-bottom: 8px;
}
.section-heading h3 {
  margin: 0;
}
.field input,
.field select {
  min-width: 0;
  width: 100%;
  min-height: 40px;
}
.score-group-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin: 10px 0 5px;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 40px;
  margin-bottom: 8px;
}
.check-row .check-field {
  margin: 0;
  padding: 5px 0;
  min-height: 36px;
  display: flex;
  align-items: center;
  flex: 0 1 auto;
}
.check-row .check-field input {
  flex: 0 0 auto;
}
.check-row .check-field span {
  line-height: 1.45;
}
.help-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  vertical-align: middle;
  cursor: pointer;
}
.help-button:hover,
.help-button[aria-expanded="true"] {
  color: var(--ink);
  border-color: var(--accent);
  background: var(--surface-hover);
}
.help-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.term-help {
  position: fixed;
  z-index: 1000;
  inset: auto;
  margin: 0;
  width: min(340px, calc(100vw - 24px));
  max-height: min(320px, 60vh);
  overflow-y: auto;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.7;
  box-shadow: 0 8px 30px #0003;
  overflow-wrap: anywhere;
  white-space: pre-line;
}
.numeric-range {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
[aria-invalid="true"] {
  border-color: var(--danger, #c33);
}
.series-stage-row,
.game-stage {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 12px;
  margin: 10px 0;
}
.game-stage > summary {
  cursor: pointer;
  min-height: 30px;
  font-weight: 600;
}
.series-stage-options,
.game-series-score {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.series-stage-options {
  margin-top: 10px;
}
.series-stage-options > .button {
  margin-left: auto;
}
.series-settings h4 {
  margin: 14px 0 8px;
}
.series-game-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding: 12px 0;
}
.series-game-label {
  display: grid;
  gap: 4px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.series-game-label > span {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  font-size: 13px;
}
.game-note {
  grid-column: 1 / -1;
  font-size: 12px;
}
.game-note summary {
  color: var(--muted);
  cursor: pointer;
  min-height: 28px;
}
.game-note textarea {
  min-height: 65px;
  margin-top: 6px;
}
.game-series-score {
  justify-content: space-between;
  font-size: 13px;
  margin-top: 12px;
}
.match-note-button {
  padding: 7px;
  min-width: 34px;
}
.match-note-button.has-note {
  color: var(--gold-dark);
  background: var(--gold-soft);
}
.cut-schedule-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 40px;
  gap: 10px;
  align-items: start;
  margin: 10px 0;
}
.cut-schedule-row > .button {
  margin-top: 24px;
  padding: 0;
}
.cut-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}
.round-management .advanced-settings {
  margin-top: 0;
}
.round-management > .notice {
  margin-bottom: 10px;
}
@media (max-width: 480px) {
  .series-game-row {
    grid-template-columns: minmax(0, 1fr) 104px;
  }
  .cut-choices {
    grid-template-columns: 1fr;
  }
  .series-stage-options {
    gap: 8px;
  }
  .series-stage-row {
    padding: 10px;
  }
}
.term-help::backdrop {
  background: transparent;
}
.advanced-settings {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.advanced-settings summary,
.help-card summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  min-height: 28px;
  padding-top: 3px;
}
.advanced-settings[open] summary {
  margin-bottom: 10px;
}
.advanced-settings .button {
  align-self: end;
  min-height: 40px;
}
.event-details-settings {
  margin-top: 16px;
}
.event-details-settings > summary {
  min-height: 32px;
}
.event-details-grid {
  gap: 12px;
}
.event-details-grid .detail-wide {
  grid-column: 1 / -1;
}
.event-details-settings textarea {
  min-height: 72px;
  resize: vertical;
  line-height: 1.6;
}
.event-details-settings textarea[name="detail-regulations"] {
  min-height: 120px;
}
.event-details-settings h4 {
  margin: 18px 0 8px;
}
.detail-hint {
  margin: 4px 0 12px;
  font-size: 12px;
}
.custom-detail-row {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) minmax(0, 2fr) 40px;
  align-items: start;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.custom-detail-row > .button {
  align-self: start;
  margin-top: 25px;
  padding: 0;
  min-width: 40px;
}
.custom-detail-row .field {
  min-width: 0;
}
.event-info-panel .panel-head {
  flex-wrap: wrap;
  gap: 8px;
}
.event-info-disclosure {
  padding: 12px 22px;
}
.event-info-disclosure > summary {
  cursor: pointer;
  min-height: 32px;
  font-size: 13px;
  color: var(--muted);
}
.event-details-list {
  margin: 0;
  overflow-wrap: anywhere;
}
.event-details-list > div {
  display: grid;
  grid-template-columns: minmax(90px, 140px) minmax(0, 1fr);
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.event-details-list dt {
  font-weight: 600;
}
.event-details-list dd {
  margin: 0;
  white-space: pre-wrap;
}
.print-time-control {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
@media (max-width: 600px) {
  .event-details-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .custom-detail-row {
    grid-template-columns: minmax(0, 1fr) 40px;
  }
  .custom-detail-row > .field:nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .custom-detail-row > .button {
    grid-column: 2;
    grid-row: 1;
  }
  .event-info-disclosure {
    padding: 10px 14px;
  }
  .event-details-list > div {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}
@media print {
  .event-details-list > div {
    display: block;
    padding: 8px 0;
    border-color: #ccc;
  }
  .event-details-list dt {
    break-after: avoid;
    margin-bottom: 4px;
  }
}
.tiebreak-list {
  counter-reset: tie-order;
}
.tiebreak-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 5px 8px;
  margin-bottom: 6px;
}
.tiebreak-row .tie-order::before {
  counter-increment: tie-order;
  content: counter(tie-order);
}
.tiebreak-row .tie-order {
  flex: 0 0 20px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  text-align: center;
}
.tiebreak-row > strong {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  min-width: 0;
}
.tiebreak-row .actions {
  margin-left: auto;
  gap: 3px;
  flex-shrink: 0;
}
.tiebreak-row .actions .button {
  padding: 0;
  width: 36px;
  height: 36px;
  min-height: 36px;
  font-size: 16px;
}
.tie-add-row {
  display: flex;
  gap: 8px;
}
.tie-add-row select {
  min-width: 0;
  flex: 1;
  min-height: 40px;
}
.tie-add-row .button {
  min-height: 40px;
  padding-inline: 16px;
}
.import-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  margin: 12px 0 5px;
}
.import-toolbar > .field {
  flex: 1;
  min-width: 180px;
}
#roster-preview {
  margin-top: 10px;
}
#roster-preview .table-wrap {
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}
#roster-preview table {
  min-width: 340px;
}
#roster-preview th,
#roster-preview td {
  padding: 7px 10px;
}
#roster-encoding-status:empty {
  display: none;
}
.help-card details {
  margin-top: 14px;
}
.help-card dl {
  margin: 10px 0;
}
.help-card dd {
  margin: 3px 0 12px;
}
@media (max-width: 740px) {
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
  }
  .form-grid.compact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .form-grid.score-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .form-grid > .wide,
  .form-grid .field.wide {
    grid-column: 1 / -1;
  }
  .form-section {
    padding-bottom: 16px;
    margin-bottom: 16px;
  }
  .field input,
  .field select {
    padding: 8px 10px;
    min-height: 42px;
    font-size: 14px;
  }
  .field-label label {
    font-size: 13px;
  }
  .form-grid > .check-row {
    grid-column: 1 / -1;
  }
  .help-button {
    flex-basis: 30px;
    width: 30px;
    height: 30px;
    min-height: 30px;
  }
  .tiebreak-row {
    gap: 5px;
    padding-inline: 5px;
  }
  .tiebreak-row .tie-order {
    flex-basis: 18px;
  }
  .tiebreak-row .actions .button {
    width: 38px;
    min-height: 38px;
    height: 38px;
  }
  .tie-add-row select {
    max-width: calc(100% - 70px);
  }
  .team-board .form-grid > .field:last-child {
    grid-column: 1 / -1;
  }
  .import-toolbar > .field {
    flex-basis: 100%;
  }
}
@media (max-width: 380px) {
  .tiebreak-row {
    flex-wrap: wrap;
  }
  .tiebreak-row > strong {
    flex: 1;
  }
  .tiebreak-row .actions {
    margin-left: auto;
  }
  .tiebreak-row .help-button {
    margin-left: auto;
  }
}
@media print {
  .help-button,
  .term-help {
    display: none !important;
  }
}

/* Compact, persistent language selection. */
.top-actions #language-select {
  flex: 0 1 116px;
  width: 116px;
  min-width: 90px;
  font-size: 12px;
}
@media (max-width: 600px) {
  .top-actions #language-select {
    flex: 0 0 92px;
    width: 92px;
    min-width: 92px;
    padding-inline: 7px;
    font-size: 11px;
  }
  .top-actions #event-select {
    width: 0;
    flex: 1 1 90px;
  }
}

/* Series formats keep numeric entry compact while allowing translated labels to wrap. */
.worlds-rules-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 14px;
}
.worlds-rules-grid > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  border-radius: 8px;
}
.worlds-rules-grid strong {
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}
.worlds-rules-grid span {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.form-grid.series-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.series-fields .field-label {
  min-height: 36px;
  align-items: start;
}
.series-fields .field-label label {
  overflow-wrap: anywhere;
}
.series-fields input {
  min-height: 48px;
  font-size: 20px;
  font-weight: 600;
  text-align: center;
}
.series-format {
  margin: 0 0 14px;
  color: var(--muted);
}
.series-format strong {
  color: var(--ink);
}
.series-score {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-size: 22px;
}
.qualified-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.qualified-player {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 11px;
  font-size: 13px;
}
.qualified-player small {
  color: var(--muted);
  white-space: nowrap;
}
@media (max-width: 740px) {
  .worlds-rules-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .worlds-rules-grid > div {
    padding: 10px;
  }
  .series-score {
    font-size: 19px;
  }
}

.plan-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 13px;
}
.plan-metrics span {
  white-space: nowrap;
}
.plan-metrics strong {
  margin-left: 6px;
  color: var(--ink);
}
#worlds-plan ul {
  margin: 6px 0 0;
  padding-left: 18px;
}
.double-round-controls {
  padding-top: 0;
  padding-bottom: 0;
}
.double-round-controls .advanced-settings {
  margin-top: 0;
  margin-bottom: 12px;
}
.double-round-controls .button {
  align-self: end;
}
.double-pair-row {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.double-pair-row:first-child {
  padding-top: 0;
}
.double-pair-row:last-child {
  border-bottom: 0;
}
.double-pair-row .section-heading {
  margin-bottom: 6px;
}
@media (max-width: 740px) {
  .worlds-counts .field-label label {
    font-size: 12px;
  }
}

/* Short, ordered guide with optional detail. */
.help-flow {
  margin: 0 0 20px;
  padding: 15px 18px;
  border: 1px solid var(--gold);
  border-radius: 12px;
  background: var(--gold-soft);
}
.help-flow ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.help-flow li {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
}
.help-flow a {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.45;
}
.help-flow a:hover strong {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.help-flow a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 5px;
}
.help-flow-number {
  display: inline-grid;
  place-items: center;
  flex: 0 0 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gold);
  color: #362907;
  font-size: 12px;
  font-weight: 700;
}
.help-flow-arrow {
  color: var(--gold-dark);
  font-size: 20px;
}
.help-guide {
  align-items: start;
  gap: 14px;
}
.help-guide .help-card {
  min-width: 0;
  padding: 18px 20px;
  scroll-margin-top: 20px;
}
.help-guide h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  line-height: 1.4;
}
.help-guide .help-number {
  flex: 0 0 25px;
  height: 25px;
  width: 25px;
  margin: 0;
  border-radius: 7px;
}
.help-guide .help-card > p {
  margin: 0;
  font-size: 13px;
  line-height: 1.75;
  color: var(--ink);
}
.help-guide .help-card details {
  margin-top: 11px;
  padding-top: 9px;
}
.help-guide .help-card summary {
  min-height: 32px;
  line-height: 1.6;
}
.help-guide .help-card .actions {
  margin-top: 12px;
}
.help-guide .help-card:target {
  border-color: var(--gold);
}
@media (max-width: 740px) {
  .help-flow {
    padding: 10px 12px;
    margin-bottom: 14px;
  }
  .help-flow ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 10px;
  }
  .help-flow li:nth-child(2) .help-flow-arrow {
    display: none;
  }
  .help-flow a {
    font-size: 13px;
    gap: 7px;
  }
  .help-flow-arrow {
    font-size: 17px;
  }
  .help-guide .help-card {
    padding: 16px;
  }
  .help-guide .help-card > p {
    font-size: 13px;
  }
}

/* Official logo and a single localized product name. */
.brand-logo { display: block; flex: 0 0 auto; width: 42px; height: 42px; object-fit: contain; border-radius: 8px; }
.brand .brand-name { font-size: 15px; line-height: 1.4; letter-spacing: 0; min-width: 0; }
.loading-screen > .brand-logo, .big-empty > .brand-logo { width: 64px; height: 64px; margin: 0 auto 22px; border-radius: 12px; }
@media (max-width: 760px) { .brand .brand-logo { width: 34px; height: 34px; } .brand .brand-name { font-size: 15px; } }

/* Keep the five daily controls visible on phones; secondary pages open below. */
.nav-more {
  display: none;
}
@media (max-width: 760px) {
  .sidebar .workbench-nav {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    margin: 0;
    padding: 0 0 8px;
    overflow: visible;
  }
  .workbench-nav > .nav-desktop-extra {
    display: none;
  }
  .workbench-nav .nav-item {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    height: 100%;
    padding: 8px 5px;
    gap: 4px;
    border-radius: 7px;
    font-size: 12px;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
  }
  .workbench-nav .nav-item > span {
    min-width: 0;
  }
  .workbench-nav .nav-count {
    flex-shrink: 0;
    margin-left: 0;
  }
  .workbench-nav .nav-more {
    display: block;
    min-width: 0;
    border: 0;
    margin: 0;
    padding: 0;
  }
  .workbench-nav .nav-more > summary {
    cursor: pointer;
    list-style: none;
    margin: 0;
  }
  .nav-more > summary::-webkit-details-marker {
    display: none;
  }
  .workbench-nav .nav-more-chevron {
    display: block;
    flex-shrink: 0;
    width: 14px;
    height: 14px;
  }
  .nav-more[open] .nav-more-chevron {
    transform: rotate(180deg);
  }
  .nav-more > summary:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
  }
  .nav-more-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    padding: 8px;
    border: 1px solid #ffffff24;
    border-radius: 9px;
    background: var(--sidebar);
    box-shadow: 0 8px 20px #00000030;
  }
}
