:root {
  --obsidian: #030211;
  --navy: #0F172A;
  --navy-2: #131F37;
  --surface: rgba(255,255,255,.045);
  --surface-2: rgba(255,255,255,.07);
  --line: rgba(255,255,255,.10);
  --text: #F1F5F9;
  --muted: #94A3B8;
  --amber: #F59E0B;
  --amber-soft: rgba(245,158,11,.14);
  --teal: #2DD4BF;
  --teal-soft: rgba(45,212,191,.14);
  --green: #34D399;
  --red: #F87171;
  --blue: #60A5FA;
  --li: #0A66C2;
  --ig1: #F58529; --ig2: #DD2A7B; --ig3: #8134AF;
  --fb: #1877F2;
  --tk: #FE2C55;
  --radius: 20px;
  --shadow: 0 18px 50px rgba(0,0,0,.45);
  --safe-b: env(safe-area-inset-bottom, 0px);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { background: var(--obsidian); color: var(--text); min-height: 100%; }
body { overflow-x: hidden; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1,h2,h3,strong { font-family: 'Space Grotesk', 'Inter', sans-serif; }
[hidden] { display: none !important; }

/* Fondo cinematográfico equilibrado y elegante */
.bg-orbs {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 45% at 50% -5%, rgba(45, 212, 191, 0.08), transparent 70%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(245, 158, 11, 0.04), transparent 70%),
    linear-gradient(180deg, #030211 0%, #0B1120 45%, #0F172A 75%, #030211 100%);
}
.bg-orbs span { display: none; }

/* Cabecera full-bleed unificada */
.topbar-wrap {
  position: sticky;
  top: 0;
  z-index: 30;
  width: 100%;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background .25s ease, border-color .25s ease, backdrop-filter .25s ease;
}

.topbar-wrap.is-scrolled {
  background: rgba(3, 2, 17, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.topbar {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
}

.app {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  padding: 14px 16px calc(110px + var(--safe-b));
}
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-mascot { height: 62px; width: auto; object-fit: contain; flex: none; filter: drop-shadow(0 6px 18px rgba(45,212,191,.42)); transition: transform .3s cubic-bezier(.34,1.56,.64,1); will-change: transform; cursor: pointer; }
.brand-mascot:hover { transform: scale(1.08) rotate(3deg); }
.brand-text { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.brand-text strong { font-size: 19px; letter-spacing: -.01em; line-height: 1.2; }
.brand-text em { font-style: normal; color: var(--amber); }
.brand-text #clientName { font-size: 13px; font-weight: 500; color: #E2E8F0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; line-height: 1.3; }
.brand-endorse { font-size: 11px; display: inline-flex; align-items: baseline; gap: 4px; line-height: 1.2; }
.brand-endorse .by-pfx { font-size: 10.5px; font-style: italic; color: var(--muted); text-transform: lowercase; }
.brand-endorse b { font-family: 'Space Grotesk', sans-serif; font-size: 11.5px; font-weight: 800; color: var(--teal); letter-spacing: .06em; text-transform: uppercase; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.btn-top-story { display: none; }
.quota-pill { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--teal-soft); border: 1px solid rgba(45,212,191,.35); font-size: 13.5px; font-weight: 700; color: var(--teal); transition: transform .2s, border-color .2s; }
.quota-pill:hover { border-color: rgba(45,212,191,.65); }
.quota-pill:active { transform: scale(.95); }
.quota-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 10px var(--teal); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.lang-toggle { display: flex; padding: 3px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.lang-toggle button { padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: var(--muted); transition: all .25s; }
.lang-toggle button.is-active { background: var(--amber); color: #1a1203; }

/* Tabs */
.tabs { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 5px; margin-top: 8px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.tab { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 4px; font-size: 14px; font-weight: 600; color: var(--muted); border-radius: 12px; transition: color .25s; }
.tab.is-active { color: #fff; }
.tab .badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; background: var(--amber); color: #1a1203; }
.tab .badge:empty, .tab .badge[data-zero="1"] { display: none; }
.tab-indicator {
  position: absolute;
  z-index: 0;
  top: 5px;
  bottom: 5px;
  left: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(45,212,191,.25), rgba(245,158,11,.22));
  border: 1px solid rgba(255,255,255,.12);
  transition: transform .3s cubic-bezier(.4,.1,.2,1), width .3s cubic-bezier(.4,.1,.2,1);
}

/* Network glyphs */
.net { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 6px; font-size: 9.5px; font-weight: 800; color: #fff; letter-spacing: -.02em; flex: none; }
.net-linkedin { background: var(--li); }
.net-instagram { background: linear-gradient(45deg, var(--ig1), var(--ig2) 55%, var(--ig3)); }
.net-facebook { background: var(--fb); }
.net-tiktok { background: #111; box-shadow: -1.5px 0 0 var(--tk), 1.5px 0 0 #25F4EE; }

/* Vistas */
.content { padding-top: 18px; }
.view { display: none; animation: rise .4s ease both; }
.view.is-active { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

/* Tarjetas */
.card { display: flex; flex-direction: column; margin-bottom: 16px; border-radius: var(--radius); background: linear-gradient(160deg, rgba(255,255,255,.07), rgba(255,255,255,.025)); border: 1px solid var(--line); backdrop-filter: blur(14px); box-shadow: var(--shadow); overflow: hidden; animation: rise .45s ease both; }
.card.is-leaving { animation: leave .35s ease forwards; }
@keyframes leave { to { opacity: 0; transform: translateX(40px) scale(.96); height: 0; margin: 0; } }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 10px; }
.card-date { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.card-date small { color: var(--muted); font-weight: 500; font-size: 12px; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-draft { color: var(--amber); background: var(--amber-soft); }
.status-approved { color: var(--green); background: rgba(52,211,153,.14); }
.status-published { color: var(--blue); background: rgba(96,165,250,.14); }
.status-cancelled, .status-discarded { color: var(--muted); background: rgba(148,163,184,.12); }
.type-tag { padding: 3px 9px; border-radius: 8px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--teal); background: var(--teal-soft); }

.media { position: relative; display: block; width: 100%; aspect-ratio: 1/1; background: #0b1224; overflow: hidden; }
.media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s; }
.media:hover img { transform: scale(1.02); }
.media.is-story { aspect-ratio: 9/14; max-height: 420px; }
.media-badge { position: absolute; right: 12px; top: 12px; z-index: 4; padding: 5px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; background: rgba(3,2,17,.75); backdrop-filter: blur(8px); border: 1px solid var(--line); }
.media-zoom { position: absolute; left: 12px; bottom: 12px; z-index: 4; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(3,2,17,.75); backdrop-filter: blur(8px); border: 1px solid var(--line); font-size: 15px; color: #fff; transition: transform .2s, background .2s; }
.media-zoom:hover { transform: scale(1.1); background: var(--surface-2); color: var(--teal); }

/* Controles de carrusel en la tarjeta */
.media-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 4; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(3,2,17,.78); backdrop-filter: blur(8px); border: 1px solid var(--line); font-size: 19px; font-weight: 700; color: #fff; transition: all .2s; }
.media-nav:hover { background: var(--surface-2); border-color: rgba(255,255,255,.35); transform: translateY(-50%) scale(1.08); color: var(--teal); }
.media-nav:active { transform: translateY(-50%) scale(.94); }
.media-prev { left: 10px; }
.media-next { right: 10px; }
.media-dots { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); z-index: 4; display: flex; gap: 5px; padding: 4px 8px; border-radius: 999px; background: rgba(3,2,17,.65); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.08); }
.media-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.3); transition: all .2s; }
.media-dots i.is-active { background: var(--amber); width: 16px; border-radius: 4px; }

.card-body { padding: 14px 16px 6px; flex: 1 1 auto; }
.card-concept { font-size: 17px; line-height: 1.25; letter-spacing: -.01em; margin-bottom: 8px; }
.preview-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.ptab { display: flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 10px; font-size: 11.5px; font-weight: 600; color: var(--muted); border: 1px solid transparent; }
.ptab.is-active { color: #fff; background: var(--surface-2); border-color: var(--line); }
.copy { font-size: 14px; line-height: 1.55; color: #CBD5E1; white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.copy.is-open { display: block; -webkit-line-clamp: unset; }
.more-btn { margin-top: 6px; font-size: 12.5px; font-weight: 600; color: var(--teal); }

/* Selector de redes */
.targets { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px 4px; }
.target { display: flex; align-items: center; gap: 7px; padding: 6px 10px 6px 7px; border-radius: 12px; font-size: 12px; font-weight: 600; border: 1px solid var(--line); background: var(--surface); color: var(--muted); transition: all .25s; }
.target .net { opacity: .45; filter: grayscale(1); transition: all .25s; }
.target .sw { position: relative; width: 26px; height: 15px; border-radius: 999px; background: rgba(255,255,255,.14); transition: background .25s; }
.target .sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: #fff; transition: transform .25s; }
.target.is-on { color: #fff; border-color: rgba(45,212,191,.45); background: var(--teal-soft); }
.target.is-on .net { opacity: 1; filter: none; }
.target.is-on .sw { background: var(--teal); }
.target.is-on .sw::after { transform: translateX(11px); }
.target[disabled] { opacity: .5; cursor: not-allowed; }

/* Botones */
.actions { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; padding: 14px 16px 16px; margin-top: auto; }
.actions.two { grid-template-columns: 1fr 1fr; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 14px; border-radius: 14px; font-size: 13.5px; font-weight: 700; transition: transform .15s, box-shadow .25s, background .25s; }
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .4; pointer-events: none; }
.btn-primary { color: #1a1203; background: linear-gradient(135deg, #FBBF24, var(--amber)); box-shadow: 0 8px 24px rgba(245,158,11,.35); }
.btn-primary:hover { box-shadow: 0 10px 30px rgba(245,158,11,.55); }
.btn-soft { background: var(--surface-2); border: 1px solid var(--line); }
.btn-ghost { color: var(--muted); border: 1px solid var(--line); }
.btn-danger { color: #fff; background: linear-gradient(135deg, #F87171, #DC2626); }
.btn-outline-red { color: var(--red); border: 1px solid rgba(248,113,113,.4); background: rgba(248,113,113,.07); }
.link-btn { font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 6px 2px; }
.link-btn:hover { color: var(--teal); }

/* Calendario */
.week-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.week-title { text-align: center; display: flex; flex-direction: column; }
.week-title strong { font-size: 16px; }
.week-title span { font-size: 12px; color: var(--muted); }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; font-size: 22px; background: var(--surface); border: 1px solid var(--line); transition: background .2s; }
.icon-btn:active { background: var(--surface-2); }
.day-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 14px; }
.day { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 0 8px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); transition: all .25s; }
.day small { font-size: 10.5px; color: var(--muted); text-transform: uppercase; font-weight: 600; }
.day b { font-family: 'Space Grotesk'; font-size: 16px; }
.day .dots { display: flex; gap: 3px; height: 6px; }
.day .dots i { width: 6px; height: 6px; border-radius: 50%; }
.dot-approved { background: var(--green); box-shadow: 0 0 8px var(--green); }
.dot-published { background: var(--blue); }
.dot-draft { background: var(--amber); }
.day.is-today { border-color: rgba(45,212,191,.55); }
.day.is-selected { background: linear-gradient(160deg, rgba(45,212,191,.25), rgba(245,158,11,.2)); border-color: rgba(255,255,255,.35); transform: translateY(-2px); }
.day.is-empty { opacity: .6; }
.view-switch { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; font-size: 12.5px; color: var(--muted); }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.seg button { padding: 6px 12px; border-radius: 9px; font-size: 12px; font-weight: 600; color: var(--muted); transition: all .2s; }
.seg button.is-active { background: var(--surface-2); color: #fff; }
.seg-full { display: flex; margin: 4px 0 12px; }
.seg-full button { flex: 1; display: flex; gap: 6px; align-items: center; justify-content: center; }

/* Compacto */
.row { display: flex; align-items: center; gap: 12px; padding: 10px; margin-bottom: 10px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); animation: rise .35s ease both; }
.row img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; flex: none; }
.row-main { flex: 1; min-width: 0; }
.row-main strong { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-main small { color: var(--muted); font-size: 12px; }
.row-nets { display: flex; gap: 4px; margin-top: 4px; }
.row .btn { padding: 8px 10px; font-size: 12px; border-radius: 11px; }

/* Vacío */
.empty { text-align: center; padding: 56px 24px; color: var(--muted); }
.empty-ico { font-size: 44px; margin-bottom: 10px; filter: drop-shadow(0 6px 20px rgba(45,212,191,.35)); }
.empty strong { display: block; color: var(--text); font-size: 17px; margin-bottom: 6px; }
.empty p { font-size: 13.5px; line-height: 1.5; max-width: 300px; margin: 0 auto; }

/* Redes conectadas */
.net-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 12px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); animation: rise .4s ease both; }
.net-card .net { width: 42px; height: 42px; border-radius: 13px; font-size: 15px; }
.net-card-main { flex: 1; min-width: 0; }
.net-card-main strong { display: block; font-size: 15px; }
.net-card-main small { color: var(--muted); font-size: 12.5px; }
.conn { font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.conn-on { color: var(--green); background: rgba(52,211,153,.14); }
.conn-off { color: var(--muted); background: rgba(148,163,184,.12); }
.note { margin-top: 6px; padding: 14px 16px; border-radius: 16px; font-size: 12.5px; line-height: 1.55; color: var(--muted); background: var(--amber-soft); border: 1px solid rgba(245,158,11,.25); }
.note b { color: var(--amber); }

/* FAB */
.fab { position: fixed; z-index: 30; right: max(16px, calc(50% - 304px)); bottom: calc(18px + var(--safe-b)); display: flex; align-items: center; gap: 8px; padding: 14px 20px 14px 14px; border-radius: 999px; font-size: 14px; font-weight: 700; color: #1a1203; background: linear-gradient(135deg, #2DD4BF, #9CCBA3); box-shadow: 0 12px 36px rgba(45,212,191,.45); transition: transform .2s; }
.fab:active { transform: scale(.94); }
.fab-plus { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(3,2,17,.85); color: var(--teal); font-size: 18px; line-height: 1; }

/* Sheets */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(3,2,17,.7); backdrop-filter: blur(6px); animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: fixed; z-index: 60; left: 50%; bottom: 0; width: min(100%, 640px); max-height: 88vh; overflow-y: auto; padding: 10px 20px calc(20px + var(--safe-b)); border-radius: 26px 26px 0 0; background: linear-gradient(180deg, #131F37, #0B1224); border: 1px solid var(--line); border-bottom: 0; box-shadow: 0 -20px 60px rgba(0,0,0,.6); transform: translateX(-50%); animation: slideUp .38s cubic-bezier(.2,.9,.25,1); }
@keyframes slideUp { from { transform: translate(-50%, 100%); } }
.sheet-grab { width: 42px; height: 4px; border-radius: 4px; margin: 4px auto 14px; background: rgba(255,255,255,.2); }
.sheet h2 { font-size: 20px; margin-bottom: 4px; }
.sheet-sub { font-size: 13.5px; color: var(--muted); line-height: 1.5; margin-bottom: 14px; }
.sheet-actions { display: flex; gap: 10px; margin-top: 18px; }
.sheet-actions .btn { flex: 1; }
.sheet textarea { width: 100%; resize: vertical; padding: 14px; border-radius: 16px; font: inherit; font-size: 14.5px; line-height: 1.55; color: var(--text); background: rgba(255,255,255,.05); border: 1px solid var(--line); outline: none; transition: border-color .2s; }
.sheet textarea:focus { border-color: var(--teal); }
.edit-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 12px; color: var(--muted); }
.edit-meta .link-btn { color: var(--amber); }

.slot-groups { display: flex; flex-direction: column; gap: 14px; margin-top: 10px; }
.slot-week > h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 8px; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 8px; }
.slot { padding: 10px 12px; border-radius: 14px; text-align: left; background: var(--surface); border: 1px solid var(--line); transition: all .2s; }
.slot strong { display: block; font-size: 13.5px; }
.slot small { color: var(--muted); font-size: 12px; }
.slot.is-suggested::after { content: attr(data-tag); display: block; margin-top: 4px; font-size: 10px; font-weight: 700; color: var(--teal); text-transform: uppercase; letter-spacing: .06em; }
.slot.is-selected { background: linear-gradient(160deg, rgba(245,158,11,.28), rgba(45,212,191,.18)); border-color: var(--amber); box-shadow: 0 0 0 3px rgba(245,158,11,.15); }
.slot.is-busy { opacity: .35; pointer-events: none; text-decoration: line-through; }

.quota-card { display: flex; align-items: center; gap: 14px; padding: 14px; margin: 10px 0 16px; border-radius: 18px; background: var(--teal-soft); border: 1px solid rgba(45,212,191,.3); }
.quota-ring { --p: 70; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-family: 'Space Grotesk'; font-weight: 700; font-size: 18px; flex: none; background: conic-gradient(var(--teal) calc(var(--p) * 1%), rgba(255,255,255,.1) 0); position: relative; }
.quota-ring::before { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: #0F172A; }
.quota-ring span { position: relative; }
.quota-card p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.story-options { display: flex; flex-direction: column; gap: 10px; }
.story-opt { display: flex; align-items: center; gap: 14px; padding: 14px; text-align: left; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); transition: all .2s; }
.story-opt:active { transform: scale(.98); }
.story-opt:hover { border-color: var(--teal); }
.story-opt[disabled] { opacity: .4; pointer-events: none; }
.story-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; background: var(--surface-2); flex: none; }
.story-opt strong { display: block; font-size: 14.5px; }
.story-opt small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); line-height: 1.4; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(3,2,17,.96); display: flex; flex-direction: column; justify-content: center; animation: fade .25s; }
.lb-close { position: absolute; top: calc(14px + env(safe-area-inset-top, 0px)); right: 16px; z-index: 10; width: 42px; height: 42px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); font-size: 16px; transition: transform .2s; }
.lb-close:hover { transform: scale(1.08); }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 10; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: rgba(15,23,42,.88); backdrop-filter: blur(10px); border: 1px solid var(--line); font-size: 28px; font-weight: 700; color: #fff; transition: all .2s; }
.lb-nav:hover { background: var(--surface-2); border-color: rgba(255,255,255,.4); transform: translateY(-50%) scale(1.1); color: var(--teal); }
.lb-nav:active { transform: translateY(-50%) scale(.95); }
.lb-prev { left: 24px; }
.lb-next { right: 24px; }
.lb-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.lb-track::-webkit-scrollbar { display: none; }
.lb-track img { flex: none; width: 100%; max-height: 80vh; object-fit: contain; scroll-snap-align: center; }
.lb-counter { font-size: 14px; font-weight: 700; color: var(--muted); text-align: center; margin-top: 14px; letter-spacing: .04em; }
.lb-dots { display: flex; justify-content: center; gap: 6px; margin-top: 8px; }
.lb-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.25); transition: all .2s; cursor: pointer; }
.lb-dots i:hover { background: rgba(255,255,255,.5); }
.lb-dots i.is-active { background: var(--amber); width: 22px; border-radius: 4px; }

/* Toast */
.toast { position: fixed; z-index: 100; left: 50%; bottom: calc(96px + var(--safe-b)); transform: translate(-50%, 30px); padding: 12px 18px; border-radius: 14px; font-size: 13.5px; font-weight: 600; color: #fff; background: rgba(15,23,42,.96); border: 1px solid var(--line); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: all .35s cubic-bezier(.2,.9,.25,1); max-width: 90vw; text-align: center; }
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { border-color: rgba(52,211,153,.5); }
.toast.warn { border-color: rgba(245,158,11,.5); }

/* Footer */
.app-footer { margin-top: 48px; padding: 28px 16px 20px; border-top: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; }
.footer-endorse { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }
.footer-lbl { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.footer-logo-link { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 8px; transition: opacity .2s, transform .2s; }
.footer-logo-link:hover { opacity: .85; transform: translateY(-1px); }
.footer-logo-img { height: 20px; width: auto; object-fit: contain; }
.footer-meta { font-size: 12px; color: rgba(148,163,184,.65); display: flex; align-items: center; gap: 8px; }
.footer-sep { opacity: .5; }

@media (min-width: 820px) {
  .topbar { max-width: 1160px; padding: 14px 32px; }
  .app { max-width: 1160px; padding: 18px 32px calc(90px + var(--safe-b)); }
  .brand-mascot { height: 74px; }
  .brand-text strong { font-size: 21px; }
  .brand-text #clientName { font-size: 13.5px; }
  .brand-endorse b { font-size: 12px; }
  .app-footer { margin-top: 60px; padding: 36px 20px 28px; }
  .footer-logo-img { height: 22px; }
  .btn-top-story { display: inline-flex; align-items: center; gap: 7px; padding: 7px 15px; border-radius: 999px; font-size: 13.5px; font-weight: 700; color: #02201d; background: linear-gradient(135deg, var(--teal), #6ee7b7); box-shadow: 0 4px 14px rgba(45,212,191,.35); transition: transform .2s, box-shadow .2s; }
  .btn-top-story:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(45,212,191,.5); }
  .btn-top-story:active { transform: scale(.96); }
  .btn-top-story .fab-plus { font-size: 17px; font-weight: 800; line-height: 1; }
  .fab { display: none; }
  .tabs { max-width: 680px; margin: 12px auto 0; }
  .tab { font-size: 15px; padding: 12px 6px; }
  #view-pending.is-active, #historyList:not(.is-compact), #calendarList:not(.is-compact) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: stretch; }
  #view-pending .card, #historyList .card, #calendarList .card { margin-bottom: 0; }
  #view-pending .empty, #historyList .empty, #calendarList .empty { grid-column: 1 / -1; }
  #calendarList .row, #historyList .row { margin-bottom: 0; }
  .week-nav, .day-strip, .view-switch-wrap { max-width: 760px; margin-left: auto; margin-right: auto; }
  .week-nav { margin-bottom: 14px; }
  #calendarList.is-compact, #historyList.is-compact { display: flex; flex-direction: column; gap: 10px; max-width: 760px; margin: 0 auto; }
  #view-networks { max-width: 640px; margin: 0 auto; }
  .media:not(.is-story) { aspect-ratio: 4 / 3.4; }
}
@media (min-width: 1240px) {
  .topbar { max-width: 1320px; }
  .app { max-width: 1320px; }
  #view-pending.is-active, #historyList:not(.is-compact), #calendarList:not(.is-compact) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 380px) {
  .brand-text span { max-width: 90px; }
  .actions { grid-template-columns: 1fr 1fr; }
  .actions .btn-primary { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
