/* ═══════════ Carta · Panel ═══════════ */
:root {
  --bg: #f7f6f3;
  --surface: #ffffff;
  --surface-2: #fbfaf8;
  --ink: #1d1a1f;
  --ink-2: #3b3640;
  --muted: #77717b;
  --line: #ebe7e2;
  --line-2: #ddd8d1;
  --accent: #9f2f5b;
  --accent-2: #b8436f;
  --accent-soft: #f8e9ef;
  --ok: #1d8556; --ok-soft: #e2f3ea;
  --warn: #a8690f; --warn-soft: #fbf0dc;
  --bad: #c03a2b; --bad-soft: #fbe6e3;
  --info: #3558c9; --info-soft: #e7edfc;
  --r: 14px; --r-sm: 10px; --r-lg: 20px;
  --sh-1: 0 1px 2px rgba(29,26,31,.05), 0 1px 1px rgba(29,26,31,.03);
  --sh-2: 0 6px 24px -8px rgba(29,26,31,.14), 0 2px 6px rgba(29,26,31,.05);
  --sh-3: 0 24px 60px -20px rgba(29,26,31,.35);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Fraunces", Georgia, serif;
  --ease: cubic-bezier(.2,.8,.2,1);
  --side: 236px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14.5px/1.5 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.stack { display: grid; gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
svg.ic { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
i[data-icon] { display: inline-flex; }

/* ── Brand ── */
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 600; font-size: 21px; letter-spacing: -.01em; }
.brand-mark { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 18px; box-shadow: inset 0 -2px 0 rgba(0,0,0,.15); }
.brand-lg { font-size: 26px; margin-bottom: 18px; }
.brand-lg .brand-mark { width: 40px; height: 40px; font-size: 22px; border-radius: 12px; }

/* ── Botones ── */
.btn { --b: var(--surface); display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--b); font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, transform .1s, box-shadow .15s; }
.btn:hover { border-color: #cfc8c0; background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; pointer-events: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 4px 14px -6px rgba(159,47,91,.6); }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: rgba(29,26,31,.05); border-color: transparent; }
.btn-danger { color: var(--bad); }
.btn-danger:hover { background: var(--bad-soft); border-color: #f0c4be; }
.btn-sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn.loading { color: transparent !important; position: relative; }
.btn.loading::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid #fff; border-right-color: transparent; animation: spin .7s linear infinite; }
.btn:not(.btn-primary).loading::after { border-color: var(--ink); border-right-color: transparent; }
.icon-btn { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 9px; border: 0; background: transparent; cursor: pointer; color: var(--muted); transition: background .15s, color .15s; }
.icon-btn:hover { background: rgba(29,26,31,.06); color: var(--ink); }
.icon-btn.danger:hover { background: var(--bad-soft); color: var(--bad); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Formularios ── */
.field { display: grid; gap: 6px; }
.field > span, .label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field small { color: var(--muted); font-size: 12px; }
.input, .field input, .field select, .field textarea {
  width: 100%; height: 42px; padding: 0 13px; border: 1px solid var(--line-2); border-radius: 11px; background: var(--surface);
  transition: border-color .15s, box-shadow .15s; outline: none;
}
.field textarea, textarea.input { height: auto; min-height: 92px; padding: 11px 13px; resize: vertical; line-height: 1.5; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(159,47,91,.12); }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2377717b' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; padding-right: 34px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 14px; }
.check { display: flex; gap: 10px; align-items: center; cursor: pointer; font-weight: 500; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.input-group { display: flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: 11px; background: var(--surface); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.input-group:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(159,47,91,.12); }
.input-group .addon { display: flex; align-items: center; padding: 0 0 0 13px; color: var(--muted); font-size: 13px; white-space: nowrap; max-width: 55%; overflow: hidden; text-overflow: ellipsis; }
.input-group input { border: 0 !important; box-shadow: none !important; height: 40px; padding-left: 2px; }
.slug-state { display: flex; align-items: center; padding: 0 12px; font-size: 12.5px; font-weight: 600; }
.slug-state.ok { color: var(--ok); } .slug-state.bad { color: var(--bad); }

/* Switch */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 40px; height: 23px; border-radius: 99px; background: #d9d3cc; position: relative; transition: background .2s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .25s var(--ease); }
.switch input:checked + .track { background: var(--ok); }
.switch input:checked + .track::after { transform: translateX(17px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 4px rgba(29,133,86,.2); }

/* ── Auth ── */
body.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(1200px 600px at 10% -10%, #f6dfe8 0, transparent 60%), radial-gradient(900px 500px at 110% 110%, #efe6d6 0, transparent 60%), var(--bg); }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 34px 30px; box-shadow: var(--sh-2); animation: rise .5s var(--ease); }
.auth-card h1 { font-family: var(--display); font-weight: 500; font-size: 28px; letter-spacing: -.01em; }
.auth-card p { margin: 6px 0 22px; }
.alert { padding: 11px 14px; border-radius: 11px; font-size: 13.5px; margin-bottom: 14px; }
.alert-error { background: var(--bad-soft); color: #8e271c; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* ── Layout app ── */
body.app { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 22px; padding: 20px 14px; background: var(--surface); border-right: 1px solid var(--line); }
.sidebar .brand { padding: 4px 8px; }
.nav { display: grid; gap: 3px; }
.nav a, .nav-new { display: flex; align-items: center; gap: 11px; height: 41px; padding: 0 12px; border-radius: 11px; font-weight: 600; color: var(--ink-2); border: 0; background: none; cursor: pointer; text-align: left; transition: background .15s, color .15s; }
.nav a:hover { background: rgba(29,26,31,.045); }
.nav a.active { background: var(--accent-soft); color: var(--accent); }
.nav-new { margin-top: 10px; background: var(--ink); color: #fff; justify-content: center; }
.nav-new:hover { background: #352f38; }
.sidebar-foot { margin-top: auto; display: grid; gap: 12px; }
.live { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--ok); padding: 0 12px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 0 currentColor; animation: pulse 2s infinite; }
.live.off { color: var(--muted); } .live.off .live-dot { animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(29,133,86,.5); } 70% { box-shadow: 0 0 0 8px rgba(29,133,86,0); } 100% { box-shadow: 0 0 0 0 rgba(29,133,86,0); } }
.me { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #f0c9d8, #e9d8bd); font-weight: 700; color: var(--accent); flex: none; }
.me-name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.view { min-width: 0; padding: 28px 34px 60px; outline: none; }
.view > * { animation: fadeIn .35s var(--ease); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } }
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { font-family: var(--display); font-weight: 500; font-size: 32px; letter-spacing: -.02em; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.page-head .actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Cards / KPI ── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-1); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-head h2 { font-size: 15px; font-weight: 700; }
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 14px; margin-bottom: 22px; }
.kpi { padding: 18px 18px 16px; position: relative; overflow: hidden; }
.kpi .k-label { font-size: 12.5px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.kpi .k-val { font-size: 30px; font-weight: 700; letter-spacing: -.03em; margin-top: 8px; font-variant-numeric: tabular-nums; }
.kpi .k-sub { font-size: 12px; color: var(--muted); }
.kpi .k-ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; }
.kpi .k-ic svg { width: 15px; height: 15px; }
.t-accent { background: var(--accent-soft); color: var(--accent); }
.t-ok { background: var(--ok-soft); color: var(--ok); }
.t-warn { background: var(--warn-soft); color: var(--warn); }
.t-info { background: var(--info-soft); color: var(--info); }
.t-bad { background: var(--bad-soft); color: var(--bad); }
.bump { animation: bump .6s var(--ease); }
@keyframes bump { 30% { transform: scale(1.08); color: var(--ok); } }
.dash-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: start; }

/* Feed */
.feed { list-style: none; margin: 0; padding: 6px 0; max-height: 520px; overflow: auto; }
.feed li { display: flex; gap: 12px; padding: 11px 20px; align-items: flex-start; }
.feed li.new { animation: flashIn 1.6s var(--ease); }
@keyframes flashIn { 0% { background: var(--ok-soft); transform: translateX(-6px); opacity: 0; } 20% { opacity: 1; transform: none; } 100% { background: transparent; } }
.feed .f-ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.feed .f-ic svg { width: 15px; height: 15px; }
.feed .f-txt { flex: 1; min-width: 0; }
.feed .f-txt b { font-weight: 600; }
.feed .f-meta { font-size: 12px; color: var(--muted); }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .e-ic { width: 54px; height: 54px; margin: 0 auto 12px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.empty .e-ic svg { width: 24px; height: 24px; }
.empty h3 { color: var(--ink); font-size: 16px; margin-bottom: 4px; }
.empty .btn { margin-top: 16px; }

/* Próximos */
.upcoming { list-style: none; margin: 0; padding: 8px; }
.upcoming a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; transition: background .15s; }
.upcoming a:hover { background: var(--surface-2); }
.date-chip { width: 48px; flex: none; text-align: center; border-radius: 11px; border: 1px solid var(--line); overflow: hidden; background: var(--surface); }
.date-chip .m { display: block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; background: var(--accent); color: #fff; padding: 2px 0; }
.date-chip .d { display: block; font-size: 18px; font-weight: 700; padding: 3px 0 4px; }
.days { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }

/* ── Pills ── */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.publicado, .pill.confirmado { background: var(--ok-soft); color: var(--ok); }
.pill.borrador, .pill.pendiente { background: var(--warn-soft); color: var(--warn); }
.pill.archivado { background: #eeebe7; color: var(--muted); }
.pill.rechazado { background: var(--bad-soft); color: var(--bad); }

/* ── Toolbar / filtros ── */
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.search { position: relative; flex: 1; min-width: 220px; max-width: 380px; }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 17px; height: 17px; }
.search input { width: 100%; height: 40px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--surface); padding: 0 14px 0 38px; outline: none; transition: border-color .15s, box-shadow .15s; }
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(159,47,91,.12); }
.seg { display: inline-flex; padding: 3px; background: #eeebe6; border-radius: 12px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; height: 34px; padding: 0 13px; border-radius: 9px; font-weight: 600; font-size: 13px; color: var(--muted); cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }
.seg button .n { margin-left: 4px; opacity: .6; }

/* ── Grid de invitaciones ── */
.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.ev-card { display: flex; flex-direction: column; overflow: hidden; cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.ev-card:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.ev-cover { position: relative; height: 150px; background: var(--c1, #222) center/cover no-repeat; display: grid; place-items: center; color: var(--c2, #fff); overflow: hidden; }
.ev-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.35)); }
.ev-cover.has-img .ev-cover-title { display: none; }
.ev-cover-title { font-family: var(--display); font-size: 25px; font-style: italic; text-align: center; padding: 0 18px; position: relative; z-index: 1; }
.ev-cover .pill { position: absolute; top: 12px; left: 12px; z-index: 2; background: rgba(255,255,255,.92); }
.ev-cover .pill.archivado { color: var(--muted); }
.ev-body { padding: 15px 16px 12px; display: grid; gap: 3px; }
.ev-body h3 { font-size: 16px; font-weight: 700; }
.ev-meta { font-size: 12.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ev-meta svg { width: 14px; height: 14px; }
.ev-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.progress { height: 6px; background: #efebe6; border-radius: 99px; overflow: hidden; margin-top: 10px; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--ok), #3fb97f); border-radius: inherit; transition: width .6s var(--ease); }
.ev-stats { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }
.ev-stats b { color: var(--ink); }
.ev-foot { display: flex; gap: 4px; padding: 8px 10px; border-top: 1px solid var(--line); margin-top: auto; }
.ev-foot .icon-btn { width: 32px; height: 32px; }
.ev-foot .views { margin-left: auto; display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); padding-right: 6px; }
.ev-foot .views svg { width: 15px; height: 15px; }

/* Skeleton */
.sk { background: linear-gradient(90deg, #efebe6 0, #f7f4f0 40%, #efebe6 80%); background-size: 300% 100%; animation: sk 1.3s infinite; border-radius: 10px; }
@keyframes sk { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ── Editor ── */
.ed-top { position: sticky; top: 0; z-index: 20; margin: -28px -34px 22px; padding: 14px 34px; background: rgba(247,246,243,.86); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ed-title { min-width: 0; flex: 1; }
.ed-title h1 { font-size: 19px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-title .row { gap: 8px; margin-top: 2px; }
.save-state { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.save-state.saving { color: var(--warn); }
.save-state.saved { color: var(--ok); }
.save-state.error { color: var(--bad); }
.link-chip { display: flex; align-items: center; gap: 4px; height: 40px; padding: 0 4px 0 12px; border: 1px solid var(--line-2); border-radius: 11px; background: var(--surface); max-width: 380px; min-width: 0; }
.link-chip a { font-size: 13px; font-weight: 600; color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.link-chip .icon-btn { width: 30px; height: 30px; flex: none; }

.ed-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 26px; align-items: start; }
.ed-layout > div { min-width: 0; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { position: relative; border: 0; background: none; padding: 11px 14px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; display: flex; align-items: center; gap: 7px; }
.tabs button svg { width: 16px; height: 16px; }
.tabs button::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); transform: scaleX(0); transition: transform .25s var(--ease); }
.tabs button.on { color: var(--ink); }
.tabs button.on::after { transform: scaleX(1); }
.tabs .badge { min-width: 19px; height: 19px; padding: 0 6px; border-radius: 99px; background: var(--ok); color: #fff; font-size: 11px; display: inline-grid; place-items: center; }
.panel { display: none; }
.panel.on { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; animation: fadeIn .3s var(--ease); }
.section { padding: 20px; display: grid; gap: 16px; }
.section > h3 { font-size: 14.5px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.section > h3 svg { color: var(--accent); }
.section > p.hint { margin: -10px 0 0; color: var(--muted); font-size: 13px; }

/* Selector de modelo */
.tpl-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tpl-opt { position: relative; cursor: pointer; border: 2px solid var(--line); border-radius: 14px; overflow: hidden; transition: border-color .15s, transform .15s; background: var(--surface); }
.tpl-opt:hover { transform: translateY(-2px); }
.tpl-opt input { position: absolute; opacity: 0; }
.tpl-opt .sw { height: 74px; background: var(--c1); display: grid; place-items: center; font-family: var(--display); font-style: italic; color: var(--c2); font-size: 19px; }
.tpl-opt .nm { padding: 9px 11px; font-weight: 600; font-size: 13px; }
.tpl-opt:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(159,47,91,.1); }
.tpl-opt:has(input:checked)::after { content: "✓"; position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; }

/* Vista previa celular */
.preview { position: sticky; top: 96px; display: grid; gap: 12px; justify-items: center; }
.phone { width: 330px; height: 660px; border-radius: 44px; padding: 11px; background: #17151a; box-shadow: var(--sh-3), inset 0 0 0 2px #2b282e; position: relative; }
.phone::before { content: ""; position: absolute; top: 20px; left: 50%; width: 92px; height: 24px; transform: translateX(-50%); background: #17151a; border-radius: 20px; z-index: 2; }
.phone iframe { width: 100%; height: 100%; border: 0; border-radius: 34px; background: #fff; display: block; }
.phone .reloading { position: absolute; inset: 11px; border-radius: 34px; background: rgba(255,255,255,.5); display: grid; place-items: center; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 3; }
.phone.busy .reloading { opacity: 1; }
.spinner { width: 24px; height: 24px; border-radius: 50%; border: 2.5px solid var(--accent); border-right-color: transparent; animation: spin .7s linear infinite; }
.preview-actions { display: flex; gap: 6px; }
.preview-toggle { display: none; }

/* Subidas */
.drop { position: relative; border: 1.5px dashed var(--line-2); border-radius: 14px; background: var(--surface-2); display: grid; place-items: center; text-align: center; padding: 26px 16px; cursor: pointer; transition: border-color .15s, background .15s; color: var(--muted); }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop b { color: var(--ink); display: block; margin-top: 6px; }
.drop svg { width: 26px; height: 26px; }
.cover-prev { position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 16/10; background: #eee center/cover no-repeat; }
.cover-prev .over-actions { position: absolute; right: 10px; top: 10px; display: flex; gap: 6px; }
.chip-btn { height: 32px; padding: 0 12px; border-radius: 9px; border: 0; background: rgba(255,255,255,.94); font-weight: 600; font-size: 12.5px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; box-shadow: var(--sh-1); }
.chip-btn:hover { background: #fff; }
.chip-btn.danger { color: var(--bad); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.g-item { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #eee center/cover no-repeat; cursor: grab; }
.g-item.dragging { opacity: .4; }
.g-item .icon-btn { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; background: rgba(255,255,255,.92); color: var(--bad); opacity: 0; transition: opacity .15s; }
.g-item:hover .icon-btn { opacity: 1; }
.g-add { aspect-ratio: 1; padding: 10px; }
.g-add b { font-size: 12.5px; }
.uploading { position: relative; aspect-ratio: 1; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.uploading .bar { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--accent); transition: width .2s; }
.audio-box { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.audio-box audio { flex: 1; min-width: 0; height: 36px; }

/* Invitados */
.sum-chips { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 10px; }
.sum-chip { padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.sum-chip .v { font-size: 22px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sum-chip .l { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.sum-chip.ok .v { color: var(--ok); } .sum-chip.warn .v { color: var(--warn); } .sum-chip.bad .v { color: var(--bad); }
.add-row { display: grid; grid-template-columns: 1.6fr 1fr 90px auto; gap: 10px; align-items: end; }
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .15s; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl tr.flash { animation: rowFlash 2.2s var(--ease); }
@keyframes rowFlash { 0%, 30% { background: var(--ok-soft); } 100% { background: transparent; } }
.tbl .g-name { font-weight: 600; }
.tbl .g-sub { font-size: 12px; color: var(--muted); }
.tbl .acts { display: flex; gap: 2px; justify-content: flex-end; }
.tbl .acts .icon-btn { width: 30px; height: 30px; }
.seen { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.seen.yes { color: var(--info); }
.seen svg { width: 15px; height: 15px; }
.msg-bubble { font-size: 12.5px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); padding: 4px 9px; border-radius: 10px 10px 10px 3px; display: inline-block; max-width: 240px; margin-top: 4px; }
.web-tag { font-size: 10.5px; font-weight: 700; color: var(--info); background: var(--info-soft); padding: 1px 6px; border-radius: 6px; margin-left: 6px; vertical-align: 1px; }

/* Modelos */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.tpl-card { overflow: hidden; }
.tpl-frame { height: 420px; background: var(--c1); position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.tpl-frame iframe { width: 390px; height: 840px; border: 0; transform: scale(.5); transform-origin: 0 0; position: absolute; left: calc(50% - 97.5px); top: 0; pointer-events: none; }
.tpl-info { padding: 16px 18px; display: grid; gap: 4px; }
.tpl-info h3 { font-size: 16px; }
.swatches { display: flex; gap: 6px; margin-top: 6px; }
.swatches i { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0,0,0,.1); }

/* ── Modal ── */
.modal-back { position: fixed; inset: 0; z-index: 100; background: rgba(29,26,31,.42); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 16px; animation: fade .2s; }
.modal { width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--sh-3); animation: pop .3s var(--ease); }
.modal.wide { max-width: 680px; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 20px 22px 6px; }
.modal-head h2 { font-size: 19px; font-weight: 700; flex: 1; }
.modal-body { padding: 12px 22px 8px; display: grid; gap: 14px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px 20px; }
.modal-back.closing { animation: fade .18s reverse forwards; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }

/* Menú */
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 190px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--sh-2); padding: 5px; z-index: 30; animation: pop .18s var(--ease); }
.menu button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: 0; background: none; border-radius: 8px; cursor: pointer; font-weight: 500; text-align: left; }
.menu button:hover { background: var(--surface-2); }
.menu button.danger { color: var(--bad); }
.menu button.danger:hover { background: var(--bad-soft); }

/* ── Toasts ── */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: grid; gap: 10px; width: min(370px, calc(100vw - 32px)); }
.toast { display: flex; gap: 11px; align-items: flex-start; padding: 13px 14px; border-radius: 13px; background: #1f1c21; color: #fff; box-shadow: var(--sh-3); animation: toastIn .35s var(--ease); font-size: 13.5px; cursor: pointer; }
.toast .t-ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; background: rgba(255,255,255,.12); }
.toast .t-ic svg { width: 14px; height: 14px; }
.toast.ok .t-ic { background: #2bab70; } .toast.bad .t-ic { background: #d9534a; } .toast.live .t-ic { background: var(--accent-2); }
.toast small { display: block; opacity: .65; font-size: 12px; margin-top: 1px; }
.toast.out { animation: toastOut .3s forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.97); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }

/* ── Responsive ── */
@media (max-width: 1200px) {
  .kpis { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .ed-layout { grid-template-columns: minmax(0,1fr) 300px; }
  .phone { width: 290px; height: 590px; }
  .sum-chips { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 980px) {
  .dash-cols { grid-template-columns: 1fr; }
  .ed-layout { grid-template-columns: 1fr; }
  .preview { display: none; position: fixed; inset: 0; z-index: 90; background: rgba(29,26,31,.55); backdrop-filter: blur(4px); place-content: center; top: 0; }
  .preview.show { display: grid; }
  .preview-toggle { display: inline-flex; }
}
@media (max-width: 760px) {
  body.app { grid-template-columns: minmax(0, 1fr); padding-bottom: 72px; }
  .sidebar { position: fixed; z-index: 50; bottom: 0; top: auto; left: 0; right: 0; height: auto; flex-direction: row; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(12px); }
  .sidebar .brand, .sidebar-foot { display: none; }
  .nav { grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; gap: 4px; }
  .nav a, .nav-new { flex-direction: column; height: 52px; gap: 2px; font-size: 11px; padding: 0; justify-content: center; margin: 0; }
  .nav-new { background: var(--accent); }
  .view { padding: 20px 16px 40px; }
  .page-head h1 { font-size: 26px; }
  .ed-top { margin: -20px -16px 16px; padding: 12px 16px; }
  .ed-title { flex: 1 1 calc(100% - 60px); }
  .link-chip { order: 3; max-width: none; flex: 1 1 100%; }
  .ed-top .switch { order: 4; } .ed-top .preview-toggle { order: 5; margin-left: auto; } .ed-top .menu-wrap { order: 6; }
  .kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .kpi .k-val { font-size: 25px; }
  .grid-2, .grid-3, .add-row { grid-template-columns: 1fr; }
  .sum-chips { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .tbl .hide-sm { display: none; }
  .toasts { right: 16px; bottom: 84px; }
  .phone { width: min(330px, 88vw); height: min(660px, 80vh); }
}

/* ── Listas editables, opciones de diseño ── */
.rep { display: grid; gap: 8px; }
.rep-rows { display: grid; gap: 8px; }
.rep-rows:empty { display: none; }
.rep-row { display: grid; grid-template-columns: var(--cols) auto; gap: 8px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); animation: fadeIn .25s var(--ease); }
.rep-row .input { height: 40px; width: 100%; padding: 0 11px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface); outline: none; min-width: 0; }
.rep-row .input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(159,47,91,.12); }
.rep-row input[type=color] { padding: 3px; cursor: pointer; }
.rep-row select.input { appearance: none; padding-right: 8px; }
.rep-acts { display: flex; gap: 0; }
.rep-acts .icon-btn { width: 30px; height: 30px; }
.rep-acts .icon-btn svg { width: 16px; height: 16px; }
.rep-add { justify-self: start; }
.opt-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.opt-card { position: relative; display: grid; gap: 2px; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; transition: border-color .15s, background .15s; }
.opt-card input { position: absolute; opacity: 0; pointer-events: none; }
.opt-card b { font-size: 13.5px; }
.opt-card small { font-size: 12px; color: var(--muted); }
.opt-card:hover { border-color: var(--line-2); }
.opt-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.opt-card:has(input:checked) b { color: var(--accent); }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px 16px; }
.check span { font-size: 13.5px; }
.color-in { width: 54px; height: 40px; border: 1px solid var(--line-2); border-radius: 10px; padding: 3px; background: var(--surface); cursor: pointer; }
.color-in:disabled { opacity: .4; cursor: not-allowed; }
.cover-prev.portrait { aspect-ratio: 4/5; max-width: 240px; }
.tpl-opt .sw { background: linear-gradient(135deg, var(--c1) 55%, var(--c2) 160%); }
@media (max-width: 760px) {
  .rep-row { grid-template-columns: 1fr 1fr; }
  .rep-row .rep-acts { grid-column: 1 / -1; justify-content: flex-end; }
  .rep-row input[type=color] { width: 100%; }
}
.palettes { display: flex; flex-wrap: wrap; gap: 8px; }
.palette { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px 0 8px; border: 1px solid var(--line-2); border-radius: 99px; background: var(--surface); font-weight: 600; font-size: 12.5px; cursor: pointer; transition: border-color .15s, transform .1s; }
.palette:hover { border-color: var(--accent); }
.palette:active { transform: scale(.97); }
.pal-dots { display: flex; }
.pal-dots i { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--surface); margin-left: -6px; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.pal-dots i:first-child { margin-left: 0; }
.pal-dots .pal-reset { display: grid; place-items: center; background: var(--surface-2); }
.pal-dots .pal-reset svg { width: 12px; height: 12px; }
.color-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.color-field { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 8px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; transition: border-color .15s; }
.color-field:hover { border-color: var(--line-2); }
.color-field.custom { border-color: var(--accent); background: var(--accent-soft); }
.color-field input[type=color] { width: 44px; height: 44px; border: 0; padding: 0; border-radius: 10px; background: none; cursor: pointer; flex: none; }
.color-field input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.color-field input[type=color]::-webkit-color-swatch { border: 1px solid rgba(0,0,0,.1); border-radius: 10px; }
.color-field b { display: block; font-size: 13px; }
.color-field small { font-size: 11.5px; color: var(--muted); }
.color-field .icon-btn { width: 30px; height: 30px; }

/* ═════════ Panel de los novios ═════════ */
body.cli { min-height: 100vh; background: radial-gradient(1000px 500px at 100% -10%, var(--accent-soft), transparent 60%), var(--bg); }
.cli-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; padding: 12px 24px; background: rgba(247,246,243,.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.cli-top .brand { font-size: 18px; } .cli-top .brand-mark { width: 28px; height: 28px; font-size: 15px; border-radius: 8px; }
.cli-main { max-width: 1200px; margin: 0 auto; padding: 24px 24px 60px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.cli-main > * { animation: fadeIn .4s var(--ease); }
.cli-hero { position: relative; overflow: hidden; border-radius: 22px; padding: 44px 34px; color: #fff; background: linear-gradient(135deg, var(--accent), #1d1a1f); isolation: isolate; box-shadow: var(--sh-2); }
.cli-hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--img, none) center/cover no-repeat; transform: scale(1.05); }
.cli-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(20,16,22,.86) 0%, rgba(20,16,22,.55) 60%, rgba(20,16,22,.3) 100%); }
.cli-kicker { margin: 0; font-size: 11.5px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; opacity: .75; }
.cli-names { font: 500 clamp(36px, 6vw, 58px)/1.05 var(--display); margin: 10px 0 8px; letter-spacing: -.01em; }
.cli-names i { font-style: italic; font-weight: 400; opacity: .8; }
.cli-date { margin: 0; opacity: .85; }

.cli-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.cli-hero .btn:not(.btn-primary) { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.25); color: #fff; }
.cli-hero .btn:not(.btn-primary):hover { background: rgba(255,255,255,.22); }
.cli-hero .btn-primary { background: #fff; color: var(--ink); border-color: #fff; box-shadow: none; }
.cli-warn { display: inline-flex; align-items: center; gap: 8px; margin: 18px 0 0; padding: 8px 12px; border-radius: 10px; background: rgba(255,255,255,.14); font-size: 13px; }
.cli-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.cli-col { display: grid; gap: 20px; min-width: 0; }
.cli-help ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--ink-2); }
.cli-help ol svg { width: 15px; height: 15px; vertical-align: -3px; }
.tbl .acts .wa { color: #1f9d55; }
.tbl .acts .wa:hover { background: #e3f6ea; color: #168246; }
.cli-pin { text-align: center; }
.cli-pin h1 { font-size: 32px; }
.label-sm { margin: 0 0 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.pin-input { width: 100%; height: 64px; text-align: center; font-size: 30px; letter-spacing: .5em; padding-left: .5em; border: 1px solid var(--line-2); border-radius: 14px; outline: none; font-weight: 700; }
.pin-input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
@media (max-width: 980px) { .cli-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .cli-main { padding: 16px 14px 40px; }
  .cli-hero { padding: 30px 22px; }
  .cli-top { padding: 10px 16px; }
  .cli-actions .btn { flex: 1 1 auto; }
}

/* Acceso de los novios (en el editor) */
.access-link { display: flex; gap: 8px; align-items: center; }
.access-link input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface-2); font-size: 13px; color: var(--ink-2); }
.pin-row { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; }
.pin-row .field { width: 160px; }
.pin-row input { letter-spacing: .3em; font-weight: 700; text-align: center; }

/* ── Música en el editor ── */
.panel-stack { display: grid; gap: 18px; }
.music-sec { gap: 18px; }
.now-empty { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 14px; background: var(--surface-2); border: 1px dashed var(--line-2); color: var(--muted); font-size: 13.5px; }
.now-card { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px; border-radius: 18px; color: #fff; position: relative; overflow: hidden; isolation: isolate; background: linear-gradient(135deg, #2a2230, #17141a); box-shadow: var(--sh-2); }
.now-card::before { content: ""; position: absolute; inset: -40px; z-index: -1; background: inherit; background-image: var(--art, none); filter: blur(30px) saturate(1.3); opacity: .5; }
.now-art { width: 96px; height: 96px; border-radius: 12px; background: #3a3140 center/cover no-repeat; display: grid; place-items: center; position: relative; box-shadow: 0 10px 24px -8px rgba(0,0,0,.6); color: rgba(255,255,255,.5); }
.now-art > svg { width: 34px; height: 34px; }
.now-play { position: absolute; inset: 0; margin: auto; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: #17141a; display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 16px rgba(0,0,0,.35); transition: transform .15s; }
.now-play:hover { transform: scale(1.08); }
.now-play svg { width: 18px; height: 18px; }
.now-info { display: grid; gap: 2px; min-width: 0; }
.now-kicker { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.6); }
.now-title, .now-artist { width: 100%; border: 0; background: transparent; color: #fff; outline: none; padding: 2px 6px; margin-left: -6px; border-radius: 6px; }
.now-title { font: 600 19px/1.3 var(--display); }
.now-artist { font-size: 13.5px; color: rgba(255,255,255,.75); }
.now-title:hover, .now-artist:hover, .now-title:focus, .now-artist:focus { background: rgba(255,255,255,.1); }
.now-title::placeholder, .now-artist::placeholder { color: rgba(255,255,255,.4); }
.now-bar { height: 3px; border-radius: 3px; background: rgba(255,255,255,.18); margin-top: 8px; overflow: hidden; }
.now-bar i { display: block; height: 100%; width: 0; background: #fff; transition: width .25s linear; }
.now-side { display: flex; align-items: center; gap: 8px; }
.now-side .icon-btn { color: rgba(255,255,255,.7); }
.now-side .icon-btn:hover { background: rgba(255,255,255,.12); color: #fff; }
.now-start { width: 92px; gap: 3px; }
.now-start > span, .now-start small { color: rgba(255,255,255,.6) !important; font-size: 10.5px !important; }
.now-start input { height: 34px !important; background: rgba(255,255,255,.1) !important; border-color: rgba(255,255,255,.15) !important; color: #fff; text-align: center; }
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 11px; }
.eq i { width: 2.5px; height: 100%; background: currentColor; border-radius: 2px; transform: scaleY(.35); transform-origin: bottom; }
.now-card.playing .eq i { animation: eqb .9s ease-in-out infinite; color: #7ee2a8; }
.now-card.playing .eq i:nth-child(2) { animation-delay: -.3s; } .now-card.playing .eq i:nth-child(3) { animation-delay: -.6s; }
@keyframes eqb { 50% { transform: scaleY(1); } }
.music-search { display: grid; gap: 10px; }
.music-q { max-width: none; position: relative; }
.music-q input { height: 46px; font-size: 15px; border-radius: 13px; }
.mq-spin { position: absolute; right: 14px; top: 50%; margin-top: -10px; width: 20px; height: 20px; }
.music-sugs { display: flex; flex-wrap: wrap; gap: 6px; }
.sug { border: 1px solid var(--line); background: var(--surface-2); border-radius: 99px; padding: 5px 11px; font-size: 12px; font-weight: 600; color: var(--ink-2); cursor: pointer; transition: border-color .15s, background .15s; }
.sug:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.music-results { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 420px; overflow: auto; }
.music-results:empty { display: none; }
.mres-item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; transition: background .15s; animation: fadeIn .35s var(--ease) both; animation-delay: calc(var(--i) * 25ms); }
.mres-item:hover, .mres-item.playing { background: var(--surface-2); }
.mres-art { width: 52px; height: 52px; border-radius: 9px; background: #ddd center/cover no-repeat; position: relative; flex: none; overflow: hidden; }
.mres-play { position: absolute; inset: 0; border: 0; background: rgba(0,0,0,.35); color: #fff; display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .15s; }
.mres-play svg { width: 18px; height: 18px; }
.mres-item:hover .mres-play, .mres-play.on { opacity: 1; }
.mres-txt { display: grid; min-width: 0; }
.mres-txt b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mres-txt small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mres-item.playing .mres-txt b { color: var(--accent); }
.mres-empty { padding: 16px; color: var(--muted); text-align: center; font-size: 13.5px; }
.music-alt { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: end; padding-top: 16px; border-top: 1px solid var(--line); }
.drop-sm { padding: 14px; grid-template-columns: auto 1fr; justify-items: start; text-align: left; column-gap: 12px; }
.drop-sm svg { grid-row: span 2; width: 22px; height: 22px; }
.drop-sm b { margin: 0; }
@media (max-width: 760px) {
  .now-card { grid-template-columns: 72px minmax(0, 1fr); }
  .now-art { width: 72px; height: 72px; }
  .now-side { grid-column: 1 / -1; justify-content: space-between; }
  .music-alt { grid-template-columns: 1fr; }
}
