:root{--ink:#202636;--muted:#677085;--line:#dfe5ef;--surface:#fff;--page:#f6f8fc;--blue:#1e55c8;--blue-weak:#edf4ff;--purple:#7d18cf;--purple-weak:#f2edff;--green:#16734d;--green-weak:#edfaf2;--yellow:#a97200;--yellow-weak:#fff8da;--red:#c6314c;--red-weak:#fff0f2;--shadow:0 18px 55px rgba(35,53,90,.11);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:var(--page)}
*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0;min-width:320px;background:var(--page);font-size:16px;line-height:1.5}button,input,textarea,select{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.55}input,textarea,select{width:100%;border:1px solid #c9d2e1;border-radius:10px;background:#fff;color:var(--ink);padding:.65rem .75rem;min-height:44px}textarea{resize:vertical;line-height:1.5}input:focus,textarea:focus,select:focus,button:focus-visible{outline:3px solid rgba(30,85,200,.28);outline-offset:2px}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.loading-layer{position:fixed;inset:0;z-index:50;display:grid;place-content:center;gap:1rem;text-align:center;background:linear-gradient(140deg,#f6f8fc,#edf4ff);color:var(--muted);transition:opacity .25s ease}.loading-layer.is-hidden{opacity:0;pointer-events:none}.loading-mark{width:76px;height:76px;object-fit:contain;margin:auto;animation:mark-breathe 1.35s ease-in-out infinite}@keyframes mark-breathe{50%{transform:translateY(-6px) scale(1.05)}}
.auth-body{min-height:100svh;display:grid;place-items:center;padding:1.25rem;background:radial-gradient(circle at 15% 15%,#eaf5ff 0,transparent 26rem),radial-gradient(circle at 86% 82%,#f3edff 0,transparent 28rem),var(--page)}.auth-card{width:min(100%,470px);padding:clamp(1.5rem,5vw,3rem);background:rgba(255,255,255,.96);border:1px solid var(--line);border-radius:24px;box-shadow:var(--shadow)}.setup-card{margin:1.5rem auto}.setup-logo{display:block;max-width:230px;width:100%;height:auto;margin:0 auto 1rem}.eyebrow{margin:0 0 .2rem;color:var(--purple);font-weight:750;font-size:.76rem;letter-spacing:.095em;text-transform:uppercase}.auth-card h1,.step-heading h1,.step-heading h2,.dialog h2{margin:0;color:var(--ink);line-height:1.15}.auth-card>p:not(.eyebrow):not(.tiny-copy){color:var(--muted)}.stack-form,.content-fields{display:grid;gap:1rem;margin-top:1.3rem}.stack-form label,.content-fields label,.date-fields label,.news-controls label{display:grid;gap:.38rem;font-size:.9rem;font-weight:700;color:#3a4355}.tiny-copy{margin:.9rem 0 0;font-size:.78rem;color:var(--muted)}.alert{margin:1rem 0;padding:.8rem .95rem;border-radius:11px;font-size:.9rem}.alert.error{color:#951f3a;background:var(--red-weak);border:1px solid #f1b9c5}.primary-button,.button{border:1px solid transparent;border-radius:10px;min-height:44px;padding:.65rem 1rem;font-weight:750;transition:transform .14s ease,background .14s ease,border-color .14s ease}.primary-button{color:#fff;background:linear-gradient(135deg,var(--blue),#3574e8);box-shadow:0 7px 15px rgba(30,85,200,.2)}.primary-button:hover:not(:disabled){transform:translateY(-1px);background:linear-gradient(135deg,#1747b0,#2d68cf)}.button.secondary{background:#fff;border-color:#c9d4e6;color:#30486f}.button.secondary:hover:not(:disabled){background:var(--blue-weak);border-color:#9bb7ea}.compact{min-height:38px;padding:.42rem .72rem;font-size:.86rem}.icon-button{display:inline-grid;place-items:center;width:40px;height:40px;border:1px solid #cbd6e6;border-radius:10px;background:#fff;color:#35405a;font-size:1.12rem;line-height:1}.icon-button:hover{background:var(--blue-weak)}
.app-header{position:sticky;top:0;z-index:10;display:flex;align-items:center;justify-content:space-between;gap:1rem;min-height:72px;padding:.75rem clamp(1rem,4vw,4rem);background:rgba(255,255,255,.92);border-bottom:1px solid var(--line);backdrop-filter:blur(15px)}.brand{display:flex;align-items:center;gap:.7rem;min-width:0}.brand-mark{width:40px;height:40px;object-fit:contain;flex:none}.brand strong,.brand span{display:block;white-space:nowrap}.brand strong{font-size:1rem}.brand span{font-size:.76rem;color:var(--muted)}.header-actions{display:flex;align-items:center;gap:.5rem}.profile-picker{width:min(250px,27vw)}.profile-picker select{min-height:38px;padding:.4rem 2rem .4rem .6rem;font-size:.88rem;font-weight:700}.status-strip{display:flex;justify-content:space-between;gap:1rem;max-width:1280px;margin:auto;padding:.65rem clamp(1rem,4vw,4rem);font-size:.82rem;color:var(--muted)}.workspace{width:min(1280px,100%);margin:0 auto;padding:0 clamp(1rem,4vw,4rem) 3rem;display:grid;gap:1rem}.step-card{background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:clamp(1.1rem,2.5vw,2rem);box-shadow:0 5px 22px rgba(35,53,90,.045)}.step-heading{display:flex;gap:.85rem;align-items:flex-start;margin-bottom:1.25rem}.step-heading h1{font-size:clamp(1.35rem,3vw,1.75rem)}.step-heading h2{font-size:clamp(1.25rem,2.5vw,1.5rem)}.step-number{display:grid;place-items:center;width:34px;height:34px;flex:none;border-radius:50%;background:linear-gradient(145deg,var(--purple),#9c43db);color:#fff;font-weight:800}.help-button{display:inline-grid;place-items:center;vertical-align:middle;width:18px;height:18px;padding:0;border:1px solid #9ab1d8;border-radius:50%;background:#f5f8fd;color:var(--blue);font-size:.7rem;font-weight:800}.mode-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem}.mode-option{position:relative;display:flex;gap:.65rem;align-items:flex-start;padding:1rem;border:1px solid #d8e0ec;border-radius:14px;background:#fff;cursor:pointer}.mode-option:has(input:checked){border-color:#5684dc;background:var(--blue-weak);box-shadow:inset 0 0 0 1px #5684dc}.mode-option input{width:18px;min-height:18px;margin:.17rem 0 0;accent-color:var(--blue)}.mode-option strong,.mode-option small{display:block}.mode-option small{margin-top:.18rem;color:var(--muted);font-size:.78rem;line-height:1.35}.date-fields{display:flex;gap:1rem;max-width:520px;margin-top:1rem}.date-fields label{flex:1}.news-controls{display:flex;align-items:end;flex-wrap:wrap;gap:.75rem;margin-top:1rem}.news-controls label{width:160px}.news-controls input{min-height:44px}.notice-list{display:grid;gap:.55rem;margin:1rem 0}.notice-list p{margin:0;padding:.75rem .85rem;border-left:4px solid var(--yellow);border-radius:0 10px 10px 0;background:var(--yellow-weak);color:#6f5212;font-size:.88rem}.news-list{display:grid;gap:1rem;margin-top:1rem}.empty-state{padding:1.5rem;border:1px dashed #c7d2e5;border-radius:14px;background:#fafcff;color:var(--muted);text-align:center}.news-card{overflow:hidden;border:1px solid #d9e2ef;border-radius:16px;background:#fff}.news-card.selected{border-color:#5c8ce2;box-shadow:0 0 0 2px rgba(76,132,224,.13)}.news-card-top{display:grid;grid-template-columns:auto minmax(100px,160px) minmax(0,1fr);gap:1rem;padding:1rem}.news-check{width:20px;min-height:20px;margin-top:.3rem;accent-color:var(--blue)}.news-thumb{width:100%;height:auto;max-height:125px;object-fit:contain;align-self:start;border-radius:10px;background:#f0f4fb}.news-copy{min-width:0}.meta-line{margin:0 0 .35rem;color:var(--muted);font-size:.76rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em}.recommendation-chip{display:inline-block;margin:0 0 .5rem;padding:.2rem .5rem;border-radius:99px;background:var(--green-weak);color:var(--green);font-size:.75rem;font-weight:750}.news-copy h3{margin:0 0 .4rem;font-size:1.03rem;line-height:1.28}.news-copy p{margin:0;color:#536077;font-size:.91rem}.news-card-actions{display:flex;gap:.5rem;flex-wrap:wrap;padding:0 1rem 1rem 3.25rem}.manual-editor{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem;padding:1rem;border-top:1px solid #e3e9f2;background:#fbfcff}.manual-editor label{display:grid;gap:.3rem;font-size:.82rem;font-weight:700;color:#45516a}.manual-editor label:first-child,.manual-editor label:nth-child(2){grid-column:span 2}.manual-editor textarea{min-height:86px}.missing-fields{margin:0 1rem 1rem 3.25rem;padding:.65rem .75rem;border-radius:9px;background:var(--yellow-weak);color:#72560f;font-size:.82rem}.load-more{display:block;margin:1rem auto 0}.profile-note{margin:-.3rem 0 1rem;color:var(--muted);font-size:.86rem}.profile-note strong{color:var(--ink)}.content-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.content-fields label:first-child{grid-column:span 2}.output-choice{display:flex;align-items:center;flex-wrap:wrap;gap:.75rem 1.2rem;margin:1.25rem 0 0;padding:1rem;border:1px solid var(--line);border-radius:13px}.output-choice legend{padding:0 .35rem;font-weight:800}.output-choice label{display:flex;align-items:center;gap:.45rem;font-size:.9rem}.output-choice input{width:18px;min-height:18px;accent-color:var(--blue)}.generate-button{margin-top:1rem}.results-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}.result-card{overflow:hidden;border:1px solid #dce4ef;border-radius:15px}.result-card header{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.9rem 1rem;background:#f9fbff;border-bottom:1px solid #dce4ef}.result-card h3{margin:0;font-size:1rem}.result-actions{display:flex;gap:.45rem;flex-wrap:wrap}.result-card textarea{display:block;width:100%;height:320px;border:0;border-radius:0;padding:1rem;background:#fff;color:#2e374a;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:.75rem;line-height:1.45}.result-card pre{height:320px;overflow:auto;margin:0;padding:1rem;white-space:pre-wrap;background:#fff;color:#2e374a;font-size:.85rem}.dialog{width:min(680px,calc(100% - 1.5rem));max-height:min(88svh,950px);padding:0;border:1px solid var(--line);border-radius:20px;box-shadow:var(--shadow);color:var(--ink)}.wide-dialog{width:min(1020px,calc(100% - 1.5rem))}.dialog::backdrop{background:rgba(24,32,50,.43);backdrop-filter:blur(3px)}.dialog-head{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;padding:1.2rem 1.3rem;border-bottom:1px solid var(--line);background:#fcfdff}.dialog-copy{margin:1rem 1.3rem;color:var(--muted)}.dialog>form{padding:1.2rem 1.3rem 1.4rem}.manager-body{padding:0 1.3rem 1.4rem}.manager-toolbar{display:flex;justify-content:space-between;gap:.75rem;align-items:center;margin:1rem 0}.manager-list{display:grid;gap:.75rem}.manager-card{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem;border:1px solid #dce4ef;border-radius:13px;background:#fff}.manager-card h3{margin:0;font-size:1rem}.manager-card p{margin:.25rem 0 0;color:var(--muted);font-size:.83rem;word-break:break-word}.manager-actions{display:flex;gap:.45rem;flex-wrap:wrap;justify-content:end}.badge{display:inline-block;margin-left:.35rem;padding:.16rem .46rem;border-radius:99px;background:var(--purple-weak);color:var(--purple);font-size:.7rem;font-weight:800}.profile-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;padding:1.2rem 0}.profile-form label,.social-row label,.user-form label{display:grid;gap:.35rem;font-size:.88rem;font-weight:700;color:#3f4a60}.profile-form .full,.profile-form .form-actions,.profile-form .source-message,.profile-form .socials-editor{grid-column:span 2}.source-detect{display:flex;gap:.6rem;align-items:end}.source-detect label{flex:1}.source-message{margin:0;padding:.7rem .8rem;border-radius:10px;background:var(--blue-weak);color:#33548a;font-size:.86rem}.socials-editor{display:grid;gap:.55rem}.socials-editor>strong{font-size:.9rem}.social-row{display:grid;grid-template-columns:1fr 2fr auto;gap:.55rem;align-items:end}.form-actions{display:flex;gap:.65rem;flex-wrap:wrap;margin-top:.2rem}.danger{color:#9d2640!important;border-color:#efb8c4!important}.admin-tabs{display:flex;gap:.55rem;padding:0 1.3rem;border-bottom:1px solid var(--line)}.admin-tabs button{border:0;border-bottom:3px solid transparent;background:transparent;padding:.7rem .35rem;color:var(--muted);font-weight:750}.admin-tabs button.active{border-color:var(--blue);color:var(--blue)}.user-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem;padding:1rem;border:1px solid var(--line);border-radius:13px;background:#fbfcff}.user-form .full{grid-column:span 2}.preview-dialog{width:min(1000px,calc(100% - 1.5rem))}.preview-actions{display:flex;gap:.45rem;align-items:center}.preview-frame-wrap{width:min(100%,800px);height:min(72svh,760px);margin:1rem auto;background:#e8edf6;transition:width .2s ease}.preview-frame-wrap.mobile{width:min(100%,430px)}#preview-frame{display:block;width:100%;height:100%;border:0;background:#fff}.toast{position:fixed;z-index:80;right:1rem;bottom:1rem;max-width:min(420px,calc(100% - 2rem));padding:.85rem 1rem;border-radius:12px;background:#27334c;color:#fff;box-shadow:var(--shadow);font-size:.9rem}.toast.error{background:#9a2743}
@media(max-width:760px){.app-header{align-items:flex-start;padding:.7rem 1rem}.brand-mark{width:34px;height:34px}.header-actions{justify-content:flex-end;flex-wrap:wrap}.profile-picker{order:3;width:100%;min-width:220px}.header-actions [data-admin-only]{font-size:.78rem}.status-strip{padding:.5rem 1rem;flex-direction:column;gap:.15rem}.workspace{padding:0 1rem 2rem}.mode-grid,.content-fields,.results-grid{grid-template-columns:1fr}.date-fields{flex-direction:column;gap:.75rem}.content-fields label:first-child{grid-column:span 1}.news-card-top{grid-template-columns:auto minmax(0,1fr);gap:.7rem}.news-thumb{grid-column:2;width:min(100%,300px);max-height:190px}.news-copy{grid-column:2}.news-card-actions,.missing-fields{margin-left:1rem}.manual-editor{grid-template-columns:1fr}.manual-editor label:first-child,.manual-editor label:nth-child(2){grid-column:span 1}.profile-form,.user-form{grid-template-columns:1fr}.profile-form .full,.profile-form .form-actions,.profile-form .source-message,.profile-form .socials-editor,.user-form .full{grid-column:span 1}.source-detect{align-items:stretch;flex-direction:column}.social-row{grid-template-columns:1fr}.manager-card{align-items:flex-start;flex-direction:column}.manager-actions{justify-content:start}.dialog{max-height:92svh}.preview-dialog{width:calc(100% - .75rem)}.output-choice{align-items:flex-start;flex-direction:column;gap:.55rem}.result-card textarea,.result-card pre{height:260px}}
@media(max-width:440px){.app-header{gap:.5rem}.brand strong{font-size:.89rem}.brand span{font-size:.69rem}.header-actions{gap:.35rem}.icon-button{width:36px;height:36px}.header-actions [data-admin-only]{padding:.4rem .5rem}.step-card{padding:1rem;border-radius:14px}.news-controls>*{width:100%!important}.news-controls label{width:100%}.news-controls .button,.news-controls .primary-button{width:100%}.result-card header{align-items:flex-start;flex-direction:column}.profile-picker{min-width:0}.auth-card{border-radius:18px}}
.is-screen-hidden{display:none!important}.recommendation-banner{margin:0;padding:.62rem 1rem;background:var(--green-weak);border-bottom:1px solid #c8e8d8;color:var(--green);font-size:.82rem;font-weight:800}
.button-link{display:inline-flex;align-items:center;justify-content:center;text-decoration:none}.app-version,.semantic-version{margin:.25rem 0 0!important;color:var(--purple)!important;font-size:.82rem!important;font-weight:750;letter-spacing:.025em}.manager-hint{display:block;margin-top:.18rem;color:var(--muted);font-size:.77rem;font-weight:400;line-height:1.35}.feedback-card{align-items:flex-start}.feedback-message{max-width:760px;margin:.65rem 0 0!important;white-space:pre-wrap;color:#39445a!important;font-size:.91rem!important}.feedback-page{min-height:100svh;padding:clamp(1rem,4vw,3rem);background:radial-gradient(circle at 15% 15%,#eaf5ff 0,transparent 26rem),radial-gradient(circle at 86% 82%,#f3edff 0,transparent 28rem),var(--page)}.feedback-page-inner{width:min(100%,720px);margin:auto}.feedback-page-header{display:flex;align-items:center;gap:.8rem;margin-bottom:1.15rem}.feedback-page-header img{width:48px;height:48px;object-fit:contain}.feedback-page-header a{display:flex;align-items:center;gap:.8rem;color:var(--ink);text-decoration:none}.feedback-page-header strong,.feedback-page-header span{display:block}.feedback-page-header span{color:var(--muted);font-size:.8rem}.feedback-card-panel{padding:clamp(1.25rem,4vw,2.25rem)}.feedback-card-panel h1{margin:0;color:var(--ink);line-height:1.18}.feedback-card-panel>p{color:var(--muted)}.feedback-form{display:grid;gap:1rem;margin-top:1.35rem}.feedback-form label{display:grid;gap:.4rem;font-size:.9rem;font-weight:700;color:#3a4355}.feedback-status{margin:0;padding:.78rem .9rem;border-radius:10px;background:var(--green-weak);color:var(--green);font-size:.9rem}.feedback-status.error{background:var(--red-weak);color:#951f3a}
@media(max-width:760px){.header-actions [data-editor-only]{font-size:.78rem}.feedback-page{padding:1rem}.feedback-page-header{margin-bottom:.85rem}.feedback-card-panel{border-radius:16px}}

/* Permite que el selector y la marca se reduzcan con seguridad en pantallas intermedias. */
.app-header>*{min-width:0}.brand>div{min-width:0}.profile-picker{min-width:0}.profile-picker select{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.header-action-label{display:none}

/* El encabezado se apila antes de que sus acciones puedan desbordar la pantalla.
   Así se evita que el selector de perfil o las acciones queden fuera del viewport. */
@media (max-width:900px){
  .app-header{display:grid;grid-template-columns:minmax(0,1fr);align-items:stretch;justify-content:stretch;gap:.75rem;min-height:0;padding-top:max(.75rem,env(safe-area-inset-top));padding-right:max(1rem,env(safe-area-inset-right));padding-bottom:.75rem;padding-left:max(1rem,env(safe-area-inset-left))}
  .brand{width:100%}.brand>div{min-width:0}.brand strong,.brand span{white-space:normal;overflow-wrap:anywhere}.brand strong{font-size:clamp(.95rem,4.2vw,1.05rem);line-height:1.16}.brand span{margin-top:.12rem;font-size:.76rem;line-height:1.2}
  .header-actions{display:grid;width:100%;min-width:0;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:.55rem}.header-actions>*{min-width:0}
  .profile-picker{grid-column:1 / -1;order:initial;width:100%;min-width:0}.profile-picker select{min-height:46px;padding:.6rem 2.15rem .6rem .7rem;font-size:.9rem}
  .header-actions>.button,.header-actions>.button-link{display:inline-flex;width:100%;min-height:46px;align-items:center;justify-content:center;padding:.6rem .65rem;line-height:1.2;text-align:center;white-space:normal}
  .header-actions>.header-account-action{display:inline-flex;width:100%;height:46px;min-height:46px;align-items:center;justify-content:center;gap:.45rem;padding:.55rem .65rem;font-size:1rem}.header-action-label{display:inline;font-size:.84rem;font-weight:750;line-height:1.1}
}
@media (max-width:390px){
  .app-header{gap:.6rem}.brand-mark{width:32px;height:32px}.header-actions{gap:.5rem}.header-actions>.button,.header-actions>.button-link{padding:.55rem .45rem;font-size:.82rem}.header-actions>.header-account-action{padding:.55rem .45rem}.header-action-label{font-size:.8rem}
}
