@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Montserrat:wght@600;700;800&display=swap");

:root {
  color-scheme: dark;
  --page: #080809;
  --surface: #111113;
  --surface-raised: #171719;
  --surface-soft: #1e1e21;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(215, 170, 74, 0.36);
  --text: #f7f5ef;
  --muted: #aaa8a1;
  --gold: #d7aa4a;
  --gold-light: #f2d184;
  --red: #b8202a;
  --red-deep: #6f1119;
  --success: #5acb8b;
  --danger: #ff777d;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.38);
  --radius-xl: 1.5rem;
  --radius-lg: 1rem;
  --radius-md: 0.75rem;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  background-color: #020916;
  background-image:
    linear-gradient(
      180deg,
      rgba(1, 7, 18, 0.1) 0%,
      rgba(1, 7, 18, 0.2) 46%,
      rgba(1, 7, 18, 0.38) 100%
    ),
    url("./fondoBola.png");
  background-position: center, center 52%;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
  color: var(--text);
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  isolation: isolate;
  line-height: 1.5;
}

body.auth-locked {
  overflow: hidden;
}

body.auth-locked .site-header,
body.auth-locked main {
  visibility: hidden;
  pointer-events: none;
}

button,
input {
  font: inherit;
}

input[type="checkbox"] {
  color-scheme: light;
}

button {
  -webkit-tap-highlight-color: transparent;
}

button,
a,
input {
  outline-offset: 3px;
}

:focus-visible {
  outline: 2px solid var(--gold-light);
}

.ambient {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(4px);
  pointer-events: none;
}

.ambient-one {
  width: 22rem;
  height: 22rem;
  top: -12rem;
  left: -8rem;
  background: radial-gradient(circle, rgba(184, 32, 42, 0.25), transparent 68%);
}

