:root {
  color-scheme: light;
  --bf-red: #009fe3;
  --bf-ink: #1a1a1a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Georgia, "Iowan Old Style", serif;
  color: var(--bf-ink);
  background: #f6f6f6;
}

.page {
  max-width: min(42rem, 100%);
  margin: 0 auto;
  padding: 3rem 1.25rem 6rem;
  background: white;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: clip;
}

html:has(.automation),
html:has(.automation) body {
  height: 100%;
  overflow: hidden;
}

.page:has(.automation) {
  height: 100dvh;
  min-height: 0;
  overflow: auto;
  padding-top: 1.25rem;
  padding-bottom: 1.5rem;
}

.kicker {
  font-family: system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
  background-image: linear-gradient(90deg, #7ec8e8, #009fe3);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h1 { font-size: 2.2rem; line-height: 1.15; }

.page p { font-size: 1.125rem; line-height: 1.55; }

.page section { margin-top: 2.5rem; }
.page section h2 { margin-bottom: 0.3rem; }

.details { font-family: system-ui, sans-serif; margin: 0; }
.details div { display: grid; grid-template-columns: 7rem 1fr; gap: 0.5rem; padding: 0.35rem 0; }
.details dt { color: #5c5c5c; }
.details dd { margin: 0; word-break: break-all; }

.nav, .row, .form {
  font-family: system-ui, sans-serif;
}

.nav {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav a, .nav button, .row a, .row button, .form button {
  font: inherit;
  color: #05384a;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  width: 100%;
  max-width: min(28rem, 100%);
  min-width: 0;
}

.form .terms {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  font-size: 0.95rem;
  line-height: 1.45;
}

.form .terms label {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.6rem;
}

.form .terms input {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0.2rem 0 0;
  padding: 0;
  flex: none;
}

.form .terms a { color: #0b4f73; }

.terms-page h2 {
  margin: 1.6rem 0 0.4rem;
  font-size: 1.25rem;
}

.terms-page p { line-height: 1.5; }

.shared-chat h2 {
  margin: 1.4rem 0 0.3rem;
  font-size: 0.95rem;
}

.shared-chat p {
  white-space: pre-wrap;
  line-height: 1.5;
}

.form input, .form select, .form textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: 0.25rem;
  font: inherit;
  padding: 0.55rem 0.7rem;
  border: 1px solid #e6e6e6;
  border-radius: 0.5rem;
}

.form fieldset {
  min-width: 0;
  border: 0;
  margin: 0;
  padding: 0;
}

.form legend {
  font: inherit;
}

.form .hint {
  margin: 0.25rem 0 0;
  color: #5c5c5c;
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

.example {
  margin: 0.25rem 0 0;
  color: #b7bec4;
  font-size: 0.95rem;
}

.form input[data-release-finder]::placeholder {
  color: #b7bec4;
  opacity: 1;
}

.form input[type="hidden"] { display: none; }

.form .set-matches {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 12rem;
  overflow: auto;
  min-width: 0;
  border: 1px solid #e6e6e6;
  border-radius: 0.5rem;
}

.form .set-matches[hidden] { display: none; }

.form .set-matches button {
  display: block;
  width: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid #f0f0f0;
  padding: 0.55rem 0.7rem;
  background: #fff;
  color: #1a1a1a;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.form .set-matches button[aria-current="true"] { background: #f3f9fc; }

.form .set-matches [data-set-status] {
  padding: 0.55rem 0.7rem;
  color: #5c6b73;
  font-size: 0.85rem;
}

body.bf-account-held .page {
  min-height: 0;
  padding-bottom: 1.5rem;
}

body.bf-account-held .page > :not(.kicker):not(.nav):not(.status) {
  display: none;
}

.form .choices {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 1rem;
  min-width: 0;
}

.form .choices legend,
.form .choices .hint {
  grid-column: 1 / -1;
  min-width: 0;
}

.form .choices label {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  min-width: 0;
  margin-top: 0.35rem;
}

@media (max-width: 520px) {
  .form .choices { grid-template-columns: minmax(0, 1fr); }
}

.form .choices input {
  width: auto;
  margin: 0;
}

.form button, .row button[type="submit"] {
  align-self: flex-start;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  background: linear-gradient(135deg, #ffffff, #009fe3);
}

.oauth-buttons,
.oauth-or,
.oauth-message {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.oauth-buttons {
  display: grid;
  gap: 0.75rem;
  margin: 1.5rem 0 0;
  max-width: 24rem;
}

.oauth-button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  border: 2px solid #0f172a;
  border-radius: 0.5rem;
  background: #fff;
  color: #0f172a;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.oauth-button svg {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.oauth-button:hover,
.oauth-button:focus-visible {
  background: #f8fafc;
}

.oauth-message {
  max-width: 24rem;
  margin: 1rem 0 0;
  padding: 0.75rem;
  border-radius: 0.5rem;
  background: #fef2f2;
  color: #dc2626;
  font-size: 0.875rem;
  line-height: 1.35;
}

.oauth-or {
  max-width: 24rem;
  margin: 1.5rem 0 0.75rem;
  text-align: center;
  color: #475569;
  font-size: 0.875rem;
  line-height: 1.35;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  padding: 0.7rem 0;
  border-bottom: 1px solid #eee;
}

.cms-scroll { overflow-x: auto; }

.cms-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.cms-wide .cms-table { min-width: 720px; }

.cms-table th,
.cms-table td {
  padding: 0.75rem 0.35rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.cms-table th {
  color: #6e6e73;
  font-size: 0.75rem;
  font-weight: 600;
}

.cms-table tr:last-child td { border-bottom: 0; }

.cms-table td:first-child { white-space: nowrap; }

.cms-log td:nth-child(2) {
  white-space: normal;
  overflow-wrap: anywhere;
}

.cms-screen,
.cms-gate {
  --cms-ink: #1d1d1f;
  --cms-muted: #6e6e73;
  --cms-blue: #0071e3;
  --cms-line: rgba(0, 0, 0, 0.08);
  color: var(--cms-ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  background: #f5f5f7;
  -webkit-font-smoothing: antialiased;
}

.cms-screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.cms-bar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1.25rem;
  padding: 0.7rem 1.4rem;
  border-bottom: 1px solid var(--cms-line);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
}

.cms-mark {
  color: var(--cms-ink);
  font-weight: 650;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.cms-nav {
  display: flex;
  gap: 0.15rem;
}

.cms-nav a {
  color: var(--cms-ink);
  text-decoration: none;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.92rem;
}

.cms-nav a.is-current {
  background: var(--cms-ink);
  color: #fff;
}

.cms-bar form { margin-left: auto; }

.cms-bar button {
  font: inherit;
  color: var(--cms-blue);
  background: none;
  border: 0;
  padding: 0;
  white-space: nowrap;
  cursor: pointer;
}

@media (max-width: 640px) {
  .cms-bar { padding: 0.6rem 0.9rem; }
  .cms-nav a { padding: 0.35rem 0.55rem; }
  .cms-main { padding: 1.4rem 0.9rem 3rem; }
}

.cms-main {
  flex: 1;
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 2rem 1.4rem 4rem;
}

.cms-main h1,
.cms-card h2 {
  margin: 0;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.cms-heading p,
.cms-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0 0;
}

.cms-stats dt {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cms-muted);
}

.cms-stats dd {
  margin: 0.35rem 0 0;
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--cms-ink);
}

.cms-stats.is-pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 640px) {
  .cms-stats,
  .cms-stats.is-pair { grid-template-columns: 1fr; }
}

.cms-card-head p,
.cms-empty {
  margin: 0.25rem 0 0;
  color: var(--cms-muted);
}

.cms-main .row {
  margin-top: 0.75rem;
  padding: 1rem 1.1rem;
  border: 0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.04);
}

.cms-action,
.cms-main .form button,
.cms-day button,
.cms-gate .form button {
  display: inline-block;
  border: 0;
  border-radius: 980px;
  padding: 0.55rem 1rem;
  color: #fff;
  background: var(--cms-blue);
  font: inherit;
  font-size: 0.92rem;
  text-decoration: none;
  cursor: pointer;
}

.cms-card {
  margin-top: 1rem;
  padding: 1.25rem 1.3rem 1.1rem;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 32px rgba(0, 0, 0, 0.05);
}

.cms-card + .cms-card { margin-top: 1rem; }

.cms-day {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.75rem;
  margin-top: 1.1rem;
}

.cms-day a {
  color: var(--cms-blue);
  text-decoration: none;
  padding-bottom: 0.45rem;
}

.cms-day label {
  display: grid;
  gap: 0.3rem;
  color: var(--cms-muted);
  font-size: 0.78rem;
}

.cms-day input,
.cms-gate input,
.cms-main .form input,
.cms-main .form textarea,
.cms-main .form select {
  border: 1px solid var(--cms-line);
  border-radius: 12px;
  background: #fff;
  color: var(--cms-ink);
  font: inherit;
}

.cms-chart-scroll { overflow-x: auto; margin-top: 1.1rem; }

.cms-chart {
  display: grid;
  grid-template-columns: repeat(96, minmax(4px, 1fr));
  align-items: end;
  gap: 3px;
  height: 168px;
  min-width: 640px;
}

.cms-chart .cms-bar-mark {
  display: block;
  border-radius: 4px 4px 2px 2px;
  background: var(--cms-blue);
}

.cms-chart .cms-bar-mark.is-empty { background: #e8e8ed; }

.cms-axis {
  display: flex;
  justify-content: space-between;
  min-width: 640px;
  margin-top: 0.45rem;
  color: var(--cms-muted);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.cms-gate {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  margin: 0;
}

.cms-gate .form {
  width: min(24rem, calc(100vw - 2rem));
  margin: 0;
  padding: 2rem 1.8rem 1.6rem;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 18px 50px rgba(0, 0, 0, 0.08);
}

.cms-gate .kicker {
  margin: 0;
  color: var(--cms-muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cms-gate h1 {
  margin: 0.35rem 0 1.1rem;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.row span, .error { display: block; color: #5c5c5c; font-size: 0.85rem; }
.error { color: #9b1c1c; }
.status { color: #05384a; }

.cms-live-list {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
  max-height: 28rem;
  overflow: auto;
}

.cms-live-item {
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--cms-line);
  border-radius: 14px;
  background: #fafafa;
}

.cms-live-item header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.65rem;
  margin-bottom: 0.55rem;
}

.cms-live-nation,
.cms-live-state {
  font-size: 0.78rem;
  font-weight: 600;
}

.cms-live-nation {
  color: var(--cms-muted);
}

.cms-live-state {
  color: #0a5;
}

.cms-live-meta {
  width: 100%;
  color: var(--cms-muted);
  font-size: 0.82rem;
}

.cms-live-thread {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.cms-live-thread li {
  display: grid;
  grid-template-columns: 3.2rem 4.5rem 1fr;
  gap: 0.45rem;
  font-size: 0.88rem;
}

.cms-live-time,
.cms-live-role {
  color: var(--cms-muted);
  font-variant-numeric: tabular-nums;
}

.cms-live-text {
  color: var(--cms-ink);
}
