:root {
  --ink:#242335; --muted:#747286; --canvas:#f7f6f1;
  --primary:#6657e8; --primary-dark:#4d41b8; --lavender:#e9e5ff;
  --coral:#ff806d; --coral-soft:#ffe3dc; --mint:#57bea8; --mint-soft:#ddf4ec;
  --line:#e8e5de; --shadow:0 14px 42px rgba(48,43,78,.08);
}
[hidden]{display:none!important}
*{box-sizing:border-box} html{background:var(--canvas)} body{margin:0;color:var(--ink);background:var(--canvas);font-family:Avenir,"Nunito Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-weight:500} button,input,textarea,select{font:inherit} button{color:inherit} button:not(:disabled){cursor:pointer} button:disabled{opacity:.42;cursor:not-allowed} .app-shell{min-height:100dvh}.screen{display:none}.screen.active{display:block}.main-header{height:82px;display:flex;align-items:center;justify-content:space-between;gap:16px;max-width:800px;margin:auto;padding:12px 20px}.brand-button{display:flex;align-items:center;gap:11px;border:0;background:transparent;padding:0;text-align:left}.brand-mark{display:grid;place-items:center;width:44px;height:44px;border-radius:15px;color:#fff;background:linear-gradient(145deg,var(--primary),#887cf5);font-size:13px;font-weight:900;box-shadow:0 7px 18px rgba(102,87,232,.22)}.brand-mark.large{width:58px;height:58px;border-radius:20px;font-size:16px}.brand-copy{display:grid}.brand-copy strong{font-size:16px;font-weight:900}.brand-copy small{margin-top:2px;color:var(--muted);font-size:10px;font-weight:700}.ai-status{display:flex;align-items:center;gap:7px;padding:9px 12px;border:1px solid var(--line);border-radius:14px;background:#fff;color:var(--muted);font-size:11px;font-weight:800}.status-dot{width:8px;height:8px;border-radius:50%;background:var(--coral)}.ai-status.online .status-dot{background:var(--mint);box-shadow:0 0 0 4px var(--mint-soft)}
.landing-screen{min-height:100dvh;background:#f7f6f1}.landing-header{display:flex;align-items:center;justify-content:space-between;width:min(1160px,calc(100% - 40px));height:82px;margin:auto;border-bottom:1px solid rgba(45,41,69,.1)}.landing-brand{display:flex;align-items:center;gap:11px;color:var(--ink);text-decoration:none}.landing-brand span{width:12px;height:12px;border-radius:50%;background:var(--primary);box-shadow:0 0 0 5px var(--lavender)}.landing-brand strong{font-size:15px;font-weight:900}.landing-login{padding:10px 16px;border:1px solid #d8d4cb;border-radius:12px;background:#fff;font-size:11px;font-weight:900}.landing-login:hover{border-color:var(--primary);color:var(--primary-dark)}.landing-main{width:min(1160px,calc(100% - 40px));margin:auto}.landing-hero{display:grid;grid-template-columns:minmax(0,1fr) minmax(380px,.85fr);align-items:center;gap:clamp(40px,7vw,90px);min-height:570px;padding:65px 0}.landing-kicker{margin:0 0 15px;color:var(--primary);font-size:10px;font-weight:900;letter-spacing:.15em}.landing-copy h1{max-width:660px;margin:0;font-size:clamp(43px,6vw,72px);font-weight:900;line-height:.98;letter-spacing:-3px;text-wrap:balance}.landing-copy>p:not(.landing-kicker){max-width:600px;margin:25px 0;color:var(--muted);font-size:17px;line-height:1.62}.landing-primary{display:flex;align-items:center;justify-content:space-between;gap:25px;min-width:min(100%,355px);padding:16px 18px;border:0;border-radius:15px;background:var(--ink);color:#fff;font-size:13px;font-weight:900;box-shadow:0 13px 30px rgba(36,35,53,.17)}.landing-primary:hover{background:var(--primary-dark);transform:translateY(-1px)}.landing-primary span{font-size:20px}.landing-copy>small{display:block;margin-top:12px;color:var(--muted);font-size:10px}.landing-preview{overflow:hidden;border:1px solid rgba(45,41,69,.12);border-radius:28px;background:#fff;box-shadow:0 28px 70px rgba(45,41,69,.14);transform:rotate(1.5deg)}.preview-sky{position:relative;height:285px;overflow:hidden;background:linear-gradient(#bde0eb,#e8ecbc)}.preview-sun{position:absolute;right:45px;top:38px;width:55px;height:55px;border-radius:50%;background:#f8c85c;box-shadow:0 0 35px rgba(248,200,92,.55)}.preview-cloud{position:absolute;width:90px;height:24px;border-radius:99px;background:rgba(255,255,255,.82)}.preview-cloud:after,.preview-cloud:before{content:"";position:absolute;bottom:0;border-radius:50%;background:inherit}.preview-cloud:before{left:14px;width:34px;height:34px}.preview-cloud:after{right:14px;width:42px;height:42px}.cloud-one{left:48px;top:70px}.cloud-two{right:100px;top:135px;transform:scale(.72)}.preview-hill{position:absolute;left:-10%;right:-10%;bottom:-40%;height:75%;border-radius:50% 50% 0 0;background:linear-gradient(155deg,#75a768,#507f55)}.preview-child{position:absolute;left:48%;bottom:38px;display:grid;place-items:center;width:55px;height:78px;border:6px solid #f4d6b1;border-radius:30px 30px 16px 16px;background:#7266bb;color:#ffd75f;font-size:22px;box-shadow:0 10px 20px rgba(40,55,40,.2)}.preview-story{padding:25px 27px 28px}.preview-story small{color:var(--primary);font-size:8px;font-weight:900;letter-spacing:.13em}.preview-story h2{margin:9px 0 8px;font-size:22px;line-height:1.16}.preview-story p{margin:0;color:var(--muted);font-size:12px;line-height:1.5}.preview-story>span{display:inline-flex;margin-top:15px;padding:6px 9px;border-radius:99px;background:var(--lavender);color:var(--primary-dark);font-size:9px;font-weight:850}.landing-features{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border-top:1px solid rgba(45,41,69,.1);border-bottom:1px solid rgba(45,41,69,.1)}.landing-features article{display:grid;grid-template-columns:40px 1fr;gap:10px;padding:30px 25px}.landing-features article+article{border-left:1px solid rgba(45,41,69,.1)}.landing-features article>span{color:var(--primary);font-size:10px;font-weight:900}.landing-features h2{margin:0 0 7px;font-size:15px}.landing-features p{margin:0;color:var(--muted);font-size:11px;line-height:1.5}.landing-trust{display:flex;align-items:center;justify-content:space-between;gap:30px;margin:48px 0;padding:25px 28px;border-radius:20px;background:var(--ink);color:#fff}.landing-trust strong{font-size:17px}.landing-trust p{max-width:670px;margin:0;color:rgba(255,255,255,.7);font-size:11px;line-height:1.55}.landing-footer{display:flex;justify-content:space-between;gap:20px;width:min(1160px,calc(100% - 40px));margin:auto;padding:24px 0 35px;border-top:1px solid rgba(45,41,69,.1);color:var(--muted);font-size:9px}.auth-back{margin:0 0 18px;padding:0;border:0;background:transparent;color:var(--muted);font-size:11px;font-weight:800}.auth-back:hover{color:var(--primary-dark)}
@media(max-width:820px){.landing-hero{grid-template-columns:1fr;min-height:0;padding:55px 0}.landing-copy h1{max-width:680px}.landing-preview{width:min(520px,100%);margin:auto;transform:none}.landing-features{grid-template-columns:1fr}.landing-features article+article{border-top:1px solid rgba(45,41,69,.1);border-left:0}.landing-trust{align-items:flex-start;flex-direction:column}}
@media(max-width:520px){.landing-header,.landing-main,.landing-footer{width:min(100% - 28px,1160px)}.landing-header{height:70px}.landing-hero{gap:38px;padding:40px 0}.landing-copy h1{font-size:42px;letter-spacing:-2px}.landing-copy>p:not(.landing-kicker){font-size:15px}.landing-primary{width:100%}.preview-sky{height:210px}.preview-story{padding:21px}.landing-features article{padding:24px 8px}.landing-trust{margin:35px 0;padding:22px}.landing-footer{flex-direction:column}}
.home-content{max-width:760px;margin:auto;padding:24px 20px 42px}.greeting{margin:0 0 5px;color:var(--muted);font-size:15px;font-weight:750}.home-content>h1{margin:0 0 25px;font-size:clamp(34px,6vw,47px);line-height:1.06;letter-spacing:-1.7px;font-weight:900}.create-hero{width:100%;display:flex;align-items:center;gap:16px;padding:22px;border:0;border-radius:25px;text-align:left;background:linear-gradient(120deg,var(--primary),#7568ed);color:#fff;box-shadow:0 16px 38px rgba(102,87,232,.22)}.hero-icon{display:grid;place-items:center;flex:0 0 48px;height:48px;border-radius:16px;background:rgba(255,255,255,.18);font-size:21px}.create-hero>span:nth-child(2){display:grid;gap:4px;flex:1}.create-hero strong{font-size:18px;font-weight:900}.create-hero small{color:rgba(255,255,255,.76);font-size:12px}.hero-arrow{font-size:25px}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:31px 0 13px}.section-heading h2{margin:0;font-size:19px;font-weight:900}.section-heading button{border:0;background:transparent;color:var(--primary);font-weight:850}.section-heading small{color:var(--muted);font-size:11px}.suggestions{display:flex;flex-wrap:wrap;gap:9px}.suggestions button,.choice-row button{padding:11px 14px;border:1px solid var(--line);border-radius:14px;background:#fff;font-size:13px;font-weight:800}.suggestions button:hover,.choice-row button:hover{border-color:#bcb5fa}.story-library{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.story-card{position:relative;overflow:hidden;min-height:245px;border:1px solid var(--line);border-radius:24px;background:#fff;box-shadow:var(--shadow);cursor:pointer}.story-card img{display:block;width:100%;height:155px;object-fit:cover;background:var(--lavender)}.story-card-copy{padding:15px 16px 17px}.story-card h3{margin:0 30px 5px 0;font-size:16px;line-height:1.2;font-weight:900}.story-card p{margin:0;color:var(--muted);font-size:12px;line-height:1.35}.story-card-meta{display:flex;gap:7px;margin-top:12px}.story-card-meta span,.metadata span{padding:6px 9px;border-radius:99px;background:var(--lavender);color:var(--primary-dark);font-size:10px;font-weight:850}.delete-story{position:absolute;right:10px;top:10px;width:35px;height:35px;border:0;border-radius:12px;background:rgba(255,255,255,.92);color:var(--coral);font-size:16px}.empty-library{grid-column:1/-1;padding:28px;border:1px dashed #cfcbdc;border-radius:22px;text-align:center;color:var(--muted);background:rgba(255,255,255,.5)}.trust-card,.info-banner{display:flex;align-items:flex-start;gap:12px;padding:17px;border-radius:20px;background:var(--lavender);margin-top:25px}.trust-icon,.info-banner>span{display:grid;place-items:center;flex:0 0 31px;height:31px;border-radius:11px;background:#fff;color:var(--primary);font-weight:900}.trust-card strong,.info-banner strong{font-size:13px;font-weight:900}.trust-card p,.info-banner p{margin:4px 0 0;color:var(--muted);font-size:12px;line-height:1.45}.info-banner.mint{background:var(--mint-soft)}.info-banner.mint>span{color:var(--mint)}.info-banner.coral{background:var(--coral-soft)}.info-banner.coral>span{color:var(--coral)}
.creation-screen,.editor-screen,.player-screen{min-height:100dvh}.flow-header,.player-header{height:64px;display:grid;grid-template-columns:44px 1fr 44px;align-items:center;max-width:720px;margin:auto;padding:8px 14px}.flow-header>strong,.player-header>strong{text-align:center;font-size:18px;font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.back-icon{width:42px;height:42px;border:0;border-radius:14px;background:transparent;font-size:22px}.back-icon:hover{background:#fff}.step-progress{display:flex;gap:3px}.step-progress span{height:4px;flex:1;background:var(--line);transition:.25s}.step-progress span.active{background:var(--primary)}.flow-page{display:none;max-width:680px;margin:auto;padding:25px 20px 115px}.flow-page.active{display:block}.flow-page>h1{margin:0 0 8px;font-size:29px;line-height:1.14;letter-spacing:-.8px;font-weight:900}.lead{margin:0 0 22px;color:var(--muted);font-size:16px;line-height:1.5}.lead.compact{font-size:14px;margin-bottom:20px}textarea,input{width:100%;padding:16px 17px;border:1px solid var(--line);border-radius:18px;outline:none;background:#fff;color:var(--ink);resize:vertical}textarea:focus,input:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(102,87,232,.09)}.field-tip{margin:10px 0 27px;color:var(--muted);font-size:12px;font-weight:650}fieldset{padding:0;border:0;margin:0 0 24px}legend,label{display:block;margin-bottom:11px;font-size:15px;font-weight:900}label small{color:var(--muted);font-weight:600}.choice-row{display:flex;flex-wrap:wrap;gap:8px}.choice-row button.selected,.duration-grid button.selected,.option-button.selected,.sensitive-choice.selected{border-color:var(--primary);background:var(--lavender);color:var(--primary-dark)}.scroll-row{flex-wrap:nowrap;overflow-x:auto;padding-bottom:3px}.scroll-row button{flex:0 0 auto}.duration-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.duration-grid button{display:grid;gap:4px;padding:14px 7px;border:1px solid var(--line);border-radius:17px;background:#fff}.duration-grid strong{font-weight:900}.duration-grid small{color:var(--muted);font-size:11px}.bottom-action{position:fixed;z-index:10;left:0;right:0;bottom:0;padding:12px 20px max(12px,env(safe-area-inset-bottom));border-top:1px solid var(--line);background:rgba(247,246,241,.94);backdrop-filter:blur(14px)}.bottom-action button{max-width:680px;margin:auto}.primary-button,.secondary-button{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:54px;padding:13px 18px;border-radius:18px;font-weight:900}.primary-button{border:0;background:var(--primary);color:#fff}.primary-button:hover{background:var(--primary-dark)}.secondary-button{border:1px solid var(--line);background:#fff;color:var(--ink)}.analysis-panel{padding:20px;border-radius:23px;background:var(--lavender)}.soft-pill{display:inline-flex;padding:7px 10px;border-radius:99px;background:#fff;color:var(--primary);font-size:10px;font-weight:900;letter-spacing:.4px}.analysis-panel h2{margin:14px 0 7px;font-size:20px;line-height:1.3}.analysis-panel p{margin:0;color:var(--ink);font-size:13px;line-height:1.45}.sensitive-card{margin-top:15px;padding:18px;border:1px solid #ffc8bc;border-radius:21px;background:var(--coral-soft)}.sensitive-card h3{margin:0 0 5px;font-size:15px}.sensitive-card p{margin:0 0 13px;font-size:13px;line-height:1.45}.sensitive-card .sensitive-prompt{font-weight:900;font-size:15px}.sensitive-options{display:grid;grid-template-columns:1fr 1fr;gap:9px}.sensitive-choice{padding:13px 8px;border:1px solid #f0b7aa;border-radius:15px;background:#fff;font-size:12px;font-weight:850}.question-title{margin:28px 0 6px;font-size:22px}.question-card{padding:18px;margin-bottom:13px;border:1px solid var(--line);border-radius:21px;background:#fff;box-shadow:0 8px 25px rgba(45,41,69,.04)}.question-card h3{margin:0 0 5px;font-size:15px}.question-card p{margin:0 0 13px;color:var(--muted);font-size:12px;line-height:1.4}.question-options{display:flex;flex-wrap:wrap;gap:8px}.option-button{padding:10px 12px;border:1px solid var(--line);border-radius:13px;background:#fff;font-size:12px;font-weight:800}.generation-page.active{min-height:calc(100dvh - 68px);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding-bottom:35px}.progress-circle{--progress:0deg;display:grid;place-items:center;width:128px;height:128px;margin:35px 0 27px;border-radius:50%;background:conic-gradient(var(--primary) var(--progress),var(--lavender) 0);position:relative}.progress-circle:before{content:"";position:absolute;inset:9px;border-radius:50%;background:var(--canvas)}.progress-circle strong{z-index:1;font-size:23px}.generation-page h2{margin:0 0 7px;font-size:23px}.generation-page>p{margin:0;color:var(--muted)}.generation-page>small{margin-top:23px;color:var(--muted)}.generation-list{width:100%;max-width:430px;margin-top:26px;text-align:left}.generation-item{display:flex;align-items:center;gap:11px;padding:10px 0;color:var(--muted);font-size:12px}.generation-item:before{content:"";width:18px;height:18px;border:2px solid var(--line);border-radius:50%}.generation-item.completed{color:var(--ink)}.generation-item.completed:before{content:"✓";display:grid;place-items:center;border-color:var(--mint);background:var(--mint);color:#fff;font-size:10px}.generation-item.running{color:var(--primary);font-weight:800}.generation-item.running:before{border-color:var(--primary);border-top-color:transparent;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
.editor-top{grid-template-columns:44px 1fr auto}.text-button{border:0;background:transparent;color:var(--primary);font-weight:850}.editor-content{max-width:700px;margin:auto;padding:18px 20px 115px}.story-summary-card{display:grid;grid-template-columns:110px 1fr;gap:16px;padding:20px;border:1px solid var(--line);border-radius:26px;background:#fff}.story-summary-card img{width:110px;height:110px;border-radius:19px;object-fit:cover;background:var(--lavender)}.story-summary-card h1{margin:2px 0 5px;font-size:20px}.story-summary-card p{margin:0;color:var(--muted);font-size:13px}.metadata{display:flex;gap:7px;margin-top:12px}.metadata span:nth-child(2){background:var(--coral-soft);color:#a85244}.slide-editor-list{display:grid;gap:13px}.slide-editor-card{display:grid;grid-template-columns:145px 1fr auto;gap:14px;align-items:center;padding:13px;border:1px solid var(--line);border-radius:22px;background:#fff}.slide-editor-card img{width:145px;height:105px;border-radius:16px;object-fit:cover;background:var(--lavender)}.slide-editor-copy small{color:var(--primary);font-weight:900}.slide-editor-copy h3{margin:5px 0;font-size:15px}.slide-editor-copy p{display:-webkit-box;margin:0;color:var(--muted);font-size:12px;line-height:1.4;overflow:hidden;-webkit-line-clamp:3;-webkit-box-orient:vertical}.slide-card-actions{display:grid;gap:5px}.slide-card-actions button{width:35px;height:35px;border:1px solid var(--line);border-radius:11px;background:#fff}.slide-card-actions button.danger{color:var(--coral)}.editor-actions{position:fixed;z-index:10;left:0;right:0;bottom:0;display:flex;justify-content:center;padding:12px 20px max(12px,env(safe-area-inset-bottom));border-top:1px solid var(--line);background:rgba(247,246,241,.95);backdrop-filter:blur(14px)}.editor-actions button{max-width:460px}
.player-screen{background:#f2f0e9}.player-header{max-width:none;grid-template-columns:44px 1fr auto;padding-right:18px}.player-header>strong{text-align:left;padding-left:10px}.player-header>span{padding:7px 10px;border-radius:99px;background:#fff;color:var(--primary-dark);font-size:11px;font-weight:850}.player-stage{height:calc(100dvh - 132px);padding:10px 12px 12px}.player-slide{position:relative;overflow:hidden;width:100%;height:100%;max-width:980px;margin:auto;border-radius:27px;background:#ded8ca}.player-slide>img{width:100%;height:100%;object-fit:cover}.player-slide:after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,transparent 65%,rgba(74,50,31,.10));pointer-events:none}.player-text-card{position:absolute;z-index:2;left:28px;bottom:28px;width:min(56%,540px);max-height:72%;overflow:auto;padding:26px 28px 21px;border:1.5px solid #ddb579;border-radius:22px;background:rgba(253,248,236,.96);box-shadow:0 10px 24px rgba(0,0,0,.15)}.player-text-card.right{left:auto;right:28px}.player-text-card h2{margin:0 0 15px;color:#51331f;font-family:Georgia,serif;font-size:30px;font-weight:500;line-height:1.12}.player-text-card p{margin:0;color:#4e463b;font-size:18px;line-height:1.48}.player-text-card small{display:block;margin-top:17px;color:#8a684b;font-size:11px;font-weight:650}.slide-number{position:absolute;z-index:3;right:14px;top:14px;display:grid;place-items:center;width:39px;height:39px;border:1px solid #ddb579;border-radius:50%;background:rgba(253,248,236,.94);color:#69472d;font-size:12px;font-weight:850}.player-controls{height:68px;display:grid;grid-template-columns:52px 1fr 52px;align-items:center;gap:12px;padding:10px 18px;background:#fff;border-top:1px solid var(--line)}.player-controls>button{width:48px;height:48px;border:1px solid var(--line);border-radius:15px;background:#fff;font-size:20px}.player-controls>button.next{border:0;background:var(--primary);color:#fff}.player-controls>div{display:flex;justify-content:center;gap:6px}.player-dot{width:7px;height:7px;border:0;border-radius:99px;background:var(--line);padding:0;transition:.2s}.player-dot.active{width:21px;background:var(--primary)}
dialog{width:min(620px,calc(100% - 24px));padding:0;border:0;border-radius:28px;background:#fff;box-shadow:0 30px 100px rgba(29,26,48,.28)}dialog::backdrop{background:rgba(36,35,53,.42);backdrop-filter:blur(3px)}dialog form{padding:23px}dialog header{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:20px}dialog header h2{margin:4px 0 0;font-size:22px}dialog header small{color:var(--primary);font-size:10px;font-weight:900;letter-spacing:.7px}dialog header button{width:38px;height:38px;border:0;border-radius:12px;background:var(--canvas);font-size:21px}dialog label{margin-top:16px}dialog footer{display:grid;grid-template-columns:1fr 1.5fr;gap:10px;margin-top:21px}.ending-content{padding:27px;text-align:center}.ending-icon{display:grid;place-items:center;width:65px;height:65px;margin:auto;border-radius:50%;background:var(--mint-soft);color:var(--mint);font-size:27px}.ending-content h2{margin:18px 0 7px}.ending-content>p{margin:0;color:var(--muted);line-height:1.5}.ending-content .info-banner{text-align:left;margin:18px 0}.ending-content .text-button{margin-top:9px}.toast{position:fixed;z-index:100;left:50%;bottom:25px;max-width:min(90%,520px);padding:13px 17px;border-radius:14px;background:var(--ink);color:#fff;font-size:13px;font-weight:700;opacity:0;pointer-events:none;transform:translate(-50%,15px);transition:.2s}.toast.visible{opacity:1;transform:translate(-50%,0)}
.ending-screen{min-height:100dvh;background:radial-gradient(circle at 50% 5%,rgba(102,87,232,.12),transparent 38%),var(--canvas)}
.ending-header{max-width:860px;border-bottom:1px solid rgba(232,229,222,.75)}
.ending-page{display:grid;place-items:center;min-height:calc(100dvh - 64px);padding:28px 20px 48px}
.ending-screen .ending-content{width:min(720px,100%);padding:clamp(25px,5vw,48px);border:1px solid var(--line);border-radius:30px;background:#fff;box-shadow:var(--shadow)}
.ending-kicker{margin-top:13px!important;color:var(--primary)!important;font-size:10px;font-weight:900;letter-spacing:.12em}
.ending-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:20px}
@media(max-width:560px){.ending-page{align-items:start;padding:14px 12px 30px}.ending-screen .ending-content{padding:23px 17px;border-radius:23px}.ending-actions{grid-template-columns:1fr}}
@media(max-width:680px){.ai-status span:last-child{display:none}.story-library{grid-template-columns:1fr}.story-card{display:grid;grid-template-columns:125px 1fr;min-height:140px}.story-card img{height:100%;min-height:140px}.story-card-copy{align-self:center}.slide-editor-card{grid-template-columns:105px 1fr auto}.slide-editor-card img{width:105px;height:95px}.player-stage{height:calc(100dvh - 132px);padding:7px}.player-text-card,.player-text-card.right{left:16px;right:auto;bottom:16px;width:calc(100% - 32px);max-height:57%;padding:19px 20px 17px}.player-text-card h2{font-size:24px;margin-bottom:11px}.player-text-card p{font-size:16px}.editor-actions button{max-width:none}}
@media(max-width:470px){.home-content{padding-top:12px}.home-content>h1{font-size:34px}.create-hero{padding:18px 16px}.hero-icon{flex-basis:43px;height:43px}.create-hero strong{font-size:15px}.duration-grid{gap:6px}.story-summary-card{grid-template-columns:88px 1fr;padding:14px}.story-summary-card img{width:88px;height:94px}.slide-editor-card{grid-template-columns:86px 1fr auto;gap:9px;padding:9px}.slide-editor-card img{width:86px;height:82px}.slide-editor-copy p{-webkit-line-clamp:2}.slide-card-actions button{width:32px;height:32px}.sensitive-options{grid-template-columns:1fr}dialog footer{grid-template-columns:1fr}.editor-actions{padding-left:12px;padding-right:12px}}

.header-actions{display:flex;align-items:center;gap:9px}.lab-button{min-height:38px;padding:8px 12px;border:1px solid var(--line);border-radius:13px;background:#fff;color:var(--primary-dark);font-size:11px;font-weight:850}.prompt-screen{min-height:100dvh}.prompt-top{grid-template-columns:105px 1fr auto;max-width:920px}.prompt-top .back-home{display:flex;align-items:center;gap:6px;width:auto;padding:0 10px;font-size:15px}.prompt-top .back-home span{font-size:11px;font-weight:850}.prompt-top>span{padding:6px 9px;border-radius:99px;background:var(--lavender);color:var(--primary-dark);font-size:10px;font-weight:850}.prompt-content{max-width:900px;margin:auto;padding:22px 20px 60px}.prompt-intro{padding:25px;border-radius:25px;background:linear-gradient(135deg,var(--primary),#8175f1);color:#fff}.prompt-intro>span{font-size:10px;font-weight:900;letter-spacing:.8px;opacity:.75}.prompt-intro h1{margin:10px 0 7px;font-size:29px}.prompt-intro p{max-width:700px;margin:0;color:rgba(255,255,255,.8);font-size:13px;line-height:1.55}.prompt-workflow-button{margin-top:17px;padding:10px 13px;border:1px solid rgba(255,255,255,.35);border-radius:13px;background:rgba(255,255,255,.13);color:#fff;font-size:11px;font-weight:900}.prompt-visibility{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:18px 0;padding:16px 18px;border:1px solid var(--line);border-radius:19px;background:#fff}.prompt-visibility>span{display:grid;gap:3px}.prompt-visibility small{font-size:11px}.prompt-visibility input{width:22px;height:22px;margin:0;accent-color:var(--primary)}#promptEditors[hidden]{display:none}.prompt-editor-card{margin-bottom:15px;padding:19px;border:1px solid var(--line);border-radius:23px;background:#fff;box-shadow:0 8px 24px rgba(48,43,78,.04)}.prompt-editor-card header{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:13px}.prompt-editor-card header small{color:var(--primary);font-size:9px;font-weight:900;letter-spacing:.6px}.prompt-editor-card h2{margin:4px 0 0;font-size:18px}.prompt-editor-card header button{padding:7px 10px;border:1px solid var(--line);border-radius:11px;background:var(--canvas);color:var(--primary-dark);font-size:10px;font-weight:850}.prompt-editor-card textarea{min-height:220px;border-radius:15px;background:#fbfaf7;font-family:"SFMono-Regular",Consolas,monospace;font-size:12px;line-height:1.55}.prompt-actions{display:grid;grid-template-columns:1fr 1.5fr;gap:10px;position:sticky;bottom:12px;padding:11px;border:1px solid var(--line);border-radius:22px;background:rgba(247,246,241,.94);backdrop-filter:blur(14px)}
.editor-header-actions{display:flex;align-items:center;gap:3px}.trace-open-button{max-width:430px;margin-top:18px;min-height:44px}.workflow-dialog{width:min(850px,calc(100% - 24px));max-height:min(88dvh,900px)}.workflow-dialog-content{padding:23px}.workflow-dialog-content>header{position:sticky;z-index:2;top:-23px;padding:18px 0 14px;margin:0;background:#fff}.token-summary{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin-bottom:16px}.token-summary>div{display:grid;gap:3px;padding:12px;border-radius:15px;background:var(--canvas);text-align:center}.token-summary strong{font-size:15px}.token-summary small{color:var(--muted);font-size:9px;font-weight:800;text-transform:uppercase}.workflow-stage-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-bottom:15px}.workflow-stage{display:flex;align-items:flex-start;gap:9px;padding:10px;border:1px solid var(--line);border-radius:14px;background:#fff}.workflow-stage>span{display:grid;place-items:center;flex:0 0 20px;height:20px;border-radius:50%;background:var(--lavender);color:var(--primary);font-size:10px;font-weight:900}.workflow-stage>div{display:grid;gap:2px}.workflow-stage strong{font-size:11px}.workflow-stage small{color:var(--muted);font-size:9px;line-height:1.35}.workflow-stage-completed>span,.workflow-stage-skipped>span{background:var(--mint-soft);color:var(--mint)}.workflow-stage-failed>span{background:var(--coral-soft);color:var(--coral)}.workflow-filter{display:flex;gap:7px;overflow-x:auto;padding-bottom:12px}.workflow-filter button{flex:0 0 auto;padding:8px 11px;border:1px solid var(--line);border-radius:99px;background:#fff;color:var(--muted);font-size:10px;font-weight:850;text-transform:capitalize}.workflow-filter button.active{border-color:var(--primary);background:var(--lavender);color:var(--primary-dark)}.trace-list{display:grid;gap:10px}.trace-card{padding:15px;border:1px solid var(--line);border-left:4px solid #beb8ee;border-radius:17px;background:#fff}.trace-card.trace-llm_error,.trace-card.trace-image_error{border-left-color:var(--coral)}.trace-card.trace-llm_response,.trace-card.trace-image_response,.trace-card.trace-workflow_complete{border-left-color:var(--mint)}.trace-card>header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.trace-card header small{color:var(--primary);font-size:9px;font-weight:900;text-transform:uppercase}.trace-card h3{margin:4px 0 0;font-size:14px}.trace-card time{color:var(--muted);font-size:10px}.trace-meta{margin:9px 0 0;color:var(--muted);font-size:10px}.trace-card details{margin-top:11px}.trace-card summary{color:var(--primary-dark);font-size:11px;font-weight:850;cursor:pointer}.trace-details{display:grid;gap:10px;margin-top:10px}.trace-details section{min-width:0}.trace-details h4{margin:0 0 5px;color:var(--muted);font-size:10px;text-transform:capitalize}.trace-details pre{max-height:330px;overflow:auto;margin:0;padding:12px;border-radius:12px;background:#272634;color:#f5f2ff;font:11px/1.55 "SFMono-Regular",Consolas,monospace;white-space:pre-wrap;overflow-wrap:anywhere}.trace-empty{padding:28px;text-align:center;color:var(--muted);line-height:1.55}

@media(max-width:680px){.lab-button{padding:8px 10px}.prompt-top>span{display:none}.prompt-actions{grid-template-columns:1fr}.token-summary{grid-template-columns:repeat(3,1fr)}.workflow-dialog-content{padding:18px}.workflow-dialog-content>header{top:-18px}.editor-header-actions .text-button{font-size:11px}.trace-open-button{width:100%}}
@media(max-width:470px){.header-actions{gap:5px}.lab-button{font-size:0}.lab-button:first-letter{font-size:15px}.prompt-top{grid-template-columns:44px 1fr 44px}.prompt-top .back-home{width:42px;padding:0}.prompt-top .back-home span{display:none}.prompt-content{padding-left:12px;padding-right:12px}.prompt-intro{padding:20px}.prompt-intro h1{font-size:24px}.prompt-editor-card{padding:14px}.prompt-editor-card header{display:grid}.token-summary{grid-template-columns:repeat(2,1fr)}.workflow-stage-summary{grid-template-columns:1fr}}

.option-other{border-style:dashed;color:var(--primary-dark)}.other-answer{margin-top:12px}

.recovery-card{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:17px 18px;border:1px solid #ffc8bc;border-radius:20px;background:var(--coral-soft)}.recovery-card h3{margin:0 0 4px;font-size:14px}.recovery-card p{margin:0;color:#855b53;font-size:11px}.recovery-card button{flex:0 0 auto;padding:10px 13px;border:0;border-radius:12px;background:#fff;color:#a85244;font-size:11px;font-weight:900}

.player-header-actions{display:flex;align-items:center;gap:8px}.player-header-actions>span{padding:7px 10px;border-radius:99px;background:#fff;color:var(--primary-dark);font-size:11px;font-weight:850}.player-header-actions>button{display:grid;place-items:center;width:38px;height:38px;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--primary-dark);font-size:18px;font-weight:900}

/* En plein écran, l'illustration remplit réellement la surface disponible. */
:fullscreen .player-screen{position:fixed;inset:0;width:100%;height:100%;background:#0f1117}:fullscreen .player-screen .player-stage{height:100vh;padding:0}:fullscreen .player-screen .player-slide{max-width:none;border-radius:0}:fullscreen .player-screen .player-header{position:absolute;z-index:5;top:0;left:0;right:0;max-width:none;color:#fff;background:linear-gradient(180deg,rgba(8,11,17,.72),transparent)}:fullscreen .player-screen .player-header>strong{color:#fff;text-shadow:0 2px 12px rgba(0,0,0,.5)}:fullscreen .player-screen .back-icon{color:#fff;background:rgba(12,16,24,.42);backdrop-filter:blur(10px)}:fullscreen .player-screen .player-header-actions>span,:fullscreen .player-screen .player-header-actions>button{border-color:rgba(255,255,255,.25);background:rgba(12,16,24,.48);color:#fff;backdrop-filter:blur(10px)}:fullscreen .player-screen .player-controls{position:absolute;z-index:5;left:50%;bottom:16px;width:min(520px,calc(100% - 32px));height:58px;transform:translateX(-50%);border:1px solid rgba(255,255,255,.22);border-radius:19px;background:rgba(12,16,24,.62);box-shadow:0 12px 35px rgba(0,0,0,.3);backdrop-filter:blur(16px)}:fullscreen .player-screen .player-controls>button{border-color:rgba(255,255,255,.2);background:rgba(255,255,255,.12);color:#fff}:fullscreen .player-screen .player-controls>button.next{background:var(--primary)}:fullscreen .player-screen .player-dot{background:rgba(255,255,255,.35)}:fullscreen .player-screen .player-dot.active{background:#fff}:fullscreen .player-screen .player-text-card{bottom:90px}:fullscreen .player-screen .slide-number{top:72px}

@media(max-width:680px){:fullscreen .player-screen .player-header>strong{font-size:14px}:fullscreen .player-screen .player-text-card,:fullscreen .player-screen .player-text-card.right{bottom:88px;max-height:54%}:fullscreen .player-screen .player-controls{bottom:10px;width:calc(100% - 20px)}}

/* Sur tablette et ordinateur, le texte et l'image partagent la surface sans se recouvrir. */
@media(min-width:681px){.player-slide{display:grid;grid-template-columns:minmax(320px,38%) minmax(0,62%)}.player-slide:after{display:none}.player-slide>img{grid-column:2;grid-row:1;width:100%;height:100%;object-fit:cover}.player-text-card,.player-text-card.right{position:relative;inset:auto;grid-column:1;grid-row:1;width:auto;max-height:none;height:100%;padding:clamp(28px,4vw,64px);padding-bottom:90px;border:0;border-right:4px solid rgba(255,201,90,.9);border-radius:0;background:linear-gradient(145deg,#171c25,#302725);box-shadow:none;display:flex;flex-direction:column;justify-content:center}.player-slide.text-right{grid-template-columns:minmax(0,62%) minmax(320px,38%)}.player-slide.text-right>img{grid-column:1}.player-slide.text-right .player-text-card{grid-column:2;border-right:0;border-left:4px solid rgba(255,201,90,.9)}.player-text-card h2{font-size:clamp(24px,2.3vw,36px)}.player-text-card p{font-size:clamp(15px,1.35vw,19px);line-height:1.58}:fullscreen .player-screen .player-text-card{bottom:auto}}

/* Lecture : légende en verre éditorial intégrée à l'illustration. */
.player-slide:after{background:linear-gradient(90deg,rgba(17,22,30,.72) 0%,rgba(17,22,30,.38) 38%,transparent 68%)}.player-screen.text-right .player-slide:after{background:linear-gradient(270deg,rgba(17,22,30,.72) 0%,rgba(17,22,30,.38) 38%,transparent 68%)}.player-text-card{left:clamp(20px,3vw,42px);bottom:clamp(20px,3vw,42px);width:min(48%,520px);max-height:68%;padding:22px 24px 19px;border:1px solid rgba(255,255,255,.28);border-left:4px solid rgba(255,201,90,.9);border-radius:18px;background:linear-gradient(135deg,rgba(23,28,37,.78),rgba(23,28,37,.58));box-shadow:0 18px 45px rgba(0,0,0,.24);backdrop-filter:blur(18px) saturate(125%)}.player-text-card.right{left:auto;right:clamp(20px,3vw,42px);border-left:1px solid rgba(255,255,255,.28);border-right:4px solid rgba(255,201,90,.9)}.player-text-card h2{margin:0 0 11px;color:#fff9ec;font-family:Avenir,"Nunito Sans",sans-serif;font-size:clamp(23px,2.2vw,30px);font-weight:900;letter-spacing:-.5px}.player-text-card p{color:rgba(255,255,255,.92);font-size:clamp(15px,1.45vw,18px);line-height:1.55;text-wrap:pretty}.player-text-card small{margin-top:13px;color:rgba(255,224,174,.78)}

@media(max-width:680px){.player-slide:after,.player-screen.text-right .player-slide:after{background:linear-gradient(0deg,rgba(17,22,30,.82) 0%,rgba(17,22,30,.48) 42%,transparent 70%)}.player-text-card,.player-text-card.right{left:12px;right:auto;bottom:12px;width:calc(100% - 24px);max-height:58%;padding:17px 18px 15px;border:1px solid rgba(255,255,255,.24);border-top:3px solid rgba(255,201,90,.9);border-radius:17px}.player-text-card h2{font-size:21px}.player-text-card p{font-size:15px;line-height:1.5}.player-text-card small{margin-top:10px}}

/* Choix visuel : une même petite scène permet de comparer les matières. */
.fieldset-help{max-width:610px;margin:-4px 0 13px;color:var(--muted);font-size:12px;line-height:1.45}
.creation-profile-fieldset{margin-top:27px}.creation-profile-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(118px,1fr));gap:10px}.creation-profile-tile{display:flex;align-items:center;flex-direction:column;justify-content:center;min-height:132px;padding:14px 9px;border:1px solid var(--line);border-radius:18px;background:#fff;text-align:center;transition:.16s}.creation-profile-tile:hover{border-color:#bdb5fb;transform:translateY(-1px)}.creation-profile-tile>span{display:grid;place-items:center;width:42px;height:42px;margin-bottom:10px;border-radius:14px;background:var(--canvas);color:var(--primary-dark);font-size:16px;font-weight:900}.creation-profile-tile strong{font-size:12px}.creation-profile-tile small{margin-top:4px;color:var(--muted);font-size:9px}.creation-profile-tile.selected{border-color:var(--primary);background:var(--lavender);box-shadow:0 0 0 3px rgba(102,87,232,.08)}.creation-profile-tile.selected>span{background:var(--primary);color:#fff}.creation-profile-tile.add{border-style:dashed;background:transparent}.creation-profile-tile.add>span{background:var(--mint-soft);color:#277b6e;font-size:22px}@media(max-width:520px){.creation-profile-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.creation-profile-tile{min-height:120px}}
.image-style-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.image-style-choice{position:relative;display:grid;grid-template-columns:108px minmax(0,1fr) 24px;align-items:center;gap:12px;min-width:0;padding:9px;border:1px solid var(--line);border-radius:19px;background:#fff;text-align:left;transition:border-color .18s,box-shadow .18s,transform .18s}
.image-style-choice:hover{border-color:#c3bcfa;transform:translateY(-1px)}
.image-style-choice.selected{border-color:var(--primary);box-shadow:0 0 0 3px rgba(102,87,232,.09)}
.image-style-choice>span:nth-child(2){display:grid;gap:3px;min-width:0}
.image-style-choice strong{font-size:12px;font-weight:900;line-height:1.25}
.image-style-choice small{color:var(--muted);font-size:9px;line-height:1.35}
.choice-check{display:grid;place-items:center;width:22px;height:22px;border-radius:50%;background:var(--line);color:#fff;font-size:10px;font-weight:900}
.image-style-choice.selected .choice-check{background:var(--primary)}
.style-preview{position:relative;display:block;overflow:hidden;width:108px;aspect-ratio:16/10;border-radius:12px;background:linear-gradient(#b9dcec 0 58%,#7aa968 59%);isolation:isolate}
.style-preview:before{content:"";position:absolute;z-index:2;left:-9%;right:35%;bottom:-22%;height:70%;border-radius:50% 55% 0 0;background:#5b8d57;transform:rotate(4deg)}
.style-preview:after{content:"";position:absolute;z-index:3;right:-15%;bottom:-27%;width:72%;height:72%;border-radius:60% 50% 0 0;background:#94ba70}
.style-preview i{position:absolute;z-index:1;right:12px;top:10px;width:18px;height:18px;border-radius:50%;background:#ffd46b;box-shadow:0 0 15px rgba(255,212,107,.65)}
.style-preview b{position:absolute;z-index:5;left:51%;bottom:9px;width:10px;height:21px;border-radius:6px 6px 3px 3px;background:#f5d5b4;box-shadow:0 -7px 0 -1px #5c382d,0 0 0 3px #526f98}
.style-preview em{position:absolute;z-index:4;left:0;right:0;bottom:0;height:10px;background:#cdb477}
.preview-watercolor{filter:saturate(.82);background:linear-gradient(155deg,#d7edf2,#a8d3dc 55%,#dce7bc)}
.preview-watercolor:before,.preview-watercolor:after{filter:blur(.7px);opacity:.8}
.preview-realistic{background:linear-gradient(155deg,#86bdd1 0 55%,#517d47 56%);box-shadow:inset 0 0 16px rgba(255,255,255,.35)}
.preview-realistic:before{background:linear-gradient(#315f3b,#5e8744);box-shadow:inset 0 5px 8px rgba(255,255,255,.18)}
.preview-realistic:after{background:linear-gradient(#78964c,#b2b56a)}
.preview-felt{background:linear-gradient(#9fc6d2 0 58%,#628b62 59%);filter:saturate(.8);box-shadow:inset 0 0 0 3px rgba(255,255,255,.2)}
.preview-felt:before,.preview-felt:after,.preview-felt em{box-shadow:inset 0 0 0 2px rgba(255,255,255,.28),0 0 0 1px rgba(65,54,42,.18)}
.preview-felt b{box-shadow:0 -7px 0 -1px #6e4031,0 0 0 3px #746a9b,0 0 0 1px #fff}
.preview-paper{background:linear-gradient(#c7e5e8 0 58%,#789e68 59%)}
.preview-paper:before,.preview-paper:after{border-radius:45% 55% 0 0;box-shadow:4px -4px 0 rgba(54,64,49,.16)}
.preview-paper i{border-radius:2px;transform:rotate(8deg);box-shadow:3px 3px 0 rgba(105,73,34,.15)}
.preview-3d{background:linear-gradient(150deg,#9bcbd7,#c4e2dc 58%,#6c9a62);box-shadow:inset 0 -10px 18px rgba(28,65,52,.18)}
.preview-3d:before,.preview-3d:after{box-shadow:inset -7px -8px 12px rgba(42,65,37,.18),inset 7px 6px 9px rgba(255,255,255,.24)}
.preview-3d b{box-shadow:0 -7px 2px -1px #5c382d,0 2px 5px rgba(43,54,44,.35),0 0 0 3px #667ca1}

/* Présentation éditoriale : le texte ne recouvre jamais l'illustration. */
.player-screen .player-stage{height:calc(100dvh - 132px);padding:12px clamp(10px,2vw,24px)}
.player-screen .player-slide,
.player-screen .player-slide.text-right{display:grid;grid-template-columns:minmax(300px,40%) minmax(0,60%);grid-template-rows:1fr;max-width:1380px;min-height:0;border-radius:28px;background:#171c25;box-shadow:0 24px 70px rgba(43,37,28,.14)}
.player-screen .player-slide.text-right{grid-template-columns:minmax(0,60%) minmax(300px,40%)}
.player-screen .player-slide:after{pointer-events:none}
.player-screen .player-slide>img{position:relative;inset:auto;display:block;grid-column:2;grid-row:1;width:100%;height:100%;min-width:0;min-height:0;object-fit:cover;object-position:center;background:#ded8ca}
.player-screen .player-slide.text-right>img{grid-column:1}
.player-screen .player-text-card,
.player-screen .player-text-card.right{position:relative;inset:auto;z-index:2;display:flex;grid-column:1;grid-row:1;flex-direction:column;justify-content:center;width:auto;height:100%;max-height:none;min-width:0;overflow:auto;padding:clamp(30px,4vw,68px);border:0;border-right:4px solid #e7b75e;border-radius:0;background:linear-gradient(150deg,#171c25,#302725);box-shadow:none;backdrop-filter:none}
.player-screen .player-slide.text-right .player-text-card{grid-column:2;border-right:0;border-left:4px solid #e7b75e}
.player-screen .player-text-card:before{content:"";width:38px;height:5px;margin-bottom:clamp(18px,3vh,34px);border-radius:99px;background:#e7b75e}
.player-screen .player-text-card h2{margin:0 0 clamp(13px,2vh,22px);color:#fff9ec;font-family:Avenir,"Nunito Sans",sans-serif;font-size:clamp(25px,2.5vw,42px);font-weight:900;line-height:1.08;letter-spacing:-.8px;text-wrap:balance}
.player-screen .player-text-card p{margin:0;color:rgba(255,255,255,.91);font-size:clamp(15px,1.35vw,20px);line-height:1.6;text-wrap:pretty}
.player-screen .player-text-card small{display:block;margin-top:clamp(16px,2.2vh,26px);color:rgba(255,225,177,.72);font-size:11px;font-weight:750;letter-spacing:.2px}
.player-screen .dense-text .player-text-card{padding:clamp(24px,3vw,48px)}
.player-screen .dense-text .player-text-card h2{font-size:clamp(22px,2.1vw,34px)}
.player-screen .dense-text .player-text-card p{font-size:clamp(14px,1.15vw,17px);line-height:1.52}
.player-screen .short-text .player-text-card p{font-size:clamp(17px,1.55vw,22px)}
.player-screen .slide-number{top:18px;right:18px;border-color:rgba(255,255,255,.6);background:rgba(255,255,255,.9);box-shadow:0 6px 22px rgba(0,0,0,.12);backdrop-filter:blur(8px)}
.player-slide[data-image-style="realistic"] .player-text-card{background:linear-gradient(145deg,#172126,#283238)}
.player-slide[data-image-style="felt"] .player-text-card{background:linear-gradient(145deg,#27233b,#4a3340);border-color:#efb783}
.player-slide[data-image-style="paperCut"] .player-text-card{background:linear-gradient(145deg,#19343a,#315058);border-color:#efc56f}
.player-slide[data-image-style="soft3d"] .player-text-card{background:linear-gradient(145deg,#1c2639,#353044);border-color:#d8b6ff}

:fullscreen .player-screen .player-stage{height:100dvh;padding:0}
:fullscreen .player-screen .player-slide,
:fullscreen .player-screen .player-slide.text-right{max-width:none;border-radius:0}
:fullscreen .player-screen .player-text-card,
:fullscreen .player-screen .player-text-card.right{bottom:auto;padding-top:clamp(78px,10vh,112px);padding-bottom:clamp(96px,13vh,140px)}

@media(max-width:760px){
  .image-style-grid{grid-template-columns:1fr}
  .image-style-choice{grid-template-columns:118px minmax(0,1fr) 24px}
  .style-preview{width:118px}
  .player-screen .player-stage{height:calc(100dvh - 132px);padding:7px}
  .player-screen .player-slide,
  .player-screen .player-slide.text-right{grid-template-columns:1fr;grid-template-rows:minmax(210px,48%) minmax(0,52%);border-radius:22px}
  .player-screen .player-slide>img,
  .player-screen .player-slide.text-right>img{grid-column:1;grid-row:1;object-position:center}
  .player-screen .player-text-card,
  .player-screen .player-text-card.right,
  .player-screen .player-slide.text-right .player-text-card{grid-column:1;grid-row:2;width:auto;height:100%;padding:22px 22px 18px;border:0;border-top:3px solid #e7b75e}
  .player-screen .player-text-card:before{display:none}
  .player-screen .player-text-card h2{margin-bottom:9px;font-size:clamp(21px,6vw,28px)}
  .player-screen .player-text-card p,.player-screen .short-text .player-text-card p{font-size:clamp(14px,4vw,17px);line-height:1.48}
  .player-screen .dense-text .player-text-card{padding:17px 19px 15px}
  .player-screen .dense-text .player-text-card h2{font-size:20px}
  .player-screen .dense-text .player-text-card p{font-size:13px;line-height:1.42}
  .player-screen .player-text-card small{margin-top:9px}
  :fullscreen .player-screen .player-slide,
  :fullscreen .player-screen .player-slide.text-right{grid-template-rows:minmax(220px,48%) minmax(0,52%)}
  :fullscreen .player-screen .player-text-card,
  :fullscreen .player-screen .player-text-card.right{padding-top:22px;padding-bottom:82px}
}

@media(max-width:470px){
  .image-style-choice{grid-template-columns:92px minmax(0,1fr) 22px;gap:9px;padding:8px}
  .style-preview{width:92px}
  .image-style-choice strong{font-size:11px}
  .player-screen .player-slide,
  .player-screen .player-slide.text-right{grid-template-rows:minmax(175px,42%) minmax(0,58%)}
}

.editor-header-actions{display:flex;align-items:center;gap:7px;white-space:nowrap}
.editor-header-actions .text-button{padding:7px 9px;border-radius:10px;background:#fff}
@media(max-width:470px){.editor-header-actions{gap:3px}.editor-header-actions .text-button{padding:6px;font-size:10px}}

.slide-count-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px}
.slide-count-grid button{min-height:48px;border:1px solid var(--line);border-radius:15px;background:#fff;font-weight:900}
.slide-count-grid button.selected{border-color:var(--primary);background:var(--lavender);color:var(--primary-dark);box-shadow:0 0 0 2px rgba(102,87,232,.08)}
.slide-count-grid + .fieldset-help{margin:7px 0 12px}
@media(max-width:520px){.slide-count-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}.slide-count-grid button{min-height:43px;padding:6px}}

img.style-preview{display:block;width:108px;height:auto;aspect-ratio:16/10;object-fit:cover;object-position:center;border:1px solid rgba(40,36,59,.08);background:#e9e5df;filter:none;box-shadow:0 5px 15px rgba(43,38,65,.11)}
@media(max-width:760px){img.style-preview{width:118px}}
@media(max-width:470px){img.style-preview{width:92px}}

.suggestions-heading button:disabled{opacity:.45;cursor:wait}

.consent-check input{width:17px;height:17px;margin:0;padding:0;accent-color:var(--primary)}
.account-menu .account-button{display:grid;gap:1px;min-width:110px;text-align:left}.account-menu .account-button span{max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.account-menu .account-button small{color:var(--muted);font-size:8px}
.active-child-card{display:flex;align-items:center;gap:8px;width:100%;margin:-10px 0 18px;padding:11px 14px;border:1px solid var(--line);border-radius:16px;background:#fff;text-align:left}.active-child-card>span{padding:5px 7px;border-radius:8px;background:var(--mint-soft);color:#277b6e;font-size:8px;font-weight:900}.active-child-card strong{font-size:12px}.active-child-card small{margin-left:auto;color:var(--muted);font-size:10px}
.privacy-dialog{width:min(570px,calc(100% - 24px))}.privacy-dialog form{padding:30px}.privacy-icon{display:grid;place-items:center;width:52px;height:52px;border-radius:17px;background:var(--mint-soft);color:#277b6e;font-size:23px}.privacy-dialog h2{margin:7px 0 12px;font-size:25px}.privacy-dialog form>p:not(.auth-eyebrow):not(.form-error){color:var(--muted);font-size:13px;line-height:1.55}.privacy-dialog ul{padding-left:20px;color:var(--ink);font-size:12px;line-height:1.6}.consent-check{display:grid;grid-template-columns:20px 1fr;gap:10px;margin:20px 0;padding:14px;border-radius:15px;background:var(--lavender);font-size:12px;line-height:1.45}.form-error{padding:10px;border-radius:11px;background:var(--coral-soft);color:#913e32;font-size:11px}
.account-dialog{width:min(780px,calc(100% - 24px));max-height:90dvh}.account-dialog-shell{padding:26px;overflow:auto}.account-dialog-shell>header p{margin:5px 0 0;color:var(--muted);font-size:11px}.account-section{padding:20px 0;border-top:1px solid var(--line)}.account-section-title,.data-actions{display:flex;align-items:center;justify-content:space-between;gap:18px}.account-section h3,.child-form h3{margin:0;font-size:16px}.account-section p,.child-form p{margin:4px 0 0;color:var(--muted);font-size:11px;line-height:1.45}.account-section .secondary-button,.dialog-actions .secondary-button,.dialog-actions .danger-button{width:auto;min-height:40px;padding:8px 13px;border-radius:12px;font-size:10px;text-decoration:none}.child-list,.session-list{display:grid;gap:9px;margin-top:14px}.child-card,.session-list article{display:flex;align-items:center;justify-content:space-between;gap:13px;padding:13px;border:1px solid var(--line);border-radius:15px;background:#fff}.child-card.active{border-color:#bdb5fb;background:var(--lavender)}.child-card>div:first-child,.session-list article>div{display:grid;gap:3px;min-width:0}.child-card small,.session-list small{overflow-wrap:anywhere;color:var(--muted);font-size:9px}.child-card>div:last-child{display:flex;gap:5px}.child-card button,.session-list button{padding:7px 8px;border:1px solid var(--line);border-radius:9px;background:#fff;color:var(--primary-dark);font-size:9px;font-weight:850}.child-card button:last-child{color:#a5483b}.child-form{margin:0 0 20px;padding:18px!important;border:1px solid #cbc5fb;border-radius:18px;background:#f7f5ff}.child-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 12px}.child-form-grid label{margin:12px 0 0;font-size:11px}.child-form-grid .wide{grid-column:1/-1}.child-form-grid input,.child-form-grid select,.child-form-grid textarea{width:100%;margin-top:6px;padding:11px 12px;border:1px solid var(--line);border-radius:12px;background:#fff}.dialog-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-top:14px}.dialog-actions .primary-button{width:auto;min-height:40px;padding:8px 14px;border-radius:12px}.danger-button{border:1px solid #f0b7aa;background:var(--coral-soft);color:#913e32;font-weight:850}.account-empty{margin:0!important;padding:17px;border:1px dashed var(--line);border-radius:14px;text-align:center}.data-actions{align-items:flex-end}.session-list:empty:after{content:'Aucune session active';color:var(--muted);font-size:11px}
@media(max-width:620px){.account-menu .account-button span{display:none}.account-menu .account-button{min-width:0}.active-child-card{align-items:flex-start;flex-wrap:wrap}.active-child-card small{flex-basis:100%;margin-left:0}.account-dialog-shell{padding:18px}.account-section-title,.data-actions{align-items:flex-start;flex-direction:column}.child-card,.session-list article{align-items:flex-start;flex-direction:column}.child-card>div:last-child{width:100%;flex-wrap:wrap}.child-form-grid{grid-template-columns:1fr}.child-form-grid .wide{grid-column:auto}.dialog-actions{width:100%;flex-wrap:wrap}.dialog-actions>*{flex:1}.privacy-dialog form{padding:22px}}
.suggestions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.suggestions button{display:flex;align-items:center;gap:11px;min-height:64px;padding:12px 14px;text-align:left;line-height:1.32;box-shadow:0 4px 14px rgba(43,38,65,.04);transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease}
.suggestions button:hover{transform:translateY(-1px);box-shadow:0 8px 20px rgba(43,38,65,.08)}
.suggestion-icon{display:grid;place-items:center;flex:0 0 34px;height:34px;border-radius:11px;background:var(--lavender);font-size:18px}
.suggestion-loading{grid-column:1/-1;margin:0;padding:18px;border:1px dashed var(--line);border-radius:16px;color:var(--muted);text-align:center;font-size:13px}
.suggestions.loading{opacity:.7}
@media(max-width:580px){.suggestions{grid-template-columns:1fr}.suggestions button{min-height:58px}}

.idea-composer{display:grid;gap:10px}.voice-input-controls{display:flex;align-items:center;gap:12px}.voice-input-button{display:inline-flex;align-items:center;justify-content:center;gap:9px;flex:0 0 auto;min-height:45px;padding:10px 15px;border:1px solid #c7c1f5;border-radius:15px;background:var(--lavender);color:var(--primary-dark);font-size:13px;font-weight:900;transition:transform .16s,background .16s,border-color .16s}.voice-input-button:hover:not(:disabled){transform:translateY(-1px);border-color:var(--primary)}.voice-input-button:disabled{border-color:var(--line);background:#efede8;color:var(--muted);cursor:not-allowed}.voice-input-icon{position:relative;display:grid;place-items:center;width:25px;height:25px;border-radius:50%;background:var(--primary);color:#fff;font-size:0}.voice-input-icon:before{content:"";display:block;width:8px;height:13px;border-radius:6px 6px 5px 5px;background:currentColor}.voice-input-icon:after{content:"";position:absolute;left:6px;top:12px;width:10px;height:6px;border:2px solid currentColor;border-top:0;border-radius:0 0 8px 8px}.voice-input-button[data-state="listening"]{border-color:#f08a77;background:var(--coral-soft);color:#913e32}.voice-input-button[data-state="listening"] .voice-input-icon{background:var(--coral);animation:voicePulse 1.25s ease-in-out infinite}.voice-input-button[data-state="error"]{border-color:#f0b7aa;background:var(--coral-soft);color:#913e32}.voice-meter{position:relative;flex:0 0 80px;height:8px;overflow:hidden;border-radius:999px;background:#e3dfd8}.voice-meter span{position:absolute;inset:0;border-radius:inherit;background:linear-gradient(90deg,var(--primary),#70b889,var(--coral));transform:scaleX(0);transform-origin:left center;transition:transform 80ms linear}.voice-input-status{flex:1;margin:0;color:var(--muted);font-size:11px;font-weight:650;line-height:1.4}@keyframes voicePulse{50%{box-shadow:0 0 0 7px rgba(242,120,101,.16);transform:scale(1.04)}}
@media(max-width:520px){.voice-input-controls{align-items:stretch;flex-direction:column}.voice-input-button{width:100%}.voice-meter{width:100%;flex-basis:8px}.voice-input-status{text-align:center}}

.auth-screen{min-height:100dvh;display:grid;place-items:center;padding:24px;background:linear-gradient(145deg,#f2f0e9 0,#f8f7f3 52%,#eceff3 100%)}.auth-card{width:min(430px,100%);padding:34px 34px 30px;border:1px solid rgba(54,51,72,.1);border-radius:22px;background:#fff;box-shadow:0 22px 65px rgba(37,34,54,.11);text-align:left}.auth-wordmark{display:flex;align-items:center;gap:9px;padding-bottom:24px;border-bottom:1px solid var(--line)}.auth-wordmark span{width:11px;height:11px;border-radius:50%;background:var(--primary);box-shadow:0 0 0 5px var(--lavender)}.auth-wordmark strong{font-size:14px;font-weight:900;letter-spacing:-.15px}.auth-card .auth-eyebrow{margin:27px 0 9px;color:var(--primary);font-size:9px;font-weight:900;letter-spacing:.14em}.auth-card h1{max-width:330px;margin:0;font-size:31px;line-height:1.08;letter-spacing:-1px;text-wrap:balance}.auth-card>p:not(.auth-eyebrow):not(.auth-error){margin:12px 0 25px;color:var(--muted);font-size:13px;line-height:1.55}.google-login-option{display:flex;align-items:center;justify-content:space-between;gap:18px;min-height:58px;padding:7px 8px 7px 15px;border:1px solid var(--line);border-radius:16px;background:#fafafa}.google-login-option>span{font-size:12px;font-weight:850}.google-login-button{display:flex;align-items:center;justify-content:center;width:44px;min-height:44px;overflow:hidden;border-radius:50%}.auth-card>small{display:flex;align-items:center;gap:6px;margin-top:20px;color:var(--muted);font-size:9px;line-height:1.5}.auth-card>small span{display:grid;place-items:center;width:16px;height:16px;border-radius:50%;background:var(--mint-soft);color:#277b6e;font-size:8px;font-weight:900}.auth-error{margin:14px 0 0!important;padding:11px;border-radius:12px;background:var(--coral-soft);color:#913e32!important;font-size:12px!important}.account-menu{display:flex;align-items:center;gap:8px}.account-menu>span{max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);font-size:11px;font-weight:800}.account-menu button{padding:8px 10px;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--primary-dark);font-size:10px;font-weight:850}@media(max-width:620px){.auth-card{padding:27px 22px}.account-menu>span{display:none}.account-menu button{padding:8px}.ai-status{display:none}}

.editorial-contract{margin-top:18px;padding:17px;border:1px solid rgba(102,87,232,.2);border-radius:18px;background:rgba(255,255,255,.62)}
.editorial-contract>strong{display:block;margin-top:13px;font-size:13px}.editorial-contract>p{margin:5px 0 0!important;color:var(--ink)!important;font-size:13px!important;line-height:1.45}
.contract-meta,.contract-rules{display:flex;flex-wrap:wrap;gap:7px}.contract-meta span{padding:6px 9px;border-radius:99px;background:var(--lavender);color:var(--primary-dark);font-size:10px;font-weight:850}
.contract-rules{margin-top:12px}.contract-rules span{padding:6px 9px;border-radius:10px;font-size:10px;font-weight:750}.contract-rules .required{background:var(--mint-soft);color:#277b6e}.contract-rules .forbidden{background:var(--coral-soft);color:#9b4d43}
.question-impact{display:block;margin:7px 0 0;color:var(--primary-dark);font-weight:750}
.source-panel{margin:18px 0;padding:19px;border:1px solid var(--line);border-radius:20px;background:#fff}.source-panel header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:12px}.source-panel header small{color:var(--primary);font-size:10px;font-weight:900;letter-spacing:.08em}.source-panel h2{margin:3px 0 0;font-size:17px}.source-panel header>span{color:var(--muted);font-size:10px;text-align:right}.source-panel>div{display:grid;gap:8px}.source-panel a{display:flex;justify-content:space-between;gap:15px;padding:11px 12px;border-radius:13px;background:var(--soft);color:var(--ink);text-decoration:none}.source-panel a:hover{background:var(--lavender)}.source-panel a strong{font-size:12px}.source-panel a small{color:var(--muted);font-size:10px;text-align:right}
@media(max-width:580px){.source-panel header,.source-panel a{display:grid}.source-panel header>span,.source-panel a small{text-align:left}}

.quality-panel{margin:18px 0;padding:19px;border:1px solid rgba(102,87,232,.18);border-radius:21px;background:linear-gradient(145deg,#fff,#f5f2ff)}
.quality-panel header{display:flex;align-items:center;justify-content:space-between;gap:16px}.quality-panel header small{color:var(--primary);font-size:10px;font-weight:900;letter-spacing:.08em}.quality-panel h2{margin:3px 0 0;font-size:17px}.quality-panel header>strong{display:grid;place-items:center;min-width:68px;height:46px;padding:0 11px;border-radius:15px;background:var(--primary);color:#fff;font-size:15px}.quality-panel>p{margin:12px 0 0;color:var(--muted);font-size:11px;line-height:1.45}
.quality-dimensions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:14px}.quality-dimension{display:grid;gap:3px;padding:10px;border:1px solid rgba(89,186,164,.22);border-radius:13px;background:var(--mint-soft)}.quality-dimension span{color:var(--muted);font-size:9px;font-weight:750}.quality-dimension strong{color:#277b6e;font-size:16px}.quality-dimension.needs-review{border-color:rgba(242,120,101,.25);background:var(--coral-soft)}.quality-dimension.needs-review strong{color:#9b4d43}
.slide-editor-kicker{display:flex;align-items:center;justify-content:space-between;gap:8px}.slide-quality{padding:4px 7px;border-radius:99px;background:var(--mint-soft);color:#277b6e;font-size:9px;font-weight:900}.slide-quality.needs-review{background:var(--coral-soft);color:#9b4d43}
.ending-question{font-size:20px!important;font-weight:900;line-height:1.35!important}.ending-instruction{margin-top:-5px!important;color:var(--muted)}.ending-answer{margin:16px 0;padding:14px;border:1px solid rgba(102,87,232,.18);border-radius:16px;background:var(--lavender);text-align:left}.ending-answer strong{font-size:12px}.ending-answer p{margin:5px 0 0!important;color:var(--ink)!important;font-size:12px!important;line-height:1.45!important}
.layout-settings{display:grid;grid-template-columns:1fr 1fr;gap:10px 14px;margin:18px 0;padding:15px;border:1px solid var(--line);border-radius:16px;background:var(--soft)}.layout-settings legend{grid-column:1/-1;margin:0;padding:0 5px}.layout-settings label{margin:0;font-size:11px}.layout-settings select{grid-column:1/-1;width:100%;padding:11px;border:1px solid var(--line);border-radius:12px;background:#fff}.layout-settings input[type="range"]{width:100%;padding:0;border:0;box-shadow:none}.layout-settings output{float:right;color:var(--primary)}
@media(max-width:640px){.quality-dimensions{grid-template-columns:repeat(2,minmax(0,1fr))}.quality-panel{padding:16px}}
.learning-plan{margin:0 0 18px;border:1px solid var(--line);border-radius:18px;background:#fff}.learning-plan summary{padding:14px 16px;cursor:pointer;color:var(--primary-dark);font-size:12px;font-weight:900}.learning-plan>div{display:grid;gap:8px;padding:0 14px 14px}.learning-plan article{display:grid;grid-template-columns:28px 1fr;gap:10px;align-items:start;padding:10px;border-radius:13px;background:var(--soft)}.learning-plan article>span{display:grid;place-items:center;width:27px;height:27px;border-radius:9px;background:var(--lavender);color:var(--primary-dark);font-size:10px;font-weight:900}.learning-plan article strong{font-size:11px;line-height:1.35}.learning-plan article p{margin:3px 0 0;color:var(--muted);font-size:10px;line-height:1.4}
