/* ───────── Pantalla de perfiles (estilo "¿quién está viendo?") ───────── */
.login { min-height: 100dvh; display: flex; flex-direction: column; padding: 28px clamp(18px, 4vw, 56px) 24px; background: var(--vino-profundo); color: var(--crema); position: relative; overflow: hidden; }
.login-brand { width: 150px; height: 56px; color: var(--crema); --logo: url("../assets/brand/logo-2l.svg"); z-index: 1; }
.login-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 18px; z-index: 1; padding: 20px 0; }
.login h1 { color: var(--crema); font-size: clamp(1.8rem, 3.4vw + .6rem, 3.2rem); max-width: 14ch; }
.login-sub { color: var(--rosa); font-weight: 600; }
.profiles { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(16px, 3vw, 34px); margin: 14px 0 10px; }
.profile { background: none; border: 0; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--crema); width: clamp(110px, 16vw, 164px); position: relative; }
.profile .avatar { --s: clamp(110px, 16vw, 164px); border: 3px solid transparent; transition: transform .18s, border-color .18s; border-radius: 28%; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.profile:hover .avatar, .profile:focus-visible .avatar { transform: scale(1.07) rotate(-2deg); border-color: var(--crema); }
.profile .name { font-weight: 700; font-size: 1.05rem; }
.profile .rol { font-size: .82rem; color: var(--rosa-claro); opacity: .8; margin-top: -8px; }
.profile.add .avatar { background: transparent; border: 3px dashed rgba(254, 232, 209, .5); color: var(--crema); }
.profile .edit-badge { position: absolute; top: 6px; right: 6px; width: 34px; height: 34px; border-radius: 50%; background: var(--amarillo); color: var(--negro); display: grid; place-items: center; border: 2px solid var(--negro); }
.login-note { z-index: 1; text-align: center; font-size: .82rem; color: var(--rosa-claro); opacity: .75; }
.login .deco { position: absolute; pointer-events: none; opacity: .9; }

/* ───────── Estructura general ───────── */
.shell { display: grid; grid-template-columns: var(--side-w) 1fr; min-height: 100dvh; }
.side { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 6px; padding: 22px 14px 16px; background: var(--surface); border-right: 1.5px solid var(--line); }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 2px 10px 14px; }
.side-brand .logo-mask { width: 118px; height: 44px; --logo: url("../assets/brand/logo-2l.svg"); color: var(--ink); }
.side-brand .tag { font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: var(--amarillo); color: var(--negro); border: 1.5px solid var(--negro); }
.nav { display: flex; flex-direction: column; gap: 3px; flex: 1; overflow: auto; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 999px; text-decoration: none; font-weight: 600; border: 2px solid transparent; }
.nav a:hover { background: color-mix(in srgb, var(--vino) 9%, transparent); }
.nav a[aria-current="page"] { background: var(--amarillo); color: var(--negro); border-color: var(--negro); }
.nav .soon { margin-left: auto; font-size: .62rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; opacity: .6; }
.me { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1.5px solid var(--line); border-radius: 20px; background: var(--surface-solid); }
.me .nm { font-weight: 700; line-height: 1.15; }
.me .rl { font-size: .78rem; color: var(--ink-2); }
.main { padding: 28px clamp(16px, 3vw, 44px) 80px; width: 100%; max-width: 1320px; }
.m-top { display: none; }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.page-head p { margin-top: 6px; color: var(--ink-2); max-width: 62ch; }
.page-head .actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

@media (max-width: 880px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 30; inset: auto 0 0 0; height: auto; flex-direction: row; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1.5px solid var(--line); }
  .side-brand, .me { display: none; }
  .nav { flex-direction: row; gap: 2px; overflow-x: auto; }
  .nav a { flex-direction: column; gap: 2px; font-size: .68rem; padding: 8px 12px; min-width: 66px; justify-content: center; border-radius: 16px; }
  .nav .soon { display: none; }
  .main { padding-bottom: 120px; }
  .m-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
  .m-top .logo-mask { width: 96px; height: 36px; --logo: url("../assets/brand/logo-2l.svg"); }
}

