@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Noto+Sans+KR:wght@400;500;600;700;800;900&display=swap');
:root{color-scheme:dark;--navy:#06132c;--navy2:#081b3a;--text:#f5f9ff;--muted:#99b3d3;--line:#254469;--cyan:#56e7ff;--blue:#468cfa;--surface:#091c39;--surface2:#0b2144;--shadow:0 24px 75px #01091475;font-family:Inter,'Noto Sans KR',system-ui,-apple-system,sans-serif}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:radial-gradient(ellipse at 83% 3%,#0c3b79 0%,transparent 39%),linear-gradient(110deg,#04102a 0%,#071733 58%,#06142c);color:var(--text);min-height:100vh;overflow-x:hidden}button,input,select{font:inherit}button{cursor:pointer}a{color:inherit;text-decoration:none}button:disabled{opacity:.5;cursor:not-allowed}.ambient{position:absolute;border-radius:50%;filter:blur(115px);opacity:.22;pointer-events:none}.ambient-a{width:400px;height:390px;right:-190px;top:360px;background:#0071fa}.ambient-b{width:360px;height:350px;left:-240px;top:930px;background:#14bdeb}.topbar{height:84px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #ffffff13;max-width:1380px;padding:0 44px;margin:auto;position:relative;z-index:2}.brand{display:flex;align-items:center;gap:13px}.top-actions{display:flex;align-items:center;gap:23px}.site-label,.home-link{color:#a8c2df;font-size:12px;font-weight:700;letter-spacing:1px}.home-link{border:1px solid #35597f;border-radius:9px;padding:12px 18px;transition:background .2s}.home-link:hover{background:#183c64}.page{max-width:1280px;padding:0 36px;margin:auto;position:relative;z-index:1}.hero{display:flex;justify-content:space-between;align-items:center;min-height:360px;padding:42px 17px 33px;overflow:hidden}.hero-copy{position:relative;z-index:2}.eyebrow{font-size:12px;letter-spacing:2.6px;font-weight:800;color:#58c4fc;display:flex;align-items:center;gap:12px}.pulse,.status-dot{width:8px;height:8px;border-radius:50%;background:#5bedb9;display:inline-block;box-shadow:0 0 0 5px #46d6a719,0 0 12px #5bedb9}.hero h1{font-size:clamp(60px,8vw,111px);line-height:1;margin:19px 0 22px;font-weight:900;letter-spacing:-6px}.hero h1 em{font-style:normal;background:linear-gradient(95deg,#69edff,#4da5fc 74%);-webkit-background-clip:text;background-clip:text;color:transparent}.sup{font-size:14px;color:#5ca4df;vertical-align:top;letter-spacing:0;margin-left:10px}.hero-copy>p{font-size:17px;line-height:1.85;color:#bbcfeb;margin:0 0 26px}.feature-pills{display:flex;flex-wrap:wrap;gap:9px}.feature-pills span{font-size:12px;border:1px solid #2a5581;background:#09274a9e;border-radius:30px;padding:8px 12px;color:#d0e7ff}.hero-illustration{width:420px;height:290px;flex-shrink:0;position:relative;opacity:.95}.orbit{position:absolute;border:1px solid #4aabed2b;border-radius:50%;transform:rotate(-24deg)}.orbit-1{width:390px;height:218px;top:48px;left:16px;box-shadow:0 0 90px #168dff25}.orbit-2{width:293px;height:274px;top:3px;left:60px;border-style:dashed}.hero-core{position:absolute;top:61px;left:138px;width:143px;height:160px;transform:rotate(-8deg);display:flex;flex-direction:column;justify-content:center;align-items:center;background:linear-gradient(145deg,#225bb3,#0a1c47 70%);border:1px solid #58caff80;border-radius:30px;box-shadow:0 20px 60px #007eff3b,inset 0 0 45px #59baff30}.hero-core span{font-size:105px;font-weight:900;line-height:1.2;text-shadow:0 0 25px #77dfff}.hero-core small{font-size:9px;letter-spacing:2px;font-weight:900;color:#80d3ff}.floating-frame{position:absolute;border:1px solid #83dbff80;background:linear-gradient(145deg,#2b7dddce,#132752f5);border-radius:20px;display:grid;place-items:center;box-shadow:0 20px 40px #051129aa,inset 0 0 25px #7bd5ff16}.float-one{width:81px;height:78px;top:43px;left:54px;transform:rotate(-16deg);color:#bcf4ff;font-size:25px}.float-two{width:99px;height:79px;right:46px;top:152px;transform:rotate(13deg);font-weight:900;font-size:24px;color:#90fff7}.float-three{width:66px;height:69px;left:73px;bottom:6px;transform:rotate(12deg);font-size:32px;color:#87d8ff}.studio-shell,.result{background:linear-gradient(145deg,#0b2446,#081a34 70%);border:1px solid #305176;border-radius:22px;box-shadow:var(--shadow);overflow:hidden}.section-heading{display:flex;justify-content:space-between;align-items:center;padding:30px 34px 24px}.number{color:#55c8fb;font-size:11px;font-weight:800;letter-spacing:2.2px}.section-heading h2,.how-title h2{font-size:27px;letter-spacing:-1px;margin:7px 0 7px}.section-heading p{margin:0;color:var(--muted);font-size:13px}.local-badge,.result-mark{font-size:10px;letter-spacing:1.3px;font-weight:900;color:#98e2c9;display:flex;gap:10px;align-items:center;padding:11px 14px;border:1px solid #235d63;border-radius:25px;background:#0d343f}.tabs{display:flex;gap:8px;padding:0 34px;border-bottom:1px solid var(--line)}.tab{border:0;background:transparent;color:#93b5d6;padding:16px 28px;font-size:14px;font-weight:800;border-bottom:3px solid transparent;display:flex;align-items:center;gap:10px;transition:.2s}.tab.active{color:#fff;border-bottom-color:#64dafa;background:linear-gradient(0deg,#177cbb28,transparent)}.tab:hover{color:#fff}.workspace{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(310px,.85fr);gap:28px;padding:28px 34px 36px}.editor-left,.editor-right{min-width:0}.panel{height:100%;padding:25px;background:#0616308f;border:1px solid #27476e;border-radius:16px}.dropzone{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:11px;text-align:center;min-height:280px;padding:28px 15px;border-radius:14px;background:radial-gradient(ellipse at 50% 15%,#1a467b6d,transparent 64%),#091c3a;border:1.5px dashed #4677ad;transition:.2s;cursor:pointer}.dropzone:hover,.dropzone.dragover{border-color:#65dbff;background-color:#102e56}.drop-icon{display:grid;place-items:center;height:60px;width:60px;border:1px solid #64c9ff6b;border-radius:16px;background:#18487a;color:#80eaff;font-size:28px;box-shadow:0 0 29px #188cff20}.dropzone strong{font-size:18px;margin-top:7px}.dropzone>span:not(.drop-icon):not(.select-file){color:#acc4e2;font-size:13px}.dropzone small{color:#789ec5;font-size:11px;line-height:1.5}.select-file{background:linear-gradient(95deg,#247bca,#2467b9);border:1px solid #59aaff80;box-shadow:0 6px 16px #01316a50;border-radius:9px;color:white;padding:12px 23px;font-size:13px;font-weight:800;margin-top:10px}.video-loaded{margin-top:20px}.source-title{display:flex;align-items:center;gap:10px;justify-content:space-between;margin-bottom:15px}.source-title>div{display:flex;flex-direction:column;gap:5px;min-width:0}.caption-label{font-size:11px;color:#69baf4;letter-spacing:1px;font-weight:800}.truncate{max-width:360px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;font-size:14px}.muted{color:var(--muted)}.small{font-size:11px}.mini-btn{border:1px solid #3a648b;background:#0c3154;border-radius:9px;color:#d3e9ff;padding:9px 12px;white-space:nowrap;font-size:12px;font-weight:700}.mini-btn:hover{background:#174b7a}.video-wrap{background:#030a13;border-radius:12px;overflow:hidden;border:1px solid #1e3d5c;display:flex;align-items:center;justify-content:center;min-height:150px;max-height:350px}.video-wrap video{display:block;width:100%;max-height:350px;object-fit:contain}.scrub-controls{margin-top:17px}.scrub-controls label,.flex-label{display:flex;justify-content:space-between;align-items:center}.scrub-controls label{color:#bad0e9;font-size:12px;font-weight:700;margin-bottom:8px}.scrub-controls input{width:100%;accent-color:#59c8ff}.trim-heading{display:flex;justify-content:space-between;align-items:center;margin:19px 0 12px}.trim-heading strong{font-size:13px}.trim-heading span{font-size:11px;color:#8eaccc}.time-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.time-grid label{color:#b0cae5;font-size:11px;font-weight:700}.time-grid input{margin-top:7px;width:100%;border:1px solid #33577b;background:#0b2546;color:#fff;border-radius:9px;padding:11px 12px;outline:none}.time-grid input:focus,.settings-group input:focus,.settings-group select:focus{border-color:#62ccff;box-shadow:0 0 0 2px #46bfff21}.trim-bar{display:flex;gap:13px;margin:18px 0 3px}.trim-bar input{width:50%;accent-color:#59ceff}.trim-summary{color:#75c9ef;font-size:11px}.editor-right{background:#081a33cc;border:1px solid #27476e;border-radius:16px;padding:24px}.setting-heading{border-bottom:1px solid #2b496c;padding-bottom:18px}.setting-heading h3{font-size:19px;margin:8px 0 0}.settings-group{margin-top:20px}.settings-group label,.flex-label label{display:block;color:#cde0f3;font-size:12px;font-weight:700;margin-bottom:9px}.settings-group small{font-size:10px;color:#7ca0c5;display:block;margin-top:8px}.select-wrap{position:relative}.select-wrap:after{content:'⌄';font-size:17px;position:absolute;right:13px;top:6px;color:#7cb9ed;pointer-events:none}.settings-group select,.settings-group input[type=text]{width:100%;border:1px solid #355578;border-radius:9px;background:#0b294c;color:#f0f8ff;padding:11px 12px;appearance:none;outline:none}.settings-group input[type=text]{appearance:auto}.settings-group select{padding-right:30px}.optional{font-size:10px;color:#709ac2;font-weight:500}.flex-label label{margin:0}.flex-label strong{font-size:12px;color:#5bd5fb}.range{width:100%;margin:16px 0 6px;accent-color:#52caff}.minmax{display:flex;justify-content:space-between;font-size:10px;color:#82a7c9}.toggle-row{margin-top:20px;display:flex;align-items:center;justify-content:space-between;gap:15px;position:relative;cursor:pointer}.toggle-row strong{font-size:12px;display:block}.toggle-row small{font-size:10px;color:#87a5c7;display:block;margin-top:6px}.toggle-row input{position:absolute;right:6px;opacity:0}.switch{width:43px;height:24px;background:#38516d;border-radius:20px;position:relative;transition:.2s;flex-shrink:0}.switch:after{content:'';position:absolute;top:3px;left:3px;width:18px;height:18px;background:#e5f2ff;border-radius:50%;transition:.2s}.toggle-row input:checked+.switch{background:#138dcf}.toggle-row input:checked+.switch:after{transform:translateX(19px)}.toggle-row input:focus-visible+.switch{outline:2px solid #fff;outline-offset:3px}.estimate{border-top:1px solid #284363;margin:23px 0 0;padding-top:18px;color:#92b7d8;font-size:12px;line-height:1.6}.convert-btn,.download-btn{display:flex;justify-content:space-between;align-items:center;width:100%;border:0;background:linear-gradient(95deg,#2689e9,#3cb8fa);box-shadow:0 10px 25px #0b8be13c;border-radius:10px;padding:17px 20px;font-size:15px;font-weight:900;color:#fff;margin-top:15px;transition:.2s}.convert-btn:not(:disabled):hover,.download-btn:hover{filter:brightness(1.12);transform:translateY(-1px)}.cancel-btn{width:100%;color:#ffced4;background:#4f253c;border:1px solid #a45e70;padding:12px;margin-top:10px;border-radius:9px;font-size:12px}.progress-box{margin-top:17px;padding:13px;border:1px solid #276d93;border-radius:10px;background:#092b48}.progress-header{display:flex;justify-content:space-between;font-size:11px;color:#b6eaff}.progress-track{height:6px;background:#133b61;border-radius:10px;margin-top:11px;overflow:hidden}.progress-track>div{height:100%;width:0;background:linear-gradient(90deg,#428dff,#5ae9ed);transition:width .2s}.legal-note{color:#7192b6;font-size:10px;line-height:1.65;margin:16px 0 0}.photos-loaded{margin-top:22px}.photo-row-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.photo-list{display:flex;flex-wrap:wrap;gap:10px;max-height:290px;overflow:auto}.photo-tile{width:100px;padding:6px;background:#0e2b4b;border:1px solid #34577b;border-radius:10px;display:flex;flex-direction:column;gap:6px}.photo-tile img{width:100%;height:74px;object-fit:cover;border-radius:5px;background:#000}.photo-tile small{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#b3c9e0;font-size:9px}.photo-buttons{display:flex;gap:4px}.photo-buttons button{flex:1;background:#174572;border:1px solid #38648f;border-radius:5px;color:#fff;font-size:11px;padding:5px 0}.photo-buttons button:hover{background:#28669c}.info-note{font-size:11px;color:#84a9c9;line-height:1.65}.result{margin-top:27px}.result-mark{border-color:#2c896f;background:#0b3a37}.result-body{border-top:1px solid #264568;padding:28px 34px 34px;display:grid;grid-template-columns:minmax(0,1fr) 285px;gap:28px;align-items:center}.result-preview{min-height:140px;border:1px solid #304e70;background:#020b19;border-radius:12px;display:flex;align-items:center;justify-content:center;padding:14px;overflow:hidden}.result-preview img{max-width:100%;max-height:420px;object-fit:contain}.result-actions{display:flex;flex-direction:column;gap:12px;min-width:0}.result-actions strong{font-size:14px;overflow-wrap:anywhere}.result-actions p{color:#8eabc7;font-size:12px;margin:0}.download-btn{margin-top:10px}.restart-btn{padding:12px}.how{margin:65px 0}.how-title{text-align:center}.how-title h2{margin:10px 0 27px}.how-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.how-grid>div{border:1px solid #245078;background:linear-gradient(135deg,#0c2a4b,#081b34);padding:26px;border-radius:15px}.how-grid span{font-size:22px;color:#52beff;font-weight:900}.how-grid h3{font-size:16px;margin:14px 0 8px}.how-grid p{font-size:12px;color:#90b1d0;line-height:1.8;margin:0}footer{max-width:1280px;margin:auto;border-top:1px solid #244467;padding:25px 36px 35px;display:flex;justify-content:space-between;gap:14px;color:#7699bd;font-size:10px;letter-spacing:1px}footer a{font-size:12px;font-weight:800;color:#bfd8f2}.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:#1b3353;border:1px solid #579cce;border-radius:12px;padding:15px 20px;max-width:min(560px,90vw);color:#fff;font-size:13px;box-shadow:0 12px 45px #000b;z-index:30;line-height:1.6}[hidden]{display:none!important}
@media(max-width:940px){.hero-illustration{width:290px;transform:scale(.78);transform-origin:left center;margin-right:-40px}.workspace{grid-template-columns:minmax(0,1fr) 310px;gap:16px;padding:22px}.section-heading{padding:26px 23px 20px}.tabs{padding:0 23px}.panel,.editor-right{padding:19px}.hero h1{letter-spacing:-4px}}
@media(max-width:740px){.topbar{padding:0 17px;height:70px}.site-label{display:none}.home-link{padding:9px 12px;font-size:11px}.page{padding:0 13px}.hero{padding:43px 12px 37px;min-height:320px}.hero-illustration{position:absolute;right:-150px;top:75px;opacity:.25;transform:scale(.8);pointer-events:none}.hero h1{font-size:clamp(53px,12vw,84px);letter-spacing:-3px}.hero-copy>p{font-size:14px}.feature-pills span{font-size:10px}.eyebrow{font-size:10px;letter-spacing:1.4px}.workspace{display:block;padding:15px}.editor-right{margin-top:17px}.section-heading h2{font-size:23px}.section-heading{padding:22px 18px 18px}.studio-shell>.section-heading{position:relative}.studio-shell>.section-heading>div{min-width:0;width:100%}.studio-shell>.section-heading .local-badge{position:absolute;right:18px;top:50%;transform:translateY(-50%);font-size:9px;line-height:1.2;letter-spacing:.5px;gap:7px;padding:8px 10px;white-space:nowrap}.local-badge .status-dot{width:8px;height:8px;flex:0 0 8px}.tabs{padding:0 15px}.tab{padding:15px 14px;font-size:12px}.dropzone{min-height:260px}.panel{padding:14px}.result-body{grid-template-columns:1fr;padding:20px 17px;gap:20px}.result-actions{gap:9px}.how{margin:55px 0}.how-grid{grid-template-columns:1fr;gap:10px}.how-grid>div{padding:19px}.how-grid span{font-size:17px}.how-grid h3{margin:7px 0 5px}.how-title h2{font-size:23px}footer{flex-wrap:wrap;padding:23px 15px 30px;font-size:9px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

/* GIF STUDIO 1.1: video editing tools only. Photo workflow and base layout unchanged. */
.clip-player-tools{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:12px 0 0}.clip-player-tools .mini-btn{color:#91e6ff;border-color:#3c7695}.crop-preview-wrap{margin-top:14px;border:1px solid #325779;border-radius:11px;padding:12px;background:#051427}.crop-preview-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12px;color:#c6ebff;margin-bottom:9px}.crop-preview-heading span{color:#88b1d3;font-size:10px}.crop-preview-wrap canvas{display:block;max-width:100%;max-height:260px;width:auto;height:auto;object-fit:contain;margin:auto;background:#030810;border-radius:6px}.timeline-editor{margin-top:20px;border:1px solid #315d84;padding:12px;background:#061a34;border-radius:12px}.timeline-top{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:12px;margin-bottom:11px}.timeline-top span{font-size:11px;color:#85cfff;font-variant-numeric:tabular-nums}.timeline-track{height:72px;position:relative;touch-action:pan-y;cursor:crosshair;isolation:isolate;border-radius:7px;background:repeating-linear-gradient(90deg,#123e64 0,#123e64 30px,#0b2d50 30px,#0b2d50 60px);border:1px solid #345d82;margin:0 8px}.timeline-thumbs{position:absolute;inset:0;display:flex;overflow:hidden;border-radius:6px}.timeline-frame{flex:1 1 0;min-width:0;overflow:hidden;border-right:1px solid #17375c;text-align:center;display:flex;align-items:center;justify-content:center;color:#7297b6}.timeline-frame img{width:100%;height:100%;object-fit:cover}.timeline-shade{position:absolute;top:0;bottom:0;left:0;background:#020c1dc4;pointer-events:none;z-index:1}.timeline-selected{position:absolute;top:0;bottom:0;left:0;width:40%;background:#4d91fa22;border:2px solid #89bdff;pointer-events:none;z-index:2;box-sizing:border-box}.timeline-playhead{position:absolute;top:-6px;bottom:-6px;width:2px;background:#fff;box-shadow:0 0 6px #000;pointer-events:none;z-index:3}.timeline-handle{position:absolute;top:-2px;bottom:-2px;width:22px;transform:translateX(-50%);border:0;border-radius:6px;background:#8bb9ff;color:#061933;display:flex;align-items:center;justify-content:center;z-index:4;font-weight:900;cursor:ew-resize;touch-action:none;padding:0;box-shadow:0 0 7px #001d54a9}.timeline-handle:hover,.timeline-handle:focus-visible{background:#bee0ff}.timeline-axis{display:flex;justify-content:space-between;color:#7799c1;font-size:10px;margin:9px 2px 0;font-variant-numeric:tabular-nums}.fine-editor{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:17px}.fine-title{display:block;color:#c7ddf3;font-size:11px;font-weight:700;margin-bottom:8px}.fine-buttons{display:flex;gap:5px}.fine-buttons button{min-width:0;flex:1;border:1px solid #375e85;background:#0b2b4d;color:#cfe9ff;border-radius:7px;padding:9px 3px;font-size:10px;white-space:nowrap}.fine-buttons button:hover{background:#1b4975}.segment-editor{margin-top:20px;padding:14px;background:#091f3d;border:1px solid #284d75;border-radius:11px}.segment-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.segment-toolbar strong{font-size:13px;display:block}.segment-toolbar small{display:block;color:#86aacc;margin-top:5px;font-size:10px}.segments-list{display:flex;flex-direction:column;gap:7px;max-height:180px;overflow:auto}.segment-card{display:flex;align-items:center;gap:5px;border:1px solid #31537a;border-radius:8px;background:#081934}.segment-card.active{border-color:#60bdff;background:#13436e}.segment-select{background:none;border:0;color:#b7d4f1;min-width:0;text-align:left;padding:10px 8px;flex:1;font-size:11px;font-variant-numeric:tabular-nums;white-space:normal}.segment-card.active .segment-select{color:#fff;font-weight:800}.segment-remove{background:none;border:0;color:#cde1f7;padding:7px 12px;font-size:19px}.segment-remove:disabled{opacity:.22}.segment-footer{display:flex;justify-content:space-between;gap:8px;align-items:center;color:#84b4d9;font-size:11px;margin-top:12px}.segment-check{display:flex;align-items:center;gap:8px;cursor:pointer;color:#bddaff}.segment-check input{accent-color:#49bdf8}.video-edit-settings{padding-bottom:2px;border-bottom:1px solid #294969;margin-bottom:21px}.reset-edit{border:1px solid #3b668e;background:#0c3055;border-radius:9px;color:#c0e0fa;margin:12px 0 17px;padding:10px 12px;font-size:11px;font-weight:800;width:100%;cursor:pointer}.reset-edit:hover{background:#20527a}.time-dialog{position:fixed;inset:0;z-index:45;background:#030915c7;display:flex;align-items:center;justify-content:center;padding:20px}.time-dialog-panel{width:min(430px,100%);background:linear-gradient(145deg,#112c50,#061629);border:1px solid #4680bd;box-shadow:0 28px 80px #000d;border-radius:16px;padding:25px;position:relative}.time-close{position:absolute;right:14px;top:12px;border:0;background:none;color:#e5f4ff;font-size:26px}.time-dialog-panel h3{margin:7px 0;font-size:21px}.time-dialog-panel p{font-size:12px;color:#abc3dc;margin:7px 0 19px}.time-fields{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.time-fields label{font-size:11px;color:#9ed0f4}.time-fields input{display:block;width:100%;padding:12px 8px;margin-top:6px;background:#06172c;border:1px solid #3e6c98;border-radius:8px;color:#fff;text-align:center;font-size:18px;font-variant-numeric:tabular-nums}.time-dialog-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:23px}.time-dialog-actions button{min-width:85px}.time-dialog-actions .confirm{background:#328ff0;color:#fff}
@media(max-width:740px){.timeline-track{height:61px}.fine-editor{grid-template-columns:1fr;gap:10px}.fine-buttons button{font-size:11px;padding:10px 6px}.timeline-top{font-size:11px}.segment-select{font-size:10px}.crop-preview-wrap canvas{max-height:230px}}

/* 1번 파란 구간 선택: 가운데를 잡으면 구간 전체 + 영상 프레임 동기 이동 */
.timeline-selected{pointer-events:auto;cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none}
.timeline-track.moving-range .timeline-selected,.timeline-track.moving-range .timeline-move-grip{cursor:grabbing;background-color:#519cff3d}
.timeline-move-grip{position:absolute;top:50%;left:0;z-index:5;transform:translate(-50%,-50%);width:29px;height:30px;display:flex;align-items:center;justify-content:center;background:#a6ccff;color:#072046;border:2px solid #d9ecff;border-radius:9px;box-shadow:0 2px 9px #05152ee0;font-size:18px;font-weight:900;cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none;padding:0}
.timeline-move-grip:hover,.timeline-move-grip:focus-visible{background:#e5f4ff;outline:2px solid #62baff;outline-offset:2px}
.timeline-tip{font-size:10px;color:#9ed5ff;line-height:1.55;margin:11px 2px 0}
@media(max-width:740px){.timeline-move-grip{width:31px;height:29px}.timeline-tip{font-size:10px}}

/* 짧은 구간에서도 가운데 이동 버튼과 양쪽 자르기 손잡이가 겹치지 않도록 분리 */
.timeline-editor .timeline-track{margin-top:14px}
.timeline-move-grip{top:-5px;height:28px}

/* v1.3 — 2번 참고 이미지형 구간 선택 UI. 기존 화면의 중복 슬라이더는 비표시. */
.legacy-trim-inputs[hidden]{display:none!important}
.timeline-editor{padding:17px 14px 13px;margin-top:17px;background:#071931;border-color:#315b86;overflow:hidden}
.timeline-top{align-items:flex-start;margin:0 0 14px;flex-wrap:wrap;gap:8px}
.timeline-top>strong{font-size:13px;white-space:nowrap;color:#eff8ff}
.timeline-timecodes{display:flex;align-items:center;gap:5px;flex-wrap:wrap;font-variant-numeric:tabular-nums}
.timeline-timecodes .time-chip{padding:5px 8px;border-radius:22px;background:#1c3556;color:#e6f5ff;font-size:11px;font-weight:800}
.timeline-timecodes .timeline-duration{font-size:11px;font-weight:800;color:#90d8ff;padding:5px 3px}
.timeline-viewport{width:100%;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;touch-action:pan-x pan-y;scrollbar-width:thin;scrollbar-color:#527da9 #122a48;border-radius:13px;background:#07152b;scroll-behavior:auto}
.timeline-viewport::-webkit-scrollbar{height:5px}
.timeline-viewport::-webkit-scrollbar-thumb{background:#4977a1;border-radius:6px}
.timeline-editor .timeline-track{margin:0;height:91px;min-width:100%;border:0;border-radius:13px;background:#112844;cursor:crosshair;touch-action:pan-x;isolation:isolate}
.timeline-editor .timeline-thumbs{right:auto;top:11px;bottom:11px;border-radius:5px;gap:0;pointer-events:none}
.timeline-editor .timeline-frame{flex:none;display:grid;place-items:center;background:linear-gradient(125deg,#173f63,#0b2543);border:1px solid #0b1f36;overflow:hidden}
.timeline-editor .timeline-frame:nth-child(3n + 2){background:linear-gradient(125deg,#24466e,#122944)}
.timeline-editor .timeline-frame span{font-size:13px;color:#52769b}
.timeline-editor .timeline-frame img{width:100%;height:100%;object-fit:cover}
.timeline-editor .timeline-shade{z-index:1;top:0;bottom:0;background:#010a1aa9;pointer-events:none}
.timeline-editor .timeline-selected{top:0;bottom:0;border:3px solid #85b5ff;border-radius:15px;background:#78a9f42b;box-shadow:0 0 0 1px #cce4ff70,inset 0 0 18px #7ea9f744;z-index:2;cursor:grab;touch-action:none}
.timeline-editor .timeline-track.moving-range .timeline-selected{background:#7daaff30;cursor:grabbing}
.timeline-editor .timeline-handle{top:0;bottom:0;width:37px;border:0;transform:translateX(-50%);border-radius:13px;background:#86b1fa;color:#072349;font-size:20px;z-index:6;box-shadow:0 2px 9px #061d41b3}
.timeline-editor .timeline-handle:hover,.timeline-editor .timeline-handle:focus-visible{background:#b8d6ff;outline:0}
.timeline-editor .timeline-playhead{top:6px;bottom:6px;width:3px;border-radius:4px;background:#fff;z-index:5;box-shadow:0 0 0 1px #1d417b,0 0 8px #fff9}
.timeline-editor .timeline-move-grip[hidden]{display:none!important}
.timeline-axis{margin:10px 3px 0}
.timeline-bottom{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:6px;margin:10px 0 0}
.timeline-bottom .trim-summary{font-size:12px;font-weight:800;color:#86d8ff}
.timeline-limit{color:#87a8ca;font-size:10px}
.timeline-tip{font-size:11px;line-height:1.65;margin:10px 1px 0;color:#acc9e6}
@media(max-width:740px){
 .timeline-editor{padding:14px 10px}
 .timeline-editor .timeline-track{height:82px}
 .timeline-editor .timeline-handle{width:36px}
 .timeline-timecodes{gap:3px}
 .timeline-timecodes .time-chip{font-size:10px;padding:5px 7px}
 .timeline-timecodes .timeline-duration{font-size:10px}
}


/* v1.4 — 오른쪽 변환 옵션을 다섯 개의 간결한 영상 편집 메뉴로 교체 */
.quick-edit-menu{display:flex;flex-direction:column;gap:10px;margin:14px 0 20px}
.quick-edit-item{border:1px solid #315780;border-radius:12px;background:linear-gradient(125deg,#0d294b,#0a203d);overflow:hidden;transition:border-color .15s ease,background .15s ease}
.quick-edit-item[open]{border-color:#69b4ff;background:#0d2d51;box-shadow:0 0 0 1px #3e8bd12b}
.quick-edit-item summary{list-style:none;min-height:54px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 17px;cursor:pointer;user-select:none;-webkit-user-select:none}
.quick-edit-item summary::-webkit-details-marker{display:none}
.quick-edit-item summary:focus-visible{outline:2px solid #67c8ff;outline-offset:-3px;border-radius:11px}
.quick-edit-item summary:hover{background:#15385c}
.quick-edit-item .tool-title{font-weight:800;font-size:15px;letter-spacing:-.2px;color:#f5faff}
.quick-edit-item .tool-arrow{font-size:21px;line-height:1;color:#8fc9ff;transition:transform .18s ease}
.quick-edit-item[open] .tool-arrow{transform:rotate(180deg)}
.quick-edit-content{padding:2px 16px 17px;border-top:1px solid #294b6b}
.quick-edit-content>p{font-size:12px;line-height:1.7;color:#abcde8;margin:12px 0}
.quick-edit-content .settings-group{margin-top:14px;margin-bottom:4px}
.quick-edit-content .settings-group:last-child{margin-bottom:0}
.quick-edit-content .video-edit-settings{border:0;margin:0;padding:0}
.quick-edit-content .reset-edit{margin:12px 0 0}
.quick-tool-action{border:1px solid #4b83ba;color:#d7f0ff;background:#133c63;border-radius:9px;padding:10px 12px;font-size:12px;font-weight:800}
.quick-tool-action:hover{background:#1b5385}
.photo-settings{margin:20px 0 22px}
.photo-settings .settings-group{margin-bottom:22px}
@media(max-width:740px){.quick-edit-menu{gap:9px}.quick-edit-item summary{min-height:52px;padding:14px 15px}.quick-edit-item .tool-title{font-size:14px}}

/* v1.5 – concise video editing: one filmstrip and five real tools */
.sr-only{position:absolute!important;width:1px!important;height:1px!important;margin:-1px!important;padding:0!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.video-loaded .clip-player-tools{margin:10px 0 2px;justify-content:flex-start}
.video-loaded #playSelection{font-size:12px;font-weight:800;min-height:38px;background:#143b69;padding:9px 13px;border:1px solid #428ad2}
.video-loaded .timeline-editor{margin-top:13px;padding:14px 14px 13px;overflow:hidden;border:1px solid #386baa;border-radius:14px;background:linear-gradient(160deg,#0e264a,#071831)}
.video-loaded .timeline-top{display:flex;justify-content:space-between;align-items:center;gap:9px;margin-bottom:10px}
.video-loaded .timeline-top>strong{font-size:14px;color:#f4f9ff}
.video-loaded .timeline-timecodes{margin-left:auto;justify-content:flex-end}
.video-loaded .timeline-viewport{border-radius:13px;background:#0a1a32;border:1px solid #315780;min-height:100px;touch-action:pan-x pan-y}
.video-loaded .timeline-track{height:100px;background:#142d4a;min-width:100%;touch-action:pan-x}
.video-loaded .timeline-thumbs{top:10px;bottom:10px}
.video-loaded .timeline-shade{background:#020b1d99}
.video-loaded .timeline-selected{border:3px solid #afd0ff;background:#7faefc18;border-radius:15px;box-shadow:0 0 0 2px #4077b5,inset 0 0 0 1px #ffffff44;touch-action:none;cursor:grab;z-index:4}
.video-loaded .timeline-track.moving-range .timeline-selected{background:#8db6fc35;cursor:grabbing}
.video-loaded .timeline-handle{width:36px;z-index:7;background:#8bb5ff;color:#062040;border-radius:13px;font-size:18px;box-shadow:0 1px 8px #0007;touch-action:none}
.video-loaded .timeline-playhead{z-index:5;background:#fff;width:2px;box-shadow:0 0 6px #fff8}
.video-loaded .timeline-bottom{margin-top:7px}
.video-loaded .timeline-axis{margin-top:5px}
.video-loaded .trim-summary{font-weight:800;font-size:12px}
#trimTool .quick-edit-content .time-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:13px}
#trimTool .quick-edit-content .time-grid label{font-size:11px;display:block;color:#bedafa}
#trimTool .quick-edit-content .time-grid input{display:block;margin-top:7px;width:100%;padding:11px 9px;background:#071d39;border:1px solid #4475a6;border-radius:8px;color:#fff;font-size:14px;font-variant-numeric:tabular-nums}
#trimTool .quick-edit-content .fine-editor{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:15px}
#trimTool .quick-edit-content .fine-buttons button{font-size:10px;padding:9px 2px;min-height:34px}
#trimTool .quick-edit-content .segment-editor{margin-top:15px;padding:12px}
#trimTool .quick-edit-content .segment-toolbar{flex-wrap:wrap}
#trimTool .quick-edit-content .segment-footer{align-items:flex-start;flex-wrap:wrap}
#videoQuickTools{margin:14px 0 20px}
@media(max-width:740px){.video-loaded .timeline-editor{padding:11px 9px}.video-loaded .timeline-top{align-items:flex-start;flex-wrap:wrap}.video-loaded .timeline-timecodes{margin-left:0}.video-loaded .timeline-track{height:87px}.video-loaded .timeline-viewport{min-height:87px}.video-loaded .timeline-handle{width:33px}#trimTool .quick-edit-content .fine-editor{grid-template-columns:1fr}.video-loaded .timeline-bottom{gap:3px}}
/* Avoid decorative-only objects widening mobile viewport and shrinking the editor. */
@media (max-width:740px){
 html,body{max-width:100%;overflow-x:clip}
 .ambient,.hero-illustration{display:none!important}
 .hero{min-height:0}
 .page,.studio-shell,.workspace{min-width:0;max-width:100%}
}

/* v8.120: only relocate the working trim controls immediately below the filmstrip. */
.video-loaded > #trimTool{margin-top:14px;border:1px solid #3b70ad;border-radius:13px;background:linear-gradient(130deg,#102d51,#091f3e)}
.video-loaded > #trimTool[open]{border-color:#78b6f9}
.video-loaded > #trimTool > summary{min-height:50px}
.video-loaded > #trimTool .quick-edit-content{padding:13px 15px 17px}
@media(max-width:740px){.video-loaded > #trimTool .quick-edit-content{padding:11px 10px 15px}}

/* v8.121: compact desktop video workspace. Only layout rules; no feature logic changes. */
@media(min-width:741px){
  /* Intro remains unchanged before file selection. After selecting a video, use the viewport for editing. */
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .hero{display:none}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .topbar{height:58px;padding-inline:24px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .brand-emblem{width:39px;height:39px;font-size:28px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .brand-copy strong{font-size:17px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .page{max-width:1380px;padding:0 20px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .section-heading{padding:10px 19px 9px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .section-heading h2{font-size:22px;margin:1px 0}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .section-heading p{margin:2px 0 0}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .tabs .tab{min-height:42px;padding-block:10px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .workspace{grid-template-columns:minmax(0,1.7fr) minmax(265px,.86fr);gap:14px;padding:11px 17px 15px;align-items:stretch}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) #videoPanel{padding:11px 13px 12px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .video-loaded{margin-top:0}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .source-title{margin-bottom:7px;gap:7px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .source-title .muted.small{font-size:10px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .video-wrap{min-height:0;max-height:min(225px,26vh)}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .video-wrap video{max-height:min(225px,26vh)}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .clip-player-tools{margin:5px 0 0}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) #playSelection{min-height:28px;padding:5px 9px;font-size:11px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .timeline-editor{margin-top:6px;padding:8px 10px 7px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .timeline-top{margin-bottom:5px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .timeline-top>strong{font-size:12px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .timeline-timecodes .time-chip{padding:3px 6px;font-size:10px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .timeline-timecodes .timeline-duration{font-size:10px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .timeline-viewport{min-height:74px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .timeline-track{height:74px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .timeline-thumbs{top:6px;bottom:6px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .timeline-handle{width:30px;border-radius:10px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .timeline-axis{margin-top:3px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .timeline-bottom{margin-top:3px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) #trimTool{margin-top:7px;border-radius:10px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) #trimTool>summary{min-height:36px;padding:7px 12px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) #trimTool .tool-title{font-size:13px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) #trimTool>.quick-edit-content{
    display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    grid-template-areas:'time segment' 'fine segment' 'jump segment';
    align-items:start;gap:6px 12px;padding:8px 11px 10px;
  }
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) #trimTool .time-grid{grid-area:time;margin-top:0;gap:6px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) #trimTool .time-grid label{font-size:10px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) #trimTool .time-grid input{margin-top:3px;padding:6px 7px;font-size:12px;min-height:31px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) #trimTool .fine-editor{grid-area:fine;display:grid;grid-template-columns:1fr;gap:3px;margin:0}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) #trimTool .fine-title{font-size:10px;line-height:1.3}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) #trimTool .fine-buttons{gap:4px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) #trimTool .fine-buttons button{min-height:26px;padding:5px 3px;font-size:10px;white-space:nowrap}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) #jumpTrim{grid-area:jump;min-height:27px;padding:5px 9px;margin:0;justify-self:start;font-size:11px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) #trimTool .segment-editor{grid-area:segment;margin:0;padding:8px 9px;min-width:0;max-width:100%;align-self:stretch}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) #trimTool .segment-toolbar{margin-bottom:6px;gap:5px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) #trimTool .segment-toolbar strong{font-size:12px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) #trimTool .segment-toolbar small{font-size:9px;line-height:1.3}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) #trimTool .segment-toolbar .mini-btn{padding:6px 7px;font-size:10px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) #trimTool .segments-list{max-height:74px;gap:4px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) #trimTool .segment-select{padding:6px 5px;font-size:10px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) #trimTool .segment-footer{margin-top:5px;gap:3px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .editor-right{padding:14px 16px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .editor-right .setting-heading{margin-bottom:4px;padding-bottom:10px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .editor-right .quick-edit-menu{margin:8px 0 13px;gap:7px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .editor-right .quick-edit-item summary{min-height:39px;padding:8px 12px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .editor-right .quick-edit-item .tool-title{font-size:13px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .editor-right .estimate{margin:9px 0}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .editor-right .convert-btn{min-height:44px}
}
@media (min-width:741px) and (max-width:900px){
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .workspace{grid-template-columns:minmax(0,1.4fr) minmax(235px,.8fr);gap:9px;padding:10px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) #trimTool>.quick-edit-content{gap:6px 7px;padding:7px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) #trimTool .fine-buttons button{font-size:9px;padding:4px 1px}
}
@media(max-width:740px){
  /* Mobile needs vertical scrolling, but uses fewer decorative/empty areas while editing. */
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .hero{display:none}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .topbar{height:54px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .section-heading{padding:12px 13px 9px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .workspace{padding:8px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) #videoPanel{padding:9px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .video-loaded{margin-top:0}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .video-wrap,.video-loaded .video-wrap video{max-height:34vh}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .video-loaded .timeline-editor{margin-top:7px;padding:8px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .video-loaded .timeline-track{height:74px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .video-loaded .timeline-viewport{min-height:74px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .video-loaded>#trimTool{margin-top:8px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .video-loaded>#trimTool>summary{min-height:42px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .editor-right{margin-top:10px}
}

/* Final viewport fitting adjustments: preserve every control while avoiding a vertical scroll on typical desktop heights. */
@media(min-width:741px){
body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .section-heading{min-height:42px;padding:5px 18px 4px}
body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .section-heading .number,
body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .section-heading p{display:none}
body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .section-heading h2{font-size:19px;margin:0}
body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .section-heading .local-badge{padding:7px 10px;font-size:9px}
body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .source-title>div{display:flex;align-items:center;flex-wrap:wrap;column-gap:10px;row-gap:3px}
body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .source-title .caption-label{display:none}
body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .source-title{min-height:30px;margin-bottom:4px}
body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .source-title strong{font-size:12px}
body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .video-wrap,
body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .video-wrap video{max-height:min(205px,23vh)}
body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .timeline-viewport{min-height:66px}
body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .timeline-track{height:66px}
body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .timeline-top{margin-bottom:3px}
body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .timeline-editor{padding-block:7px}
}
@media(min-width:741px) and (max-height:800px){
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .topbar{height:48px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .section-heading{display:none}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .workspace{padding-top:7px;padding-bottom:9px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .video-wrap,
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .video-wrap video{max-height:min(178px,22vh)}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .timeline-viewport{min-height:56px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .timeline-track{height:56px}
}

/* v8.122: only the five requested spatial/text changes; functionality unchanged. */
/* 1. Reduce empty space above the selected video/title. */
body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) #videoPanel{padding-top:5px}
body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .source-title{margin-bottom:3px;min-height:24px}
body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .source-title>div{row-gap:1px}
/* 4. Show the existing file-selector button immediately after selected-range playback. */
.video-loaded .clip-player-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.video-loaded #replaceVideo{min-height:33px;padding:6px 12px;font-size:11px}
@media (min-width:741px){
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .clip-player-tools{margin-top:4px;margin-bottom:3px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) #playSelection,
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) #replaceVideo{min-height:30px;padding:6px 11px;font-size:11px}
}
/* 3/6. One compact row of six *working* precision buttons under the filmstrip.
   The original button ids/events are retained, only the containing element moved. */
.video-loaded > .quick-fine-controls{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;margin:7px 0 4px;padding:0;background:transparent}
.video-loaded > .quick-fine-controls > div{min-width:0}
.video-loaded > .quick-fine-controls .fine-buttons{display:flex;gap:5px}
.video-loaded > .quick-fine-controls .fine-buttons button{font-size:10px;min-height:30px;padding:6px 2px;white-space:nowrap;flex:1;min-width:0}
@media (min-width:741px){
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) #trimTool>.quick-edit-content{
    grid-template-areas:'time segment' 'jump segment';
    grid-template-rows:auto auto;
  }
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .video-loaded > .quick-fine-controls{gap:6px;margin:5px 0 3px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .video-loaded > .quick-fine-controls .fine-buttons button{font-size:10px;min-height:27px;padding:4px 2px}
}
@media (max-width:740px){
  .video-loaded > .quick-fine-controls{gap:6px;margin:7px 0 4px}
  .video-loaded > .quick-fine-controls .fine-buttons{gap:3px}
  .video-loaded > .quick-fine-controls .fine-buttons button{font-size:9px;min-height:32px;padding:6px 2px}
}

/* v8.123 — five real editor tabs replacing the separate right-side option accordion. */
#videoToolSwitcher{margin-top:7px;min-width:0}
#videoToolSwitcher [hidden]{display:none!important}
.video-tool-stage{padding:0;min-width:0}
.video-tool-panel{min-height:135px;padding:8px 0 5px;min-width:0}
.video-tool-tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;margin-top:9px}
.video-tool-tab{border:1px solid #335c86;border-radius:10px;background:#0b2a4a;color:#d0e7ff;font-size:13px;font-weight:800;padding:11px 4px;min-width:0;min-height:42px;transition:background .15s,border-color .15s;touch-action:manipulation}
.video-tool-tab:hover{background:#16446e;border-color:#5594c9}
.video-tool-tab.active{background:linear-gradient(140deg,#338ef1,#1c60b6);border-color:#8ac5ff;color:#fff;box-shadow:0 3px 13px #0a51a54b}
.video-tool-tab:focus-visible{outline:2px solid #85d7ff;outline-offset:2px}
/* Original trim strip and precision controls now belong to the trim-only tab view. */
#videoToolPanel_trim .timeline-editor{margin-top:0}
#videoToolPanel_trim .quick-fine-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:5px 0 3px}
#videoToolPanel_trim .quick-fine-controls>div{min-width:0}
#videoToolPanel_trim .quick-fine-controls .fine-buttons{display:flex;gap:4px}
#videoToolPanel_trim .quick-fine-controls .fine-buttons button{flex:1;min-width:0;font-size:10px;min-height:29px;padding:5px 1px}
#videoToolPanel_trim #trimTool{margin:0 0 6px;border:1px solid #37658e;border-radius:10px;background:#0c2546}
#videoToolPanel_trim #trimTool>summary{min-height:34px;padding:7px 12px}
#videoToolPanel_trim #trimTool .quick-edit-content{padding:8px 10px 12px}
#videoToolPanel_trim #trimTool .time-grid{margin:7px 0}
#videoToolPanel_trim #trimTool .time-grid input{min-height:32px;padding:6px 8px}
/* Full settings appear immediately in the SAME place as the former timeline. */
#videoToolSwitcher .inside-tool-panel{border:0;border-radius:0;background:transparent;box-shadow:none;overflow:visible}
#videoToolSwitcher .inside-tool-panel>summary{display:none!important}
#videoToolSwitcher .inside-tool-panel>.quick-edit-content{border:0;padding:10px 12px 12px;background:linear-gradient(145deg,#0c294e,#071b36);border:1px solid #3b699e;border-radius:11px}
#videoToolSwitcher .inside-tool-panel .settings-group{margin:7px 0 11px}
#videoToolPanel_speed .settings-group,#videoToolPanel_resolution .settings-group,#videoToolPanel_frames .settings-group{max-width:510px}
#videoToolPanel_crop{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:10px;align-items:start}
#videoToolPanel_crop .crop-preview-wrap{grid-column:1;grid-row:1;display:block;margin:0;padding:8px;min-width:0}
#videoToolPanel_crop .crop-preview-wrap canvas{width:100%;height:auto;max-height:175px;object-fit:contain;background:#020b17}
#videoToolPanel_crop .inside-tool-panel{grid-column:2;grid-row:1;min-width:0}
#videoToolPanel_crop .crop-preview-heading{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin-bottom:6px}
#videoToolPanel_crop .crop-preview-heading span{font-size:10px}
#videoToolPanel_crop .quick-edit-content{padding:7px 9px 9px}
#videoToolPanel_crop .video-edit-settings{margin:0;padding:0;border:0}
#videoToolPanel_crop .settings-group{margin:5px 0 7px}
#videoToolPanel_crop .range{margin:6px 0}
/* Hide redundant settings heading on video mode, preserve photo mode. */
body:has(#videoPanel:not([hidden])) .editor-right .setting-heading{display:none}
body:has(#videoPanel:not([hidden])) .editor-right{display:flex;flex-direction:column;justify-content:flex-start}
body:has(#videoPanel:not([hidden])) .editor-right .estimate{margin-top:8px}
@media(max-width:980px){
 #videoToolPanel_crop{grid-template-columns:minmax(0,1fr)}
 #videoToolPanel_crop .crop-preview-wrap,#videoToolPanel_crop .inside-tool-panel{grid-column:1;grid-row:auto}
 #videoToolPanel_crop .crop-preview-wrap canvas{max-height:150px}
}
@media(max-width:740px){
 .video-tool-tab{min-height:42px;font-size:12px;padding:9px 2px}
 .video-tool-tabs{gap:4px}
 #videoToolPanel_trim .quick-fine-controls .fine-buttons button{font-size:9px;padding:6px 1px}
 #videoToolPanel_crop{grid-template-columns:1fr}
 #videoToolPanel_crop .crop-preview-wrap canvas{max-height:170px}
}

/* v8.124: the existing conversion button is shown below the five video editor tabs. */
#videoConvertMount{min-width:0;margin-top:8px}
#videoConvertMount:empty{display:none}
#videoConvertMount .convert-btn{margin:0;min-height:44px;width:100%;justify-content:center;gap:12px;padding:11px 18px;font-size:14px}
#videoConvertMount .convert-btn span:last-child{position:absolute;right:18px}
#videoConvertMount .convert-btn{position:relative}
#photoConvertMount .convert-btn{margin-top:15px}
@media(max-width:740px){
  #videoConvertMount .convert-btn{min-height:46px;font-size:13px}
}

/* v8.125 — no separate result-preview pane: current main video is the live output preview. */
.video-wrap{position:relative}
#liveVideoPreview{position:absolute;inset:0 0 36px 0;width:100%;height:calc(100% - 36px);object-fit:contain;background:#030a13;pointer-events:none;z-index:1}
#inlineResultPreview{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#030a13;z-index:2;pointer-events:none}
#liveVideoPreview[hidden],#inlineResultPreview[hidden],#inlineDownloadBtn[hidden]{display:none!important}
.video-wrap.show-gif-result video{visibility:hidden}
.inline-gif-download{display:flex;justify-content:center;align-items:center;margin-top:7px;border-radius:9px;min-height:41px;padding:9px 12px;font-size:12px}
/* In video mode, remove the empty PC column without stretching the video vertically.
   All status/progress/cancel controls are moved under the existing Save button. */
body:has(#videoPanel:not([hidden])) .workspace{grid-template-columns:minmax(0,1fr);justify-content:center}
body:has(#videoPanel:not([hidden])) .editor-left{width:100%;max-width:900px;margin-inline:auto}
body:has(#videoPanel:not([hidden])) .editor-right{display:none!important}
body:has(#videoPanel:not([hidden])) .video-wrap,body:has(#videoPanel:not([hidden])) .video-wrap video{max-height:290px}
#videoFeedbackMount{width:100%;min-width:0}
#videoFeedbackMount .estimate{font-size:11px;margin:8px 0 0;min-height:0}
#videoFeedbackMount .legal-note{font-size:10px;margin:6px 0 0}
#videoFeedbackMount .progress-box{margin:9px 0 0}
@media(max-width:740px){
 body:has(#videoPanel:not([hidden])) .workspace{grid-template-columns:minmax(0,1fr)}
 body:has(#videoPanel:not([hidden])) .video-wrap,body:has(#videoPanel:not([hidden])) .video-wrap video{max-height:350px}
 #liveVideoPreview{bottom:39px;height:calc(100% - 39px)}
}
/* Override the older loaded-video two-column rule with equal specificity. */
body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .workspace{grid-template-columns:minmax(0,1fr);gap:0}

/* v8.126 — PC result pane; v8.125 mobile interface stays unchanged. */
.desktop-output-pane{display:none}
.desktop-output-pane [hidden]{display:none!important}
.desktop-output-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-bottom:12px;border-bottom:1px solid #2e5075}
.desktop-output-heading strong{color:#f2f8ff;font-size:15px}
.desktop-output-label{color:#69c8fc;font-size:11px;font-weight:700}
.desktop-output-screen{position:relative;display:flex;align-items:center;justify-content:center;min-height:180px;margin-top:14px;border:1px solid #2b5379;border-radius:12px;background:#020916;overflow:hidden}
.desktop-output-screen canvas,.desktop-output-screen img{width:100%;height:100%;max-height:270px;min-height:150px;object-fit:contain}
.desktop-output-placeholder{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;text-align:center;color:#8caecd;font-size:12px;line-height:1.7;padding:20px;margin:0}
.desktop-output-info{margin:12px 0;color:#a8cce8;font-size:12px;line-height:1.6;overflow-wrap:anywhere}
.desktop-output-download{display:flex;align-items:center;justify-content:center;font-size:12px;padding:11px;min-height:43px;border-radius:10px}
@media (min-width: 850px) and (hover: hover) and (pointer: fine){
  /* Keep the desktop v8.124 editing column + a second column reserved for output. */
  body:has(#videoPanel:not([hidden])) .workspace,
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .workspace{grid-template-columns:minmax(0,1.7fr) minmax(270px,.86fr);gap:14px;justify-content:stretch}
  body:has(#videoPanel:not([hidden])) .editor-left{max-width:none;width:auto;margin:0}
  body:has(#videoPanel:not([hidden])) .editor-right{display:flex!important;flex-direction:column;justify-content:flex-start;min-width:0}
  body:has(#videoPanel:not([hidden])) .desktop-output-pane{display:block}
  body:has(#videoPanel:not([hidden])) #liveVideoPreview,
  body:has(#videoPanel:not([hidden])) #inlineResultPreview,
  body:has(#videoPanel:not([hidden])) #inlineDownloadBtn{display:none!important}
  body:has(#videoPanel:not([hidden])) .video-wrap.show-gif-result video{visibility:visible}
  body:has(#videoPanel:not([hidden])) .video-wrap,
  body:has(#videoPanel:not([hidden])) .video-wrap video{max-height:min(230px,27vh)}
}


/* v8.127 | PC desktop layout only: expand the existing SOURCE VIDEO area.
   Preserve original aspect ratio; the result pane and editing tools are untouched.
   The phone/tablet layout inherits the unchanged v8.126 rules. */
@media (min-width:850px) and (hover:hover) and (pointer:fine) {
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .video-wrap {
    height:clamp(210px,30dvh,310px);
    min-height:210px;
    max-height:none;
  }
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .video-wrap video {
    display:block;
    height:100%;
    max-height:none;
    width:100%;
    object-fit:contain;
  }
  /* Recover space around the editor so a taller picture still fits the window. */
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .workspace {
    padding-top:6px;
    padding-bottom:6px;
  }
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .video-loaded .timeline-editor {
    margin-top:7px;
  }
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .video-tool-tabs {
    margin-top:5px;
  }
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) #videoConvertMount {
    margin-top:4px;
  }
}
@media (min-width:850px) and (hover:hover) and (pointer:fine) and (max-height:800px) {
  /* Short PC windows favor keeping the entire editing panel on-screen. */
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .video-wrap {
    height:clamp(185px,calc(100dvh - 574px),230px);
    min-height:185px;
  }
}


/* v8.128: mobile only - keep the seek bar visually stable during selection playback.
   Android Chrome's native media controls fade and recompose on play/pause; this
   compact custom control bar never disappears, and stays out of the video canvas. */
.mobile-video-controls{display:none}
@media (max-width:740px){
  #mainVideoPreview .mobile-video-controls:not([hidden]){
    position:absolute;left:0;right:0;bottom:0;z-index:4;
    display:flex;align-items:center;gap:5px;
    height:39px;min-height:39px;padding:0 7px;
    background:linear-gradient(to bottom,rgba(3,10,19,.88),#030a13 90%);
    border-top:1px solid rgba(78,129,173,.15);
    box-sizing:border-box;user-select:none;
  }
  #mainVideoPreview .mobile-video-controls button{
    display:flex;justify-content:center;align-items:center;
    width:26px;min-width:26px;height:32px;padding:0;
    background:transparent;border:0;border-radius:5px;
    color:#f5faff;font-size:15px;cursor:pointer;
  }
  #mainVideoPreview .mobile-video-controls button:focus-visible,
  #mainVideoPreview .mobile-video-controls input:focus-visible{outline:2px solid #7fc5ff;outline-offset:2px}
  #mainVideoPreview .mobile-video-controls .mobile-video-time{
    flex:0 0 auto;color:#edf7ff;font-size:9px;font-weight:700;
    font-variant-numeric:tabular-nums;white-space:nowrap;
  }
  #mainVideoPreview .mobile-video-controls .mobile-video-seek{
    flex:1 1 auto;width:0;min-width:10px;max-width:none;
    margin:0;accent-color:#57bbff;height:26px;cursor:pointer;
    touch-action:pan-x;
  }
  #mainVideoPreview.show-gif-result .mobile-video-controls{display:none!important}
}


.crop-ratio-pills{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin-top:4px}
.crop-ratio-pill{border:1px solid #335c86;border-radius:12px;background:#091f3b;color:#d6ecff;min-height:88px;padding:12px 8px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;font-size:14px;font-weight:800;transition:background .15s,border-color .15s,transform .15s;touch-action:manipulation}
.crop-ratio-pill:hover{background:#12365d;border-color:#64aef1}
.crop-ratio-pill.active{background:linear-gradient(145deg,#17355f,#0d2446);border-color:#8fc6ff;color:#7eb7ff;box-shadow:0 0 0 1px #3f8ed133 inset}
.crop-ratio-pill:focus-visible{outline:2px solid #87d8ff;outline-offset:2px}
.crop-ratio-icon{display:block;width:18px;height:18px;border:2px solid currentColor;border-radius:3px;opacity:.95}
.crop-ratio-icon-wide{width:24px;height:14px}
.crop-ratio-text{display:block;line-height:1}
.crop-ratio-note{margin:12px 2px 0;color:#89aecd;font-size:11px;line-height:1.5}
.crop-hidden-values{display:none!important}
#videoToolPanel_crop .inside-tool-panel>.quick-edit-content{padding:14px 14px 16px}
@media(max-width:740px){
  .crop-ratio-pills{gap:8px}
  .crop-ratio-pill{min-height:72px;padding:10px 4px;font-size:12px;gap:8px;border-radius:10px}
  .crop-ratio-icon{width:15px;height:15px}
  .crop-ratio-icon-wide{width:22px;height:12px}
  .crop-ratio-note{font-size:10px}
}

/* v8.132 — GIF STUDIO header branding only.
   Use the same icon and separately rendered wordmark as the site's Apps header.
   The small flattened/screenshot logo is no longer used. */
.topbar .gif-brand{display:inline-flex;align-items:center;gap:11px;min-width:0;flex:0 1 auto;white-space:nowrap}
.topbar .gif-brand-icon{display:block;width:56px;height:56px;flex:0 0 56px}
.topbar .gif-brand-icon img{display:block;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 0 12px rgba(75,171,249,.22))}
.topbar .gif-brand-lockup{display:flex;align-items:center;gap:17px;min-width:0;line-height:1}
.topbar .gif-brand-wordmark{font-family:system-ui,-apple-system,'Segoe UI',Arial,sans-serif;font-size:36px;line-height:1.08;font-weight:900;letter-spacing:-1.4px;color:#f8fbff;text-shadow:0 3px 16px rgba(40,111,198,.19);white-space:nowrap}
.topbar .gif-brand-wordmark span{background:linear-gradient(115deg,#91cfff 0%,#5eb3ff 48%,#5ce6c8 100%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
.topbar .gif-brand-tagline{display:block;max-width:116px;border-left:1px solid #3b5872;padding:3px 0 3px 14px;margin:0;color:#a7bfd8;font-weight:850;font-size:10px;line-height:1.45;letter-spacing:1.05px;white-space:normal}
/* Editing mode keeps a low toolbar while retaining a legible, wide brand. */
@media(min-width:741px){
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .topbar .gif-brand-icon{width:46px;height:46px;flex-basis:46px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .topbar .gif-brand-wordmark{font-size:30px;letter-spacing:-1.2px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .topbar .gif-brand-tagline{font-size:9px;max-width:104px;padding-left:11px;letter-spacing:.7px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .topbar .gif-brand-lockup{gap:12px}
}
@media(min-width:741px) and (max-height:800px){
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .topbar .gif-brand-icon{width:39px;height:39px;flex-basis:39px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .topbar .gif-brand-wordmark{font-size:26px}
}
@media(max-width:740px){
  .topbar .gif-brand{gap:7px}
  .topbar .gif-brand-icon{width:39px;height:39px;flex-basis:39px}
  .topbar .gif-brand-lockup{gap:7px}
  .topbar .gif-brand-wordmark{font-size:clamp(19px,5vw,25px);letter-spacing:-.8px}
  .topbar .gif-brand-tagline{font-size:7px;letter-spacing:.25px;max-width:71px;line-height:1.35;padding-left:7px}
  .topbar .top-actions{flex-shrink:0}
}
@media(max-width:390px){
  .topbar .gif-brand-icon{width:33px;height:33px;flex-basis:33px}
  .topbar .gif-brand-wordmark{font-size:clamp(17px,4.7vw,20px)}
  .topbar .gif-brand-tagline{font-size:6px;max-width:57px;padding-left:5px;letter-spacing:0}
  .topbar .gif-brand-lockup{gap:5px}
  .topbar .gif-brand{gap:5px}
  .topbar .top-actions{gap:4px}
  .topbar .home-link{padding:8px 7px;font-size:10px}
}

/* GIF STUDIO v8.133: speed selection controls only; video/photo layout preserved. */
#videoToolPanel_speed .inside-tool-panel>.quick-edit-content{padding:18px 18px 19px}
.speed-editor{width:100%;margin:0 auto;max-width:680px}
.speed-marks{display:flex;align-items:center;justify-content:space-between;color:#e3eaff;font-size:15px;font-weight:700;font-variant-numeric:tabular-nums;padding:0 10px 11px}
.speed-slider-shell{height:46px;position:relative;display:flex;align-items:center;border-radius:30px;background:#252535;padding:0 13px}
.speed-slider{z-index:2;width:100%;margin:0;position:relative;background:transparent;cursor:pointer;appearance:none;-webkit-appearance:none;height:46px;accent-color:#ff9b7f;touch-action:pan-y}
.speed-slider::-webkit-slider-runnable-track{height:7px;border-radius:8px;background:transparent}
.speed-slider::-moz-range-track{height:7px;border-radius:8px;background:transparent}
.speed-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:29px;height:29px;background:#ff9b7f;border:0;border-radius:50%;box-shadow:0 0 0 3px #ff9b7f20;margin-top:-11px}
.speed-slider::-moz-range-thumb{width:29px;height:29px;background:#ff9b7f;border:0;border-radius:50%;box-shadow:0 0 0 3px #ff9b7f20}
.speed-slider:focus-visible{outline:2px solid #85caff;outline-offset:2px;border-radius:25px}
.speed-dots{position:absolute;inset:0 26px;display:flex;align-items:center;justify-content:space-between;pointer-events:none;z-index:1}
.speed-dots i{display:block;width:8px;height:8px;border-radius:50%;background:#80aaff}
.speed-adjust-row{display:flex;align-items:center;justify-content:center;gap:18px;margin-top:16px}
.speed-adjust-row button{width:62px;height:38px;border:0;border-radius:25px;background:#28283a;color:#f6f6ff;font-weight:800;font-size:20px;line-height:1}
.speed-adjust-row button:not(:disabled):hover{background:#3b3b59}
.speed-adjust-row output{font-size:23px;font-weight:850;font-variant-numeric:tabular-nums;color:#f1f2ff;min-width:98px;text-align:center}
@media(max-width:740px){
 #videoToolPanel_speed .inside-tool-panel>.quick-edit-content{padding:16px 10px}
 .speed-marks{font-size:12px;padding:0 7px 10px}
 .speed-slider-shell{height:45px;padding:0 10px}
 .speed-dots{inset-inline:23px}
 .speed-adjust-row{gap:14px;margin-top:13px}
 .speed-adjust-row button{width:57px;height:36px}
 .speed-adjust-row output{font-size:22px;min-width:95px}
}

/* GIF STUDIO v8.134: Requested changes ONLY — enlarged brand, desktop-wide crop,
   and distinctive smoothly draggable speed control. Mobile crop layout preserved. */
@media (min-width:741px){
  .topbar .gif-brand-icon{width:66px;height:66px;flex-basis:66px}
  .topbar .gif-brand-wordmark{font-size:41px;letter-spacing:-1.5px}
  .topbar .gif-brand-tagline{font-size:11px;max-width:126px;padding-left:16px}
  .topbar .gif-brand-lockup{gap:19px}
  .topbar .gif-brand{gap:13px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .topbar .gif-brand-icon{width:56px;height:56px;flex-basis:56px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .topbar .gif-brand-wordmark{font-size:35px;letter-spacing:-1.3px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .topbar .gif-brand-tagline{font-size:10px;max-width:119px;padding-left:13px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .topbar .gif-brand-lockup{gap:16px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .topbar{min-height:58px}
  #videoToolPanel_crop{display:block;grid-template-columns:none;width:100%}
  #videoToolPanel_crop .inside-tool-panel{display:block;width:100%;min-width:0;grid-column:unset;grid-row:unset}
  #videoToolPanel_crop .inside-tool-panel>.quick-edit-content{width:100%;padding:15px 18px 18px}
  #videoToolPanel_crop .crop-ratio-pills{grid-template-columns:repeat(5,minmax(0,1fr));width:100%;gap:clamp(9px,1.5vw,22px)}
  #videoToolPanel_crop .crop-ratio-pill{min-width:0;min-height:100px;gap:11px;font-size:15px}
  #videoToolPanel_crop .crop-ratio-icon{width:21px;height:21px}
  #videoToolPanel_crop .crop-ratio-icon-wide{width:28px;height:17px}
}
@media (min-width:741px) and (max-height:800px){
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .topbar{height:58px;min-height:58px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .topbar .gif-brand-icon{width:48px;height:48px;flex-basis:48px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .topbar .gif-brand-wordmark{font-size:32px}
}
/* Gradient rail, illuminated fill, and small vertical calibration marks are
   an original RoyalBoyz design, replacing the reference's pink knob and dots. */
#videoToolPanel_speed .inside-tool-panel>.quick-edit-content{padding:20px 18px 20px}
.speed-editor{max-width:none}
.speed-marks{font-size:13px;color:#a8c5e5;padding:0 13px 12px;font-weight:800}
.speed-slider-shell{
  --speed-progress:20%;
  height:58px;
  padding:0 13px;
  border:1px solid #325f90;
  border-radius:16px;
  background:linear-gradient(150deg,#0e3156 0%,#071a35 100%);
  box-shadow:inset 0 1px 0 #79c0ff18,0 10px 26px #030d2040;
  isolation:isolate;
}
.speed-slider-shell::before{
  content:'';position:absolute;left:24px;right:24px;top:50%;height:8px;transform:translateY(-50%);
  border-radius:9px;pointer-events:none;
  background:linear-gradient(90deg,#2788ff 0%,#44c8ff 60%,#60e8df 100%) 0 0 / var(--speed-progress) 100% no-repeat,#173c63;
  box-shadow:inset 0 1px 3px #010b21aa;
}
.speed-slider{height:58px;accent-color:#4ccaff;touch-action:pan-y}
.speed-slider::-webkit-slider-runnable-track{height:8px;background:transparent}
.speed-slider::-moz-range-track{height:8px;background:transparent}
.speed-slider::-webkit-slider-thumb{
  width:24px;height:34px;margin-top:-13px;border-radius:9px;
  border:2px solid #c8f6ff;
  background:linear-gradient(90deg,transparent 0 34%,#144576 34% 40%,transparent 40% 58%,#144576 58% 64%,transparent 64%),linear-gradient(160deg,#a6eafa,#53baff 80%);
  box-shadow:0 2px 9px #000b,0 0 16px #51bfff7d;
}
.speed-slider::-moz-range-thumb{
  width:24px;height:34px;border-radius:9px;border:2px solid #c8f6ff;
  background:linear-gradient(90deg,transparent 0 34%,#144576 34% 40%,transparent 40% 58%,#144576 58% 64%,transparent 64%),linear-gradient(160deg,#a6eafa,#53baff 80%);
  box-shadow:0 2px 9px #000b,0 0 16px #51bfff7d;
}
.speed-dots{inset:0 25px;justify-content:space-between;z-index:1;opacity:.95}
.speed-dots i{width:2px;height:11px;border-radius:2px;background:#83b0dc70;box-shadow:none}
.speed-adjust-row{margin-top:14px;gap:14px}
.speed-adjust-row button{
  width:48px;height:40px;border-radius:12px;border:1px solid #3a6b9c;
  background:linear-gradient(145deg,#123d68,#0a2445);color:#aaddff;font-size:22px;
}
.speed-adjust-row button:not(:disabled):hover{background:#1a5585}
.speed-adjust-row output{min-width:120px;font-size:25px;color:#dcf9ff;letter-spacing:-.4px;text-shadow:0 0 14px #2b9dff44}
@media (max-width:740px){
  #videoToolPanel_speed .inside-tool-panel>.quick-edit-content{padding:17px 11px 18px}
  .speed-slider-shell{height:54px;padding:0 12px}
  .speed-slider{height:54px}
  .speed-marks{padding:0 10px 10px;font-size:12px}
  .speed-dots{inset-inline:25px}
  .speed-adjust-row button{height:38px;width:44px}
  .speed-adjust-row output{font-size:23px;min-width:114px}
}


/* GIF STUDIO v8.135: custom resolution button UI */
#videoToolPanel_resolution .inside-tool-panel>.quick-edit-content{padding:18px 18px 20px}
.resolution-settings{max-width:none!important}
.resolution-pills{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:4px}
.resolution-pill{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;min-height:86px;border-radius:18px;border:1px solid #35597f;background:linear-gradient(160deg,#102847 0%,#0b1d38 100%);color:#d9ebff;box-shadow:inset 0 1px 0 rgba(150,210,255,.08),0 8px 22px rgba(2,13,32,.22);padding:14px 10px;transition:transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease}
.resolution-pill:hover{transform:translateY(-1px);border-color:#61c8ff;background:linear-gradient(160deg,#153661 0%,#0d2242 100%);box-shadow:inset 0 1px 0 rgba(170,225,255,.12),0 10px 26px rgba(12,82,152,.26)}
.resolution-pill.active,.resolution-pill[aria-pressed="true"]{border-color:#7fd7ff;background:linear-gradient(135deg,#76a9ff 0%,#5fa7ff 30%,#5fe3ff 100%);color:#06172d;box-shadow:0 0 0 1px rgba(190,244,255,.28),0 18px 34px rgba(63,168,255,.28)}
.resolution-pill.active .resolution-main,.resolution-pill[aria-pressed="true"] .resolution-main,.resolution-pill.active .resolution-sub,.resolution-pill[aria-pressed="true"] .resolution-sub{color:#06172d}
.resolution-main{font-size:30px;font-weight:900;line-height:1;letter-spacing:-1px}
.resolution-sub{font-size:11px;font-weight:800;letter-spacing:.4px;color:#98bfe1}
.resolution-note{margin:14px 2px 0;color:#9dc0df;font-size:12px;line-height:1.7}
@media (min-width:741px){
  .resolution-pills{grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}
  .resolution-pill{min-height:92px;padding:14px 8px}
  .resolution-main{font-size:28px}
}
@media (max-width:740px){
  #videoToolPanel_resolution .inside-tool-panel>.quick-edit-content{padding:16px 11px 18px}
  .resolution-pills{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
  .resolution-pill{min-height:78px;border-radius:16px;padding:12px 6px;gap:5px}
  .resolution-main{font-size:24px}
  .resolution-sub{font-size:10px}
  .resolution-note{font-size:11px;margin-top:12px}
}


/* GIF STUDIO v8.136: footer left brand replaced with company logo lockup */
.site-footer{display:grid;grid-template-columns:minmax(260px,1.2fr) 1fr auto;align-items:center;gap:20px;border-top:1px solid rgba(120,166,210,.2);margin-top:28px;padding:18px 22px 26px;color:#88a8ca;font-size:11px;letter-spacing:.9px}
.footer-brand{display:inline-flex;align-items:center;gap:14px;min-width:0;justify-self:start}
.footer-brand-icon{display:block;width:52px;height:52px;flex:0 0 52px;border-radius:14px;overflow:hidden;box-shadow:0 10px 24px rgba(10,59,110,.22)}
.footer-brand-icon img{display:block;width:100%;height:100%;object-fit:contain}
.footer-brand-lockup{display:flex;flex-direction:column;gap:4px;min-width:0;line-height:1.1}
.footer-brand-wordmark{font-size:28px;font-weight:900;letter-spacing:-.9px;color:#f4f8ff;white-space:nowrap}
.footer-brand-tagline{font-size:11px;font-weight:800;letter-spacing:2.1px;color:#9cc3e9;white-space:nowrap}
.site-footer>span:nth-of-type(1){justify-self:center;text-align:center}
.site-footer>span:nth-of-type(2){justify-self:end;text-align:right}
@media (max-width:980px){
  .site-footer{grid-template-columns:1fr;justify-items:start;gap:14px;padding:18px 16px 24px}
  .site-footer>span:nth-of-type(1),.site-footer>span:nth-of-type(2){justify-self:start;text-align:left}
  .footer-brand-icon{width:44px;height:44px;flex-basis:44px}
  .footer-brand-wordmark{font-size:22px}
  .footer-brand-tagline{font-size:9px;letter-spacing:1.5px}
}


/* GIF STUDIO v8.137 — independent crop / FPS cards, extended resolution options */
@media (min-width:741px){
  #videoToolPanel_resolution .resolution-pills{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
  #videoToolPanel_resolution .resolution-pill{min-height:84px}
}
/* Crop: five precision frames on a cobalt glass dock; the outlines represent aspect ratios. */
#videoToolPanel_crop .inside-tool-panel>.quick-edit-content{background:linear-gradient(135deg,#0b2649 0%,#0a1c38 100%);padding:14px 14px 16px}
#videoToolPanel_crop .crop-ratio-pills{gap:clamp(7px,1.3vw,17px);margin:0}
#videoToolPanel_crop .crop-ratio-pill{--target-ratio:4 / 3;position:relative;overflow:hidden;min-width:0;min-height:104px;padding:12px 4px 11px;border-radius:15px;border:1px solid #315e8c;background:linear-gradient(145deg,#102b4b,#07182e);box-shadow:inset 0 1px #84bbef15,0 7px 20px #0109144d;gap:10px;color:#ccdeef;transition:background .16s,border-color .16s,box-shadow .16s,transform .16s}
#videoToolPanel_crop .crop-ratio-pill:hover{transform:translateY(-2px);background:linear-gradient(145deg,#14416d,#0a2445);border-color:#6bbafa}
#videoToolPanel_crop .crop-ratio-pill.active,#videoToolPanel_crop .crop-ratio-pill[aria-pressed=true]{border-color:#83d6ff;background:linear-gradient(160deg,#194b82,#0b244d);color:#f9fdff;box-shadow:0 0 0 1px #74cdff55 inset,0 12px 24px #1685d528,0 0 20px #36b8ed22}
#videoToolPanel_crop .crop-ratio-pill::after{content:'';position:absolute;left:0;right:0;bottom:0;height:3px;background:transparent}
#videoToolPanel_crop .crop-ratio-pill.active::after{background:linear-gradient(90deg,#4c8eff,#53e0ea)}
#videoToolPanel_crop .crop-ratio-pill[data-ratio="1:1"]{--target-ratio:1 / 1}
#videoToolPanel_crop .crop-ratio-pill[data-ratio="4:5"]{--target-ratio:4 / 5}
#videoToolPanel_crop .crop-ratio-pill[data-ratio="9:16"]{--target-ratio:9 / 16}
#videoToolPanel_crop .crop-ratio-pill[data-ratio="16:9"]{--target-ratio:16 / 9}
.crop-card-visual{height:40px;width:50px;position:relative;display:grid;place-items:center;flex:0 0 auto}
.crop-card-outline{display:block;aspect-ratio:var(--target-ratio);height:auto;width:auto;max-width:38px;max-height:33px;border:2px solid #8bacd1;border-radius:3px;box-shadow:inset 0 0 0 1px #233e5f;position:relative}
.crop-card-outline:before,.crop-card-outline:after{content:'';position:absolute;border:2px solid #80d7ff;opacity:.9;pointer-events:none;width:6px;height:6px}
.crop-card-outline:before{top:-3px;left:-3px;border-right:0;border-bottom:0}
.crop-card-outline:after{bottom:-3px;right:-3px;border-left:0;border-top:0}
.crop-card-center{width:3px;height:3px;position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%);border-radius:50%;background:#54b6ff;box-shadow:0 0 8px #53cdff}
.crop-ratio-pill.active .crop-card-outline{border-color:#e1f5ff;box-shadow:0 0 12px #68cbff2e}
.crop-ratio-pill.active .crop-card-center{background:#cafcff}
.crop-ratio-pill[data-ratio="original"] .crop-card-outline{width:34px;height:26px;max-height:none}
.crop-ratio-pill[data-ratio="1:1"] .crop-card-outline{width:28px;height:28px}
.crop-ratio-pill[data-ratio="4:5"] .crop-card-outline{width:25px;height:31px}
.crop-ratio-pill[data-ratio="9:16"] .crop-card-outline{width:19px;height:34px}
.crop-ratio-pill[data-ratio="16:9"] .crop-card-outline{width:38px;height:22px}
#videoToolPanel_crop .crop-ratio-text{font-size:14px;font-weight:900;letter-spacing:.2px}
#videoToolPanel_crop .crop-ratio-note{font-size:11px;margin:11px 1px 0;color:#93b8dd}
/* FPS: discrete five-card selector; replaces slider without changing the encoder input. */
#videoToolPanel_frames .inside-tool-panel>.quick-edit-content{padding:17px 14px 19px}
#videoToolPanel_frames .fps-card-settings{max-width:none!important;margin:0}
.fps-info-row{display:flex;align-items:center;justify-content:space-between;color:#a8cae9;font-size:12px;font-weight:700;margin:1px 2px 13px}
.fps-info-row strong{font-size:12px;color:#60d7ff;letter-spacing:.6px}
.fps-choices{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}
.fps-choice{border:1px solid #365c83;background:linear-gradient(145deg,#0e3154,#091b34);border-radius:14px;min-height:108px;padding:13px 3px 11px;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;color:#bbd7f1;box-shadow:inset 0 1px #bceaff13,0 5px 20px #010b1d22;transition:transform .16s,border-color .16s,background .16s,box-shadow .16s}
.fps-choice:hover{transform:translateY(-2px);border-color:#64b4fa;background:linear-gradient(145deg,#134878,#102849)}
.fps-choice.selected{background:linear-gradient(155deg,#163e6b,#102b51);border-color:#6fcbff;color:white;box-shadow:0 0 0 1px #60beff33 inset,0 10px 23px #1679d82a}
.fps-choice strong{font-size:30px;line-height:1;font-weight:900;letter-spacing:-.8px;font-variant-numeric:tabular-nums}
.fps-choice>span:last-child{font-size:10px;font-weight:750;color:#87accd;white-space:nowrap}
.fps-choice.selected>span:last-child{color:#b3eaff}
.fps-bars{display:flex;align-items:flex-end;gap:3px;height:16px;position:relative}
.fps-bars i{width:5px;height:6px;border-radius:2px 2px 0 0;background:#50749d}
.fps-choice:nth-child(2) .fps-bars i:nth-child(-n+2),
.fps-choice:nth-child(3) .fps-bars i:nth-child(-n+3),
.fps-choice:nth-child(4) .fps-bars i:nth-child(-n+4),
.fps-choice:nth-child(5) .fps-bars i{background:#6ab9ef;height:12px}
.fps-choice.selected .fps-bars i{background:#62def7}
.fps-help{font-size:11px;color:#88afcd;line-height:1.6;margin:13px 2px 0}
@media(max-width:740px){
  #videoToolPanel_crop .inside-tool-panel>.quick-edit-content{padding:12px 8px 13px}
  #videoToolPanel_crop .crop-ratio-pills{gap:5px}
  #videoToolPanel_crop .crop-ratio-pill{min-height:84px;border-radius:10px;gap:7px;padding:10px 0 9px}
  .crop-card-visual{width:40px;height:34px}
  .crop-ratio-pill[data-ratio="9:16"] .crop-card-outline{width:17px;height:30px}
  #videoToolPanel_crop .crop-ratio-text{font-size:12px}
  #videoToolPanel_crop .crop-ratio-note{font-size:10px;margin-top:9px}
  #videoToolPanel_frames .inside-tool-panel>.quick-edit-content{padding:13px 8px 15px}
  .fps-choices{gap:5px}
  .fps-choice{min-height:93px;border-radius:10px;gap:7px;padding:10px 0 8px}
  .fps-choice strong{font-size:23px}
  .fps-choice>span:last-child{font-size:9px;letter-spacing:-.35px}
  .fps-bars{gap:2px}
  .fps-bars i{width:4px}
  .fps-help{font-size:10px}
  #videoToolPanel_resolution .resolution-pills{grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
  #videoToolPanel_resolution .resolution-pill{min-height:73px;border-radius:11px}
  #videoToolPanel_resolution .resolution-main{font-size:20px}
  #videoToolPanel_resolution .resolution-sub{font-size:9px}
}


/* v8.138 — RoyalBoyz control deck. The original tab IDs and JavaScript remain unchanged. */
#videoToolTabs.studio-tool-deck{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px;margin-top:12px}
#videoToolTabs.studio-tool-deck .video-tool-tab{
  --deck-accent:#5ad9ff;position:relative;isolation:isolate;display:flex;align-items:center;justify-content:center;gap:9px;
  min-width:0;min-height:59px;padding:10px 5px 12px;overflow:hidden;touch-action:manipulation;
  border:1px solid #31597e;border-radius:13px;color:#d7e9fa;
  background:linear-gradient(156deg,#112c4d,#071b36 85%);
  box-shadow:inset 0 1px 0 #91caff13,0 6px 16px #00000017;
  text-shadow:none;transition:border-color .17s ease,box-shadow .17s ease,background .17s ease,transform .17s ease;
}
#videoToolTabs .video-tool-tab .deck-icon{display:grid;place-items:center;width:26px;height:26px;flex:0 0 26px;border-radius:8px;color:#81c5ff;
  background:linear-gradient(145deg,#174e7c,#0b2d53);border:1px solid #4680ad70;transition:background .2s,color .2s}
#videoToolTabs .video-tool-tab .deck-icon svg{width:18px;height:18px;display:block}
#videoToolTabs .video-tool-tab .deck-copy{min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:3px;line-height:1.1}
#videoToolTabs .video-tool-tab .deck-name{white-space:nowrap;font-size:12px;letter-spacing:-.35px;font-weight:850;color:inherit}
#videoToolTabs .video-tool-tab .deck-code{white-space:nowrap;font-size:8px;letter-spacing:1.3px;font-weight:800;color:#7aa0c6}
#videoToolTabs .video-tool-tab .deck-current{position:absolute;left:16px;right:16px;bottom:0;height:3px;border-radius:7px 7px 0 0;background:transparent;transition:background .2s}
#videoToolTabs .video-tool-tab:hover{border-color:#5b91ba;background:linear-gradient(150deg,#183e67,#0b2445);transform:translateY(-1px)}
#videoToolTabs .video-tool-tab.active,
#videoToolTabs .video-tool-tab[aria-selected="true"]{
  color:#f5fcff;border-color:#60cfff;background:linear-gradient(135deg,#145489,#0b2b55 75%);
  box-shadow:inset 0 1px 0 #b4eeff29,0 0 0 1px #5dbaff20,0 5px 19px #058eff20}
#videoToolTabs .video-tool-tab.active .deck-icon,
#videoToolTabs .video-tool-tab[aria-selected="true"] .deck-icon{color:#072f51;background:linear-gradient(135deg,#b3faff,#56cfff);border-color:#dcffff99}
#videoToolTabs .video-tool-tab.active .deck-code,
#videoToolTabs .video-tool-tab[aria-selected="true"] .deck-code{color:#b6e9ff}
#videoToolTabs .video-tool-tab.active .deck-current,
#videoToolTabs .video-tool-tab[aria-selected="true"] .deck-current{background:linear-gradient(90deg,#36a9ff,#5df5e0)}
#videoToolTabs .video-tool-tab:focus-visible{outline:2px solid #a4eeff;outline-offset:2px}
#videoConvertMount .photo-cta-content{display:none!important}
#photoConvertMount .video-cta-content{display:none!important}
#videoConvertMount .convert-btn{
  min-height:58px;padding:10px 17px;
  background:linear-gradient(110deg,#1565ce 0%,#288bef 48%,#38cadf 100%);
  border:1px solid #8adaff61;border-radius:13px;
  box-shadow:inset 0 1px 0 #ffffff4a,0 12px 25px #096bd533;
  transition:transform .17s ease,filter .17s ease,box-shadow .17s ease;
}
#videoConvertMount .convert-btn:hover:not(:disabled){transform:translateY(-1px);filter:brightness(1.08);box-shadow:inset 0 1px 0 #ffffff55,0 14px 30px #147dcd66}
#videoConvertMount .video-cta-content{display:inline-flex;align-items:center;gap:12px;margin:auto}
#videoConvertMount .video-cta-glyph{width:34px;height:34px;display:grid;place-items:center;border:1px solid #ffffff60;border-radius:10px;background:#ffffff20;color:#efffff}
#videoConvertMount .video-cta-glyph svg{width:20px;height:20px}
#videoConvertMount .video-cta-copy{display:flex;flex-direction:column;gap:2px;text-align:left;line-height:1.1}
#videoConvertMount .video-cta-copy strong{font-size:15px;letter-spacing:-.3px;font-weight:900}
#videoConvertMount .video-cta-copy small{font-size:9px;letter-spacing:2.1px;color:#e1f8ff;font-weight:750}
#videoConvertMount .convert-btn .cta-arrow{display:grid;place-items:center;width:27px;height:27px;border:1px solid #ffffff60;border-radius:8px;background:#ffffff1a;font-size:17px}
@media(max-width:740px){
 #videoToolTabs.studio-tool-deck{gap:5px;margin-top:9px}
 #videoToolTabs.studio-tool-deck .video-tool-tab{flex-direction:column;gap:5px;min-height:62px;padding:7px 1px 9px;border-radius:10px}
 #videoToolTabs .video-tool-tab .deck-icon{width:24px;height:23px;flex-basis:23px;border-radius:7px}
 #videoToolTabs .video-tool-tab .deck-icon svg{width:16px;height:16px}
 #videoToolTabs .video-tool-tab .deck-copy{align-items:center;gap:0}
 #videoToolTabs .video-tool-tab .deck-name{font-size:10px;letter-spacing:-.65px}
 #videoToolTabs .video-tool-tab .deck-code{display:none}
 #videoToolTabs .video-tool-tab .deck-current{left:10px;right:10px}
 #videoConvertMount .convert-btn{min-height:54px;padding:7px 12px}
 #videoConvertMount .video-cta-content{gap:9px}
 #videoConvertMount .video-cta-glyph{width:30px;height:30px}
 #videoConvertMount .video-cta-copy strong{font-size:13px}
 #videoConvertMount .video-cta-copy small{font-size:8px;letter-spacing:1.1px}
}
@media(prefers-reduced-motion:reduce){#videoToolTabs .video-tool-tab,#videoConvertMount .convert-btn{transition:none;transform:none!important}}
/* Keep the original save button's old right-edge span rule from moving inner CTA text. */
#videoConvertMount .convert-btn > .video-cta-content,
#videoConvertMount .convert-btn .video-cta-glyph,
#videoConvertMount .convert-btn .video-cta-copy,
#videoConvertMount .convert-btn .video-cta-copy strong,
#videoConvertMount .convert-btn .video-cta-copy small{position:static;right:auto}
#videoConvertMount .convert-btn > .cta-arrow{position:absolute;right:15px;top:50%;transform:translateY(-50%)}
#videoConvertMount .convert-btn{justify-content:center}
#videoConvertMount .convert-btn .video-cta-content{flex:0 1 auto;justify-content:center}
#videoConvertMount .convert-btn span.video-cta-copy{position:static!important;right:auto!important}

/* v8.139: unreachable trim handles — always available recovery controls */
.timeline-scroll-frame{position:relative;min-width:0}
.timeline-scroll-frame .timeline-viewport{position:relative}
.timeline-edge-return{
  position:absolute;z-index:15;top:50%;transform:translateY(-50%);
  min-width:55px;height:55px;border:1px solid #b9e3ff;border-radius:13px;
  background:linear-gradient(145deg,#8bbaff 0%,#58a6ff 100%);
  color:#092849;box-shadow:0 5px 16px #010b25b8,0 0 0 2px #176abb8c;
  font-size:16px;font-weight:900;display:flex;align-items:center;
  justify-content:center;gap:2px;cursor:pointer;touch-action:manipulation;
  white-space:nowrap;user-select:none;-webkit-user-select:none;
}
.timeline-edge-return[hidden]{display:none!important}
.timeline-edge-return span{font-size:11px;letter-spacing:-.4px}
.timeline-edge-start{left:4px}
.timeline-edge-end{right:4px}
.timeline-edge-return:hover,.timeline-edge-return:focus-visible{background:#cbe9ff;outline:2px solid #66cfff;outline-offset:2px}
.timeline-edge-return:active{transform:translateY(-50%) scale(.97)}
@media(max-width:740px){
  .timeline-edge-return{height:54px;min-width:53px;border-radius:12px}
  .timeline-edge-return span{font-size:10px}
}


/* GIF STUDIO v8.140: distinctive trim nudge controls */
.trim-command-deck{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:8px 0 4px;padding:0;background:transparent}
.trim-fine-card{min-width:0;padding:10px 10px 11px;border-radius:14px;border:1px solid #294d74;background:linear-gradient(180deg,#0d2342 0%,#09162d 100%);box-shadow:inset 0 1px 0 rgba(164,211,255,.08)}
.trim-fine-start{border-color:#2c6188;background:linear-gradient(180deg,#0f2b4f 0%,#0a1933 100%)}
.trim-fine-end{border-color:#395688;background:linear-gradient(180deg,#12264a 0%,#0a1933 100%)}
.trim-fine-label{display:flex;align-items:flex-end;justify-content:space-between;gap:10px;margin-bottom:8px}
.trim-fine-kicker{display:inline-flex;align-items:center;gap:6px;font-size:10px;font-weight:900;letter-spacing:1.4px;color:#89cdf7}
.trim-fine-kicker::before{content:"";width:7px;height:7px;border-radius:50%;background:linear-gradient(135deg,#66f0ff,#6ca0ff);box-shadow:0 0 10px rgba(102,240,255,.55)}
.trim-fine-end .trim-fine-kicker{color:#b3c8ff}
.trim-fine-end .trim-fine-kicker::before{background:linear-gradient(135deg,#8ab9ff,#7f7cff);box-shadow:0 0 10px rgba(127,124,255,.45)}
.trim-fine-label strong{font-size:12px;font-weight:900;color:#eef7ff;letter-spacing:-.2px}
.trim-fine-card .fine-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.trim-btn{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-height:48px;padding:8px 4px!important;border-radius:12px!important;border:1px solid #355e85!important;background:linear-gradient(180deg,#0d2e53 0%,#0b2340 100%)!important;color:#e6f3ff!important;box-shadow:inset 0 1px 0 rgba(194,228,255,.06);transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease,background .16s ease}
.trim-btn:hover{transform:translateY(-1px);border-color:#65cfff!important;box-shadow:0 10px 24px rgba(8,57,115,.18), inset 0 1px 0 rgba(194,228,255,.08)}
.trim-btn-icon{font-size:16px;line-height:1;font-weight:900}
.trim-btn-text{font-size:10px;line-height:1.15;font-weight:800;white-space:normal;text-align:center;letter-spacing:-.1px}
.trim-btn-minus{background:linear-gradient(180deg,#0e3650 0%,#0a2234 100%)!important;border-color:#3b6688!important;color:#c8f4ff!important}
.trim-btn-plus{background:linear-gradient(180deg,#18365c 0%,#0c223f 100%)!important;border-color:#4a6f9f!important;color:#d4e4ff!important}
.trim-btn-precision{background:linear-gradient(135deg,#4b91ff 0%,#50d6ff 100%)!important;border-color:#8de2ff!important;color:#08172f!important;box-shadow:0 10px 26px rgba(68,160,255,.22)!important}
.trim-btn-precision .trim-btn-text,.trim-btn-precision .trim-btn-icon{color:#08172f!important}
body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .video-loaded>.quick-fine-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:8px 0 4px}
body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .video-loaded>.quick-fine-controls>div{min-width:0}
body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .video-loaded>.quick-fine-controls .fine-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .video-loaded>.quick-fine-controls .fine-buttons button{font-size:inherit;min-height:auto;padding:inherit;white-space:normal}
@media (max-width:740px){
  .trim-command-deck{grid-template-columns:1fr;gap:8px}
  .trim-fine-card{padding:10px 9px}
  .trim-fine-label{margin-bottom:7px}
  .trim-fine-label strong{font-size:11px}
  .trim-fine-kicker{font-size:9px;letter-spacing:1.1px}
  .trim-fine-card .fine-buttons{gap:5px}
  .trim-btn{min-height:46px;padding:7px 3px!important;border-radius:11px!important}
  .trim-btn-icon{font-size:15px}
  .trim-btn-text{font-size:9px}
}


/* GIF STUDIO v8.141: mobile-only trim button height reduction */
@media (max-width:740px){
  .trim-command-deck{gap:6px!important;margin:6px 0 3px!important}
  .trim-fine-card{padding:7px 8px 8px!important;border-radius:12px!important}
  .trim-fine-label{margin-bottom:5px!important;gap:8px!important}
  .trim-fine-label strong{font-size:10px!important}
  .trim-fine-kicker{font-size:8px!important;letter-spacing:1px!important}
  .trim-fine-card .fine-buttons{gap:4px!important}
  .trim-btn{min-height:38px!important;padding:5px 3px!important;border-radius:10px!important;gap:3px!important}
  .trim-btn-icon{font-size:13px!important}
  .trim-btn-text{font-size:8px!important;line-height:1.05!important}
}

/* v8.143 — Restore v8.141 mobile dimensions and proportions. Do not compress
   the filmstrip, cards, labels or action buttons just to fit a short viewport.
   Only the video preview's maximum height may be reduced by the script when
   actual viewport overflow would otherwise hide the Save action. */
@media (max-width:740px){
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) #mainVideoPreview{
    min-height:0!important;
    max-height:var(--mobile-preview-max-height,34vh)!important;
  }
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) #mainVideoPreview video{
    max-height:var(--mobile-preview-max-height,34vh)!important;
  }
}

/* The slim white preview playhead stays independently draggable even within a blue selection. */
.timeline-playhead[role="slider"]{width:20px!important;transform:translateX(-50%);background:transparent!important;box-shadow:none!important;cursor:ew-resize;touch-action:none;pointer-events:auto;z-index:6!important;outline:0}
.timeline-playhead[role="slider"]::after{content:"";position:absolute;left:8px;top:0;bottom:0;width:3px;border-radius:3px;background:#fff;box-shadow:0 0 0 1px #1e4a7b,0 0 8px #fff9;pointer-events:none}
.timeline-playhead[role="slider"]:focus-visible::after{background:#56e7ff;box-shadow:0 0 0 3px #56e7ff55}
.timeline-handle{z-index:8!important}


/* GIF STUDIO v8.144 — footer disclosures and links only. Editor layout unchanged. */
.studio-policy{max-width:1280px;margin:0 auto 30px;padding:24px 27px 22px;border:1px solid #294a72;border-radius:20px;background:linear-gradient(138deg,rgba(10,38,72,.94),rgba(5,20,42,.96));box-shadow:0 14px 45px #02122748}
.studio-policy-head{display:flex;justify-content:space-between;align-items:end;gap:14px;margin-bottom:18px}
.studio-policy-eyebrow{color:#5ccfff;font-size:10px;font-weight:900;letter-spacing:2px}
.studio-policy-head h2{font-size:23px;letter-spacing:-.8px;line-height:1.35;margin:7px 0}
.studio-policy-head p{color:#a8c1dd;font-size:12px;line-height:1.7;margin:0}
.studio-policy-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.studio-policy-item{min-width:0;position:relative;border:1px solid #27496e;border-radius:14px;padding:18px 17px 16px;background:linear-gradient(150deg,#0d2c4e,#0a203e);overflow:hidden}
.studio-policy-symbol{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;border:1px solid #477bb5;background:#164677;color:#72d9ff;font-size:17px;margin-bottom:12px}
.studio-policy-item h3{font-size:14px;color:#f4f9ff;letter-spacing:-.2px;margin:0 0 8px}
.studio-policy-item p{color:#9fb9d3;font-size:12px;line-height:1.75;margin:0;word-break:keep-all}
.studio-policy-actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:17px;padding-top:16px;border-top:1px solid #294768}
.studio-policy-link{display:inline-flex;align-items:center;justify-content:space-between;gap:17px;padding:10px 12px;border:1px solid #375e86;border-radius:9px;background:#0c2b4d;color:#cde6ff;font-size:12px;font-weight:800;transition:background .15s,border-color .15s}
.studio-policy-link.primary{border-color:#5399d4;background:#154777;color:#ecf8ff}
.studio-policy-link:hover,.studio-policy-link:focus-visible{background:#175585;border-color:#74c5ff;outline-offset:2px}
.studio-policy-link span{color:#7dd7ff}
.site-footer .footer-legal-nav{grid-column:1/-1;display:flex;gap:18px;align-items:center;flex-wrap:wrap;justify-content:center;border-top:1px solid #28456a;padding-top:15px;margin-top:2px}
.site-footer .footer-legal-nav a{font-size:11px;letter-spacing:0;color:#b4d0eb;font-weight:700}
.site-footer .footer-legal-nav a:hover,.site-footer .footer-legal-nav a:focus-visible{color:#79dfff;text-decoration:underline}
@media(max-width:740px){
 .studio-policy{padding:20px 15px 18px;margin:0 0 22px;border-radius:15px}
 .studio-policy-head h2{font-size:19px}
 .studio-policy-grid{grid-template-columns:1fr;gap:9px}
 .studio-policy-item{padding:13px 14px}
 .studio-policy-symbol{width:30px;height:30px;margin-bottom:8px}
 .studio-policy-item h3{font-size:13px;margin-bottom:6px}
 .studio-policy-item p{font-size:11px;line-height:1.6}
 .studio-policy-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .studio-policy-link{font-size:11px;gap:5px;padding:11px 9px;min-width:0}
 .site-footer .footer-legal-nav{justify-content:flex-start;gap:10px 16px}
}
@media(max-width:355px){.studio-policy-actions{grid-template-columns:1fr 1fr}.studio-policy-link{font-size:10px}}


/* v8.145: Policy buttons — each label stays inside its own complete rectangle.
   Narrow screens use two equal columns. The editor UI is not affected. */
.studio-policy-actions{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  width:100%;
}
.studio-policy-actions .studio-policy-link{
  box-sizing:border-box;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:7px;
  width:100%;
  min-width:0;
  min-height:43px;
  padding:10px 11px;
  overflow:hidden;
  text-align:center;
  white-space:normal;
}
.studio-policy-link-text{
  display:block;
  min-width:0;
  font-size:inherit;
  line-height:1.3;
  word-break:keep-all;
  overflow-wrap:anywhere;
}
.studio-policy-link-arrow{
  display:block;
  flex-shrink:0;
  line-height:1;
  font-size:13px;
}
@media(max-width:740px){
  .studio-policy-actions{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .studio-policy-actions .studio-policy-link{min-height:42px;padding:9px 8px;gap:4px;font-size:clamp(10px,2.7vw,12px)}
  .studio-policy-link-arrow{font-size:12px}
}
@media(max-width:355px){
  .studio-policy-actions .studio-policy-link{padding:9px 5px;gap:3px;font-size:10px}
}


/* v147 — resolution buttons fit cleanly inside 4x2 grid on desktop */
.photo-settings .resolution-settings,
#videoToolPanel_resolution .resolution-settings{max-width:none!important}
.photo-settings .resolution-pills,
#videoToolPanel_resolution .resolution-pills{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  align-items:stretch;
}
.photo-settings .resolution-pill,
#videoToolPanel_resolution .resolution-pill{
  min-height:88px;
  padding:12px 8px 10px;
  gap:6px;
  border-radius:16px;
  overflow:hidden;
}
.photo-settings .resolution-main,
#videoToolPanel_resolution .resolution-main{
  width:100%;
  font-size:clamp(15px,1.28vw,22px);
  line-height:1.02;
  letter-spacing:-.7px;
  text-align:center;
  white-space:nowrap;
}
.photo-settings .resolution-sub,
#videoToolPanel_resolution .resolution-sub{
  width:100%;
  min-height:26px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  font-size:10px;
  line-height:1.2;
  word-break:keep-all;
  overflow-wrap:anywhere;
}

@media (min-width:1180px){
  .photo-settings .resolution-pill,
  #videoToolPanel_resolution .resolution-pill{min-height:92px;padding:13px 10px 11px}
  .photo-settings .resolution-main,
  #videoToolPanel_resolution .resolution-main{font-size:clamp(17px,1.1vw,23px)}
}
@media (max-width:980px){
  .photo-settings .resolution-pills,
  #videoToolPanel_resolution .resolution-pills{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
  .photo-settings .resolution-pill,
  #videoToolPanel_resolution .resolution-pill{min-height:78px;padding:10px 6px 9px;border-radius:14px}
  .photo-settings .resolution-main,
  #videoToolPanel_resolution .resolution-main{font-size:18px}
  .photo-settings .resolution-sub,
  #videoToolPanel_resolution .resolution-sub{font-size:9px;min-height:22px}
}
@media (max-width:640px){
  .photo-settings .resolution-pills,
  #videoToolPanel_resolution .resolution-pills{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  .photo-settings .resolution-pill,
  #videoToolPanel_resolution .resolution-pill{min-height:76px}
  .photo-settings .resolution-main,
  #videoToolPanel_resolution .resolution-main{font-size:19px}
}


/* v148 — ROYALBOYZ resolution buttons: premium glass, 4×2 PC grid.
   Only visual presentation changes; existing button values and handlers remain intact. */
.photo-settings .resolution-pills,
#videoToolPanel_resolution .resolution-pills{
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}
.photo-settings .resolution-pill,
#videoToolPanel_resolution .resolution-pill{
  box-sizing:border-box;
  position:relative;
  isolation:isolate;
  display:flex;
  justify-content:center;
  align-items:center;
  flex-direction:column;
  min-width:0;
  min-height:88px;
  padding:17px 5px 12px;
  gap:8px;
  overflow:hidden;
  border-radius:13px;
  border:1px solid #335b83;
  background:
    radial-gradient(95% 70% at 20% 0%,rgba(83,157,224,.13),transparent 100%),
    linear-gradient(150deg,#122d4f 0%,#091c35 58%,#09172b 100%);
  box-shadow:inset 0 1px 0 rgba(187,232,255,.10),0 8px 20px rgba(0,7,25,.18);
  color:#e7f2ff;
  transform:none;
  transition:border-color .18s ease,background .18s ease,box-shadow .18s ease,transform .18s ease;
}
.photo-settings .resolution-pill::before,
#videoToolPanel_resolution .resolution-pill::before{
  content:'';
  position:absolute;
  top:0;
  left:12%;
  width:76%;
  height:2px;
  background:linear-gradient(90deg,transparent,#4e96cb 50%,transparent);
  opacity:.52;
  border-radius:0 0 3px 3px;
}
.photo-settings .resolution-pill::after,
#videoToolPanel_resolution .resolution-pill::after{
  content:'';
  position:absolute;
  right:9px;
  top:9px;
  width:5px;
  height:5px;
  background:#3b668c;
  border-radius:100%;
  box-shadow:0 0 0 3px rgba(58,109,153,.12);
}
.photo-settings .resolution-pill .resolution-main,
#videoToolPanel_resolution .resolution-pill .resolution-main{
  width:100%;
  min-width:0;
  margin:0;
  padding:0;
  color:#e9f5ff;
  font-family:inherit;
  font-weight:900;
  font-variant-numeric:tabular-nums;
  font-size:clamp(13px,1.35vw,19px);
  letter-spacing:-.6px;
  line-height:1.08;
  text-align:center;
  white-space:nowrap;
  text-shadow:0 1px 10px rgba(122,190,248,.10);
}
.photo-settings .resolution-pill .resolution-sub,
#videoToolPanel_resolution .resolution-pill .resolution-sub{
  width:100%;
  min-width:0;
  min-height:24px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0 1px;
  color:#90b4d4;
  font-size:10px;
  font-weight:750;
  letter-spacing:0;
  line-height:1.25;
  text-align:center;
  white-space:normal;
  word-break:keep-all;
  overflow-wrap:anywhere;
}
.photo-settings .resolution-pill:hover,
#videoToolPanel_resolution .resolution-pill:hover{
  border-color:#6ebcf0;
  background:
    radial-gradient(100% 85% at 20% 0%,rgba(103,186,248,.22),transparent 100%),
    linear-gradient(150deg,#17385d,#0a213f);
  transform:translateY(-1px);
  box-shadow:inset 0 1px 0 rgba(218,244,255,.17),0 10px 22px rgba(0,19,49,.28);
}
.photo-settings .resolution-pill.active,
.photo-settings .resolution-pill[aria-pressed="true"],
#videoToolPanel_resolution .resolution-pill.active,
#videoToolPanel_resolution .resolution-pill[aria-pressed="true"]{
  border:1px solid #7cdcff;
  background:
    radial-gradient(105% 84% at 24% 0%,rgba(73,219,255,.20),transparent 100%),
    linear-gradient(145deg,#154f86 0%,#104573 55%,#0a294d 100%);
  color:#fff;
  box-shadow:inset 0 1px 0 rgba(229,253,255,.26),0 0 0 1px rgba(87,200,255,.13),0 10px 28px rgba(3,93,185,.24);
}
.photo-settings .resolution-pill.active::before,
.photo-settings .resolution-pill[aria-pressed="true"]::before,
#videoToolPanel_resolution .resolution-pill.active::before,
#videoToolPanel_resolution .resolution-pill[aria-pressed="true"]::before{
  background:linear-gradient(90deg,transparent,#74f4ff 50%,transparent);
  opacity:1;
  height:3px;
}
.photo-settings .resolution-pill.active::after,
.photo-settings .resolution-pill[aria-pressed="true"]::after,
#videoToolPanel_resolution .resolution-pill.active::after,
#videoToolPanel_resolution .resolution-pill[aria-pressed="true"]::after{
  background:#6effdd;
  box-shadow:0 0 8px rgba(112,255,233,.72),0 0 0 3px rgba(57,223,221,.15);
}
.photo-settings .resolution-pill.active .resolution-main,
.photo-settings .resolution-pill[aria-pressed="true"] .resolution-main,
#videoToolPanel_resolution .resolution-pill.active .resolution-main,
#videoToolPanel_resolution .resolution-pill[aria-pressed="true"] .resolution-main{
  color:#fff;
  text-shadow:0 0 14px rgba(111,216,255,.22);
}
.photo-settings .resolution-pill.active .resolution-sub,
.photo-settings .resolution-pill[aria-pressed="true"] .resolution-sub,
#videoToolPanel_resolution .resolution-pill.active .resolution-sub,
#videoToolPanel_resolution .resolution-pill[aria-pressed="true"] .resolution-sub{
  color:#a7efff;
}
.photo-settings .resolution-pill:focus-visible,
#videoToolPanel_resolution .resolution-pill:focus-visible{
  outline:2px solid #c1f7ff;
  outline-offset:3px;
}
@media(max-width:980px){
  .photo-settings .resolution-pills,
  #videoToolPanel_resolution .resolution-pills{gap:8px}
  .photo-settings .resolution-pill,
  #videoToolPanel_resolution .resolution-pill{min-height:78px;padding:16px 3px 10px;border-radius:12px;gap:6px}
  .photo-settings .resolution-pill .resolution-main,
  #videoToolPanel_resolution .resolution-pill .resolution-main{font-size:clamp(12px,1.4vw,17px);letter-spacing:-.5px}
  .photo-settings .resolution-pill .resolution-sub,
  #videoToolPanel_resolution .resolution-pill .resolution-sub{font-size:9px;min-height:22px}
}
@media(max-width:640px){
  .photo-settings .resolution-pills,
  #videoToolPanel_resolution .resolution-pills{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  .photo-settings .resolution-pill,
  #videoToolPanel_resolution .resolution-pill{min-height:76px;padding:14px 5px 9px}
  .photo-settings .resolution-pill .resolution-main,
  #videoToolPanel_resolution .resolution-pill .resolution-main{font-size:19px}
}
@media(prefers-reduced-motion:reduce){
  .photo-settings .resolution-pill,
  #videoToolPanel_resolution .resolution-pill{transition:none;transform:none!important}
}


/* v8.150 — PC only: editor's bottom edge and save button stay fixed.
   A tall detail panel scrolls inside the existing tool stage. */
@media (min-width:850px) and (hover:hover) and (pointer:fine){
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden]))
  #videoToolStage.fixed-tool-height{
    height:var(--fixed-tool-height);
    min-height:0;
    overflow-y:auto;
    overflow-x:hidden;
    overscroll-behavior-y:contain;
    scrollbar-gutter:stable;
    scrollbar-width:thin;
    scrollbar-color:#3975ac #091d36;
  }
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden]))
  #videoToolStage.fixed-tool-height::-webkit-scrollbar{width:7px}
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden]))
  #videoToolStage.fixed-tool-height::-webkit-scrollbar-thumb{
    background:#3975ac;border-radius:8px;
  }
}


/* v8.158 — Only unify GIF download button height with GIF complete button. */
#desktopDownloadBtn,
#inlineDownloadBtn{
  box-sizing:border-box;
  height:58px;
  min-height:58px;
  padding:10px 14px;
}
@media(max-width:740px){
  #inlineDownloadBtn{
    height:54px;
    min-height:54px;
    padding:7px 12px;
  }
}


/* v8.159 — PC only: show trim details in the spare RIGHT pane below the preview. */
.desktop-trim-details[hidden]{display:none!important}
@media (min-width:850px) and (hover:hover) and (pointer:fine){
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden])) .desktop-trim-details{
    display:flex;flex-direction:column;flex:0 1 auto;min-height:0;
    max-height:var(--desktop-trim-height,300px);overflow:hidden;
    border:1px solid #326b99;border-radius:12px;
    background:linear-gradient(165deg,#102a4c,#081a34);
    margin-top:16px;
  }
  .desktop-trim-details-heading{display:flex;align-items:center;justify-content:space-between;
    flex:none;gap:8px;border-bottom:1px solid #315374;padding:12px 13px}
  .desktop-trim-details-heading strong{font-size:13px;color:#f0f8ff}
  .desktop-trim-details-heading span{font-size:9px;letter-spacing:1px;color:#69cfff;font-weight:800}
  #desktopTrimDetailsMount{overflow-y:auto;min-height:0;overscroll-behavior:contain;
    scrollbar-width:thin;scrollbar-color:#4386b8 #0b203b}
  #desktopTrimDetailsMount>.quick-edit-content{display:flex;flex-direction:column;gap:11px;
    padding:13px 11px 15px;border:0;background:transparent}
  #desktopTrimDetailsMount .time-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:0}
  #desktopTrimDetailsMount .time-grid label{min-width:0;font-size:11px;color:#bcd6ee}
  #desktopTrimDetailsMount .time-grid input{width:100%;min-width:0;min-height:35px;
    padding:7px 5px;font-size:12px;margin-top:5px}
  #desktopTrimDetailsMount #jumpTrim{margin:0;min-height:33px;width:max-content;
    padding:7px 11px;font-size:11px}
  #desktopTrimDetailsMount .segment-editor{margin:0;padding:11px 9px;min-width:0}
  #desktopTrimDetailsMount .segment-toolbar{gap:8px;flex-wrap:wrap;margin-bottom:9px}
  #desktopTrimDetailsMount .segment-toolbar strong{font-size:12px}
  #desktopTrimDetailsMount .segment-toolbar small{font-size:10px;line-height:1.45}
  #desktopTrimDetailsMount .segment-toolbar button{padding:7px 9px;font-size:10px}
  #desktopTrimDetailsMount .segments-list{max-height:150px}
  #desktopTrimDetailsMount .segment-footer{flex-wrap:wrap;gap:6px}
  #desktopTrimDetailsMount .segment-select{white-space:normal;overflow-wrap:anywhere}
  #videoToolPanel_trim #trimTool[open]{border-color:#66b8ef}
}


/* v8.160 — Desktop trim details: keep only the segment list and add button.
   Existing form elements remain in the DOM for compatibility with editing logic;
   they are only hidden while the details panel is mounted on the PC right side.
   Mobile layout and all editor actions remain unchanged. */
@media (min-width:850px) and (hover:hover) and (pointer:fine){
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden]))
    #desktopTrimDetails .desktop-trim-details-heading{
    display:none!important;
  }
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden]))
    #desktopTrimDetailsMount .time-grid,
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden]))
    #desktopTrimDetailsMount #jumpTrim{
    display:none!important;
  }
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden]))
    #desktopTrimDetailsMount > .quick-edit-content{
    padding:10px!important;
    gap:0!important;
  }
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden]))
    #desktopTrimDetailsMount .segment-toolbar{
    justify-content:flex-start!important;
    flex-wrap:nowrap!important;
    margin-bottom:10px;
  }
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden]))
    #desktopTrimDetailsMount .segment-toolbar > div{
    display:none!important;
  }
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden]))
    #desktopTrimDetailsMount .segment-toolbar #addSegment{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:auto;
    min-height:34px;
    margin:0;
  }
}


/* v8.161 — PC-only confirmation after finishing multi-segment selection. */
.desktop-segments-finish{display:none}
.desktop-segments-completed[hidden]{display:none!important}
@media (min-width:850px) and (hover:hover) and (pointer:fine){
  #desktopSegmentsFinish{
    display:flex;flex:none;justify-content:center;align-items:center;gap:7px;
    width:calc(100% - 20px);min-height:42px;margin:0 10px 11px;
    border-radius:9px;border:1px solid #74dfff;
    color:#fff;font-size:12px;font-weight:900;
    background:linear-gradient(105deg,#176bd0,#22b6d7);
    box-shadow:0 6px 16px rgba(19,114,201,.2);
    cursor:pointer;transition:filter .15s ease;
  }
  #desktopSegmentsFinish:hover,#desktopSegmentsFinish:focus-visible{
    filter:brightness(1.12);outline:2px solid #b5e9ff;outline-offset:2px;
  }
  #desktopSegmentsCompleted{
    margin:9px 0 0;padding:9px 10px;
    border:1px solid #237a84;border-radius:8px;
    background:#0d3944;color:#b2f9e7;
    font-size:11px;font-weight:800;line-height:1.4;
  }
  #desktopTrimDetailsMount{flex:1 1 auto;min-height:0;overflow-y:auto}
}


/* v8.162 — mobile only: match the simplified PC segment editor.
   Keep the existing hidden time inputs and button IDs for JS compatibility. */
@media (max-width:849px), (hover:none), (pointer:coarse){
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden]))
    #videoToolPanel_trim #trimTool > .quick-edit-content{
    display:block!important;
    grid-template-areas:none!important;
  }
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden]))
    #videoToolPanel_trim #trimTool .time-grid,
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden]))
    #videoToolPanel_trim #trimTool #jumpTrim{
    display:none!important;
  }
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden]))
    #videoToolPanel_trim #trimTool .segment-toolbar > div{
    display:none!important;
  }
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden]))
    #videoToolPanel_trim #trimTool .segment-toolbar{
    display:flex;
    align-items:center;
    justify-content:flex-start!important;
    flex-wrap:nowrap;
    margin-bottom:8px;
  }
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden]))
    #videoToolPanel_trim #trimTool .segment-toolbar #addSegment{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:34px;
    width:auto;
    padding:7px 12px;
    margin:0;
  }
}


/* v8.163 — mobile-only segment completion button; PC panel remains unchanged. */
#mobileSegmentsFinish,#mobileSegmentsCompleted{display:none}
@media (max-width:849px), (hover:none), (pointer:coarse){
  body:has(#videoPanel:not([hidden]) #videoLoaded:not([hidden]))
  #videoToolPanel_trim #trimTool #mobileSegmentsFinish{
    display:flex;align-items:center;justify-content:center;width:100%;
    min-height:41px;margin:12px 0 0;padding:9px 12px;
    border:1px solid #74dfff;border-radius:9px;
    background:linear-gradient(105deg,#176bd0,#22b6d7);
    box-shadow:0 6px 16px rgba(19,114,201,.2);
    color:#fff;font-weight:900;font-size:12px;line-height:1.3;
    cursor:pointer;touch-action:manipulation;
  }
  #videoToolPanel_trim #trimTool #mobileSegmentsFinish:focus-visible{
    outline:2px solid #b5e9ff;outline-offset:2px;
  }
  #videoToolPanel_trim #trimTool #mobileSegmentsCompleted:not([hidden]){
    display:inline-flex;align-items:center;justify-content:center;
    margin-left:auto;margin-right:5px;padding:3px 7px;
    max-width:50%;border:1px solid #237a84;border-radius:6px;
    background:#0d3944;color:#b2f9e7;
    font-size:10px;line-height:1.25;font-weight:800;
    white-space:nowrap;
  }
}


/* v8.164 — ROYALBOYZ FRAME GATE & CUT DECK.
   Cosmetic updates only. Time calculations, drag handlers and segment data are unchanged. */
.video-loaded .timeline-editor{
  border-color:#226783;
  background:linear-gradient(155deg,#09294a 0%,#071a32 76%);
  box-shadow:inset 0 1px 0 rgba(106,229,255,.13),0 10px 24px rgba(0,7,24,.22);
}
.video-loaded .timeline-viewport{
  border:1px solid #377694;
  background:#08172f;
  box-shadow:inset 0 2px 10px rgba(0,4,12,.45);
}
.video-loaded .timeline-track{background:#112b42}
.video-loaded .timeline-selected{
  border:2px solid #4ddff0;
  border-radius:10px;
  background:linear-gradient(90deg,rgba(40,210,219,.19),rgba(62,128,255,.14));
  box-shadow:inset 0 0 0 1px rgba(238,255,255,.14),inset 0 0 24px rgba(23,179,202,.12),0 0 0 1px rgba(9,29,61,.8);
  touch-action:none;cursor:grab;z-index:4;
}
.video-loaded .timeline-track.moving-range .timeline-selected{
  background:linear-gradient(90deg,rgba(44,233,213,.27),rgba(61,129,251,.19));
  cursor:grabbing;
}
.video-loaded .timeline-selected::before,
.video-loaded .timeline-selected::after{
  content:"";position:absolute;left:0;right:0;height:4px;pointer-events:none;
  background:repeating-linear-gradient(90deg,rgba(128,244,247,.9) 0 8px,transparent 8px 15px);
  opacity:.9;
}
.video-loaded .timeline-selected::before{top:0}
.video-loaded .timeline-selected::after{bottom:0;opacity:.5}
/* Large touch targets remain available on both PC and phone. */
.video-loaded #trimHandleStart,.video-loaded #trimHandleEnd{
  box-sizing:border-box;
  width:36px;
  top:0;bottom:0;
  padding:0;
  border-radius:10px;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  border:1px solid rgba(213,254,255,.65);
  color:transparent;
  font-size:0;
  z-index:8;
  user-select:none;-webkit-user-select:none;touch-action:none;
  box-shadow:0 4px 16px rgba(0,8,28,.5),inset 0 1px 0 rgba(255,255,255,.32);
  transition:filter .15s ease;
}
.video-loaded #trimHandleStart{
  background:linear-gradient(158deg,#69f6e7 0%,#26a8c4 100%);
  border-color:#affff3;
}
.video-loaded #trimHandleEnd{
  background:linear-gradient(158deg,#92b5ff 0%,#5067db 100%);
  border-color:#c5d8ff;
}
.video-loaded #trimHandleStart::before,.video-loaded #trimHandleEnd::before{
  display:block;font-size:9px;letter-spacing:.6px;font-weight:900;
  line-height:1;color:#052b42;
}
.video-loaded #trimHandleStart::before{content:"IN"}
.video-loaded #trimHandleEnd::before{content:"OUT";color:#071c4b}
.video-loaded #trimHandleStart::after,.video-loaded #trimHandleEnd::after{
  content:"";display:block;width:12px;height:22px;border-left:3px solid #064e64;
  border-right:3px solid #064e64;opacity:.8;border-radius:2px;
}
.video-loaded #trimHandleEnd::after{border-color:#172e83}
.video-loaded .timeline-handle:hover,.video-loaded .timeline-handle:focus-visible{
  filter:brightness(1.13);outline:2px solid #d6fbff;outline-offset:1px;
}
.video-loaded .timeline-timecodes .time-chip{
  border:1px solid rgba(83,205,241,.32);
  background:#103450;
  border-radius:8px;
}
/* Multi-scene cards mirror the distinct royal-blue and mint visual vocabulary. */
.cut-deck-editor{
  border:1px solid #326f94;
  background:linear-gradient(155deg,#0b2848 0%,#06172e 100%);
  box-shadow:inset 0 1px 0 rgba(138,227,255,.13);
  border-radius:14px;
}
.cut-deck-heading{display:flex;align-items:center;gap:9px;margin:0 0 12px}
.cut-deck-monogram{
  width:35px;height:35px;display:grid;place-items:center;
  font-size:20px;font-weight:1000;color:#012943;
  border-radius:10px;border:1px solid #89f1f3;
  background:linear-gradient(130deg,#7ff6ec,#349bea);
  box-shadow:0 0 18px rgba(64,212,247,.19);
}
.cut-deck-slash{display:none}
.cut-deck-heading-words{display:flex;flex-direction:column;gap:3px}
.cut-deck-heading-words strong{font-size:12px;line-height:1;color:#d9f6ff;letter-spacing:.35px}
.cut-deck-heading-words strong b{font-size:16px;letter-spacing:.5px;color:#fff}
.cut-deck-heading-words small{font-size:9px;color:#7cb5ce;letter-spacing:1.7px;font-weight:800}
.cut-deck-editor .segment-toolbar .mini-btn#addSegment{
  width:100%!important;min-height:40px!important;border-radius:12px!important;
  border:1px solid #52e8ec!important;
  background:linear-gradient(95deg,#096970,#127a9d)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 7px 20px rgba(0,137,172,.15)!important;
  color:#dcfffe!important;font-size:12px!important;font-weight:900!important;
}
.cut-deck-editor .segment-toolbar .mini-btn#addSegment:hover{filter:brightness(1.15)}
.cut-deck-editor .segment-toolbar{margin:0 0 12px!important}
.cut-deck-editor .segment-toolbar>div{display:none!important}
.cut-deck-editor .segment-card{
  display:flex;min-height:57px;align-items:center;gap:9px;
  border:1px solid #2c557b;border-radius:12px;
  padding:6px 8px;
  background:linear-gradient(125deg,#0b2545,#071b34);
  box-shadow:inset 0 1px 0 rgba(137,218,255,.05);
}
.cut-deck-editor .segment-card.active{
  border-color:#62dfe9;background:linear-gradient(125deg,#0c3d59,#103057);
  box-shadow:0 0 0 1px rgba(60,228,225,.13),inset 0 1px 0 rgba(126,242,246,.15);
}
.cut-deck-editor .segment-index{
  flex:0 0 32px;width:32px;height:35px;
  display:grid;place-items:center;border-radius:9px;
  background:linear-gradient(145deg,#317bb8,#194b83);
  border:1px solid #4d9bce;
  color:#e6f8ff;font-weight:900;font-size:13px;
}
.cut-deck-editor .segment-card.active .segment-index{
  background:linear-gradient(135deg,#6cefe0,#26b0d2);border-color:#b5fff9;color:#042a3b;
}
.cut-deck-editor .segment-select{
  padding:0!important;display:flex;flex-direction:column;align-items:stretch;gap:7px;
  flex:1;min-width:0;background:none;border:0;color:#d7eeff;line-height:1.2;
}
.cut-deck-editor .segment-details{display:flex;align-items:center;gap:5px;min-width:0;justify-content:space-between}
.cut-deck-editor .segment-time{font-size:11px;font-weight:850;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cut-deck-editor .segment-duration{font-size:9px;color:#93bed4;white-space:nowrap;font-weight:700}
.cut-deck-editor .segment-progress{height:5px;background:#16385a;border-radius:6px;overflow:hidden;display:block}
.cut-deck-editor .segment-progress i{display:block;height:100%;border-radius:6px;background:linear-gradient(90deg,#35eade,#4eb7ff)}
.cut-deck-editor .segment-remove{
  display:grid;place-items:center;flex:0 0 26px;width:26px;height:26px;
  padding:0!important;border-radius:50%;border:1px solid #34587a;
  color:#d6ebff;font-size:19px;line-height:1;background:#0b2441;
}
.cut-deck-editor .segment-footer{margin-top:12px}
.cut-deck-editor .segment-check input{accent-color:#45e8dd}
#desktopSegmentsFinish,#mobileSegmentsFinish{
  border-color:#65eff3!important;
  background:linear-gradient(104deg,#079b9d,#2c82df 90%)!important;
  box-shadow:0 8px 22px rgba(13,129,193,.25),inset 0 1px 0 rgba(255,255,255,.24)!important;
}
@media (min-width:850px) and (hover:hover) and (pointer:fine){
  #desktopTrimDetailsMount .cut-deck-editor{margin-top:0}
  #desktopTrimDetailsMount .cut-deck-heading{margin-bottom:12px}
  #desktopTrimDetailsMount .cut-deck-editor .segment-toolbar #addSegment{display:flex;width:100%;justify-content:center;margin:0}
}
@media (max-width:849px), (hover:none), (pointer:coarse){
  .video-loaded #trimHandleStart,.video-loaded #trimHandleEnd{width:34px;gap:5px}
  .video-loaded #trimHandleStart::before,.video-loaded #trimHandleEnd::before{font-size:8px}
  .video-loaded #trimHandleStart::after,.video-loaded #trimHandleEnd::after{height:16px;width:10px}
  #videoToolPanel_trim #trimTool .cut-deck-editor{padding:10px 9px}
  #videoToolPanel_trim #trimTool .cut-deck-editor .segment-toolbar #addSegment{width:100%!important;margin:0}
  .cut-deck-editor .segment-time{font-size:10px}
  .cut-deck-editor .segment-duration{font-size:9px}
  .cut-deck-editor .segment-card{min-height:52px;gap:6px}
}


/* v8.166: 추가 영상 불러오기 버튼 및 전환 목록. 기존 타임라인 스타일은 미변경. */
.clip-player-tools .add-video-btn{color:#e4f8ff;border-color:#31bcd6;background:linear-gradient(125deg,#0e4568,#0f2b59);font-weight:850;white-space:nowrap;}
.clip-player-tools .add-video-btn:hover{background:linear-gradient(125deg,#166487,#1a437b);border-color:#72e4ff;}
.added-videos{margin:8px 0 11px;padding:9px;border:1px solid #2a527a;border-radius:12px;background:linear-gradient(145deg,#0b2549,#0a1d39);}
.added-videos-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:7px;font-size:11px;color:#a5d8f5;}
.added-videos-list{display:flex;gap:6px;overflow-x:auto;scrollbar-width:thin;padding:2px 0 4px;}
.added-video-item{min-width:135px;max-width:210px;display:flex;align-items:center;gap:8px;background:#0b2649;color:#d4ecff;border:1px solid #2f6086;border-radius:9px;padding:7px 9px;text-align:left;cursor:pointer;}
.added-video-item[aria-pressed="true"]{border-color:#50d2ed;background:#143d69;box-shadow:inset 0 0 0 1px rgba(80,210,237,.2);}
.added-video-item:hover{border-color:#61dfff;}
.added-video-item-index{flex-shrink:0;font-size:12px;font-weight:850;color:#6ddcf7;}
.added-video-item-name{min-width:0;font-size:10px;font-weight:750;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.added-videos-note{font-size:10px;color:#8eb9d6;margin:5px 0 0;line-height:1.5;}
@media(max-width:740px){.clip-player-tools .add-video-btn{padding-left:10px;padding-right:10px;}.added-videos{padding:8px;}.added-video-item{min-width:125px;}}

/* v166 compact multi-file ribbon: minimal height so original editor remains visible */
.added-videos{margin:5px 0 7px;padding:5px 8px;border-radius:11px;}
.added-videos-head{margin-bottom:4px;font-size:10px;}
.added-videos-list{padding:0;gap:5px;}
.added-video-item{padding:5px 7px;min-width:126px;max-width:190px;border-radius:8px;}
@media(max-width:740px){.added-videos{margin:5px 0 7px;padding:5px 6px}.added-video-item{min-width:118px;max-width:166px;padding:5px 6px;}}

/* v8.167: unmistakable, clickable + file button next to file change. */
#videoLoaded:not([hidden]) .clip-player-tools #appendVideoButton{display:inline-flex!important;align-items:center;justify-content:center;position:relative;visibility:visible!important;opacity:1!important;min-width:100px;min-height:31px;color:#032738!important;background:linear-gradient(105deg,#68f5e8,#59c7ff)!important;border:1px solid #8dfdf3!important;border-radius:9px;box-shadow:0 0 0 1px rgba(2,230,222,.22),0 5px 15px rgba(0,173,212,.24);font-weight:900!important;white-space:nowrap;z-index:2}
#videoLoaded:not([hidden]) .clip-player-tools #appendVideoButton:hover{filter:brightness(1.12)}
@media (max-width:740px){#videoLoaded:not([hidden]) .clip-player-tools #appendVideoButton{min-width:85px;min-height:29px;font-size:11px!important;padding:5px 8px!important;}}

/* v8.168: common cross-video CUT DECK; legacy filmstrip/drag mechanics unchanged. */
.cut-deck-editor .segment-source-name{display:block;min-width:0;max-width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;color:#8dedf7;font-size:10px;font-weight:800;margin-bottom:4px}
.cut-deck-editor .segment-deck-actions{display:flex;align-items:center;flex:0 0 auto;gap:2px;padding-right:4px}
.cut-deck-editor .segment-order-btn{width:23px;height:29px;display:grid;place-items:center;border:1px solid rgba(97,164,207,.4);border-radius:6px;background:#10365c;color:#b2ddff;font-weight:850;cursor:pointer;padding:0}
.cut-deck-editor .segment-order-btn:hover:not(:disabled){border-color:#67e7f6;background:#19527c}
.cut-deck-editor .segment-order-btn:disabled{opacity:.28;cursor:default}
.cut-deck-editor .segment-deck-actions .segment-remove{padding:5px 6px;font-size:18px}
.cut-deck-editor .cut-deck-draft-note{margin:5px 2px 3px;padding:8px 9px;border-radius:8px;border:1px dashed rgba(97,222,236,.45);color:#a6e1ef;font-size:10px;line-height:1.6}
.cut-deck-editor .segment-card:has(.segment-source-name){min-height:62px}
.cut-deck-editor .segment-card .segment-select{min-width:0}
@media(max-width:740px){
 .cut-deck-editor .segment-deck-actions{gap:2px;padding-right:2px}
 .cut-deck-editor .segment-order-btn{width:21px;height:27px}
 .cut-deck-editor .segment-deck-actions .segment-remove{padding:3px 5px}
 .cut-deck-editor .segment-source-name{font-size:9px}
}


/* v8.169 — individually removable source tabs; CUT DECK grows with its contents. */
.added-video-tile{display:flex;flex:0 0 auto;min-width:126px;max-width:220px;align-items:stretch;border:1px solid #2f6086;border-radius:8px;background:#0b2649;overflow:hidden}
.added-video-tile.active{border-color:#50d2ed;background:#143d69;box-shadow:inset 0 0 0 1px rgba(80,210,237,.2)}
.added-video-tile .added-video-item{min-width:0;flex:1;max-width:190px;border:0;border-radius:0;background:transparent;box-shadow:none;overflow:hidden}
.added-video-tile .added-video-item[aria-pressed="true"]{background:transparent;border:0;box-shadow:none}
.added-video-remove{flex:0 0 28px;min-width:28px;display:grid;place-items:center;border:0;border-left:1px solid #2f6086;background:transparent;color:#b5d4eb;cursor:pointer;font:700 18px/1 system-ui;padding:0}
.added-video-remove:hover,.added-video-remove:focus-visible{background:#623044;color:#fff;outline:1px solid #ff8b99;outline-offset:-2px}
.added-video-tile .added-video-item:focus-visible{outline:1px solid #8beaff;outline-offset:-2px}
.cut-deck-editor .segments-list{max-height:none!important;overflow:visible!important}
.cut-deck-editor .segment-card{flex:0 0 auto}
@media(min-width:850px) and (hover:hover) and (pointer:fine){
  #desktopTrimDetailsMount{flex:0 1 auto;min-height:0;overflow-y:auto}
}
@media(max-width:849px), (hover:none), (pointer:coarse){
  .added-video-tile{min-width:118px;max-width:200px}
  .added-video-remove{flex-basis:32px;min-width:32px;min-height:32px}
}


/* v8.170 — match the three video action button heights only. */
#videoLoaded:not([hidden]) .clip-player-tools{align-items:center;}
#videoLoaded:not([hidden]) .clip-player-tools :is(#playSelection,#replaceVideo,#appendVideoButton){
  box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;
  height:38px!important;min-height:38px!important;max-height:38px!important;
  padding-top:0!important;padding-bottom:0!important;line-height:1.2;white-space:nowrap;
}
@media(max-width:740px){
  #videoLoaded:not([hidden]) .clip-player-tools :is(#playSelection,#replaceVideo,#appendVideoButton){
    height:34px!important;min-height:34px!important;max-height:34px!important;
  }
}

/* v8.171: keep two adjacent source tabs visible on narrow screens. */
@media(max-width:740px){
  .added-videos-list .added-video-tile{max-width:calc((100% - 5px) / 2);min-width:0;}
}

/* v8.172: manual link only. Open in a separate tab to retain local editor state. */
.topbar .studio-manual-link{display:inline-flex;align-items:center;justify-content:center;gap:6px;white-space:nowrap;letter-spacing:0;color:#8ceaf7;border-color:#387e9b;background:linear-gradient(135deg,#12334d,#0e2744);}
.topbar .studio-manual-link:hover,.topbar .studio-manual-link:focus-visible{border-color:#67dbe9;background:#184763;color:#fff;}
.topbar .studio-manual-link svg{flex:none;}
@media(max-width:1080px){.topbar .top-actions{gap:9px;}.topbar .site-label{display:none;}}
@media(max-width:740px){.topbar .top-actions{gap:5px;}.topbar .studio-manual-link{font-size:11px;padding:9px 9px;gap:4px;}.topbar .studio-manual-link svg{width:13px;height:13px;}}
@media(max-width:440px){.topbar .gif-brand-tagline{display:none;}.topbar .studio-manual-link{padding:8px 7px;}.topbar .studio-manual-link svg{display:none;}.topbar .home-link{white-space:nowrap;}}


/* v8.173: phone-only stable working geometry; normal document scroll remains available. */
@media(max-width:740px){
  html:has(#videoPanel:not([hidden]) #videoLoaded.mobile-editor-fixed){overflow-anchor:none;}
  #videoLoaded.mobile-editor-measuring #trimTool>.quick-edit-content{display:none!important;}
  body:has(#videoPanel:not([hidden]) #videoLoaded.mobile-editor-fixed:not([hidden])) #mainVideoPreview{
    height:var(--mobile-fixed-video-height)!important;min-height:var(--mobile-fixed-video-height)!important;max-height:var(--mobile-fixed-video-height)!important;
  }
  body:has(#videoPanel:not([hidden]) #videoLoaded.mobile-editor-fixed:not([hidden])) #mainVideoPreview video{
    width:100%;height:100%;max-height:none!important;object-fit:contain;
  }
  #videoLoaded.mobile-editor-fixed #videoToolStage{height:var(--mobile-fixed-tool-height);min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:auto;scrollbar-width:thin;overflow-anchor:none;}
  /* Eight resolution cards use two rows instead of three; all values remain legible. */
  #videoLoaded #videoToolPanel_resolution .resolution-pills{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;}
  #videoLoaded #videoToolPanel_resolution .resolution-pill{min-height:66px;padding:13px 2px 6px;gap:3px;}
  #videoLoaded #videoToolPanel_resolution .resolution-pill .resolution-main{font-size:clamp(12px,3.8vw,17px);letter-spacing:-.4px;}
  #videoLoaded #videoToolPanel_resolution .resolution-pill .resolution-sub{font-size:9px;min-height:20px;}
  #videoLoaded.mobile-editor-compact #videoToolSwitcher{margin-top:4px;}
  #videoLoaded.mobile-editor-compact .video-tool-panel{padding:4px 0 3px;min-height:0;}
  #videoLoaded.mobile-editor-compact .timeline-editor{padding-top:6px;padding-bottom:6px;}
  #videoLoaded.mobile-editor-compact .trim-fine-card{padding:5px 6px!important;}
  #videoLoaded.mobile-editor-compact #trimTool>summary{min-height:32px;padding:5px 10px;}
  #videoLoaded.mobile-editor-compact #videoToolTabs.studio-tool-deck{margin-top:6px;}
  #videoLoaded.mobile-editor-compact #videoToolTabs.studio-tool-deck .video-tool-tab{min-height:52px;padding:5px 1px 6px;gap:3px;}
  #videoLoaded.mobile-editor-compact #videoConvertMount{margin-top:5px;}
  #videoLoaded.mobile-editor-compact #videoConvertMount .convert-btn{min-height:48px;}
  #videoLoaded.mobile-editor-compact #videoToolPanel_crop .crop-ratio-pill{min-height:68px;padding:6px 0;gap:4px;}
  #videoLoaded.mobile-editor-compact #videoToolPanel_frames .fps-choice{min-height:74px;padding:6px 0;gap:4px;}
  #videoLoaded.mobile-editor-compact #videoToolPanel_resolution .resolution-pill{min-height:59px;padding-top:11px;}
  #videoLoaded.mobile-editor-tight .timeline-editor{padding:5px 6px;}
  #videoLoaded.mobile-editor-tight .trim-fine-label{gap:3px!important;margin-bottom:3px!important;}
  #videoLoaded.mobile-editor-tight .trim-btn{min-height:34px!important;padding:3px 2px!important;}
  #videoLoaded.mobile-editor-tight #videoToolTabs.studio-tool-deck .video-tool-tab{min-height:46px;}
  #videoLoaded.mobile-editor-tight #videoToolTabs .deck-icon{width:20px;height:20px;flex-basis:20px;}
}
@media(max-width:740px){
  /* Small phone only: reduce vertical spacing, not the media aspect ratio. */
  body:has(#videoPanel:not([hidden])) #videoLoaded.mobile-editor-tight .clip-player-tools{margin-top:5px;margin-bottom:0;gap:5px;}
  #videoLoaded.mobile-editor-tight:not([hidden]) .clip-player-tools :is(#playSelection,#replaceVideo,#appendVideoButton){height:30px!important;min-height:30px!important;max-height:30px!important;font-size:10px!important;}
  #videoLoaded.mobile-editor-tight .added-videos{margin:3px 0 4px;padding:4px 6px;}
  #videoLoaded.mobile-editor-tight .added-videos-head{margin-bottom:2px;}
  #videoLoaded.mobile-editor-tight .added-video-remove{min-height:28px;}
  body:has(#videoPanel:not([hidden])) #videoLoaded.mobile-editor-tight .timeline-track{height:62px;}
  body:has(#videoPanel:not([hidden])) #videoLoaded.mobile-editor-tight .timeline-viewport{min-height:62px;}
  body:has(#videoPanel:not([hidden])) #videoLoaded.mobile-editor-tight .timeline-editor{padding:5px 6px;}
  #videoLoaded.mobile-editor-tight #videoToolPanel_trim .quick-fine-controls{margin:3px 0 2px!important;}
  #videoLoaded.mobile-editor-tight .trim-fine-card{padding:4px 5px!important;}
  #videoLoaded.mobile-editor-tight #trimTool{margin-top:3px;}
  #videoLoaded.mobile-editor-tight #videoToolSwitcher .inside-tool-panel>.quick-edit-content{padding:7px 8px;}
  #videoLoaded.mobile-editor-tight #videoToolSwitcher .inside-tool-panel .settings-group{margin:3px 0 5px;}
  #videoLoaded.mobile-editor-tight #videoToolPanel_resolution .resolution-pill{min-height:55px;padding:9px 2px 4px;gap:2px;}
  #videoLoaded.mobile-editor-tight #videoToolPanel_resolution .resolution-pill .resolution-sub{min-height:15px;}
  #videoLoaded.mobile-editor-tight #videoToolTabs.studio-tool-deck{margin-top:4px;}
  #videoLoaded.mobile-editor-tight #videoConvertMount .convert-btn{min-height:44px;padding:5px 9px;}
}


/* v8.174 — same fixed editing geometry on all touch screen widths.
   Tool panels scroll within the stage; the document remains freely scrollable. */
@media (max-width:740px), (hover:none), (pointer:coarse){
  html:has(#videoPanel:not([hidden]) #videoLoaded.mobile-editor-fixed){overflow-anchor:none;}
  #videoLoaded.mobile-editor-measuring #trimTool>.quick-edit-content{display:none!important;}
  body:has(#videoPanel:not([hidden]) #videoLoaded.mobile-editor-fixed:not([hidden])) #mainVideoPreview{
    height:var(--mobile-fixed-video-height)!important;
    min-height:var(--mobile-fixed-video-height)!important;
    max-height:var(--mobile-fixed-video-height)!important;
    flex-shrink:0;
  }
  body:has(#videoPanel:not([hidden]) #videoLoaded.mobile-editor-fixed:not([hidden])) #mainVideoPreview video{
    width:100%;height:100%;max-height:none!important;object-fit:contain;
  }
  #videoLoaded.mobile-editor-fixed #videoToolStage{
    display:flow-root;box-sizing:border-box;
    height:var(--mobile-fixed-tool-height)!important;
    min-height:var(--mobile-fixed-tool-height)!important;
    max-height:var(--mobile-fixed-tool-height)!important;
    flex-shrink:0;contain:size;
    overflow-y:auto;overflow-x:hidden;overflow-anchor:none;
    overscroll-behavior-y:auto;scrollbar-width:thin;scrollbar-gutter:stable;
  }
  #videoLoaded.mobile-editor-fixed #videoToolTabs,
  #videoLoaded.mobile-editor-fixed #videoConvertMount{flex-shrink:0;overflow-anchor:none;}
  #videoLoaded.mobile-editor-fixed #videoToolTabs .video-tool-tab,
  #videoLoaded.mobile-editor-fixed #videoConvertMount .convert-btn{transform:none!important;}
}


/* v8.175 — mobile CUT DECK is a top-layer modal; never expand the fixed editor. */
#mobileTrimDialog:not([open]){display:none!important;}
@media (max-width:849px), (hover:none), (pointer:coarse){
  #videoToolPanel_trim #trimTool>.quick-edit-content{display:none!important;}
  html:has(#mobileTrimDialog[open]){overflow:hidden;overscroll-behavior:none;}
  #mobileTrimDialog[open]{
    position:fixed;inset:0;margin:auto;box-sizing:border-box;
    width:min(440px,calc(100% - 24px));max-width:none;
    max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);
    padding:12px;border:1px solid #427ba4;border-radius:17px;
    background:linear-gradient(150deg,#112c4c,#081a31);color:var(--text);
    box-shadow:0 20px 70px #000b;overflow:visible;
    display:flex;flex-direction:column;gap:10px;
  }
  #mobileTrimDialog::backdrop{background:rgba(1,9,23,.72);}
  .mobile-trim-dialog-header{display:flex;align-items:center;justify-content:space-between;gap:10px;flex:none;padding:0 2px;color:#e4f5ff;font-size:15px;}
  #mobileTrimClose{display:grid;place-items:center;flex:0 0 36px;height:36px;border:1px solid #3d6c91;border-radius:9px;background:#0c2443;color:#def4ff;font-size:23px;line-height:1;cursor:pointer;}
  #mobileTrimMount{min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;}
  #mobileTrimMount>.quick-edit-content{display:block!important;padding:0;border:0;background:none;}
  #mobileTrimMount .time-grid,#mobileTrimMount #jumpTrim{display:none!important;}
  #mobileTrimMount .cut-deck-editor{margin:0;padding:11px 10px;min-width:0;}
  #mobileTrimMount .segment-toolbar{display:flex;}
  #mobileTrimMount .segment-card{min-width:0;}
  #mobileTrimMount .segment-footer{flex-wrap:wrap;gap:8px;}
  #mobileTrimMount #mobileSegmentsFinish{display:flex;align-items:center;justify-content:center;width:100%;min-height:43px;margin:12px 0 0;padding:9px 12px;border:1px solid #65eff3;border-radius:9px;color:#fff;font-size:13px;font-weight:900;cursor:pointer;}
  #mobileTrimDialog .toast{width:max-content;max-width:calc(100vw - 24px);pointer-events:none;}
}

/* v8.176 — keep the local status label readable on narrow mobile screens. */
@media(max-width:340px){.studio-shell>.section-heading .local-badge{font-size:8px;letter-spacing:.2px;gap:5px;padding:7px 7px;}}
@media(max-width:300px){.studio-shell>.section-heading .local-badge{top:18px;transform:none;}}


/* v8.184 — mobile: make the first three action buttons evenly fill the full row */
@media (max-width:740px){
  #videoLoaded:not([hidden]) .clip-player-tools{
    width:100%;
    gap:6px;
  }
  #videoLoaded:not([hidden]) .clip-player-tools :is(#playSelection,#replaceVideo,#appendVideoButton){
    flex:1 1 0;
    min-width:0!important;
    width:calc((100% - 12px) / 3);
    padding-left:6px!important;
    padding-right:6px!important;
    font-size:10.5px!important;
    letter-spacing:-.15px;
  }
  #videoLoaded.mobile-editor-tight:not([hidden]) .clip-player-tools :is(#playSelection,#replaceVideo,#appendVideoButton){
    font-size:10px!important;
    padding-left:4px!important;
    padding-right:4px!important;
  }
}

/* v8.244 — touch tablets in both orientations: clip decorative overflow to the viewport.
   Keep the original editor dimensions and all phone/desktop layouts. */
@media (min-width:741px) and (hover:none),
       (min-width:741px) and (pointer:coarse){
  html,body{max-width:100%;overflow-x:clip;}
  body{position:relative;}
}