.ambient-two {
  width: 30rem;
  height: 30rem;
  right: -18rem;
  bottom: -16rem;
  background: radial-gradient(circle, rgba(215, 170, 74, 0.12), transparent 68%);
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 5.25rem;
  padding: 0.75rem max(1.25rem, calc((100vw - 76rem) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(3, 10, 22, 0.62);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 2.85rem;
  height: 2.85rem;
  place-items: center;
  border: 2px solid var(--gold);
  border-radius: 50%;
  color: var(--gold-light);
  font-family: "Montserrat", sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: -0.06em;
  box-shadow: inset 0 0 0 4px var(--surface);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-copy strong {
  font-family: "Montserrat", sans-serif;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand-copy span {
  margin-top: 0.25rem;
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.install-app-button {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  gap: 0.45rem;
  padding: 0.62rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(7, 20, 40, 0.78);
  color: var(--gold-light);
  font-weight: 800;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.install-app-button:hover {
  border-color: var(--gold);
  background: rgba(18, 38, 65, 0.9);
}

.install-app-button svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.user-profile-button {
  display: flex;
  min-width: 3.6rem;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.user-avatar,
.user-menu-avatar {
  position: relative;
  display: grid;
  overflow: hidden;
  place-items: center;
  border: 2px solid var(--gold);
  border-radius: 50%;
  background: linear-gradient(145deg, #174e79, #071a31);
  color: var(--gold-light);
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.user-avatar {
  width: 3rem;
  height: 3rem;
  font-size: 0.82rem;
}

.user-avatar img,
.user-menu-avatar img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-avatar img:not([src]),
.user-menu-avatar img:not([src]) {
  display: none;
}

.user-nickname {
  display: block;
  max-width: 7rem;
  overflow: hidden;
  color: var(--gold-light);
  font-size: 0.69rem;
  font-weight: 800;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-profile-button:hover .user-avatar {
  border-color: var(--gold-light);
  transform: translateY(-1px);
}

.user-menu-modal {
  width: min(100% - 2rem, 29rem);
}

.user-menu-identity {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin: 1rem 0 1.6rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(4, 10, 22, 0.55);
}

.user-menu-avatar {
  width: 5.2rem;
  height: 5.2rem;
  flex: 0 0 auto;
  font-size: 1.35rem;
}

.user-menu-identity h2 {
  margin-bottom: 0.2rem;
  padding: 0;
}

.user-menu-identity p {
  margin: 0;
  color: var(--text);
  font-weight: 700;
}

.user-menu-identity div > span {
  color: var(--muted);
  font-size: 0.88rem;
}

.logout-button {
  color: #ffd7d9;
}

.logout-button:hover {
  border-color: rgba(255, 119, 125, 0.55);
  color: #fff;
}

.icon-button {
  display: inline-grid;
  width: 2.9rem;
  height: 2.9rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-raised);
  color: var(--text);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.icon-button:hover {
  border-color: var(--line-strong);
  background: #222225;
  color: var(--gold-light);
  transform: translateY(-1px);
}

.icon-button svg,
.button svg,
.modal-close svg,
.modal-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.page-shell {
  width: min(100% - 2.5rem, 76rem);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5.5rem) 0 5rem;
}

.page-shell.public-view {
  padding-top: 0.75rem;
}

.player-schedule-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.7rem;
}

.player-schedule-heading h1 {
  font-size: clamp(1.3rem, 2.5vw, 1.9rem);
  letter-spacing: -0.04em;
  line-height: 1;
}

.player-schedule-title {
  min-width: 0;
}

.next-registration {
  margin: 0;
  padding: 0.32rem 0.65rem;
  border: 1px solid rgba(90, 203, 139, 0.55);
  border-radius: 999px;
  background: rgba(30, 132, 84, 0.28);
  color: #caffdf;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.next-registration.is-empty {
  border-color: var(--line);
  background: rgba(7, 14, 28, 0.68);
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 0.4rem;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin-top: 0;
  color: var(--text);
  font-family: "Montserrat", sans-serif;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(3.25rem, 9vw, 6.75rem);
  font-weight: 800;
  letter-spacing: -0.07em;
  line-height: 0.9;
}

.admin-view h1 {
  font-size: clamp(2.25rem, 6vw, 4.4rem);
  letter-spacing: -0.055em;
}

.public-date-selector {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 38rem;
  gap: 0.35rem;
}

.public-date-button {
  display: grid;
  min-width: 0;
  min-height: 2.35rem;
  place-content: center;
  padding: 0.22rem 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.65rem;
  background: rgba(6, 20, 43, 0.78);
  color: var(--text);
  text-align: center;
  cursor: pointer;
  backdrop-filter: blur(14px) saturate(120%);
  box-shadow: 0 0.8rem 2rem rgba(0, 0, 0, 0.2);
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.public-date-button:hover {
  border-color: var(--gold);
  background: rgba(13, 36, 73, 0.92);
  transform: translateY(-2px);
}

.public-date-button:focus-visible {
  outline: 3px solid rgba(244, 199, 102, 0.42);
  outline-offset: 3px;
}

.public-date-button.is-selected {
  border-color: var(--gold-light);
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #111113;
  box-shadow: 0 0.9rem 2.2rem rgba(215, 170, 74, 0.22);
}

.public-date-button.is-confirmed {
  border-color: #75d9a4;
  background: linear-gradient(135deg, #d7fbe6, #a8eac7);
  color: #103b28;
  box-shadow: 0 0.7rem 1.8rem rgba(44, 159, 98, 0.18);
}

.public-date-button.is-confirmed:hover {
  border-color: #4fc98a;
  background: linear-gradient(135deg, #e4ffef, #b9f1d1);
}

.public-date-button.is-confirmed.is-selected {
  border-color: #63d29a;
  background: linear-gradient(135deg, #237b52, #105237);
  color: #f2fff8;
  box-shadow: 0 0.9rem 2.2rem rgba(16, 112, 70, 0.34);
}

.public-date-button.is-probable {
  border-color: #7abde9;
  background: linear-gradient(135deg, #d9efff, #a9d5f5);
  color: #103653;
  box-shadow: 0 0.7rem 1.8rem rgba(42, 125, 181, 0.18);
}

.public-date-button.is-probable:hover {
  border-color: #58a8df;
  background: linear-gradient(135deg, #e6f6ff, #bcdef7);
}

.public-date-button.is-probable.is-selected {
  border-color: #61b4ec;
  background: linear-gradient(135deg, #267eb9, #12598b);
  color: #f4fbff;
  box-shadow: 0 0.9rem 2.2rem rgba(18, 89, 139, 0.34);
}

.public-date-label {
  overflow: hidden;
  font-size: clamp(0.66rem, 0.95vw, 0.75rem);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.cash-table-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 100% 0%, rgba(215, 170, 74, 0.1), transparent 12rem),
    rgba(7, 14, 28, 0.7);
  backdrop-filter: blur(14px) saturate(120%);
  box-shadow: var(--shadow);
}

.cash-table-card::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0.28rem;
  background: linear-gradient(var(--gold-light), var(--gold), var(--red));
  content: "";
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 1.5rem 1.25rem 1.75rem;
}

.cash-table-card.is-vip {
  border-color: rgba(255, 143, 28, 0.72);
  box-shadow: 0 22px 70px rgba(255, 126, 15, 0.14), var(--shadow);
}

.cash-table-card.is-vip::before {
  background: linear-gradient(#ffc15a, #ff8b1f, #e85b0d);
}

.table-label-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.35rem;
}

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

.vip-badge {
  display: inline-flex;
  min-height: 1.6rem;
  align-items: center;
  justify-content: center;
  padding: 0.18rem 0.55rem;
  border: 1px solid rgba(255, 188, 89, 0.82);
  border-radius: 999px;
  background: linear-gradient(135deg, #ffb23f, #f36a12);
  box-shadow: 0 6px 18px rgba(238, 102, 15, 0.24);
  color: #2a1300;
  font-family: "Montserrat", sans-serif;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
}

.cash-table-card h2 {
  margin-bottom: 0;
  font-size: clamp(1.55rem, 4vw, 2rem);
  line-height: 1.15;
}

.table-number {
  color: rgba(215, 170, 74, 0.52);
  font-family: "Montserrat", sans-serif;
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.08em;
  line-height: 1;
}

.table-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--line);
}

.detail {
  min-width: 0;
  padding: 1.1rem;
  background: rgba(17, 17, 19, 0.96);
}

.detail span,
.player-stat span {
  display: block;
  margin-bottom: 0.28rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.detail strong {
  display: block;
  overflow: hidden;
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 1.3rem 1.5rem 1.5rem 1.75rem;
}

.player-stat {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.8rem;
}

.player-stat::before {
  width: 0.55rem;
  height: 0.55rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(90, 203, 139, 0.12);
  content: "";
}

.player-stat.probable::before {
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(215, 170, 74, 0.12);
}

.player-stat div {
  min-width: 0;
}

.player-stat span {
  margin-bottom: 0;
  white-space: nowrap;
}

.player-stat strong {
  font-size: 1.5rem;
  line-height: 1.1;
}

.player-stat-count {
  display: flex;
  align-items: center;
  gap: 0.42rem;
}

.player-stat-view {
  display: inline-grid;
  width: 2rem;
  height: 2rem;
  flex: 0 0 2rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(17, 17, 19, 0.75);
  color: var(--muted);
  cursor: pointer;
}

.player-stat-view:hover {
  border-color: var(--line-strong);
  color: var(--gold-light);
}

.player-stat-view svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.player-registration-button {
  min-height: 2.25rem;
  padding: 0.42rem 0.68rem;
  border: 1px solid rgba(90, 203, 139, 0.72);
  border-radius: 999px;
  background: rgba(30, 132, 84, 0.78);
  color: #f1fff7;
  box-shadow: 0 6px 16px rgba(30, 132, 84, 0.2);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.player-registration-button:not(.is-remove) {
  min-height: 1.85rem;
  padding: 0.28rem 0.5rem;
  font-size: 0.68rem;
  transform: translateY(0.35rem);
}

.player-registration-button:not(.is-remove):hover {
  border-color: rgba(131, 235, 177, 0.95);
  background: rgba(38, 157, 100, 0.92);
}

.player-registration-button.is-remove {
  border-color: rgba(255, 119, 125, 0.58);
  background: rgba(188, 42, 55, 0.28);
  color: #ffe3e4;
  box-shadow: none;
}

.registration-time-modal {
  width: min(100% - 2rem, 27rem);
}

.registration-time-modal .modal-card {
  background:
    radial-gradient(circle at 100% 0%, rgba(215, 170, 74, 0.09), transparent 14rem),
    rgba(7, 14, 28, 0.62);
  backdrop-filter: blur(7px) saturate(118%);
}

.registration-no-time-field {
  margin-bottom: 0.85rem;
}

.registration-time-picker {
  display: grid;
  grid-template-columns: 5.2rem auto 5.2rem 4.2rem;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0.25rem 0 1rem;
  padding: 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: rgba(7, 14, 28, 0.72);
}

.time-spinner {
  display: grid;
  justify-items: center;
  gap: 0.28rem;
}

.time-spinner button {
  display: grid;
  width: 2.2rem;
  height: 1.55rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--gold-light);
  font-size: 0.7rem;
  cursor: pointer;
}

.time-spinner button:hover {
  border-color: var(--gold);
  background: rgba(215, 170, 74, 0.13);
}

.time-spinner output {
  min-width: 4.4rem;
  padding: 0.36rem 0.45rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.6rem;
  background: #0c0c0e;
  color: var(--text);
  font-family: "Montserrat", sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.time-separator {
  color: var(--gold-light);
  font-family: "Montserrat", sans-serif;
  font-size: 1.7rem;
  font-weight: 800;
}

.registration-period {
  min-height: 2.9rem;
  border: 1px solid rgba(215, 170, 74, 0.6);
  border-radius: 0.75rem;
  background: rgba(215, 170, 74, 0.16);
  color: var(--gold-light);
  font-family: "Montserrat", sans-serif;
  font-size: 1rem;
  font-weight: 900;
  cursor: pointer;
}

.registration-period:hover {
  background: rgba(215, 170, 74, 0.26);
}

.table-players-modal {
  width: min(100% - 2rem, 34rem);
}

.table-players-list {
  display: grid;
  gap: 0.55rem;
}

.table-player-row,
.table-players-empty {
  margin: 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(17, 17, 19, 0.76);
}

.table-player-row {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) auto minmax(4.8rem, 0.7fr);
  align-items: center;
  gap: 0.7rem;
  font-weight: 800;
}

.table-player-row::before {
  display: none;
}

.table-player-header {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.table-player-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-player-status {
  padding: 0.24rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  text-align: center;
}

.table-player-status.is-confirmed {
  background: rgba(43, 164, 99, 0.25);
  color: #aef0ca;
}

.table-player-status.is-probable {
  background: rgba(52, 137, 196, 0.25);
  color: #b8e0ff;
}

.table-player-time {
  color: var(--text);
  font-size: 0.78rem;
  text-align: right;
  white-space: nowrap;
}

.table-players-empty {
  color: var(--muted);
  text-align: center;
}

.empty-state {
  display: grid;
  min-height: 17rem;
  grid-column: 1 / -1;
  place-items: center;
  padding: 2rem;
  border: 1px dashed rgba(215, 170, 74, 0.28);
  border-radius: var(--radius-xl);
  background: rgba(7, 14, 28, 0.64);
  backdrop-filter: blur(14px) saturate(120%);
  text-align: center;
}

.empty-state .empty-symbol {
  display: block;
  margin-bottom: 0.7rem;
  color: var(--gold);
  font-family: serif;
  font-size: 2.6rem;
}

.empty-state h2,
.empty-state h3 {
  margin-bottom: 0.4rem;
}

.empty-state p {
  max-width: 28rem;
  margin: 0;
  color: var(--muted);
}

.is-hidden {
  display: none !important;
}

.admin-heading-row,
.list-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
}

.button {
  display: inline-flex;
  min-height: 2.9rem;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.75rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

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

.button-primary {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #17120a;
  box-shadow: 0 10px 28px rgba(215, 170, 74, 0.18);
}

.button-primary:hover {
  background: var(--gold-light);
}

.button-quiet {
  border-color: var(--line);
  background: var(--surface-raised);
  color: var(--text);
}

.button-quiet:hover {
  border-color: var(--line-strong);
  color: var(--gold-light);
}

.button-full {
  width: 100%;
}

.admin-tabs {
  display: inline-flex;
  gap: 0.35rem;
  margin: 1.75rem 0 0.25rem;
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(7, 14, 28, 0.68);
  backdrop-filter: blur(14px) saturate(120%);
}

.admin-tab {
  min-height: 2.8rem;
  padding: 0.65rem 1.2rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.admin-tab:hover {
  color: var(--text);
}

.admin-tab.is-active,
.admin-tab[aria-selected="true"] {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #17120a;
  box-shadow: 0 8px 24px rgba(215, 170, 74, 0.2);
}

.players-panel {
  padding-top: 2.5rem;
}

.players-heading-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.players-list-shell {
  margin-top: 1rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(7, 14, 28, 0.68);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px) saturate(120%);
}

.players-list-header,
.player-list-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(7rem, 1fr)) minmax(8rem, 1fr) minmax(7rem, 0.9fr) minmax(8rem, 0.7fr) auto;
  align-items: center;
  gap: 1rem;
}

.players-list-header {
  padding: 0.8rem 1.1rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.player-list-row {
  padding: 1rem 1.1rem;
}

.player-list-row + .player-list-row {
  border-top: 1px solid var(--line);
}

.player-list-cell {
  min-width: 0;
}

.player-list-cell strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-admin-cell {
  display: flex;
  align-items: center;
}

.player-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
}

.player-action-button {
  width: 2.5rem;
  height: 2.5rem;
}

.player-action-button.danger:hover {
  border-color: rgba(255, 119, 125, 0.65);
  color: var(--danger);
}

.player-action-button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
}

.admin-checkbox {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  accent-color: var(--gold);
}

.admin-checkbox:disabled {
  opacity: 1;
}

.field .checkbox-control {
  display: inline-flex;
  min-height: 3.2rem;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  padding: 0.76rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #0c0c0e;
  cursor: pointer;
}

.field .checkbox-control input {
  width: 1.25rem;
  min-height: 0;
  height: 1.25rem;
  margin: 0;
  padding: 0;
  accent-color: var(--gold);
  box-shadow: none;
}

.field .checkbox-control span {
  color: var(--text);
  font-weight: 700;
}

.admin-toolbar {
  display: grid;
  grid-template-columns: auto minmax(15rem, 1fr) auto auto;
  align-items: center;
  gap: 0.75rem;
  margin: 2.5rem 0 3.5rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(7, 14, 28, 0.68);
  backdrop-filter: blur(14px) saturate(120%);
  box-shadow: var(--shadow);
}

.date-button {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: var(--radius-md);
}

.admin-date-wrap {
  min-width: 0;
  padding: 0 0.45rem;
}

.admin-date-wrap span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-date-wrap time {
  display: block;
  overflow: hidden;
  font-size: 1rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.add-table-button svg {
  width: 1.15rem;
  height: 1.15rem;
  stroke-width: 2.2;
}

.list-heading {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.list-heading h2 {
  margin-bottom: 0;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
}

.count-badge {
  display: inline-flex;
  min-height: 2rem;
  align-items: center;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--gold-light);
  font-size: 0.85rem;
  font-weight: 700;
}

.admin-table-list {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}

.admin-table-item {
  display: grid;
  grid-template-columns: 7rem minmax(9rem, 1.35fr) repeat(4, minmax(6rem, 0.75fr)) auto;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(7, 14, 28, 0.68);
  backdrop-filter: blur(14px) saturate(120%);
}

.admin-table-item.is-unpublished {
  border-color: rgba(255, 119, 125, 0.48);
  background: rgba(52, 12, 22, 0.66);
}

.admin-table-name {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
}

.admin-table-item:has(.vip-badge) {
  border-color: rgba(255, 143, 28, 0.58);
}

.admin-table-status {
  padding: 0.28rem 0.55rem;
  border: 1px solid rgba(255, 119, 125, 0.5);
  border-radius: 999px;
  background: rgba(111, 17, 25, 0.4);
  color: #ffe3e4;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.mini-number {
  display: grid;
  width: 2.3rem;
  height: 2.3rem;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--gold-light);
  font-size: 0.8rem;
}

.admin-table-value {
  min-width: 0;
}

.admin-table-value span {
  display: block;
  margin-bottom: 0.12rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.admin-table-value strong {
  display: block;
  overflow: hidden;
  font-size: 0.94rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.edit-table-button {
  min-height: 2.6rem;
  padding: 0.55rem 0.9rem;
}

.visibility-table-button {
  min-height: 2.6rem;
  padding: 0.55rem 0.9rem;
}

.visibility-table-button.is-showing {
  border-color: rgba(215, 170, 74, 0.55);
  color: var(--gold-light);
}

.visibility-table-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none;
}

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

.table-actions .edit-table-button {
  flex: 1 1 auto;
}

.delete-table-button {
  width: 2.6rem;
  height: 2.6rem;
  flex: 0 0 2.6rem;
}

.delete-table-button:hover {
  border-color: rgba(255, 119, 125, 0.65);
  color: var(--danger);
}

.modal {
  width: min(100% - 2rem, 31rem);
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  background: transparent;
  color: var(--text);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.65);
}

.table-modal {
  width: min(100% - 2rem, 43rem);
}

.modal::backdrop {
  background: rgba(0, 3, 10, 0.14);
  backdrop-filter: blur(1px);
}

.modal-card {
  position: relative;
  margin: 0;
  padding: clamp(1.5rem, 5vw, 2.2rem);
  background:
    radial-gradient(circle at 100% 0%, rgba(215, 170, 74, 0.1), transparent 14rem),
    rgba(7, 14, 28, 0.8);
  backdrop-filter: blur(12px) saturate(125%);
}

.danger-confirmation {
  margin: 0 0 1.5rem;
  padding: 1rem;
  border: 1px solid rgba(255, 119, 125, 0.32);
  border-radius: var(--radius-md);
  background: rgba(111, 17, 25, 0.34);
  color: #ffe3e4;
}

.button-danger {
  background: linear-gradient(135deg, #e6535c, var(--red));
  color: #fff;
}

.button-danger:hover {
  background: #e6535c;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--muted);
  cursor: pointer;
}

.modal-close:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.modal-icon {
  display: grid;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1.5rem;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--gold-light);
}

.modal-card h2 {
  margin-bottom: 0.45rem;
  padding-right: 2.5rem;
  font-size: clamp(1.65rem, 5vw, 2.1rem);
  line-height: 1.15;
}

.modal-intro {
  margin: 0 0 1.5rem;
  color: var(--muted);
}

.field {
  min-width: 0;
  margin-bottom: 1.1rem;
}

.field label {
  display: block;
  margin-bottom: 0.42rem;
  color: #dedbd2;
  font-size: 0.88rem;
  font-weight: 700;
}

.field input {
  width: 100%;
  min-height: 3.2rem;
  padding: 0.76rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #0c0c0e;
  color: var(--text);
  font-size: 1rem;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field textarea {
  width: 100%;
  min-height: 6rem;
  padding: 0.76rem 0.9rem;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #0c0c0e;
  color: var(--text);
  font: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #6f6d68;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(215, 170, 74, 0.12);
}

.input-prefix {
  position: relative;
}

.input-prefix span {
  position: absolute;
  top: 50%;
  left: 0.9rem;
  z-index: 1;
  color: var(--gold-light);
  transform: translateY(-50%);
}

.input-prefix input {
  padding-left: 2rem;
}

.form-error {
  min-height: 1.5rem;
  margin: -0.2rem 0 0.8rem;
  color: var(--danger);
  font-size: 0.9rem;
  font-weight: 600;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1rem;
}

.choice-field {
  min-width: 0;
  margin: 0 0 1.1rem;
  padding: 0;
  border: 0;
}

.choice-field legend,
.row-title {
  display: block;
  margin-bottom: 0.55rem;
  color: #dedbd2;
  font-size: 0.88rem;
  font-weight: 700;
}

.choice-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.choice-list label {
  display: inline-flex;
  min-height: 2.65rem;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(4, 10, 22, 0.72);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.choice-list input {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  accent-color: var(--gold);
}

.registration-modal {
  width: min(100% - 2rem, 49rem);
  border-color: rgba(171, 220, 247, 0.95);
  box-shadow: 0 28px 90px rgba(0, 22, 48, 0.38);
}

.registration-card {
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.58), transparent 20rem),
    linear-gradient(145deg, rgba(231, 247, 255, 0.86), rgba(196, 228, 247, 0.82));
  color: #0a2b45;
  backdrop-filter: blur(7px) saturate(112%);
}

.registration-card h2 {
  color: #08263e;
}

.registration-card .eyebrow {
  color: #1c6d9f;
}

.registration-card .modal-intro,
.registration-card .optional-label {
  color: #416982;
}

.registration-card .field label,
.registration-card .row-title {
  color: #123a56;
}

.registration-card .field input {
  border-color: rgba(45, 118, 164, 0.34);
  background: rgba(250, 253, 255, 0.9);
  color: #08263e;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.registration-card .field input::placeholder {
  color: #6d8da1;
}

.registration-card .field input:focus {
  border-color: #288bc3;
  box-shadow: 0 0 0 3px rgba(40, 139, 195, 0.17);
}

.registration-card .choice-row {
  border-top-color: rgba(32, 99, 140, 0.2);
}

.registration-card .choice-list label {
  border-color: rgba(32, 99, 140, 0.28);
  background: rgba(246, 252, 255, 0.78);
  color: #0a3552;
}

.registration-card .choice-list label:has(input:checked) {
  border-color: #3a92c4;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 5px 16px rgba(24, 91, 132, 0.12);
}

.registration-card .choice-list input {
  accent-color: #237fb4;
}

.registration-card .password-control button {
  color: #37677f;
}

.registration-card .password-control button:hover {
  background: rgba(36, 121, 169, 0.12);
  color: #0d5e8b;
}

.registration-card .profile-photo-box {
  border-color: rgba(27, 105, 153, 0.48);
  background: rgba(246, 252, 255, 0.7);
  color: #176c9e;
}

.registration-card .button-quiet {
  border-color: rgba(27, 90, 129, 0.3);
  background: rgba(244, 251, 255, 0.82);
  color: #123a56;
}

.registration-row {
  margin-bottom: 1.15rem;
}

.registration-row.two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.registration-row.two-columns .field,
.registration-row.field {
  margin-bottom: 0;
}

.choice-row {
  padding: 0.9rem 0;
  border-top: 1px solid var(--line);
}

.optional-label {
  margin-left: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
}

.password-control {
  position: relative;
}

.password-control input {
  padding-right: 3.35rem;
}

.password-control button {
  position: absolute;
  top: 50%;
  right: 0.45rem;
  display: grid;
  width: 2.4rem;
  height: 2.4rem;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transform: translateY(-50%);
}

.password-control button:hover {
  background: var(--surface-soft);
  color: var(--gold-light);
}

.password-control svg,
.profile-photo-box svg,
.photo-source-option svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.profile-photo-box {
  position: relative;
  display: grid;
  width: min(100%, 18rem);
  aspect-ratio: 4 / 3;
  place-items: center;
  overflow: hidden;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: rgba(4, 10, 22, 0.65);
  color: var(--gold-light);
  cursor: pointer;
}

.profile-photo-box.compact {
  width: min(100%, 13rem);
}

.profile-photo-box img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-photo-box img:not([src]) {
  display: none;
}

.profile-photo-box span {
  display: flex;
  max-width: 12rem;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  padding: 1rem;
  font-weight: 700;
  text-align: center;
}

.photo-source-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.photo-source-option {
  display: flex;
  min-height: 9rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(4, 10, 22, 0.72);
  color: var(--text);
  cursor: pointer;
}

.photo-source-option:hover {
  border-color: var(--gold);
  color: var(--gold-light);
}

.photo-source-option span {
  color: var(--muted);
  font-size: 0.8rem;
}

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

.detail-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-right: 3.2rem;
}

.detail-actions {
  display: flex;
  gap: 0.45rem;
}

.player-detail-content {
  display: grid;
  grid-template-columns: 10rem 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

.detail-photo {
  width: 10rem;
  height: 10rem;
  grid-row: span 3;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: rgba(4, 10, 22, 0.72);
}

.detail-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-photo-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: var(--gold-light);
  font-family: "Montserrat", sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
}

.detail-item {
  min-width: 0;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(4, 10, 22, 0.56);
}

.detail-item.wide {
  grid-column: 2 / -1;
}

.detail-item.full {
  grid-column: 1 / -1;
}

.detail-item span {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.detail-item strong,
.detail-item p {
  margin: 0;
  white-space: pre-wrap;
}

.field-wide {
  grid-column: 1 / -1;
}

.table-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.table-option-grid .checkbox-control {
  width: 100%;
}

.vip-table-toggle {
  display: inline-flex;
  min-height: 2.55rem;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 0.7rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid rgba(255, 143, 28, 0.48);
  border-radius: var(--radius-md);
  background: rgba(72, 31, 5, 0.62);
  color: #fff4e5;
  font-weight: 800;
  cursor: pointer;
}

.vip-table-toggle:has(input:checked) {
  border-color: #ff9a2f;
  background: rgba(132, 56, 5, 0.72);
  box-shadow: 0 0 0 3px rgba(255, 143, 28, 0.12);
}

.vip-table-toggle input {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  accent-color: #ff8b1f;
}

.table-publish-days {
  padding: 0;
  border: 0;
}

.table-publish-days legend {
  margin-bottom: 0.35rem;
  color: #dedbd2;
  font-size: 0.88rem;
  font-weight: 700;
}

.table-publish-days-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

.table-publish-days-list label {
  min-height: 2.45rem;
  justify-content: center;
  padding: 0.42rem 0.55rem;
  border-radius: var(--radius-md);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.7rem;
  padding-top: 0.4rem;
}

/* Mantiene el formulario de mesa completo dentro de una sola vista. */
#table-dialog .modal-card {
  padding: 1.35rem 1.7rem 1.2rem;
}

#table-dialog .modal-close {
  top: 0.8rem;
  right: 0.8rem;
  width: 2.45rem;
  height: 2.45rem;
}

#table-dialog .eyebrow {
  margin-bottom: 0.2rem;
}

#table-dialog h2 {
  margin-bottom: 0.25rem;
}

#table-dialog .modal-intro {
  margin-bottom: 0.85rem;
}

#table-dialog .field {
  margin-bottom: 0.68rem;
}

#table-dialog .field label {
  margin-bottom: 0.28rem;
}

#table-dialog .field input,
#table-dialog .field .checkbox-control {
  min-height: 2.75rem;
}

#table-dialog .field input {
  padding-top: 0.58rem;
  padding-bottom: 0.58rem;
}

#table-dialog .table-option-grid {
  gap: 0.6rem;
}

#table-dialog .form-error:empty {
  min-height: 0;
  margin: 0;
}

