:root {
  --bg: #f3f4f6;
  --surface: rgba(255, 255, 255, 0.96);
  --surface-strong: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: rgba(15, 23, 42, 0.07);
  --brand: #2f6f44;
  --brand-strong: #234f31;
  --accent: #f59e0b;
  --accent-ink: #1f1f1f;
  --danger: #d92d20;
  --shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

#participant-toggle,
#participant-panel,
[data-action="toggle-participant-panel"] {
  display: none !important;
}

body {
  margin: 0;
  font-family: "Barlow", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #f8fafc 0%, var(--bg) 100%);
  min-height: 100vh;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 0 0 40px;
}

.app-topbar {
  position: relative;
  z-index: 40;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 6px 0 10px;
  min-height: 42px;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-lockup strong,
.brand-lockup small {
  display: block;
}

.brand-lockup small {
  color: var(--muted);
}

.brand-mark {
  display: inline-flex;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #74c365);
  box-shadow: 0 12px 26px rgba(47, 158, 68, 0.28);
}

.avatar-button {
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.avatar-button {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    inset 0 0 0 2px rgba(253, 224, 71, 0.92),
    0 0 0 4px rgba(250, 204, 21, 0.14);
}

.avatar-fallback {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
}

.avatar-button:hover {
  transform: translateY(-1px);
}

.floating-menu {
  position: absolute;
  top: calc(100% + 10px);
  z-index: 30;
  min-width: 240px;
  padding: 12px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(18px);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.floating-menu[hidden] {
  display: none !important;
  pointer-events: none !important;
}

.floating-menu.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.profile-drawer {
  right: 0;
  width: min(320px, calc(100vw - 32px));
  display: grid;
  gap: 10px;
}

.floating-menu a,
.menu-entry {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border-radius: 16px;
  font-weight: 700;
  color: #fde047;
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
}

.floating-menu a:hover,
.floating-menu a:focus-visible,
.menu-entry:hover,
.menu-entry:focus-visible,
.floating-menu a.active {
  background: rgba(250, 204, 21, 0.14);
  color: #fef08a;
}

.danger-entry:hover {
  background: rgba(217, 45, 32, 0.08);
  color: var(--danger);
}

.danger-entry,
.danger-entry:visited {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #f87171 !important;
}

.danger-entry::before {
  content: "\00D7";
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(217, 45, 32, 0.16);
  border: 1px solid rgba(248, 113, 113, 0.28);
  color: #fca5a5;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}

.danger-entry:hover,
.danger-entry:focus-visible {
  background: rgba(217, 45, 32, 0.12);
  color: #fca5a5 !important;
}

.danger-entry:hover::before,
.danger-entry:focus-visible::before {
  background: rgba(217, 45, 32, 0.24);
  border-color: rgba(252, 165, 165, 0.36);
  color: #fecaca;
}

.auth-shell {
  width: min(460px, calc(100% - 24px));
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0 auto;
  padding: 24px 0;
}

.auth-card {
  width: 100%;
  display: grid;
  gap: 18px;
}

.page-toolbar {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.panel,
.view-card,
.group-card,
.sub-card {
  background: var(--surface);
  border: 1px solid rgba(33, 49, 39, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.hero,
.topbar,
.page-nav,
.view-card,
.group-card,
.sub-card {
  padding: 22px;
}

.eyebrow,
.section-kicker,
.meta-kicker {
  margin: 0 0 8px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--brand);
  font-weight: 700;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: "Barlow", sans-serif;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  line-height: 1;
  max-width: 8ch;
}

.hero-copy,
.page-intro,
.muted {
  color: var(--muted);
}

.topbar {
  margin-top: 18px;
  display: grid;
  gap: 18px;
}

.topbar-block {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.topbar-title {
  font-size: 1.4rem;
}

.participant-panel {
  animation: panel-in 180ms ease;
}

.profile-stack,
.profile-meta {
  display: grid;
  gap: 10px;
}

.profile-bar {
  padding: 0;
  border: 0;
  background: transparent;
}

.inline-form,
.stack,
.page-grid,
.card-grid,
.list-grid,
.detail-stack,
.status-grid {
  display: grid;
  gap: 14px;
}

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

.inline-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
}

.inline-form-cep {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.inline-form-cep .secondary-button {
  white-space: nowrap;
}

.page-nav {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.page-nav a {
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(30, 119, 87, 0.08);
  color: var(--brand-strong);
  font-weight: 700;
}

.page-nav a.active {
  background: var(--brand);
  color: #fff;
}

#app {
  margin-top: 18px;
}

.page-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
}

.view-card {
  display: grid;
  gap: 18px;
}

.rounds-summary-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: #171717;
  border-color: rgba(255, 255, 255, 0.14);
}

.rounds-summary-card .section-kicker {
  color: #facc15;
}

.rounds-summary-card .list-row {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.rounds-summary-card .muted {
  color: #d4d4d8;
}

.rounds-summary-card .callout {
  background: rgba(250, 204, 21, 0.12);
  color: #fef3c7;
  border-color: rgba(250, 204, 21, 0.24);
}

.group-pricing-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

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

.pricing-package-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.pricing-package-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.pricing-package-title {
  font-weight: 700;
  color: #f9fafb;
}

.pricing-package-price {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.16);
  border: 1px solid rgba(74, 222, 128, 0.28);
  color: #86efac;
  font-weight: 700;
}

.pricing-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.pricing-summary-item {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.pricing-summary-item strong {
  font-size: 1rem;
}

.pricing-summary-item [data-role="payment-total"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.16);
  border: 1px solid rgba(74, 222, 128, 0.28);
  color: #86efac;
}

.payment-status-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.payment-status-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.payment-status-button {
  min-height: 30px;
  border-radius: 999px;
  font-size: 0.78rem;
  flex: 0 0 auto;
}

.payment-status-cta {
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  white-space: nowrap;
}

.icon-command-button {
  width: 30px;
  min-width: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
}

.pix-qr-panel {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.pix-qr-image {
  width: min(240px, 100%);
  aspect-ratio: 1;
  object-fit: contain;
  padding: 10px;
  border-radius: 16px;
  background: #ffffff;
}

.payment-history-list {
  display: grid;
  gap: 10px;
}

.payment-history-row {
  background: rgba(255, 255, 255, 0.04);
}

.payment-history-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pricing-ok {
  color: #4ade80;
}

.pricing-error {
  color: #f87171;
}

.page-header,
.section-heading,
.row-between,
.group-card-head,
.list-row,
.match-row,
.round-row,
.rank-row,
.history-row,
.invite-row,
.active-user-bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.page-header {
  align-items: flex-start;
}

.page-actions,
.button-row,
.tag-row,
.session-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.group-links a {
  text-align: center;
}

.group-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.group-menu {
  position: absolute;
  top: 0;
  right: 0;
}

.group-menu summary {
  list-style: none;
}

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

.group-menu-toggle {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 0;
  background: linear-gradient(180deg, #fde047 0%, #facc15 100%);
  display: inline-grid;
  align-content: center;
  gap: 4px;
  padding: 0 11px;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.35),
    0 8px 18px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  color: var(--accent-ink);
}

.group-menu-toggle span {
  display: block;
  height: 2px;
  border-radius: 999px;
  background: var(--accent-ink);
}

.group-menu-sheet {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.16);
}

.group-menu:not([open]) .group-menu-sheet {
  display: none;
  pointer-events: none;
}

.group-menu-sheet a {
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 700;
  color: #fde047;
}

.group-menu-sheet a:hover,
.group-menu-sheet a:focus-visible {
  background: rgba(250, 204, 21, 0.14);
  color: #fef08a;
}

label,
fieldset {
  display: grid;
  gap: 8px;
}

fieldset {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(33, 49, 39, 0.14);
  border-radius: 12px;
  padding: 14px 15px;
  background: var(--surface-strong);
  color: var(--ink);
}

textarea {
  min-height: 92px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(30, 119, 87, 0.2);
  border-color: var(--brand);
}

.primary-button,
.accent-button,
.secondary-button,
.ghost-button,
.danger-button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  padding: 13px 18px;
  font-weight: 700;
  transition: transform 160ms ease, opacity 160ms ease;
}

.primary-button {
  background: var(--brand);
  color: #fff;
}

.accent-button {
  background: linear-gradient(180deg, #fde047 0%, #facc15 100%);
  color: var(--accent-ink);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.35),
    0 8px 18px rgba(0, 0, 0, 0.18);
}

.secondary-button {
  background: rgba(47, 158, 68, 0.1);
  color: var(--brand-strong);
}

.ghost-button {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.danger-button {
  background: rgba(176, 71, 56, 0.14);
  color: var(--danger);
}

.primary-button:hover,
.accent-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.danger-button:hover {
  transform: translateY(-1px);
}

.accent-button:disabled,
.secondary-button:disabled,
.primary-button:disabled,
.ghost-button:disabled,
.danger-button:disabled,
.menu-entry:disabled {
  cursor: wait;
  opacity: 0.92;
}

.command-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 108px;
}

.command-button.icon-command-button {
  width: 45px;
  min-width: 45px;
  padding-left: 0;
  padding-right: 0;
}

.command-button.is-loading {
  color: transparent;
}

.command-button.is-loading::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 3px solid rgba(31, 31, 31, 0.24);
  border-top-color: var(--accent-ink);
  animation: auth-spin 0.8s linear infinite;
}

.primary-button,
.accent-button,
.secondary-button,
.ghost-button,
.danger-button,
.menu-entry {
  position: relative;
}

.primary-button.is-loading,
.accent-button.is-loading,
.secondary-button.is-loading,
.ghost-button.is-loading,
.danger-button.is-loading,
.menu-entry.is-loading {
  color: transparent !important;
}

.primary-button.is-loading::after,
.accent-button.is-loading::after,
.secondary-button.is-loading::after,
.ghost-button.is-loading::after,
.danger-button.is-loading::after,
.menu-entry.is-loading::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  margin-top: -9px;
  border-radius: 999px;
  border: 3px solid rgba(31, 31, 31, 0.24);
  border-top-color: var(--accent-ink);
  animation: auth-spin 0.8s linear infinite;
}

.primary-button.is-loading::after,
.ghost-button.is-loading::after,
.danger-button.is-loading::after,
.menu-entry.is-loading::after {
  border-color: rgba(255, 255, 255, 0.24);
  border-top-color: #f9fafb;
}

.pill,
.status-pill,
.role-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.84rem;
  font-weight: 700;
}

.pill {
  background: rgba(217, 138, 43, 0.16);
  color: #8a5715;
}

.status-pill.alive,
.role-pill.owner {
  background: rgba(30, 119, 87, 0.13);
  color: var(--brand-strong);
}

.status-pill.out,
.role-pill.disabled {
  background: rgba(176, 71, 56, 0.12);
  color: var(--danger);
}

.status-pill.status-pill-empty {
  background: rgba(255, 255, 255, 0.06);
  color: transparent;
}

.role-pill.guest,
.role-pill.pending {
  background: rgba(217, 138, 43, 0.16);
  color: #8a5715;
}

.status-pill.pending {
  background: rgba(217, 138, 43, 0.16);
  color: #8a5715;
}

.empty-state,
.callout {
  padding: 16px;
  border-radius: 14px;
}

.empty-state {
  border: 1px dashed rgba(33, 49, 39, 0.16);
  background: rgba(255, 255, 255, 0.48);
  color: var(--muted);
}

.callout {
  background: rgba(255, 245, 157, 0.18);
  color: #fff6bf;
  border: 1px solid rgba(255, 214, 10, 0.28);
}

.floating-notice {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3000;
  width: min(calc(100vw - 24px), 560px);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid transparent;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
}

.floating-notice.success {
  background: rgba(22, 101, 52, 0.97);
  border-color: rgba(74, 222, 128, 0.32);
  color: #effff4;
}

.floating-notice.error {
  background: rgba(127, 29, 29, 0.97);
  border-color: rgba(248, 113, 113, 0.32);
  color: #fff1f1;
}

.floating-notice-content {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  line-height: 1.4;
}

.floating-notice-close {
  border: 0;
  background: transparent;
  color: inherit;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.floating-notice-close:hover,
.floating-notice-close:focus-visible {
  background: rgba(255, 255, 255, 0.14);
}

.group-card,
.sub-card {
  display: grid;
  gap: 10px;
}

.group-card-head {
  align-items: flex-start;
  position: relative;
  padding-right: 56px;
}

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

.list-row,
.match-row,
.round-row,
.rank-row,
.history-row,
.invite-row,
.active-user-bar {
  align-items: center;
  padding: 10px 12px;
  background: var(--surface-strong);
  border: 1px solid rgba(33, 49, 39, 0.08);
  border-radius: 14px;
}

.list-row strong,
.rank-row strong,
.history-row strong {
  display: block;
}

.round-row {
  align-items: flex-start;
}

.column {
  display: grid;
  gap: 6px;
}

.checkbox-grid {
  display: grid;
  gap: 10px;
}

.check-item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(30, 119, 87, 0.06);
}

.check-item input {
  width: auto;
}

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

.sticky-side {
  align-self: start;
  position: sticky;
  top: 16px;
}

.divider {
  height: 1px;
  background: var(--line);
}

.round-list {
  display: grid;
  gap: 12px;
}

.round-summary-button {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.round-summary-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  margin-left: auto;
  color: #b8bec7;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
}

.round-summary-details {
  display: grid;
  gap: 10px;
}

.history-match-row {
  display: block;
}

.history-match-row.history-match-highlight-win {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(74, 222, 128, 0.34);
}

.history-match-row.history-match-highlight-draw {
  background: rgba(250, 204, 21, 0.16);
  border-color: rgba(250, 204, 21, 0.3);
}

.history-match-row.history-match-highlight-loss {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(248, 113, 113, 0.3);
}

.history-match-row.history-match-highlight-pending {
  background: rgba(148, 163, 184, 0.16);
  border-color: rgba(148, 163, 184, 0.28);
}

.history-match-line {
  display: grid;
  gap: 4px;
}

.history-bet-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}

.history-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin-bottom: 6px;
}