/* ───────── Inicio ("Mi semana") ───────── */
.hero { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding: clamp(20px, 3vw, 34px); border-radius: var(--r-lg); background: var(--rosa); color: var(--vino); border: 2px solid var(--vino); margin-bottom: 22px; }
.hero h1 { font-size: clamp(1.7rem, 2.6vw + .6rem, 2.8rem); max-width: 16ch; }
.hero p { margin-top: 10px; font-weight: 500; font-size: 1.05rem; max-width: 52ch; }
.hero .carita { width: clamp(96px, 14vw, 170px); transform: rotate(8deg); filter: drop-shadow(0 6px 0 rgba(90, 10, 11, .18)); }
.hero .stats { display: flex; background: var(--crema); border: 2px solid var(--vino); border-radius: 22px; margin-top: 18px; width: fit-content; max-width: 100%; }
.hero .stat { padding: 10px 20px; text-align: center; }
.hero .stat + .stat { border-left: 1.5px solid var(--line-strong); }
.hero .stat b { display: block; font-family: var(--font-display); font-size: 1.6rem; line-height: 1.1; text-transform: uppercase; }
.hero .stat span { font-size: .78rem; color: var(--ink-2); }
@media (max-width: 640px) { .hero { grid-template-columns: 1fr; } .hero .carita { position: absolute; right: 8px; top: 8px; width: 74px; } }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 18px; margin-bottom: 18px; }
.now-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 14px; margin-bottom: 22px; }
.now { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; border-radius: var(--r); border: 2px solid var(--vino); background: var(--surface-solid); position: relative; overflow: hidden; }
.now::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 8px; background: var(--c); }
.now .big { font-family: var(--font-display); font-size: 1.5rem; text-transform: uppercase; line-height: 1.05; }
.now a { font-weight: 600; font-size: .88rem; }

.task { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1.5px dashed var(--line); }
.task:last-child { border-bottom: 0; }
.task .t { flex: 1; min-width: 0; font-weight: 500; }
.task.done .t { text-decoration: line-through; opacity: .5; }
.due { font-size: .78rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.due.late { color: var(--danger); }
.quick { display: flex; gap: 8px; margin-top: 12px; }
.quick .input { flex: 1; }

.piece { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1.5px dashed var(--line); }
.piece:last-child { border-bottom: 0; }
.piece .t { font-weight: 600; line-height: 1.25; }
.goal { padding: 10px 0; }
.goal .head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; font-weight: 600; font-size: .92rem; }
.strat-moment { padding: 12px 0; border-bottom: 1.5px dashed var(--line); }
.strat-moment:last-child { border-bottom: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* ───────── Ferias del año ───────── */
.tl { border: 2px solid var(--vino); border-radius: var(--r); background: var(--surface); overflow-x: auto; }
.tl-inner { min-width: 1020px; position: relative; }
.tl-head, .tl-row { display: grid; grid-template-columns: 250px 1fr; }
.tl-head { border-bottom: 2px solid var(--vino); background: var(--surface-2); }
.tl-head .lab { padding: 12px 16px; font-weight: 700; font-size: .85rem; position: sticky; left: 0; background: var(--surface-2); z-index: 3; }
.tl-months { display: grid; grid-template-columns: repeat(var(--n), 1fr); }
.tl-month { padding: 12px 8px; font-size: .78rem; font-weight: 700; text-transform: capitalize; border-left: 1.5px solid var(--line); white-space: nowrap; }
.tl-month small { display: block; font-weight: 500; color: var(--ink-2); }
.tl-row { border-bottom: 1.5px solid var(--line); cursor: pointer; background: transparent; width: 100%; text-align: left; border-left: 0; border-right: 0; border-top: 0; padding: 0; color: inherit; }
.tl-row:last-child { border-bottom: 0; }
.tl-row:hover { background: color-mix(in srgb, var(--amarillo) 14%, transparent); }
.tl-label { padding: 12px 16px; position: sticky; left: 0; z-index: 3; background: var(--surface); display: flex; flex-direction: column; gap: 3px; justify-content: center; border-right: 1.5px solid var(--line); }
.tl-row:hover .tl-label { background: color-mix(in srgb, var(--amarillo) 14%, var(--surface)); }
.tl-label b { font-size: .92rem; line-height: 1.2; }
.tl-label span { font-size: .76rem; color: var(--ink-2); }
.tl-track { position: relative; min-height: 68px; background-image: linear-gradient(to right, var(--line) 1.5px, transparent 1.5px); background-size: calc(100% / var(--n)) 100%; }
.bar { position: absolute; top: 20px; height: 28px; border-radius: 999px; min-width: 10px; }
.bar.antes { background: color-mix(in srgb, var(--amarillo) 38%, transparent); border: 2px dashed color-mix(in srgb, var(--vino) 70%, var(--amarillo)); }
.bar.durante { background: var(--coral); border: 2px solid var(--vino); }
.bar.despues { background: color-mix(in srgb, var(--rosa) 45%, transparent); border: 2px dashed color-mix(in srgb, var(--vino) 60%, var(--rosa)); }
.bar.aprox.durante { background: repeating-linear-gradient(135deg, var(--coral) 0 8px, color-mix(in srgb, var(--coral) 55%, var(--crema)) 8px 16px); }
.tl-today { position: absolute; top: 0; bottom: 0; left: 250px; right: 0; pointer-events: none; z-index: 2; }
.tl-today i { position: absolute; top: 0; bottom: 0; width: 3px; background: var(--azul); }
.tl-today em { position: absolute; top: 4px; transform: translateX(-50%); background: var(--azul); color: var(--blanco); font-style: normal; font-size: .68rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 14px 2px 0; font-size: .82rem; color: var(--ink-2); }
.legend i { display: inline-block; width: 22px; height: 12px; border-radius: 999px; vertical-align: -1px; margin-right: 6px; }

.feria-card { display: grid; gap: 6px; padding: 16px 18px; border: 1.5px solid var(--line-strong); border-radius: var(--r); background: var(--surface-solid); text-align: left; width: 100%; }
.feria-card:hover { border-color: var(--ink); transform: translateY(-2px); }
.feria-card { transition: transform .15s; }
.list-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 14px; }

