/* McFilms Studio — usa los tokens de gallery.css */
.studio { background: var(--bg2); }
.studio .top { gap: 14px; justify-content: flex-start; }
.studio .top .linkbtn { margin-left: auto; }
.st-main { max-width: 1400px; margin: 0 auto; padding: 96px var(--gut) 120px; }
.st-muted { color: var(--ink2); font-size: 14px; }
.st-card { background: #fff; border-radius: 20px; padding: 24px; box-shadow: 0 20px 60px -40px rgba(0,0,0,.35); }
.st-login { max-width: 420px; margin: 10vh auto 0; display: grid; gap: 12px; }
.st-login .d { font-size: 48px; }

.st-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 24px; }
.st-g { display: grid; gap: 4px; padding: 0; overflow: hidden; text-align: left; }
.st-g img { width: 100%; aspect-ratio: 3/2; object-fit: cover; background: var(--line); }
.st-g div { padding: 14px 18px 18px; }
.st-g strong { font-family: var(--f-d); font-weight: 500; font-size: 26px; text-transform: uppercase; }
.badge { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--bg2); color: var(--ink2); }
.badge.pub { background: #e8f6ec; color: #136c2e; }
.badge.prev { background: #fff6d6; color: #7a5b00; }
.badge.y { background: var(--y); color: var(--ink); }

.st-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; justify-content: space-between; margin-bottom: 20px; }
.st-head .d { font-size: clamp(40px, 5vw, 64px); }
.st-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.st-tools select, .st-tools input { height: 44px; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; font: inherit; font-size: 14px; background: #fff; }
.st-tools input { width: 90px; }
.btn.sec { background: #fff; border: 1px solid var(--line); }
.btn.sec:hover { background: var(--bg2); }
.btn.sm { height: 44px; padding: 0 18px; font-size: 14px; }
.tabs { display: flex; gap: 6px; margin: 8px 0 20px; }
.tabs button { padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--ink2); }
.tabs button.on { background: var(--ink); color: #fff; }

.st-chap { margin-top: 20px; }
.st-chap h3 { display: flex; align-items: center; gap: 12px; font-family: var(--f-d); font-weight: 500; text-transform: uppercase; font-size: 28px; margin-bottom: 10px; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; min-height: 60px; padding: 6px; border-radius: 14px; background: #fff; }
.st-t { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--line); cursor: grab; touch-action: none; }
.st-t img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.st-t.hid img { opacity: .25; }
.st-t.cover { outline: 3px solid var(--y); outline-offset: -3px; }
.st-t .acts { position: absolute; inset: auto 4px 4px auto; display: flex; gap: 4px; opacity: 0; transition: opacity .2s; }
.st-t:hover .acts, .st-t:focus-within .acts { opacity: 1; }
.st-t .acts button { width: 28px; height: 28px; border-radius: 8px; background: rgba(255,255,255,.92); font-size: 13px; }
.st-t .n { position: absolute; left: 4px; top: 4px; font-size: 10px; font-weight: 600; background: rgba(0,0,0,.55); color: #fff; padding: 1px 6px; border-radius: 6px; }
.sortable-ghost { opacity: .35; }
.savebar { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 60; display: flex; gap: 10px; align-items: center; padding: 10px 10px 10px 20px; border-radius: 18px; background: var(--ink); color: #fff; box-shadow: 0 20px 60px -20px rgba(0,0,0,.5); }

table.st-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.st-table th, .st-table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); }
.st-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink2); }
.st-sel-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 6px; padding: 12px 0; }
.st-sel-photos figure { font-size: 10px; color: var(--ink2); }
.st-sel-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
@media (max-width: 719px) { .st-t .acts { opacity: 1; } .st-table .hide-m { display: none; } }
.st-bar { height: 10px; border-radius: 999px; background: var(--bg2); overflow: hidden; }
.st-bar span { display: block; height: 100%; width: 0; background: var(--y); transition: width .6s var(--ease); }
.st-head .btn.sm { align-self: center; }

