:root {
  color-scheme: dark;
  --bg: #050506;
  --panel: #101115;
  --panel-2: #17181d;
  --line: rgba(255, 255, 255, 0.13);
  --line-strong: rgba(214, 167, 79, 0.42);
  --text: #f7f3ea;
  --muted: #a9a39a;
  --gold: #d8a84f;
  --gold-2: #f0c46c;
  --purple: #8757d8;
  --danger: #ff4d5f;
  --ok: #45c979;
  --mobile-nav-height: 4.5rem;
  font-family: "Arial Narrow", "Roboto Condensed", "Inter", system-ui, sans-serif;
}

body[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f3ea;
  --panel: #ffffff;
  --panel-2: #f0ece2;
  --line: rgba(24, 22, 19, 0.14);
  --line-strong: rgba(165, 115, 31, 0.42);
  --text: #171512;
  --muted: #5f5a51;
  --gold: #bf842b;
  --gold-2: #9c681d;
  --purple: #6d45bd;
  --danger: #c83245;
  --ok: #18864b;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(216, 168, 79, 0.2), transparent 24rem),
    radial-gradient(circle at 94% 8%, rgba(135, 87, 216, 0.16), transparent 22rem),
    linear-gradient(135deg, #030303, #0c0d10 44%, #050506);
}

body[data-theme="light"] {
  background:
    radial-gradient(circle at 8% 0%, rgba(216, 168, 79, 0.18), transparent 20rem),
    linear-gradient(135deg, #fffaf0, #f1eadc 48%, #ffffff);
}

body[data-theme="light"] .public-panel,
body[data-theme="light"] .admin-panel,
body[data-theme="light"] .phone-frame {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 1.2rem 3rem rgba(60, 45, 18, 0.14);
}

body[data-theme="light"] .phone-frame {
  background: #f7f3ea;
}

body[data-theme="light"] .mobile-header,
body[data-theme="light"] .bottom-nav {
  background: rgba(255, 255, 255, 0.94);
}

body[data-theme="light"] .home-benefit-card,
body[data-theme="light"] .status-card,
body[data-theme="light"] .offer-card,
body[data-theme="light"] .product-card,
body[data-theme="light"] .post-card,
body[data-theme="light"] .member-card,
body[data-theme="light"] .join-form,
body[data-theme="light"] .list-row,
body[data-theme="light"] .event-card,
body[data-theme="light"] .ticket-card,
body[data-theme="light"] .detail-meta div,
body[data-theme="light"] .player-meta div,
body[data-theme="light"] .message-card,
body[data-theme="light"] .admin-login,
body[data-theme="light"] .admin-form {
  background: rgba(255, 255, 255, 0.78);
}

body[data-theme="light"] .ghost-action,
body[data-theme="light"] .outline-action,
body[data-theme="light"] .google-action,
body[data-theme="light"] .icon-button,
body[data-theme="light"] .menu-list button,
body[data-theme="light"] .admin-tabs button,
body[data-theme="light"] .admin-row-actions button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.76);
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(18rem, 0.85fr) minmax(22rem, 27rem) minmax(24rem, 1.25fr);
  gap: 1.4rem;
  align-items: center;
  min-height: 100vh;
  padding: 1.3rem;
}

.public-panel,
.admin-panel,
.phone-frame {
  border: 1px solid var(--line);
  background: rgba(12, 13, 16, 0.78);
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(18px);
}

.public-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 45rem;
  padding: 1.45rem;
  overflow: hidden;
  border-radius: 1.7rem;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.88)),
    repeating-linear-gradient(88deg, transparent 0 1rem, rgba(255, 255, 255, 0.025) 1rem 1.05rem),
    radial-gradient(ellipse at 50% 84%, rgba(216, 168, 79, 0.38), transparent 18rem),
    linear-gradient(160deg, #15161b, #050506);
}

