/* Identidad fija, escala de espacios y controles compartidos. */
:root,:root[data-theme="dark"]{color-scheme:dark;--bg:#091122;--ink:#e6e9f0;--mut:#adbad0;--gold:#f0b323;--gold2:#f0b323;--ember:#fa9b89;--card:#111d38;--line:#435a80;--dot:#f0b32308;--h1:#f0b323;--h1sh:#02060f;--btnb:#d5a02b;--shadow:#030914;--focus:#f0b323;--page-width:1680px;--page-pad:clamp(20px,4.5vw,80px);--section-space:clamp(32px,4vw,60px);--card-space:clamp(22px,2.5vw,32px);--action-gap:14px}
body{background:var(--bg) radial-gradient(var(--dot) 1px,transparent 1.5px) 0 0/18px 18px;color:var(--ink)}.wrap{max-width:var(--page-width);padding-left:var(--page-pad);padding-right:var(--page-pad)}.sec{padding-top:var(--section-space);padding-bottom:var(--section-space)}
:is(.cards,.chars,.acgrid,.ff-grid,.ep-work-grid,.ep-photo-grid,.ep-pages,.studio-columns,.studio-pages,.char-admin-grid){gap:clamp(20px,2.3vw,32px)}
:is(.panel,.studio-box,.ep-work,.ep-photo,.ep-page,.contact-section,.ff-box,.ff-card){border-color:var(--line);border-radius:8px;box-shadow:0 7px 24px #02060f35}
:is(.studio-box,.ep-work,.ep-page,.contact-section,.ff-box,.acp){padding:var(--card-space)}
:is(.cta,.acta,.rowbtn,.ep-actions,.studio-form-actions,.studio-security-actions,.studio-card-actions,.char-admin-actions,.ff-editor-actions,.ifc-dialog-actions){display:flex;align-items:center;flex-wrap:wrap;gap:var(--action-gap)}
:is(.rowbtn,.ep-actions,.studio-form-actions,.studio-security-actions,.ff-editor-actions){margin-top:24px}
:is(.btn,.studio-primary,.studio-secondary,.ep-actions button,.ep-actions a,.char-admin-actions button,.ff-editor-actions button,.ifc-dialog-actions button,.photo-upload){min-height:50px;padding:12px 20px;border-radius:6px;font:600 21px/1.3 "Barlow Condensed",Arial,sans-serif;letter-spacing:.025em;white-space:normal;display:inline-flex;align-items:center;justify-content:center;text-align:center;box-sizing:border-box}
:is(.btn,.studio-primary){background:#f0b323;color:#0c1730;border:1px solid #d5a02b;box-shadow:3px 3px 0 #02060f}
:is(.btn.alt,.studio-secondary,.ep-actions button,.ep-actions a,.char-admin-actions button){background:#172743;color:#edf2fb;border:1px solid #647da5}.ep-actions .studio-primary{background:#f0b323;color:#0c1730;border-color:#d5a02b}
:is(.btn.alt,.studio-secondary,.ep-actions button,.ep-actions a):hover{border-color:#f0b323;background:#203452}:is(.btn,.studio-primary):not(.alt):hover{background:#ffcb4e;color:#0c1730}:is(.ep-actions .ep-danger,.char-admin-actions .char-delete){color:#ffb4a5;border-color:#a56d66}
:is(.btn,.studio-primary,.studio-secondary,button,input,textarea,a):focus-visible{outline:3px solid #f0b323;outline-offset:4px}
.studio-mode{--mut:#adbad0;--line:#435a80}.studio-mode .studio-main{background:radial-gradient(ellipse at 90% 0%,#f0b32308,transparent 48%),#0b1427}.studio-workspace{padding-top:var(--section-space);padding-bottom:var(--section-space)}
.studio-topbar{gap:24px;padding-top:18px;padding-bottom:18px;height:auto;min-height:96px}.studio-topbar .studio-user{margin-left:auto}:is(.studio-user-avatar,.studio-profile-avatar){position:relative;overflow:hidden;flex-shrink:0}.studio-user-avatar img,.studio-profile-avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.ep-heading{margin-bottom:32px}.ep-stats{gap:20px;margin:32px 0 40px}.ep-work-grid+.ep-actions{margin-top:32px}.ep-preview-banner{margin-bottom:32px}.studio-publish{padding-top:18px;padding-bottom:18px}.studio-publish .pubbar{gap:18px;flex-wrap:wrap}.studio-publish .pbtns{display:flex;gap:14px;flex-wrap:wrap}
/* Navegación centrada y cuenta separada. */
.top>.wrap{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:16px;align-items:center}.top .brand{grid-column:1;grid-row:1;justify-self:start}.top .brand span{font-size:1.55rem}.top .brand img{border-radius:8px}
.top nav{grid-column:2;grid-row:1;min-width:0;justify-content:safe center;max-width:100%;width:auto;overflow-x:auto;gap:16px;padding:10px 0;scrollbar-width:none}.top nav a{font-size:1.1rem;flex:0 0 auto;white-space:nowrap}
.top .header-actions{grid-column:3;grid-row:1;justify-self:end;display:flex;align-items:center;gap:14px;min-width:0}.top .header-actions .search{width:170px;min-width:0}.top .search input{width:100%;min-width:0;min-height:44px;border:1px solid #526b95;border-radius:6px}.top .header-actions .acct{flex:0 0 auto}.top .authbtn{min-height:44px;padding:8px 16px;font-size:18px}.theme-toggle,[data-th]{display:none!important}
/* Foto de perfil: vista previa y guardado explícito. */
.profile-photo-editor{width:100%;margin:0 0 30px;padding:24px;background:#0c172d;border:1px solid #435a80;border-radius:8px;min-width:0}.profile-photo-editor h3{font:700 28px/1.2 "Barlow Condensed",Arial,sans-serif;margin:0 0 12px;color:#f0b323}.profile-photo-editor>p{font-size:16px;line-height:1.7;color:#adbad0;margin:0 0 20px}
.photo-editor-content{display:flex;gap:24px;align-items:center;flex-wrap:wrap}.photo-preview{display:grid;place-items:center;width:104px;height:104px;border-radius:50%;overflow:hidden;background:#203452;border:2px solid #d5a02b;font:700 35px "Barlow Condensed",sans-serif;flex:0 0 104px;color:#f0b323}.photo-preview img{width:100%;height:100%;object-fit:cover}.photo-editor-actions{display:flex;align-items:center;flex-wrap:wrap;gap:14px;flex:1;min-width:0}.photo-upload{position:relative;overflow:hidden;cursor:pointer;background:#172743;color:#edf2fb;border:1px solid #647da5;margin:0!important}.photo-upload input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}.photo-upload:focus-within{outline:3px solid #f0b323;outline-offset:4px}.photo-upload:has(input:disabled){opacity:.5;cursor:wait}.profile-photo-editor button:disabled{opacity:.5;cursor:not-allowed}.photo-status{font:16px/1.7 "Source Serif 4",Georgia,serif;color:#b9d4ea;margin:18px 0 0!important;overflow-wrap:anywhere}.photo-status:empty{display:none}.photo-status[data-error=true]{color:#ffb4a5}.photo-account-card.profile-photo-editor{margin:0;background:#111d38;padding:var(--card-space)}
.account-action-page{font-family:Arial,Helvetica,sans-serif}.account-action-page header a{margin-left:0}.account-action-page .primary{min-height:50px;border-radius:6px}
@media(max-width:1599px){.top>.wrap{grid-template-columns:minmax(0,1fr) auto;gap:12px}.top .brand{grid-column:1;grid-row:1}.top .header-actions{grid-column:2;grid-row:1}.top nav{grid-column:1/-1;grid-row:2;width:100%}}
@media(max-width:650px){.top>.wrap{gap:10px;padding-left:18px;padding-right:18px}.top .brand{min-width:0;gap:9px}.top .brand img{width:34px;height:34px}.top .brand span{font-size:1.05rem;line-height:1.15;white-space:normal}.top .header-actions{gap:12px}.top .header-actions .search{width:90px}.top .header-actions .acct{width:40px}.top .search input{font-size:14px;padding:8px}.top nav{padding:8px 0}.top nav a{font-size:1.05rem}.studio-topbar{gap:14px;min-height:90px}.studio-topbar>div>b{font-size:25px}.studio-user{max-width:100%}.profile-photo-editor{padding:20px}.photo-editor-content{gap:20px}.photo-editor-actions{flex-basis:100%}.photo-editor-actions>*{flex:1 1 130px}.ep-stats{gap:16px}.ep-actions>*{flex:1 1 auto}.ifc-dialog-actions button{flex:1 1 130px}}
.account-action-page .card{background:var(--card);border-color:var(--line);border-top-color:var(--gold2);border-radius:8px;padding:var(--card-space)}.account-action-page :is(p,footer,.back){color:var(--mut)}.account-action-page :is(.eyebrow,.signature){color:var(--gold)}
.studio-sidebar{overflow-y:auto;overscroll-behavior:contain}.studio-sidebar-bottom{flex-shrink:0}
/* El espacio de la barra se reserva incluso en secciones cortas y con ventanas abiertas. */
html{scrollbar-gutter:stable}
html:has(dialog[open]){overflow-y:hidden;overscroll-behavior:none}
@supports not (scrollbar-gutter:stable){html{overflow-y:scroll}}
/* Barras de desplazamiento de Inefable: mismo ancho y contraste en toda la web. */
:root{--scroll-track:#0a1426;--scroll-thumb:#bd9140;--scroll-thumb-active:#f0b323}
html,body *{scrollbar-color:var(--scroll-thumb) var(--scroll-track)}
::-webkit-scrollbar{width:12px;height:12px}
::-webkit-scrollbar-track{background:var(--scroll-track);border-radius:8px}
::-webkit-scrollbar-thumb{background:var(--scroll-thumb);border:3px solid var(--scroll-track);border-radius:8px;min-height:36px}
::-webkit-scrollbar-thumb:hover,::-webkit-scrollbar-thumb:active{background:var(--scroll-thumb-active)}
::-webkit-scrollbar-corner{background:var(--scroll-track)}
@media(forced-colors:active){html,body *{scrollbar-color:auto}::-webkit-scrollbar-thumb{background:ButtonText;border-color:Canvas}::-webkit-scrollbar-track,::-webkit-scrollbar-corner{background:Canvas}}

/* Selector de portada con previsualización y acción táctil. */
.adm .cover-upload{display:grid;grid-template-columns:112px minmax(0,1fr);gap:24px;align-items:center;padding:22px;border:1px solid #435a80;border-radius:12px;background:#0b162b;margin-block:24px}
.cover-upload-preview{aspect-ratio:2/3;display:grid;place-items:center;background:#071020;border:1px solid #526b95;border-radius:8px;overflow:hidden;color:#adbad0;font-size:14px;text-align:center}
.cover-upload-preview img{display:block;width:100%;height:100%;object-fit:cover}.cover-upload-preview [hidden]{display:none}
.adm .cover-upload-content{min-width:0}.adm .cover-upload h3{margin:0 0 8px;font-size:25px}.adm .cover-upload p{margin:0 0 16px;color:#bdcbe0;font:16px/1.5 "Source Serif 4",Georgia,serif}
.adm label.cover-upload-button{position:relative;display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:10px 20px;border:1px solid #d5a02b;border-radius:8px;background:#f0b323;color:#0c1730;font:600 20px/1.3 "Barlow Condensed",Arial,sans-serif;cursor:pointer;overflow:hidden;margin:0 0 12px;box-sizing:border-box}
.adm .cover-upload-button input[type=file]{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;margin:0;padding:0}.cover-upload-button:focus-within{outline:3px solid #f4c455;outline-offset:4px}.cover-upload-button:hover{background:#ffcb4e}
.adm #cover-upload-status{font-size:14px;margin:0 0 8px;overflow-wrap:anywhere}.cover-upload-content small{display:block;color:#adbad0;font:13px/1.5 "Source Serif 4",Georgia,serif}
@media(max-width:540px){.adm .cover-upload{grid-template-columns:80px minmax(0,1fr);gap:16px;padding:16px}.adm .cover-upload h3{font-size:23px}.adm .cover-upload p{font-size:14px}.adm label.cover-upload-button{width:100%;font-size:18px;padding-inline:12px}}
@media(max-width:360px){.adm .cover-upload{grid-template-columns:1fr}.cover-upload-preview{width:96px}.adm label.cover-upload-button{width:100%}}
.profile-photo-editor [hidden]{display:none!important}