#table-dialog .modal-actions {
  padding-top: 0.15rem;
}

.role-modal {
  width: min(100% - 2rem, 39rem);
}

.role-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.role-option {
  display: flex;
  min-height: 9.5rem;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.4rem;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #0c0c0e;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.role-option:hover {
  border-color: var(--gold);
  background: #151514;
  transform: translateY(-2px);
}

.role-option-icon {
  display: grid;
  width: 2.8rem;
  height: 2.8rem;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--gold-light);
}

.role-option-icon svg {
  width: 1.3rem;
  height: 1.3rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.role-option-copy {
  display: block;
}

.role-option strong,
.role-option small {
  display: block;
}

.role-option strong {
  font-family: "Montserrat", sans-serif;
  font-size: 1.05rem;
}

.role-option small {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.toast {
  position: fixed;
  z-index: 50;
  right: 1rem;
  bottom: 1rem;
  max-width: min(24rem, calc(100% - 2rem));
  padding: 0.85rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: #22221f;
  color: var(--text);
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.75rem);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 66rem) {
  .players-list-shell {
    overflow-x: auto;
  }

  .players-list-header,
  .player-list-row {
    min-width: 66rem;
  }

  .admin-table-item {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-table-name {
    grid-column: span 2;
  }

  .edit-table-button {
    justify-self: end;
  }

  .table-actions {
    justify-self: end;
  }
}

@media (max-width: 46rem) {
  .table-option-grid {
    grid-template-columns: 1fr;
  }

  .table-publish-days-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body {
    background-attachment: scroll;
  }

  .site-header {
    min-height: 4.75rem;
    gap: 0.65rem;
  }

  .header-actions {
    gap: 0.4rem;
  }

  .install-app-button {
    width: 2.7rem;
    min-height: 2.7rem;
    justify-content: center;
    padding: 0;
  }

  .install-app-button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .user-avatar {
    width: 2.7rem;
    height: 2.7rem;
  }

  .page-shell {
    width: min(100% - 1.5rem, 76rem);
    padding-top: 2.4rem;
  }

  .public-date-selector {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.28rem;
  }

  .public-date-button {
    min-height: 2rem;
    padding: 0.18rem 0.22rem;
    border-radius: 0.5rem;
  }

  .public-date-label {
    font-size: 0.62rem;
  }

  .registration-row.two-columns,
  .photo-source-actions,
  .player-detail-content {
    grid-template-columns: 1fr;
  }

  .detail-photo {
    width: 8rem;
    height: 8rem;
    grid-row: auto;
  }

  .detail-item.wide,
  .detail-item.full {
    grid-column: 1;
  }

  .detail-heading {
    display: block;
  }

  .detail-actions {
    margin-top: 0.8rem;
  }

  .table-grid {
    grid-template-columns: 1fr;
  }

  .admin-heading-row {
    align-items: flex-start;
  }

  .admin-toolbar {
    grid-template-columns: auto 1fr auto;
    margin: 2rem 0 3rem;
  }

  .add-table-button {
    grid-column: 1 / -1;
  }

  .admin-table-item {
    grid-template-columns: 1fr 1fr;
  }

  .admin-table-name {
    grid-column: 1 / -1;
  }

  .edit-table-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .table-actions {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (max-width: 34rem) {
  .registration-time-picker {
    grid-template-columns: 4.2rem auto 4.2rem 3.7rem;
    gap: 0.3rem;
    padding: 0.65rem 0.4rem;
  }

  .time-spinner output {
    min-width: 3.65rem;
    font-size: 1.45rem;
  }

  .registration-period {
    min-height: 2.65rem;
    font-size: 0.88rem;
  }

  .table-player-row:not(.table-player-header) {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .table-player-header {
    grid-template-columns: minmax(0, 1fr) auto minmax(4.4rem, 0.7fr);
  }

  .table-player-row:not(.table-player-header) .table-player-time {
    grid-column: 1 / -1;
    text-align: left;
  }

  .brand-copy strong {
    font-size: 0.88rem;
  }

  .user-nickname {
    max-width: 4.5rem;
    font-size: 0.62rem;
  }

  .brand-copy span {
    font-size: 0.67rem;
  }

  .brand-mark {
    width: 2.55rem;
    height: 2.55rem;
  }

  .table-details {
    grid-template-columns: 1fr 1fr;
  }

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

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

  .player-stat {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .admin-heading-row {
    display: block;
  }

  .admin-heading-row .button {
    margin-top: 1.25rem;
  }

  .admin-tabs {
    display: flex;
    width: 100%;
  }

  .admin-tab {
    flex: 1;
    padding-inline: 0.7rem;
  }

  .players-heading {
    display: block;
  }

  .players-heading-actions {
    align-items: stretch;
    flex-direction: column;
    margin-top: 1rem;
  }

  .players-heading-actions .button {
    width: 100%;
  }

  .players-list-header {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .player-list-row {
    grid-template-columns: 1fr 1fr;
    min-width: 0;
    gap: 0.9rem;
    padding: 1rem;
  }

  .player-list-cell::before {
    display: block;
    margin-bottom: 0.15rem;
    color: var(--muted);
    content: attr(data-label);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
  }

  .player-list-cell strong {
    overflow: visible;
    white-space: normal;
  }

  .player-actions {
    justify-content: flex-start;
  }

  .admin-date-wrap time {
    font-size: 0.88rem;
  }

  .admin-table-item {
    grid-template-columns: 1fr;
  }

  .admin-table-name,
  .edit-table-button {
    grid-column: 1;
  }

  .table-actions {
    grid-column: 1;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .field-wide {
    grid-column: 1;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

  .modal-actions .button {
    width: 100%;
  }

  .role-actions {
    grid-template-columns: 1fr;
  }

  .role-option {
    min-height: 7.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
