:root {
  --terracotta: #C4735F;
  --terracotta-dark: #A85A47;
  --cream: #F7EFDF;
  --bg: #FBF7F0;
  --card: #FFFFFF;
  --ink: #2A1F1B;
  --muted: #8A7B73;
  --line: #EDE4D8;
  --hot: #C2410C;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(60, 35, 25, .06), 0 8px 24px rgba(60, 35, 25, .06);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.55 Inter, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--terracotta-dark); }
h1, h2, h3 { line-height: 1.2; margin: 0; }
h1, h2 { font-family: Fraunces, Georgia, serif; font-weight: 600; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.hot { color: var(--hot); font-weight: 600; }
.center { text-align: center; }
.icon { flex: none; vertical-align: -3px; }
[hidden] { display: none !important; }

.demo-banner {
  background: var(--ink); color: var(--cream); text-align: center;
  font-size: 12px; padding: 6px; letter-spacing: .02em;
}

/* ---------- Link in bio ---------- */
.bio { max-width: 560px; margin: 0 auto; padding: 0 16px 40px; }
.profile {
  text-align: center; padding: 40px 8px 28px;
  background: radial-gradient(120% 80% at 50% 0%, #F3DCCF 0%, transparent 70%);
}
.avatar { width: 104px; height: 104px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 4px #fff, var(--shadow); }
.profile h1 { font-size: 30px; margin-top: 14px; }
.tagline { margin: 2px 0 10px; color: var(--terracotta-dark); font-weight: 600; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.bio-text { margin: 0 auto 18px; max-width: 400px; color: #5B4A42; }
.socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: 14px;
  transition: transform .15s, border-color .15s;
}
.pill:hover { transform: translateY(-1px); border-color: var(--terracotta); }

.section { margin-top: 28px; }
.section > h2, .section-head h2 { font-size: 22px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.empty { padding: 24px; background: var(--card); border-radius: var(--radius); text-align: center; color: var(--muted); }

/* Timeline estilo Luma */
.timeline { list-style: none; padding: 0; margin: 0; }
.tl-item { position: relative; padding-left: 0; margin-bottom: 22px; }
.tl-date { display: flex; align-items: baseline; gap: 8px; margin: 0 0 8px 2px; }
.tl-date strong { font-size: 15px; }
.tl-date span { color: var(--muted); text-transform: capitalize; }

.tour-card {
  display: block; background: var(--card); border-radius: var(--radius); overflow: hidden;
  color: inherit; text-decoration: none; box-shadow: var(--shadow); border: 1px solid var(--line);
  transition: transform .2s, box-shadow .2s;
}
.tour-card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(60,35,25,.06), 0 16px 32px rgba(60,35,25,.10); }
.tour-card:hover .cover-img { transform: scale(1.03); }
.tour-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--cream); }
.cover-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.cover-fallback { width: 100%; height: 100%; display: grid; place-items: center; font-size: 56px; }
.theme-terracotta { background: linear-gradient(135deg, #E9B9A6, #C4735F); }
.theme-olive { background: linear-gradient(135deg, #D9D6A8, #8E8A4E); }

.date-chip {
  position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,.94);
  border-radius: 10px; padding: 4px 9px 5px; text-align: center; line-height: 1.1;
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--terracotta-dark); font-weight: 600;
  backdrop-filter: blur(6px);
}
.date-chip b { display: block; font-size: 19px; color: var(--ink); letter-spacing: 0; }
.badge {
  position: absolute; top: 12px; right: 12px; padding: 5px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
}
.badge-hot { background: #FFF1E8; color: var(--hot); }
.badge-dark { background: var(--ink); color: #fff; }
.is-soldout .cover-img { filter: grayscale(.8) brightness(.9); }

.tour-body { padding: 14px 16px 16px; }
.tour-time { margin: 0 0 4px; color: var(--muted); font-size: 13px; display: flex; gap: 5px; align-items: center; }
.tour-body h3 { font-size: 17px; font-weight: 600; }
.tour-summary { margin: 6px 0 12px; color: #5B4A42; font-size: 14px; }
.tour-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tour-venue { color: var(--muted); font-size: 13px; display: flex; gap: 5px; align-items: center; min-width: 0; }
.price { background: var(--cream); color: var(--terracotta-dark); font-weight: 700; padding: 5px 11px; border-radius: 999px; font-size: 14px; white-space: nowrap; }

.profile-cta { margin-top: 18px; }

/* ---------- Escritorio: perfil fijo + agenda estilo Luma ---------- */
@media (min-width: 900px) {
  .bio {
    max-width: 1120px; padding: 40px 32px 60px;
    display: grid; grid-template-columns: 330px 1fr; gap: 48px; align-items: start;
  }
  .profile {
    position: sticky; top: 32px; text-align: left; padding: 28px;
    background: var(--card); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow);
    overflow: hidden;
  }
  .profile::before {
    content: ''; display: block; height: 92px; margin: -28px -28px -52px;
    background: linear-gradient(135deg, #E9B9A6, var(--terracotta));
  }
  .avatar { width: 96px; height: 96px; position: relative; }
  .profile h1 { font-size: 28px; }
  .bio-text { margin-left: 0; }
  .socials { justify-content: flex-start; }
  .bio-main .section:first-child { margin-top: 0; }
  .section-head h2, .section > h2 { font-size: 26px; }

  /* Timeline: fecha a la izquierda con línea punteada */
  .tl-item { display: grid; grid-template-columns: 104px 1fr; gap: 20px; margin-bottom: 0; padding-bottom: 20px; }
  .tl-item::before {
    content: ''; position: absolute; left: 92px; top: 8px; bottom: -8px; border-left: 2px dashed var(--line);
  }
  .tl-item::after {
    content: ''; position: absolute; left: 88px; top: 6px; width: 10px; height: 10px; border-radius: 50%;
    background: var(--terracotta); box-shadow: 0 0 0 4px var(--bg);
  }
  .tl-item:last-child::before { display: none; }
  .tl-date { flex-direction: column; gap: 0; margin: 0; line-height: 1.3; }
  .tl-date strong { font-size: 16px; }

  /* Tarjeta horizontal: texto + foto */
  .tour-card { display: grid; grid-template-columns: 1fr 260px; }
  .tour-media { order: 2; aspect-ratio: auto; min-height: 190px; }
  .tour-media .cover-img, .tour-media .cover-fallback { position: absolute; inset: 0; }
  .tour-body { padding: 18px 20px; display: flex; flex-direction: column; }
  .tour-body h3 { font-size: 19px; }
  .tour-foot { margin-top: auto; }
  .date-chip { display: none; }

  .steps { grid-template-columns: repeat(3, 1fr); }
  .steps li { flex-direction: column; gap: 10px; }
  .faq { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; align-items: start; }
  .faq h2 { grid-column: 1 / -1; }
  .footer { text-align: left; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding-top: 20px; }
  .footer .credits { flex-basis: 100%; text-align: left; }
}

.steps { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.steps li { display: flex; gap: 14px; background: var(--card); padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line); }
.steps li > span { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--terracotta); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.steps p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }

.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin-top: 8px; padding: 0 16px; }
.faq h2 { margin-bottom: 14px; }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
.faq summary::after { content: '+'; color: var(--terracotta); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq details p { margin: 0 0 14px; color: #5B4A42; }

.footer { text-align: center; margin-top: 40px; color: var(--muted); font-size: 13px; }
.footer img { border-radius: 50%; }
.footer p { margin: 4px 0; }
.credits { font-size: 11px; margin-top: 10px; }
.credits summary { cursor: pointer; }
.credits p { margin: 2px 0; }

/* ---------- Página de evento ---------- */
.event { max-width: 980px; margin: 0 auto; padding: 16px 16px 120px; }
.back { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); text-decoration: none; font-size: 14px; margin-bottom: 16px; }
.event-grid { display: grid; gap: 28px; }
@media (min-width: 820px) {
  .event-grid { grid-template-columns: 340px 1fr; align-items: start; }
  .event-side { position: sticky; top: 20px; }
  .mobile-only { display: none !important; }
}
@media (max-width: 819px) { .desktop-only { display: none !important; } }

.event-cover { border-radius: var(--radius); overflow: hidden; aspect-ratio: 1; box-shadow: var(--shadow); background: var(--cream); }
@media (max-width: 819px) { .event-cover { aspect-ratio: 4 / 3; } }
.host { display: flex; align-items: center; gap: 10px; margin: 16px 2px; }
.host img { border-radius: 50%; }
.host div { display: flex; flex-direction: column; line-height: 1.25; font-size: 14px; flex: 1; }
.host-link { color: var(--muted); }

.event-main h1 { font-size: clamp(26px, 4vw, 36px); margin-bottom: 18px; }
.meta-row { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; color: inherit; text-decoration: none; }
.meta-row p { margin: 0; font-size: 14px; }
.meta-cal {
  flex: none; width: 46px; height: 48px; border: 1px solid var(--line); border-radius: 10px; background: var(--card);
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
}
.meta-cal small { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--terracotta-dark); font-weight: 600; margin-bottom: 3px; }
.meta-cal b { font-size: 18px; }
.meta-icon { color: var(--muted); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.register { margin: 22px 0 28px; padding: 0; overflow: hidden; scroll-margin-top: 16px; }
.register-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 14px 18px; background: var(--cream); font-size: 14px; }
.register > p, .register form { padding: 16px 18px 18px; margin: 0; }
.alert { background: #FFF1E8; color: var(--hot); border-radius: 10px; padding: 10px 12px; margin: 16px 18px 0 !important; font-size: 14px; }

.field { display: block; margin-bottom: 12px; }
.field span, .field-row label, legend { display: block; font-size: 13px; font-weight: 500; margin-bottom: 5px; color: #5B4A42; }
.field input {
  width: 100%; padding: 11px 12px; font: inherit; border: 1px solid var(--line); border-radius: 10px; background: #FFFDF9;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus { outline: none; border-color: var(--terracotta); box-shadow: 0 0 0 3px rgba(196,115,95,.18); }
.field-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.field-row label { margin: 0; }
.stepper { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.stepper button { width: 38px; height: 36px; border: 0; background: transparent; font-size: 18px; cursor: pointer; color: var(--ink); }
.stepper button:disabled { color: #CFC4BA; cursor: default; }
.stepper input { width: 34px; text-align: center; border: 0; font: 600 15px Inter, sans-serif; background: transparent; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }

.paymodes { border: 0; padding: 0; margin: 6px 0 14px; display: grid; gap: 8px; }
.paymode {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.paymode:has(input:checked) { border-color: var(--terracotta); background: #FDF5F1; }
.paymode input { accent-color: var(--terracotta); }
.paymode span { flex: 1; display: flex; flex-direction: column; line-height: 1.3; font-size: 14px; }
.paymode small { color: var(--muted); }
.paymode em { font-style: normal; font-weight: 700; }

.btn-primary, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  padding: 14px 18px; border-radius: 12px; font: 600 16px Inter, sans-serif; text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--terracotta); color: #fff; border: 0; transition: background .15s; }
.btn-primary:hover { background: var(--terracotta-dark); }
.btn-primary:disabled { opacity: .7; cursor: wait; }
.btn-ghost { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.fine { font-size: 12px; color: var(--muted); margin: 10px 0 0; }

.about { margin-bottom: 24px; }
.about h3, .includes h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.about p { margin: 0 0 12px; font-size: 16px; }
.includes { margin-bottom: 24px; box-shadow: none; }
.includes ul, .notes { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.includes li { display: flex; gap: 8px; font-size: 14px; }
.includes .icon { color: var(--terracotta); margin-top: 3px; }
.notes li { padding-left: 16px; position: relative; }
.notes li::before { content: '•'; position: absolute; left: 2px; color: var(--terracotta); }
.credit { font-size: 11px; color: var(--muted); }

.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 14px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.95);
  border-top: 1px solid var(--line); backdrop-filter: blur(10px);
}
.sticky-cta { transition: transform .25s ease; }
.sticky-cta.is-hidden { transform: translateY(110%); }
.sticky-cta div { display: flex; flex-direction: column; line-height: 1.2; }
.sticky-cta small { color: var(--muted); }
.sticky-cta .btn-primary { width: auto; flex: 1; }

/* ---------- Confirmación ---------- */
.narrow { max-width: 520px; margin: 0 auto; padding: 32px 16px 48px; }
.confirm-hero { text-align: center; margin-bottom: 22px; }
.confirm-hero h1 { font-size: 28px; margin-bottom: 6px; }
.check-badge { width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 50%; background: var(--terracotta); color: #fff; display: grid; place-items: center; }
.ticket { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
.ticket-cover { aspect-ratio: 16 / 7; overflow: hidden; }
.ticket-body { padding: 18px; }
.ticket-body h2 { font-size: 20px; margin-bottom: 10px; }
.ticket-body p { margin: 4px 0; display: flex; gap: 8px; color: #5B4A42; font-size: 14px; }
.ticket hr { border: 0; border-top: 1px dashed var(--line); margin: 14px 0; }
.ticket dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
.ticket dt { color: var(--muted); }
.ticket dd { margin: 0; text-align: right; }
.actions { display: grid; gap: 8px; margin: 18px 0; }
.demo-pay { text-align: center; }
.demo-pay h1 { font-size: 34px; margin: 10px 0; }
.demo-pay form { margin: 18px 0 10px; }

/* ---------- Admin ---------- */
.admin { max-width: 1100px; margin: 0 auto; padding: 24px 16px; }
.admin .btn-ghost { width: auto; padding: 8px 14px; font-size: 14px; }
.admin-tour { margin-bottom: 14px; }
.admin-tour .section-head { flex-wrap: wrap; font-size: 14px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px; border-top: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; }
tr.cancelled { opacity: .45; }
tr.pending { background: #FFFBEB; }
.row-actions { display: flex; gap: 6px; }
.row-actions button { font: 12px Inter, sans-serif; padding: 5px 9px; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; white-space: nowrap; }

/* ---------- Checkout demo (imita Stripe Checkout) ---------- */
.co { min-height: calc(100vh - 29px); display: grid; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif; background: #fff; }
.co-summary { padding: 24px 20px; background: #FBF7F0; border-bottom: 1px solid var(--line); }
.co-pay { padding: 24px 20px 40px; background: #fff; }
@media (min-width: 900px) {
  .co { grid-template-columns: 1fr 1fr; }
  .co-summary { padding: 64px 64px 40px max(40px, calc(50vw - 480px)); border-bottom: 0; border-right: 1px solid #eee; box-shadow: 15px 0 30px -20px rgba(0,0,0,.08); }
  .co-pay { padding: 64px max(40px, calc(50vw - 480px)) 40px 64px; }
  .co-summary > *, .co-pay > * { max-width: 400px; }
}
.co-back { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: 14px; }
.co-back img { border-radius: 50%; }
.co-test { display: inline-block; margin-left: 10px; background: #FFDE92; color: #8A5000; font-size: 10px; font-weight: 700; letter-spacing: .04em; padding: 2px 6px; border-radius: 4px; vertical-align: 2px; }
.co-label { color: #697386; font-weight: 500; margin: 28px 0 2px; font-size: 15px; }
.co-amount { font-size: 36px; font-weight: 600; margin: 0 0 24px; letter-spacing: -.02em; }
.co-amount small { font-size: 15px; color: #697386; font-weight: 500; margin-left: 2px; }
.co-item { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; }
.co-thumb { flex: none; width: 48px; height: 48px; border-radius: 8px; overflow: hidden; border: 1px solid #eee; }
.co-thumb .cover-fallback { font-size: 22px; }
.co-item-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.co-item-text span { color: #697386; font-size: 13px; }
.co-lines { margin-top: 20px; padding-top: 14px; border-top: 1px solid #e6e1d8; font-size: 14px; display: grid; gap: 10px; }
.co-lines div { display: flex; justify-content: space-between; }
.co-muted { color: #697386; }
.co-total { padding-top: 10px; border-top: 1px solid #e6e1d8; font-weight: 600; }

.co-hint { display: flex; gap: 12px; align-items: center; background: #F2F7FF; border: 1px solid #CFE0FF; color: #1D3B73; border-radius: 10px; padding: 12px 14px; font-size: 13px; margin-bottom: 22px; }
.co-hint div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.co-hint code { background: #fff; border: 1px solid #CFE0FF; border-radius: 4px; padding: 0 5px; font-weight: 600; white-space: nowrap; }
.co-hint-sub { opacity: .8; font-size: 12px; }
.co-hint button { flex: none; border: 1px solid #9DBAF5; background: #fff; color: #1D4ED8; border-radius: 8px; padding: 7px 10px; font: 600 12px inherit; cursor: pointer; }

.co-pay h2 { font: 600 20px -apple-system, BlinkMacSystemFont, Inter, sans-serif; margin-bottom: 18px; }
.co-error { background: #FEF2F2; color: #B91C1C; border-radius: 8px; padding: 10px 12px; font-size: 14px; margin: 0 0 16px; }
.co-field { display: block; margin-bottom: 16px; }
.co-field > span { display: block; font-size: 13px; color: #30313D; font-weight: 500; margin-bottom: 6px; }
.co-field input, .co-field select {
  width: 100%; font: 16px -apple-system, BlinkMacSystemFont, Inter, sans-serif; padding: 10px 12px; border: 1px solid #E0E0E6;
  border-radius: 6px; background: #fff; box-shadow: 0 1px 1px rgba(0,0,0,.03), 0 3px 6px rgba(18,42,66,.02); color: #30313D;
}
.co-field input[readonly] { background: #F7F7F9; color: #697386; }
.co-field input:focus, .co-field select:focus { outline: none; border-color: #0570DE; box-shadow: 0 0 0 3px rgba(5,112,222,.18); position: relative; z-index: 1; }
.co-cardbox input { border-radius: 0; box-shadow: none; }
.co-cardnum { position: relative; }
.co-cardnum input { border-radius: 6px 6px 0 0; padding-right: 130px; }
.co-cardrow { display: grid; grid-template-columns: 1fr 1fr; margin-top: -1px; }
.co-cardrow input:first-child { border-radius: 0 0 0 6px; }
.co-cardrow input:last-child { border-radius: 0 0 6px 0; margin-left: -1px; }
.co-brands { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); display: flex; gap: 4px; z-index: 2; pointer-events: none; }
.co-brands i { font: italic 800 9px/16px -apple-system, sans-serif; height: 18px; min-width: 28px; padding: 0 3px; border-radius: 3px; display: grid; place-items: center; border: 1px solid #E0E0E6; transition: opacity .2s; }
.b-visa { color: #1A1F71; }
.b-amex { color: #fff; background: #2E77BC; border-color: #2E77BC !important; font-size: 8px !important; }
.b-mc { display: flex !important; gap: 0; }
.b-mc b { width: 10px; height: 10px; border-radius: 50%; background: #EB001B; display: inline-block; }
.b-mc b + b { background: #F79E1B; margin-left: -4px; opacity: .9; }
.co-brands[data-brand="visa"] i:not(.b-visa), .co-brands[data-brand="mc"] i:not(.b-mc), .co-brands[data-brand="amex"] i:not(.b-amex) { opacity: 0; width: 0; min-width: 0; padding: 0; border: 0; }

.co-btn {
  position: relative; display: flex; align-items: center; justify-content: center; width: 100%; height: 46px; margin-top: 8px;
  background: var(--terracotta); color: #fff; border: 0; border-radius: 6px; font: 600 16px -apple-system, BlinkMacSystemFont, Inter, sans-serif;
  cursor: pointer; text-decoration: none; box-shadow: inset 0 -1px 0 rgba(0,0,0,.12), 0 1px 3px rgba(0,0,0,.08);
}
.co-btn:hover { background: var(--terracotta-dark); }
.co-spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .7s linear infinite; }
.co-btn.is-loading .co-btn-label { display: none; }
.co-btn.is-loading .co-spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
.co-timer { text-align: center; font-size: 13px; color: #697386; margin: 14px 0 4px; }
.co-foot { text-align: center; font-size: 11px; color: #A3ACB9; margin: 18px 0 0; }
.co-expired h2 { margin-bottom: 8px; }
.co-expired p { color: #697386; }

/* ---------- Admin ---------- */
.adm { min-height: 100vh; background: #F6F2EB; }
.adm-top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 18px; padding: 10px 20px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.adm-brand { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 700; }
.adm-brand img { border-radius: 50%; }
.adm-top nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.adm-top nav a { padding: 7px 12px; border-radius: 8px; color: #5B4A42; text-decoration: none; font-size: 14px; font-weight: 500; white-space: nowrap; }
.adm-top nav a.on { background: var(--cream); color: var(--terracotta-dark); }
.adm-link { background: none; border: 0; color: var(--muted); cursor: pointer; font: 500 14px Inter, sans-serif; }
.adm-flash { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 20; background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px; box-shadow: var(--shadow); transition: opacity .4s, transform .4s; }
.adm-flash.out { opacity: 0; transform: translate(-50%, 10px); pointer-events: none; }
.adm-main { max-width: 1080px; margin: 0 auto; padding: 24px 16px 60px; }
.adm-main .back { margin-bottom: 10px; }
.adm-main h1 { font-size: 28px; }
.adm-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.adm-head p { margin: 4px 0 0; }
.adm-head-sm { margin: 28px 0 12px; align-items: center; }
.adm-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.adm-title { display: flex; gap: 16px; align-items: center; }
.adm-title h1 { font-size: 24px; margin: 2px 0 6px; }
.adm-h2 { font-family: Fraunces, Georgia, serif; font-size: 20px; margin: 28px 0 12px; }
.adm-head-sm .adm-h2 { margin: 0; }
.adm-h3 { font: 600 15px Inter, sans-serif; margin-bottom: 14px; }
.small { font-size: 12px; }
.btn-primary.sm, .btn-ghost.sm { width: auto; padding: 9px 14px; font-size: 14px; border-radius: 10px; }
.btn-mini { display: inline-block; font: 500 12px Inter, sans-serif; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; white-space: nowrap; list-style: none; }
.btn-mini::-webkit-details-marker { display: none; }
.btn-mini:hover { border-color: var(--terracotta); }
.btn-mini.danger { color: #B91C1C; border-color: #FCA5A5; width: 100%; }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 18px; }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.stat span { display: block; color: var(--muted); font-size: 12px; font-weight: 500; }
.stat b { font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.stat small { font-size: 14px; color: var(--muted); font-weight: 500; }
.bar { height: 6px; background: #F0E8DD; border-radius: 99px; overflow: hidden; margin: 6px 0 4px; }
.bar i { display: block; height: 100%; background: var(--terracotta); border-radius: 99px; transition: width .3s; }
.bar-green i { background: #3F8F5A; }

.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 99px; background: #F0E8DD; color: #5B4A42; }
.chip-dark { background: var(--ink); color: #fff; }
.chip-hot { background: #FFF1E8; color: var(--hot); }
.chip-warn { background: #FEF3C7; color: #92400E; }
.chip-ok { background: #E7F4EA; color: #2F6B43; }

.adm-tours { display: grid; gap: 10px; }
.adm-tour { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; padding: 12px; color: inherit; text-decoration: none; box-shadow: none; transition: border-color .15s; }
.adm-tour:hover { border-color: var(--terracotta); }
.adm-tour.is-past { opacity: .75; }
.adm-tour-thumb { width: 64px; height: 64px; border-radius: 12px; overflow: hidden; background: var(--cream); flex: none; }
.adm-tour-thumb.lg { width: 76px; height: 76px; }
.adm-tour-thumb .cover-fallback { font-size: 28px; }
.adm-tour-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.adm-tour-info b { font-size: 15px; }
.adm-tour-occ { grid-column: 1 / -1; }
.occ-top b { font-size: 18px; }
.occ-top span { color: var(--muted); font-size: 13px; margin-left: 3px; }
@media (min-width: 760px) {
  .adm-tour { grid-template-columns: 64px 1fr 220px; }
  .adm-tour-occ { grid-column: auto; }
}

.adm-list { padding: 4px 0; }
.adm-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 16px; color: inherit; text-decoration: none; border-top: 1px solid var(--line); }
.adm-row:first-child { border-top: 0; }
.adm-row span { display: flex; flex-direction: column; font-size: 14px; }
.adm-row .right { text-align: right; }

.adm-settings { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between; box-shadow: none; }
.cap-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cap-form label { font-weight: 600; font-size: 14px; }
.cap-form .stepper { background: #fff; }
.cap-form .stepper input { width: 52px; -moz-appearance: textfield; }
.toggles { display: flex; gap: 8px; flex-wrap: wrap; }
.switch { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px 6px 6px; font: 500 13px Inter, sans-serif; cursor: pointer; color: var(--ink); }
.switch i { width: 30px; height: 18px; border-radius: 99px; background: #DDD3C7; position: relative; transition: background .2s; }
.switch i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch.on i { background: var(--terracotta); }
.switch.on i::after { transform: translateX(12px); }

.tabs { display: flex; gap: 4px; background: #EDE5D9; padding: 3px; border-radius: 10px; }
.tabs a { padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 500; color: #5B4A42; text-decoration: none; }
.tabs a.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.06); }

.attendees { display: grid; gap: 10px; }
.booking { display: grid; gap: 12px; padding: 14px 16px; box-shadow: none; }
@media (min-width: 760px) { .booking { grid-template-columns: 260px 1fr auto; align-items: start; } }
.booking.status-cancelled { opacity: .55; }
.people { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.people li { display: flex; align-items: center; gap: 10px; }
.pname { font-weight: 600; }
.checkin { flex: none; width: 30px; height: 30px; border-radius: 8px; border: 1.5px solid #D6CABD; background: #fff; color: transparent; cursor: pointer; display: grid; place-items: center; transition: all .15s; }
.checkin:hover { border-color: #3F8F5A; }
.checkin.on { background: #3F8F5A; border-color: #3F8F5A; color: #fff; }
.booking-meta { display: grid; gap: 6px; font-size: 13px; min-width: 0; }
.contact { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.contact a { color: #5B4A42; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.note { margin: 0; color: #5B4A42; font-style: italic; }
.booking-actions { display: flex; gap: 6px; align-items: flex-start; }
.menu { position: relative; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; width: 260px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 12px; display: grid; gap: 12px; }
.menu-pop .move { display: grid; gap: 6px; }
.menu-pop select { font: 13px Inter, sans-serif; padding: 6px; border-radius: 8px; border: 1px solid var(--line); }

.manual { margin-top: 16px; box-shadow: none; }
.manual summary { cursor: pointer; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.manual form { margin-top: 14px; }
.field textarea, .field select, .filters input, .filters select {
  width: 100%; padding: 10px 12px; font: inherit; border: 1px solid var(--line); border-radius: 10px; background: #FFFDF9;
}
.field textarea:focus, .field select:focus { outline: none; border-color: var(--terracotta); box-shadow: 0 0 0 3px rgba(196,115,95,.18); }
.grid2, .grid3, .grid4, .grid-emoji { display: grid; gap: 0 12px; }
@media (min-width: 640px) {
  .grid2 { grid-template-columns: 1fr 1fr; }
  .grid3 { grid-template-columns: repeat(3, 1fr); }
  .grid4 { grid-template-columns: 2fr 1fr 1fr 1fr; }
}
.grid-emoji { grid-template-columns: 70px 1fr; }
.readonly { display: block; padding: 11px 12px; border-radius: 10px; background: var(--cream); font-weight: 600; }
.tour-form { display: grid; gap: 14px; }
.tour-form .card { box-shadow: none; }
.checks { display: grid; gap: 8px; font-size: 14px; }
.checks input { accent-color: var(--terracotta); margin-right: 6px; }
.image-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-bottom: 8px; }
.img-opt { position: relative; cursor: pointer; display: grid; gap: 4px; }
.img-opt input { position: absolute; opacity: 0; }
.img-opt img, .img-opt .cover-fallback { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; border: 3px solid transparent; font-size: 28px; }
.img-opt input:checked ~ img, .img-opt input:checked ~ .cover-fallback { border-color: var(--terracotta); }
.img-opt input:focus-visible ~ img { outline: 2px solid var(--terracotta); }
.img-opt small { font-size: 11px; color: var(--muted); text-align: center; }
.form-bar { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 8px; padding: 12px 0; background: linear-gradient(transparent, #F6F2EB 30%); }

.filters { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.filters input { flex: 1; min-width: 200px; }
.filters select { width: auto; }
.adm .table-wrap { padding: 4px 8px; box-shadow: none; }
.adm table td a { color: inherit; }

.adm-login { min-height: 80vh; display: grid; place-items: center; padding: 16px; }
.adm-login form { width: 100%; max-width: 360px; text-align: center; }
.adm-login img { border-radius: 50%; }
.adm-login h1 { font-size: 22px; margin: 12px 0 18px; }
.adm-login .field { text-align: left; }
.adm-login .alert { margin: 0 0 12px !important; }