.kv { display: grid; grid-template-columns: 110px 1fr; gap: 6px 14px; font-size: .92rem; margin: 10px 0; }
.kv dt { color: var(--ink-2); font-weight: 600; }
.kv dd { margin: 0; }
.win { padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 16px; margin-top: 10px; background: var(--surface-solid); border-left: 8px solid var(--c); }
@media (prefers-color-scheme: dark) { .win { background: #4A1214; } }
.win b { display: block; }

/* ───────── Módulos que vienen ───────── */
.soon-card { max-width: 760px; display: grid; gap: 14px; padding: clamp(20px, 3vw, 32px); }
.soon-card img { width: 68px; height: 68px; }
.soon-card ul { display: grid; gap: 8px; }
.soon-card li { display: flex; gap: 10px; }
.soon-card li::before { content: "✦"; color: var(--coral); font-weight: 700; }

/* ───────── Filtros, parrilla, tareas, metas y equipo ───────── */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.filters .input { width: auto; min-width: 170px; }
.filters input[type="search"] { flex: 1; min-width: 220px; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--vino); flex: none; }
.kboard { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 14px; align-items: start; }
.kcol { background: color-mix(in srgb, var(--vino) 6%, transparent); border: 1.5px dashed var(--line); border-radius: var(--r); padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 140px; }
.kcol.over { background: color-mix(in srgb, var(--amarillo) 30%, transparent); border-style: solid; border-color: var(--vino); }
.kcol > header { display: flex; align-items: center; gap: 8px; }
.kcol .n { margin-left: auto; font-size: .8rem; font-weight: 700; opacity: .7; }
.kcol .vacio { text-align: center; padding: 10px 0; }
.kcard { background: var(--surface-solid); border: 1.5px solid var(--line-strong); border-radius: 18px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; cursor: grab; transition: transform .12s, box-shadow .12s; }
.kcard:hover { transform: translateY(-2px); box-shadow: 0 4px 0 rgba(90, 10, 11, .15); }
.kcard.drag { opacity: .45; }
.kcard .t { line-height: 1.25; }
.kcard .hk { font-size: .82rem; color: var(--ink-2); }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 2px solid var(--vino); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.cal-h { padding: 8px; font-size: .78rem; font-weight: 700; text-align: center; background: var(--surface-2); border-bottom: 1.5px solid var(--line); }
.cal-d { min-height: 104px; padding: 6px; border-right: 1.5px solid var(--line); border-bottom: 1.5px solid var(--line); display: flex; flex-direction: column; gap: 4px; cursor: pointer; min-width: 0; }
.cal-d:nth-child(7n) { border-right: 0; }
.cal-d.otro { opacity: .45; }
.cal-d.hoy { background: color-mix(in srgb, var(--amarillo) 22%, transparent); }
.cal-d .num { font-size: .8rem; font-weight: 700; }
.cal-i { border: 1.5px solid var(--vino); background: color-mix(in srgb, var(--c) 40%, var(--surface-solid)); border-radius: 8px; padding: 2px 6px; font-size: .74rem; font-weight: 600; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: inherit; }
.tbl-wrap { overflow-x: auto; border: 2px solid var(--vino); border-radius: var(--r); background: var(--surface); }
.tbl { width: 100%; border-collapse: collapse; min-width: 860px; }
.tbl th { text-align: left; padding: 10px 14px; font-size: .78rem; background: var(--surface-2); border-bottom: 1.5px solid var(--line-strong); }
.tbl td { padding: 10px 14px; border-bottom: 1.5px solid var(--line); vertical-align: middle; }
.tbl tbody tr { cursor: pointer; }
.tbl tbody tr:hover { background: color-mix(in srgb, var(--amarillo) 14%, transparent); }
.linkish { background: none; border: 0; padding: 0; text-align: left; font-weight: 500; color: inherit; cursor: pointer; }
.linkish:hover { text-decoration: underline; }
.big-n { font-family: var(--font-display); font-size: 2rem; line-height: 1; }
.card.meta { display: flex; flex-direction: column; gap: 10px; }
.persona { display: flex; gap: 16px; align-items: flex-start; }
@media (max-width: 880px) { .cal-d { min-height: 74px; } .cal-i { font-size: .66rem; } }

/* ───────── Cerebro creativo ───────── */
.cb { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 28px; align-items: start; }
.cb-side { position: sticky; top: 16px; max-height: calc(100dvh - 32px); overflow: auto; padding-right: 4px; }
.cb-side .input { margin-bottom: 14px; }
.cb-sec { display: flex; align-items: center; gap: 8px; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; margin: 16px 0 6px; color: var(--ink-2); }
.cb-sec .n { margin-left: auto; opacity: .7; }
.cb-item { width: 100%; text-align: left; border: 2px solid transparent; background: none; border-radius: 14px; padding: 7px 12px; font-size: .9rem; font-weight: 500; line-height: 1.3; color: inherit; }
.cb-item:hover { background: color-mix(in srgb, var(--vino) 9%, transparent); }
.cb-item[aria-current="true"] { background: var(--amarillo); color: var(--negro); border-color: var(--negro); font-weight: 700; }
.cb-head { margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1.5px solid var(--line); display: grid; gap: 8px; }
.cb-visor { min-width: 0; }
@media (max-width: 960px) { .cb { grid-template-columns: 1fr; } .cb-side { position: static; max-height: none; } }
.input.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .86rem; line-height: 1.5; }