.brand-lockup,
.panel-head,
.post-head,
.profile-box,
.card-top {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.crest,
.avatar {
  display: grid;
  width: 3.1rem;
  height: 3.1rem;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: #100c05;
  background: radial-gradient(circle at 30% 25%, #fff4c6, var(--gold) 52%, #9b6621);
  font-weight: 1000;
  letter-spacing: 0;
}

.crest.large {
  width: 6rem;
  height: 6rem;
  margin: 1.6rem auto 0.9rem;
  font-size: 2rem;
}

.eyebrow,
.kicker {
  margin: 0;
  color: var(--gold-2);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 0.98;
  text-transform: uppercase;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 4.2rem);
}

.hero-copy h2 {
  max-width: 8ch;
  margin: 0.8rem 0 0.7rem;
  font-size: clamp(3.2rem, 7vw, 6.4rem);
}

.hero-copy p:not(.kicker) {
  max-width: 25rem;
  color: #ddd8ce;
  font-size: 1rem;
  line-height: 1.45;
}

.hero-actions,
.action-stack {
  display: grid;
  gap: 0.7rem;
}

.hero-actions {
  grid-template-columns: 1fr 1fr;
  margin-top: 1.2rem;
}

.primary-action,
.ghost-action,
.outline-action {
  display: inline-grid;
  place-items: center;
  min-height: 2.85rem;
  border: 0;
  border-radius: 0.45rem;
  font-weight: 1000;
  text-transform: uppercase;
  text-decoration: none;
}

.primary-action {
  color: #160f05;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
}

.ghost-action,
.outline-action {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
}

.public-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
}

.public-stats span,
.metric-grid div,
.admin-grid article {
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
}

.public-stats strong,
.metric-grid strong,
.admin-grid strong {
  display: block;
  color: var(--text);
  font-size: 1.35rem;
}

.public-stats span,
.metric-grid span,
.admin-grid span,
.admin-grid small {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.phone-frame {
  position: relative;
  display: flex;
  flex-direction: column;
  height: min(52rem, calc(100vh - 2.6rem));
  min-height: 43rem;
  overflow: hidden;
  border: 0.55rem solid #1b1c22;
  border-radius: 2.4rem;
  background: #07080b;
}

.mobile-header,
.bottom-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.mobile-header {
  flex: 0 0 auto;
  height: calc(4rem + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 0.9rem 0;
  border-bottom: 1px solid var(--line);
}

.mobile-header h2 {
  margin: 0.1rem 0 0;
  font-size: 1.12rem;
  text-align: center;
}

.icon-button {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  background: transparent;
}

.mobile-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0.85rem 0.85rem calc(var(--mobile-nav-height) + 0.85rem + env(safe-area-inset-bottom));
  scrollbar-width: thin;
}

.screen {
  display: none;
}

.screen.is-active {
  display: block;
}

.home-hero-card {
  position: relative;
  display: grid;
  min-height: 22rem;
  overflow: hidden;
  align-content: end;
  border: 1px solid var(--line-strong);
  border-radius: 0.9rem;
  padding: 1rem;
  background:
    linear-gradient(180deg, rgba(5, 5, 6, 0.1) 0%, rgba(5, 5, 6, 0.42) 38%, rgba(5, 5, 6, 0.96) 100%),
    url("/assets/home/hero-contraataque.jpg") center / cover;
  box-shadow: inset 0 -6rem 6rem rgba(0, 0, 0, 0.56);
}

.home-hero-logo {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  width: 4.35rem;
  height: 4.35rem;
  object-fit: contain;
  border-radius: 50%;
  filter: drop-shadow(0 0.45rem 0.8rem rgba(0, 0, 0, 0.72));
}

.home-hero-copy {
  position: relative;
  z-index: 1;
  max-width: 20rem;
}

.home-hero-copy h3 {
  max-width: 10ch;
  margin: 0.25rem 0 0.45rem;
  font-size: 2.25rem;
}

.home-hero-copy p:not(.kicker) {
  margin-bottom: 0.85rem;
  color: #f4efe4;
  line-height: 1.35;
}

.home-hero-actions {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 0.55rem;
}

.visual-card {
  position: relative;
  min-height: 12.5rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  padding: 1rem;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.88)),
    radial-gradient(ellipse at 50% 100%, rgba(216, 168, 79, 0.5), transparent 9rem),
    linear-gradient(140deg, #20232b, #0b0c10);
}

