:root {
  --bg: #0c1424;
  --surface: #162033;
  --line: #2a3a56;
  --text: #eef3fb;
  --muted: #9aabc4;
  --accent: #3ddc84;
  --accent-ink: #062816;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(ellipse at top, #1a2c4a 0%, transparent 55%),
    var(--bg);
}

header {
  position: sticky;
  top: 0;
  z-index: 30;
  /* Menu | member name | sign-in. Equal side columns keep the name in the exact middle. */
  display: grid;
  grid-template-columns: 1fr minmax(0, max-content) 1fr;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: rgba(12, 20, 36, 0.92);
}

header > .menu-toggle {
  grid-column: 1;
  justify-self: start;
}

header > .user-chip {
  grid-column: 2;
  justify-self: center;
  max-width: 100%;
}

/* Small phones: no room for equal sides, so the name centres in the space between the buttons */
@media (max-width: 480px) {
  header {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
}

/* Always pinned to the top-right corner, even while the name is hidden */
.header-end {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  min-width: 0;
}

.menu-toggle {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.menu-toggle:hover,
.menu-toggle:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.menu-bars,
.menu-bars::before,
.menu-bars::after {
  display: block;
  width: 1.125rem;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.menu-bars {
  position: relative;
}

.menu-bars::before,
.menu-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-bars::before {
  top: -6px;
}

.menu-bars::after {
  top: 6px;
}

.menu-toggle[aria-expanded="true"] .menu-bars {
  background: transparent;
}

.menu-toggle[aria-expanded="true"] .menu-bars::before {
  top: 0;
  transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-bars::after {
  top: 0;
  transform: rotate(-45deg);
}

.site-menu {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 25;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: min(18rem, 86vw);
  height: 100vh;
  margin: 0;
  padding: 5rem 1rem 1.5rem;
  background: var(--surface);
  border-right: 1px solid var(--line);
  box-shadow: 8px 0 32px rgba(0, 0, 0, 0.35);
}

.site-menu[hidden] {
  display: none;
}

/* MENU heading: brand font and colour blend */
.menu-title {
  margin: 0 0 0.6rem;
  padding: 0 0.85rem 0.6rem;
  font-family: "Bebas Neue", "Arial Narrow", Impact, sans-serif;
  font-size: 2.1rem;
  line-height: 1;
  letter-spacing: 0.18em;
  color: var(--accent);
  background: linear-gradient(100deg, var(--accent), #e6c15a 55%, #b48cf2);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  border-bottom: 1px solid var(--line);
}

.site-menu button {
  padding: 0.7rem 0.85rem;
  color: var(--text);
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
}

.site-menu button:hover,
.site-menu button:focus-visible {
  border-color: var(--line);
  outline: none;
}

.site-menu button.is-active {
  color: var(--accent-ink);
  background: var(--accent);
  font-weight: 700;
}

/* Signed-in member: initials avatar, name and plan badge in one pill */
.user-chip {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.25rem 0.7rem 0.25rem 0.25rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 999px;
  animation: chip-in 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.user-chip[hidden] {
  display: none;
}

.user-avatar {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 2rem;
  height: 2rem;
  color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent), #2bb3a0);
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  box-shadow: 0 0 0 2px rgba(61, 220, 132, 0.25);
}

.user-name {
  min-width: 0;
  max-width: 11rem;
  overflow: hidden;
  color: var(--text);
  font-family: "Poppins", "Segoe UI", system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 400;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.user-plan {
  flex-shrink: 0;
  padding: 0.12rem 0.45rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.user-plan.plan-free {
  color: var(--accent);
}

.user-plan.plan-vip {
  color: #e6c15a;
  background: rgba(230, 193, 90, 0.12);
}

.user-plan.plan-vvip {
  color: #b48cf2;
  background: rgba(180, 140, 242, 0.14);
}

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

/* Greeting after signing in or creating an account; slides down, then away */
.welcome-toast {
  position: fixed;
  top: 4.5rem;
  left: 50%;
  z-index: 35;
  display: grid;
  gap: 0.2rem;
  width: min(24rem, calc(100vw - 2rem));
  padding: 0.9rem 1.1rem 0.9rem 1.25rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 14px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translate(-50%, -14px);
  transition:
    opacity 0.35s ease,
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.welcome-toast.is-shown {
  opacity: 1;
  transform: translate(-50%, 0);
}

.welcome-toast strong {
  font-family: "Bebas Neue", "Arial Narrow", Impact, sans-serif;
  font-size: 1.45rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.welcome-toast span {
  color: var(--muted);
  font-family: "Poppins", "Segoe UI", system-ui, sans-serif;
  font-size: 0.88rem;
  font-weight: 300;
}

@media (prefers-reduced-motion: reduce) {
  .user-chip {
    animation: none;
  }

  .welcome-toast {
    transition: none;
  }
}

h1 {
  margin: 0.5rem 0 0.25rem;
  text-align: center;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: 0.14em;
}

/* Home page brand title: headline font, letters dribble like a ball */
.brand-title {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0 0.35em;
  margin: 0.75rem 0 0.25rem;
  padding-top: 0.3em; /* room for the bounce */
  font-family: "Bebas Neue", "Arial Narrow", Impact, sans-serif;
  font-size: clamp(2.75rem, 9vw, 4.75rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.08em;
  filter: drop-shadow(0 4px 18px rgba(61, 220, 132, 0.25));
}

.brand-word {
  display: inline-flex;
}

/* Each letter shows its own slice of one gradient, so the colours still blend
   continuously across the whole name (11 letters: slice --i of 11). */
.brand-letter {
  display: inline-block;
  color: var(--accent);
  background: linear-gradient(100deg, var(--accent) 0%, #e6c15a 40%, #b48cf2 75%, var(--accent) 100%);
  background-size: 1100% 100%;
  background-position: calc(var(--i) * 10%) 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transform-origin: 50% 100%;
  animation: brand-dribble 2.6s cubic-bezier(0.3, 0, 0.4, 1) infinite;
  animation-delay: calc(var(--i) * 0.09s);
}

/* Up, down, squash on the "ground", small rebound, then rest */
@keyframes brand-dribble {
  0%,
  40%,
  100% {
    transform: translateY(0) scale(1, 1);
  }
  12% {
    transform: translateY(-0.28em) scale(0.96, 1.05);
  }
  24% {
    transform: translateY(0) scale(1.12, 0.84);
  }
  31% {
    transform: translateY(-0.08em) scale(0.98, 1.02);
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand-letter {
    animation: none;
  }
}

/* Full intro text under the title, with breathing room, drifting slowly up and down */
.lede {
  margin: 1.75rem auto 0.5rem;
  max-width: 40rem;
  padding: 0 1rem;
  color: var(--muted);
  font-family: "Poppins", "Segoe UI", system-ui, sans-serif;
  font-size: 1.02rem;
  font-weight: 300;
  line-height: 1.6;
  letter-spacing: 0.02em;
  text-align: center;
  animation: lede-float 6s ease-in-out infinite;
}

@keyframes lede-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .lede {
    animation: none;
  }
}

/* Clear space between each predictions table */
main hr {
  margin: 3rem 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.match-days {
  display: flex;
  gap: 0.5rem;
  margin: 0 0 0.75rem;
}

.day-button {
  flex: 1;
  padding: 0.55rem 0.75rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

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

.day-button[aria-pressed="true"] {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}

#free,
#vip,
#vvip {
  scroll-margin-top: 4.75rem;
}

.site-menu a {
  display: block;
  padding: 0.7rem 0.85rem;
  color: var(--text);
  text-align: left;
  text-decoration: none;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
}

.site-menu a:hover,
.site-menu a:focus-visible {
  border-color: var(--line);
  outline: none;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

th,
td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

thead th {
  color: var(--accent-ink);
  background: var(--accent);
  letter-spacing: 0.08em;
}

/* Free predictions heading: brand font, football icon, green gradient with a slow shine */
thead th.free-heading {
  position: relative;
  overflow: hidden;
  padding: 1rem;
  color: var(--accent-ink);
  background: linear-gradient(120deg, #2fc879 0%, var(--accent) 45%, #6fe9a8 100%);
  letter-spacing: 0;
}

thead th.free-heading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.45) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: free-shine 4.5s ease-in-out infinite;
  pointer-events: none;
}

.free-heading-inner {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.free-heading-ball {
  width: 1.6rem;
  height: 1.6rem;
  flex-shrink: 0;
  animation: free-ball-spin 6s linear infinite;
}

.free-heading-text {
  font-family: "Bebas Neue", "Arial Narrow", Impact, sans-serif;
  font-size: 1.75rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.12em;
}

/* "FREE" sits in a dark pill so it pops against the green */
.free-heading-tag {
  display: inline-block;
  margin-right: 0.15em;
  padding: 0.12em 0.4em 0.04em;
  color: var(--accent);
  background: var(--accent-ink);
  border-radius: 6px;
}

@keyframes free-shine {
  0%,
  55% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

@keyframes free-ball-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 420px) {
  .free-heading-text {
    font-size: 1.45rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  thead th.free-heading::after,
  .free-heading-ball {
    animation: none;
  }
}

.vip-table {
  border-color: #e6c15a;
}

.vip-table thead th {
  color: #2a2108;
  background: #e6c15a;
}

.plan-button {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.plan-button[hidden] {
  display: none;
}

#vip[hidden],
.site-menu .menu-item[hidden],
.footer-list li[hidden] {
  display: none;
}

.plan-button:hover,
.plan-button:focus-visible {
  filter: brightness(1.08);
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.vip-plan {
  color: #2a2108;
  background: #e6c15a;
}

.vvip-plan {
  color: #1e0f3a;
  background: #b48cf2;
}

.vvip-table {
  border-color: #b48cf2;
}

.vvip-table thead th {
  color: #1e0f3a;
  background: #b48cf2;
}

.slot-line {
  margin: 0.7rem 0 0;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}

.slot-line[hidden] {
  display: none;
}

#vip-slots {
  color: #e6c15a;
}

#vvip-slots {
  color: #b48cf2;
}

tbody tr:last-child td {
  border-bottom: 0;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.25rem 1rem 2.5rem;
}

.days {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

button {
  font: inherit;
  cursor: pointer;
}

.days button {
  min-width: 7rem;
  padding: 0.55rem 1rem;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
}

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

.days button.is-active {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 700;
}

.sign-in {
  flex-shrink: 0;
  min-width: 6.25rem;
  padding: 0.5rem 1rem;
  color: var(--accent-ink);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.sign-in:hover,
.sign-in:focus-visible {
  filter: brightness(1.08);
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

/* Same button once signed in: outlined "Sign out", turns red on hover */
.sign-in.is-signed-in {
  color: var(--text);
  background: transparent;
  border-color: var(--line);
}

.sign-in.is-signed-in:hover,
.sign-in.is-signed-in:focus-visible {
  color: #ff6b6b;
  border-color: #ff6b6b;
  filter: none;
  outline: none;
}

#match-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

#match-list > li {
  padding: 1rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
}

#match-list > li + li {
  margin-top: 0.75rem;
}

#match-list > li.empty {
  color: var(--muted);
  border-left-color: var(--line);
}

.match h3 {
  margin: 0;
  font-size: 1.05rem;
}

.predictions {
  margin: 0.85rem 0 0;
  padding: 0;
  list-style: none;
}

.predictions li {
  padding: 0.7rem 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.predictions li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.predictions li + li {
  margin-top: 0;
}

@media (max-width: 520px) {
  .days {
    flex-direction: column;
  }

  .days button {
    width: 100%;
  }
}

.site-footer {
  padding: 2.5rem 1rem 2rem;
  background: #070b14;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.25rem;
  max-width: 720px;
  margin: 0 auto;
}

.footer-name {
  margin: 0;
  font-family: "Bebas Neue", "Arial Narrow", Impact, sans-serif;
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--text);
}

.footer-name span {
  color: var(--accent);
}

.footer-tagline {
  margin: 0.6rem 0 0;
  max-width: 30rem;
  color: var(--muted);
  font-family: "Poppins", "Segoe UI", system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 300;
  line-height: 1.7;
}

.footer-heading {
  margin: 0 0 1rem;
  color: #e6c15a;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.footer-list {
  display: grid;
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-list a,
.footer-list button {
  padding: 0;
  color: var(--text);
  background: none;
  border: 0;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.footer-list a:hover,
.footer-list a:focus-visible,
.footer-list button:hover,
.footer-list button:focus-visible {
  color: var(--accent);
  outline: none;
}

.footer-list.plain li {
  color: var(--text);
}

/* Footer socials: logo-only tiles in brand colours */
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.social-link {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 14px;
  text-decoration: none;
  transition:
    transform 0.2s ease,
    filter 0.2s ease;
}

.social-link svg {
  width: 1.6rem;
  height: 1.6rem;
}

.social-whatsapp {
  background: #25d366;
  box-shadow: 0 6px 22px rgba(37, 211, 102, 0.35);
}

.social-tiktok {
  background: #000;
  border: 1px solid var(--line);
  box-shadow: inset -2px -2px 0 rgba(37, 244, 238, 0.55), inset 2px 2px 0 rgba(254, 44, 85, 0.55);
}

.social-instagram {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
  box-shadow: 0 6px 22px rgba(214, 36, 159, 0.3);
}

.social-x {
  background: #000;
  border: 1px solid var(--line);
}

.social-link:hover,
.social-link:focus-visible {
  transform: translateY(-3px);
  filter: brightness(1.12);
}

.social-link:active {
  transform: scale(0.94);
}

.social-link:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 4px;
}

/* Each icon bobs gently on its own beat. Uses `translate`, so the hover lift
   (`transform`) still stacks on top. */
.social-link {
  animation: social-float 3s ease-in-out infinite;
}

.social-link:nth-child(2) { animation-delay: -0.75s; }
.social-link:nth-child(3) { animation-delay: -1.5s; }
.social-link:nth-child(4) { animation-delay: -2.25s; }

@keyframes social-float {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .social-link {
    transition: none;
    animation: none;
  }
}

.disclaimer {
  max-width: 720px;
  margin: 0 auto 2.25rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.6;
  text-align: center;
}

.disclaimer strong {
  color: var(--text);
}

.copyright {
  margin: 2.25rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: 960px;
  }
}

.admin-button {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 40;
  padding: 0.7rem 1.2rem;
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.admin-button:hover,
.admin-button:focus-visible {
  filter: brightness(1.08);
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.admin-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  max-width: none;
  padding: 1.5rem 1rem;
}

.admin-card {
  width: 100%;
  max-width: 420px;
  padding: 2.25rem 1.75rem;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 0 60px rgba(61, 220, 132, 0.08);
}

.lock-badge {
  display: grid;
  place-items: center;
  width: 4.25rem;
  height: 4.25rem;
  margin: 0 auto 1.25rem;
  color: var(--accent);
  background: rgba(61, 220, 132, 0.12);
  border: 1px solid rgba(61, 220, 132, 0.4);
  border-radius: 50%;
}

.lock-badge svg {
  width: 1.75rem;
  height: 1.75rem;
}

.admin-card h1 {
  margin: 0;
  font-size: 1.9rem;
  letter-spacing: 0;
}

.admin-card p {
  margin: 0.6rem 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.admin-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.75rem;
}

/* Email + password, grouped so they can be hidden while an older account adds a name */
.admin-form-fields {
  display: grid;
  gap: 1rem;
}

.admin-form-fields[hidden],
.account-tabs[hidden] {
  display: none;
}

.passcode-field {
  position: relative;
}

.passcode-field input {
  width: 100%;
  padding: 1rem 3.25rem 1rem 1.1rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  font: inherit;
  font-size: 1.05rem;
}

.passcode-field input::placeholder {
  color: var(--muted);
}

.passcode-field input:focus {
  border-color: var(--accent);
  outline: none;
}

.toggle-passcode {
  position: absolute;
  top: 50%;
  right: 0.6rem;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  color: var(--accent);
  background: none;
  border: 0;
  border-radius: 8px;
  transform: translateY(-50%);
  cursor: pointer;
}

.toggle-passcode:focus-visible {
  outline: 2px solid var(--accent);
}

.toggle-passcode svg {
  width: 1.4rem;
  height: 1.4rem;
}

.admin-submit {
  padding: 1rem;
  color: var(--accent-ink);
  background: var(--accent);
  border: 0;
  border-radius: 14px;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.2em;
  cursor: pointer;
}

.admin-submit:hover,
.admin-submit:focus-visible {
  filter: brightness(1.08);
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.admin-error {
  min-height: 1.4em;
  margin: 0;
  color: #ff6b6b;
  font-size: 0.9rem;
}

.admin-card a {
  color: var(--accent);
}


.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.control-room {
  background: var(--bg);
}

.control-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
}

.control-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.control-bar h1 {
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  text-align: left;
}

.control-sign-out {
  padding: 0.5rem 1rem;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
  cursor: pointer;
}

.control-sign-out:hover,
.control-sign-out:focus-visible {
  border-color: var(--accent);
  outline: none;
}

/* Front page match rows */
.match-teams {
  font-weight: 600;
}

.match-meta {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.85rem;
}

/* Spacer | match (centred) | result badge (far right) */
.match-cell {
  display: grid;
  grid-template-columns: minmax(3.25rem, 1fr) minmax(0, max-content) minmax(3.25rem, 1fr);
  align-items: center;
  gap: 0.5rem;
}

.match-cell > div {
  grid-column: 2;
  text-align: center;
}

.match-cell .result-badge {
  grid-column: 3;
  justify-self: end;
}

.match-cell .match-picture {
  margin-right: auto;
  margin-left: auto;
}

.result-badge {
  flex-shrink: 0;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.result-badge.won {
  color: var(--accent-ink);
  background: var(--accent);
}

.result-badge.lost {
  color: #fff;
  background: #e5484d;
}

.empty-row,
.empty-note {
  color: var(--muted);
}

/* Control room dashboard */
.control-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.control-link {
  color: var(--accent);
  text-decoration: none;
}

.control-link:hover,
.control-link:focus-visible {
  text-decoration: underline;
}

.control-day {
  margin-top: 1.5rem;
}

.control-day .match-days {
  max-width: 420px;
}

.control-date {
  margin: 0;
  color: var(--muted);
}

/* Free, VIP and VVIP counts: always one row of three */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.stat {
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.stat-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.stat-value {
  margin: 0.35rem 0 0;
  font-size: 1.75rem;
  font-weight: 800;
}

@media (max-width: 480px) {
  .stat {
    padding: 0.8rem 0.75rem;
  }

  .stat-label {
    font-size: 0.78rem;
  }
}

.control-section {
  margin-top: 2rem;
}

.control-section h2 {
  margin: 0 0 0.85rem;
  font-size: 1.1rem;
}

.match-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.85rem;
  align-items: end;
}

.match-form label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.match-form input,
.match-form select,
.result-select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
}

.match-form input:focus,
.match-form select:focus,
.result-select:focus {
  border-color: var(--accent);
  outline: none;
}

.form-actions {
  display: flex;
  gap: 0.5rem;
}

.control-primary {
  padding: 0.65rem 1.1rem;
  color: var(--accent-ink);
  background: var(--accent);
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.control-primary:hover,
.control-primary:focus-visible {
  filter: brightness(1.08);
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.form-message {
  min-height: 1.4em;
  margin: 0.6rem 0 0;
  color: var(--accent);
  font-size: 0.9rem;
}

.form-message.error {
  color: #ff6b6b;
}

.tier-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.tier-total {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.table-wrap {
  overflow-x: auto;
}

.admin-table {
  min-width: 620px;
}

.result-select {
  width: auto;
  padding: 0.35rem 0.5rem;
}

.row-actions {
  white-space: nowrap;
}

.row-action {
  margin-right: 0.35rem;
  padding: 0.35rem 0.75rem;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.row-action:hover,
.row-action:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.row-action.danger {
  color: #ff6b6b;
}

.row-action.danger:hover,
.row-action.danger:focus-visible {
  border-color: #ff6b6b;
}

/* Match pictures */
.match-cell > div {
  min-width: 0;
}

.match-picture {
  display: block;
  max-width: 7rem;
  max-height: 5rem;
  margin-top: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
  cursor: zoom-in;
}

.match-picture.expanded {
  max-width: 100%;
  max-height: none;
  cursor: zoom-out;
}

.image-field {
  display: grid;
  gap: 0.5rem;
}

.match-form input[type="file"] {
  padding: 0.5rem;
  cursor: pointer;
}

.match-form input[type="file"]::file-selector-button {
  margin-right: 0.6rem;
  padding: 0.35rem 0.75rem;
  color: var(--accent-ink);
  background: var(--accent);
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.image-preview {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.image-preview[hidden] {
  display: none;
}

.image-preview img {
  width: 4.5rem;
  height: 3.25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
}

.admin-thumb {
  display: block;
  width: 3.5rem;
  height: 2.5rem;
  border-radius: 6px;
  object-fit: cover;
}

/* Add match: table first, then slip reading */
.add-form {
  display: grid;
  gap: 1.25rem;
}

/* Table choice on the left, SportyBet screenshot upload beside it; stacked on phones */
.add-top {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 1rem 1.25rem;
  align-items: start;
}

@media (max-width: 640px) {
  .add-top {
    grid-template-columns: minmax(0, 1fr);
  }
}

.tier-pick {
  display: grid;
  gap: 0.4rem;
  max-width: 320px;
}

.tier-pick label {
  display: grid;
  gap: 0.35rem;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
}

.tier-pick select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 10px;
  font: inherit;
}

.match-fields {
  display: grid;
  gap: 1.1rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.match-fields:disabled {
  opacity: 0.45;
}

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

.form-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.image-field label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.image-field input[type="file"] {
  width: 100%;
  padding: 0.5rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  cursor: pointer;
}

.image-field input[type="file"]::file-selector-button {
  margin-right: 0.6rem;
  padding: 0.35rem 0.75rem;
  color: var(--accent-ink);
  background: var(--accent);
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.slip-results {
  display: grid;
  gap: 0.6rem;
}

.slip-results[hidden] {
  display: none;
}

.slip-results h3 {
  margin: 0;
  font-size: 1rem;
}

.slip-table td {
  padding: 0.5rem;
}

.slip-table input {
  width: 100%;
  min-width: 6rem;
  padding: 0.45rem 0.55rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.slip-table input:focus {
  border-color: var(--accent);
  outline: none;
}

.control-primary:disabled {
  opacity: 0.6;
  cursor: wait;
}

.slip-table .tip-input {
  border-color: var(--accent);
}

.slip-table .tip-input:placeholder-shown {
  background: rgba(61, 220, 132, 0.08);
}

/* Control room overview */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.overview-card {
  display: block;
  padding: 1.25rem;
  color: var(--text);
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 14px;
}

.overview-card + .overview-card {
  border-left-color: #e6c15a;
}

.overview-card:hover,
.overview-card:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.overview-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.overview-value {
  margin: 0.4rem 0 0;
  font-size: 2rem;
  font-weight: 800;
}

.overview-detail {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.gateway-status {
  padding: 0.15rem 0.6rem;
  color: #e6c15a;
  background: rgba(230, 193, 90, 0.12);
  border: 1px solid rgba(230, 193, 90, 0.4);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.gateway-note {
  margin: 0 0 0.85rem;
}

.status-badge {
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.status-badge.active {
  color: var(--accent-ink);
  background: var(--accent);
}

.status-badge.expired {
  color: #fff;
  background: #e5484d;
}

.member-search {
  grid-template-columns: minmax(0, 28rem);
  margin: 0.85rem 0 0;
}

#member-list,
#payment-list {
  margin-top: 0.5rem;
}

#members-title,
#payments-title {
  scroll-margin-top: 1rem;
}

/* Account, payment dialog and payment result */
.account-tabs {
  margin: 1.5rem 0 0;
}

.pay-dialog {
  width: min(420px, calc(100vw - 2rem));
  padding: 1.75rem 1.5rem 1.25rem;
  color: var(--text);
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
}

.pay-dialog::backdrop {
  background: rgba(4, 8, 16, 0.75);
}

.pay-dialog h2 {
  margin: 0;
  font-size: 1.4rem;
}

.fee-confirm-copy {
  margin: 0.85rem 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.fee-wait[open] {
  display: grid;
  justify-items: center;
}

.fee-loader {
  width: 3.4rem;
  height: 3.4rem;
  margin-bottom: 1rem;
  border: 3px solid rgba(61, 220, 132, 0.22);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: fee-spin 0.8s linear infinite;
}

.fee-loader[hidden] {
  display: none;
}

@keyframes fee-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .fee-loader {
    animation: none;
    border-color: var(--accent);
  }
}

#pay-confirm-close {
  margin-top: 1.1rem;
  text-decoration: none;
}

#pay-confirm-close[hidden] {
  display: none;
}

.pay-price {
  margin: 0.4rem 0 1.25rem;
  color: var(--muted);
}

.pay-options {
  display: grid;
  gap: 0.6rem;
}

.pay-options .plan-button {
  margin: 0;
}

.pay-options .plan-button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.pay-note {
  margin: 0.5rem 0 1rem;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.pay-close {
  width: 100%;
}

/* SportyBet booking code (free predictions) */
.booking-button {
  color: var(--accent-ink);
  background: var(--accent);
}

.booking-panel {
  margin-top: 0.75rem;
  padding: 1rem 1.1rem;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.booking-panel[hidden],
.booking-code-row[hidden] {
  display: none;
}

.booking-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.booking-code-row {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.booking-code {
  padding: 0.45rem 1rem;
  color: var(--accent);
  background: var(--bg);
  border: 1px dashed var(--accent);
  border-radius: 10px;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  user-select: all;
}




.booking-input {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.booking-with-match {
  grid-template-columns: 1fr;
}

/* Small phones: keep the header on one line */
/* Small phones: plan shows as the avatar's ring instead of a badge */
@media (max-width: 480px) {
  .user-chip {
    gap: 0.45rem;
    padding-right: 0.6rem;
  }

  .user-name {
    max-width: 6rem;
  }

  .user-plan {
    display: none;
  }

  .user-chip[data-plan="vip"] .user-avatar {
    box-shadow: 0 0 0 2px #e6c15a;
  }

  .user-chip[data-plan="vvip"] .user-avatar {
    box-shadow: 0 0 0 2px #b48cf2;
  }
}

/* Control Room: Payment Gateway */
.gateway-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.gateway-head h2 {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 800;
}

.gateway-card {
  margin-top: 1rem;
  padding: 1.5rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
}

.gateway-card h3 {
  margin: 0 0 1.25rem;
  font-size: 1.2rem;
  font-weight: 800;
}

.rates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem 1.5rem;
}

.rate-field label,
.gateway-field label {
  display: block;
  margin-bottom: 0.55rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.rate-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.rate-row input,
.gateway-field input,
.account-row input {
  width: 100%;
  min-width: 0;
  padding: 0.85rem 0.9rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
}

.rate-row input:focus,
.gateway-field input:focus,
.account-row input:focus {
  border-color: var(--accent);
  outline: none;
}

.round-button {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
}

.round-button svg {
  width: 1.1rem;
  height: 1.1rem;
}

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

.outline-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
}

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

.refresh-icon {
  width: 1.1rem;
  height: 1.1rem;
}

.gateway-save {
  margin-top: 1.5rem;
  padding: 0.85rem 1.5rem;
  letter-spacing: 0.04em;
}

.checkout-form {
  display: grid;
  gap: 1.1rem;
}

.method-block {
  display: grid;
  gap: 0.75rem;
}

.method-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.method-title {
  font-weight: 800;
}

.method-rows {
  display: grid;
  gap: 0.6rem;
}

.account-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 0.6rem;
  align-items: center;
}

.method-block .outline-button {
  justify-self: start;
}

/* On/off switch */
.switch {
  position: relative;
  display: inline-block;
  width: 3.25rem;
  height: 1.85rem;
  cursor: pointer;
}

.switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.switch-track {
  position: absolute;
  inset: 0;
  background: var(--line);
  border-radius: 999px;
  transition: background 0.2s;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 0.2rem;
  left: 0.2rem;
  width: 1.45rem;
  height: 1.45rem;
  background: var(--text);
  border-radius: 50%;
  transition: transform 0.2s;
}

.switch input:checked + .switch-track {
  background: var(--accent);
}

.switch input:checked + .switch-track::after {
  transform: translateX(1.4rem);
}

.switch input:focus-visible + .switch-track {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

@media (max-width: 600px) {
  .account-row {
    grid-template-columns: 1fr auto;
  }

  .account-row input {
    grid-column: 1;
  }

  .account-row .remove-row {
    grid-column: 2;
    grid-row: 1;
  }
}

/* BUY PLAN window: manual payment details */
.pay-manual {
  display: grid;
  gap: 0.75rem;
  text-align: left;
}

.pay-manual:empty {
  display: none;
}

.pay-heading {
  margin: 0.5rem 0 0;
  font-weight: 800;
  text-align: center;
}

.pay-method {
  display: grid;
  gap: 0.5rem;
}

.pay-method-title {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pay-account {
  display: grid;
  gap: 0.15rem;
  padding: 0.7rem 0.85rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.pay-account-number {
  font-weight: 800;
  letter-spacing: 0.03em;
  user-select: all;
}

.pay-account-name {
  color: var(--muted);
  font-size: 0.85rem;
}

.pay-small {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.pay-small a {
  color: var(--accent);
}

.pay-whatsapp {
  margin: 0;
  color: #fff;
  background: #25d366;
  text-align: center;
  text-decoration: none;
}

.pay-note[hidden] {
  display: none;
}

/* ---------- Soft buttons (all pages) ---------- */
button,
.plan-button,
.admin-button,
.admin-submit,
.booking-join,
.pay-whatsapp {
  transition:
    transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.3s ease,
    background-color 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease,
    filter 0.3s ease;
}

button:not(:disabled):not(.toggle-passcode):hover,
.plan-button:hover,
.admin-button:hover,
.admin-submit:hover,
.booking-join:hover,
.pay-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

button:not(:disabled):not(.toggle-passcode):active,
.plan-button:active,
.admin-button:active,
.admin-submit:active,
.booking-join:active,
.pay-whatsapp:active {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  transition-duration: 0.1s;
}

/* Pop into view on page load (added by ui.js), 2 seconds with a soft bounce */
.pop-in {
  animation: button-pop 2s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--pop-delay, 0s);
}

@keyframes button-pop {
  0% {
    opacity: 0;
    transform: scale(0.6);
  }
  35% {
    opacity: 1;
    transform: scale(1.06);
  }
  55% {
    transform: scale(0.97);
  }
  75% {
    transform: scale(1.015);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  button,
  .plan-button,
  .admin-button,
  .admin-submit,
  .booking-join,
  .pay-whatsapp {
    transition-duration: 0.01s;
  }

  button:not(:disabled):not(.toggle-passcode):hover,
  .plan-button:hover,
  .admin-button:hover,
  .admin-submit:hover,
  .booking-join:hover,
  .pay-whatsapp:hover {
    transform: none;
  }
}

/* ---------- Attention-grabbing buttons under the tables ---------- */
.table-cta {
  --glow: 61, 220, 132; /* green: free booking code */
  position: relative;
  overflow: hidden;
  padding-right: 2.75rem;
  padding-left: 2.75rem;
}

.table-cta:disabled {
  cursor: not-allowed;
  opacity: 0.72;
  filter: grayscale(0.4);
}

.table-cta.vip-plan {
  --glow: 230, 193, 90; /* gold */
}

.table-cta.vvip-plan {
  --glow: 180, 140, 242; /* purple */
}

/* Light streak sweeping across */
.table-cta::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 45%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-20deg);
  pointer-events: none;
}

/* Arrow nudging toward the tap */
.table-cta::before {
  content: "→";
  position: absolute;
  top: 50%;
  right: 1.1rem;
  margin-top: -0.6em;
  line-height: 1.2;
  font-weight: 800;
  pointer-events: none;
}

/* Start after the page-load pop-in has finished */
.table-cta:not(.pop-in) {
  animation: cta-glow 2.4s ease-in-out infinite;
}

.table-cta:not(.pop-in)::after {
  animation: cta-shine 3.6s ease-in-out infinite;
}

.table-cta:not(.pop-in)::before {
  animation: cta-nudge 1.2s ease-in-out infinite;
}

.table-cta:hover,
.table-cta:hover::after,
.table-cta:hover::before,
.table-cta:focus-visible,
.table-cta:focus-visible::after,
.table-cta:focus-visible::before {
  animation-play-state: paused;
}

@keyframes cta-glow {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(var(--glow), 0.55), 0 4px 14px rgba(var(--glow), 0.25);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(var(--glow), 0), 0 6px 24px rgba(var(--glow), 0.45);
  }
}

@keyframes cta-shine {
  0%,
  55% {
    left: -60%;
  }
  85%,
  100% {
    left: 130%;
  }
}

@keyframes cta-nudge {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(5px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .table-cta:not(.pop-in),
  .table-cta:not(.pop-in)::after,
  .table-cta:not(.pop-in)::before {
    animation: none;
  }

  .table-cta::after {
    display: none;
  }
}

/* ---------- Testimonials carousel (under the VVIP table) ---------- */
.testimonials {
  margin-top: 1.75rem;
  padding: 1.5rem 1.25rem 1.1rem;
  text-align: center;
  background: linear-gradient(160deg, rgba(180, 140, 242, 0.12), rgba(230, 193, 90, 0.06));
  border: 1px solid rgba(180, 140, 242, 0.35);
  border-radius: 18px;
}

.testimonials[hidden] {
  display: none;
}

.testimonials-title {
  margin: 0 0 1rem;
  font-family: "Bebas Neue", "Arial Narrow", Impact, sans-serif;
  font-size: 1.6rem;
  font-weight: 400;
  letter-spacing: 0.08em;
}

.testimonial-viewport {
  min-height: 9.5rem;
}

.testimonial {
  margin: 0;
}

.testimonial.is-entering {
  animation: testimonial-in 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes testimonial-in {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.testimonial-stars {
  margin: 0;
  color: #e6c15a;
  font-size: 1.3rem;
  letter-spacing: 0.15em;
}

.testimonial-message {
  margin: 0.6rem auto 0;
  max-width: 34rem;
  font-family: "Poppins", "Segoe UI", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.6;
}

.testimonial-author {
  display: grid;
  gap: 0.1rem;
  margin-top: 0.85rem;
}

.testimonial-name {
  font-weight: 800;
}

.testimonial-location {
  color: var(--muted);
  font-size: 0.85rem;
}

.testimonial-dots {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 1rem;
}

.testimonial-dots[hidden] {
  display: none;
}

.testimonial-dot {
  width: 0.6rem;
  height: 0.6rem;
  padding: 0;
  background: var(--line);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.testimonial-dot[aria-pressed="true"] {
  width: 1.6rem;
  background: #b48cf2;
}

/* The small dots skip the shared hover lift */
.testimonial-dot:hover {
  transform: none;
  box-shadow: none;
  background: #b48cf2;
}

@media (prefers-reduced-motion: reduce) {
  .testimonial.is-entering {
    animation: none;
  }
}

.testimonial-message-field {
  grid-column: 1 / -1;
}

.match-form textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  resize: vertical;
}

.match-form textarea:focus {
  border-color: var(--accent);
  outline: none;
}

/* ---------- Leave a review ---------- */
.testimonial-carousel[hidden],
.testimonials-empty[hidden],
.review-form[hidden],
.review-status[hidden] {
  display: none;
}

.testimonials-empty {
  margin: 0 0 0.5rem;
  color: var(--muted);
}

.review-open {
  margin-top: 1.1rem;
  color: #e6c15a;
  border-color: rgba(230, 193, 90, 0.5);
}

.review-form {
  display: grid;
  gap: 0.45rem;
  max-width: 28rem;
  margin: 1rem auto 0;
  text-align: left;
}

.review-form label {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.review-form input:not([type="radio"]),
.review-form textarea {
  width: 100%;
  padding: 0.7rem 0.8rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  resize: vertical;
}

.review-form input:focus,
.review-form textarea:focus {
  border-color: #b48cf2;
  outline: none;
}

.review-form .plan-button {
  margin-top: 0.75rem;
}

.review-status {
  margin: 0.6rem 0 0;
  color: #e6c15a;
  font-size: 0.9rem;
  text-align: center;
}

/* Stars light up from the left as you hover or choose (inputs are in reverse order). */
.star-picker {
  display: flex;
  flex-direction: row-reverse;
  justify-content: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.star-picker legend {
  width: 100%;
  margin-bottom: 0.25rem;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

.star-picker input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.star-picker label {
  margin: 0;
  color: var(--line);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s, transform 0.2s;
}

.star-picker input:checked ~ label,
.star-picker label:hover,
.star-picker label:hover ~ label {
  color: #e6c15a;
}

.star-picker label:hover {
  transform: scale(1.15);
}

.star-picker input:focus-visible + label {
  outline: 2px solid #e6c15a;
  outline-offset: 2px;
  border-radius: 4px;
}

.subsection-title {
  margin: 1.5rem 0 0.35rem;
  font-size: 1rem;
}

.row-action.accept {
  color: var(--accent);
  border-color: rgba(61, 220, 132, 0.5);
}

.row-action.accept:hover,
.row-action.accept:focus-visible {
  color: var(--accent-ink);
  background: var(--accent);
}

/* Footer: mission across the top, disclaimer in the first column */
.footer-mission {
  max-width: 720px;
  margin: 0 auto 3.25rem;
  padding-bottom: 2.5rem;
  text-align: center;
  border-bottom: 1px solid var(--line);
}

/* Lit up for a second when reached from the menu */
.footer-mission {
  border-radius: 14px;
  outline: 2px solid transparent;
  outline-offset: 14px;
  transition:
    outline-color 0.35s ease,
    box-shadow 0.35s ease;
}

.footer-mission.is-highlighted {
  outline-color: var(--accent);
  box-shadow: 0 0 0 14px rgba(61, 220, 132, 0.1), 0 0 40px 14px rgba(61, 220, 132, 0.2);
}

.footer-mission .footer-tagline {
  max-width: 40rem;
  margin-right: auto;
  margin-left: auto;
}

/* Disclaimer: its own centred block under Our Mission, same width and
   divider, with the Links / Support / Follow us columns below it */
.footer-brand {
  grid-column: 1 / -1;
  justify-self: center;
  width: 100%;
  max-width: 720px;
  margin-bottom: 1rem;
  padding-bottom: 2.5rem;
  text-align: center;
  border-bottom: 1px solid var(--line);
}

/* Same heading as Our Mission, in warning red */
.footer-disclaimer-title {
  margin: 0;
}

.footer-disclaimer-title span {
  color: #ff6b6b;
  text-shadow: 0 0 18px rgba(255, 107, 107, 0.35);
}

.footer-disclaimer {
  max-width: 40rem;
  margin: 0.6rem auto 0;
  padding: 0;
  border: 0;
  text-align: center;
}

/* ---------- Back button (all pages) ---------- */
.back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding: 0.65rem 1.25rem 0.65rem 1rem;
  color: var(--text);
  background: rgba(61, 220, 132, 0.08);
  border: 1px solid rgba(61, 220, 132, 0.45);
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition:
    transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
    background-color 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease,
    box-shadow 0.3s ease;
}

.admin-card .back-button {
  color: var(--text);
}

.back-arrow {
  display: inline-grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: 50%;
  font-size: 0.95rem;
  line-height: 1;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.back-button:hover,
.back-button:focus-visible {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 8px 22px rgba(61, 220, 132, 0.25);
  transform: translateY(-2px);
  outline: none;
}

.back-button:hover .back-arrow,
.back-button:focus-visible .back-arrow {
  color: var(--accent);
  background: var(--accent-ink);
  transform: translateX(-4px);
}

.back-button:active {
  transform: scale(0.97);
}

.back-button[hidden] {
  display: none;
}

/* Control Room header version sits inline, no top margin */
.control-back {
  margin-top: 0;
}

@media (prefers-reduced-motion: reduce) {
  .back-button,
  .back-arrow {
    transition-duration: 0.01s;
  }

  .back-button:hover,
  .back-button:hover .back-arrow {
    transform: none;
  }
}

/* ---------- Menu: Calendar and Telegram ---------- */
.site-menu .menu-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.7rem 0.85rem;
  color: var(--text);
  text-align: left;
  text-decoration: none;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  font: inherit;
  cursor: pointer;
}

.site-menu .menu-item:hover,
.site-menu .menu-item:focus-visible {
  border-color: var(--line);
  outline: none;
  transform: none;
  box-shadow: none;
}

.menu-icon {
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  color: var(--accent);
}

.site-menu .menu-telegram {
  margin-top: 0.5rem;
  color: #fff;
  background: rgba(34, 158, 217, 0.14);
  border-color: rgba(34, 158, 217, 0.45);
  font-weight: 700;
}

.site-menu .menu-telegram:hover,
.site-menu .menu-telegram:focus-visible {
  background: #229ed9;
  border-color: #229ed9;
}


.day-custom[hidden] {
  display: none;
}

.icon-vip {
  color: #e6c15a;
}

.icon-vvip {
  color: #b48cf2;
}

/* Menu entries: clear, friendly text */
.site-menu .menu-item {
  font-family: "Poppins", "Segoe UI", system-ui, sans-serif;
  font-size: 0.98rem;
  font-weight: 400;
}

.site-menu .menu-item .menu-icon {
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.site-menu .menu-item:hover .menu-icon,
.site-menu .menu-item:focus-visible .menu-icon {
  transform: scale(1.18);
}

/* ---------- Smooth menu: panel slides, entries glide in, button morphs ---------- */
/* The panel stays laid out while hidden so it can slide instead of popping. */
.site-menu,
.site-menu[hidden] {
  display: flex;
}

.site-menu {
  transform: translateX(0);
  visibility: visible;
  transition:
    transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0s;
}

/* Pushed past its own shadow so no edge peeks out */
.site-menu[hidden] {
  transform: translateX(calc(-100% - 48px));
  visibility: hidden;
  transition:
    transform 0.3s cubic-bezier(0.55, 0, 0.75, 0.2),
    visibility 0s linear 0.3s;
}

/* Entries fade and glide in one after another when the menu opens */
.site-menu > * {
  opacity: 1;
  translate: 0 0;
  transition:
    opacity 0.32s ease calc(0.08s + var(--i, 0) * 0.04s),
    translate 0.4s cubic-bezier(0.22, 1, 0.36, 1) calc(0.08s + var(--i, 0) * 0.04s);
}

.site-menu[hidden] > * {
  opacity: 0;
  translate: -16px 0;
  transition: opacity 0.15s ease, translate 0.15s ease;
}

.site-menu > :nth-child(2) { --i: 1; }
.site-menu > :nth-child(3) { --i: 2; }
.site-menu > :nth-child(4) { --i: 3; }
.site-menu > :nth-child(5) { --i: 4; }
.site-menu > :nth-child(6) { --i: 5; }
.site-menu > :nth-child(7) { --i: 6; }
.site-menu > :nth-child(8) { --i: 7; }
.site-menu > :nth-child(n + 9) { --i: 8; }

/* Entry hover: soft tint and a small nudge to the right */
.site-menu .menu-item {
  transition:
    opacity 0.32s ease calc(0.08s + var(--i, 0) * 0.04s),
    translate 0.4s cubic-bezier(0.22, 1, 0.36, 1) calc(0.08s + var(--i, 0) * 0.04s),
    background-color 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease,
    padding-left 0.25s ease;
}

.site-menu .menu-item:hover,
.site-menu .menu-item:focus-visible {
  padding-left: 1.1rem;
  background: rgba(255, 255, 255, 0.05);
}

.site-menu .menu-item:active {
  background: rgba(255, 255, 255, 0.09);
}

.site-menu .menu-telegram:hover,
.site-menu .menu-telegram:focus-visible {
  background: #229ed9;
}

/* Menu button: soft hover, gentle press, bars morph into an X */
.menu-toggle {
  transition:
    border-color 0.25s ease,
    background-color 0.25s ease,
    transform 0.15s ease;
}

.menu-toggle:hover,
.menu-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.05);
}

.menu-toggle:active {
  transform: scale(0.92);
}

/* Closing: straighten first, then spread apart */
.menu-bars {
  transition: background-color 0.1s ease 0.2s;
}

.menu-bars::before,
.menu-bars::after {
  transition:
    top 0.2s ease 0.2s,
    transform 0.2s ease;
}

/* Opening: come together first, then turn */
.menu-toggle[aria-expanded="true"] .menu-bars {
  transition: background-color 0.1s ease;
}

.menu-toggle[aria-expanded="true"] .menu-bars::before,
.menu-toggle[aria-expanded="true"] .menu-bars::after {
  transition:
    top 0.2s ease,
    transform 0.2s ease 0.2s;
}

@media (prefers-reduced-motion: reduce) {
  .site-menu,
  .site-menu[hidden],
  .site-menu > *,
  .site-menu[hidden] > *,
  .site-menu .menu-item,
  .menu-toggle,
  .menu-bars,
  .menu-bars::before,
  .menu-bars::after,
  .menu-toggle[aria-expanded="true"] .menu-bars,
  .menu-toggle[aria-expanded="true"] .menu-bars::before,
  .menu-toggle[aria-expanded="true"] .menu-bars::after {
    transition: none;
  }
}

/* Home page tables: headings and team names in the middle */
#free th,
#free td,
#vip th,
#vip td,
#vvip th,
#vvip td {
  text-align: center;
}

.migrate-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  background: rgba(230, 193, 90, 0.1);
  border: 1px solid rgba(230, 193, 90, 0.45);
  border-radius: 14px;
}

.migrate-banner[hidden] {
  display: none;
}

.migrate-banner p {
  margin: 0;
  flex: 1 1 18rem;
  line-height: 1.5;
}

/* ---------- Control Room header ---------- */
.control-bar .control-title {
  font-family: "Bebas Neue", "Arial Narrow", Impact, sans-serif;
  font-size: clamp(2rem, 6vw, 2.75rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.08em;
  color: var(--text);
}

.control-title span {
  color: var(--accent);
  background: linear-gradient(100deg, var(--accent), #e6c15a 60%, #b48cf2);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Smaller "View site" and "Sign out" buttons */
.control-small {
  padding: 0.35rem 0.8rem;
  font-size: 0.8rem;
}

.control-small .back-arrow {
  width: 1.25rem;
  height: 1.25rem;
  font-size: 0.8rem;
}

.control-actions {
  gap: 0.5rem;
}

/* One overview card now: keep it a sensible width */
.overview-grid {
  grid-template-columns: minmax(0, 420px);
}

/* =====================================================================
   App-like Control Room & admin pages (iPhone, Android and desktop)
   ===================================================================== */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

button,
a,
input,
select,
textarea,
label {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* iPhone zooms in on inputs smaller than 16px; keep them at 16px on phones. */
@media (max-width: 760px) {
  input,
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* Comfortable finger-sized targets on touch screens */
@media (pointer: coarse) {
  .control-room .control-primary,
  .control-room .outline-button,
  .control-room .row-action,
  .control-room .day-button,
  .control-room .control-sign-out,
  .admin-submit {
    min-height: 44px;
  }

  .control-room .round-button {
    width: 44px;
    height: 44px;
  }
}

/* Gateway rates: never wider than a small phone */
.rates-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
}

/* ---------- Control Room shell ---------- */
html:has(body.control-room) {
  height: 100%;
  overflow: hidden;
}

.control-room {
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  overscroll-behavior: none;
}

.control-room .control-main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: min(1100px, 100%);
  padding-top: 0;
  padding-bottom: 0;
  padding-right: max(1rem, env(safe-area-inset-right));
  padding-left: max(1rem, env(safe-area-inset-left));
}

/* Top bar stays put. The open section is the only thing that moves. */
.control-room .control-bar {
  position: static;
  flex-shrink: 0;
  z-index: 20;
  margin: 0 -1rem;
  padding: calc(0.75rem + env(safe-area-inset-top)) 1rem 0.75rem;
  background: rgba(12, 20, 36, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.control-room .migrate-banner,
.control-room .control-day {
  flex-shrink: 0;
}

.control-stage {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding-bottom: 1.25rem;
}

.control-panel[hidden],
.control-room .control-day[hidden] {
  display: none;
}

/* ---------- Section tabs ---------- */
.app-nav {
  position: fixed;
  z-index: 40;
  display: flex;
  background: rgba(15, 24, 41, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.app-nav-brand {
  display: none;
  margin: 0 0 1.25rem;
  padding: 0 0.75rem;
  font-family: "Bebas Neue", "Arial Narrow", Impact, sans-serif;
  font-size: 1.9rem;
  letter-spacing: 0.08em;
}

.app-nav-brand span {
  color: var(--accent);
}

.app-nav-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
  border-radius: 12px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.app-nav-link svg {
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.app-nav-link:hover,
.app-nav-link:focus-visible {
  color: var(--text);
  outline: none;
}

.app-nav-link.is-active {
  color: var(--accent);
}

.app-nav-link.is-active svg {
  transform: scale(1.12);
}

/* Phones and tablets: bottom tab bar */
@media (max-width: 1023px) {
  .app-nav {
    right: 0;
    bottom: 0;
    left: 0;
    justify-content: space-around;
    padding: 0.35rem max(0.5rem, env(safe-area-inset-right)) calc(0.35rem + env(safe-area-inset-bottom)) max(0.5rem, env(safe-area-inset-left));
    border-top: 1px solid var(--line);
  }

  .app-nav-link {
    flex: 1;
    flex-direction: column;
    gap: 0.2rem;
    max-width: 6rem;
    padding: 0.4rem 0.25rem;
    font-size: 0.68rem;
    letter-spacing: 0.02em;
  }

  .app-nav-link.is-active {
    background: rgba(61, 220, 132, 0.12);
  }

  /* Room for the tab bar under the open section */
  .control-stage {
    padding-bottom: calc(5.25rem + env(safe-area-inset-bottom));
  }
}

/* Desktop: sidebar */
@media (min-width: 1024px) {
  .app-nav {
    top: 0;
    bottom: 0;
    left: 0;
    flex-direction: column;
    gap: 0.25rem;
    width: 220px;
    padding: 1.5rem 0.85rem;
    border-right: 1px solid var(--line);
  }

  .app-nav-brand {
    display: block;
  }

  .app-nav-link {
    padding: 0.75rem 0.85rem;
    font-size: 0.95rem;
  }

  .app-nav-link:hover {
    background: rgba(255, 255, 255, 0.04);
  }

  .app-nav-link.is-active {
    background: rgba(61, 220, 132, 0.12);
  }

  .control-room {
    padding-left: 220px;
  }
}

/* ---------- Phones: tables become cards ---------- */
@media (max-width: 640px) {
  .control-room .admin-table,
  .control-room .slip-table {
    min-width: 0;
    background: transparent;
    border: 0;
  }

  .control-room .admin-table thead,
  .control-room .slip-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .control-room .admin-table tbody,
  .control-room .slip-table tbody {
    display: grid;
    gap: 0.75rem;
  }

  .control-room .admin-table tr,
  .control-room .slip-table tr {
    display: grid;
    gap: 0.35rem;
    padding: 0.85rem 1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
  }

  .control-room .admin-table td,
  .control-room .slip-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.2rem 0;
    text-align: right;
    border: 0;
    overflow-wrap: anywhere;
  }

  .control-room .admin-table td::before,
  .control-room .slip-table td::before {
    content: attr(data-label);
    flex-shrink: 0;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-align: left;
    text-transform: uppercase;
  }

  /* Cells without a heading (actions) fill the card width */
  .control-room .admin-table td[data-label=""],
  .control-room .admin-table td.row-actions,
  .control-room .slip-table td[data-label=""] {
    justify-content: flex-end;
    padding-top: 0.5rem;
    border-top: 1px solid var(--line);
  }

  .control-room .admin-table td[data-label=""]::before,
  .control-room .slip-table td[data-label=""]::before {
    content: none;
  }

  .control-room .slip-table td {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    gap: 0.3rem;
  }

  .control-room .table-wrap {
    overflow: visible;
  }

  /* Header: compact single row, like an app bar */
  .control-room .control-bar {
    gap: 0.5rem;
    padding-bottom: 0.6rem;
  }

  .control-room .control-bar .control-title {
    font-size: 1.7rem;
    letter-spacing: 0.05em;
    white-space: nowrap;
  }

  .control-room .control-actions {
    flex-shrink: 0;
  }

  .control-room .control-small {
    min-height: 36px;
    padding: 0.3rem 0.65rem;
  }

  /* Booking code: full-width box, buttons underneath */
  .control-room #booking-form {
    grid-template-columns: 1fr;
  }

  .control-room .gateway-card {
    padding: 1.25rem 1rem;
    border-radius: 18px;
  }

  .control-room .gateway-head h2 {
    font-size: 1.5rem;
  }

  .control-room .control-day .match-days {
    max-width: none;
  }

  .control-room .form-actions {
    flex-wrap: wrap;
  }

  .control-room .form-actions > * {
    flex: 1 1 auto;
  }
}

/* ---------- Admin passcode page: fits notched phones ---------- */
.admin-page {
  min-height: 100dvh;
  padding: max(1.5rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1.5rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
}

@media (max-width: 420px) {
  .admin-card {
    padding: 1.75rem 1.25rem;
    border-radius: 20px;
  }

  .admin-card h1 {
    font-size: 1.6rem;
  }
}

/* ---------- Results calendar ---------- */
.calendar-dialog {
  width: min(400px, calc(100vw - 1.5rem));
  padding: 1.25rem 1rem 1rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
}

.calendar-dialog::backdrop {
  background: rgba(4, 8, 16, 0.75);
  backdrop-filter: blur(4px);
}

.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.calendar-title {
  margin: 0;
  font-family: "Bebas Neue", "Arial Narrow", Impact, sans-serif;
  font-size: 1.75rem;
  font-weight: 400;
  letter-spacing: 0.06em;
}

.calendar-nav {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.calendar-nav:hover:not(:disabled),
.calendar-nav:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
  outline: none;
}

.calendar-nav:disabled {
  opacity: 0.3;
  cursor: default;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.3rem;
}

.calendar-weekdays span {
  padding-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
}

.calendar-cell {
  position: relative;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 0.1rem;
  aspect-ratio: 1 / 1.1;
  min-width: 0;
  padding: 0.3rem 0.1rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid transparent;
  border-radius: 10px;
  font: inherit;
  cursor: pointer;
}

.calendar-cell.is-blank {
  background: transparent;
  cursor: default;
}

/* Calendar cells keep still on hover (no shared button lift) */
.calendar-cell:hover:not(:disabled) {
  transform: none;
  box-shadow: none;
  border-color: var(--accent);
}

.calendar-cell:disabled {
  opacity: 0.3;
  cursor: default;
}

.calendar-cell.is-today {
  border-color: rgba(61, 220, 132, 0.6);
}

.calendar-cell.is-selected {
  color: var(--accent-ink);
  background: var(--accent);
}

.calendar-day {
  font-size: 0.95rem;
  font-weight: 700;
}

.calendar-score {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.dot {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
}

.dot.won {
  background: var(--accent);
}

.dot.lost {
  background: #e5484d;
}

.dot.pending {
  background: var(--muted);
}

.calendar-cell.is-selected .dot {
  box-shadow: 0 0 0 2px var(--accent-ink);
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1rem;
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.calendar-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 1rem;
}

.calendar-actions button {
  justify-content: center;
}

/* ---------- Recovery ticket ---------- */
.icon-recovery {
  color: #ff8a65;
}

.recovery-dialog {
  width: min(420px, calc(100vw - 1.5rem));
  padding: 1.5rem 1.25rem 1.1rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid rgba(255, 138, 101, 0.4);
  border-radius: 22px;
}

.recovery-dialog::backdrop {
  background: rgba(4, 8, 16, 0.75);
  backdrop-filter: blur(4px);
}

.recovery-title {
  margin: 0;
  font-family: "Bebas Neue", "Arial Narrow", Impact, sans-serif;
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-align: center;
}

.recovery-title span {
  color: #ff8a65;
}

.recovery-intro {
  margin: 0.5rem 0 1.1rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
  text-align: center;
}

.recovery-form {
  display: grid;
  gap: 0.45rem;
}

.recovery-form label {
  color: var(--muted);
  font-size: 0.85rem;
}

.recovery-form input {
  width: 100%;
  padding: 0.8rem 0.9rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
}

.recovery-form input:focus {
  border-color: #ff8a65;
  outline: none;
}

.recovery-submit {
  margin-top: 0.5rem;
  color: #2b0f05;
  background: #ff8a65;
}

.recovery-submit:disabled {
  opacity: 0.7;
  cursor: wait;
}

.recovery-result {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.recovery-result[hidden] {
  display: none;
}

.recovery-result[data-status="eligible"] {
  border-color: var(--accent);
}

.recovery-result[data-status="won"] {
  border-color: #e6c15a;
}

.recovery-result[data-status="error"],
.recovery-result[data-status="expired"],
.recovery-result[data-status="none"] {
  border-color: #ff6b6b;
}

.recovery-message {
  margin: 0;
  line-height: 1.5;
}

.recovery-tips {
  display: grid;
  gap: 0.5rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.recovery-tips:empty {
  display: none;
}

.recovery-tips li {
  display: grid;
  gap: 0.15rem;
  padding: 0.6rem 0.75rem;
  background: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
}

.recovery-teams {
  font-weight: 800;
}

.recovery-detail {
  color: var(--muted);
  font-size: 0.85rem;
}

.recovery-close {
  width: 100%;
  margin-top: 1rem;
}

/* Reviews sit in their own block after all the tables; the divider above spaces it. */
.testimonials-block {
  margin-top: 0;
}

/* ---------- Control Room: Payment Gateway matches the other sections ---------- */
.control-room .gateway-head h2 {
  font-size: 1.1rem;
  font-weight: 700;
}

.control-room .gateway-card {
  padding: 1.1rem 1rem;
  border-radius: 14px;
}

.control-room .gateway-card h3 {
  margin: 0 0 0.85rem;
  font-size: 1rem;
  font-weight: 700;
}

.control-room .rate-field label,
.control-room .gateway-field label {
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
}

.control-room .rate-row input,
.control-room .gateway-field input,
.control-room .account-row input {
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
}

.control-room .gateway-save {
  margin-top: 1.1rem;
  padding: 0.65rem 1.1rem;
  letter-spacing: normal;
}

.control-room .outline-button {
  font-weight: 700;
}


/* ---------- Control Room: SportyBet booking code heading ---------- */
.control-section h2.booking-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.75rem;
  margin-bottom: 1rem;
}

.booking-heading-icon {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  color: var(--accent);
  background: rgba(61, 220, 132, 0.12);
  border: 1px solid rgba(61, 220, 132, 0.4);
  border-radius: 12px;
  box-shadow: 0 0 18px rgba(61, 220, 132, 0.15);
}

.booking-heading-icon svg {
  width: 1.4rem;
  height: 1.4rem;
  transform: rotate(-12deg);
}

.booking-heading-text {
  font-family: "Bebas Neue", "Arial Narrow", Impact, sans-serif;
  font-size: 1.8rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.06em;
  color: var(--text);
}

.booking-heading-text span {
  color: var(--accent);
}

.booking-heading-tag {
  padding: 0.25rem 0.65rem;
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---------- Control Room: brand block at the top left ---------- */
.control-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}

/* "OG" tile in the site's green-gold-purple blend */
.control-logo {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 3rem;
  height: 3rem;
  color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent), #e6c15a 60%, #b48cf2);
  border-radius: 14px;
  box-shadow: 0 6px 22px rgba(61, 220, 132, 0.28), inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  font-family: "Bebas Neue", "Arial Narrow", Impact, sans-serif;
  font-size: 1.55rem;
  letter-spacing: 0.04em;
  line-height: 1;
}

.control-brand-text {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
}

.control-bar .control-brand .control-title {
  margin: 0;
}

/* "ROOM" shimmers slowly through the blend */
.control-title span {
  background-size: 200% 100%;
  animation: control-shimmer 6s ease-in-out infinite;
}

@keyframes control-shimmer {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.control-tagline {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.live-dot {
  width: 0.5rem;
  height: 0.5rem;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.6);
  animation: live-pulse 2s ease-out infinite;
}

@keyframes live-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.6);
  }
  70%,
  100% {
    box-shadow: 0 0 0 7px rgba(61, 220, 132, 0);
  }
}

/* Phones: smaller tile, title only, so the buttons still fit */
@media (max-width: 600px) {
  .control-brand {
    gap: 0.55rem;
  }

  .control-logo {
    width: 2.3rem;
    height: 2.3rem;
    border-radius: 11px;
    font-size: 1.2rem;
  }

  .control-tagline {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .control-title span,
  .live-dot {
    animation: none;
  }
}

/* Phones: "View site" shrinks to its arrow so the brand block has room */
@media (max-width: 600px) {
  .control-room .control-back {
    gap: 0;
    padding: 0.3rem;
  }

  .control-back-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

/* ---------- Control Room: Members table (stays a table on phones; scrolls sideways) ---------- */
.members-table {
  min-width: 640px;
  /* Visible, so the pinned name column can stick inside the scrolling wrapper */
  overflow: visible;
}

.members-table th,
.members-table td {
  padding: 0.75rem 0.9rem;
  white-space: nowrap;
}

.members-table th {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Solid colours, so text scrolling under the pinned name doesn't show through */
.members-table tbody tr:hover td {
  background: #182b38;
}

/* The name stays in view while the rest scrolls */
.members-table th:first-child,
.members-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  font-weight: 700;
}

.members-table td:first-child {
  background: var(--surface);
  box-shadow: 1px 0 0 var(--line);
}

.members-table tbody tr:hover td:first-child {
  background: #182b38;
}

.members-table td:nth-child(2) {
  color: var(--muted);
}

.plan-pill {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.paid-amount {
  display: block;
  font-variant-numeric: tabular-nums;
}

.paid-amount + .paid-amount {
  margin-top: 0.2rem;
}

.plan-pill.plan-free {
  color: var(--accent);
}

.plan-pill.plan-vip {
  color: #e6c15a;
  background: rgba(230, 193, 90, 0.12);
}

.plan-pill.plan-vvip {
  color: #b48cf2;
  background: rgba(180, 140, 242, 0.14);
}

/* Rounded frame sits on the scrolling wrapper instead of the table */
.control-room .table-wrap:has(> .members-table) {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.members-table {
  border: 0;
  border-radius: 0;
}

/* ---------- Responsive touch-ups (iPhone, Android, desktop) ---------- */
/* Wide screens: room for the member's full name in the header */
@media (min-width: 900px) {
  .user-name {
    max-width: 18rem;
  }
}

/* Small Android phones: table buttons stay on one line */
@media (max-width: 380px) {
  .table-cta {
    padding-right: 2.25rem;
    padding-left: 1.25rem;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
  }
}

/* Members table on phones: one card per account, with the amount they paid */
@media (max-width: 640px) {
  .control-room .table-wrap:has(> .members-table) {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .control-room .members-table {
    min-width: 0;
    background: transparent;
    border: 0;
  }

  .control-room .members-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .control-room .members-table tbody {
    display: grid;
    gap: 0.75rem;
  }

  .control-room .members-table tr {
    display: grid;
    gap: 0.35rem;
    padding: 0.85rem 1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
  }

  .control-room .members-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    max-width: none;
    padding: 0.2rem 0;
    overflow: visible;
    white-space: normal;
    text-overflow: clip;
    background: transparent;
    box-shadow: none;
    position: static;
    border: 0;
  }

  .control-room .members-table td::before {
    content: attr(data-label);
    flex-shrink: 0;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .control-room .members-table td:has(.paid-amount) {
    flex-direction: column;
    align-items: stretch;
  }

  .control-room .members-table .paid-amount {
    text-align: right;
  }
}

/* Members: receipts sent from the buy-plan page */
#member-list + .table-wrap {
  margin-top: 1.25rem;
}

#member-list + .table-wrap .admin-table {
  min-width: 0;
  table-layout: fixed;
}

#member-list + .table-wrap th,
#member-list + .table-wrap td {
  padding: 0.65rem 0.45rem;
}

#member-list + .table-wrap td:nth-child(2) {
  overflow-wrap: anywhere;
}

#member-list + .table-wrap th:nth-child(1),
#member-list + .table-wrap td:nth-child(1) {
  width: 18%;
}

#member-list + .table-wrap th:nth-child(2),
#member-list + .table-wrap td:nth-child(2) {
  width: 28%;
}

#member-list + .table-wrap th:nth-child(3),
#member-list + .table-wrap td:nth-child(3) {
  width: 12%;
}

#member-list + .table-wrap th:nth-child(4),
#member-list + .table-wrap td:nth-child(4) {
  width: 18%;
}

#member-list + .table-wrap th:nth-child(5),
#member-list + .table-wrap td:nth-child(5) {
  width: 24%;
}

.payment-status {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}

.payment-status[data-status="confirmed"] {
  color: var(--accent);
}

.payment-status[data-status="rejected"] {
  color: #ff8d8d;
}

@media (max-width: 640px) {
  #member-list + .table-wrap .admin-table {
    table-layout: auto;
  }

  #member-list + .table-wrap th:nth-child(n),
  #member-list + .table-wrap td:nth-child(n) {
    width: auto;
  }

  #member-list + .table-wrap td.row-actions {
    flex-direction: column;
    align-items: stretch;
  }

  #member-list + .table-wrap td.row-actions::before {
    content: none;
  }
}

#member-list + .table-wrap .row-action {
  display: block;
  width: 100%;
  margin: 0.2rem 0;
  padding: 0.3rem 0.4rem;
  font-size: 0.75rem;
  text-align: center;
  white-space: nowrap;
}

/* ---------- Buy plan page ---------- */
.pay-main {
  width: min(440px, calc(100% - 1.5rem));
  margin: 0 auto;
  padding: 0.25rem 0 2.5rem;
}

.pay-back {
  margin-top: 1rem;
}

.pay-loading,
.pay-empty {
  margin: 1.5rem 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.pay-sheet {
  margin-top: 1rem;
  padding: 1.35rem 1.05rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.pay-sheet h1 {
  margin: 0 0 1.05rem;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: center;
}

.fee-intro {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
}

.fee-icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  color: var(--accent);
  border: 1px solid rgba(61, 220, 132, 0.45);
  border-radius: 14px;
}

.fee-icon svg,
.fee-shield svg,
.fee-copy-btn svg {
  width: 1.35rem;
  height: 1.35rem;
}

.fee-kicker {
  margin: 0;
  font-weight: 700;
}

.fee-copy {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.fee-amount {
  position: relative;
  margin: 1rem 0;
  padding: 0.8rem 3rem 0.9rem 1rem;
  border: 1px solid rgba(61, 220, 132, 0.45);
  border-radius: 18px;
}

.fee-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.fee-sum {
  margin: 0.15rem 0 0;
  color: var(--accent);
  font-size: 2rem;
  font-weight: 800;
}

.fee-shield {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  color: var(--accent);
}

.fee-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.75rem;
}

.fee-picker[hidden] {
  display: none;
}

.fee-pick {
  padding: 0.35rem 0.7rem;
  color: var(--accent);
  background: transparent;
  border: 1px solid rgba(61, 220, 132, 0.4);
  border-radius: 999px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
}

.fee-pick[aria-pressed="true"] {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}

.fee-details {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}

.fee-details > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0.95rem;
  border-top: 1px solid var(--line);
}

.fee-details > div:first-child {
  border-top: 0;
}

.fee-details dt {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.fee-details dd {
  margin: 0;
  font-weight: 800;
  text-align: right;
}

.fee-sendto {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.fee-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0.28rem 0.55rem;
  color: var(--accent);
  background: transparent;
  border: 1px solid rgba(61, 220, 132, 0.7);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fee-copy-btn svg {
  width: 0.9rem;
  height: 0.9rem;
}

.fee-steps {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0;
  padding: 0;
  list-style: none;
}

.fee-steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: start;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.4;
}

.fee-steps strong {
  color: var(--accent);
}

.fee-num {
  display: grid;
  place-items: center;
  width: 1.55rem;
  height: 1.55rem;
  color: var(--accent);
  border: 1px solid rgba(61, 220, 132, 0.7);
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 800;
}

.fee-upload {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border: 1px dashed rgba(61, 220, 132, 0.7);
  border-radius: 16px;
  cursor: pointer;
}

.fee-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.fee-upload strong {
  display: block;
  color: var(--accent);
  font-size: 0.98rem;
}

.fee-upload small {
  color: var(--muted);
}

.fee-arrow {
  margin-left: auto;
  color: var(--accent);
  font-size: 1.25rem;
}

.fee-error {
  min-height: 1.2rem;
  margin: 0.55rem 0 0;
  color: #ff8d8d;
  font-size: 0.85rem;
}

.fee-send {
  display: flex;
  width: 100%;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
  padding: 0.95rem 1rem;
  color: var(--accent-ink);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 16px;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.fee-send:disabled {
  opacity: 0.6;
  cursor: progress;
}

.fee-done {
  margin: 0.9rem 0 0;
  padding: 0.9rem 1rem;
  color: var(--text);
  background: rgba(61, 220, 132, 0.1);
  border: 1px solid rgba(61, 220, 132, 0.45);
  border-radius: 16px;
  line-height: 1.45;
}

.fee-done[hidden],
.pay-sheet[hidden],
.pay-empty[hidden],
.pay-loading[hidden] {
  display: none;
}

@media (max-width: 380px) {
  .fee-sum {
    font-size: 1.65rem;
  }

  .fee-details > div {
    align-items: flex-start;
  }

  .fee-sendto {
    flex-wrap: wrap;
  }
}

/* Front-page chat. */
.help-widget {
  position: fixed;
  right: 1rem;
  bottom: calc(1rem + env(safe-area-inset-bottom));
  z-index: 36;
  display: grid;
  justify-items: end;
  gap: 0.65rem;
}

.help-open {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  padding: 0;
  color: var(--accent-ink);
  background: var(--accent);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 12px 30px rgba(6, 40, 22, 0.45);
  cursor: pointer;
}

.help-open svg,
.help-form button svg {
  width: 1.45rem;
  height: 1.45rem;
}

.help-open:hover,
.help-open:focus-visible,
.help-back:hover,
.help-back:focus-visible,
.help-form button:hover,
.help-form button:focus-visible,
.help-suggestions button:hover,
.help-suggestions button:focus-visible {
  filter: brightness(1.08);
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

body.chat-open {
  overflow: hidden;
}

.help-panel:not([hidden]) + .help-open {
  display: none;
}

.help-panel {
  position: fixed;
  inset: 0;
  z-index: 60;
  touch-action: manipulation;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  color: var(--text);
  background: var(--bg);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.help-panel[hidden] {
  display: none;
}

.help-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: calc(0.65rem + env(safe-area-inset-top)) 0.85rem 0.75rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.help-back {
  display: grid;
  place-items: center;
  flex: 0 0 2.75rem;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  color: #fff;
  background: #10192b;
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
}

.help-back svg {
  width: 1.6rem;
  height: 1.6rem;
}

.help-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2.4rem;
  height: 2.4rem;
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.help-head h2 {
  margin: 0;
  font-size: 1rem;
}

.help-head p {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.1rem 0 0;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
}

.help-dot {
  width: 0.45rem;
  height: 0.45rem;
  background: var(--accent);
  border-radius: 50%;
}

.help-log {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 0;
  margin: 0;
  padding: 0.85rem;
  overflow: auto;
}

.help-bubble {
  max-width: 90%;
  padding: 0.6rem 0.75rem;
  border-radius: 14px;
  line-height: 1.45;
}

.help-bubble p {
  margin: 0;
}

.help-bubble a,
.help-bubble .help-footer-jump {
  display: inline-block;
  margin: 0.45rem 0.7rem 0 0;
  padding: 0;
  color: var(--accent);
  background: transparent;
  border: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.social-links.is-highlighted {
  border-radius: 14px;
  outline: 2px solid var(--accent);
  outline-offset: 10px;
  box-shadow: 0 0 0 10px rgba(61, 220, 132, 0.12), 0 0 36px 10px rgba(61, 220, 132, 0.22);
}

.help-user {
  align-self: flex-end;
  color: var(--accent-ink);
  background: var(--accent);
  border-bottom-right-radius: 5px;
}

.help-bot {
  align-self: flex-start;
  background: #10192b;
  border: 1px solid var(--line);
  border-bottom-left-radius: 5px;
}

.help-typing {
  display: flex;
  gap: 0.28rem;
  align-self: flex-start;
  width: fit-content;
  margin: 0;
  padding: 0.7rem 0.8rem;
  background: #10192b;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.help-typing span {
  width: 0.38rem;
  height: 0.38rem;
  background: var(--muted);
  border-radius: 50%;
  animation: help-dot 1s infinite ease-in-out;
}

.help-typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.help-typing span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes help-dot {
  0%, 80%, 100% { opacity: 0.3; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}

.help-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0 0.85rem 0.7rem;
}

.help-suggestions button,
.help-form button {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
  cursor: pointer;
}

.help-suggestions button {
  padding: 0.3rem 0.65rem;
  font-size: 0.78rem;
}

.help-form {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.35rem 0.85rem 0.45rem;
  padding: 0.3rem 0.3rem 0.3rem 0.85rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.help-draft {
  flex: 1;
  min-width: 0;
  padding: 0.45rem 0;
  overflow: hidden;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.help-draft.is-empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
}

.help-form button {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  color: var(--accent-ink);
  background: var(--accent);
  border: 0;
  border-radius: 50%;
}

.help-keys {
  display: grid;
  gap: 0.35rem;
  width: min(40rem, 100%);
  margin: 0 auto;
  padding: 0.45rem 0.35rem calc(0.4rem + env(safe-area-inset-bottom));
  background: #0c1424;
}

.help-key-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 0.28rem;
}

.help-key-row-edge {
  grid-template-columns: 1.35fr repeat(7, minmax(0, 1fr)) 1.35fr;
  grid-auto-flow: unset;
  grid-auto-columns: unset;
}

.help-key-row-bottom {
  grid-template-columns: 1.3fr 3.4fr 1.3fr;
  grid-auto-flow: unset;
  grid-auto-columns: unset;
}

button.help-key {
  min-width: 0;
  height: clamp(2.05rem, 6.4dvh, 2.9rem);
  padding: 0 0.1rem;
  touch-action: manipulation;
  color: var(--text);
  background: #1c2942;
  border: 0;
  border-radius: 8px;
  box-shadow: none;
  font: inherit;
  font-size: clamp(0.82rem, 3.5vw, 1.05rem);
  font-weight: 700;
  cursor: pointer;
}

button.help-key:not(:disabled):hover,
button.help-key:not(:disabled):active,
button.help-key:focus-visible {
  transform: none;
  box-shadow: none;
  filter: brightness(1.12);
}

button.help-key.is-on {
  color: var(--accent-ink);
  background: var(--accent);
}

button.help-key-space {
  font-weight: 600;
  letter-spacing: 0.04em;
}