.md { max-width: 78ch; line-height: 1.65; }
.md h2 { font-size: 1.5rem; margin: 26px 0 10px; }
.md h3 { font-size: 1.2rem; margin: 22px 0 8px; font-family: var(--font-display); text-transform: uppercase; letter-spacing: -.01em; }
.md h4 { font-size: 1.05rem; margin: 18px 0 6px; }
.md h5 { font-size: .95rem; margin: 14px 0 4px; }
.md p { margin: 0 0 12px; }
.md ul, .md ol { margin: 0 0 14px; padding-left: 24px; }
.md ul { list-style: disc; } .md ol { list-style: decimal; }
.md li { margin: 3px 0; }
.md li > ul, .md li > ol { margin: 4px 0; }
.md a { color: var(--azul); font-weight: 600; word-break: break-word; }
@media (prefers-color-scheme: dark) { .md a { color: #8FB0FF; } }
.md code { background: color-mix(in srgb, var(--vino) 10%, transparent); padding: 1px 6px; border-radius: 6px; font-size: .88em; }
.md pre { background: var(--surface-solid); border: 1.5px solid var(--line-strong); border-radius: 16px; padding: 14px 16px; overflow: auto; margin: 0 0 14px; }
.md pre code { background: none; padding: 0; white-space: pre-wrap; }
.md blockquote { margin: 0 0 14px; padding: 10px 16px; border-left: 6px solid var(--amarillo); background: color-mix(in srgb, var(--amarillo) 18%, transparent); border-radius: 0 14px 14px 0; }
.md hr { border: 0; border-top: 1.5px dashed var(--line-strong); margin: 22px 0; }
.md-tbl { overflow-x: auto; margin: 0 0 14px; border: 1.5px solid var(--line-strong); border-radius: 14px; }
.md-tbl table { border-collapse: collapse; width: 100%; font-size: .9rem; }
.md-tbl th, .md-tbl td { padding: 8px 12px; border-bottom: 1.5px solid var(--line); text-align: left; vertical-align: top; }
.md-tbl th { background: var(--surface-2); }

/* ───────── Resultados ───────── */
.resumen { font-size: 1.05rem; font-weight: 500; margin: -6px 0 16px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { border: 2px solid var(--vino); border-radius: var(--r); padding: 14px 16px; background: var(--surface-solid); border-left: 10px solid var(--c); display: flex; flex-direction: column; }
.kpi b { font-family: var(--font-display); font-size: 1.9rem; line-height: 1.1; }
.kpi span { color: var(--ink-2); font-size: .85rem; }
details summary { cursor: pointer; font-weight: 700; font-size: .88rem; }

/* ───────── Asistente ───────── */
.chat { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.chat-lista { min-height: 340px; max-height: 58vh; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.chat-caja { border-top: 2px solid var(--vino); padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; background: var(--surface-solid); }
.chat-aviso { border: 2px solid var(--vino); border-left: 10px solid var(--amarillo); border-radius: var(--r); padding: 12px 16px; margin-bottom: 14px; background: var(--surface-solid); }
.msg { display: flex; gap: 10px; max-width: 88%; }
.msg.yo { align-self: flex-end; background: var(--amarillo); border: 2px solid var(--vino); border-radius: var(--r); padding: 10px 14px; white-space: pre-wrap; }
.msg.yo p { margin: 0; }
.msg-cara { width: 34px; height: 34px; flex: none; }
.msg-cuerpo { background: var(--surface-solid); border: 2px solid var(--vino); border-radius: var(--r); padding: 10px 16px; min-width: 0; }
.msg-acc { margin-top: 8px; gap: 8px; }
.ctx-pre { white-space: pre-wrap; font-size: .8rem; max-height: 50vh; overflow: auto; background: var(--surface-solid); border: 2px solid var(--vino); border-radius: var(--r); padding: 12px; }

/* ───────── Entrada con correo ───────── */
.login-form { display: flex; flex-direction: column; gap: 12px; width: min(360px, 100%); text-align: left; }
.login-campo { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .9rem; }
.login-error { color: var(--rosa); font-weight: 600; margin: 0; }

.sugs { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 10px; }
.sugs li { padding: 10px 14px; border: 2px solid var(--vino); border-radius: var(--r); background: var(--surface-solid); font-weight: 500; }

/* ───────── Parrilla por cuentas, día y semana ───────── */
.cuentas { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.cuenta { border: 2px solid var(--vino); background: var(--surface-solid); color: inherit; border-radius: 999px; padding: 8px 18px; font: inherit; font-weight: 700; cursor: pointer; display: inline-flex; gap: 10px; align-items: center; }
.cuenta[aria-selected="true"] { background: var(--c); box-shadow: 0 3px 0 var(--vino); }
.cuenta .n { font-size: .78rem; background: var(--vino); color: var(--crema); border-radius: 999px; padding: 1px 8px; }
.kcard { border-left: 8px solid var(--c, var(--vino)); }
.chip.marca { background: color-mix(in srgb, var(--c) 45%, var(--surface-solid)); border-color: var(--vino); }
.kcard.compacta { padding: 8px 10px; cursor: pointer; gap: 6px; }
.kcard.compacta .t { font-size: .82rem; }
.cal-nav { margin: 12px 0; gap: 8px; flex-wrap: wrap; align-items: center; }
.cal-n { margin-left: 6px; font-size: .68rem; background: var(--vino); color: var(--crema); border-radius: 999px; padding: 0 6px; }
.sem { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.sem-d { border: 2px solid var(--vino); border-radius: var(--r); background: var(--surface); padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.sem-d.hoy { background: color-mix(in srgb, var(--amarillo) 22%, var(--surface)); }
.sem-d > header { display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.sem-d .n { font-size: .78rem; font-weight: 700; background: var(--vino); color: var(--crema); border-radius: 999px; padding: 0 8px; }
.sem-l { display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow-y: auto; }
.dia-l { list-style: none; padding: 0; margin: 12px 0; display: flex; flex-direction: column; gap: 8px; }
.dia-i { display: flex; align-items: center; gap: 14px; border: 2px solid var(--vino); border-radius: var(--r); background: var(--surface-solid); padding: 10px 14px; cursor: pointer; }
.dia-i .hora { font-family: var(--font-display); min-width: 52px; font-size: 1.05rem; }
.intentos { display: flex; gap: 5px; }
.punto { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--vino); background: transparent; }
.punto.on { background: var(--amarillo); }

/* ───────── Cerebro visual: tarjetas de formatos y referentes ───────── */
.fmt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.fmt-card { position: relative; text-align: left; font: inherit; color: inherit; cursor: pointer; border: 2px solid var(--vino); border-radius: 22px; background: color-mix(in srgb, var(--c) 40%, var(--surface-solid)); padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 8px; min-height: 200px; overflow: hidden; transition: transform .12s, box-shadow .12s; }
.fmt-card:hover, .fmt-card:focus-visible { transform: translateY(-3px) rotate(-.4deg); box-shadow: 0 5px 0 var(--vino); }
.fmt-cara { position: absolute; right: -14px; top: -10px; width: 92px; opacity: .95; transform: rotate(12deg); }
.fmt-n { font-family: var(--font-display); font-size: .85rem; opacity: .6; }
.fmt-t { font-family: var(--font-display); text-transform: uppercase; font-size: 1.15rem; line-height: 1.1; margin-top: 30px; }
.fmt-h { font-size: .88rem; color: var(--ink-2); flex: 1; }
.ficha-top { display: flex; gap: 18px; align-items: center; border: 2px solid var(--vino); border-radius: 22px; background: color-mix(in srgb, var(--c) 40%, var(--surface-solid)); padding: 18px 22px; margin-bottom: 16px; }
.ficha-cara { width: 96px; flex: none; transform: rotate(-6deg); }
.ficha-cita { font-size: 1.1rem; font-weight: 600; margin: 0 0 8px; }
.ficha .card { margin-bottom: 14px; }
.fmt-dato { display: grid; grid-template-columns: 150px 1fr; gap: 10px; padding: 8px 0; border-top: 1.5px solid var(--line); }
.fmt-dato:first-of-type { border-top: 0; }
.fmt-dato .k { font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .02em; }
.ejs { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.ej { display: flex; flex-direction: column; gap: 4px; border: 2px solid var(--vino); border-radius: var(--r); padding: 10px 14px; background: var(--surface-solid); }
.refs { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.ref { display: flex; flex-direction: column; gap: 10px; }
.ref-poster, .ref-marco { aspect-ratio: 9 / 16; width: 100%; border-radius: 18px; border: 2px solid var(--vino); position: relative; overflow: hidden; background-size: cover; background-position: center; cursor: pointer; }
.ref-marco { cursor: default; background: #000; }
.ref-poster.ig { background-image: linear-gradient(160deg, #833ab4, #fd1d1d 55%, #fcb045); }
.ref-poster.tt { background-image: linear-gradient(160deg, #111, #25f4ee33 60%, #fe2c55aa); }
.ref-poster.yt { background-color: #222; }
.ref-poster.otro { background-image: linear-gradient(160deg, var(--vino), var(--azul)); }
.ref-red { position: absolute; left: 10px; top: 10px; background: rgba(0,0,0,.55); color: #fff; font-size: .72rem; font-weight: 700; border-radius: 999px; padding: 3px 10px; }
.ref-play { position: absolute; inset: 0; margin: auto; width: 62px; height: 62px; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--vino); display: grid; place-items: center; transition: transform .12s; }
.ref-poster:hover .ref-play, .ref-poster:focus-visible .ref-play { transform: scale(1.1); }
.ref-cuenta { position: absolute; left: 10px; right: 10px; bottom: 10px; color: #fff; font-weight: 700; text-shadow: 0 1px 4px rgba(0,0,0,.6); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ref-info { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.ref-txt { margin: 0; font-size: .85rem; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 640px) { .fmt-dato { grid-template-columns: 1fr; gap: 2px; } .ficha-top { flex-direction: column; text-align: center; } }

/* ───────── Ideas del asistente ───────── */
.ideas { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.ideas-head { gap: 10px; align-items: center; }
.ideas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.idea { border: 2px solid var(--vino); border-left: 8px solid var(--c, var(--vino)); border-radius: 18px; background: var(--surface-solid); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.idea.ok { background: color-mix(in srgb, var(--ok) 14%, var(--surface-solid)); }
.idea.desc { opacity: .5; }
.idea-hook { margin: 0; font-weight: 600; }

/* ───────── Ideas del asistente ───────── */
.ideas { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.ideas-head { gap: 10px; align-items: center; }
.ideas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.idea { border: 2px solid var(--vino); border-left: 8px solid var(--c, var(--vino)); border-radius: 18px; background: var(--surface-solid); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.idea.ok { background: color-mix(in srgb, var(--ok) 14%, var(--surface-solid)); }
.idea.desc { opacity: .5; }
.idea-hook { margin: 0; font-weight: 600; }

/* ───────── Puntos y creativo del mes ───────── */
.frase-dia { font-weight: 600; font-style: italic; }
.corona { display: flex; gap: 14px; align-items: center; border: 2px solid var(--vino); border-radius: var(--r); padding: 12px 16px; background: color-mix(in srgb, var(--amarillo) 55%, var(--surface-solid)); margin-bottom: 12px; }
.corona-e { font-size: 2.2rem; }
.rank { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-direction: column; gap: 8px; }
.rank li { display: grid; grid-template-columns: 30px minmax(70px, 1fr) minmax(60px, 1.2fr) 34px auto; gap: 10px; align-items: center; }
.rank li.yo .rk-n { font-weight: 700; }
.rk-bar { height: 12px; border: 2px solid var(--vino); border-radius: 999px; overflow: hidden; background: var(--surface-solid); }
.rk-bar span { display: block; height: 100%; background: var(--coral); }
.rk-p { text-align: right; }
@media (max-width: 640px) { .rank li { grid-template-columns: 30px 1fr 34px; } .rk-bar, .rk-s { display: none; } }

.clave { margin: 6px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.visor { display: grid; grid-template-columns: minmax(0, 360px) 1fr; gap: 20px; align-items: start; }
.visor-video { aspect-ratio: 9 / 16; max-height: 72vh; border: 2px solid var(--vino); border-radius: 18px; overflow: hidden; background: #000; }
.visor-marco { width: 100%; height: 100%; border: 0; }
.visor-nota p { margin: 0; }
@media (max-width: 760px) { .visor { grid-template-columns: 1fr; } .visor-video { max-height: 60vh; } }

.cb-uno { max-width: 1100px; display: flex; flex-direction: column; gap: 16px; }
.cb-uno > input[type=search] { max-width: 520px; }

/* ───────── Encabezado de Inicio ───────── */
.hero-fecha { font-weight: 700; margin: 0 0 4px; }
.hero-ferias { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.hero-feria { display: flex; flex-direction: column; gap: 2px; padding: 10px 16px; border: 2px solid var(--vino); border-radius: var(--r); background: color-mix(in srgb, var(--c) 55%, var(--surface-solid)); color: inherit; text-decoration: none; min-width: 200px; }
.hero-feria:hover { box-shadow: 0 3px 0 var(--vino); }
.hf-et { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; opacity: .75; }
.hf-d { font-size: .88rem; }

/* parrilla-multicuenta */
.cuenta[aria-pressed="true"] { background: var(--c); box-shadow: 0 3px 0 var(--vino); }
.cuenta[aria-pressed="false"] { opacity: .65; }
.cal-i { box-sizing: border-box; }

/* ───────── Configuración ───────── */
.config-ia { max-width: 720px; }
.config-ia p { margin: 0; }
.config-ia code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .86em; }
.config-sep { border: 0; border-top: 2px dashed color-mix(in srgb, var(--vino) 25%, transparent); margin: 6px 0; width: 100%; }
