@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');
:root{--bg:#f6f4ef;--ink:#24241f;--muted:#7b7a70;--line:#e3e0d7;--accent:#ff664d}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:Manrope,Arial,sans-serif;font-size:15px}button,input,textarea,select{font:inherit}button,a,label.upload-zone,.attachment,summary{ -webkit-tap-highlight-color:transparent}button{cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #6c50ad;outline-offset:4px}.shell{max-width:700px;margin:auto;padding:0 26px 100px}header{height:94px;display:flex;align-items:center;justify-content:space-between}.logo{font-size:39px;letter-spacing:-3px;font-weight:800;color:var(--ink);text-decoration:none}.logo span{color:var(--accent);display:inline-block;margin-left:4px;font-size:36px}.avatar{background:#e9e6de;border:1px solid #dedbd2;border-radius:50%;width:38px;height:38px;font-weight:800}.demo-banner{display:flex;align-items:center;gap:7px;font-size:11px;font-weight:800;letter-spacing:1px;border-block:1px solid var(--line);padding:13px 0}.demo-banner>span:last-child{margin-left:auto;letter-spacing:0;color:var(--muted);font-weight:500;font-size:12px}.status-dot{width:6px;height:6px;background:var(--accent);border-radius:50%}.heading{padding:35px 0 25px}.eyebrow{font-size:11px;letter-spacing:1.8px;font-weight:800;color:var(--muted)}h1{font-size:58px;line-height:1.04;letter-spacing:-3.5px;margin:17px 0 17px;font-weight:800}h1 em{font-family:Georgia,serif;font-weight:400;color:var(--accent)}.heading p{color:var(--muted);font-size:15px}.step-heading{display:flex;align-items:center;gap:10px;margin:28px 0 15px}.step-heading>span{color:var(--accent);font-size:13px;font-weight:800}.step-heading h2{font-size:18px;letter-spacing:-.5px;margin:0}.step-heading small{margin-left:auto;font-size:12px;color:var(--muted)}.upload-zone{display:flex;align-items:center;flex-direction:column;border:1.5px dashed #c6c2b5;background:#efede5;border-radius:20px;padding:24px 15px;cursor:pointer;transition:.2s}.upload-zone:hover{background:#eae7dd;border-color:var(--accent)}.upload-icon{display:grid;place-items:center;width:43px;height:43px;border-radius:50%;background:var(--ink);color:white;font-size:25px;margin-bottom:12px}.upload-zone strong{font-size:17px}.upload-zone>span:not(.upload-icon){font-size:13px;color:var(--muted);margin-top:7px}.format-tag{font-size:10px!important;letter-spacing:1px;margin-top:17px!important}#sourceVideo{display:block;width:100%;max-height:380px;background:#20201d;border-radius:18px}#videoPreview{text-align:center}.styles{display:flex;gap:10px;overflow-x:auto;padding:0 0 7px;scroll-snap-type:x mandatory}.style-card{flex:1;min-width:130px;border:0;padding:0;background:none;text-align:left;color:var(--ink);scroll-snap-align:start}.style-art{height:174px;position:relative;overflow:hidden;border-radius:13px;padding:16px;display:flex;align-items:center;border:3px solid transparent}.style-card.selected .style-art{outline:2px solid var(--ink);outline-offset:3px;margin:4px 4px 0}.style-card.selected{padding-top:0}.style-card strong{display:flex;justify-content:space-between;padding:13px 3px 4px;font-size:14px}.style-card strong span{visibility:hidden;color:var(--accent)}.style-card.selected strong span{visibility:visible}.style-card small{font-size:11px;color:var(--muted);padding-left:3px}.dynamic{background:#ff7259;color:#26231e}.dynamic b{font-size:24px;line-height:1.25;z-index:1;transform:rotate(-7deg);letter-spacing:-1px}.dynamic mark{background:#d1ef6d;color:#24241f;padding:0 3px}.dynamic i{position:absolute;right:10px;top:5px;font-style:normal;font-size:35px}.art-orbit{position:absolute;width:170px;height:170px;border:1px solid #b9503e;border-radius:50%;left:35px;top:55px}.minimal{background:#dfdfd6}.minimal b{font-size:28px;font-weight:500;z-index:1;line-height:1.2;letter-spacing:-1px}.minimal b i{font-family:Georgia,serif;font-weight:400}.art-line{position:absolute;background:#c6c6bb;width:70px;height:220px;transform:rotate(30deg);right:-10px;top:-5px}.tiny{position:absolute;bottom:12px;font-size:9px;letter-spacing:2px}.calm{background:#b8aa94}.calm b{font-size:19px;z-index:1;line-height:1.3;font-weight:500}.calm i{font-family:Georgia,serif}.art-circle{position:absolute;width:150px;height:150px;border-radius:50%;background:#d8cfbd;left:50px;top:55px}.settings{border-block:1px solid var(--line);margin-top:22px}summary{list-style:none;display:flex;justify-content:space-between;padding:19px 0;cursor:pointer;font-size:13px;font-weight:700}summary::-webkit-details-marker{display:none}summary span{font-size:12px;color:var(--muted);font-weight:500}.settings-inner{display:grid;gap:17px;padding:0 0 20px}.settings-inner label,.field-label{font-size:13px}select{display:block;width:100%;margin-top:8px;padding:10px;background:#eeece4;border:1px solid var(--line);border-radius:8px;color:var(--ink)}.swatches{display:flex;gap:12px;margin-top:10px}.swatch{width:27px;height:27px;border:3px solid var(--bg);border-radius:50%;background:var(--swatch)}.swatch.selected{outline:1px solid var(--ink)}.toggle-label{display:flex;align-items:center;justify-content:space-between}.toggle-label input{accent-color:var(--accent);width:18px;height:18px}.subtitle-sample{padding:25px 15px;background:#24241f;border-radius:12px;text-align:center;color:#fff;font-size:20px;font-weight:800}.subtitle-sample mark{background:var(--accent);color:#222;padding:2px 5px}.settings-inner>small{color:var(--muted);font-size:12px}.ideas{background:#fffdf8;border:1px solid var(--line);border-radius:16px;padding:17px}.ideas>label{font-size:13px;font-weight:700}textarea{display:block;resize:vertical;width:100%;border:0;background:transparent;padding:13px 0;color:var(--ink);font-size:13px;line-height:1.7}textarea::placeholder{color:#9a978d}.idea-actions{display:flex;gap:8px;border-top:1px solid var(--line);padding-top:12px}.attachment{display:inline-flex;align-items:center;gap:5px;border:1px solid var(--line);border-radius:20px;background:transparent;padding:8px 13px;font-size:13px;cursor:pointer}.photo-grid{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.photo-item{position:relative}.photo-item img{width:65px;height:65px;object-fit:cover;border-radius:8px}.photo-item button{position:absolute;right:-4px;top:-5px;width:20px;height:20px;border:0;background:var(--ink);color:white;border-radius:50%}#voice audio{max-width:100%;margin-top:15px}#voice small{display:block;color:var(--muted);font-size:12px}#recordStatus{font-size:13px;color:var(--muted);margin-bottom:0}.submit-card{margin-top:28px}.submit-card strong{font-size:16px}.submit-card p{font-size:13px;color:var(--muted);line-height:1.6}.primary{width:100%;display:flex;justify-content:space-between;align-items:center;background:var(--ink);color:#fff;border:0;border-radius:13px;padding:18px 20px;font-weight:700;font-size:14px;margin-top:16px}.primary:hover{background:#3b3b32}.primary span{color:var(--accent);font-size:22px}.submit-card>small{display:block;text-align:center;font-size:11px;color:var(--muted);margin-top:11px}footer{display:flex;justify-content:space-between;color:var(--muted);font-size:13px;border-top:1px solid var(--line);padding:20px 0;margin-top:40px}footer span{font-size:11px}.bottom-nav{position:fixed;bottom:0;left:50%;transform:translateX(-50%);display:flex;width:100%;max-width:700px;background:#f6f4eff2;backdrop-filter:blur(18px);padding:10px 15px calc(12px + env(safe-area-inset-bottom));border-top:1px solid var(--line);z-index:10}.bottom-nav button{display:flex;flex:1;flex-direction:column;align-items:center;gap:5px;border:0;background:none;color:var(--muted);font-size:11px;font-weight:700;padding:5px}.bottom-nav button>span{font-size:24px;line-height:26px}.bottom-nav button.active{color:var(--accent)}.page{display:none}.page.active{display:block}.balance-card{background:var(--ink);color:white;border-radius:20px;padding:25px}.balance-card>span{font-size:12px;letter-spacing:2px;color:#bbbbae}.balance-card strong{display:block;font-size:60px;color:#d1ef6d}.balance-card p{font-size:13px;color:#bfbfb4}.notice{background:#eeece4;border-radius:15px;padding:20px;margin-top:20px;line-height:1.8;font-size:13px}.notice p{color:var(--muted);margin-bottom:0}.profile-card{display:flex;align-items:center;gap:15px;margin:15px 0 30px}.profile-avatar{width:55px;height:55px;display:grid;place-items:center;background:#d1ef6d;border-radius:50%;font-size:24px;font-weight:800}.profile-card h2{font-size:17px;margin:0 0 5px}.profile-card p{font-size:13px;color:var(--muted);margin:0}.menu-row{display:flex;justify-content:space-between;align-items:center;width:100%;padding:20px 0;border:0;border-bottom:1px solid var(--line);background:none;color:var(--ink);text-decoration:none;font-size:13px;text-align:left}.menu-row span{font-size:12px;color:var(--muted)}.text-button{border:0;background:none;text-decoration:underline;font-size:13px;padding:12px 0;color:var(--muted)}.danger{color:#a74736;margin-top:15px}.empty-state{padding:35px 22px;text-align:center;border:1px dashed #c9c5b9;border-radius:20px}.empty-state>span{font-size:40px;color:var(--accent)}.empty-state h2{font-size:19px}.empty-state p{font-size:13px;color:var(--muted);line-height:1.8}.project{background:#fffdf8;border:1px solid var(--line);border-radius:16px;padding:20px;margin-bottom:14px}.project h2{font-size:17px;margin:10px 0}.project small,.project p{font-size:13px;color:var(--muted);overflow-wrap:anywhere;line-height:1.6}.badge{font-size:11px;letter-spacing:1px;color:#956445;background:#eee3d3;border-radius:20px;padding:5px 8px}.project button{background:none;border:1px solid var(--line);border-radius:8px;padding:8px 12px;font-size:13px;margin:7px 7px 0 0}#toast{position:fixed;bottom:100px;left:50%;transform:translateX(-50%);background:var(--ink);color:white;border-radius:12px;padding:14px 18px;max-width:90%;width:max-content;font-size:13px;z-index:20;box-shadow:0 8px 30px #0002}[hidden]{display:none!important}@media(min-width:600px){h1{font-size:76px}.heading{padding-top:45px}.style-art{height:235px}.dynamic b{font-size:32px}.minimal b{font-size:38px}.calm b{font-size:27px}.shell{padding-inline:40px}.demo-banner{font-size:12px}.style-card small{font-size:13px}}@media(max-width:360px){.shell{padding-inline:17px}h1{font-size:51px}.demo-banner>span:last-child{font-size:10px}.style-card{min-width:120px}}

button:disabled{opacity:.5;cursor:wait}#uploadProgress,#serverStatus{font-size:13px;line-height:1.6;color:var(--muted)}
/* Live style studio */
.live-preview{position:relative;width:min(100%,340px);aspect-ratio:9/12;margin:0 auto;overflow:hidden;border-radius:22px;background:#b0a18c;isolation:isolate;touch-action:pan-y;--caption-accent:#ff664d;--caption-size:30px}.preview-backdrop{position:absolute;inset:0;background:linear-gradient(150deg,#c5c7ac,#979681 55%,#6c735f)}.preview-sun{position:absolute;top:12%;left:13%;width:42%;aspect-ratio:1;background:#f6deaf;border-radius:50%;box-shadow:0 0 80px #e4cb9770}.preview-arch{position:absolute;width:66%;height:87%;right:-8%;bottom:-5%;background:linear-gradient(100deg,#d8c5a5,#b8a38a);border-radius:140px 140px 0 0;transform:rotate(-9deg);box-shadow:-15px 10px 35px #313e3440}.preview-shadow{position:absolute;left:-30%;bottom:0;width:110%;height:40%;background:#4b5e4760;transform:rotate(-28deg);filter:blur(12px)}.preview-scene-label{position:absolute;top:47%;left:10%;font-size:8px;letter-spacing:5px;writing-mode:vertical-rl;color:#3e4a3b}.live-preview video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.preview-top{position:absolute;top:17px;left:15px;right:15px;display:flex;align-items:center;justify-content:space-between;z-index:2}.preview-badge{font-size:8px;letter-spacing:1.3px;background:#24241f65;color:#fff;padding:7px 10px;border:1px solid #ffffff30;border-radius:20px;backdrop-filter:blur(8px)}#previewPlay{width:32px;height:32px;border-radius:50%;border:1px solid #ffffff70;background:#24241f65;color:white}.preview-caption{position:absolute;left:6%;right:6%;bottom:16%;padding:0!important;display:flex;align-items:center;flex-direction:column;gap:5px;text-align:center;font-size:var(--caption-size);line-height:1.15;color:white;font-weight:800;text-shadow:0 2px 12px #0008;transition:bottom .2s}.preview-caption>span:last-child{font-size:.55em;letter-spacing:0}.preview-caption mark{background:var(--caption-accent);color:#24241f;padding:3px 9px;text-shadow:none;line-height:1.2}.live-preview[data-style=dynamic] .preview-caption{text-transform:uppercase;font-weight:800;letter-spacing:-1px}.live-preview[data-style=dynamic] .preview-caption mark{transform:rotate(-3deg)}.live-preview[data-style=minimal] .preview-caption{font-weight:500;letter-spacing:-.8px;gap:3px}.live-preview[data-style=minimal] .preview-caption mark{background:transparent;color:var(--caption-accent);font-weight:800;text-shadow:0 2px 10px #000a;padding:0 8px}.live-preview[data-style=calm] .preview-caption{border:1px solid #ffffff60;border-radius:16px;background:#24241f45;backdrop-filter:blur(12px);padding:15px 8px!important;font-weight:500;gap:5px}.live-preview[data-style=calm] .preview-caption mark{background:none;color:var(--caption-accent);font-style:italic;font-weight:700;padding:0}.live-preview[data-style=girls] .preview-caption{text-transform:uppercase;font-weight:800;letter-spacing:-.5px}.live-preview[data-style=guys] .preview-caption{text-transform:lowercase;font-weight:800;letter-spacing:-.5px}.live-preview[data-style=guys] .preview-caption mark{background:none;color:var(--caption-accent);padding:0}.live-preview[data-position=center] .preview-caption{bottom:43%;transform:translateY(50%)}.preview-bottom{position:absolute;bottom:17px;left:17px;right:17px;display:flex;justify-content:space-between;color:#fff;font-size:9px;text-shadow:0 1px 5px #0009}.preview-bottom>span:first-child{font-weight:800}.preview-bottom>span:last-child{font-size:8px}.preview-help{text-align:center;font-size:10px;line-height:1.7;color:var(--muted);margin:12px auto 18px;max-width:340px}.style-carousel-controls{display:flex;align-items:center;justify-content:space-between;max-width:340px;margin:0 auto 16px;padding:8px;background:#eeece4;border-radius:40px}.style-carousel-controls button{width:37px;height:37px;border:1px solid #d6d2c7;border-radius:50%;background:var(--bg);font-size:20px;color:var(--ink)}.carousel-title{display:flex;align-items:center;flex-direction:column;gap:2px}.carousel-title strong{font-size:16px}.carousel-title>span{font-size:11px;color:var(--muted)}.style-rail{position:relative;gap:9px;padding:5px 3px 10px;scrollbar-width:none}.style-rail::-webkit-scrollbar,.font-rail::-webkit-scrollbar,.color-rail::-webkit-scrollbar{display:none}.style-rail .style-card{min-width:130px;flex:1;scroll-snap-align:center;background:#eeece4;border:1px solid transparent;border-radius:12px;padding:12px!important;transition:background .15s}.style-rail .style-card.selected{background:#fffdf8;border-color:var(--ink)}.style-rail .style-card strong{padding:8px 0 4px;font-size:13px}.style-rail .style-card small{padding:0;font-size:10px}.style-number{font-size:11px;color:var(--muted)}.appearance-panel{margin-top:20px}.appearance-label{display:flex;justify-content:space-between;font-size:11px;letter-spacing:1.2px;font-weight:800;margin:20px 0 10px}.appearance-label>span{color:var(--muted);font-weight:500;font-size:11px;letter-spacing:0}.font-rail,.color-rail{display:flex;overflow-x:auto;gap:8px;scrollbar-width:none;padding:3px 1px 5px;scroll-snap-type:x proximity}.font-rail button{flex-shrink:0;padding:12px 16px;border:1px solid var(--line);border-radius:25px;background:transparent;font-size:13px;color:var(--ink);scroll-snap-align:start}.font-rail button.selected{color:#fff;background:var(--ink);border-color:var(--ink)}.color-rail .swatch{display:flex;align-items:center;gap:7px;width:auto;height:auto;background:transparent;flex-shrink:0;border:1px solid var(--line);border-radius:25px;padding:11px 14px;font-size:13px;color:var(--ink);outline:0;scroll-snap-align:start}.color-rail .swatch i{width:10px;height:10px;background:var(--swatch);border:1px solid #0002;border-radius:50%}.color-rail .swatch.selected{background:#fffdf8;border-color:var(--ink);font-weight:800}.size-label{display:flex;justify-content:space-between;align-items:center}.size-label output{background:#e8e5dc;border-radius:5px;padding:4px 8px;font-size:13px}input[type=range]{width:100%;accent-color:var(--accent);margin:0 0 5px}@media(min-width:600px){.style-rail .style-card{min-width:150px}.style-rail .style-card small{font-size:12px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

/* Compact controls and persistent preview */
.studio-workspace{position:relative}.preview-frame{position:static;padding:0}
.style-carousel-controls{margin-bottom:7px;padding:4px;max-width:280px}.style-carousel-controls button{width:30px;height:30px;font-size:17px}.carousel-title strong{font-size:13px}.carousel-title>span{display:none}.style-rail{gap:6px;padding:3px 1px 6px;justify-content:flex-start}.style-rail .style-card{flex:0 0 auto;min-width:0!important;padding:8px 13px!important;border-radius:22px;min-height:36px;text-align:center}.style-rail .style-card strong{padding:0;font-size:13px;gap:7px}.style-rail .style-card .style-number,.style-rail .style-card small{display:none}.style-rail .style-card strong span{display:none}.style-rail .style-card.selected{background:var(--ink);color:#fff}.appearance-panel{margin-top:8px}.appearance-label{font-size:10px;margin:12px 0 6px;letter-spacing:.9px}.appearance-label>span{font-size:10px}.font-rail,.color-rail{gap:6px;padding:2px 1px 4px}.font-rail button{font-size:12px;padding:8px 11px;min-height:34px}.color-rail .swatch{font-size:12px;gap:5px;padding:8px 10px;min-height:34px}.color-rail .swatch i{width:8px;height:8px}.settings{margin-top:12px}summary{padding:13px 0;font-size:13px}summary span{font-size:11px}.settings-inner{gap:12px;padding-bottom:14px}.step-heading{margin-top:22px}.preview-help{font-size:9px;margin:8px auto 11px}
.studio-workspace button,.studio-workspace input,.studio-workspace select,.studio-workspace textarea,.studio-workspace summary{scroll-margin-top:16px;scroll-margin-bottom:100px}

/* Tighter page rhythm; preview scrolls naturally with the form. */
.shell{padding-inline:18px}header{height:60px}.logo{font-size:32px;letter-spacing:-2px}.logo span{font-size:29px}.avatar{width:32px;height:32px;font-size:13px}.demo-banner{padding:9px 0;font-size:10px;letter-spacing:.7px}.demo-banner>span:last-child{font-size:11px}.heading{padding:18px 0 7px}.eyebrow{font-size:10px;letter-spacing:1.2px}h1{font-size:clamp(25px,5.7vw,36px);line-height:1.15;letter-spacing:-1.2px;margin:10px 0 8px}.heading p{font-size:13px;margin:0}.step-heading{margin:18px 0 10px;gap:8px}.step-heading h2{font-size:16px}.step-heading small{font-size:11px}.upload-zone{padding:14px 12px;border-radius:14px}.upload-icon{width:32px;height:32px;font-size:22px;margin-bottom:7px}.upload-zone strong{font-size:15px}.upload-zone>span:not(.upload-icon){font-size:12px;margin-top:4px}.format-tag{margin-top:9px!important;font-size:9px!important}.live-preview{width:min(100%,300px);border-radius:16px}.preview-person{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 35%}.live-preview:after{content:"";position:absolute;inset:45% 0 0;background:linear-gradient(transparent,#0006);z-index:0;pointer-events:none}.preview-caption,.preview-bottom{z-index:1}.ideas{padding:13px;border-radius:13px}.submit-card{margin-top:19px}.primary{padding:14px 16px;margin-top:11px;font-size:13px;border-radius:11px}footer{margin-top:26px;padding:16px 0}@media(min-width:600px){.shell{padding-inline:26px}.heading{padding-top:22px}h1{font-size:36px}}

/* Small options; details open separately. */
.features-section{margin-top:14px}.features-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.features-heading h3{font-size:13px;letter-spacing:-.3px;margin:0}.features-heading>span{font-size:11px;color:var(--muted)}.features-grid{display:flex;flex-wrap:wrap;gap:6px}.feature-option{position:relative;width:calc((100% - 12px)/3);max-width:132px;background:#eeece4;border:1px solid var(--line);border-radius:9px;min-width:0}.feature-toggle{display:flex;align-items:center;gap:6px;min-height:52px;padding:8px 19px 8px 7px;cursor:pointer}.feature-toggle strong{font-size:11px;line-height:1.35;font-weight:600;overflow-wrap:normal}.feature-toggle input{position:absolute;opacity:0;width:1px;height:1px}.feature-switch{position:relative;flex:0 0 12px;width:12px;height:12px;border:1px solid #b7b3a7;border-radius:3px;background:transparent}.feature-toggle input:checked+.feature-switch{background:var(--ink);border-color:var(--ink)}.feature-toggle input:checked+.feature-switch:after{content:'✓';position:absolute;color:white;font-size:11px;line-height:10px;left:1px;top:0}.feature-option:has(input:checked){background:#fffdf8;border-color:#b8b3a6}.feature-option:has(input:focus-visible){outline:2px solid #6c50ad;outline-offset:2px}.feature-option.is-disabled .feature-toggle{opacity:.4;cursor:default}.feature-help{position:absolute;right:2px;top:2px;width:20px;height:20px;display:grid;place-items:center;padding:0;border:0;background:none;color:var(--muted);font-size:11px;cursor:pointer}.feature-help:before{content:'';position:absolute;width:12px;height:12px;border:1px solid #c5c0b3;border-radius:50%}.feature-help:hover{color:var(--ink)}.features-note{font-size:10px;line-height:1.6;color:var(--muted);margin:7px 0 0}#previewEmoji{font-size:.65em}#featureHelpDialog{width:min(320px,calc(100vw - 36px));border:1px solid var(--line);border-radius:17px;background:var(--bg);padding:25px 20px;color:var(--ink);box-shadow:0 16px 70px #0003}#featureHelpDialog::backdrop{background:#24241f66;backdrop-filter:blur(3px)}#featureHelpDialog h3{font-size:17px;margin:0 22px 12px 0}#featureHelpDialog p{font-size:13px;line-height:1.8;margin:0 0 14px}#featureHelpDialog small{font-size:11px;color:var(--muted);line-height:1.6;display:block}#closeFeatureHelp{position:absolute;right:8px;top:8px;border:0;background:none;width:28px;height:28px;font-size:22px;color:var(--muted)}@media(min-width:600px){.feature-toggle strong{font-size:12px}.feature-toggle{min-height:46px}}@media(max-width:340px){.feature-toggle{gap:4px;padding-left:6px}.feature-toggle strong{font-size:10px}.feature-switch{flex-basis:11px;width:11px;height:11px}}
/* Reference-sized buttons: one line, intrinsic width, 28px high. */
.features-grid{display:flex;flex-wrap:wrap;gap:6px}.feature-option{display:inline-flex;align-items:center;flex:0 0 auto;width:auto;max-width:none;height:28px;min-height:0;border-radius:10px}.feature-toggle{min-height:0;height:26px;padding:0 4px 0 9px;gap:5px}.feature-toggle strong{font-size:13px;line-height:1;white-space:nowrap;font-weight:500}.feature-switch{flex:0 0 10px;width:10px;height:10px;border-radius:3px}.feature-toggle input:checked+.feature-switch:after{font-size:10px;line-height:8px;left:0;top:0}.feature-help{position:relative;right:auto;top:auto;flex:0 0 20px;width:20px;height:26px;margin-right:3px;font-size:11px}.feature-help:before{width:11px;height:11px}

.preset-label{display:flex;justify-content:space-between;align-items:center;font-size:10px;font-weight:800;letter-spacing:1px;margin:12px 0 7px}.preset-label>span{font-weight:500;letter-spacing:0;color:var(--muted)}.style-carousel-controls{max-width:none;width:100%;border-radius:13px;padding:5px 7px;margin-bottom:10px}.carousel-title{gap:4px;min-width:0;padding:0 7px}.carousel-title strong{font-size:14px}.carousel-title>span{display:block;font-size:11px;text-align:center;line-height:1.4}.style-carousel-controls button{flex:0 0 30px}.appearance-panel{margin-top:8px}

/* Telegram shell, safe insets and non-emoji product mark. */
body{padding-top:max(env(safe-area-inset-top,0px),var(--cutly-safe-top,0px));padding-left:var(--cutly-safe-left,0px);padding-right:var(--cutly-safe-right,0px)}.bottom-nav{padding-bottom:calc(12px + max(env(safe-area-inset-bottom,0px),var(--cutly-safe-bottom,0px)));background:#f6f4ef}.shell{padding-bottom:calc(100px + var(--cutly-safe-bottom,0px))}.cutly-mark{display:inline-flex!important;align-items:center;justify-content:center;width:24px;height:24px;vertical-align:middle;line-height:1}.cutly-mark svg{width:100%;height:100%;display:block}.logo .cutly-mark{width:25px;height:25px;margin-left:5px}.bottom-nav .cutly-mark{width:23px;height:26px}.footer-mark{width:12px;height:12px;margin-right:auto;margin-left:4px}.native-preference{cursor:pointer}.native-preference>span{font-size:13px;color:var(--ink)}.native-preference input{width:16px;height:16px;accent-color:var(--accent)}.native-status{font-size:12px;color:var(--muted);line-height:1.7}.in-telegram header{height:52px}button:active,.feature-toggle:active{opacity:.75}

/* Empty attachments must not leave space below the photo button. */
.photo-grid:empty{display:none}.ideas .idea-actions{margin-bottom:0}

.projects-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 0}.projects-toolbar>span{font-size:13px;color:var(--muted)}.queue-disclaimer{font-size:13px;line-height:1.5;color:var(--muted);margin:8px 0 16px}.project{padding:15px}.project h2{font-size:15px;overflow-wrap:anywhere;margin:0 0 5px}.progress-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:13px;margin-top:16px}.progress-heading b{font-variant-numeric:tabular-nums;color:var(--accent)}.project progress{display:block;width:100%;height:6px;margin:9px 0;border:0;border-radius:6px;overflow:hidden;background:var(--line);accent-color:var(--accent)}.project progress::-webkit-progress-bar{background:var(--line);border-radius:6px}.project progress::-webkit-progress-value{background:var(--accent);border-radius:6px;transition:width .6s}.project progress::-moz-progress-bar{background:var(--accent);border-radius:6px}.project .progress-detail{font-size:12px;min-height:15px;margin:7px 0}.project button{padding:6px 10px;font-size:12px}

.project button.project-open{background:var(--ink);color:white;border-color:var(--ink)}#project-detail .heading{padding-top:8px}#project-detail .heading p{overflow-wrap:anywhere}.detail-status .progress-heading{margin-top:0}.detail-settings{border-block:1px solid var(--line);margin:18px 0}.job-settings{display:grid;grid-template-columns:95px 1fr;gap:10px;font-size:13px;margin:0 0 14px}.job-settings dt{color:var(--muted)}.job-settings dd{margin:0;overflow-wrap:anywhere}.version-history h2,.correction-card h2{font-size:16px;margin:18px 0 10px}.version-row{border-left:2px solid var(--accent);padding:4px 12px;margin:12px 0}.version-row strong{font-size:13px}.version-row small{display:block;font-size:12px;color:var(--muted);margin-top:4px}.version-row p{font-size:13px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere;margin:7px 0}.correction-card{background:#fffdf8;border:1px solid var(--line);border-radius:13px;padding:13px;margin-top:20px}.correction-card h2{margin-top:0}.correction-card label{font-size:13px;font-weight:700}.correction-card button:disabled{opacity:.45;cursor:default}.correction-card textarea:disabled{opacity:.5}

.selected-source{display:flex;align-items:center;gap:10px;text-align:left;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:#fffdf8}.selected-source>div{flex:1;min-width:0}.selected-source strong{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:13px}.selected-source small{display:block;font-size:12px;color:var(--muted);margin-top:4px}.selected-source .attachment{font-size:12px;padding:6px 10px}.selected-source .text-button{padding:3px;font-size:21px;text-decoration:none}.live-preview{aspect-ratio:9/16;width:min(100%,300px,calc((100svh - 220px)*9/16));background:#20201d}.live-preview video{object-fit:contain}.has-video .preview-person{visibility:hidden}.preview-caption{font-size:calc(var(--caption-size)*.85)}.preview-caption>span:last-child{font-size:1em}.preview-top{gap:6px;left:10px;right:10px;top:10px}.preview-badge{margin-right:auto;font-size:7px;letter-spacing:.6px;padding:6px 8px}#expandPreview{flex-shrink:0;width:28px;height:28px;border-radius:50%;border:1px solid #ffffff70;background:#24241f65;color:white;font-size:19px}#previewPlay{flex-shrink:0;width:28px;height:28px}#previewDialog{padding:32px 12px 12px;background:#171714;border:0;border-radius:16px;max-width:100vw;max-height:100svh;overflow:auto}#previewDialog::backdrop{background:#000d}#closePreview{position:absolute;right:8px;top:2px;background:none;border:0;color:white;font-size:25px;padding:0 6px}#previewDialog .live-preview{width:min(calc(100vw - 32px),calc((100svh - 76px)*9/16));max-width:520px;border-radius:8px}#previewDialog #expandPreview{display:none}.preview-person{object-position:center}

/* Subtitle presets animate their text while the frame stays still. */
.preview-caption>span,.preview-caption>mark{transform-origin:center;max-width:100%;overflow-wrap:anywhere}.caption-demo-controls{display:flex;align-items:center;gap:7px}#captionMotion{display:inline-grid;place-items:center;width:24px;height:24px;padding:0;border:1px solid #ffffff65;background:#24241f65;color:white;border-radius:50%;font-size:13px}.preview-caption #captionAccent{font:inherit;color:inherit}

#confirm .heading{padding-top:8px}.confirm-source{padding:12px;border:1px solid var(--line);border-radius:12px;background:#fffdf8}.confirm-source strong{display:block;font-size:13px;overflow-wrap:anywhere}.confirm-source small{display:block;color:var(--muted);font-size:12px;margin-top:5px}.confirm-settings{margin:18px 0}.confirm-title{font-size:14px;margin:18px 0 9px}.confirm-features{display:flex;flex-wrap:wrap;gap:6px}.confirm-features span{font-size:12px;border:1px solid var(--line);padding:5px 9px;border-radius:20px}.confirm-photos{display:flex;gap:8px;flex-wrap:wrap}.confirm-photos img{width:54px;height:54px;border-radius:8px;object-fit:cover}.confirm-instructions{font-size:13px;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere;margin:0}#confirm .primary{font-size:13px;padding:12px 15px}#confirm button:disabled{opacity:.5;cursor:default}#uploadProgress{font-size:13px;line-height:1.5;padding:10px 0}

/* Compact confirmation overlay, with a permanently visible action. */
body.confirm-open{overflow:hidden}dialog#confirm{width:min(390px,calc(100vw - 32px));max-width:none;max-height:min(80svh,680px);padding:0;border:1px solid #44443f;border-radius:18px;background:#292927;color:#f5f4ef;box-shadow:0 20px 80px #0005;overflow:hidden}dialog#confirm[open]{display:flex;flex-direction:column}dialog#confirm::backdrop{background:#0008;backdrop-filter:blur(3px)}.confirm-dialog-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 18px 10px;flex-shrink:0}.confirm-dialog-header h2{font-size:19px;margin:0;letter-spacing:-.4px}.confirm-dialog-header #editDraft{border:0;background:#ffffff10;color:#e8e7e2;border-radius:50%;width:28px;height:28px;font-size:21px;line-height:1;padding:0}.confirm-dialog-body{padding:0 18px;overflow-y:auto;overscroll-behavior:contain;min-height:0}.confirm-dialog-footer{padding:12px 18px 16px;border-top:1px solid #ffffff15;flex-shrink:0;margin-top:14px}#confirm .confirm-source{background:#ffffff06;border-color:#ffffff18;padding:10px}#confirm .confirm-source strong{font-size:13px}#confirm .confirm-source small,#confirm .job-settings dt{color:#aaa99f}#confirm .confirm-settings{font-size:13px;grid-template-columns:76px 1fr;gap:9px;margin:14px 0}#confirm .confirm-title{font-size:13px;margin:14px 0 8px;color:#bbb9af}#confirm .confirm-features{gap:5px}#confirm .confirm-features span{border-color:#ffffff20;font-size:11px;padding:4px 7px}#confirm .confirm-attachments{font-size:13px;color:#bbb9af;margin:12px 0 0}#confirm .confirm-instructions{font-size:13px;line-height:1.5}#confirmationNotice{font-size:12px;line-height:1.5;color:#aaa99f;margin:0}#confirm .primary{background:var(--accent);color:#fff;justify-content:center;gap:8px;margin-top:10px;padding:11px 14px;border-radius:10px}#confirm .primary span{color:#fff;font-size:18px}#confirm .primary:disabled{opacity:.5}#confirm #uploadProgress{color:#eee;font-size:13px;margin:8px 0 0;padding:0}

/* Keep focus on the whole writing card instead of drawing a box over its label. */
.ideas textarea,.correction-card textarea{appearance:none;-webkit-appearance:none;border-radius:0;box-shadow:none;resize:none;caret-color:var(--accent)}
.ideas textarea:focus,.ideas textarea:focus-visible,.correction-card textarea:focus,.correction-card textarea:focus-visible{outline:none;outline-offset:0;box-shadow:none}
.ideas:has(textarea:focus),.correction-card:has(textarea:focus){border-color:#bcb8ad;box-shadow:0 0 0 2px #24241f08}

.wallet-card{background:var(--ink);color:#f5f4ef;padding:20px;border-radius:18px;margin-top:12px}.wallet-top{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:13px;color:#c1c0b5}.demo-pill{border:1px solid #ffffff28;border-radius:20px;font-size:11px;padding:4px 8px}.wallet-amount{font-size:48px;font-weight:800;letter-spacing:-2px;margin-top:10px;line-height:1.15;font-variant-numeric:tabular-nums}.wallet-amount>span{font-size:14px;font-weight:500;letter-spacing:0;color:#c7c5ba}.wallet-card>p{font-size:13px;color:#c7c5ba;margin:9px 0 16px}.wallet-actions{display:flex;flex-wrap:wrap;gap:8px}.wallet-actions .attachment{color:#f5f4ef;border-color:#ffffff35;font-size:12px;padding:7px 10px}.wallet-actions button:disabled{color:#95948b;cursor:default}.wallet-note{font-size:12px;line-height:1.5;color:var(--muted);margin:10px 0 22px}.wallet-history{padding:14px;background:#eeece4;border-radius:12px;margin-top:10px}.wallet-history>div{display:flex;justify-content:space-between;align-items:center;gap:12px}.wallet-history strong{font-size:13px}.wallet-history small{display:block;font-size:12px;color:var(--muted);margin-top:3px}.wallet-history b{font-size:15px;white-space:nowrap}.wallet-history>p{font-size:12px;line-height:1.5;color:var(--muted);margin:12px 0 0}.referral-card{border:1px solid var(--line);background:#fffdf8;border-radius:18px;padding:18px}.referral-topline{display:flex;justify-content:space-between;align-items:center;gap:10px}.referral-topline>span{font-size:10px;letter-spacing:1px;line-height:1.5;color:var(--muted);max-width:170px;font-weight:700}.referral-topline>b{font-size:35px;color:var(--accent);letter-spacing:-2px;line-height:1}.referral-card h2{font-size:25px;line-height:1.15;letter-spacing:-.8px;margin:15px 0 10px}.referral-card>p{font-size:13px;line-height:1.7;color:var(--muted);margin:0 0 14px}.referral-card>p strong{color:var(--ink)}.referral-example{background:#f0eee6;border-radius:9px;padding:10px;font-size:12px;display:flex;justify-content:space-between;flex-wrap:wrap;gap:5px;margin-bottom:18px}.referral-example span{font-weight:700;color:#ae4936}.referral-card>label{font-size:10px;letter-spacing:1px;font-weight:700;color:var(--muted)}.referral-link-row{display:flex;gap:7px;align-items:center;margin:7px 0 10px}.referral-link-row input{min-width:0;width:100%;flex:1;border:1px solid var(--line);border-radius:8px;background:var(--bg);color:var(--ink);font-size:13px;padding:9px 8px;text-overflow:ellipsis}.referral-link-row .attachment{font-size:12px;padding:8px 9px;flex-shrink:0}.referral-share{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:10px 12px;background:var(--accent);color:white;border:0;border-radius:10px;font-size:13px;font-weight:700}.referral-card p.referral-demo-note{font-size:11px;line-height:1.6;margin:10px 0 0}.referral-stats{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:12px 0}.referral-stats>div{border:1px solid var(--line);border-radius:13px;padding:14px;background:#eeece4}.referral-stats strong{display:block;font-size:25px;line-height:1;margin-bottom:7px}.referral-stats span{font-size:12px;color:var(--muted)}.referral-terms{border-block:1px solid var(--line);margin-top:18px}.referral-terms summary{font-size:13px;padding:14px 0}.referral-terms ol{padding-left:18px;font-size:13px;line-height:1.9;margin:0 0 12px}.referral-terms p,.referral-terms small{font-size:12px;color:var(--muted);line-height:1.7}.referral-terms small{display:block;margin-bottom:14px}

.caption-style-rail{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;padding:3px 1px 5px}.caption-style-rail::-webkit-scrollbar{display:none}.caption-style-rail button{flex-shrink:0;border:1px solid var(--line);border-radius:18px;background:transparent;color:var(--ink);font-size:12px;padding:6px 10px;min-height:28px}.caption-style-rail button.selected{background:var(--ink);border-color:var(--ink);color:#fff}.caption-style-hint{font-size:11px;color:var(--muted);line-height:1.5;margin:4px 0 12px}
.live-preview[data-caption-style] .preview-caption{background:none;border:0;border-radius:0;backdrop-filter:none;padding:0!important;font-weight:700;text-transform:none;letter-spacing:-.3px;gap:4px;text-shadow:0 2px 9px #000a;-webkit-text-stroke:0 transparent}
.live-preview[data-caption-style] .preview-caption mark{background:none;color:var(--caption-accent);font-style:normal;font-weight:800;padding:0 6px;transform:none;text-shadow:inherit;border-radius:0}
.live-preview[data-caption-style=accent] .preview-caption{text-transform:uppercase;font-weight:800;letter-spacing:-1px}
.live-preview[data-caption-style=accent] .preview-caption mark{background:var(--caption-accent);color:var(--caption-on-accent,#24241f);padding:3px 9px;border-radius:2px;text-shadow:none}
.live-preview[data-caption-style=karaoke] .preview-caption{font-weight:800;gap:5px}
.live-preview[data-caption-style=card] .preview-caption{background:#171714d9;border:1px solid #ffffff25;border-radius:10px;padding:10px 8px!important;backdrop-filter:blur(8px);text-shadow:none;font-weight:600}
.live-preview[data-caption-style=outline] .preview-caption{font-weight:800;text-transform:uppercase;-webkit-text-stroke:1.2px #171714;paint-order:stroke fill;text-shadow:0 2px 3px #000a}
.live-preview[data-caption-style=outline] .preview-caption mark{color:var(--caption-accent)}
.live-preview[data-caption-style=minimal] .preview-caption{font-weight:500;letter-spacing:-.5px;gap:3px}
.live-preview[data-caption-style=minimal] .preview-caption mark{font-weight:500}

.style-carousel-controls button{display:grid;place-items:center;padding:0;line-height:1;appearance:none;-webkit-appearance:none;box-sizing:border-box;min-width:30px;min-height:30px}.style-carousel-controls button svg{display:block;width:18px;height:18px;flex-shrink:0;pointer-events:none}

#closeFeatureHelp{appearance:none;-webkit-appearance:none;display:grid;place-items:center;border-radius:50%;padding:0;width:28px;height:28px;line-height:1}
#closeFeatureHelp:focus,#closeFeatureHelp:focus-visible{outline:none;outline-offset:0;box-shadow:none;background:#24241f0b}

/* Give the keyboard the bottom edge while the user is writing. */
body:has(textarea:focus) .bottom-nav,body:has(textarea:focus) .shell>footer,
body:has(input:not([readonly]):is([type=text],[type=search],[type=email],[type=tel],[type=url],[type=password]):focus) .bottom-nav,
body:has(input:not([readonly]):is([type=text],[type=search],[type=email],[type=tel],[type=url],[type=password]):focus) .shell>footer{display:none}

.profile-card{background:#fffdf8;border:1px solid var(--line);border-radius:16px;padding:18px;margin:12px 0 18px;gap:14px}.profile-avatar{position:relative;flex:0 0 64px;width:64px;height:64px;overflow:hidden;font-size:24px;background:#e9e6de;color:var(--ink)}.profile-avatar img,.avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}.avatar{position:relative;overflow:hidden;padding:0;display:grid;place-items:center}.profile-identity{min-width:0}.profile-card .profile-identity h2{font-size:18px;line-height:1.3;overflow-wrap:anywhere;margin:0 0 5px}.profile-card .profile-identity p{font-size:13px;line-height:1.5;overflow-wrap:anywhere;margin:0}

.profile-stat-card{display:flex;align-items:center;gap:12px;width:100%;text-align:left;background:#eeece4;color:var(--ink);border:1px solid var(--line);border-radius:14px;padding:14px;margin:0 0 18px}.profile-stat-icon{display:grid;place-items:center;background:#e2dfd5;width:36px;height:36px;border-radius:50%;font-size:21px}.profile-stat-card strong{display:block;font-size:23px;line-height:1.1}.profile-stat-card small{display:block;font-size:12px;color:var(--muted);margin-top:4px}.profile-chevron{margin-left:auto;color:var(--muted);font-size:24px}.profile-menu{border:1px solid var(--line);border-radius:14px;background:#fffdf8;padding:0 13px;overflow:hidden;margin-bottom:16px}.profile-menu .menu-row{gap:10px;padding:14px 0}.profile-menu .menu-row:last-child{border-bottom:0}.profile-menu .menu-row .profile-menu-name{font-size:13px;color:var(--ink);line-height:1.4}.profile-menu .menu-row>span:last-child{font-size:11px;text-align:right;flex-shrink:0}.profile-language{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 13px;background:#eeece4;border-radius:13px;margin:18px 0}.profile-language>span{font-size:13px;font-weight:700}.profile-language>div{display:flex;gap:4px}.profile-language button{border:0;border-radius:9px;padding:7px 10px;background:none;color:var(--muted);font-size:13px}.profile-language button.language-current{background:#fffdf8;color:var(--ink);box-shadow:0 1px 5px #0001}.profile-language button small{font-size:10px;display:block}.profile-language button:disabled{opacity:.6;cursor:default}.profile-section-title{font-size:11px;color:var(--muted);letter-spacing:1.4px;margin:22px 0 9px}#profile .notice{padding:13px;font-size:12px;margin-top:16px}.profile-info-header{display:flex;align-items:start;justify-content:space-between;gap:14px}.profile-info-header h2{font-size:18px;margin:0;line-height:1.4}.profile-info-header button{border:0;background:#24241f08;border-radius:50%;width:28px;height:28px;flex-shrink:0;font-size:21px;color:var(--muted);padding:0;line-height:1}.profile-info-header button:focus-visible{outline:1px solid #bcb8ad;outline-offset:1px}#profileInfoDialog{width:min(390px,calc(100vw - 32px));max-height:78svh;overflow-y:auto;border:1px solid var(--line);border-radius:16px;background:var(--bg);color:var(--ink);padding:18px;box-shadow:0 20px 70px #0003}#profileInfoDialog::backdrop{background:#0007;backdrop-filter:blur(2px)}#profileInfoContent p{font-size:13px;line-height:1.7;color:var(--muted);margin:12px 0}#profileInfoContent details{border-top:1px solid var(--line)}#profileInfoContent summary{font-size:13px;line-height:1.5;padding:12px 0}

.live-preview{container-type:inline-size}.live-preview[data-caption-style] .preview-caption{font-size:min(calc(var(--caption-size)*.85),8cqi);font-weight:var(--subtitle-font-weight,700);font-synthesis:none}.live-preview[data-caption-style] .preview-caption mark{font-weight:inherit}.live-preview[data-caption-style] .preview-caption #captionLead{font-size:1em}.font-rail button{font-family:Manrope,Arial,sans-serif;white-space:nowrap;min-height:28px;padding:6px 11px;font-size:12px}

.caption-animation-rail{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;padding:3px 1px 5px}.caption-animation-rail::-webkit-scrollbar{display:none}.caption-animation-rail button{flex-shrink:0;border:1px solid var(--line);border-radius:18px;background:transparent;color:var(--ink);font-size:12px;padding:6px 10px;min-height:28px;white-space:nowrap}.caption-animation-rail button.selected{background:var(--ink);border-color:var(--ink);color:#fff}.caption-word{display:inline-block;transform-origin:center}.preview-caption{perspective:500px}.preview-caption>span,.preview-caption>mark{backface-visibility:hidden}.style-carousel-controls{background:#eae4f5;border:1px solid #d0c4e5;box-shadow:0 3px 12px #7661950b}.style-carousel-controls button{background:#f8f5ff;border-color:#cfc1e5;color:#57466e}.style-carousel-controls .carousel-title strong{color:#443652}.style-carousel-controls .carousel-title>span{color:#776987}

/* Collapsed settings keep the editor short and show the current selection. */
.appearance-panel{margin-top:12px}.setting-group{border-bottom:1px solid var(--line);margin:0;padding:0}.setting-group>summary{display:flex;align-items:center;gap:10px;min-height:43px;padding:13px 0;cursor:pointer}.setting-group>summary>strong{font-size:13px;font-weight:700;line-height:1.4}.setting-group>summary>.setting-current{margin-left:auto;max-width:45%;font-size:12px;font-weight:500;color:var(--muted);text-align:right;line-height:1.4;overflow-wrap:anywhere}.setting-chevron{width:6px;height:6px;flex:0 0 6px;border-right:1.5px solid var(--muted);border-bottom:1.5px solid var(--muted);transform:rotate(45deg);margin:-3px 3px 0 2px}.setting-group[open]>summary .setting-chevron{transform:rotate(225deg);margin-top:3px}.setting-group-body{padding:0 0 12px}.setting-group-body .caption-style-hint{margin:4px 0 0}.features-section.setting-group{margin:0;border-top:0}.features-section.setting-group .features-grid{margin:0}.features-section.setting-group .features-note{margin-bottom:0}.appearance-panel+.settings{margin:0;border-top:0}.setting-group summary:focus-visible{outline:1px solid #bcb8ad;outline-offset:2px;border-radius:5px}

.rendered-video{display:block;width:min(100%,360px);max-height:65svh;object-fit:contain;background:#171714;border-radius:14px;margin:14px auto}.result-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:10px}.result-download{display:inline-flex;align-items:center;justify-content:center;border-radius:9px;background:var(--ink);color:white;text-decoration:none;padding:9px 12px;font-size:13px}.result-download.secondary{background:#eeece4;color:var(--ink)}.project .result-actions button{margin:0}.result-actions .project-open{border:1px solid var(--line);border-radius:8px;padding:8px 12px;font-size:13px}
.mobile-pair-dialog{position:fixed;inset:0;margin:auto;width:min(90vw,420px);max-height:80svh;overflow:auto;padding:24px;background:#f6f4ee;color:#25251f;border:1px solid #ddd8cd;border-radius:20px;z-index:10000}.mobile-pair-dialog::backdrop{background:#18181599}.mobile-pair-dialog h2{font-size:24px;margin:0 0 12px}.mobile-pair-dialog p{font-size:16px;line-height:1.5}.mobile-pair-dialog input{display:block;width:100%;font:16px monospace;padding:12px;border:1px solid #b9b6ac;border-radius:10px;margin:8px 0 16px}.mobile-pair-dialog button{background:#25251f;color:white;padding:12px 20px;border:0;border-radius:12px;font:inherit}.mobile-pair-dialog .pair-error{color:#9b352c}
.hook-settings{margin:14px 0;padding:14px 16px;border:1px solid var(--line);border-radius:14px;background:#eeebe3}.hook-settings label{display:flex;justify-content:space-between;align-items:center;font-size:13px;font-weight:700}.hook-settings small,.photo-hint{display:block;font-size:13px;line-height:1.6;color:var(--muted)}.hook-settings input{display:block;width:100%;margin:9px 0;padding:10px 12px;font-size:17px;background:#fffefa;border:1px solid #d6d2c7;border-radius:9px;color:var(--ink);outline:none}.hook-settings input:focus{border-color:#aaa69b;box-shadow:0 0 0 2px #24241f08}.photo-hint{margin-top:8px}.hook-settings[hidden],.photo-hint[hidden]{display:none}

.download-dialog{position:fixed;inset:0;margin:auto;width:min(90vw,430px);max-height:85svh;overflow:auto;padding:22px;border:1px solid #d6d2c7;border-radius:20px;background:var(--bg);color:var(--ink)}.download-dialog::backdrop{background:#15151099}.download-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.download-head h2{font-size:23px;margin:0}.download-head button{border:0;background:transparent;font-size:28px;color:var(--muted);padding:0 8px}.download-dialog progress{width:100%;height:8px;accent-color:var(--accent);margin:12px 0}.download-dialog>button{display:block;width:100%;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:#efede5;color:var(--ink);margin:10px 0}.download-dialog .download-save{background:var(--ink);color:white}.download-dialog small{display:block;font-size:13px;line-height:1.6;color:var(--muted);margin-top:12px}.download-dialog [hidden]{display:none!important}.photo-timing{margin-top:14px;border-top:1px solid var(--line);padding-top:12px}.photo-timing label{display:block;font-size:13px;margin:8px 0}.photo-timing input{width:100%;padding:9px;border:1px solid var(--line);border-radius:8px;font-size:17px;background:#fffefa}.photo-timing[hidden]{display:none}

/* Telegram photo in the bottom Profile tab, same source as the profile card */
.bottom-nav button>.nav-avatar{position:relative;overflow:hidden;display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:#e9e6de;border:1px solid #dedbd2;color:var(--ink);font-size:12px;font-weight:800;line-height:1}
.nav-avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}
.bottom-nav button.active>.nav-avatar{border-color:var(--accent);box-shadow:0 0 0 1.5px var(--accent)}
/* Back to the list from a video: readable, but compact */
.back-button{display:inline-flex;align-items:center;gap:7px;margin:2px 0 12px;padding:8px 14px 8px 11px;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--ink);font-size:15px;font-weight:800;line-height:1.1}
.back-button span{color:var(--accent);font-size:18px;line-height:1}

/* Reels caption under the finished video */
.caption-box{margin:18px 0 4px;padding:14px;border:1px solid var(--line);border-radius:14px;background:#fffefa}
.caption-box h2{margin:0 0 6px;font-size:15px;letter-spacing:-.2px}
.caption-hint{margin:0 0 10px;font-size:13px;color:var(--muted);line-height:1.5}
.caption-text{margin:0 0 12px;font-size:14px;line-height:1.55;white-space:pre-wrap;user-select:text;-webkit-user-select:text}
.caption-box .result-actions{margin:0}
.caption-box button.result-download{border:0;cursor:pointer}
.caption-box button.result-download:disabled{opacity:.6}
/* The footer already draws a line under the settings; one separator is enough. */
.detail-settings{border-bottom:0;margin-bottom:0}

/* Finished and queued videos open from anywhere on the card */
.project-link{cursor:pointer}
.project-link:active{background:#f6f2e9}
/* iOS paints unstyled button text system blue */
.attachment{color:var(--ink)}

/* Finished video: a small status pill instead of a full 100% bar */
.detail-done{display:inline-flex;align-items:center;margin:0 0 12px;padding:6px 12px;border-radius:999px;background:#e3f1e4;color:#2f7a3e;font-size:13px;font-weight:800}
.project progress{height:4px;margin:8px 0}
/* The footer draws its own line; the last block on a page must not add a second one. */
.page>.referral-terms:last-child{border-bottom:0;margin-bottom:0}
/* Captions are one line at one size, like the rendered video */
.live-preview[data-caption-style] .preview-caption{flex-direction:row;flex-wrap:nowrap;justify-content:center;align-items:center;white-space:nowrap;gap:.28em;font-size:min(calc(var(--caption-size)*.85),6.4cqi)}
.live-preview[data-caption-style] .preview-caption>span,.live-preview[data-caption-style] .preview-caption>mark{font-size:1em;overflow-wrap:normal}
/* Footer line sits close to the last block instead of floating below it */
.shell>footer{margin-top:6px}

/* Preview captions scale with the frame exactly like the 1080-wide video:
   slider value × 0.85 × 1080/300 px ⇒ value × 0.2833% of the frame width. */
.live-preview[data-caption-style] .preview-caption{font-size:calc(var(--caption-scale,22)*.2833cqi)}
.caption-word[hidden]{display:none}

/* ---- Dark theme (Профиль → Тема). The light theme above is unchanged. ---- */
html[data-theme=dark]{--bg:#161614;--ink:#eeece4;--muted:#a3a196;--line:#383732;--on-ink:#161614;color-scheme:dark}
html[data-theme=dark] body{background:var(--bg)}
/* Cards and inputs that are white in the light theme */
html[data-theme=dark] :is(.ideas,.project,.correction-card,.selected-source,.confirm-source,.referral-card,.profile-card,.profile-menu,.caption-box,.hook-settings input,.photo-timing input,.back-button,.upload-zone,.style-rail .style-card.selected,.color-rail .swatch.selected,.feature-option:has(input:checked)){background:#22211e}
html[data-theme=dark] .upload-zone:hover{background:#2b2a26}
html[data-theme=dark] .project-link:active{background:#2b2a26}
/* Beige panels of the light theme */
html[data-theme=dark] :is(select,.notice,.style-rail .style-card,.feature-option,.wallet-history,.referral-stats>div,.profile-stat-card,.profile-language,.download-dialog>button,.result-download.secondary,.minimal){background:#2b2a26}
html[data-theme=dark] .profile-language button.language-current{background:#3d3c36;box-shadow:none}
html[data-theme=dark] :is(.avatar,.profile-avatar,.bottom-nav button>.nav-avatar){background:#2b2a26;border-color:#3a3934}
html[data-theme=dark] .bottom-nav button.active>.nav-avatar{border-color:var(--accent)}
html[data-theme=dark] :is(.empty-state,.hook-settings input,.download-dialog){border-color:#3a3934}
html[data-theme=dark] .bottom-nav{background:#161614}
/* Buttons painted with the text colour turn light with dark text */
html[data-theme=dark] :is(.upload-icon,.photo-item button,.primary,#toast,.project button.project-open,.result-download:not(.secondary),.download-dialog .download-save,.font-rail button.selected,.caption-style-rail button.selected,.caption-animation-rail button.selected,.style-rail .style-card.selected .style-card-name){color:var(--on-ink)}
html[data-theme=dark] .feature-toggle input:checked+.feature-switch:after{color:var(--on-ink)}
/* Balance cards stay dark surfaces instead of flipping to light */
html[data-theme=dark] :is(.balance-card,.wallet-card){background:#2b2a26;color:var(--ink);border:1px solid #3a3934}
html[data-theme=dark] .wallet-actions .attachment{color:var(--ink)}
/* Lavender style switcher */
html[data-theme=dark] .style-carousel-controls{background:#26232e;border-color:#3d3650;box-shadow:none}
html[data-theme=dark] .style-carousel-controls button{background:#2f2b39;border-color:#4a405e;color:#d7cbf2}
html[data-theme=dark] :is(.size-label output,.referral-example,.profile-stat-icon){background:#2b2a26}
html[data-theme=dark] .referral-example span{color:#ff8a73}
html[data-theme=dark] .style-carousel-controls :is(strong,span,small){color:#e4dafa}
/* Theme sits right under language as one compact group */
.profile-language.profile-theme{margin-top:-10px}
/* «скоро» on the same line as English, so Язык and Тема are the same height */
.profile-language button small{display:inline;margin-left:4px}

/* «ПРОДОЛЖИТЬ»: centred caps, the arrow right after the word */
#createButton{justify-content:center;gap:8px;text-transform:uppercase;letter-spacing:.6px}
#createButton span{font-size:18px;line-height:1}

/* Music: same chips as animations, a small listen button under them */
.music-preview-row{display:flex;align-items:center;gap:10px;margin-top:10px}
.music-preview-row small{font-size:11px;color:var(--muted);line-height:1.5}
.music-preview-row .attachment{flex-shrink:0;font-weight:700}

/* Track list of the chosen mood: play + choose */
.music-tracks{display:flex;flex-direction:column;gap:6px;margin-top:10px}
.music-tracks[hidden]{display:none}
.music-track{display:flex;align-items:center;gap:8px}
.music-play{flex:0 0 34px;width:34px;height:34px;border-radius:50%;border:1px solid var(--line);background:transparent;color:var(--ink);font-size:13px;line-height:1;display:grid;place-items:center;padding:0}
.music-pick{flex:1;text-align:left;border:1px solid var(--line);border-radius:10px;background:transparent;color:var(--ink);font-size:13px;padding:8px 12px;min-height:34px}
.music-pick.selected{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent);font-weight:700}
.music-note{margin:10px 0 0;font-size:11px;color:var(--muted);line-height:1.5}
/* «Добавь свою идею»: the writing area looks like a field, the notes under it are clearly secondary */
.ideas textarea{background:var(--bg);border:1px solid var(--line);border-radius:10px;padding:10px 12px;margin:10px 0 12px;min-height:84px}
.ideas textarea::placeholder{color:#aaa79c}
.ideas:has(textarea:focus) textarea{border-color:var(--accent)}
.ideas .idea-actions{border-top:0;padding-top:0}
.ideas .photo-hint{font-size:11px;margin-top:10px}
html[data-theme=dark] .ideas textarea{background:#191917;border-color:#3a3934}
html[data-theme=dark] .ideas textarea::placeholder{color:#6e6c64}
/* «Залил и получил»: three style cards, one big button, everything else folded away */
.style-picks{display:flex;gap:8px;margin:0 0 14px;overflow-x:auto;scroll-snap-type:x proximity;scrollbar-width:none;padding-bottom:2px}.style-picks::-webkit-scrollbar{display:none}.style-picks .style-pick{flex:0 0 calc((100% - 16px)/3);scroll-snap-align:start}
.style-pick{display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-width:0;padding:12px 11px;border:1.5px solid var(--line);border-radius:14px;background:#fffdf8;color:var(--ink);text-align:left}
.style-pick i{width:16px;height:16px;border-radius:50%;background:var(--pick);border:1px solid #0002;margin-bottom:4px}
.style-pick strong{font-size:14px}
.style-pick small{font-size:10.5px;line-height:1.35;color:var(--muted)}
.style-pick.selected{border-color:var(--ink);box-shadow:0 0 0 1px var(--ink)}
.make-button{justify-content:center;gap:10px;font-size:16px;padding:17px 20px;border-radius:14px}
.make-button span{font-size:18px}
.submit-card{margin-top:16px}
.customize{margin-top:22px;border-top:1px solid var(--line)}
.customize>summary{display:flex;align-items:center;gap:10px}
.customize>summary strong{font-size:14px}
.customize>summary .setting-current{margin-left:auto}
.customize-body{padding-bottom:6px}
.customize-body>.appearance-panel{margin-top:0}
html[data-theme=dark] .style-pick{background:#1f1f1c;border-color:#3a3934}
html[data-theme=dark] .style-pick.selected{border-color:var(--ink)}
.customize[open]>summary .setting-chevron{transform:rotate(225deg);margin-top:3px}
#create .live-preview{width:min(100%,260px)}
/* Hook text field: it had only a light card, a white patch on the dark theme. */
.hook-settings label{color:var(--ink)}.hook-settings input{font-size:13px;line-height:1.7}/* same size as «Что сделать с роликом?» */
html[data-theme=dark] .hook-settings{background:#1d1c19;border-color:var(--line)}
html[data-theme=dark] .hook-settings input::placeholder{color:#7d7b72}
/* caption looks added 24.10: Плашка, Ступенька, Элегант, Рукопись, Газета */
#livePreview[data-caption-style=keyword] .preview-caption{text-transform:uppercase;font-weight:800;font-size:calc(var(--caption-scale,22)*.2833cqi*1.2)}
#livePreview[data-caption-style=keyword] .preview-caption mark{background:var(--caption-accent);color:var(--caption-on-accent,#fff);padding:2px 8px;border-radius:7px;text-shadow:none}
#livePreview[data-caption-style=stairs] .preview-caption{text-transform:uppercase;font-weight:800;flex-direction:column;align-items:center;gap:2px}
#livePreview[data-caption-style=stairs] .preview-caption>span:first-child{font-size:.82em;-webkit-text-stroke:.5px #000}
#livePreview[data-caption-style=stairs] .preview-caption mark{background:none;color:var(--caption-accent);font-size:1.55em;line-height:1;padding:0;-webkit-text-stroke:1px #000}
#livePreview[data-caption-style=elegant] .preview-caption{text-transform:lowercase;font-size:calc(var(--caption-scale,22)*.2833cqi*1.05);font-weight:500;text-shadow:0 2px 14px #000c}
#livePreview[data-caption-style=elegant] .preview-caption mark,#livePreview[data-caption-style=script] .preview-caption mark,#livePreview[data-caption-style=news] .preview-caption mark{background:none;color:#fff;padding:0}
#livePreview[data-caption-style=script] .preview-caption{text-transform:lowercase;font-size:calc(var(--caption-scale,22)*.2833cqi*1.5)}
#livePreview[data-caption-style=news] .preview-caption{text-transform:uppercase;font-size:calc(var(--caption-scale,22)*.2833cqi*1.35)}
#livePreview[data-caption-style=keyword] .preview-caption mark{font-weight:800}
/* Style cards 24.10: «живая рамка» — a slow, soft ring in the style's colour turns around the chosen card;
   inside, the style's name is set in that very look. The face stays dark in both themes, like a video frame. */
@keyframes pickSpin{to{transform:rotate(360deg)}}
#stylePicks .style-pick{position:relative;overflow:hidden;height:112px;padding:0;border:1.5px solid #2e2d29;border-radius:18px;background:#1d1c19;color:#eeece4;justify-content:flex-end;align-items:center;gap:0;transition:transform .3s cubic-bezier(.2,.9,.3,1.35),box-shadow .25s,border-color .2s}
#stylePicks .style-pick .pick-ring{position:absolute;left:-50%;top:-50%;width:200%;height:200%;background:conic-gradient(from 0deg,color-mix(in srgb,var(--pick) 55%,transparent),transparent 30%,transparent 50%,color-mix(in srgb,var(--pick) 55%,transparent) 75%,transparent 90%);opacity:0;transition:opacity .25s}
#stylePicks .style-pick .pick-face{position:absolute;inset:2px;border-radius:16px;background:#1d1c19}
#stylePicks .style-pick.selected{border-color:transparent;box-shadow:0 0 22px color-mix(in srgb,var(--pick) 16%,transparent);transform:scale(1.04)}
#stylePicks .style-pick.selected .pick-face{background:#2a2925}
#stylePicks .style-pick.selected .pick-ring{opacity:1;animation:pickSpin 4.5s linear infinite}
#stylePicks .style-pick .pick-look{position:absolute;left:4px;right:4px;top:0;bottom:30px;z-index:1;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;line-height:1.05;text-shadow:0 1px 6px #0009}
#stylePicks .style-pick small{position:relative;z-index:1;margin-bottom:11px;font-size:10.5px;color:#7d7b72;text-align:center;padding:0 6px}
#stylePicks .style-pick.selected small{color:#d6d3c9}
#stylePicks .pick-look b,#stylePicks .pick-look em{font-style:normal}
#stylePicks .pick-look[data-look=girls] b{font:800 15px Montserrat,sans-serif;background:#f178b2;color:#fff;padding:2px 7px;text-shadow:none}
#stylePicks .pick-look[data-look=guys] b{font:700 15px Unbounded,sans-serif;color:#f3c854}
#stylePicks .pick-look[data-look=keyword] b{font:800 12px Montserrat,sans-serif;background:#ff664d;color:#fff;padding:2px 5px;border-radius:5px;text-shadow:none}
#stylePicks .pick-look[data-look=stairs] em{font:800 8px Montserrat,sans-serif;color:#fff}
#stylePicks .pick-look[data-look=stairs] b{font:800 12.5px Montserrat,sans-serif;color:#b9a3e8;-webkit-text-stroke:.5px #000}
#stylePicks .pick-look[data-look=elegant] b{font:800 14px Montserrat,sans-serif;color:#fff;text-shadow:0 1px 8px #000c}
#stylePicks .pick-look[data-look=script] b{font:600 21px Caveat,cursive;color:#fff}
#stylePicks .pick-look[data-look=news] b{font:700 17px Oswald,sans-serif;color:#fff;letter-spacing:.3px}
@media (prefers-reduced-motion:reduce){#stylePicks .style-pick.selected .pick-ring{animation:none}}
#stylePicks{padding:42px 20px 44px;margin:-35px -20px -20px;scroll-padding-left:20px}  /* room for the selected card's glow: the scrolling row clips anything outside it */
/* a slice of the fourth card peeks in on the right: the row clearly scrolls */
#stylePicks .style-pick{flex:0 0 calc((100% - 24px) / 3.35)}
/* Light theme: the same ring as in the dark theme, but a stronger glow in the style's colour around the
   chosen card, and a grey ring for the white looks (white on white is invisible). */
html:not([data-theme=dark]) #stylePicks .style-pick.selected{box-shadow:0 0 34px 5px color-mix(in srgb,var(--pick) 70%,transparent),0 4px 12px rgba(36,36,31,.18)}
html:not([data-theme=dark]) #stylePicks [data-style-pick=elegant],html:not([data-theme=dark]) #stylePicks [data-style-pick=script],html:not([data-theme=dark]) #stylePicks [data-style-pick=news]{--pick:#7d7a70 !important}
/* back arrow: a drawn arrow centred on the text, as heavy as the letters (the ← glyph sat low and thin) */
.back-button span{display:flex;align-items:center;font-size:0}
.back-button span svg{display:block}
/* same sizes as the engine: base = slider × .2833% of the frame width (caption_size), × the style's scale (STYLE_SCALE).
   The preview keeps captions inside the same Instagram safe zone as the video: the central 70% of the width */
#livePreview .preview-caption{left:15%;right:15%}

/* corrections 25.10: tips as a short list, the textarea full width */
.revision-card h2{margin:0 0 6px}.revision-tips{margin:6px 0 10px;padding-left:18px;font-size:13px;line-height:1.45;color:var(--muted)}
.revision-card textarea{width:100%;min-height:96px;border:1px solid var(--line);border-radius:10px;padding:10px;font:inherit;font-size:14px;background:transparent;color:inherit;margin-bottom:6px}
.revision-card .result-download{width:100%;margin-top:8px}
.upload-warning{color:var(--accent)}

