:root {
  --bg: #f6f3ec;
  --bg-2: #ffffff;
  --card: #ffffff;
  --ink: #16140f;
  --muted: #6d665b;
  --gold: #a6842a;
  --gold-2: #8a6b1c;
  --gold-deep: #6e5414;
  --line: rgba(22, 20, 15, .12);
  --danger: #9c2f2f;
  --ok: #2c6b3a;
  --btn: #d4af37;
  --btn-ink: #1a1406;
  --sidebar: #ffffff;
  --sidebar-ink: #16140f;
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Outfit", "Segoe UI", sans-serif;
  --shadow: 0 18px 50px rgba(22, 20, 15, .08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.55;
  min-height: 100vh;
}
body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 80;
  opacity: .035;
  background-image: radial-gradient(rgba(22, 20, 15, .45) .6px, transparent .7px);
  background-size: 3px 3px;
}
img { max-width: 100%; display: block; }
a { color: var(--gold-deep); text-decoration: none; }
a:hover { color: var(--ink); }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -.02em; line-height: 1.05; margin: 0 0 .4em; }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
h3 { font-size: 1.7rem; }
p { margin: 0 0 1rem; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--gold); color: #1a1406; }

.wrap { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.narrow { width: min(720px, calc(100% - 40px)); margin: 0 auto; }
.eyebrow {
  color: var(--gold);
  letter-spacing: .22em;
  text-transform: uppercase;
  font-size: .72rem;
  margin: 0 0 .7rem;
}
.muted { color: var(--muted); }
.gold { color: var(--gold-2); }
.pos { color: var(--ok); }
.neg { color: var(--danger); }
.help { color: var(--muted); font-size: .92rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: .85rem 1.3rem;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: .04em;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-gold { background: linear-gradient(180deg, color-mix(in srgb, white 24%, var(--btn)), var(--btn)); color: var(--btn-ink); font-weight: 600; }
.btn-gold:hover { color: var(--btn-ink); filter: brightness(1.05); }
.btn-ghost { background: transparent; border-color: rgba(22, 20, 15, .28); color: var(--ink); }
.btn-ghost:hover { border-color: var(--gold); color: var(--ink); }
.btn-danger { background: transparent; border-color: rgba(156, 47, 47, .45); color: var(--danger); }
.btn-small { padding: .55rem .9rem; font-size: .92rem; }
.btn-block { width: 100%; }

.site-header, .topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 16px 28px;
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 252, 247, .92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .75rem; color: var(--ink); }
.brand img { width: 42px; height: 42px; object-fit: contain; }
.brand-name { display: flex; flex-direction: column; font-family: var(--serif); font-size: 1.45rem; letter-spacing: .14em; line-height: 1; }
.brand-name small { letter-spacing: .18em; font-family: var(--sans); font-size: .62rem; color: var(--gold); margin-top: .28rem; }
.site-nav { display: flex; align-items: center; gap: 1.2rem; }
.site-nav a { color: var(--ink); }
.site-nav a.is-active, .side-nav a.is-active { color: var(--gold-deep); }
.nav-toggle { display: none; background: #fff; border: 1px solid var(--line); color: var(--ink); border-radius: 999px; padding: .45rem .8rem; }

.hero {
  min-height: calc(100vh - 76px);
  display: grid;
  grid-template-columns: 1.3fr .8fr;
  gap: 40px;
  align-items: end;
  padding: 7vh 6vw 8vh;
  background:
    linear-gradient(100deg, rgba(246,243,236,.94) 8%, rgba(246,243,236,.78) 46%, rgba(246,243,236,.9)),
    var(--hero-image, none) center/cover no-repeat,
    var(--bg);
}
.display { font-size: clamp(5rem, 14vw, 9.5rem); letter-spacing: .08em; margin: 0; }
.lede { font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2.3rem); font-style: italic; color: var(--gold-2); max-width: 16ch; }
.hero-text { max-width: 46ch; color: #3c3830; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.4rem; }
.hero-panel {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .88);
  padding: 22px;
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.hero-mark { width: 84px; height: 84px; margin-bottom: 1rem; animation: spin 48s linear infinite; }
.next-person { display: flex; gap: .8rem; align-items: center; color: var(--ink); margin-bottom: 1rem; }
.next-person img, .avatar, .rank img, .cycle-rail img, .cycle-row img, .me-chip img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.next-person strong, .rank strong { display: block; font-family: var(--serif); font-size: 1.4rem; font-weight: 500; }
.next-person em, .rank small { color: var(--muted); font-style: normal; }
.hero-stats { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0; margin: 0; }
.hero-stats strong, .stat-card strong { display: block; font-family: var(--sans); font-size: 1.7rem; color: var(--gold-2); font-weight: 500; letter-spacing: 0; }
.hero-stats span, .stat-card span { color: var(--muted); font-size: .85rem; }

.section { padding: 84px 0; }
.section-tight { padding-top: 20px; }
.page-offset { padding-top: 48px; }
.section-head { margin-bottom: 28px; max-width: 680px; }
.split-head, .page-head { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 28px; }
.page-head h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
.manifesto, .membership, .profile, .grid-2 { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; align-items: start; }
.manifesto img, .price-card img { width: 100%; height: 460px; object-fit: cover; border-radius: 22px; filter: saturate(.75) contrast(1.05); }
.rules { list-style: none; padding: 0; margin: 1.2rem 0 0; }
.rules li { display: grid; grid-template-columns: auto 1fr; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.rules span { font-family: var(--serif); color: var(--gold); font-size: 1.4rem; }
.rules-panel { margin-top: 22px; }
.grid-4, .steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.steps article, .card, .price-card, .stat-card, .auth-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
}
.steps span { font-family: var(--serif); color: var(--gold); font-size: 1.8rem; }
.card-top, .pass-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: .6rem; }
.card-link { display: block; color: inherit; }
.card-link:hover { border-color: var(--gold); color: inherit; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.stat-card strong.stat-small { font-size: 1.25rem; }
.price { font-family: var(--serif); font-size: clamp(2.8rem, 6vw, 4.4rem); color: var(--gold-2); margin: .2rem 0 .6rem; line-height: 1; }
.price-inline { font-family: var(--serif); font-size: 2rem; color: var(--gold-2); }
.price-card { position: relative; overflow: hidden; }
.price-card img { position: absolute; inset: auto 0 0 0; height: 140px; opacity: .35; border-radius: 0; }
.price-card-flat img { display: none; }
.check-list { padding-left: 1.1rem; }
.check-list li { margin: .45rem 0; }
.ranking-band { display: grid; grid-template-columns: .8fr 1.2fr; gap: 30px; align-items: center; }
.rank-list, .stack { display: grid; gap: 12px; }
.rank, .cycle-row { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; color: inherit; }
.rank em { font-family: var(--serif); color: var(--gold); font-size: 1.6rem; width: 2ch; font-style: normal; }
.people-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.person-card { display: block; color: inherit; border: 1px solid var(--line); border-radius: 22px; padding: 16px; background: #fff; }
.person-card:hover { border-color: var(--gold); color: inherit; }
.person-top { display: flex; justify-content: space-between; align-items: start; }
.person-top img, .avatar-lg { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 1px solid var(--gold); }
.person-top em { font-family: var(--serif); font-size: 2rem; color: var(--gold); font-style: normal; }
.person-meta { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.profile-id .avatar-lg { margin-bottom: 12px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.filters a, .filters input {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .45rem .8rem;
  color: var(--ink);
  background: transparent;
}
.filters a.is-active { background: var(--gold); color: #1a1406; }
.site-footer { border-top: 1px solid var(--line); padding: 42px 0 20px; margin-top: 20px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr .6fr .8fr; gap: 24px; }
.footer-grid a, .footer-grid p { display: block; color: var(--muted); }
.footer-end { color: var(--muted); padding-top: 18px; font-size: .9rem; }

.badge { border: 1px solid var(--line); border-radius: 999px; padding: .2rem .55rem; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-2); white-space: nowrap; }
.badge-completada, .badge-pagado, .badge-activo, .badge-activa { color: var(--ok); border-color: rgba(183,215,168,.4); }
.badge-cancelada, .badge-cancelado, .badge-rechazado, .badge-suspendido, .badge-vencida { color: var(--danger); border-color: rgba(156,47,47,.35); }
.badge-disponible, .badge-listo, .badge-devuelto { color: var(--ok); border-color: rgba(44,107,58,.35); }
.stars { color: #cfc6b4; letter-spacing: .08em; }
.stars .on { color: var(--gold); }
.stars.is-empty { color: var(--muted); letter-spacing: 0; }
.meter { margin: .7rem 0; }
.meter-top { display: flex; justify-content: space-between; font-size: .92rem; }
.meter-track { height: 4px; background: #e7e1d4; border-radius: 99px; overflow: hidden; }
.meter-track i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-deep), var(--gold-2)); }

.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; margin: 0; }
.kv div { border-top: 1px solid var(--line); padding-top: 8px; }
.kv dt { color: var(--muted); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; }
.kv dd { margin: .25rem 0 0; font-family: var(--serif); font-size: 1.35rem; }
.pass { border: 1px solid var(--gold); border-radius: 22px; padding: 22px; background: radial-gradient(circle at top right, rgba(212,175,55,.2), transparent 42%), #fff; }
.pass h2 { font-size: clamp(2rem, 4vw, 3rem); }
.pass-date { color: var(--gold-2); font-family: var(--serif); font-size: 1.3rem; }

.cycle-rail { list-style: none; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(140px, 1fr); gap: 10px; overflow-x: auto; padding: 6px 0 12px; margin: 0 0 18px; }
.cycle-rail li { border: 1px solid var(--line); border-radius: 16px; padding: 12px; text-align: center; }
.cycle-rail li.is-next { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.cycle-rail img { margin: 0 auto 8px; }
.cycle-rail strong, .cycle-rail span { display: block; }
.cycle-rail span { color: var(--gold); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.cycle-row { justify-content: space-between; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.plain-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }

.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; background:
  radial-gradient(circle at top, rgba(212,175,55,.18), transparent 32%), var(--bg); }
.auth-wrap { width: min(480px, 100%); }
.auth-card h1 { font-size: 3rem; }
.auth-switch { color: var(--muted); }
.demo-box { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; color: var(--muted); font-size: .92rem; }
.demo-box code { color: var(--gold-2); }
.hp { position: absolute; left: -9999px; }

.shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 45;
  background: var(--sidebar); border-right: 1px solid var(--line); color: var(--sidebar-ink);
  display: flex; flex-direction: column; padding: 18px 14px 16px;
}
.side-nav { display: grid; gap: 4px; margin-top: 22px; }
.side-nav a { color: var(--sidebar-ink); padding: .7rem .8rem; border-radius: 12px; display: flex; justify-content: space-between; align-items: center; }
.sidebar .brand, .sidebar .brand-name { color: var(--sidebar-ink); }
.side-nav a.is-active, .side-nav a:hover { background: rgba(212,175,55,.1); }
.side-nav em { background: var(--gold); color: #1a1406; border-radius: 99px; min-width: 1.4rem; text-align: center; font-style: normal; font-size: .75rem; padding: .05rem .35rem; }
.logout { margin-top: auto; }
.maincol { margin-left: 260px; min-height: 100vh; }
.content { padding: 28px; }
.topbar { position: sticky; }
.topbar-kicker { margin: 0; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); font-size: .75rem; }
.me-chip { display: flex; align-items: center; gap: .6rem; color: var(--ink); }
.me-chip img { width: 36px; height: 36px; }
.notice, .wrap-notice {
  margin: 16px 28px 0;
  border: 1px solid var(--line);
  background: rgba(212,175,55,.08);
  border-radius: 14px;
  padding: 12px 14px;
}
.content .notice { margin: 0 0 16px; }
.wallet-hero { margin-bottom: 18px; }

.field { display: grid; gap: .35rem; }
.field span { color: var(--muted); font-size: .85rem; }
input, select, textarea {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .75rem .85rem;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,175,55,.15); }
option { background: #fff; color: var(--ink); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice { display: flex; gap: .6rem; align-items: center; }
.choice.is-disabled { opacity: .5; }
.align-end { align-items: end; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: .75rem .5rem; border-bottom: 1px solid rgba(212,175,55,.16); vertical-align: top; }
.table th { color: var(--muted); font-weight: 500; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.empty { border: 1px dashed var(--line); border-radius: 16px; padding: 22px; color: var(--muted); }
.map-canvas { height: 320px; border-radius: 16px; margin: 8px 0 12px; }
.logo-preview { width: 92px; height: 92px; object-fit: contain; background: #070708; border-radius: 18px; border: 1px solid var(--line); padding: 8px; }
.narrow-form { margin-top: 16px; max-width: 760px; }
.flash-stack { position: fixed; top: 16px; right: 16px; z-index: 90; width: min(380px, calc(100% - 32px)); display: grid; gap: 8px; }
.flash { background: #fff; border: 1px solid var(--gold); color: var(--ink); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); cursor: pointer; }
.flash-error { border-color: var(--danger); }
.flash.out { opacity: 0; transition: opacity .4s; }

@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 980px) {
  .hero, .manifesto, .membership, .profile, .grid-2, .ranking-band, .footer-grid, .grid-4, .people-grid, .stat-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .hero { min-height: auto; padding-top: 48px; }
  .display { font-size: 4.4rem; }
  .manifesto img { height: 240px; }
  .nav-toggle { display: inline-flex; }
  .site-nav { display: none; position: absolute; top: 74px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 12px 20px 18px; flex-direction: column; align-items: flex-start; }
  .site-header.nav-open .site-nav { display: flex; }
  .sidebar { transform: translateX(-105%); transition: transform .2s ease; }
  .shell.nav-open .sidebar { transform: none; }
  .shell.nav-open .nav-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 44; }
  .maincol { margin-left: 0; }
  .content, .site-header, .topbar { padding-left: 16px; padding-right: 16px; }
  .notice { margin-left: 16px; margin-right: 16px; }
  .form-grid, .kv { grid-template-columns: 1fr; }
  .page-head, .split-head { flex-direction: column; align-items: start; }
}
input[type="color"] { height: 46px; padding: .3rem; background: #fff; }
.ledger { display: grid; gap: 0; margin: 0; }
.ledger div { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding: 10px 0; }
.ledger strong { font-family: var(--sans); font-weight: 500; }
.swatch-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.gear-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gear-card h3 { font-size: 1.55rem; }
.plastic {
  background: linear-gradient(145deg, #1b1a17, #3a3222 55%, #111);
  color: #f6f1e4;
  border-radius: 18px;
  padding: 18px 18px 16px;
  min-height: 168px;
  display: grid;
  align-content: space-between;
  box-shadow: var(--shadow);
}
.plastic p { margin: 0; letter-spacing: .16em; text-transform: uppercase; font-size: .72rem; color: #e6c56b; }
.plastic strong { font-family: var(--sans); letter-spacing: .12em; font-size: 1.15rem; font-weight: 500; }
.plastic-row { display: flex; justify-content: space-between; gap: 12px; color: #f3e2a7; font-size: .9rem; }
.pay-layout { display: grid; grid-template-columns: .85fr 1.15fr; gap: 18px; align-items: start; }
@media (max-width: 980px) {
  .gear-grid, .pay-layout { grid-template-columns: 1fr; }
}
@media print {
  body::before, .no-print, .sidebar, .topbar, .site-header, .site-footer, .flash-stack, .nav-backdrop { display: none !important; }
  .maincol { margin: 0; }
  body, .pass { background: white; color: black; }
  .pass { border-color: #222; }
}