.hero-card h3 {
  max-width: 9ch;
  margin: 3.7rem 0 0.35rem;
  font-size: 2.35rem;
}

.hero-card p:last-child {
  max-width: 14rem;
  color: #f1ede3;
}

.match-light {
  position: absolute;
  inset: 0;
  opacity: 0.7;
  background:
    repeating-linear-gradient(90deg, transparent 0 1.4rem, rgba(255, 255, 255, 0.04) 1.4rem 1.45rem),
    radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.32), transparent 5rem);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.45rem;
  margin: 0.8rem 0;
}

.metric-grid div {
  padding: 0.65rem 0.35rem;
  text-align: center;
}

.metric-grid strong {
  font-size: 1.05rem;
}

.metric-grid span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.56rem;
}

.home-benefit-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.55rem;
  margin: 0 0 0.85rem;
}

.home-benefit-card {
  display: grid;
  gap: 0.25rem;
  min-height: 5.35rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  color: var(--text);
  background:
    linear-gradient(145deg, rgba(216, 168, 79, 0.12), rgba(255, 255, 255, 0.045)),
    rgba(255, 255, 255, 0.04);
  padding: 0.7rem;
  text-align: left;
}

.home-benefit-card span,
.home-feature-card span {
  color: var(--gold-2);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.home-benefit-card strong {
  line-height: 1.2;
}

.home-feature-strip {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 0.95rem;
}

.home-feature-card {
  display: grid;
  min-height: 8.2rem;
  align-content: end;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  color: var(--text);
  overflow: hidden;
  padding: 0.8rem;
  text-align: left;
  background-position: center;
  background-size: cover;
}

.home-feature-card strong {
  max-width: 12rem;
  margin-top: 0.15rem;
  font-size: 1.2rem;
  line-height: 1.05;
  text-transform: uppercase;
}

.feature-tickets {
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.88)),
    url("/assets/home/convocatoria-entradas.jpg");
}

.feature-travel {
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.88)),
    url("/assets/home/viaje-madrid.jpg");
}

.feature-merch {
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.78)),
    url("/assets/home/merch-contraataque.png");
}

.section-title {
  margin: 1.2rem 0 0.65rem;
  font-size: 1rem;
}

.compact-list,
.event-list,
.ticket-list,
.menu-list,
.offer-list,
.shop-grid {
  display: grid;
  gap: 0.7rem;
}

.list-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.7rem;
  align-items: center;
  width: 100%;
  min-height: 4.6rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  color: var(--text);
  text-align: left;
  background: rgba(255, 255, 255, 0.045);
  padding: 0.7rem;
}

.list-row.wide {
  grid-template-columns: 1fr auto;
}

.list-row.static {
  cursor: default;
}

.list-row small,
.post-head small,
.profile-box small,
.member-card small {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
}

.list-row em {
  padding: 0.5rem 0.7rem;
  border-radius: 0.35rem;
  color: #100c05;
  background: var(--gold);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 1000;
  text-transform: uppercase;
}

.module-screen-head {
  margin-bottom: 0.85rem;
}

.module-screen-head h3 {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
}

.module-screen-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.status-card,
.offer-card,
.product-card {
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.85rem;
}

.status-card {
  display: grid;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
  background:
    linear-gradient(135deg, rgba(216, 168, 79, 0.16), rgba(135, 87, 216, 0.08)),
    rgba(255, 255, 255, 0.05);
}

.status-card span,
.offer-card small,
.product-card small {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
}

.status-card strong {
  font-size: 1.2rem;
}

.offer-card {
  display: grid;
  gap: 0.75rem;
}

