:root {
  color-scheme: dark;
  --background: #121412;
  --surface: #1b1f1c;
  --border: #394039;
  --text: #f1f5ed;
  --muted: #b6c1b4;
  --accent: #cbef9e;
  --green: #aee5a5;
  --orange: #ffb475;
  --on-accent: #182111;
  --danger: #ffb4aa;
  font: 100%/1.5 system-ui, sans-serif;
}
:root[data-theme="light"] {
  color-scheme: light;
  --background: #f4f5f1;
  --surface: #fff;
  --border: #c6cec4;
  --text: #1b231f;
  --muted: #536153;
  --accent: #34633d;
  --on-accent: #fff;
  --green: #24643d;
  --orange: #914500;
  --danger: #a13432;
  --accent-hover: #284f30;
  --accent-soft: #ddf2b8;
  --icon-surface: #e5eddb;
  --icon-edge: #f0f7e8;
  --module-surface: radial-gradient(ellipse at 100% 100%, var(--accent-soft), var(--icon-edge) 30%, transparent 65%), var(--surface);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--text); }
.wrap { width: min(100% - 2rem, 72rem); margin-inline: auto; }
.top { border-bottom: 1px solid var(--border); }
.top-inner, .section-head, .row, .week-nav { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.top-inner { min-height: 4.25rem; }
.top-nav .brand span { display: inline-block; margin-left: 0; }
.top-nav .nav-exit { color: var(--muted); background: transparent; }
main { padding-block: 1.5rem 4rem; }
:root:has(.home-dock) {
  --dock-space: calc(4.75rem + env(safe-area-inset-bottom, 0px));
  scroll-padding-bottom: var(--dock-space);
}
:root[data-theme] body {
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px);
}
:root:has(.home-dock) main { padding-bottom: var(--dock-space); }
.home-dock {
  position: fixed;
  z-index: 5;
  bottom: calc(.65rem + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
}
.home-dock .button {
  min-width: 6rem;
  border-radius: 2rem;
  border-color: var(--accent);
  background: var(--surface);
  color: var(--accent);
  font-weight: 650;
  box-shadow: 0 2px 8px rgb(0 0 0 / .16);
}
.brand { color: var(--text); text-decoration: none; font-size: .95rem; font-weight: 800; letter-spacing: .08em; }
.brand span { color: var(--accent); margin-left: .4rem; letter-spacing: 0; }
h1, h2, p { overflow-wrap: anywhere; }
h1 { font-size: clamp(2rem, 7vw, 3.1rem); line-height: 1.08; letter-spacing: -.045em; margin: .75rem 0 1.45rem; }
h2 { font-size: 1.12rem; margin: 0 0 .65rem; }
p { margin: .65rem 0 1rem; }
a { color: var(--accent); text-underline-offset: .2em; }
small { font-size: .875rem; color: var(--muted); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
form { margin: 0; }
button, input, select, textarea { font: inherit; }
button, .button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem;
  border: 1px solid var(--border); border-radius: .65rem; padding: .45rem .85rem;
  background: var(--surface); color: var(--text); text-decoration: none; cursor: pointer;
}
button:hover, .button:hover { border-color: var(--accent); }
.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 700; }
.danger { color: var(--danger); }
.text-button { background: transparent; border-color: transparent; color: var(--accent); }
input:not([type=checkbox], [type=radio], [type=hidden]), select, textarea {
  min-height: 2.75rem; width: 100%; border: 1px solid var(--border); border-radius: .55rem;
  padding: .45rem .65rem; color: var(--text); background: var(--background);
}
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
textarea { min-height: 6rem; resize: vertical; }
.form { max-width: 35rem; }
.form label, .payment label { display: block; margin-bottom: .3rem; font-weight: 600; }
.form p:has(> input[type="checkbox"]) {
  display: flex;
  align-items: center;
  gap: .65rem;
}
.form p > input[type="checkbox"] {
  order: -1;
  flex: none;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
}
.form label:has(+ input[type="checkbox"]) {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  margin: 0;
  cursor: pointer;
}
.form input:is([type="time"], [type="datetime-local"]) {
  display: block;
  -webkit-appearance: none;
  appearance: none;
  min-width: 0;
  max-width: 100%;
}
.form input::-webkit-date-and-time-value { text-align: start; }
.form .helptext, .form li { color: var(--muted); font-size: .875rem; }
.booking-privacy { border-top: 1px solid var(--border); margin-block: 1rem; padding-top: .25rem; }
.booking-privacy p { color: var(--muted); font-size: .9rem; margin-block: .65rem; }
.errorlist, .form .errorlist li { color: var(--danger); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-block: .7rem; }
.actions input[type=search], .actions input[type=date] { width: auto; max-width: 100%; }
.back { display: inline-flex; min-height: 2.75rem; align-items: center; }
body:has(.home-heading) .top-nav { max-width: 34rem; }
body:has(.home-heading) .brand { font-size: 1.1rem; letter-spacing: -.02em; }
.home-heading { text-align: center; margin: 0 0 1.25rem; }
.home-heading h1 { margin: 0; font-size: clamp(1.85rem, 6.8vw, 2.65rem); }
.home-heading time { display: block; margin-top: .22rem; color: var(--muted); }
.tiles {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: .7rem;
  max-width: 34rem; margin-inline: auto;
}
.tiles a {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .25rem; text-align: center; min-width: 0;
  aspect-ratio: 1.18; padding: .65rem; border-radius: 1rem;
  border: 1px solid var(--border); border-color: color-mix(in srgb, var(--border) 80%, var(--muted));
  color: var(--text); background: var(--surface);
  background-image: linear-gradient(150deg, transparent, color-mix(in srgb, var(--background) 62%, transparent));
  font-size: clamp(1.05rem, 4.3vw, 1.6rem); line-height: 1.2; font-weight: 700; text-decoration: none;
}
.tiles a:hover { border-color: var(--accent); }
.tiles a > span { max-width: 100%; overflow-wrap: anywhere; }
.tiles small {
  display: grid;
  gap: .12rem;
  margin-top: .22rem;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.3;
}
.tiles small b {
  color: var(--accent);
  font-size: clamp(1.125rem, 5.6vw, 1.375rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
.tiles .tile-area small { margin-top: clamp(.75rem, 3.5vw, 1rem); }
:root[data-theme="dark"] .tiles-gang small { color: #f1f5ed; }
.tiles-minimal small { text-shadow: none; }
.tiles-minimal a {
  box-shadow: 0 3px 9px -6px rgb(203 239 158 / .25);
  display: grid;
  place-items: center;
  padding: .6rem;
  font-family: system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(1.35rem, 6vw, 2.2rem);
  line-height: 1.05;
  letter-spacing: -.035em;
}
:root[data-theme="light"] .tiles-minimal a {
  background: var(--module-surface);
  box-shadow: none;
}
.tiles-minimal .tile-week { --letter-shadow: rgb(143 187 255 / .45); }
.tiles-minimal .tile-clients { --letter-shadow: rgb(199 162 237 / .45); }
.tiles-minimal .tile-income { --letter-shadow: rgb(144 211 175 / .45); }
.tiles-minimal .tile-area { --letter-shadow: rgb(239 182 154 / .45); }
:root[data-theme="dark"] .tiles-minimal span {
  text-shadow: 0 1.5px 1px var(--letter-shadow);
}
.tiles-gang .tile-week { --art: url("gang/GANG-turnos.webp"); }
.tiles-gang .tile-clients { --art: url("gang/GANG-clientes.webp"); }
.tiles-gang .tile-income { --art: url("gang/GANG-ingresos.webp"); }
.tiles-gang .tile-area { --art: url("gang/GANG-area.webp"); }
.tiles-classic .tile-week { --icon-position: 7% 7%; }
.tiles-classic .tile-clients { --icon-position: 93% 7%; }
.tiles-classic .tile-income { --icon-position: 7% 93%; }
.tiles-classic .tile-area { --icon-position: 93% 93%; }
.tiles-gang a {
  justify-content: flex-end;
  padding: .85rem .45rem;
  background-color: #393746;
  background-image: linear-gradient(to bottom, transparent 55%, rgba(24,20,40,.22) 71%, rgba(18,14,31,.87) 100%), var(--art);
  background-size: cover;
  background-position: center;
  color: white;
  text-shadow: 0 1px 4px #171321;
  letter-spacing: -.025em;
}
.tile-art { display: none; }
.tiles-classic .tile-art {
  display: block;
  width: clamp(4.5rem, 22vw, 5.25rem);
  aspect-ratio: 1;
  flex: none;
  background: url("clasico.jpg") var(--icon-position) / 242% 242% no-repeat;
  -webkit-mask-image: radial-gradient(ellipse, black 52%, transparent 75%);
  mask-image: radial-gradient(ellipse, black 52%, transparent 75%);
}
:root[data-theme="light"] body:has(.home-heading) .brand { font-weight: 700; }
:root[data-theme="light"] body:has(.home-heading) .nav-exit { background: var(--surface); border-radius: .75rem; }
:root[data-theme="light"] .home-heading h1 { font-size: 1.75rem; font-weight: 700; }
:root[data-theme="light"] .home-heading time { font-size: .875rem; }
:root[data-theme="light"] .tiles { gap: .75rem; }
:root[data-theme="light"] .tiles a { border-color: var(--border); }
:root[data-theme="light"] .tiles a:hover { border-color: var(--accent-hover); }
:root[data-theme="light"] .tiles-gang a > span {
  padding: .25rem .55rem;
  background: rgb(255 255 255 / .95);
  color: var(--text);
  border-radius: .55rem;
  text-shadow: none;
}
.tiles-classic a {
  justify-content: flex-start;
  aspect-ratio: auto;
  padding: 1rem .75rem;
  gap: .375rem;
  font-size: 1.0625rem;
  font-weight: 650;
  letter-spacing: -.015em;
}
:root[data-theme="light"] .tiles-classic a { background: var(--module-surface); }
.tiles-classic .tile-area > span {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
:root[data-theme="light"] .tiles-classic .tile-art {
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft), var(--icon-surface) 55%, var(--icon-edge));
  -webkit-mask-image: none;
  mask-image: none;
}
.tile-week { --cutout-position: 14.5% 9.3%; }
.tile-clients { --cutout-position: 88.4% 8.4%; }
.tile-income { --cutout-position: 11.9% 83.7%; }
.tile-area { --cutout-position: 88.8% 85.7%; }
:root[data-theme="light"] .tiles-classic .tile-art::before {
  content: "";
  display: block;
  height: 100%;
  background: url("clasico.jpg") var(--cutout-position) / 280% 280% no-repeat;
  -webkit-mask: url("clasico-siluetas.svg") var(--cutout-position) / 280% 280% no-repeat;
  mask: url("clasico-siluetas.svg") var(--cutout-position) / 280% 280% no-repeat;
  filter: saturate(1.15) contrast(1.06);
}
.appearance summary { font-weight: 700; }
.collect-card {
  display: flex; align-items: center; gap: clamp(.5rem, 2.3vw, 1rem); max-width: 34rem; min-height: 5.5rem;
  margin: 1.1rem auto 0; padding: .85rem clamp(.6rem, 3vw, 1.1rem); border-radius: 1rem;
  border: 1px solid var(--accent); border-color: color-mix(in srgb, var(--accent) 52%, var(--border));
  border-inline-start: 4px solid var(--accent); color: var(--text); text-decoration: none;
  background: linear-gradient(115deg, #273324, var(--surface) 72%);
}
:root[data-theme="light"] .collect-card {
  background: radial-gradient(ellipse at 100% 100%, var(--accent-soft), var(--icon-edge) 35%, transparent 75%), var(--surface);
  border-color: var(--border);
  border-inline-start-color: var(--accent);
  gap: .75rem;
  padding: 1rem .75rem;
}
:root[data-theme="light"] .collect-card:hover { border-color: var(--accent-hover); }
:root[data-theme="light"] .collect-copy strong { font-size: 1rem; }
:root[data-theme="light"] .collect-copy small { font-size: .75rem; line-height: 1.4; }
:root[data-theme="light"] .scan-mark {
  place-content: center;
  flex: 0 0 2.75rem;
  height: 2.75rem;
  background: var(--accent);
  border-color: var(--accent);
  color: #cbef9e;
}
:root[data-theme="light"] .pro-label {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  padding: .3125rem .625rem;
  font-size: .6875rem;
  font-weight: 600;
}
a.collect-card:hover { border-color: var(--accent); }
.collect-copy { display: grid; flex: 1; min-width: 0; gap: .12rem; line-height: 1.35; overflow-wrap: anywhere; }
.collect-copy strong { font-size: 1.2rem; letter-spacing: -.025em; }
.scan-mark {
  display: grid; grid-template-columns: repeat(2, .52rem); gap: .18rem; padding: .65rem;
  border: 1px solid var(--border); border-radius: .72rem; color: var(--accent); background: var(--surface);
}
.scan-mark i { width: .52rem; height: .52rem; border: 2px solid; border-radius: 2px; }
.scan-mark i:last-child { border-style: dotted; }
.pro-label { border: 1px solid currentColor; color: var(--accent); border-radius: 2rem; padding: .2rem .55rem; font-size: .76rem; font-weight: 700; white-space: nowrap; }
@media (prefers-reduced-motion: no-preference) {
  .tiles a, .collect-card { transition: transform 110ms ease-out, border-color 150ms ease-out; }
  :root[data-theme="light"] :is(.tiles a, .collect-card) { transition-duration: 120ms, 180ms; }
  .tiles a:active, .collect-card:active { transform: scale(.98); }
  :root[data-theme] main { animation: reveal-section 180ms ease-out; }
  .tile-income b, .metrics .paid dd, .collect-receipt .paid { animation: reveal-section 240ms ease-out; }
  @keyframes reveal-section { from { opacity: .65; } to { opacity: 1; } }
}
.collect-receipt { max-width: 27rem; margin-inline: auto; text-align: center; }
.collect-receipt img { display: block; width: min(100%, 21rem); height: auto; margin: 1rem auto; image-rendering: pixelated; }
.collect-receipt img[hidden] { display: none; }
.appearance fieldset { padding: 0; border: 0; margin: .8rem 0 1rem; }
.appearance legend { font-weight: 600; margin-bottom: .35rem; }
.style-options { display: flex; flex-wrap: wrap; gap: .5rem; }
.style-options label { display: inline-flex; align-items: center; gap: .4rem; min-height: 2.75rem; padding: .25rem .65rem; border-radius: .6rem; border: 1px solid var(--border); cursor: pointer; }
.style-options label:has(:checked) { border-color: var(--accent); }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 1rem; padding: 1rem; margin-block: .9rem; }
#plan-pro { border-color: var(--accent); border-inline-start-width: 4px; }
.week-nav { padding: .5rem 0; }
.week-nav a, .section-head a, .free a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.week { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: .65rem; }
.day { margin: 0; }
.day h2 { text-transform: capitalize; }
.appointment { display: grid; gap: .1rem; margin-block: .45rem; padding: .6rem; border-radius: .55rem; background: var(--background); color: var(--text); text-decoration: none; }
.appointment span { font-size: .875rem; }
.cancelled { opacity: .75; }
.free { display: flex; justify-content: space-between; gap: .55rem; font-size: .875rem; border-top: 1px solid var(--border); }
.row { padding-block: .65rem; min-height: 2.75rem; border-top: 1px solid var(--border); text-decoration: none; }
.row:first-child { border-top: 0; }
.row strong, .row small { overflow-wrap: anywhere; }
.paid { color: var(--green); }
.pending { color: var(--orange); }
.tabs { display: flex; flex-wrap: wrap; gap: .55rem; }
.tabs a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: .4rem .9rem; border: 1px solid var(--border); border-radius: .6rem; text-decoration: none; }
.tabs a[aria-current=page] { background: var(--accent); color: var(--on-accent); }
.metrics dd { font-size: clamp(1.55rem, 7vw, 2.55rem); margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.lead { font-size: 1.12rem; }
.notice { padding: .65rem .85rem; border-left: 3px solid var(--orange); background: var(--surface); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr)); gap: .75rem; }
.gallery figure { margin: 0; }
.gallery img, .reference { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: .6rem; }
.reference { width: min(100%, 14rem); }
.gallery figcaption, .gallery-choice span { display: block; margin-block: .4rem; overflow-wrap: anywhere; }
.choice { display: flex; flex-wrap: wrap; align-items: center; min-height: 2.75rem; gap: .6rem; }
.choice + h2 { margin-top: .9rem; }
.choice + button { margin-top: .75rem; }
.slots { display: flex; gap: .55rem; flex-wrap: wrap; }
summary { cursor: pointer; min-height: 2.75rem; padding-top: .5rem; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); }
@media (min-width: 48rem) {
  .metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
}
.booking-options:has([data-without-photos]):not(:has([name="service"]:checked)) .booking-gallery,
.booking-options:has([data-without-photos]:checked) .booking-gallery { display: none; }
.metrics.account-counts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: .75rem 0; }
