/* Isolated InkMotion Animated Emotion Story Maker skin; no shared tool changes. */
body[data-im-page="emotion-story-maker"] .iq-editor{box-sizing:border-box}
body[data-im-page="emotion-story-maker"] .iq-preview-col{min-width:0}
body[data-im-page="emotion-story-maker"] .iq-preview-card{width:100%}
body[data-im-page="emotion-story-maker"] .iq-stage{min-height:365px}
body[data-im-page="emotion-story-maker"] .iq-canvas-frame{width:min(100%,335px);aspect-ratio:9/16;overflow:hidden}
body[data-im-page="emotion-story-maker"] .iq-canvas-frame[data-ratio="1:1"]{width:min(100%,425px);aspect-ratio:1}
body[data-im-page="emotion-story-maker"] .iq-canvas-frame[data-ratio="16:9"]{width:min(100%,525px);aspect-ratio:16/9}
body[data-im-page="emotion-story-maker"] .iq-canvas-frame canvas{display:block;width:100%;height:100%;object-fit:contain}
body[data-im-page="emotion-story-maker"] .iq-controls input:not([type="file"]):not([type="checkbox"]):not([type="color"]),body[data-im-page="emotion-story-maker"] .iq-controls select,body[data-im-page="emotion-story-maker"] .iq-controls textarea{width:100%;min-width:0;box-sizing:border-box;border:1px solid #dce2f0;border-radius:9px;background:#fbfcff;color:#273351;padding:9px 10px;font-size:12px;line-height:1.45}
body[data-im-page="emotion-story-maker"] .iq-controls textarea{resize:vertical}
body[data-im-page="emotion-story-maker"] .iq-controls label{font-weight:800;font-size:11px;color:#465074}
body[data-im-page="emotion-story-maker"] .iq-label-space{display:block;margin:13px 0 6px}
body[data-im-page="emotion-story-maker"] .es-two,body[data-im-page="emotion-story-maker"] .es-form-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:9px;margin:8px 0}
body[data-im-page="emotion-story-maker"] .es-form-row>div{min-width:0}
body[data-im-page="emotion-story-maker"] .es-form-row label{display:block;margin-bottom:5px}
body[data-im-page="emotion-story-maker"] .es-file{position:relative;min-height:46px;overflow:hidden}
body[data-im-page="emotion-story-maker"] .es-file>span:first-child{overflow-wrap:anywhere}
body[data-im-page="emotion-story-maker"] .es-file input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
body[data-im-page="emotion-story-maker"] .es-small{width:100%;min-height:34px;margin-top:8px;padding:7px;font-size:11px}
body[data-im-page="emotion-story-maker"] .es-style-grid .iq-style-art{font-size:22px;font-weight:800;letter-spacing:.02em}
body[data-im-page="emotion-story-maker"] .es-t-bed{background:linear-gradient(120deg,#252537,#676678);color:#fff}
body[data-im-page="emotion-story-maker"] .es-t-rain{background:linear-gradient(135deg,#354b61,#a2b5c7);color:#fff}
body[data-im-page="emotion-story-maker"] .es-t-bench{background:linear-gradient(130deg,#1a2031,#6b7d90);color:#fff}
body[data-im-page="emotion-story-maker"] .es-t-phone{background:linear-gradient(130deg,#27242c,#af9eb2);color:#fff}
body[data-im-page="emotion-story-maker"] .es-t-desk{background:linear-gradient(135deg,#493e3d,#d3bba7);color:#fff}
body[data-im-page="emotion-story-maker"] .es-t-walk{background:linear-gradient(135deg,#141826,#5f6f94);color:#fff}
body[data-im-page="emotion-story-maker"] .es-timeline-help{border-radius:9px;border:1px solid #eee7ff;background:#faf7ff;color:#665b86;font-size:11px;line-height:1.5;padding:10px;margin-bottom:9px}
body[data-im-page="emotion-story-maker"] .es-timing-list{display:grid;gap:7px}
body[data-im-page="emotion-story-maker"] .es-timing-item{display:grid;grid-template-columns:minmax(0,1fr) 70px;gap:9px;align-items:center;background:#fcfcff;border:1px solid #e7e4f2;border-radius:10px;padding:9px}
body[data-im-page="emotion-story-maker"] .es-timing-item>div{min-width:0}
body[data-im-page="emotion-story-maker"] .es-timing-item strong{display:block;font-size:11px;color:#44395d}
body[data-im-page="emotion-story-maker"] .es-timing-item small{font-size:10px;color:#818298;display:block}
body[data-im-page="emotion-story-maker"] .es-timing-item input{text-align:center;padding:7px 3px!important}
body[data-im-page="emotion-story-maker"] .es-summary{display:flex;justify-content:space-between;padding:11px 2px 9px;color:#6c6690;font-size:11px}
body[data-im-page="emotion-story-maker"] .es-summary strong{color:#6644d6;font-size:13px}
body[data-im-page="emotion-story-maker"] .es-check{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 0;border-bottom:1px solid #eeeef6}
body[data-im-page="emotion-story-maker"] .es-check input{accent-color:#7154dd;width:17px;height:17px}
body[data-im-page="emotion-story-maker"] .iq-selects{margin:10px 0}
body[data-im-page="emotion-story-maker"] .iq-editor-header{background:#fafaff}
body[data-im-page="emotion-story-maker"] [hidden]{display:none!important}
body[data-im-page="emotion-story-maker"] .es-progress{padding:0 18px 10px}
body[data-im-page="emotion-story-maker"] .es-progress-track{height:7px;border-radius:99px;overflow:hidden;background:#eae6f6}
body[data-im-page="emotion-story-maker"] #progressFill{display:block;height:100%;width:0;background:#7559d7}
body[data-im-page="emotion-story-maker"] .es-progress small{font-size:11px;color:#655688}
body[data-im-page="emotion-story-maker"] .es-mobile-tabs{display:none}
body[data-im-page="emotion-story-maker"] .es-notice{position:fixed;top:76px;left:50%;transform:translateX(-50%);width:min(92vw,440px);border-radius:13px;padding:12px 14px;background:#362850;color:white;font-size:12px;font-weight:700;line-height:1.5;box-shadow:0 12px 36px #1b103d55;z-index:999999;pointer-events:none}
body[data-im-page="emotion-story-maker"] .es-notice.error{background:#9e304b}
@media(min-width:1161px){
body[data-im-page="emotion-story-maker"] .iq-editor{width:min(1490px,calc(100% - 38px));max-width:none;padding:0}
body[data-im-page="emotion-story-maker"] .iq-workspace{display:grid!important;grid-template-columns:minmax(210px,.88fr) minmax(320px,1.48fr) minmax(210px,.88fr)!important}
body[data-im-page="emotion-story-maker"] .iq-controls{display:contents!important}
body[data-im-page="emotion-story-maker"] .iq-controls>.iq-panel:nth-of-type(1){grid-column:1;grid-row:1}
body[data-im-page="emotion-story-maker"] .iq-controls>.iq-panel:nth-of-type(2){grid-column:1;grid-row:2}
body[data-im-page="emotion-story-maker"] .iq-controls>.iq-panel:nth-of-type(3){grid-column:3;grid-row:1}
body[data-im-page="emotion-story-maker"] .iq-controls>.iq-panel:nth-of-type(4){grid-column:3;grid-row:2}
body[data-im-page="emotion-story-maker"] .iq-preview-col{grid-column:2;grid-row:1/span 6}
body[data-im-page="emotion-story-maker"] .iq-canvas-frame{height:min(55dvh,580px);max-height:min(55dvh,580px);width:auto!important;max-width:100%;margin:auto}
body[data-im-page="emotion-story-maker"] .iq-canvas-frame[data-ratio="1:1"]{height:min(43dvh,470px)}
body[data-im-page="emotion-story-maker"] .iq-canvas-frame[data-ratio="16:9"]{height:auto;width:100%!important;max-width:525px;max-height:none}
}
@media(max-width:1160px){
body[data-im-page="emotion-story-maker"] .iq-editor{width:calc(100% - 26px);max-width:900px;padding:0}
body[data-im-page="emotion-story-maker"] .iq-editor-header{display:none}
body[data-im-page="emotion-story-maker"] .iq-workspace{display:flex!important;flex-direction:column!important;gap:0!important}
body[data-im-page="emotion-story-maker"] .iq-preview-col{order:-2!important;width:100%!important;padding:8px!important}
body[data-im-page="emotion-story-maker"] .iq-controls{display:grid!important;grid-template-columns:1fr!important;width:100%!important;gap:9px;padding:11px}
body[data-im-page="emotion-story-maker"] .iq-controls .iq-panel{height:auto!important;margin:0!important}
body[data-im-page="emotion-story-maker"] .iq-controls .iq-panel[data-im-mobile-hidden="true"]{display:none!important}
body[data-im-page="emotion-story-maker"] .es-mobile-tabs{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin:7px 9px 9px!important;padding:5px!important;border:1px solid #e6e3f2;border-radius:13px;background:#fff}
body[data-im-page="emotion-story-maker"] .es-mobile-tabs button{min-width:0;min-height:40px;border:1px solid #e1e2ee;border-radius:9px;background:#f4f5fa;color:#5d6783;padding:6px 2px;font-weight:850;font-size:11px;cursor:pointer}
body[data-im-page="emotion-story-maker"] .es-mobile-tabs button[aria-selected="true"]{background:#694bd7;color:#fff;border-color:#5c40c6;box-shadow:0 3px 8px #6545d53c}
body[data-im-page="emotion-story-maker"] .iq-stage{min-height:0!important;padding:9px!important}
body[data-im-page="emotion-story-maker"] .iq-canvas-frame{width:min(72vw,288px)!important;height:auto!important;max-height:none!important}
body[data-im-page="emotion-story-maker"] .iq-canvas-frame[data-ratio="1:1"]{width:min(84vw,420px)!important}
body[data-im-page="emotion-story-maker"] .iq-canvas-frame[data-ratio="16:9"]{width:min(100%,530px)!important}
body[data-im-page="emotion-story-maker"] .iq-canvas-frame canvas{width:100%;height:auto!important}
body[data-im-page="emotion-story-maker"] .iq-exports{padding-bottom:0!important}
body[data-im-page="emotion-story-maker"] .iq-exports+.es-mobile-tabs{margin-top:7px!important}
}
@media(max-width:700px){body[data-im-page="emotion-story-maker"] .iq-preview-col{padding:7px!important}body[data-im-page="emotion-story-maker"] .iq-stage{padding:8px!important}}

/* Cinematic Midnight Check: one polished story in the existing InkMotion panels. */
.es-hero-theme{display:grid;grid-template-columns:114px 1fr;gap:13px;padding:11px;margin:9px 0 13px;border:1px solid #e0e3f2;border-radius:14px;background:#f9f9fe;align-items:center}
.es-hero-theme-art{height:125px;border-radius:11px;position:relative;overflow:hidden;background:radial-gradient(circle at 32% 23%,#777983 0%,#2e303a 43%,#12141a 100%);box-shadow:inset 0 0 0 1px #ffffff40}
.es-hero-theme-art:after{content:'';position:absolute;left:13px;bottom:0;width:88px;height:51px;background:linear-gradient(#646773,#2f3038);border-radius:17px 17px 0 0;box-shadow:0 -4px 0 #aaa9b11c}
.es-moon{position:absolute;right:10px;top:5px;color:#c8c9d6;font-size:29px}
.es-character{position:absolute;left:27px;top:27px;background:#eee;border:4px solid #191a21;color:#222;font-size:14px;letter-spacing:-1.2px;width:64px;height:73px;border-radius:47% 48% 46% 44%;text-align:center;padding-top:20px;z-index:1}
.es-handset{position:absolute;right:9px;bottom:34px;transform:rotate(-16deg);font-size:31px;color:#c5c5cc;z-index:2}
.es-hero-theme strong{display:block;font-size:14px;color:#262639;line-height:1.3}.es-hero-theme small{display:block;color:#5a6175;margin:5px 0 7px;font-size:12px;line-height:1.5}
.es-theme-pill{display:inline-block;color:#5c4eb8;background:#eeebff;padding:5px 8px;border-radius:8px;font-size:10px;font-weight:700}
@media(max-width:470px){.es-hero-theme{grid-template-columns:82px 1fr;gap:10px}.es-hero-theme-art{height:116px}.es-character{left:13px}.es-theme-pill{font-size:9px}}

/* Keep the landing-page intro consistent with other InkMotion creators. */
.es-page .lm-container{width:min(90%,1450px);margin-inline:auto;box-sizing:border-box}
.es-page .lm-hero{display:flex;align-items:center;justify-content:space-between;gap:22px;padding:35px 0 26px}
.es-page .lm-hero>div{max-width:840px}
.es-page .lm-hero h1{font-family:Manrope,system-ui,sans-serif;font-size:clamp(28px,3.5vw,48px);letter-spacing:-.045em;line-height:1.14;color:#1e2540;margin:10px 0}
.es-page .lm-hero h1 em{font-style:normal;color:#7152dc}
.es-page .lm-hero p{font-family:DM Sans,Arial,sans-serif;color:#6a738e;font-size:14px;line-height:1.65;max-width:780px;margin:0 0 12px}
.es-page .lm-eyebrow{font-family:DM Sans,Arial,sans-serif;font-size:10px;font-weight:800;letter-spacing:.13em;color:#7357dd}
.es-page .lm-tags{display:flex;flex-wrap:wrap;gap:8px;margin-top:15px}
.es-page .lm-tags>span{font-family:DM Sans,Arial,sans-serif;border:1px solid #dedff1;padding:6px 10px;font-size:11px;color:#635d80;border-radius:99px;background:#fff}
.es-page .lm-hero-cta{border-radius:12px;background:#7354dd;color:#fff!important;padding:13px 16px;text-decoration:none;white-space:nowrap;font:700 12px DM Sans,Arial,sans-serif}
@media(max-width:700px){.es-page .lm-container{width:92%}.es-page .lm-hero{display:block;padding:22px 0 18px}.es-page .lm-hero h1{font-size:29px}.es-page .lm-hero-cta{display:inline-block;margin-top:13px}}

/* Accessible skip link stays hidden until focused (especially important on phones). */
.es-page .lm-skip{position:absolute;z-index:9999;left:8px;top:-130px;background:#fff;color:#4632ae;padding:10px 15px;border-radius:10px}
.es-page .lm-skip:focus{top:8px}