.visual-offer {
  min-height: 12rem;
  align-content: end;
  background:
    linear-gradient(145deg, rgba(0, 0, 0, 0.18), rgba(216, 168, 79, 0.18)),
    #111318;
  background-position: center;
  background-size: cover;
}

.offer-card h3,
.product-card h3 {
  margin: 0.1rem 0 0.25rem;
  font-size: 1.2rem;
}

.offer-card p,
.product-card p {
  margin: 0;
  color: var(--muted);
}

.inline-entry-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem;
}

.inline-entry-form input {
  min-width: 0;
}

.product-card {
  display: grid;
  grid-template-columns: 6.4rem 1fr;
  gap: 0.8rem;
}

.product-art {
  min-height: 8.4rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.45), transparent 2.8rem),
    linear-gradient(140deg, #242631, #0b0c10);
  background-position: center;
  background-size: cover;
}

.product-buy {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 0.55rem;
  align-items: center;
  margin-top: 0.6rem;
}

.product-buy button {
  grid-column: 1 / -1;
}

.mini-action {
  min-height: 2.2rem;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  color: #171007;
  background: var(--gold);
  padding: 0 0.65rem;
  font-weight: 900;
}

.club-badge {
  display: grid;
  width: 2.7rem;
  height: 2.7rem;
  place-items: center;
  border-radius: 50%;
  color: #111;
  background: #f6f0e5;
  font-weight: 1000;
  font-size: 0.75rem;
}

.club-badge.purple {
  color: white;
  background: var(--purple);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.25rem;
  padding: 0.25rem;
  margin-bottom: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.04);
}

.segmented button {
  min-height: 2.35rem;
  border: 0;
  border-radius: 0.35rem;
  color: var(--muted);
  background: transparent;
}

.segmented .is-selected {
  color: #171007;
  background: var(--gold);
  font-weight: 1000;
}

.post-card,
.member-card,
.join-form {
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.05);
}

.post-card + .post-card {
  margin-top: 0.8rem;
}

.avatar {
  width: 2.35rem;
  height: 2.35rem;
  font-size: 0.8rem;
}

.avatar.gold {
  background: linear-gradient(135deg, #fff, var(--gold));
}

.avatar.photo {
  color: white;
  background: linear-gradient(135deg, #34435d, #8b5b36);
}

.post-image {
  height: 10.8rem;
  margin-top: 0.7rem;
  border-radius: 0.6rem;
  border: 1px solid var(--line);
}

.stadium {
  background:
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.7)),
    radial-gradient(circle at 48% 28%, rgba(255, 255, 255, 0.55), transparent 4rem),
    repeating-linear-gradient(100deg, #252932 0 1rem, #171a21 1rem 2rem);
}

.scarf {
  background:
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72)),
    repeating-linear-gradient(45deg, #f3f0e8 0 1rem, #d8a84f 1rem 1.3rem, #1b1c22 1.3rem 2.5rem);
}

.post-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 0.7rem;
  color: var(--muted);
}

.event-card,
.ticket-card {
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
}

.event-card {
  display: grid;
  grid-template-columns: 4.7rem 1fr;
}

.event-art,
.ticket-art {
  min-height: 6.7rem;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.45), transparent 2.4rem),
    linear-gradient(140deg, #242631, #0b0c10);
  background-position: center;
  background-size: cover;
}

.event-body,
.ticket-body {
  padding: 0.8rem;
}

.event-body h3,
.ticket-body h3 {
  margin-bottom: 0.25rem;
  font-size: 1.2rem;
}

.event-meta,
.ticket-meta {
  color: var(--muted);
  font-size: 0.76rem;
}

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

.ticket-actions button {
  min-height: 2.6rem;
  border-radius: 0.45rem;
  border: 1px solid var(--line);
  color: var(--text);
  background: transparent;
  font-weight: 900;
  text-transform: uppercase;
}

.ticket-actions button:last-child {
  background: var(--purple);
}