.history-total-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #cbd5e1;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: right;
}

body[data-page="history"] .history-total-stack,
body[data-page="ranking"] .history-total-stack {
  margin-left: auto;
  display: grid;
  justify-items: end;
}

body[data-page="history"] .history-row > div,
body[data-page="ranking"] .history-row > div {
  width: 100%;
}

.history-inline-pill {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 68px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #cbd5e1;
  font-size: 0.76rem;
  font-weight: 700;
}

.history-toolbar {
  display: flex;
  justify-content: flex-end;
}

.history-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f9fafb;
  font-weight: 700;
}

.history-toggle input {
  width: auto;
  accent-color: #facc15;
}

.history-heart {
  color: #f87171;
  font-size: 0.88rem;
  line-height: 1;
}

.history-heart-empty {
  color: #cbd5e1;
  font-size: 0.72rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.bet-summary-complete {
  color: #4ade80 !important;
}

.bet-summary-partial {
  color: #facc15 !important;
}

.bet-summary-missing {
  color: #f87171 !important;
}

.history-match-line .muted {
  justify-self: end;
  text-align: right;
  font-size: 0.78rem;
}

.history-score-win {
  color: #4ade80;
}

.history-score-loss {
  color: #f87171;
}

.history-score-draw {
  color: #facc15;
}

.history-score-neutral {
  color: #f9fafb;
}

.scoreline {
  font-weight: 700;
}

.page-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-links a {
  color: #fde047;
  font-weight: 700;
}

.page-links a:hover,
.page-links a:focus-visible {
  color: #fef08a;
}

body[data-page="login"] {
  background: linear-gradient(180deg, #2f2f2f 0%, #272727 100%);
  color: #f3f4f6;
}

body[data-page="login"] .auth-card {
  padding: 24px 18px 18px;
}

.auth-brand {
  display: grid;
  place-items: center;
  margin-bottom: 8px;
}

.auth-dice {
  width: 82px;
  height: 82px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: transparent;
  box-shadow: none;
}

.auth-dice img {
  width: 74px;
  height: 74px;
  object-fit: contain;
  display: block;
}

.auth-copy {
  display: grid;
  gap: 6px;
  justify-items: start;
}

body[data-page="login"] .eyebrow {
  color: #9ca3af;
  margin-bottom: 0;
}

body[data-page="login"] h1 {
  max-width: none;
  font-size: 2rem;
  color: #f9fafb;
}

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

.auth-fields {
  position: relative;
  display: grid;
  gap: 12px;
}

.auth-field {
  display: grid;
  gap: 0;
}

.auth-field span {
  display: none;
}

body[data-page="login"] .auth-field input {
  height: 52px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(24, 24, 24, 0.65);
  color: #f9fafb;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  padding-right: 76px;
}

body[data-page="login"] .auth-field input {
  color: #f9fafb;
}

body[data-page="login"] .auth-field input::placeholder {
  color: rgba(209, 213, 219, 0.72);
  transition: color 140ms ease, opacity 140ms ease;
}

body[data-page="login"] .auth-field input:focus {
  outline: 2px solid rgba(250, 204, 21, 0.18);
  border-color: rgba(250, 204, 21, 0.5);
}

body[data-page="login"] .auth-field input:focus::placeholder {
  color: rgba(250, 250, 250, 0.42);
}

.auth-submit {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translate(32%, -50%);
  width: 72px;
  height: 72px;
  border: 0;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  background: radial-gradient(circle at 30% 30%, #4b4b4b 0%, #303030 68%, #252525 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 10px 18px rgba(0, 0, 0, 0.32);
  cursor: pointer;
}

.auth-submit:hover {
  transform: translate(32%, calc(-50% - 1px));
}

.auth-submit:disabled,
.auth-block-button:disabled {
  cursor: wait;
  opacity: 0.92;
}

.auth-submit-core {
  width: 50px;
  height: 50px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #ffe600 0%, #ffd000 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.35),
    0 3px 8px rgba(0, 0, 0, 0.22);
}

.auth-submit-arrow {
  font-size: 1.85rem;
  line-height: 1;
  color: var(--accent-ink);
  text-shadow: none;
  transform: translateX(1px);
}

.auth-submit.is-loading .auth-submit-core {
  background: linear-gradient(180deg, #f8d948 0%, #eab308 100%);
}

.auth-submit.is-loading .auth-submit-arrow {
  display: none;
}

.auth-submit.is-loading .auth-submit-core::after {
  content: "";
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 3px solid rgba(31, 31, 31, 0.24);
  border-top-color: var(--accent-ink);
  animation: auth-spin 0.8s linear infinite;
}

.auth-links {
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
}

.auth-links a {
  color: #fde047;
  font-size: 1.05rem;
}

.group-championship-link {
  display: inline-block;
  color: #fde047;
  font-size: 1.05rem;
  line-height: 1.2;
  text-decoration: none;
  margin-bottom: 6px;
}

.auth-links a:hover,
.auth-links a:focus-visible,
.group-championship-link:hover,
.group-championship-link:focus-visible {
  color: #fef08a;
  text-decoration: underline;
}

.auth-links a[aria-disabled="true"] {
  pointer-events: none;
}

.auth-hint {
  display: grid;
  gap: 4px;
  color: #a1a1aa;
  font-size: 0.95rem;
}

body[data-page="login"] .callout {
  background: rgba(127, 29, 29, 0.5);
  color: #ffe2e2;
  border: 1px solid rgba(248, 113, 113, 0.28);
}

body[data-page="recover-password"],
body[data-page="reset-password"],
body[data-page="register"],
body[data-page="groups"],
body[data-page="create-group"],
body[data-page="group-edit"],
body[data-page="profile"],
body[data-page="ranking"],
body[data-page="history"],
body[data-page="bets"],
body[data-page="rounds"],
body[data-page="admin"] {
  background: linear-gradient(180deg, #2f2f2f 0%, #272727 100%);
  color: #f3f4f6;
}

body[data-page="terms"] {
  background: linear-gradient(180deg, #2f2f2f 0%, #272727 100%);
  color: #f3f4f6;
}

body[data-page="recover-password"] .auth-card,
body[data-page="reset-password"] .auth-card,
body[data-page="register"] .auth-card {
  padding: 24px 18px 18px;
}

body[data-page="groups"] .panel,
body[data-page="groups"] .view-card,
body[data-page="groups"] .group-card,
body[data-page="groups"] .sub-card,
body[data-page="create-group"] .view-card,
body[data-page="group-edit"] .view-card,
body[data-page="profile"] .view-card,
body[data-page="ranking"] .view-card,
body[data-page="ranking"] .sub-card,
body[data-page="history"] .view-card,
body[data-page="history"] .sub-card,
body[data-page="bets"] .view-card,
body[data-page="bets"] .sub-card,
body[data-page="rounds"] .view-card,
body[data-page="rounds"] .sub-card,
body[data-page="admin"] .view-card,
body[data-page="admin"] .sub-card,
body[data-page="admin"] .group-card {
  background: #202020;
  border-color: rgba(255, 255, 255, 0.12);
  color: #f3f4f6;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 18px 44px rgba(0, 0, 0, 0.38);
}

body[data-page="groups"] .app-topbar,
body[data-page="create-group"] .app-topbar,
body[data-page="group-edit"] .app-topbar,
body[data-page="profile"] .app-topbar,
body[data-page="ranking"] .app-topbar,
body[data-page="history"] .app-topbar,
body[data-page="bets"] .app-topbar,
body[data-page="rounds"] .app-topbar,
body[data-page="admin"] .app-topbar {
  background: #202020;
  color: #f3f4f6;
}

body[data-page="groups"] .list-row,
body[data-page="groups"] .empty-state,
body[data-page="groups"] .active-user-bar,
body[data-page="create-group"] .active-user-bar,
body[data-page="create-group"] .empty-state,
body[data-page="create-group"] fieldset,
body[data-page="create-group"] input,
body[data-page="create-group"] select,
body[data-page="create-group"] textarea,
body[data-page="group-edit"] .active-user-bar,
body[data-page="group-edit"] .list-row,
body[data-page="group-edit"] .empty-state,
body[data-page="group-edit"] fieldset,
body[data-page="group-edit"] input,
body[data-page="group-edit"] select,
body[data-page="group-edit"] textarea,
body[data-page="group-edit"] .callout,
body[data-page="profile"] .active-user-bar,
body[data-page="profile"] .empty-state,
body[data-page="profile"] fieldset,
body[data-page="profile"] input,
body[data-page="profile"] select,
body[data-page="profile"] textarea,
body[data-page="ranking"] .active-user-bar,
body[data-page="ranking"] .empty-state,
body[data-page="ranking"] .rank-row,
body[data-page="ranking"] .match-row,
body[data-page="ranking"] .history-row,
body[data-page="history"] .active-user-bar,
body[data-page="history"] .empty-state,
body[data-page="history"] .history-row,
body[data-page="history"] .match-row,
body[data-page="bets"] .active-user-bar,
body[data-page="bets"] .empty-state,
body[data-page="bets"] .list-row,
body[data-page="bets"] .callout,
body[data-page="bets"] input,
body[data-page="bets"] select,
body[data-page="bets"] .match-row,
body[data-page="rounds"] .active-user-bar,
body[data-page="rounds"] .empty-state,
body[data-page="rounds"] .round-row,
body[data-page="rounds"] .match-row,
body[data-page="admin"] .active-user-bar,
body[data-page="admin"] .list-row,
body[data-page="admin"] .empty-state,
body[data-page="admin"] input,
body[data-page="admin"] select,
body[data-page="admin"] textarea {
  background: rgba(24, 24, 24, 0.72);
  border-color: rgba(255, 255, 255, 0.08);
  color: #f9fafb;
}

body[data-page="ranking"] .scoreline,
body[data-page="history"] .scoreline,
body[data-page="bets"] .scoreline,
body[data-page="rounds"] .scoreline {
  color: #f9fafb;
}

body[data-page="groups"] .muted,
body[data-page="create-group"] .muted,
body[data-page="group-edit"] .muted,
body[data-page="profile"] .muted,
body[data-page="ranking"] .muted,
body[data-page="history"] .muted,
body[data-page="bets"] .muted,
body[data-page="rounds"] .muted,
body[data-page="admin"] .muted,
body[data-page="groups"] .page-intro,
body[data-page="create-group"] .page-intro,
body[data-page="group-edit"] .page-intro,
body[data-page="admin"] .page-intro {
  color: #b8bec7;
}

body[data-page="history"] .history-match-row.history-match-highlight-win {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(74, 222, 128, 0.34);
}

body[data-page="history"] .history-match-row.history-match-highlight-draw {
  background: rgba(250, 204, 21, 0.16);
  border-color: rgba(250, 204, 21, 0.3);
}

body[data-page="history"] .history-match-row.history-match-highlight-loss {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(248, 113, 113, 0.3);
}

body[data-page="bets"] .history-match-row.history-match-highlight-win {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(74, 222, 128, 0.34);
}

body[data-page="bets"] .history-match-row.history-match-highlight-draw {
  background: rgba(250, 204, 21, 0.16);
  border-color: rgba(250, 204, 21, 0.3);
}

body[data-page="bets"] .history-match-row.history-match-highlight-loss {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(248, 113, 113, 0.3);
}

body[data-page="bets"] .history-match-row.history-match-highlight-pending {
  background: rgba(148, 163, 184, 0.16);
  border-color: rgba(148, 163, 184, 0.28);
}

body[data-page="groups"] .floating-menu,
body[data-page="groups"] .group-menu-sheet,
body[data-page="create-group"] .floating-menu,
body[data-page="group-edit"] .floating-menu,
body[data-page="profile"] .floating-menu,
body[data-page="ranking"] .floating-menu,
body[data-page="history"] .floating-menu,
body[data-page="bets"] .floating-menu,
body[data-page="rounds"] .floating-menu,
body[data-page="admin"] .floating-menu {
  background: rgba(37, 37, 37, 0.98);
  border-color: rgba(255, 255, 255, 0.08);
}

body[data-page="groups"] .floating-menu a,
body[data-page="groups"] .menu-entry,
body[data-page="create-group"] .floating-menu a,
body[data-page="create-group"] .menu-entry,
body[data-page="group-edit"] .floating-menu a,
body[data-page="group-edit"] .menu-entry,
body[data-page="profile"] .floating-menu a,
body[data-page="profile"] .menu-entry,
body[data-page="ranking"] .floating-menu a,
body[data-page="ranking"] .menu-entry,
body[data-page="history"] .floating-menu a,
body[data-page="history"] .menu-entry,
body[data-page="bets"] .floating-menu a,
body[data-page="bets"] .menu-entry,
body[data-page="rounds"] .floating-menu a,
body[data-page="rounds"] .menu-entry,
body[data-page="admin"] .floating-menu a,
body[data-page="admin"] .menu-entry {
  color: #fde047;
}

body[data-page="groups"] .app-topbar {
  grid-template-columns: 1fr auto;
}

.shell-title {
  font-family: "Barlow", sans-serif;
  font-size: 16px;
  letter-spacing: 0.08em;
  color: #ffffff;
  font-weight: 700;
  line-height: 1;
}

.shell-title-with-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.shell-title-logo {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
}

body:not([data-page="groups"]) .shell-title {
  justify-self: start;
}

.topbar-back-button {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #3a3a3a 0%, #2b2b2b 100%);
  color: #ffffff;
  font-size: 1.45rem;
  line-height: 1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 10px 22px rgba(0, 0, 0, 0.28);
  transition: transform 160ms ease, box-shadow 160ms ease;
  flex-shrink: 0;
}

.topbar-back-button span {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #ffe600 0%, #ffd000 100%);
  color: var(--accent-ink);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.35),
    0 4px 10px rgba(0, 0, 0, 0.22);
  text-shadow: none;
  transform: translateX(-1px) scaleX(-1);
}

.topbar-back-button:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 12px 24px rgba(0, 0, 0, 0.32);
}

.page-actions-end {
  justify-content: flex-end;
}

.page-actions-center {
  justify-content: center;
}

.ranking-header-actions {
  margin-left: auto;
  justify-content: flex-end;
}

.round-nav-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}

.round-nav-title {
  min-width: 0;
  text-align: center;
}

.round-title-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.history-round-head {
  display: grid;
  gap: 6px;
}

.history-round-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.round-nav-button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #3a3a3a 0%, #2b2b2b 100%);
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 10px 22px rgba(0, 0, 0, 0.28);
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.round-nav-button span {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #ffe600 0%, #ffd000 100%);
  color: var(--accent-ink);
  font-size: 1.15rem;
  font-weight: 700;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.35),
    0 4px 10px rgba(0, 0, 0, 0.22);
  text-shadow: none;
}

.round-nav-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 12px 24px rgba(0, 0, 0, 0.32);
}

.round-nav-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.floating-create-button {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 22px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fde047 0%, #facc15 100%);
  color: var(--accent-ink);
  font-weight: 700;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.35),
    0 12px 24px rgba(0, 0, 0, 0.28);
  transform: translateX(-50%);
}

