.scenes-drawer,.scenes-editor{box-sizing:border-box;color:#edf2ff;background:#111827;border:1px solid #36455d;box-shadow:0 20px 80px #0008;padding:24px;font-family:inherit;text-align:left;z-index:1000}
.scenes-drawer::backdrop,.scenes-editor::backdrop{background:#020617b3}
.scenes-drawer{position:fixed;inset:0 0 0 auto;margin:0;width:380px;max-width:100%;height:100dvh;max-height:100dvh;border-radius:16px 0 0 16px;overflow-y:auto}
.scenes-editor{position:fixed;inset:0;margin:auto;width:520px;height:fit-content;max-width:calc(100% - 24px);max-height:calc(100dvh - 24px);border-radius:16px;overflow-y:auto}
.scenes-header,.scenes-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.scenes-header{justify-content:space-between}
.scenes-drawer h2,.scenes-editor h2{margin:0 0 16px;font-size:1.4rem;color:#fff}.scene-card h3{margin:0 0 8px;font-size:1rem;overflow-wrap:anywhere;color:#fff}
.scenes-drawer button,.scenes-editor button,.scene-invitation button{width:auto;min-height:44px;margin:0;padding:8px 12px;border:1px solid #506580;border-radius:8px;background:#213249;color:#f3f7ff;font:inherit;cursor:pointer}
.scenes-drawer input,.scenes-editor input,.scenes-editor textarea{box-sizing:border-box;display:block;width:100%;margin:8px 0 16px;padding:12px;background:#080f1e;color:#fff;border:1px solid #506580;border-radius:8px;font:inherit}.scenes-editor textarea{resize:vertical}.scenes-editor label{display:block;margin-top:16px}
.scenes-muted{font-size:.82rem;color:#bac7dd;line-height:1.5}.scenes-status{font-size:.85rem;color:var(--text-muted,#bac7dd)}.scenes-status:empty{display:none}
.scene-card{padding:16px;margin-top:12px;border:1px solid #36455d;border-radius:12px;background:#182235}.scene-preview{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;white-space:pre-wrap;font-size:.9rem;line-height:1.5}
button.scene-save-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 32px;width:32px;height:32px;min-height:32px;margin:0;padding:0;border-radius:50%;line-height:1}
.scene-invitation{padding:16px;margin-top:16px;border:1px solid #506580;border-radius:12px;background:#182235;color:#edf2ff}.scene-invitation p{margin:0 0 12px}
.scenes-drawer :focus-visible,.scenes-editor :focus-visible,#saveSceneBtn:focus-visible,#openScenesBtn:focus-visible{outline:2px solid #67e8f9;outline-offset:3px}
@media(max-width:600px){.scenes-drawer{width:100%;border-radius:0;padding:20px;padding-bottom:max(20px,env(safe-area-inset-bottom))}button.scene-save-icon,#restorePromptBtn{flex-basis:44px!important;width:44px!important;height:44px!important;min-height:44px!important}}
.scene-invitation{box-sizing:border-box;width:100%;text-align:left}
#resultContainer:has(> .scene-invitation){flex-direction:column;align-items:stretch}
#resultContainer > .scene-invitation{flex:0 0 auto;margin-top:20px}

#openScenesBtn{display:inline-flex;align-items:center;justify-content:center;width:auto;min-height:32px;height:32px;margin:0;padding:0 12px;border:1px solid #50658080;border-radius:999px;background:#15233880;color:#c5d4e8;font-family:inherit;font-size:12px;font-weight:500;line-height:1;letter-spacing:.02em;cursor:pointer;transition:background .15s,border-color .15s,color .15s}
#openScenesBtn:hover{background:#213249;border-color:#67e8f999;color:#ecfeff}
@media(max-width:600px){#openScenesBtn{min-height:36px;height:36px}}
.scenes-tabs{display:flex;gap:4px;padding:4px;margin:0 0 16px;background:#080f1e;border:1px solid #36455d;border-radius:12px}
.scenes-tabs [role=tab]{flex:1;min-width:0;min-height:40px;padding:8px;border:1px solid transparent;border-radius:8px;background:transparent;color:#9cacc4;font-size:.85rem}
.scenes-tabs [role=tab][aria-selected=true]{background:#213249;border-color:#506580;color:#ecfeff}
.scenes-editor .scene-settings-option{display:flex;justify-content:flex-start;align-items:center;gap:10px;cursor:pointer}
.scenes-editor .scene-settings-option input{width:18px;height:18px;margin:0;flex:0 0 18px;accent-color:#67e8f9}

.scenes-editor .scenes-actions{margin-top:20px}
.scene-limit-notice{display:block;box-sizing:border-box;width:100%;padding:14px 16px;margin:12px 0;border:1px solid #f87171;border-radius:10px;background:#ef44441a;color:#fca5a5!important;font-size:.9rem!important;font-weight:600;text-align:center;line-height:1.6}

.scene-card .scene-reference-warning{color:#fca5a5;font-size:.85rem;font-weight:600;line-height:1.5;margin:8px 0 12px}

button.try-templates-btn{display:inline-block;width:auto;min-height:36px;margin:6px 0 0;padding:6px 0;border:0;background:transparent;box-shadow:none;color:var(--accent-cyan);font-size:.85rem;cursor:pointer}button.try-templates-btn:hover{text-decoration:underline;background:transparent}


.scene-age-gate{padding:16px;margin-top:16px;border:1px solid #506580;border-radius:12px;background:#182235}.scene-age-gate[hidden]{display:none}.scene-age-gate h3{margin:0 0 12px;font-size:1rem;color:#fff}.scene-age-option{display:flex;align-items:center;justify-content:flex-start;gap:6px;min-height:30px;margin:0;cursor:pointer;font-size:.9rem;line-height:1.5}.scenes-drawer .scene-age-option input{flex:0 0 18px;width:18px;height:18px;margin:0;accent-color:var(--accent-cyan,#a9baff)}


.image-template-group{margin:20px 0}.image-template-group h3{font-size:.95rem;color:#edf2ff;margin:0 0 10px}.image-template-choices{display:flex;flex-wrap:wrap;gap:8px}.image-template-choices button{font-size:.82rem;border-radius:20px;text-align:left}.image-template-choices button:hover{background:#30455e;border-color:#67e8f9}#outputArea:has(>.scene-invitation){flex-direction:column;align-items:stretch}
.image-character-card{box-sizing:border-box;width:100%;margin:0}.image-character-card h4{margin:0;color:#edf2ff;font-size:.95rem}.image-character-card p{margin:8px 0 12px}
.image-character-heading{display:flex;align-items:center;gap:12px}.image-character-heading .image-character-thumbnail{display:block;width:64px;height:64px;min-width:64px;max-width:64px;flex:0 0 64px;object-fit:cover;border-radius:50%;border:1px solid #506580;margin:0}
.image-template-choices button[aria-pressed="true"]{background:#164e63;border-color:#67e8f9;color:#ecfeff;box-shadow:inset 0 0 0 1px #67e8f9}
