/* Mobile-first Studio V4 enhancements */
.page-graphics { position:absolute; inset:0; z-index:6; pointer-events:none; overflow:hidden; }
.page-deco { position:absolute;display:grid;place-items:center;cursor:grab;pointer-events:auto;touch-action:none;user-select:none;line-height:1;min-width:32px;min-height:32px;filter:drop-shadow(0 5px 5px #60462b37);transition:filter .15s; }
.page-deco.selected { outline:2px dashed #b28b5a; outline-offset:3px;cursor:grabbing }
.sticker--glow{ text-shadow:0 0 9px #ffec9a,0 0 18px #ffc7df; }
.sticker--medallion{ background:#fff8e4c9;border-radius:50%;box-shadow:0 3px 14px #a3694b36;border:2px solid #d4b3749c;padding:.11em }
.page-select-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:14px 0 17px}
.page-pick{font:600 12px system-ui;color:#523d51;text-align:left;background:#fff;border:1px solid #e1d9e1;border-radius:12px;padding:9px;cursor:pointer;display:flex;align-items:center;gap:7px}
.page-pick span{background:#f7edf4;border-radius:8px;min-width:25px;text-align:center;padding:6px}
.page-pick.active{background:#f1e6f4;border-color:#9d6aa5;color:#613a75}
.editor-page-title{font:700 17px/1.4 Georgia;margin:15px 0;color:#6c3c66}
.sticker-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;max-height:310px;overflow:auto;background:#fbf7f4;border-radius:13px;padding:8px;margin:10px 0 15px}
.sticker-pick{min-height:46px;font-size:25px;background:#fff;border:1px solid #eee7ed;border-radius:10px;cursor:pointer;transition:transform .14s}
.sticker-pick:active{transform:scale(.88)}
.sticker-grid .sticker--glow{box-shadow:inset 0 0 12px #fedce6}
.sticker-grid .sticker--medallion{border:2px solid #ddbd7c}
.mobile-tools{display:none}
.story-extra-panel{background:linear-gradient(160deg,var(--inv-paper),var(--inv-bg));justify-content:center}
.story-extra-panel h2{font-size:30px;max-width:90%}
.story-extra-panel .story-body{white-space:pre-wrap;max-width:88%;margin:15px auto;line-height:1.85}
@media(max-width:850px){
 .editor-top{gap:8px;padding:9px 12px;position:sticky;top:0;z-index:30}
 .editor-top .logo{font-size:13px}
 .editor-title{max-width:110px;white-space:nowrap;overflow:hidden}
 .editor-title strong{font-size:11px}
 .editor-actions{gap:4px;flex-wrap:wrap;justify-content:flex-end}
 .editor-actions .btn{padding:7px 8px;font-size:11px;min-height:34px}
 .editor-layout{display:flex;flex-direction:column}
 .editor-left{order:3;width:100%;max-width:none;border:0}
 .editor-center{order:1;max-width:none;width:100%;padding:12px 9px 4px}
 .editor-right{order:2;width:100%;max-width:none;max-height:none!important;overflow:visible!important;padding:18px 16px!important;border-radius:20px 20px 0 0;background:#fff;box-shadow:0 -6px 24px #24112b14}
 .phone-frame{margin:0 auto;max-width:340px;max-height:58vh}
 .preview-head{padding:1px 7px 8px}
 .mobile-tools{display:flex;align-items:center;justify-content:space-around;gap:4px;margin:11px auto 4px;max-width:440px;background:#fff;border:1px solid #f3ebee;border-radius:15px;padding:8px 3px;box-shadow:0 4px 16px #37232a12}
 .mobile-tools button{min-width:38px;min-height:36px;border:0;background:transparent;color:#70536e;font:600 11px system-ui;cursor:pointer;flex:1}
 .preview-hint{font-size:11px!important;padding:6px 5px 13px}
 .editor-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
 .editor-tab{padding:8px 4px!important;font-size:11px!important}
 .editor-guide{display:none}
 .sticker-grid{grid-template-columns:repeat(7,minmax(0,1fr));max-height:240px}
}
@media(prefers-reduced-motion:reduce){.page-deco{transition:none}}

.agent-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0 0 25px}
.agent-card{border:1px solid #e7dce3;border-radius:16px;background:#fff;padding:20px;display:grid;gap:9px}
.agent-card>span{font-size:29px}.agent-card strong{font:700 19px Georgia}.agent-card p{font-size:13px;color:#6d6570;margin:0}.agent-card small{font-size:11px;color:#807086}
.agent-work-panel{display:grid;grid-template-columns:1fr 1.3fr;gap:22px;align-items:start}
.agent-work-panel>div{border:1px solid #eee5eb;border-radius:17px;background:#fff;padding:24px}
.agent-work-panel h2{font:700 22px Georgia;margin:0 0 11px}
.task-list{max-height:650px;overflow:auto;display:grid;gap:9px}.task-card{display:grid;gap:9px;padding:16px;border-radius:12px;background:#f8f4f8}.task-card p{font-size:13px;margin:0;line-height:1.6;overflow-wrap:anywhere}.task-card small{color:#827883}.task-actions{display:flex;gap:8px}.task-actions button{border:1px solid #e4d7df;background:white;border-radius:8px;padding:7px 10px;font-size:11px;cursor:pointer}
@media(max-width:750px){.agent-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.agent-card{padding:13px}.agent-work-panel{grid-template-columns:1fr}.agent-work-panel>div{padding:15px}}

@media(max-width:850px){.mobile-tools{overflow-x:auto;justify-content:flex-start}.mobile-tools button{white-space:nowrap;flex:0 0 auto;padding:6px}}
