.royal-story-composer{position:fixed;inset:0;margin:auto;box-sizing:border-box;width:min(840px,calc(100vw - 24px));max-height:calc(100dvh - 32px);padding:22px;border:1px solid #e5e8df;border-radius:24px;background:#fcfcf8;color:#173d2c;font-family:inherit;overflow:auto;box-shadow:0 24px 80px #0003}
.royal-story-composer::backdrop{background:#10261fcc;backdrop-filter:blur(5px)}
.royal-story-composer__header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}
.royal-story-composer__header h2{font-family:inherit;font-weight:700;font-size:22px;line-height:1.3;margin:0;color:#173d2c}
.royal-story-composer__close{flex:0 0 44px;width:44px;height:44px;border:1px solid #dce4d9;border-radius:50%;background:white;color:#173d2c;font-size:28px;line-height:1;cursor:pointer}
.royal-story-composer__body{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);gap:26px;align-items:start}
.royal-story-composer__preview{background:#f7f4e9;border:1px solid #e6e5da;border-radius:16px;overflow:hidden}
.royal-story-composer__preview canvas{display:block;width:100%;height:auto;aspect-ratio:9/16}
.royal-story-composer__name{font-weight:700;font-size:18px;line-height:1.45;margin:0 0 8px;overflow-wrap:anywhere}
.royal-story-composer__summary,.royal-story-composer__hint{font-size:13px;line-height:1.6;color:#5e796b;margin:0 0 20px}
.royal-story-composer__options label{display:block;margin:0 0 8px;font-size:14px;font-weight:700}
.royal-story-composer__options select{width:100%;min-height:46px;margin-bottom:14px;padding:10px 34px 10px 12px;border:1px solid #cfdacd;border-radius:12px;background:#fff;color:#173d2c;font:inherit;font-size:15px}
.royal-story-composer__options audio{display:block;width:100%;height:40px;margin-bottom:18px}
.royal-story-composer__options audio[hidden]{display:none}
.royal-story-composer__images{display:flex;gap:8px;overflow-x:auto;padding:2px 2px 10px;margin-bottom:10px}
.royal-story-composer__images img{flex:0 0 60px;width:60px;height:64px;object-fit:contain;background:#fff;border:1px solid #e0e6db;border-radius:9px}
.royal-story-composer__image-label{font-size:13px;font-weight:700;line-height:1.5;margin:4px 0 10px}
.royal-story-composer__photo{position:relative;flex:0 0 auto;padding:3px;border:2px solid transparent;border-radius:12px;background:#fff;cursor:pointer;opacity:.45}
.royal-story-composer__photo[aria-pressed=true]{border-color:#55765b;opacity:1}
.royal-story-composer__photo[aria-pressed=true]::after{content:'✓';position:absolute;right:0;bottom:0;display:grid;place-items:center;width:18px;height:18px;border-radius:50%;color:#fff;background:#245337;font-size:11px}
.royal-story-composer__create:disabled{opacity:.4;cursor:default}
.royal-story-result{width:min(460px,calc(100vw - 24px))}
.royal-story-result video{display:block;width:100%;max-height:calc(100dvh - 210px);aspect-ratio:9/16;object-fit:contain;border-radius:12px;background:#f7f4e9;margin-bottom:16px}
.royal-story-result a.royal-story-composer__create{display:block;text-align:center;text-decoration:none}
.royal-story-composer__create{min-height:48px;width:100%;border:0;border-radius:13px;padding:12px 18px;color:#fff;background:#245337;font:inherit;font-size:15px;font-weight:700;cursor:pointer}
.royal-story-composer :focus-visible{outline:3px solid #ff9633;outline-offset:3px}
@media(max-width:600px){.royal-story-composer{padding:16px;max-height:calc(100dvh - 20px)}.royal-story-composer__body{grid-template-columns:minmax(0,.8fr) minmax(0,1fr);gap:14px}.royal-story-composer__name{font-size:14px}.royal-story-composer__summary,.royal-story-composer__hint{font-size:12px;margin-bottom:12px}.royal-story-composer__options label{font-size:13px}.royal-story-composer__images img{flex-basis:44px;width:44px;height:48px}.royal-story-composer__header h2{font-size:18px}}
@media(max-width:359px){.royal-story-composer__body{grid-template-columns:1fr}.royal-story-composer__preview{width:150px;margin:auto}}