.floating-create-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(31, 31, 31, 0.12);
  color: var(--accent-ink);
  font-size: 1.1rem;
  line-height: 1;
}

.floating-scroll-top-button {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #3a3a3a 0%, #2b2b2b 100%);
  color: #ffffff;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 10px 22px rgba(0, 0, 0, 0.28);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.floating-scroll-top-button:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 12px 24px rgba(0, 0, 0, 0.32);
}

.floating-scroll-top-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe600 0%, #ffd000 100%);
  color: var(--accent-ink);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.35),
    0 4px 10px rgba(0, 0, 0, 0.22);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  text-shadow: none;
  transform: rotate(-90deg);
}

body[data-page="recover-password"] .auth-field input,
body[data-page="reset-password"] .auth-field input,
body[data-page="register"] .auth-field input {
  height: 56px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(24, 24, 24, 0.65);
  color: #f9fafb;
}

body[data-page="recover-password"] .auth-field input::placeholder,
body[data-page="reset-password"] .auth-field input::placeholder,
body[data-page="register"] .auth-field input::placeholder {
  color: rgba(209, 213, 219, 0.72);
  transition: color 140ms ease, opacity 140ms ease;
}

body[data-page="recover-password"] .auth-field input:focus,
body[data-page="reset-password"] .auth-field input:focus,
body[data-page="register"] .auth-field input:focus {
  outline: 2px solid rgba(250, 204, 21, 0.18);
  border-color: rgba(250, 204, 21, 0.5);
}