.ticket-actions button:disabled {
  cursor: not-allowed;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  opacity: 0.65;
}

.detail-panel,
.player-panel {
  display: grid;
  gap: 0.8rem;
}

.detail-hero,
.player-hero {
  min-height: 12rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background:
    linear-gradient(145deg, rgba(0, 0, 0, 0.18), rgba(216, 168, 79, 0.18)),
    radial-gradient(circle at 75% 20%, rgba(135, 87, 216, 0.28), transparent 36%),
    #111318;
  background-position: center;
  background-size: cover;
  padding: 1rem;
}

.detail-hero h3,
.player-hero h3 {
  margin: 0.2rem 0;
  font-size: 1.75rem;
  line-height: 1;
}

.detail-meta,
.player-meta {
  display: grid;
  gap: 0.5rem;
}

.detail-meta div,
.player-meta div,
.message-card {
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.75rem;
}

.detail-meta span,
.player-meta span,
.message-card small {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
}

.squad-grid {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.8rem;
}

.squad-card {
  display: grid;
  grid-template-columns: 3.2rem 1fr auto;
  gap: 0.75rem;
  align-items: center;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.75rem;
  text-align: left;
}

.squad-number {
  display: grid;
  width: 3.2rem;
  height: 3.2rem;
  place-items: center;
  border-radius: 50%;
  color: #140e05;
  background: var(--gold);
  font-weight: 950;
}

.squad-card strong,
.message-card strong {
  display: block;
}

.squad-card small,
.player-hero p,
.detail-hero p {
  color: var(--muted);
}

.message-form {
  display: grid;
  gap: 0.55rem;
}

.message-form textarea {
  min-height: 5rem;
}

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

.member-card {
  min-height: 25rem;
  margin-bottom: 0.8rem;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(216, 168, 79, 0.1), rgba(0, 0, 0, 0.18)),
    #0f1014;
  border-color: var(--line-strong);
}

.card-top {
  justify-content: space-between;
  color: var(--gold-2);
  font-weight: 900;
  text-transform: uppercase;
}

