/* Magic Message Studio – on top of the website's admin.css */
.studio .studio-tag{background:linear-gradient(135deg,#FFE38A,#FFA81F);color:#1B1446;font-weight:800;font-size:.7rem;padding:.2em .6em;border-radius:999px;margin-left:-6px}
.studio .crumb{font-size:.85rem;color:var(--muted);margin-bottom:6px}.studio .crumb a{color:var(--muted)}.studio .crumb span{margin:0 4px}
.studio h3{margin:0 0 12px}
.studio textarea,.studio input,.studio select{font:inherit}
.studio .muted small,.studio small.muted{display:block;margin-top:3px;font-size:.8rem}
.spend-pill{background:#fff;border-radius:999px;padding:.45em 1em;font-weight:700;text-decoration:none;color:var(--ink);box-shadow:inset 0 0 0 2px var(--line)}
.spend-pill.hot{background:#FFF1D6;color:#A15C00}
.linkbtn{background:none;border:0;color:#5B4BFF;font:600 .85rem inherit;font-family:inherit;cursor:pointer;padding:4px 6px;text-decoration:underline}
.linkbtn.danger{color:#C1272D}
.gear{font-size:.82rem;font-weight:600;color:#5B4BFF;text-decoration:none;white-space:nowrap}
.row{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:8px}
.chk{display:inline-flex;gap:6px;align-items:center;font-size:.88rem}.chk input{width:auto}
.hint{font-size:.82rem;color:var(--muted);margin:6px 0 10px}
.wide{grid-column:1/-1}
.tight{gap:12px}
/* projects */
.pcards{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:16px}
.pcard{background:#fff;border-radius:18px;padding:14px;text-decoration:none;color:var(--ink);box-shadow:0 6px 24px -14px rgba(27,20,70,.25);display:flex;flex-direction:column;gap:4px}
.pcard small{font-size:.8rem}
.pcard.add{gap:8px;justify-content:center;border:2px dashed var(--line);box-shadow:none}
.pthumb,.ithumb{aspect-ratio:16/9;border-radius:12px;background:#0E0A2B;display:grid;place-items:center;overflow:hidden;position:relative;margin-bottom:6px;font-size:2rem}
.pthumb img,.ithumb img{width:100%;height:100%;object-fit:cover}
.icards{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:14px}
.icard{text-decoration:none;color:var(--ink);background:#faf9ff;border-radius:14px;padding:10px;display:flex;flex-direction:column}
.icard:hover{background:#f1edff}.icard small{font-size:.78rem;color:var(--muted)}
.ithumb .badge{position:absolute;left:8px;top:8px;font-style:normal;font-size:.72rem;font-weight:700;background:#fff;border-radius:999px;padding:.15em .6em;color:var(--ink)}
.ithumb .badge.run{background:#E5EDFF;color:#2a4fd6}.ithumb .badge.use{background:#DDF7EC;color:#0B7A4B}
.addrow{display:flex;gap:8px;flex-wrap:wrap}.addrow input{width:150px}
/* item page */
.item-head .kind{font-weight:700;color:var(--muted);font-size:.9rem}
.studio .name-in{font-size:1.6rem;font-weight:800;border:2px solid transparent;border-radius:12px;padding:2px 10px;width:min(320px,100%);background:transparent;color:var(--ink)}
.studio .name-in:hover,.studio .name-in:focus{border-color:var(--line);background:#fff;outline:0}
.cur summary{list-style:none;cursor:pointer;font-weight:700;font-size:.88rem;color:#5B4BFF}.cur video{width:320px;max-width:100%;border-radius:10px;margin-top:6px}
.startpic{width:100%;border-radius:12px;display:block;user-select:none;-webkit-user-drag:none}
.nopic{aspect-ratio:16/9;border-radius:12px;background:#f3f1fb;display:grid;place-items:center;color:var(--muted);font-weight:600}
.picform{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:10px}.picform select{flex:1;min-width:180px}
.filebtn{position:relative;overflow:hidden;cursor:pointer}.filebtn input{position:absolute;inset:0;opacity:0;cursor:pointer}
.librow{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:14px}.librow select{max-width:260px}
.quick{display:flex;gap:6px;margin-top:6px}.quick button{border:0;border-radius:999px;background:#f3f1fb;padding:.35em .8em;font:600 .8rem inherit;font-family:inherit;cursor:pointer}
.seg{display:flex;flex-wrap:wrap;gap:8px}.seg label{display:flex;gap:6px;align-items:center;background:#f3f1fb;border-radius:999px;padding:.4em 1em;cursor:pointer;font-weight:600}
.seg input{width:auto;margin:0}
input[type=range]{width:100%;accent-color:#6B3DFF}
/* draggable boxes over a picture */
.boxed,.mover{position:relative;touch-action:none}
.bx{position:absolute;border:2px dashed #FFC24A;background:rgba(255,194,74,.14);border-radius:6px;cursor:move;touch-action:none}
.bx span{position:absolute;left:4px;top:2px;font-size:.72rem;font-weight:700;color:#fff;text-shadow:0 1px 2px #000;pointer-events:none;white-space:nowrap}
.bx i{position:absolute;right:-8px;bottom:-8px;width:18px;height:18px;border-radius:50%;background:#FFC24A;border:2px solid #fff;cursor:nwse-resize}
.bx.mouth{border-color:#FF6B9A;background:rgba(255,107,154,.16)}.bx.mouth i{background:#FF6B9A}
.bx.ghost{border:2px solid #14C8B4;background:rgba(20,200,180,.15);background-size:cover}
.boxtabs{display:flex;gap:6px;margin-bottom:8px;flex-wrap:wrap}.boxtabs button{border:0;border-radius:999px;padding:.4em .9em;background:#f3f1fb;font:600 .82rem inherit;font-family:inherit;cursor:pointer}
.boxtabs button.on{background:var(--ink);color:#fff}
/* make */
.makeform{display:flex;flex-wrap:wrap;gap:14px;align-items:center}
.makeform .n-takes{width:auto}
.cost{flex:1;min-width:240px;font-size:.92rem}.cost-total{font-size:1.3rem}
.cost small{font-size:.8rem;color:var(--muted)}
/* takes side by side */
.takes{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:16px;margin-bottom:20px}
.take{margin:0;display:flex;flex-direction:column;gap:8px}
.take.chosen{box-shadow:0 0 0 3px #14C8B4,0 6px 24px -14px rgba(27,20,70,.25)}
.take-top{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.take-top b{flex:1}
.take video{width:100%;border-radius:12px;background:#000;aspect-ratio:16/9}
.take .meta{font-size:.78rem;color:var(--muted)}
.take .inp summary{font-size:.8rem;color:var(--muted);cursor:pointer}.take .inp p{font-size:.82rem;margin:.4em 0}
.speedrow{margin:0}.speedrow label{display:flex;gap:8px;align-items:baseline;flex-wrap:wrap}.speedrow small{display:inline!important}
.sync{border-radius:12px;padding:10px 12px;background:#f3f1fb;font-size:.9rem}
.sync.ok{background:#DDF7EC}.sync.warn{background:#FFF1D6}
.waiting{display:flex;gap:12px;align-items:center;background:#f3f1fb;border-radius:12px;padding:18px;aspect-ratio:16/9;justify-content:center;text-align:center;flex-direction:column}
.waiting p{margin:0;font-size:.88rem;color:var(--muted)}
.spin{width:34px;height:34px;border-radius:50%;border:4px solid #d8d0ff;border-top-color:#6B3DFF;animation:sp 1s linear infinite}
@keyframes sp{to{transform:rotate(360deg)}}
.st.done{background:#dcfbef;color:#0b7a5c}.st.running,.st.downloading{background:#e5edff;color:#2a4fd6}.st.deleted{background:#eee;color:#666}
/* spending */
.bar{height:12px;border-radius:999px;background:#f3f1fb;overflow:hidden;margin:16px 0 6px}.bar i{display:block;height:100%;background:linear-gradient(90deg,#14C8B4,#3A6BFF)}
.bar i.hot{background:linear-gradient(90deg,#FFA81F,#E5383B)}
table.kv td{padding:4px 8px;font-size:.84rem}table.kv td:first-child{color:var(--muted);width:150px}
/* on-page text editing */
body.st-editing [data-st-edit]{outline:2px dashed #FFC24A;outline-offset:3px;border-radius:4px;cursor:text}
body.st-editing [data-st-edit]:focus{outline-style:solid;background:#FFFBEA}
.always-edit{cursor:text;padding:4px 6px;border-radius:6px}.always-edit:hover{background:#FFFBEA}
#editToggle.on{background:#FFC24A;color:#1B1446}
.mm-live{position:fixed;right:16px;bottom:16px;background:#1B1446;color:#fff;border-radius:999px;padding:.5em 1.1em;font-weight:700;font-size:.85rem;z-index:300;box-shadow:0 10px 30px -10px rgba(0,0,0,.4)}
.mm-live.ok{background:#0B7A4B}.mm-live.bad{background:#C1272D}
.studio-auth .auth{text-align:left}
@media(max-width:800px){
 .takes{grid-template-columns:1fr}
 .studio .name-in{font-size:1.3rem;width:100%}
 .item-head{gap:6px}
 .addrow{width:100%}.addrow input{flex:1;width:auto}
 .studio .side-top .studio-tag{margin-right:auto;margin-left:8px}
 .cur video{width:100%}
 .bx i{width:24px;height:24px;right:-11px;bottom:-11px}
}
.cur summary::-webkit-details-marker{display:none}
