:root {
  --bg: #12100e;
  --surface: #1c1916;
  --surface2: #2a2520;
  --border: #3c342c;
  --text: #f4efe6;
  --muted: #a89b8c;
  --gold: #e4b15a;
  --ink: #1a140c;
  --sale: #e15a45;
  --blue: #8eb6f2;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 480px at 10% -10%, rgba(228, 177, 90, 0.08), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: Oswald, sans-serif; font-weight: 500; letter-spacing: 0.01em; margin: 0; }
.hora, .coin b, .dia-num, .cuando {
  font-family: "Saira Condensed", sans-serif;
  font-weight: 700;
}

.top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 22px 28px 8px;
}
.brand { display: flex; gap: 14px; align-items: center; }
.coin {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f3d48a, var(--gold) 42%, #b8883a 78%);
  color: var(--ink);
  display: grid;
  place-items: center;
  position: relative;
  box-shadow: inset 0 -6px 10px rgba(90, 50, 10, 0.35), 0 8px 18px rgba(0, 0, 0, 0.35);
}
.coin b { font-size: 20px; line-height: 1; letter-spacing: -0.04em; }
.coin small {
  position: absolute;
  right: 6px;
  bottom: 7px;
  font-family: "Saira Condensed", sans-serif;
  font-weight: 700;
  font-size: 11px;
}
.eyebrow {
  margin: 0;
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
h1 { font-size: 32px; line-height: 1; }
.clock {
  text-align: right;
  color: var(--muted);
  font-size: 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px 14px 8px 16px;
}
.clock strong {
  display: block;
  color: var(--gold);
  font-family: "Saira Condensed", sans-serif;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
}

.lanz, .proxima { margin: 12px 28px 0; }
.lanz {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  background: linear-gradient(90deg, #3a1816, #2a2520 70%);
  border: 1px solid #6a332c;
  border-radius: 16px;
  padding: 14px 18px;
}
.lanz p { margin: 0; }
.lanz .kicker {
  color: #f0b2a6;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.lanz strong {
  font-family: "Saira Condensed", sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.proxima {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: 16px;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.proxima p { margin: 0; }
.proxima .kicker { color: var(--gold); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; }
.proxima button, .cal-nav button, .filtros button, .pieza button {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
}
.proxima button:hover, .filtros button:hover, .pieza button:hover, .cal-nav button:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding: 16px 28px 0;
}
.filtros { display: flex; flex-wrap: wrap; gap: 8px; }
.filtros button[aria-pressed="true"] {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
}
.cuenta { margin: 0; color: var(--muted); font-size: 13px; }

.semana {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 28px 0;
}
.semana button {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px 10px 10px;
  text-align: left;
  min-width: 0;
  min-height: 74px;
  overflow: hidden;
}
.semana button:hover { border-color: var(--gold); }
.semana button.sel { border-color: var(--gold); background: #2a2318; }
.semana button.hoy { box-shadow: inset 3px 0 0 var(--sale); }
.semana .nom {
  display: block;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.semana .num {
  font-family: "Saira Condensed", sans-serif;
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
}
.semana .resumen {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.semana button.sel .resumen { color: var(--gold); }

.mesa {
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  gap: 22px;
  padding: 18px 28px 28px;
  align-items: start;
}
.cal, .lista {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.cal { padding: 16px; position: sticky; top: 12px; }
.cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cal-nav h2 { font-size: 22px; text-transform: capitalize; }
.cal-nav button { width: 36px; height: 36px; padding: 0; font-size: 22px; line-height: 1; }
.dow, .grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.dow { margin-top: 14px; color: var(--muted); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.dow span, .celda { text-align: center; padding: 6px 0; }
.grid { margin-top: 4px; }
.celda {
  appearance: none;
  border: 0;
  background: transparent;
  border-radius: 12px;
  min-height: 64px;
  padding: 6px 2px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.celda:hover { background: var(--surface2); }
.celda.vacia { pointer-events: none; }
.celda.sel { background: var(--surface2); outline: 1px solid var(--gold); }
.celda.hoy .dia-num { color: var(--sale); }
.dia-num { font-size: 20px; line-height: 1; }
.abre-tag {
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--ink);
  background: var(--gold);
  border-radius: 999px;
  padding: 1px 5px;
}
.puntos { display: flex; gap: 3px; min-height: 7px; }
.puntos i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: block;
}
.leyenda { color: var(--muted); font-size: 12px; margin: 12px 0 0; display: flex; gap: 12px; align-items: center; }
.leyenda i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.leyenda .hoy { background: var(--sale); }
.leyenda .abre { background: var(--gold); }

.lista { padding: 16px 16px 20px; }
.dia-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 4px 12px;
  border-bottom: 1px solid var(--border);
}
.dia-nav h3 { font-size: 28px; }
.dia-nav p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.dia-nav button {
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 24px;
  line-height: 1;
  flex: none;
}
.bloque { margin-top: 10px; }
.etiqueta {
  display: block;
  margin-bottom: 4px;
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.copia {
  margin: 0;
  white-space: pre-wrap;
  background: #100e0c;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 15px;
}
.imagen, .ojo { margin: 0; color: var(--muted); font-size: 14px; }
.ojo { color: #f0d7a4; }

.pieza {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px 12px;
  margin: 12px 8px;
  padding: 12px 12px 12px 14px;
  border-radius: 14px;
  background: #161310;
  border: 1px solid var(--border);
  border-left-width: 4px;
}
.pieza.hecha { opacity: 0.55; }
.pieza .cuando { font-size: 26px; line-height: 1; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 4px; }
.pill {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 2px 8px;
  border: 1px solid var(--border);
  color: var(--muted);
}
.pill.principal { color: var(--ink); background: var(--gold); border-color: var(--gold); }
.pill.el-dia { color: #f6f1e8; background: var(--sale); border-color: var(--sale); }
.pieza h4 { margin: 0 0 6px; font-size: 20px; }
.texto {
  margin: 0;
  white-space: pre-wrap;
  color: #efe8dc;
  font-size: 15px;
}
.nota, .visual { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.acciones { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pieza button.primario {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
}
.pieza button.hecho {
  background: var(--surface2);
  border-color: var(--gold);
  color: var(--gold);
}
.vacio { padding: 28px 18px; color: var(--muted); }

.ig { border-left-color: var(--gold); }
.tt { border-left-color: #f4efe6; }
.x { border-left-color: #c4b8aa; }
.dc { border-left-color: var(--blue); }
.dot-ig { background: var(--gold); }
.dot-tt { background: #f4efe6; }
.dot-x { background: #c4b8aa; }
.dot-dc { background: var(--blue); }

footer { padding: 0 28px 32px; color: var(--muted); font-size: 13px; }
footer p { margin: 0; max-width: 68ch; }

.toast {
  position: fixed;
  bottom: 18px;
  right: 18px;
  background: var(--gold);
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 16px;
  font-family: Oswald, sans-serif;
  letter-spacing: 0.02em;
}

@media (max-width: 860px) {
  .top, .bar, .mesa, .lanz, .proxima, footer { padding-left: 16px; padding-right: 16px; }
  .lanz, .proxima, .semana { margin-left: 16px; margin-right: 16px; }
  .lanz, .proxima { flex-direction: column; align-items: flex-start; }
  .mesa { grid-template-columns: 1fr; }
  .cal { position: static; }
  h1 { font-size: 28px; }
  .clock { text-align: left; }
  .top { align-items: flex-start; flex-wrap: wrap; }
  .semana { grid-template-columns: repeat(4, 1fr); }
  .semana button:nth-child(n + 5) { min-height: 64px; }
  .dia-nav h3 { font-size: 24px; }
}