body[data-page="recover-password"] .auth-field input:focus::placeholder,
body[data-page="reset-password"] .auth-field input:focus::placeholder,
body[data-page="register"] .auth-field input:focus::placeholder {
  color: rgba(250, 250, 250, 0.42);
}

.simple-auth-form {
  gap: 16px;
}

.auth-block-button {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #fde047 0%, #facc15 100%);
  color: var(--accent-ink);
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.35),
    0 8px 18px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.auth-block-button:hover {
  filter: brightness(1.02);
}

.auth-username-preview {
  display: grid;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
}

.auth-username-preview strong {
  word-break: break-word;
}

.username-status-valid {
  color: #4ade80;
}

.username-status-invalid,
.username-status-empty {
  color: #f87171;
}

.auth-terms {
  background: rgba(255, 255, 255, 0.06);
  color: #e5e7eb;
}

.inline-link-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #fde047;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.inline-link-button:hover,
.inline-link-button:focus-visible {
  color: #fef08a;
}

.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.66);
  backdrop-filter: blur(6px);
}

.modal-card {
  width: min(680px, 100%);
  max-height: min(88vh, 820px);
  overflow: auto;
  padding: 22px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #252525;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.4);
}

.terms-modal-card .button-row {
  justify-content: flex-end;
}

.modal-close,
.terms-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: #f3f4f6;
  cursor: pointer;
}