.qr {
  width: 7rem;
  height: 7rem;
  margin: 1rem auto 0.5rem;
  border: 0.45rem solid white;
  background:
    conic-gradient(#000 25%, #fff 0 50%, #000 0 75%, #fff 0) 0 0 / 1.2rem 1.2rem,
    white;
}

.join-form {
  display: grid;
  gap: 0.75rem;
}

.form-intro {
  margin: -0.25rem 0 0.15rem;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.join-form label {
  display: grid;
  gap: 0.32rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.join-form input,
.join-form select,
.message-form input,
.message-form textarea,
.inline-entry-form input,
.table-toolbar input,
.admin-login input,
.admin-form input,
.admin-form select,
.admin-row-actions select {
  width: 100%;
  min-height: 2.65rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  color: var(--text);
  background: color-mix(in srgb, var(--panel) 78%, #000 22%);
  padding: 0 0.75rem;
}

select,
option,
input,
textarea {
  color: var(--text);
  background-color: color-mix(in srgb, var(--panel) 82%, #000 18%);
}

option {
  color: var(--text);
  background-color: var(--panel);
}

body[data-theme="light"] .join-form input,
body[data-theme="light"] .join-form select,
body[data-theme="light"] .message-form input,
body[data-theme="light"] .message-form textarea,
body[data-theme="light"] .inline-entry-form input,
body[data-theme="light"] .table-toolbar input,
body[data-theme="light"] .admin-login input,
body[data-theme="light"] .admin-form input,
body[data-theme="light"] .admin-form select,
body[data-theme="light"] .admin-row-actions select,
body[data-theme="light"] select,
body[data-theme="light"] input,
body[data-theme="light"] textarea {
  color: var(--text);
  background-color: #ffffff;
}

.google-action {
  display: inline-grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem;
  align-items: center;
  min-height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  color: var(--text);
  background: color-mix(in srgb, var(--panel) 82%, #000 18%);
  padding: 0 0.8rem;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
}

.google-action span {
  display: grid;
  width: 1.55rem;
  height: 1.55rem;
  place-items: center;
  border-radius: 50%;
  color: #1f1f1f;
  background: #fff;
  font-family: Arial, sans-serif;
  font-weight: 900;
}

.form-result {
  min-height: 1.2rem;
  margin: 0;
  color: var(--ok);
  font-weight: 800;
}

.menu-list button {
  min-height: 2.8rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  color: var(--text);
  text-align: left;
  background: rgba(255, 255, 255, 0.045);
  padding: 0 0.8rem;
}

.danger-menu-action {
  color: #ffd7dc !important;
  border-color: rgba(255, 77, 95, 0.38) !important;
}

.bottom-nav {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
  height: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  border-top: 1px solid var(--line);
  background: rgba(7, 8, 11, 0.94);
}

.bottom-nav button {
  display: grid;
  flex: 1;
  gap: 0.15rem;
  place-items: center;
  min-height: 100%;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 1.1rem;
}

.bottom-nav span {
  font-size: 0.62rem;
}

.bottom-nav .is-active {
  color: var(--gold);
}

.admin-panel {
  padding: 1.25rem;
  border-radius: 1.2rem;
}

.panel-head {
  justify-content: space-between;
  margin-bottom: 1rem;
}

.panel-head h2 {
  margin: 0.2rem 0 0;
  font-size: 2rem;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.admin-grid article {
  min-height: 7rem;
}

.admin-grid strong {
  margin: 0.4rem 0;
  font-size: 2rem;
}

.admin-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
}

.admin-login,
.admin-form {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 1rem;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.045);
}

.admin-login p {
  min-height: 1.1rem;
  margin: 0;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 800;
}

.admin-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.admin-tabs button {
  min-height: 2.45rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  font-weight: 900;
  text-transform: uppercase;
}

.admin-tabs .is-selected {
  color: #151009;
  background: var(--gold);
}

.admin-forms {
  margin-bottom: 1rem;
}

.admin-form {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-form strong,
.admin-form button {
  grid-column: 1 / -1;
}

.admin-form.is-active {
  display: grid;
}

.admin-row-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.admin-row-actions select {
  min-height: 2.25rem;
  max-width: 10rem;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  color: var(--text);
  background: color-mix(in srgb, var(--panel) 78%, #000 22%);
}

.admin-row-actions button {
  min-height: 2.25rem;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
}

.table-toolbar {
  display: grid;
  grid-template-columns: 1fr minmax(14rem, 20rem);
  gap: 1rem;
  align-items: center;
  padding: 0.8rem;
  border-bottom: 1px solid var(--line);
}

table {
  width: 100%;
  border-collapse: collapse;
}

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

th {
  color: var(--text);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.6rem;
  border-radius: 999px;
  padding: 0 0.65rem;
  color: #151009;
  background: var(--gold);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.status-pill.wait {
  color: white;
  background: var(--purple);
}

.status-pill.ok {
  color: #07150c;
  background: var(--ok);
}

.install-modal[hidden] {
  display: none;
}

.install-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  align-items: end;
}

.install-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.66);
  backdrop-filter: blur(10px);
}

.install-modal__panel {
  position: relative;
  display: grid;
  gap: 0.75rem;
  width: min(100%, 30rem);
  margin: 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 1.1rem 1.1rem 0 0;
  background:
    linear-gradient(160deg, rgba(216, 168, 79, 0.12), rgba(255, 255, 255, 0.04)),
    #08090c;
  box-shadow: 0 -1rem 3rem rgba(0, 0, 0, 0.55);
  padding: 1.05rem 1rem calc(1rem + env(safe-area-inset-bottom));
}

.install-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  font-size: 1.25rem;
}

.install-modal__logo {
  width: 4.5rem;
  height: 4.5rem;
  object-fit: contain;
  border-radius: 50%;
}

.install-modal h2 {
  margin: 0;
  max-width: 13ch;
  font-size: 1.75rem;
}

.install-modal p {
  margin: 0;
  color: #e7dfd1;
  line-height: 1.35;
}

.install-modal__actions {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 0.55rem;
}

.install-modal__hint {
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  padding: 0.7rem;
  font-size: 0.85rem;
  line-height: 1.35;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: minmax(20rem, 27rem) 1fr;
  }

  .public-panel {
    display: none;
  }
}

@media (max-width: 860px) {
  :root {
    --mobile-nav-height: 4.05rem;
    font-size: 15px;
  }

  body {
    background: #050506;
    overflow: hidden;
  }

  .app-shell {
    display: block;
    min-height: 100dvh;
    padding: 0;
  }

  .phone-frame {
    width: 100%;
    height: 100dvh;
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .mobile-header {
    height: calc(3.65rem + env(safe-area-inset-top));
    padding-right: 0.75rem;
    padding-left: 0.75rem;
  }

  .mobile-header h2 {
    font-size: 1rem;
  }

  .icon-button {
    width: 2.15rem;
    height: 2.15rem;
  }

  .mobile-content {
    padding: 0.7rem 0.7rem calc(var(--mobile-nav-height) + 0.85rem + env(safe-area-inset-bottom));
  }

  .primary-action,
  .ghost-action,
  .outline-action {
    min-height: 2.55rem;
    font-size: 0.82rem;
  }

  .home-hero-card {
    min-height: min(62dvh, 28rem);
    padding: 0.85rem;
    background-position: 47% center;
  }

  .home-hero-logo {
    width: 3.9rem;
    height: 3.9rem;
  }

  .home-hero-copy h3 {
    max-width: 11ch;
    font-size: 2.05rem;
  }

  .home-hero-copy p:not(.kicker) {
    font-size: 0.92rem;
  }

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

  .home-benefit-grid {
    gap: 0.45rem;
  }

  .home-benefit-card {
    min-height: 4.75rem;
    padding: 0.6rem;
  }

  .home-benefit-card strong {
    font-size: 0.88rem;
  }

  .home-feature-card {
    min-height: 7rem;
    padding: 0.7rem;
  }

  .home-feature-card strong {
    font-size: 1.05rem;
  }

  .visual-card {
    min-height: 10.8rem;
    padding: 0.85rem;
  }

  .hero-card h3 {
    margin-top: 3rem;
    font-size: 2rem;
  }

  .compact-list,
  .event-list,
  .ticket-list,
  .menu-list,
  .offer-list,
  .shop-grid {
    gap: 0.55rem;
  }

  .list-row {
    min-height: 3.85rem;
    gap: 0.55rem;
    padding: 0.6rem;
    font-size: 0.9rem;
  }

  .list-row em {
    padding: 0.42rem 0.55rem;
    font-size: 0.62rem;
  }

  .club-badge {
    width: 2.35rem;
    height: 2.35rem;
    font-size: 0.68rem;
  }

  .event-card {
    grid-template-columns: 4.1rem 1fr;
  }

  .event-art,
  .ticket-art {
    min-height: 5.9rem;
  }

  .event-body,
  .ticket-body {
    padding: 0.65rem;
  }

  .event-body h3,
  .ticket-body h3,
  .offer-card h3,
  .product-card h3 {
    font-size: 1.05rem;
  }

  .ticket-actions {
    gap: 0.4rem;
  }

  .ticket-actions button {
    min-height: 2.35rem;
    font-size: 0.76rem;
  }

  .bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateZ(0);
  }

  .bottom-nav button {
    font-size: 0.98rem;
  }

  .bottom-nav span {
    font-size: 0.56rem;
  }

  .install-modal__panel {
    width: 100%;
  }

  .admin-panel {
    display: none;
  }
}

@media (max-width: 390px) {
  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-card h3 {
    font-size: 2rem;
  }
}