.badge.bloq { background: #fde8e8; color: #9b1c1c; }
.btn.danger { background: #fff; color: #b42318; border: 1px solid #f3c4c0; }
.btn.danger:hover { background: #fde8e8; }

.st-dialog { margin: auto; border: 0; border-radius: 22px; padding: 28px; width: min(480px, calc(100% - 32px)); box-shadow: 0 40px 100px -30px rgba(0,0,0,.5); }
.st-dialog::backdrop { background: rgba(6,6,7,.55); }
.st-dialog form { display: grid; gap: 14px; }
.st-dialog .d { font-size: 36px; }
.btn.danger-solid { background: #b42318; color: #fff; }
.btn.danger-solid:hover { background: #912018; }
.st-tools input[type=checkbox] { width: 18px; height: 18px; vertical-align: middle; accent-color: var(--ink); }

.st-t.pend { display: grid; place-items: center; cursor: default; }
.st-t .pend-txt { font-size: 11px; color: var(--ink2); }
.st-t.elegida { outline: 3px solid #b42318; outline-offset: -3px; }
.st-t.elegida::after { content: '✓'; position: absolute; right: 6px; top: 4px; color: #fff; background: #b42318; border-radius: 50%; width: 20px; height: 20px; display: grid; place-items: center; font-size: 12px; }
.st-aviso { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; padding: 14px 18px; background: #fff6d6; }
.st-aviso span { flex: 1; }
.st-link { display: flex; gap: 8px; }
.st-link .field { flex: 1; min-width: 0; }
.st-ok { color: #136c2e; font-size: 14px; font-weight: 600; min-height: 1em; }
.st-dialog .field[hidden] { display: none; }

.st-area { height: auto; padding: 12px 18px; resize: vertical; font-size: 14px; }
.st-zona { border: 2px dashed var(--line); border-radius: 14px; padding: 18px; text-align: center; color: var(--ink2); font-size: 14px; }
.st-zona.on { border-color: var(--yDeep); background: #fff6d6; }
.st-grupos { display: grid; gap: 4px; max-height: 160px; overflow: auto; }
.st-grupo { display: flex; justify-content: space-between; align-items: center; font-size: 14px; padding: 6px 10px; background: var(--bg2); border-radius: 10px; }
.st-chap h3 .st-ren { font-family: inherit; font-size: 13px; text-transform: none; opacity: .5; }
.st-chap h3:hover .st-ren { opacity: 1; }
.st-pre { white-space: nowrap; align-self: center; }
.st-dialog { max-height: 92vh; overflow: auto; }

.st-t.web::before { content: '🌐'; position: absolute; left: 4px; bottom: 4px; font-size: 13px; background: rgba(255,255,255,.9); border-radius: 6px; padding: 0 3px; z-index: 1; }
.st-web-n { font-size: 14px; color: #136c2e; font-weight: 600; }
.st-pels { display: grid; gap: 12px; }
.st-pel { display: grid; grid-template-columns: minmax(180px, 320px) 1fr; gap: 18px; align-items: start; padding: 14px; }
.st-pel.hid { opacity: .55; }
.st-pel-img { position: relative; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: var(--line); display: grid; place-items: center; }
.st-pel-img img { width: 100%; height: 100%; object-fit: cover; }
.st-pel-asa { position: absolute; left: 6px; top: 6px; background: rgba(0,0,0,.6); color: #fff; border-radius: 8px; padding: 2px 8px; cursor: grab; font-size: 16px; }
.st-pel-info { display: grid; gap: 8px; }
.st-pel-info .field.ok { outline: 2px solid #136c2e; }
.st-dialog-ancho { width: min(900px, calc(100% - 32px)); }
.st-portada { padding: 0; border-radius: 6px; overflow: hidden; }
.st-portada:hover { outline: 3px solid var(--y); }
@media (max-width: 719px) { .st-pel { grid-template-columns: 1fr; } }
.st-pel-info > .btn { justify-self: start; }

/* Modo «Elegir fotos para la web» */
.badge.web { background: #e8f6ec; color: #136c2e; }
.st-modo-web { position: sticky; top: 72px; z-index: 50; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; padding: 14px 18px; border-radius: 16px; background: var(--ink); color: #fff; box-shadow: 0 20px 50px -25px rgba(0,0,0,.6); }
.st-modo-web > span:first-child { flex: 1; font-size: 14px; }
.st-web-cuenta { font-weight: 600; color: var(--y); }
body.modo-web .st-t { cursor: pointer; }
body.modo-web .st-t:not(.web) img { opacity: .55; filter: grayscale(.4); }
body.modo-web .st-t.web { outline: 4px solid #1f9d55; outline-offset: -4px; }
body.modo-web .st-t.web::before { content: '✓ En la web'; font-size: 11px; font-weight: 600; padding: 2px 8px; background: #1f9d55; color: #fff; }
body.modo-web .st-t .acts { display: none; }