.terms-shell {
  width: min(820px, calc(100% - 24px));
  margin: 0 auto;
  padding: 28px 0 36px;
}

.terms-card {
  padding: 24px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #252525;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
}

.terms-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.terms-header h1,
.terms-header h2 {
  color: #ffffff;
  font-family: "Barlow", sans-serif;
}

.terms-content {
  display: grid;
  gap: 14px;
  color: #e5e7eb;
  line-height: 1.65;
}

.terms-content p {
  margin: 0;
}

.modal-confirm {
  width: auto;
  min-width: 132px;
}

.auth-block-button.is-loading {
  color: transparent;
  position: relative;
}

.auth-block-button.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 999px;
  border: 3px solid rgba(255, 255, 255, 0.28);
  border-top-color: #ffffff;
  animation: auth-spin 0.8s linear infinite;
}

@keyframes auth-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .inline-form,
  .page-grid,
  .split-grid {
    grid-template-columns: 1fr;
  }

  .sticky-side {
    position: static;
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: 100%;
    padding-top: 0;
  }

  .auth-shell {
    width: min(100% - 16px, 100%);
  }

  body[data-page="login"] .auth-card {
    padding: 18px 12px 16px;
  }

  .app-topbar,
  .topbar,
  .page-nav,
  .view-card,
  .group-card,
  .sub-card {
    padding: 18px;
    border-radius: 20px;
  }

  .app-topbar {
    padding: 4px 0 10px;
    border-radius: 0;
  }

  .page-toolbar,
  .topbar-block,
  .page-header,
  .section-heading,
  .row-between,
  .group-card-head,
  .list-row,
  .match-row,
  .round-row,
  .rank-row,
  .history-row,
  .invite-row,
  .active-user-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .app-topbar {
    grid-template-columns: auto 1fr auto;
    align-items: center;
  }

  body[data-page="groups"] .app-topbar {
    grid-template-columns: 1fr auto;
  }

  .brand-lockup small {
    display: none;
  }

  .floating-menu {
    width: min(320px, calc(100vw - 24px));
  }
}
