/* original motion-studio-v1627.css */
/* Motion Calendar Studio v16.27: loaded exclusively by /video-lich-chuyen-dong. */
.motion-studio{--m-ink:var(--text,#19493f);--m-muted:var(--muted,#688b81);--m-line:rgba(20,119,93,.17);--m-panel:var(--panel,rgba(255,255,255,.8));width:100%;max-width:1180px;margin:0 auto 64px;min-width:0;font-family:'Bai Jamjuree',system-ui,sans-serif;color:var(--m-ink)}
.motion-studio *,.motion-studio *::before,.motion-studio *::after{box-sizing:border-box}
.motion-studio :is(section,div,fieldset,label,select,input,textarea){min-width:0}
.motion-heading{display:flex;flex-wrap:wrap;align-items:end;justify-content:space-between;gap:13px;margin:11px 0 21px}
.motion-kicker{font-size:10px;letter-spacing:.11em;font-weight:800;color:#07816b}
.motion-heading h1{font-size:clamp(25px,3.3vw,39px);line-height:1.2;letter-spacing:-.035em;margin:8px 0 6px;font-weight:800}
.motion-heading h1 span{color:#108d74}.motion-heading p{margin:0;max-width:560px;line-height:1.65;font-size:13px;color:var(--m-muted)}
.motion-text-link{display:inline-flex;border:1px solid var(--m-line);border-radius:11px;padding:10px 12px;font-size:12px;font-weight:700;text-decoration:none;color:inherit;background:var(--m-panel)}
.motion-layout{display:grid;grid-template-columns:minmax(0,.95fr) minmax(0,1fr);align-items:start;gap:18px}
.motion-editor,.motion-preview-section{background:var(--m-panel);border:1px solid var(--m-line);border-radius:21px;padding:20px;box-shadow:0 7px 32px rgba(23,75,62,.05);min-width:0}
.motion-section-head{display:flex;gap:11px;align-items:start;margin:0 0 17px}
.motion-section-head h2{font-size:18px!important;margin:0 0 4px!important;letter-spacing:-.02em;line-height:1.4}
.motion-section-head p{color:var(--m-muted);font-size:12px;line-height:1.55;margin:0}
.motion-section-number{background:#e4f3ed;color:#08745c;font-weight:800;font-size:12px;border-radius:9px;width:33px;height:33px;display:grid;place-items:center;flex:none}
.motion-section-second{border-top:1px solid var(--m-line);padding-top:20px;margin-top:20px}
.motion-field{display:grid;gap:7px;margin-bottom:14px}.motion-field>label,.motion-templates>legend{font-size:12px;font-weight:750;margin:0;color:var(--m-ink)}
.motion-field :is(input,select,textarea){background:rgba(236,247,240,.58)!important;color:var(--m-ink)!important;border:1px solid var(--m-line)!important;border-radius:12px!important;width:100%!important;max-width:100%!important;margin:0!important;padding:10px 12px!important;min-height:47px!important;font:inherit!important;font-size:14px!important}
.motion-field textarea{min-height:100px!important;resize:vertical;line-height:1.55!important}
.motion-field :is(input,select,textarea):focus-visible{outline:2px solid #078a70!important;outline-offset:2px}
.motion-helper{display:flex;flex-wrap:wrap;justify-content:space-between;gap:5px;font-size:10px;color:var(--m-muted);line-height:1.5}
.motion-templates{border:0!important;padding:0!important;margin:14px 0 0!important;display:grid;gap:9px;min-width:0}
.motion-templates>legend{padding:0;margin-bottom:7px}
.motion-template{cursor:pointer;display:flex;align-items:center;gap:12px;padding:9px 11px;border:1px solid var(--m-line);border-radius:14px;min-height:72px;background:rgba(244,250,245,.48);position:relative}
.motion-template:has(input:checked){border-color:#087e67;background:rgba(0,142,106,.075)}
.motion-template input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.motion-template:has(input:focus-visible){outline:3px solid #15a18c;outline-offset:2px}
.motion-template-swatch{display:flex;width:51px;height:53px;flex:none;border-radius:10px;justify-content:center;align-items:center;gap:3px;position:relative;overflow:hidden}
.motion-template-swatch b{font-size:25px;font-weight:800}.motion-template-swatch i{position:absolute;top:2px;right:5px;font-style:normal;font-size:11px}
.motion-template-gold .motion-template-swatch{background:linear-gradient(130deg,#091d34,#244157);color:#d9be7b}.motion-template-heritage .motion-template-swatch{background:linear-gradient(130deg,#4b1f26,#994c40);color:#edbd78}.motion-template-glass .motion-template-swatch{background:linear-gradient(130deg,#0b4f45,#52a795);color:#d5eee5}
.motion-template>span:last-child{display:grid;gap:3px;min-width:0}.motion-template strong{font-size:13px;line-height:1.4;color:var(--m-ink)}.motion-template small{font-size:11px;color:var(--m-muted);line-height:1.4}
.motion-support{border-top:1px solid var(--m-line);padding-top:10px;margin-top:6px}.motion-support summary{font-size:12px;min-height:43px;cursor:pointer;font-weight:700}.motion-support p{font-size:12px;line-height:1.65;color:var(--m-muted);margin:6px 0}
.motion-preview-section{position:sticky;top:16px;display:flex;flex-direction:column;align-items:center;gap:13px}
.motion-preview-top{width:100%;display:flex;align-items:center;gap:10px;justify-content:space-between}.motion-preview-top h2{font-size:19px!important;margin:5px 0 0!important}.motion-preview-top>span{font-size:11px;color:var(--m-muted);font-variant-numeric:tabular-nums;white-space:nowrap}
.motion-stage-wrap{display:flex;justify-content:center;width:100%;min-width:0;padding:12px;background:linear-gradient(135deg,#dceae2,#c8ded3);border-radius:17px}
.motion-stage{width:min(100%,315px);aspect-ratio:9/16;overflow:hidden;display:grid;place-items:center;background:#0b2637;border-radius:12px;box-shadow:0 15px 33px rgba(5,25,31,.18);transition:aspect-ratio .15s;min-width:0}
.motion-stage svg{display:block;width:100%;height:100%;font-family:'Bai Jamjuree',system-ui,sans-serif}
.motion-timeline{width:100%;min-width:0}.motion-timeline-top{display:flex;align-items:center;justify-content:space-between;gap:10px;font-weight:750;font-size:12px}.motion-timeline-top output{color:var(--m-muted);font-variant-numeric:tabular-nums}
.motion-timeline input[type=range]{width:100%;margin:12px 0 13px!important;accent-color:#07806b;cursor:pointer;touch-action:pan-y;min-height:24px}
.motion-control-row{display:grid;grid-template-columns:minmax(0,1.35fr) repeat(2,minmax(0,1fr));gap:8px}
.motion-control-row button{min-width:0;min-height:45px;padding:9px 8px;border-radius:12px;font-family:inherit;font-weight:750;font-size:12px;cursor:pointer;border:1px solid var(--m-line)}
.motion-primary{color:#fff;background:#06785f;border-color:#06785f!important}.motion-light{color:#08755f;background:rgba(237,248,242,.75)}.motion-control-row button:disabled{opacity:.5;cursor:not-allowed}
.motion-control-row button:focus-visible,.motion-text-link:focus-visible{outline:3px solid #1ba48a;outline-offset:2px}
.motion-status{font-size:11px;line-height:1.6;margin:12px 1px 0;color:var(--m-muted);min-height:34px}.motion-status[data-error=true]{color:#b95d46}
:root[data-theme=dark] .motion-studio{--m-ink:#e0f3e9;--m-muted:#b2cbbf;--m-line:rgba(170,220,198,.23);--m-panel:#103d36}
:root[data-theme=dark] .motion-template{background:rgba(30,82,69,.55)}:root[data-theme=dark] .motion-template:has(input:checked){background:#205e51}:root[data-theme=dark] .motion-field :is(input,select,textarea){background:#1a5144!important}:root[data-theme=dark] .motion-light{background:#1b5144;color:#d1ecdc}:root[data-theme=dark] .motion-section-number{background:#1f6956;color:#e3f8ed}
@media(max-width:820px){.motion-layout{grid-template-columns:minmax(0,1fr);gap:14px}.motion-preview-section{position:static;order:-1}.motion-stage{width:min(100%,280px)}.motion-editor,.motion-preview-section{padding:15px;border-radius:17px}}
@media(max-width:420px){.motion-studio{margin:0 0 80px}.motion-heading{margin:6px 0 12px}.motion-heading h1{font-size:25px}.motion-editor,.motion-preview-section{padding:12px}.motion-stage{width:min(100%,235px)}.motion-stage-wrap{padding:10px}.motion-control-row{grid-template-columns:repeat(2,minmax(0,1fr))}.motion-control-row .motion-primary{grid-column:1/-1}.motion-timeline input[type=range]{margin:8px 0!important}.motion-template{min-height:67px}}
@media(prefers-reduced-motion:reduce){.motion-stage{transition:none}}


/* original motion-video-v1628.css */
/* v16.28 video controls · scoped to Motion Studio; no other page affected. */
.motion-video-controls{border-top:1px solid var(--m-line);padding-top:15px;margin-top:8px;display:grid;gap:10px;min-width:0;width:100%}
.motion-video-title{display:flex;align-items:center;gap:12px;justify-content:space-between;min-width:0}.motion-video-title strong{font-size:15px;color:var(--m-ink)}
.motion-video-inputs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;min-width:0}.motion-video-inputs .motion-field{margin-bottom:0;min-width:0}.motion-video-inputs label{font-size:11px}
.motion-video-inputs select{min-width:0!important;font-size:12px!important;min-height:43px!important;text-overflow:ellipsis!important}
.motion-video-capability{font-size:11px;color:var(--m-muted);margin:0;line-height:1.55}
.motion-video-actions{display:flex;gap:9px;align-items:center;min-width:0}.motion-video-actions button{font:inherit;cursor:pointer;min-height:45px;padding:9px 15px;border:1px solid var(--m-line);border-radius:12px;font-size:12px;font-weight:800;flex:1}
.motion-video-actions button:disabled{opacity:.5;cursor:not-allowed}.motion-video-actions button[hidden]{display:none!important}
.motion-video-actions button:focus-visible{outline:3px solid #1ba48a;outline-offset:2px}
.motion-progress-row{display:flex;align-items:center;gap:9px;min-width:0}.motion-progress-row progress{flex:1;min-width:0;height:9px;accent-color:#08765f;border:0;border-radius:8px}.motion-progress-row output{font-size:11px;font-weight:750;font-variant-numeric:tabular-nums;color:var(--m-muted)}
.motion-progress-row [hidden]{display:none!important}.motion-video-state{font-size:11px;line-height:1.6;margin:0;min-height:32px;color:var(--m-muted)}.motion-video-state[data-error=true]{color:#b85b48}
@media(max-width:390px){.motion-video-inputs{grid-template-columns:1fr}.motion-video-actions{flex-direction:column}.motion-video-actions button{width:100%}}


/* original motion-editor-v1629.css */
/* v16.29 — Advanced Motion Editor. Scoped, mobile-first, no nested cards. */
.motion-studio .motion-advanced{border-top:1px solid var(--m-line);border-bottom:1px solid var(--m-line);margin:17px 0 14px;min-width:0}
.motion-studio .motion-advanced>summary{display:flex!important;align-items:center!important;gap:10px!important;min-height:68px!important;padding:10px 1px!important;cursor:pointer;font-weight:800}
.motion-studio .motion-advanced-label{display:grid;gap:4px;flex:1;min-width:0}.motion-studio .motion-advanced-label strong{font-size:14px;color:var(--m-ink)}.motion-studio .motion-advanced-label small{font-size:11px;color:var(--m-muted);font-weight:500;line-height:1.5}
.motion-studio .motion-advanced-body{padding:7px 0 16px;min-width:0}
.motion-studio .motion-advanced-presets{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:end;margin-bottom:12px}
.motion-studio .motion-advanced-presets label{grid-column:1/-1;font-size:12px;font-weight:750}
.motion-studio .motion-advanced-presets select{min-width:0;min-height:44px;width:100%;padding:8px 10px!important;border:1px solid var(--m-line);border-radius:11px;background:var(--m-panel);color:var(--m-ink);font-family:inherit}
.motion-studio .motion-advanced-presets button,.motion-studio .motion-layer-actions button{min-height:44px;padding:9px 12px;border:1px solid var(--m-line);border-radius:11px;font-family:inherit;font-weight:750;font-size:12px;cursor:pointer}
.motion-studio .motion-advanced-help{font-size:11px;color:var(--m-muted);line-height:1.6;margin:7px 0 12px}
.motion-studio .motion-layer-list{display:grid;gap:3px;min-width:0}
.motion-studio .motion-layer-row{display:grid;grid-template-columns:minmax(95px,.9fr) minmax(50px,1.2fr) 33px;align-items:center;gap:9px;padding:10px 9px;border:1px solid transparent;border-radius:9px;background:transparent;font:inherit;text-align:left;color:var(--m-ink);width:100%;min-height:44px;cursor:pointer;min-width:0}
.motion-studio .motion-layer-row[aria-pressed=true]{background:rgba(6,124,96,.085);border-color:var(--m-line)}
.motion-studio .motion-layer-row-name{font-size:11px;font-weight:750;line-height:1.35}
.motion-studio .motion-layer-track{display:block;position:relative;background:rgba(105,153,137,.15);height:7px;border-radius:20px;min-width:0;overflow:hidden}
.motion-studio .motion-layer-bar{display:block;position:absolute;top:0;bottom:0;border-radius:20px;max-width:100%;background:#07826c}
.motion-studio .motion-layer-time{font-size:10px;text-align:right;color:var(--m-muted);font-variant-numeric:tabular-nums}
.motion-studio .motion-layer-editor{padding-top:14px;margin-top:10px;border-top:1px solid var(--m-line)}
.motion-studio .motion-layer-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:10px}
.motion-studio .motion-layer-heading strong{font-size:13px}.motion-studio .motion-layer-heading span{font-size:11px;color:var(--m-muted);font-variant-numeric:tabular-nums}
.motion-studio .motion-layer-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 14px}
.motion-studio .motion-layer-controls .motion-field{margin-bottom:7px}.motion-studio .motion-layer-controls .motion-field>label{display:flex;justify-content:space-between;gap:5px;align-items:center;font-size:11px;font-weight:750}
.motion-studio .motion-layer-controls .motion-field output{font-size:11px;color:var(--m-muted);font-variant-numeric:tabular-nums}
.motion-studio .motion-layer-controls input[type=range]{min-height:29px!important;margin:3px 0!important;padding:0!important;background:transparent!important;accent-color:#07826c;cursor:pointer}
.motion-studio .motion-layer-controls select{min-height:43px!important;font-size:12px!important;padding:8px!important}
.motion-studio .motion-layer-controls .motion-field-wide{grid-column:1/-1}
.motion-studio .motion-layer-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:7px}
.motion-studio .motion-layer-actions button:disabled{opacity:.45;cursor:not-allowed}
.motion-studio .motion-type-controls{border-top:1px solid var(--m-line);padding-top:13px;margin-top:15px}
.motion-studio .motion-type-controls>strong{display:block;font-size:13px;margin-bottom:12px}
.motion-studio .motion-advanced :is(button,input,select):focus-visible{outline:2px solid #07826c;outline-offset:3px}
:root[data-theme=dark] .motion-studio .motion-layer-track{background:rgba(182,225,210,.20)}
:root[data-theme=dark] .motion-studio .motion-layer-row[aria-pressed=true]{background:rgba(122,205,172,.13)}
:root[data-theme=dark] .motion-studio .motion-advanced-presets select{background:#1a5144}
@media(max-width:420px){.motion-studio .motion-layer-row{grid-template-columns:minmax(90px,1fr) minmax(45px,1fr) 30px;gap:6px;padding:9px 6px}.motion-studio .motion-layer-controls{gap:7px 10px}.motion-studio .motion-layer-actions button{padding:9px 5px;font-size:11px}}
@media(max-width:350px){.motion-studio .motion-layer-controls{grid-template-columns:1fr}.motion-studio .motion-advanced-presets{grid-template-columns:1fr}.motion-studio .motion-layer-actions{grid-template-columns:1fr}}


/* original motion-native-v1630.css */
/* v16.30 Unified Native Motion Studio: same single-column, max 680px at all widths.
 * Only loaded on Motion route; leave other application screens unchanged. */
body[data-page="motion"] .app-shell {width:100%!important;max-width:680px!important;margin-inline:auto!important;min-width:0!important;}
body[data-page="motion"] .motion-studio {width:100%!important;max-width:680px!important;margin:0 auto!important;min-width:0;padding-bottom:calc(110px + env(safe-area-inset-bottom, 0px));}
body[data-page="motion"] .motion-layout,body[data-page="motion"] .motion-native-workspace{display:flex!important;flex-direction:column!important;gap:13px!important;align-items:stretch!important;width:100%!important;min-width:0!important;grid-template-columns:minmax(0,1fr)!important;}
body[data-page="motion"] .motion-preview-section,body[data-page="motion"] .motion-editor{position:relative!important;top:auto!important;order:initial!important;display:flex;flex-direction:column;align-items:stretch;width:100%;min-width:0;box-shadow:none;padding:16px;border-radius:17px;border:1px solid var(--m-line);background:var(--m-panel)}
body[data-page="motion"] .motion-heading{margin:8px 0 16px;gap:10px;align-items:start}
body[data-page="motion"] .motion-heading h1{font-size:clamp(24px,4.6vw,30px);margin:5px 0 4px;line-height:1.25}
body[data-page="motion"] .motion-heading p{font-size:12px;max-width:45ch;line-height:1.55}
body[data-page="motion"] .motion-text-link{min-height:38px;padding:8px 11px;font-size:11px}
body[data-page="motion"] .motion-preview-top{gap:8px;flex-wrap:wrap}
body[data-page="motion"] .motion-preview-top h2{font-size:17px!important;margin:3px 0 0!important}
body[data-page="motion"] .motion-preview-top>span{margin-left:auto;font-size:10px}
body[data-page="motion"] .motion-stage-wrap{padding:16px;background:linear-gradient(150deg,rgba(25,115,91,.10),rgba(25,115,91,.045));border:1px solid var(--m-line);border-radius:14px;min-height:0}
body[data-page="motion"] .motion-stage{width:min(100%,275px);max-width:100%;border-radius:11px;box-shadow:0 10px 24px rgba(5,31,32,.16)}
body[data-page="motion"] .motion-timeline{margin-top:2px}
body[data-page="motion"] .motion-timeline-top{font-size:12px}
body[data-page="motion"] .motion-timeline input[type=range]{margin:8px 0 10px!important;min-height:26px}
body[data-page="motion"] .motion-control-row{display:grid!important;grid-template-columns:minmax(0,1.5fr) repeat(2,minmax(0,1fr))!important;gap:7px}
body[data-page="motion"] .motion-control-row button{min-height:44px;padding:9px 5px;font-size:11px}
body[data-page="motion"] .motion-control-row .motion-primary{grid-column:auto!important}
body[data-page="motion"] .motion-status{min-height:0;margin:9px 0 0;font-size:11px}
body[data-page="motion"] .motion-native-shortcuts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:3px}
body[data-page="motion"] .motion-native-shortcuts a{min-width:0;min-height:43px;display:flex;align-items:center;justify-content:center;gap:4px;text-align:center;text-decoration:none;color:var(--m-ink);font-size:12px;font-weight:750;border:1px solid var(--m-line);border-radius:11px;background:rgba(60,150,110,.055)}
body[data-page="motion"] .motion-native-shortcuts a:focus-visible{outline:2px solid #0b866b;outline-offset:2px}
body[data-page="motion"] .motion-editor-heading{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:4px 12px;margin:1px 0 17px}
body[data-page="motion"] .motion-editor-heading h2{font-size:17px!important;margin:0!important;line-height:1.35}
body[data-page="motion"] .motion-edit-hint{font-size:11px;color:var(--m-muted)}
body[data-page="motion"] .motion-section-head{margin-bottom:11px;gap:9px}
body[data-page="motion"] .motion-section-head h2{font-size:14px!important;margin:0 0 2px!important}
body[data-page="motion"] .motion-section-head p{font-size:11px}
body[data-page="motion"] .motion-section-number{height:29px;width:29px;border-radius:9px;font-size:11px}
body[data-page="motion"] .motion-section-second{padding-top:14px;margin-top:16px}
body[data-page="motion"] .motion-templates{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px;margin:11px 0 0!important}
body[data-page="motion"] .motion-templates>legend{font-size:12px}
body[data-page="motion"] .motion-template{display:flex!important;flex-direction:column!important;gap:7px!important;align-items:stretch!important;justify-content:flex-start;padding:8px!important;min-height:136px;background:transparent;border-radius:12px}
body[data-page="motion"] .motion-template-swatch{width:100%;height:68px;flex:none;border-radius:9px}
body[data-page="motion"] .motion-template-swatch b{font-size:24px}
body[data-page="motion"] .motion-template>span:last-child{display:block;width:100%;min-width:0}
body[data-page="motion"] .motion-template strong{display:block;font-size:11px;line-height:1.3;overflow-wrap:break-word}
body[data-page="motion"] .motion-template small{display:block;font-size:10px;line-height:1.32;margin-top:3px;overflow-wrap:break-word}
body[data-page="motion"] .motion-field{margin-bottom:12px}
body[data-page="motion"] .motion-field :is(input,select,textarea){min-height:44px!important;font-size:13px!important}
body[data-page="motion"] .motion-video-controls{margin-top:11px;padding-top:12px;gap:9px}
body[data-page="motion"] .motion-video-title{align-items:center;gap:8px;flex-wrap:wrap}
body[data-page="motion"] .motion-video-title strong{font-size:13px}
body[data-page="motion"] .motion-export-options{border:1px solid var(--m-line);border-radius:11px;overflow:hidden;min-width:0}
body[data-page="motion"] .motion-export-options>summary{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;min-height:46px!important;padding:10px 12px!important;font-size:12px!important;font-weight:750;cursor:pointer;color:var(--m-ink)}
body[data-page="motion"] .motion-export-options .motion-export-hint{margin-left:auto;max-width:50%;font-size:10px;text-align:right;font-weight:500;color:var(--m-muted);overflow-wrap:anywhere}
body[data-page="motion"] .motion-export-option-body{padding:12px;border-top:1px solid var(--m-line);min-width:0}
body[data-page="motion"] .motion-video-inputs{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important}
body[data-page="motion"] .motion-video-actions{display:flex!important;flex-direction:row!important;gap:8px}
body[data-page="motion"] .motion-video-actions button{min-height:46px;width:auto;flex:1}
body[data-page="motion"] .motion-video-state{min-height:0;margin:0;font-size:11px}
body[data-page="motion"] .motion-advanced{margin:13px 0 8px}
body[data-page="motion"] .motion-advanced>summary{min-height:61px!important}
body[data-page="motion"] .motion-layer-list{gap:3px}
body[data-page="motion"] .motion-layer-row{grid-template-columns:minmax(100px,1fr) minmax(65px,1.4fr) 33px;min-height:43px;padding:8px;gap:8px}
body[data-page="motion"] .motion-layer-adjust,body[data-page="motion"] .motion-global-adjust{border-top:1px solid var(--m-line);margin-top:10px;padding-top:3px}
body[data-page="motion"] .motion-layer-adjust>summary,body[data-page="motion"] .motion-global-adjust>summary{display:flex!important;align-items:center!important;gap:6px!important;padding:9px 0!important;min-height:44px!important;font-size:12px;font-weight:750;cursor:pointer;color:var(--m-ink)}
body[data-page="motion"] .motion-layer-editor{margin-top:0;padding-top:12px}
body[data-page="motion"] .motion-type-controls{margin-top:0;padding-top:11px;border:0}
body[data-page="motion"] :is(.motion-layer-adjust,.motion-global-adjust,.motion-export-options) :focus-visible{outline:2px solid #07826c;outline-offset:2px}
body[data-page="motion"] :is(#motion-quick-edit,#motion-personalize,#motion-advanced,#motion-video-controls){scroll-margin-top:20px}
:root[data-theme="dark"] body[data-page="motion"] .motion-stage-wrap{background:linear-gradient(155deg,rgba(90,158,132,.13),rgba(30,91,75,.09))}
:root[data-theme="dark"] body[data-page="motion"] .motion-native-shortcuts a{background:#164b3e}
@media(max-width:440px){body[data-page="motion"] .motion-preview-section,body[data-page="motion"] .motion-editor{padding:12px;border-radius:15px}body[data-page="motion"] .motion-stage-wrap{padding:9px}body[data-page="motion"] .motion-stage{width:min(100%,240px)}body[data-page="motion"] .motion-template{padding:7px!important;min-height:126px}body[data-page="motion"] .motion-template-swatch{height:60px}body[data-page="motion"] .motion-control-row{grid-template-columns:minmax(0,1.2fr) repeat(2,minmax(0,.9fr))!important}body[data-page="motion"] .motion-control-row button{font-size:10px;padding:8px 3px}body[data-page="motion"] .motion-video-inputs{grid-template-columns:repeat(2,minmax(0,1fr))!important}body[data-page="motion"] .motion-layer-row{grid-template-columns:minmax(90px,1fr) minmax(40px,1fr) 33px;gap:6px;padding:8px 4px}}
@media(max-width:345px){body[data-page="motion"] .motion-stage{width:min(100%,218px)}body[data-page="motion"] .motion-template small{display:none}body[data-page="motion"] .motion-template{min-height:100px}body[data-page="motion"] .motion-template-swatch{height:58px}body[data-page="motion"] .motion-native-shortcuts a{font-size:11px;padding:5px 2px}body[data-page="motion"] .motion-video-inputs{grid-template-columns:1fr!important}}
@media(prefers-reduced-motion:reduce){body[data-page="motion"] .motion-stage{transition:none}}


/* original motion-drafts-v1631.css */
/* v16.31. Native, same one-column 680px workspace on all devices. */
body[data-page="motion"] .motion-library{margin:13px 0 0;padding:15px 0 1px;border-top:1px solid var(--m-line);min-width:0;width:100%;}
body[data-page="motion"] .motion-library *{box-sizing:border-box;min-width:0}
body[data-page="motion"] .motion-library-head{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
body[data-page="motion"] .motion-library-head h2{margin:4px 0 0!important;font-size:15px!important;line-height:1.35}
body[data-page="motion"] .motion-library-local{font-size:10px;padding:6px 9px;color:var(--m-muted);background:rgba(53,145,105,.08);border-radius:99px}
body[data-page="motion"] .motion-library-help,body[data-page="motion"] .motion-library-privacy{font-size:11px;color:var(--m-muted);line-height:1.65;margin:8px 0 12px}
body[data-page="motion"] .motion-library-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:12px 0}
body[data-page="motion"] .motion-library-actions>button{min-width:0;min-height:44px!important;font-size:12px!important;padding:9px 6px!important}
body[data-page="motion"] .motion-library-status{font-size:11px;min-height:17px;line-height:1.5;color:var(--m-muted);margin-bottom:11px}
body[data-page="motion"] .motion-library-status[data-error="true"]{color:#b34743}
body[data-page="motion"] .motion-draft-notice{margin-top:12px;padding:11px;display:flex;align-items:center;justify-content:space-between;gap:10px;border-radius:12px;background:rgba(26,137,102,.08);border:1px solid var(--m-line);font-size:12px;color:var(--m-ink)}
body[data-page="motion"] .motion-draft-notice[hidden]{display:none!important}
body[data-page="motion"] .motion-draft-notice button{min-height:38px!important;flex:none;font-size:11px}
body[data-page="motion"] .motion-library-details{border-top:1px solid var(--m-line);margin-top:9px;padding-top:3px}
body[data-page="motion"] .motion-library-details>summary{min-height:46px!important;display:flex!important;align-items:center!important;gap:10px!important;justify-content:space-between!important;padding:10px 0!important;font-size:12px!important;font-weight:750;cursor:pointer}
body[data-page="motion"] #motion-library-count{font-size:10px;color:var(--m-muted);font-weight:500;margin-left:auto;max-width:52%;overflow-wrap:anywhere;text-align:right}
body[data-page="motion"] .motion-library-body{padding:6px 0 0}
body[data-page="motion"] .motion-library-list h3{font-size:13px;margin:12px 0 4px;color:var(--m-ink)}
body[data-page="motion"] .motion-library-empty{font-size:11px;color:var(--m-muted);padding:8px 0 12px;margin:0}
body[data-page="motion"] .motion-library-item{display:flex;align-items:center;gap:10px;justify-content:space-between;flex-wrap:wrap;padding:12px 0;border-bottom:1px solid var(--m-line)}
body[data-page="motion"] .motion-library-item-copy{display:grid;gap:3px;flex:1 1 160px;overflow-wrap:anywhere}
body[data-page="motion"] .motion-library-item-copy strong{font-size:12px;font-weight:800;color:var(--m-ink)}
body[data-page="motion"] .motion-library-item-copy small{font-size:10px;color:var(--m-muted)}
body[data-page="motion"] .motion-library-item-actions{display:flex;align-items:center;gap:5px;flex-wrap:wrap;max-width:100%}
body[data-page="motion"] .motion-library .motion-mini{font-size:11px!important;min-height:37px!important;padding:7px 9px!important;border-radius:9px!important}
body[data-page="motion"] .motion-library-rename{display:flex;flex:1 1 100%;gap:6px;align-items:center;flex-wrap:wrap;margin-top:6px}
body[data-page="motion"] .motion-library-rename input{flex:1 1 170px;width:auto;max-width:100%;min-height:40px!important;margin:0!important;font-size:12px!important}
body[data-page="motion"] .motion-library :focus-visible{outline:2px solid #0b856c;outline-offset:2px}
body[data-page="motion"] .motion-library button:disabled{opacity:.55;cursor:not-allowed}
@media(max-width:430px){body[data-page="motion"] .motion-library{padding-top:13px}body[data-page="motion"] .motion-library-item-actions{width:100%;justify-content:flex-start}body[data-page="motion"] .motion-library-item-actions button{flex:1 1 auto}}

body[data-page="motion"] .motion-draft-actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap}body[data-page="motion"] .motion-draft-actions button{padding:7px 9px!important}body[data-page="motion"] .motion-draft-notice{flex-wrap:wrap}


/* original motion-mobile-export-v1632.css */
/* v16.32 · device-aware exporter, same single-column 680px workspace. */
body[data-page="motion"] .motion-device-guidance{margin:3px 0 0;font-size:12px;line-height:1.55;color:var(--m-muted)}
body[data-page="motion"] .motion-device-guidance[data-warning="true"]{color:#a26b24}
body[data-page="motion"] .motion-video-result{display:grid;gap:12px;padding:14px;border:1px solid var(--m-line);background:var(--m-soft,#eef6f2);border-radius:14px;min-width:0}
body[data-page="motion"] .motion-video-result[hidden]{display:none!important}
body[data-page="motion"] .motion-video-result strong{display:block;color:var(--m-ink);font-size:14px}
body[data-page="motion"] .motion-video-result span,body[data-page="motion"] .motion-save-help{font-size:12px;color:var(--m-muted);line-height:1.5}
body[data-page="motion"] .motion-video-result-actions{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:9px}
body[data-page="motion"] .motion-video-result-actions button{min-width:0;min-height:44px;border-radius:11px;font:inherit;font-weight:750;font-size:12px;padding:9px 11px;cursor:pointer}
body[data-page="motion"] .motion-video-result-actions button:focus-visible{outline:3px solid #1ba48a;outline-offset:2px}
body[data-page="motion"] .motion-save-help{margin:0}
body[data-page="motion"] #motion-video-export:disabled{opacity:.55}
body[data-page="motion"] .motion-video-actions{align-items:stretch}
@media(max-width:390px){body[data-page="motion"] .motion-video-result-actions{grid-template-columns:minmax(0,1fr)}body[data-page="motion"] .motion-video-actions{flex-direction:row}body[data-page="motion"] .motion-video-actions button{min-width:0}}
@media(prefers-reduced-motion:reduce){body[data-page="motion"] .motion-video-result{scroll-behavior:auto}}


/* original motion-audio-v1633.css */
/* Motion v16.33: optional audio controls, no nested cards; <=680px unified layout. */
body[data-page="motion"] .motion-audio-panel{border:1px solid var(--m-line);border-radius:12px;min-width:0}
body[data-page="motion"] .motion-audio-panel>summary{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px;min-height:47px!important;padding:10px 12px!important;cursor:pointer;color:var(--m-ink);font-size:12px;font-weight:750}
body[data-page="motion"] .motion-audio-chip{color:var(--m-muted);font-size:10px;font-weight:500;max-width:50%;text-align:right}
body[data-page="motion"] .motion-audio-content{padding:11px 12px 13px;border-top:1px solid var(--m-line);min-width:0}
body[data-page="motion"] .motion-audio-content .motion-field>label{font-size:12px}
body[data-page="motion"] #motion-audio-file{width:100%;max-width:100%;min-width:0;min-height:45px;font-family:inherit;font-size:12px!important}
body[data-page="motion"] .motion-audio-selected,body[data-page="motion"] .motion-audio-preview{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap;min-width:0;margin:9px 0}
body[data-page="motion"] .motion-audio-selected[hidden]{display:none!important}
body[data-page="motion"] #motion-audio-name{flex:1;overflow-wrap:anywhere;font-size:12px;color:var(--m-ink)}
body[data-page="motion"] .motion-audio-panel button{border:1px solid var(--m-line);min-height:44px;padding:8px 11px;border-radius:11px;font-family:inherit;font-size:12px;font-weight:700;cursor:pointer}
body[data-page="motion"] .motion-audio-panel button:disabled{opacity:.5;cursor:not-allowed}
body[data-page="motion"] .motion-audio-settings{display:grid;grid-template-columns:1fr;gap:3px;margin-top:13px}
body[data-page="motion"] .motion-audio-settings input[type=range]{min-height:30px!important;padding:0!important;accent-color:#06785f}
body[data-page="motion"] #motion-audio-volume-value{font-size:12px;color:var(--m-muted);font-variant-numeric:tabular-nums}
body[data-page="motion"] .motion-audio-fades{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
body[data-page="motion"] .motion-audio-preview span{font-size:11px;color:var(--m-muted);flex:1;line-height:1.5}
body[data-page="motion"] .motion-audio-status,body[data-page="motion"] .motion-audio-hint{font-size:11px;line-height:1.55;color:var(--m-muted);margin:8px 0}
body[data-page="motion"] .motion-audio-status[data-error=true]{color:#b45245}
body[data-page="motion"] .motion-audio-panel :focus-visible{outline:2px solid #07826c;outline-offset:2px}
@media(max-width:375px){body[data-page="motion"] .motion-audio-fades{grid-template-columns:repeat(2,minmax(0,1fr))}body[data-page="motion"] .motion-audio-content{padding:10px}}


/* original motion-compact-v1634.css */
/* Lịch Việt v16.34 · Unified Native Motion Studio Polish
 * Pure presentation: preserve 680px shell, SVG timeline and all JS control IDs.
 * Loaded ONLY on the Motion route, after prior Motion styles. No nested-card UI. */
body[data-page="motion"] .motion-studio {
  width:100%!important;
  max-width:680px!important;
  margin-inline:auto!important;
  padding-bottom:calc(104px + env(safe-area-inset-bottom,0px))!important;
  min-width:0;
  --motion-accent:#087960;
  --motion-hairline:var(--m-line);
}
body[data-page="motion"] .motion-layout {
  display:flex!important;
  flex-direction:column!important;
  gap:12px!important;
  width:100%!important;
  max-width:680px!important;
  min-width:0;
}
body[data-page="motion"] .motion-heading {margin:7px 0 14px;gap:8px;align-items:center}
body[data-page="motion"] .motion-heading h1 {font-size:clamp(23px,4.8vw,29px);line-height:1.25;letter-spacing:-.035em;margin:3px 0 3px}
body[data-page="motion"] .motion-heading p {font-size:11px;line-height:1.5;margin:0;color:var(--m-muted)}
body[data-page="motion"] .motion-kicker {font-size:9px;letter-spacing:.075em}
body[data-page="motion"] .motion-text-link {min-height:38px;border-radius:10px;font-size:11px}
/* Two native surfaces; library sits flush on the page rather than inside preview. */
body[data-page="motion"] .motion-preview-section,
body[data-page="motion"] .motion-editor {
  display:flex!important;
  flex-direction:column;
  padding:14px!important;
  border:1px solid var(--motion-hairline);
  border-radius:16px!important;
  box-shadow:none!important;
  background:var(--m-panel);
  min-width:0;
}
body[data-page="motion"] .motion-preview-top {align-items:center;gap:7px;margin-bottom:5px}
body[data-page="motion"] .motion-preview-top h2,
body[data-page="motion"] .motion-editor-heading h2 {font-size:16px!important;margin:0!important}
body[data-page="motion"] #motion-resolution {font-size:10px;color:var(--m-muted);white-space:nowrap}
/* No colored card inside the preview card: the actual SVG design is the focus. */
body[data-page="motion"] .motion-stage-wrap {
  padding:5px 0 9px!important;
  margin:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  display:flex;
  justify-content:center;
  align-items:center;
  min-width:0;
}
body[data-page="motion"] .motion-stage {
  width:min(100%,224px)!important;
  max-width:100%;
  border-radius:11px;
  overflow:hidden;
  box-shadow:0 10px 25px rgba(1,30,34,.14)!important;
}
body[data-page="motion"] .motion-timeline {margin:0}
body[data-page="motion"] .motion-timeline-top {font-size:11px;font-weight:750}
body[data-page="motion"] #motion-seek {min-height:var(--lvui-touch-size,44px)!important;margin:4px 0!important;accent-color:var(--motion-accent)}
body[data-page="motion"] .motion-control-row {grid-template-columns:minmax(0,1.12fr) repeat(2,minmax(0,.95fr))!important;gap:7px}
body[data-page="motion"] .motion-control-row button {min-height:44px;font-size:11px!important;padding:8px 5px!important;border-radius:10px!important}
body[data-page="motion"] .motion-status {font-size:10px;line-height:1.5;margin:7px 0 0;min-height:0}
body[data-page="motion"] .motion-status[data-error="true"] {color:#b64f3e}
body[data-page="motion"] .motion-video-controls {padding:11px 0 0;margin:10px 0 0;border-top:1px solid var(--motion-hairline);gap:8px!important}
body[data-page="motion"] .motion-video-title {display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin:0 0 1px}
body[data-page="motion"] .motion-video-title strong {font-size:12px;color:var(--m-ink)}
body[data-page="motion"] .motion-video-actions {display:flex!important;gap:8px;align-items:stretch}
body[data-page="motion"] .motion-video-actions button {min-height:48px!important;border-radius:11px!important;font-size:13px!important;font-weight:800;padding:9px 12px!important}
body[data-page="motion"] #motion-video-export:not(:disabled) {box-shadow:0 4px 14px rgba(3,100,78,.11)}
body[data-page="motion"] .motion-video-state {font-size:10px;line-height:1.45;margin:0;min-height:0}
/* Output settings and audio: two simple rows, not nested bordered cards. */
body[data-page="motion"] .motion-export-options,
body[data-page="motion"] .motion-audio-panel {
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-bottom:1px solid var(--motion-hairline)!important;
  border-radius:0!important;
  background:transparent!important;
  min-width:0;
}
body[data-page="motion"] .motion-export-options>summary,
body[data-page="motion"] .motion-audio-panel>summary {
  display:flex!important;
  justify-content:space-between!important;
  align-items:center!important;
  gap:9px;
  min-height:44px!important;
  padding:9px 0!important;
  font-size:12px!important;
  font-weight:750;
  color:var(--m-ink);
  cursor:pointer;
}
body[data-page="motion"] .motion-export-options .motion-export-hint,
body[data-page="motion"] .motion-audio-chip {font-size:10px!important;text-align:right;color:var(--m-muted);max-width:55%;overflow-wrap:anywhere}
body[data-page="motion"] .motion-export-option-body,
body[data-page="motion"] .motion-audio-content {border:0!important;padding:9px 0 12px!important}
body[data-page="motion"] .motion-device-guidance,
body[data-page="motion"] .motion-video-capability {font-size:10px;line-height:1.45;margin:4px 0}
body[data-page="motion"] .motion-audio-hint {font-size:10px;line-height:1.5}
body[data-page="motion"] .motion-video-result {margin-top:5px;border-radius:12px;padding:12px}
body[data-page="motion"] .motion-progress-row {margin:2px 0 0}
/* Native text shortcuts: understated and consistent with the tools pages. */
body[data-page="motion"] .motion-native-shortcuts {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;margin:8px 0 0;padding-top:8px;border-top:1px solid var(--motion-hairline)}
body[data-page="motion"] .motion-native-shortcuts a {
  min-height:42px;
  border:0!important;
  border-radius:9px;
  background:transparent!important;
  font-size:11px;
  text-decoration:none;
  color:var(--m-ink);
  font-weight:750;
}
body[data-page="motion"] .motion-native-shortcuts a:hover,
body[data-page="motion"] .motion-native-shortcuts a:focus-visible {background:rgba(15,139,105,.08)!important}
/* Editing area: avoid verbose subtitles and redundant cards. */
body[data-page="motion"] .motion-editor-heading {margin:0 0 12px;gap:3px 10px}
body[data-page="motion"] .motion-edit-hint {font-size:10px}
body[data-page="motion"] .motion-section-head {margin-bottom:9px}
body[data-page="motion"] .motion-section-head h2 {font-size:13px!important}
body[data-page="motion"] .motion-section-head p {font-size:10px;margin:1px 0 0}
body[data-page="motion"] .motion-section-second {margin-top:11px;padding-top:12px}
body[data-page="motion"] .motion-field {margin-bottom:10px}
body[data-page="motion"] .motion-field>label {font-size:11px}
body[data-page="motion"] .motion-field :is(input,select,textarea) {min-height:44px!important;max-width:100%;font-size:13px!important}
body[data-page="motion"] .motion-field input[type="date"] {width:100%;min-width:0;max-width:100%;-webkit-appearance:none;appearance:auto;font-size:16px!important}
body[data-page="motion"] .motion-templates {grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important;margin:7px 0 0!important}
body[data-page="motion"] .motion-template {min-height:111px!important;padding:6px!important;border-radius:11px!important;gap:5px!important}
body[data-page="motion"] .motion-template-swatch {height:54px!important;border-radius:7px!important}
body[data-page="motion"] .motion-template strong {font-size:10px!important;line-height:1.25}
body[data-page="motion"] .motion-template small {font-size:9px!important;line-height:1.3;margin-top:2px}
body[data-page="motion"] .motion-advanced {margin:8px 0 4px!important}
body[data-page="motion"] .motion-advanced>summary {min-height:49px!important;padding:7px 0!important}
body[data-page="motion"] .motion-advanced-label strong {font-size:12px!important}
body[data-page="motion"] .motion-advanced-label small {font-size:10px!important}
body[data-page="motion"] .motion-advanced-body {padding-bottom:8px}
body[data-page="motion"] .motion-advanced-help {font-size:10px;line-height:1.5;margin:5px 0 8px}
/* Eight layers become one horizontal chip strip: one row instead of 8 tall rows. */
body[data-page="motion"] .motion-layer-list {
  display:flex!important;
  flex-direction:row!important;
  gap:6px;
  overflow-x:auto;
  overscroll-behavior-x:contain;
  scroll-snap-type:x proximity;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:thin;
  padding:4px 0 8px;
  max-width:100%;
}
body[data-page="motion"] .motion-layer-row {
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 30px!important;
  grid-template-rows:auto 7px!important;
  flex:0 0 138px;
  gap:6px 4px!important;
  width:138px!important;
  min-width:138px!important;
  min-height:48px!important;
  padding:7px 9px!important;
  border:1px solid var(--motion-hairline)!important;
  border-radius:10px!important;
  scroll-snap-align:start;
  background:transparent;
}
body[data-page="motion"] .motion-layer-row[aria-pressed="true"] {border-color:rgba(6,135,103,.55)!important;background:rgba(8,121,96,.08)!important}
body[data-page="motion"] .motion-layer-row-name {font-size:10px!important;font-weight:750;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body[data-page="motion"] .motion-layer-time {font-size:9px!important;justify-self:end}
body[data-page="motion"] .motion-layer-track {grid-column:1/-1;width:100%;height:5px!important}
body[data-page="motion"] .motion-layer-adjust>summary,
body[data-page="motion"] .motion-global-adjust>summary {min-height:44px!important}
/* Library after editor: one flat section with natural separators. */
body[data-page="motion"] .motion-library {
  width:100%;min-width:0;
  margin:0!important;
  padding:11px 14px!important;
  background:var(--m-panel);
  border:1px solid var(--motion-hairline);
  border-radius:15px;
}
body[data-page="motion"] .motion-library-head h2 {font-size:14px!important;margin:1px 0 0!important}
body[data-page="motion"] .motion-library-help {font-size:10px;line-height:1.45;margin:6px 0 8px}
body[data-page="motion"] .motion-library-actions {margin:9px 0;gap:7px}
body[data-page="motion"] .motion-library-actions>button {border-radius:10px!important;font-size:11px!important;min-height:44px!important}
body[data-page="motion"] .motion-library-status {font-size:10px;min-height:0;margin-bottom:5px}
body[data-page="motion"] .motion-library-details>summary {min-height:44px!important}
/* No sitewide header/footer mutation: reserve one safe area beneath last control. */
body[data-page="motion"] #motion-library,
body[data-page="motion"] #motion-quick-edit,
body[data-page="motion"] #motion-personalize,
body[data-page="motion"] #motion-advanced {scroll-margin-top:calc(20px + env(safe-area-inset-top,0px))}
body[data-page="motion"] .motion-studio :is(button,summary,input,select,textarea,a):focus-visible {outline:2px solid var(--motion-accent);outline-offset:2px}
@media(max-width:440px){
  body[data-page="motion"] .motion-preview-section,body[data-page="motion"] .motion-editor {padding:11px!important;border-radius:14px!important}
  body[data-page="motion"] .motion-stage {width:min(100%,194px)!important}
  body[data-page="motion"] .motion-library {padding:11px!important}
  body[data-page="motion"] .motion-heading {margin:5px 0 10px}
  body[data-page="motion"] .motion-control-row button {font-size:10px!important}
  body[data-page="motion"] .motion-template-swatch {height:49px!important}
  body[data-page="motion"] .motion-template {min-height:104px!important}
}
@media(max-width:350px){
  body[data-page="motion"] .motion-stage {width:min(100%,178px)!important}
  body[data-page="motion"] .motion-template small {display:none}
  body[data-page="motion"] .motion-template {min-height:93px!important}
  body[data-page="motion"] .motion-templates {gap:4px!important}
  body[data-page="motion"] .motion-control-row {gap:4px!important}
  body[data-page="motion"] .motion-video-inputs {grid-template-columns:1fr!important}
}
@media(prefers-reduced-motion:reduce){body[data-page="motion"] .motion-stage {transition:none!important}}


/* original motion-native-ui-v1635.css */
/* Lịch Việt v16.35 · Motion Studio Native UI Polish.
 * Loaded LAST and scoped to Motion route. Same one-column 680px on desktop/mobile.
 * Unifies Bai Jamjuree, readable type, native buttons and single separators.
 */
body[data-page="motion"] .motion-studio {
  --motion-brand: #087860;
  --motion-brand-pressed: #05664f;
  --motion-brand-soft: #e4f3ec;
  --motion-ink-strong: var(--m-ink);
  --motion-muted-readable: #526f65;
  --motion-outline: rgba(19, 112, 88, .19);
  --motion-radius: 13px;
  width: 100% !important;
  max-width: 680px !important;
  margin-inline: auto !important;
  font-family: 'Bai Jamjuree', system-ui, sans-serif;
  color: var(--motion-ink-strong);
  font-size: 14px;
  line-height: 1.55;
}
body[data-page="motion"] .motion-studio *,
body[data-page="motion"] .motion-studio *::before,
body[data-page="motion"] .motion-studio *::after { box-sizing: border-box; }
body[data-page="motion"] .motion-studio :is(button,input,select,textarea) { font-family: inherit; }
body[data-page="motion"] .motion-studio :is(.motion-preview-section,.motion-editor,.motion-library){
  padding: 16px !important;
  border-color: var(--motion-outline);
  border-radius: 17px !important;
}
body[data-page="motion"] .motion-studio .motion-layout { gap: 14px !important; }
/* Intentional hierarchy, not many 9–11px meta labels. Minimum 12px even at 320px. */
body[data-page="motion"] .motion-heading { margin-block: 9px 16px; }
body[data-page="motion"] .motion-heading h1 { font-size: clamp(24px, 5.5vw, 30px) !important; line-height: 1.28; }
body[data-page="motion"] .motion-heading p { font-size: 14px !important; line-height: 1.6; color: var(--motion-muted-readable); }
body[data-page="motion"] .motion-kicker { font-size: 12px !important; letter-spacing: .035em; line-height: 1.5; color: var(--motion-brand); }
body[data-page="motion"] .motion-text-link { font-size: 13px !important; min-height: 44px; border-radius: var(--motion-radius); }
body[data-page="motion"] :is(.motion-preview-top h2,.motion-editor-heading h2,.motion-library-head h2) { font-size: 18px !important; line-height: 1.35; }
body[data-page="motion"] .motion-video-title strong { font-size: 15px !important; line-height: 1.4; }
body[data-page="motion"] .motion-section-head h2 { font-size: 16px !important; }
body[data-page="motion"] .motion-section-head p,
body[data-page="motion"] .motion-edit-hint { font-size: 13px !important; color: var(--motion-muted-readable); line-height: 1.5; }
body[data-page="motion"] .motion-section-number { font-size: 12px !important; }
body[data-page="motion"] :is(.motion-field>label,.motion-templates>legend,.motion-timeline-top,
  .motion-layer-heading strong,.motion-advanced-label strong) { font-size: 14px !important; font-weight: 750; line-height: 1.5; }
body[data-page="motion"] .motion-field :is(input,select,textarea) { font-size: 15px !important; line-height: 1.5; min-height: 48px !important; }
body[data-page="motion"] .motion-field input[type="date"] { font-size: 16px !important; min-width: 0; }
body[data-page="motion"] .motion-field textarea { min-height: 94px !important; }
body[data-page="motion"] :is(.motion-helper,.motion-status,.motion-video-state,.motion-editor-status,
  .motion-device-guidance,.motion-video-capability,.motion-audio-hint,.motion-audio-status,
  .motion-audio-preview span,.motion-advanced-help,.motion-support p,
  .motion-library-help,.motion-library-status,.motion-library-privacy,
  .motion-video-result span,.motion-save-help,.motion-library-empty,
  .motion-advanced-label small,.motion-preview-top>span,#motion-resolution,
  .motion-export-hint,.motion-audio-chip,.motion-library-local,#motion-library-count,
  .motion-layer-heading span,.motion-layer-controls output,.motion-audio-duration,
  .motion-layer-time,.motion-timeline-top output,.motion-progress-row output) {
  font-size: 12px !important;
  line-height: 1.55;
  color: var(--motion-muted-readable);
}
body[data-page="motion"] .motion-studio :is(.motion-helper,.motion-audio-hint,.motion-library-help,.motion-support p) { overflow-wrap: anywhere; }
/* All actions: one radius, legible labels, consistent 44/48px hit areas. */
body[data-page="motion"] .motion-studio :is(.motion-primary,.motion-light,
  .motion-control-row button,.motion-video-actions button,.motion-video-result-actions button,
  .motion-library-actions button,.motion-layer-actions button,.motion-advanced-presets button,
  .motion-audio-panel button,.motion-mini,.motion-draft-actions button) {
  border-radius: var(--motion-radius) !important;
  font-size: 14px !important;
  font-weight: 750 !important;
  min-height: 46px !important;
  line-height: 1.35;
  padding: 10px 12px !important;
  box-shadow: none;
  transition: background-color .14s ease, border-color .14s ease, transform .14s ease;
  text-decoration: none;
}
body[data-page="motion"] .motion-studio .motion-primary {
  color: #fff !important;
  background: var(--motion-brand) !important;
  border: 1px solid var(--motion-brand) !important;
}
body[data-page="motion"] .motion-studio .motion-primary:hover:not(:disabled) { background: var(--motion-brand-pressed) !important; }
body[data-page="motion"] .motion-studio .motion-light {
  color: #08664f !important;
  background: #eef7f2 !important;
  border: 1px solid rgba(12,121,88,.21) !important;
}
body[data-page="motion"] .motion-studio .motion-light:hover:not(:disabled) { background: #dbefe5 !important; }
body[data-page="motion"] .motion-studio button:active:not(:disabled) { transform: scale(.99); }
body[data-page="motion"] .motion-studio button:disabled { opacity: .55; cursor: not-allowed; }
body[data-page="motion"] .motion-studio :is(button,summary,a,input,textarea,select):focus-visible {
  outline: 2px solid var(--motion-brand) !important;
  outline-offset: 3px;
}
body[data-page="motion"] .motion-control-row { gap: 8px !important; }
body[data-page="motion"] .motion-control-row button { white-space: normal; font-size: 13px !important; padding-inline: 6px !important; }
body[data-page="motion"] .motion-video-actions button { min-height: 50px !important; font-size: 15px !important; }
body[data-page="motion"] :is(.motion-library-actions,.motion-video-result-actions) { gap: 10px; }
body[data-page="motion"] .motion-library-actions button { min-height: 48px !important; font-size: 14px !important; }
body[data-page="motion"] .motion-studio .motion-mini { font-size: 12px !important; min-height: 40px !important; padding: 9px !important; }
/* Three recognizable native action pills. They are navigation links, not radio tabs. */
body[data-page="motion"] .motion-native-shortcuts {
  border-top: 0 !important;
  padding-top: 0 !important;
  margin: 14px 0 0 !important;
  gap: 8px !important;
  grid-template-columns: repeat(3,minmax(0,1fr));
}
body[data-page="motion"] .motion-native-shortcuts a {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  min-height: 68px !important;
  padding: 10px 5px !important;
  border: 1px solid transparent !important;
  border-radius: 14px !important;
  font-size: 13px !important;
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
  overflow-wrap: anywhere;
  transition: background-color .14s ease,transform .14s ease;
}
body[data-page="motion"] .motion-native-shortcuts a svg { display: block; flex: none; width: 20px; height: 20px; }
body[data-page="motion"] .motion-native-shortcuts a.motion-shortcut-quick-edit {
  background: #e1f2e9 !important; color: #0c684e !important; border-color: #c5e4d4 !important;
}
body[data-page="motion"] .motion-native-shortcuts a.motion-shortcut-personalize {
  background: #f8efdc !important; color: #72531a !important; border-color: #ecdfbf !important;
}
body[data-page="motion"] .motion-native-shortcuts a.motion-shortcut-library {
  background: #087860 !important; color: #fff !important; border-color: #087860 !important;
}
body[data-page="motion"] .motion-native-shortcuts a:hover { filter: brightness(.98); }
body[data-page="motion"] .motion-native-shortcuts a:active { transform: scale(.985); }
/* One divider at a section boundary, never two neighboring rules. */
body[data-page="motion"] .motion-video-controls { border-top: 1px solid var(--motion-outline) !important; padding-top: 14px; }
body[data-page="motion"] :is(.motion-export-options,.motion-audio-panel) {
  border: 0 !important;
  border-bottom: 0 !important;
  background: transparent !important;
  margin: 0 !important;
}
body[data-page="motion"] .motion-audio-panel { border-top: 1px solid var(--motion-outline) !important; }
body[data-page="motion"] .motion-video-controls { gap: 8px !important; }
body[data-page="motion"] .motion-section-second {
  border-top: 1px solid var(--motion-outline);
  margin-top: 17px;
  padding-top: 16px;
}
body[data-page="motion"] .motion-advanced { border-top: 1px solid var(--motion-outline) !important; border-bottom: 0 !important; margin: 12px 0 0 !important; }
body[data-page="motion"] .motion-support { border-top: 1px solid var(--motion-outline) !important; margin: 0 !important; padding-top: 0 !important; }
body[data-page="motion"] .motion-library-details { border-top: 1px solid var(--motion-outline) !important; }
body[data-page="motion"] .motion-layer-adjust, body[data-page="motion"] .motion-global-adjust { border-top: 1px solid var(--motion-outline); }
/* Identical 36px chevron affordance on ALL Motion disclosures. */
body[data-page="motion"] .motion-studio :is(.motion-export-options,.motion-audio-panel,.motion-advanced,
  .motion-support,.motion-library-details,.motion-layer-adjust,.motion-global-adjust)>summary {
  list-style: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  min-height: 55px !important;
  padding: 8px 0 !important;
  font-size: 14px !important;
  font-weight: 750 !important;
  color: var(--motion-ink-strong);
  cursor: pointer;
}
body[data-page="motion"] .motion-studio details>summary::-webkit-details-marker { display: none !important; }
body[data-page="motion"] .motion-studio :is(.motion-export-options,.motion-audio-panel,.motion-advanced,
  .motion-support,.motion-library-details,.motion-layer-adjust,.motion-global-adjust)>summary::after {
  content: '' !important;
  display: block;
  width: 36px !important;
  height: 36px !important;
  flex: 0 0 36px !important;
  margin: 0 0 0 auto !important;
  border: 1px solid var(--motion-outline) !important;
  border-radius: 11px !important;
  background-color: #e3f1e9;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23096953' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-size: 17px 17px;
  background-repeat: no-repeat;
  background-position: center;
  transform: none !important;
  transition: background-color .15s ease, transform .15s ease;
}
body[data-page="motion"] .motion-studio :is(.motion-export-options,.motion-audio-panel,.motion-advanced,
  .motion-support,.motion-library-details,.motion-layer-adjust,.motion-global-adjust)[open]>summary::after {
  transform: rotate(180deg) !important;
}
body[data-page="motion"] .motion-studio :is(.motion-export-options,.motion-audio-panel,.motion-advanced,
  .motion-support,.motion-library-details,.motion-layer-adjust,.motion-global-adjust)>summary>:not(:last-child) { min-width: 0; }
body[data-page="motion"] :is(.motion-advanced-label strong,.motion-library-head strong) { font-size: 14px !important; }
/* Templates: generous hit area and clear selected state, no tiny captions. */
body[data-page="motion"] .motion-templates { gap: 9px !important; }
body[data-page="motion"] .motion-template { padding: 8px !important; min-height: 150px !important; gap: 7px !important; align-items: stretch; }
body[data-page="motion"] .motion-template-swatch { height: 67px !important; border-radius: 9px !important; }
body[data-page="motion"] .motion-template strong { font-size: 13px !important; line-height: 1.35; overflow-wrap: anywhere; }
body[data-page="motion"] .motion-template small { display: block !important; font-size: 12px !important; line-height: 1.4; color: var(--motion-muted-readable); overflow-wrap: anywhere; }
body[data-page="motion"] .motion-template:has(input:checked) {
  background: #e6f4ed !important;
  border-color: #087860 !important;
  box-shadow: inset 0 0 0 1px #087860;
}
body[data-page="motion"] .motion-template:has(input:checked)::after {
  content: '✓'; position: absolute; top: 7px; right: 7px; display: grid; place-items: center;
  width: 21px; height: 21px; border-radius: 50%; background: #087860; color: white;
  font: 800 13px/1 'Bai Jamjuree',sans-serif; border: 1px solid white;
}
/* Advanced timeline compact scroll remains, now readable. */
body[data-page="motion"] .motion-layer-row { flex-basis: 158px; width: 158px !important; min-width: 158px !important; min-height: 60px !important; padding: 10px !important; }
body[data-page="motion"] .motion-layer-row-name,
body[data-page="motion"] .motion-layer-time,
body[data-page="motion"] .motion-layer-controls :is(label,output) { font-size: 12px !important; }
body[data-page="motion"] .motion-audio-content :is(.motion-field label,.motion-audio-hint,.motion-audio-status),
body[data-page="motion"] .motion-audio-content input[type="file"] { font-size: 13px !important; }
body[data-page="motion"] :is(.motion-library-item-copy strong,.motion-library-list h3,.motion-library-details>summary) { font-size: 14px !important; }
body[data-page="motion"] .motion-library-item-copy small { font-size: 12px !important; }
/* Dark theme: legible equivalents, no dark-on-dark secondary text or invisible pills. */
:root[data-theme="dark"] body[data-page="motion"] .motion-studio,
body[data-page="motion"]:is([data-theme="dark"],.theme-dark) .motion-studio {
  --motion-brand: #0d8065;
  --motion-brand-pressed: #075d4b;
  --motion-muted-readable: #c1d7ce;
  --motion-outline: rgba(177,218,197,.26);
}
:root[data-theme="dark"] body[data-page="motion"] .motion-studio .motion-light { color: #d9f2e3 !important; background: #21594a !important; border-color: rgba(171,220,198,.30) !important; }
:root[data-theme="dark"] body[data-page="motion"] .motion-native-shortcuts a.motion-shortcut-quick-edit { color: #d0f2de !important; background: #205a46 !important; border-color: #358163 !important; }
:root[data-theme="dark"] body[data-page="motion"] .motion-native-shortcuts a.motion-shortcut-personalize { color: #f4e3b9 !important; background: #5b4b30 !important; border-color: #8b7850 !important; }
:root[data-theme="dark"] body[data-page="motion"] .motion-native-shortcuts a.motion-shortcut-library { background: #0b8065 !important; border-color: #4ba88a !important; color: white !important; }
:root[data-theme="dark"] body[data-page="motion"] .motion-studio details>summary::after { background-color: #205746; border-color: rgba(179,224,203,.27) !important; }
:root[data-theme="dark"] body[data-page="motion"] .motion-template:has(input:checked) { background: #205849 !important; border-color: #7ecbaa !important; box-shadow: inset 0 0 0 1px #7ecbaa; }
/* Never shrink body text just to fit three columns. Let thumbnail labels wrap. */
@media(max-width:440px) {
  body[data-page="motion"] .motion-studio :is(.motion-preview-section,.motion-editor,.motion-library){ padding: 13px !important; }
  body[data-page="motion"] .motion-heading h1 { font-size: 25px !important; }
  body[data-page="motion"] .motion-template { min-height: 160px !important; padding: 7px !important; }
  body[data-page="motion"] .motion-template-swatch { height: 61px !important; }
  body[data-page="motion"] .motion-native-shortcuts { gap: 6px !important; }
  body[data-page="motion"] .motion-native-shortcuts a { font-size: 12px !important; min-height: 68px !important; }
  body[data-page="motion"] .motion-control-row button { font-size: 12px !important; padding: 10px 4px !important; }
}
@media(max-width:350px) {
  body[data-page="motion"] .motion-template { min-height: 162px !important; }
  body[data-page="motion"] .motion-template small { display: block !important; }
  body[data-page="motion"] .motion-templates { gap: 5px !important; }
  body[data-page="motion"] .motion-native-shortcuts a { font-size: 12px !important; }
}
@media(prefers-reduced-motion:reduce) {
  body[data-page="motion"] .motion-studio :is(button,a,summary)::after,
  body[data-page="motion"] .motion-studio :is(button,a) { transition: none !important; }
}
:root[data-theme="dark"] body[data-page="motion"] .motion-kicker {
  color: #9addbd !important;
}
:root[data-theme="dark"] body[data-page="motion"] .motion-studio details>summary::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c9f5dd' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
body[data-page="motion"] .motion-template-swatch i { font-size: 12px !important; }


/* original motion-production-v1636.css */
/* Motion Studio v16.36: visible export phase, recovery controls, 680px native shell. */
body[data-page="motion"] .motion-export-phase{font-family:"Bai Jamjuree",sans-serif;font-size:13px;line-height:1.55;font-weight:650;margin:5px 0;color:var(--m-ink);}
body[data-page="motion"] .motion-export-phase[hidden],body[data-page="motion"] .motion-export-retry[hidden]{display:none!important}
body[data-page="motion"] .motion-export-retry{display:inline-flex;align-items:center;justify-content:center;min-height:46px;padding:10px 16px;border-radius:13px;font-family:"Bai Jamjuree",sans-serif;font-size:14px;font-weight:700;cursor:pointer;max-width:100%;border:1px solid var(--m-line);color:var(--m-ink);background:var(--m-panel)}
body[data-page="motion"] .motion-export-retry:focus-visible{outline:3px solid #087962;outline-offset:3px}
body[data-page="motion"] .motion-export-retry:hover{border-color:#087962}
body[data-page="motion"] .motion-export-retry:disabled{opacity:.55;cursor:not-allowed}
body[data-page="motion"] .motion-video-state[data-error="true"]{font-size:13px;line-height:1.55}
body[data-page="motion"] .motion-video-result-detail{overflow-wrap:anywhere}
@media(max-width:390px){body[data-page="motion"] .motion-export-retry{width:100%}}
@media(prefers-reduced-motion:reduce){body[data-page="motion"] .motion-export-phase{transition:none}}


/* original motion-template-library-v1637.css */
/* Controlled palette thumbnails; no effect on other Lịch Việt pages. */
body[data-page="motion"] .motion-template-dynamic .motion-template-swatch{background:linear-gradient(140deg,var(--motion-thumb-bg),var(--motion-thumb-mid))!important;color:var(--motion-thumb-accent)!important}
body[data-page="motion"] .motion-template-dynamic .motion-template-swatch :is(b,i){color:var(--motion-thumb-accent)!important}
body[data-page="motion"] .motion-template-dynamic{min-width:0}
body[data-page="motion"] .motion-templates{grid-auto-flow:row;grid-template-columns:repeat(3,minmax(0,1fr))!important}
body[data-page="motion"] .motion-template-dynamic>span:last-child{min-width:0}
body[data-page="motion"] .motion-template-dynamic :is(strong,small){overflow-wrap:anywhere}
@media(max-width:410px){body[data-page="motion"] .motion-template-dynamic{padding:7px!important}body[data-page="motion"] .motion-template-dynamic strong{font-size:12px!important}body[data-page="motion"] .motion-template-dynamic small{font-size:11px!important}}


/* original motion-cloud-v1638.css */
/* Lịch Việt Cloud Library — optional disclosure, mobile-first single column <=680px. */
body[data-page="motion"] .motion-cloud{padding:14px 0;margin:6px 0 13px;border-block:1px solid var(--m-line);min-width:0}
body[data-page="motion"] .motion-cloud-top{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px}
body[data-page="motion"] .motion-cloud-top strong{font-size:15px;color:var(--m-ink)}
body[data-page="motion"] #motion-cloud-state{font-size:12px;color:var(--m-muted);background:rgba(18,134,103,.09);border-radius:99px;padding:5px 9px}
body[data-page="motion"] .motion-cloud-help,body[data-page="motion"] .motion-cloud-note{font-size:13px;line-height:1.55;color:var(--m-muted);margin:9px 0}
body[data-page="motion"] .motion-cloud-note[data-error="true"]{color:#b35044}
body[data-page="motion"] .motion-cloud-note a{color:var(--m-ink);font-weight:750;text-decoration:underline}
body[data-page="motion"] .motion-cloud-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
body[data-page="motion"] .motion-cloud-actions button{font:inherit;min-height:46px!important;font-size:13px!important;font-weight:750;line-height:1.35;padding:10px 9px!important;min-width:0;border-radius:12px!important}
body[data-page="motion"] #motion-cloud-enable{grid-column:1/-1}
body[data-page="motion"] .motion-cloud-actions [hidden]{display:none!important}
body[data-page="motion"] .motion-cloud-details{margin-top:11px}
body[data-page="motion"] .motion-cloud-details summary{min-height:44px!important;display:flex!important;justify-content:space-between;align-items:center;gap:9px;padding:9px 0;font-size:13px;font-weight:750;color:var(--m-ink);cursor:pointer}
body[data-page="motion"] #motion-cloud-count{font-size:12px;color:var(--m-muted);font-weight:500}
body[data-page="motion"] .motion-cloud-list{display:grid;gap:8px}
body[data-page="motion"] .motion-cloud-list h3{font-size:14px;margin:10px 0 0}
body[data-page="motion"] .motion-cloud-list>p{font-size:13px;color:var(--m-muted)}
body[data-page="motion"] .motion-cloud-item{padding:10px 0;border-bottom:1px solid var(--m-line);display:grid;gap:9px}
body[data-page="motion"] .motion-cloud-item-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
body[data-page="motion"] .motion-cloud-item-head strong{font-size:13px;overflow-wrap:anywhere}
body[data-page="motion"] .motion-cloud-item-head span{font-size:12px;color:var(--m-muted);white-space:nowrap}
body[data-page="motion"] .motion-cloud-item-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
body[data-page="motion"] .motion-cloud-item-actions button{min-height:42px!important;font-size:12px!important;font-weight:700;padding:8px 3px!important;min-width:0}
body[data-page="motion"] .motion-cloud button:disabled{opacity:.55;cursor:not-allowed}
body[data-page="motion"] .motion-cloud :is(button,a,summary):focus-visible{outline:3px solid #128766;outline-offset:2px}
@media(max-width:355px){body[data-page="motion"] .motion-cloud-item-actions{grid-template-columns:repeat(2,minmax(0,1fr))}body[data-page="motion"] .motion-cloud-actions{grid-template-columns:1fr}}


/* original motion-expansion-v1639.css */
/* v16.39: swatches for new original SVG scenes; page stays single-column <=680px. */
body[data-page="motion"] .motion-templates{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
body[data-page="motion"] .motion-template-style-lotus .motion-template-swatch{background:linear-gradient(155deg,#44253b,#ae738c)}
body[data-page="motion"] .motion-template-style-tet .motion-template-swatch{background:linear-gradient(145deg,#681f24,#c56a38)}
body[data-page="motion"] .motion-template-style-moon .motion-template-swatch{background:linear-gradient(140deg,#141935,#53547f)}
body[data-page="motion"] .motion-template-style-editorial .motion-template-swatch{background:linear-gradient(145deg,#f6f1e5,#dfdec9);color:#184f4d}
body[data-page="motion"] .motion-template-style-editorial .motion-template-swatch b{color:#184f4d}
body[data-page="motion"] .motion-template-style-sunrise .motion-template-swatch{background:linear-gradient(150deg,#f8d2ad,#dc9783)}
body[data-page="motion"] .motion-template-style-sunrise .motion-template-swatch b{color:#693b43}
body[data-page="motion"] .motion-template-style-lotus .motion-template-swatch i,
body[data-page="motion"] .motion-template-style-moon .motion-template-swatch i,
body[data-page="motion"] .motion-template-style-tet .motion-template-swatch i,
body[data-page="motion"] .motion-template-style-sunrise .motion-template-swatch i,
body[data-page="motion"] .motion-template-style-editorial .motion-template-swatch i{font-size:21px;line-height:1;opacity:.85}
body[data-page="motion"] .motion-template-dynamic{min-width:0}
body[data-page="motion"] .motion-template-dynamic strong{font-size:13px;line-height:1.3}
body[data-page="motion"] .motion-template-dynamic small{font-size:12px;line-height:1.35}
@media(max-width:360px){body[data-page="motion"] .motion-templates{gap:7px}body[data-page="motion"] .motion-template-dynamic{padding:6px!important}}


/* original native-system-v121.css */
/* Lịch Việt Glass v12.1 — single Native UI system for core screens */
:root, html[data-theme="light"] {
  --n121-bg:#eaf3ed; --n121-surface:#fbfefb; --n121-ink:#153f35;
  --n121-muted:#547467; --n121-border:#cfdfd5; --n121-primary:#0e705b;
  --n121-soft:#e0eee5; --n121-accent:#96702f; --n121-shadow:0 12px 30px rgba(11,57,46,.075);
}
html[data-theme="dark"] {
  --n121-bg:#082f28; --n121-surface:#123f36; --n121-ink:#f6efdc;
  --n121-muted:#b8d0c3; --n121-border:#376b5b; --n121-primary:#e2c77f;
  --n121-soft:#1c5043; --n121-accent:#e2c77f; --n121-shadow:0 12px 30px rgba(0,0,0,.15);
}
body:not([class*="admin"]) { -webkit-tap-highlight-color:transparent; }
body :is(button,input,select,textarea) {font-family:'Bai Jamjuree',system-ui,sans-serif;}
body :is(button,a,input,select,textarea):focus-visible {outline:3px solid var(--n121-primary);outline-offset:3px;}
body :is(button, a) {touch-action:manipulation;}
[hidden] {display:none!important;}
/* Shared rhythm and surfaces */
:where(.us-shell,.mt-shell,.shell,.app-shell) {min-width:0;}
:where(.us-shell,.mt-shell,.shell,.app-shell) :is(h1,h2,h3,p) {overflow-wrap:break-word;}
:where(.us-shell,.mt-shell,.shell,.app-shell) :is(input,select,textarea) {max-width:100%;min-height:44px;}
:where(.us-shell,.mt-shell,.shell,.app-shell) :is(button,.primary-button,.secondary-button) {min-height:44px;}
.v121-screen-toolbar,.v121-finder-toolbar {display:flex;align-items:center;justify-content:space-between;gap:12px;margin:10px 0 14px;min-width:0;}
.v121-screen-toolbar span,.v121-finder-toolbar strong {color:var(--n121-ink);font-weight:700;font-size:15px;}
.v121-finder-toolbar div {display:grid;gap:3px;min-width:0;}
.v121-finder-toolbar span {color:var(--n121-muted);font-size:12px;line-height:1.5;}
.v121-screen-toolbar button,.v121-finder-toolbar button,.v121-dashboard-expand {border:1px solid var(--n121-border);border-radius:13px;padding:10px 14px;background:var(--n121-surface);color:var(--n121-ink);font-weight:650;white-space:nowrap;cursor:pointer;}
/* Preserve the 680px centered app frame and bottom bar on all five pages. */
body:has(.v121-screen-toolbar) .us-shell,
body:has(.v121-settings-menu) .shell,
body:has(.v121-dashboard-intro) .mt-shell {width:min(100%,680px);margin-inline:auto;}
.lvg-bottom-nav {width:min(100%,680px);left:50%;right:auto;transform:translateX(-50%);}
/* Search: one search-first surface; create event becomes a bounded app sheet when JS works. */
.us-hero.v121-screen-head {padding:16px 2px 12px;min-height:0;}
.us-hero.v121-screen-head h1 {font-family:'Bai Jamjuree',system-ui,sans-serif;font-style:normal;font-size:clamp(24px,5vw,32px);line-height:1.2;letter-spacing:-.035em;margin:7px 0;}
.us-hero.v121-screen-head>p:not(.us-kicker) {margin:0 0 10px;color:var(--n121-muted);font-size:14px;}
.us-hero.v121-screen-head .us-quick-links {display:flex;gap:9px;flex-wrap:wrap;}
.us-shell #us-workspace,.us-shell #tim-kiem,.us-shell #tao-su-kien {min-width:0;}
.us-shell .us-panel {height:auto;min-height:0;padding:clamp(16px,3vw,22px);border-radius:18px;box-shadow:var(--n121-shadow);}
.us-shell .us-search-bar {display:flex;gap:8px;min-width:0;}
.us-shell .us-search-bar input {min-width:0;flex:1;}
.us-shell .us-search-bar button {white-space:nowrap;}
.v121-create-panel {position:relative;}
.v121-sheet-close {position:absolute;right:14px;top:14px;border:1px solid var(--n121-border);border-radius:12px;background:var(--n121-soft);color:var(--n121-ink);font-size:23px;line-height:1;width:44px;height:44px;display:none;cursor:pointer;}
.v121-sheet-handle {width:38px;height:5px;border-radius:30px;background:var(--n121-border);margin:2px auto 14px;display:none;}
body.v121-search-ready #tao-su-kien:not(.v121-create-open) {display:none;}
body.v121-search-ready #tao-su-kien.v121-create-open {display:block;position:fixed;inset:auto 0 var(--lv-keyboard-bottom,0px);margin-inline:auto;box-sizing:border-box;width:var(--lv-page-width,min(100%,680px));max-height:calc(var(--lv-keyboard-height,100dvh) - env(safe-area-inset-top,0px) - 14px);overflow-y:auto;overscroll-behavior:contain;z-index:1300;border-radius:22px 22px 0 0;padding:26px 18px calc(28px + env(safe-area-inset-bottom,0px));background:var(--n121-surface);color:var(--n121-ink);}
body.v121-search-ready #tao-su-kien .v121-sheet-close,body.v121-search-ready #tao-su-kien .v121-sheet-handle {display:block;}
body.v121-modal-open {overflow:hidden;}
html:has(body.v121-modal-open) {overflow:hidden;}
.v121-overlay {position:fixed;inset:0;background:rgba(0,22,17,.56);z-index:1290;}
/* Profile: signed-in landing is a settings list, not four forms in a continuous page. */
.v121-settings-menu {display:grid;gap:4px;margin:18px 0 16px;padding:7px;border:1px solid var(--n121-border);border-radius:16px;background:var(--n121-surface);}
.v121-settings-menu :is(a,button) {width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 12px;background:none;border:0;border-bottom:1px solid var(--n121-border);color:var(--n121-ink);font-size:14px;font-weight:650;text-align:left;text-decoration:none;cursor:pointer;}
.v121-settings-menu :is(a,button):last-child {border-bottom:0;}
.v121-settings-menu span {font-size:22px;color:var(--n121-muted);}
.v121-settings-back {padding:10px 12px;border:1px solid var(--n121-border);border-radius:11px;background:var(--n121-soft);color:var(--n121-ink);margin-bottom:12px;cursor:pointer;}
body.v121-account-ready #signed [data-v121-settings-panel],
body.v121-account-ready #push-panel[data-v121-settings-panel],
body.v121-account-ready #delete-panel[data-v121-settings-panel] {display:none!important;}
body.v121-account-ready #signed [data-v121-settings-panel].v121-settings-active:not(.hidden),
body.v121-account-ready #push-panel.v121-settings-active:not(.hidden),
body.v121-account-ready #delete-panel.v121-settings-active:not(.hidden) {display:block!important;}
body.v121-account-ready #signed>div:first-child>p:has(>a.text-link) {display:none;}
body.v121-account-ready #signed {grid-template-columns:minmax(0,1fr);}
body.v121-account-ready #signed>div:first-child {grid-column:1;}
body.v121-account-ready .intro {min-height:0;padding-block:12px;}
body.v121-account-ready .intro h1 {font-size:clamp(24px,6vw,34px);line-height:1.2;}
/* Good day: toolbar and collapsible reasons. On JS enhancement use bottom sheet filters. */
.finder-main,.finder-layout,.finder-results,.finder-card {min-width:0;}
.finder-layout {display:grid!important;grid-template-columns:minmax(0,1fr)!important;align-items:start!important;}
.finder-results {display:grid;gap:12px;}
.finder-hero {padding:clamp(16px,3vw,24px)!important;}
.finder-hero h1 {font-size:clamp(23px,5vw,31px);line-height:1.2;}
.finder-card {padding:clamp(14px,2.6vw,20px);height:auto!important;min-height:0;}
.finder-card-top {display:flex;flex-wrap:wrap;gap:10px;align-items:start;}
.finder-card .finder-card-facts {margin:10px 0;}
.v121-finder-reasons {margin:9px 0;border:1px solid var(--n121-border);border-radius:12px;padding:0 12px;background:var(--n121-soft);}
.v121-finder-reasons summary {display:flex;align-items:center;justify-content:space-between;list-style:none;cursor:pointer;min-height:46px;color:var(--n121-ink);font-size:13px;font-weight:650;}
.v121-finder-reasons summary::-webkit-details-marker {display:none;}
.v121-finder-reasons[open] summary svg {transform:rotate(180deg);}
.v121-finder-reasons .finder-reason-list {margin:0 0 11px;}
.v121-filter-heading {display:none;justify-content:space-between;align-items:center;}
.v121-filter-heading button {width:44px;height:44px;font-size:24px;border:1px solid var(--n121-border);background:var(--n121-soft);border-radius:12px;color:var(--n121-ink);}
body.v121-finder-ready .finder-filter:not(.v121-filter-open) {display:none!important;}
body.v121-finder-ready .finder-filter.v121-filter-open {display:block!important;position:fixed!important;z-index:1300;left:50%;bottom:var(--lv-keyboard-bottom,0px);transform:translateX(-50%);box-sizing:border-box;width:var(--lv-page-width,min(100%,680px));max-height:calc(var(--lv-keyboard-height,100dvh) - 16px - env(safe-area-inset-top,0px));overflow-y:auto;overscroll-behavior:contain;border-radius:22px 22px 0 0;background:var(--n121-surface);color:var(--n121-ink);padding:15px 18px calc(22px + env(safe-area-inset-bottom,0px));}
body.v121-finder-ready .v121-filter-heading {display:flex;}
/* Dashboard: hide redundant empty panels only after real API has delivered a view. */
.v121-dashboard-intro {display:grid;gap:4px;margin:10px 0 14px;}
.v121-dashboard-intro strong {font-size:18px;color:var(--n121-ink);}
.v121-dashboard-intro span {font-size:13px;color:var(--n121-muted);}
.v121-dashboard-empty {padding:20px;border:1px solid var(--n121-border);border-radius:18px;background:var(--n121-surface);margin:12px 0;display:grid;gap:8px;}
.v121-dashboard-empty strong {color:var(--n121-ink);font-size:17px;}
.v121-dashboard-empty p {margin:0;color:var(--n121-muted);font-size:13px;}
.v121-dashboard-empty a {display:inline-flex;justify-content:center;align-items:center;min-height:44px;border-radius:12px;padding:9px 14px;text-decoration:none;background:var(--n121-primary);color:var(--n121-bg);font-weight:700;max-width:max-content;}
.v121-dashboard-expand {width:100%;margin:8px 0 12px;}
.mt-grid {grid-template-columns:minmax(0,1fr)!important;align-items:start!important;}
.mt-grid>.mt-panel {grid-column:auto!important;height:auto!important;min-height:0!important;}
body.v121-dashboard-ready .mt-panel.v121-empty-panel {display:none;}
body.v121-dashboard-ready.v121-show-all .mt-panel.v121-empty-panel {display:block;}
body.v121-dashboard-ready .mt-stats {display:none;}
.mt-smart .mt-week-grid {grid-template-columns:minmax(0,1fr);}
.mt-smart .mt-countdowns {grid-template-columns:repeat(auto-fit,minmax(min(100%,145px),1fr));}
/* Studio: one view at a time, preserve original canvas and every control for existing scripts. */
.studio-layout[data-v121-studio] {display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:14px;max-width:680px;margin-inline:auto;}
.v121-studio-tabs {display:grid;grid-template-columns:1fr 1fr;gap:5px;padding:5px;background:var(--n121-soft);border:1px solid var(--n121-border);border-radius:15px;}
.v121-studio-tabs button {border:0;background:transparent;color:var(--n121-muted);font:650 14px 'Bai Jamjuree',sans-serif;border-radius:11px;min-height:46px;display:flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;}
.v121-studio-tabs button[aria-pressed="true"] {background:var(--n121-surface);color:var(--n121-ink);box-shadow:var(--n121-shadow);}
.studio-layout.v121-studio-ready[data-v121-mode="edit"]>.preview-area,
.studio-layout.v121-studio-ready[data-v121-mode="preview"]>.studio-tools {display:none;}
.studio-layout .studio-tools,.studio-layout .preview-area {min-width:0;max-width:100%;}
.studio-layout .preview-frame {max-width:100%;overflow:hidden;}
.studio-layout .preview-frame canvas {display:block;max-width:100%;height:auto;margin-inline:auto;}
.studio-layout .studio-actions {position:sticky;bottom:calc(74px + env(safe-area-inset-bottom,0px));z-index:4;padding:10px;background:var(--n121-surface);border:1px solid var(--n121-border);border-radius:14px;}
.v121-studio-advanced {border:1px solid var(--n121-border);border-radius:15px;margin:15px 0;background:var(--n121-soft);padding:0 13px;}
.v121-studio-advanced>summary {padding:14px 4px;cursor:pointer;color:var(--n121-ink);font-weight:700;font-size:14px;}
.v121-studio-advanced[open] .v121-advanced-body {padding-bottom:16px;}
/* Give the same reading rhythm to light and dark throughout the five screens. */
:where(.us-shell,.mt-shell,.shell,.finder-main,.studio-layout) :is(h1,h2,h3,strong,label) {font-family:'Bai Jamjuree',system-ui,sans-serif;}
html[data-theme="dark"] :is(.us-shell .us-panel,.shell .panel,.mt-panel,.mt-smart,.finder-card,.finder-filter,.finder-summary,.studio-layout .studio-tools,.studio-layout .preview-area) {background:var(--n121-surface);border-color:var(--n121-border);color:var(--n121-ink);}
html[data-theme="dark"] :is(.us-shell,.shell,.mt-shell) :is(p,.muted,.us-hint,.mt-footnote) {color:var(--n121-muted);}
html[data-theme="dark"] .v121-screen-toolbar :is(strong,span),html[data-theme="dark"] .v121-finder-toolbar :is(strong,span) {color:var(--n121-ink);}
@media(max-width:560px) {
 .v121-finder-toolbar {align-items:flex-end;}
 .v121-finder-toolbar span {font-size:11px;}
 .finder-card .finder-card-foot {display:flex;flex-wrap:wrap;gap:8px;}
 .v121-screen-toolbar button {font-size:12px;padding:9px;}
 .us-shell .us-search-bar button {padding-inline:12px;font-size:12px;}
 .mt-smart .mt-countdowns {grid-template-columns:minmax(0,1fr)!important;}
}
@media(prefers-reduced-motion:reduce) {.v121-create-panel,.finder-filter {scroll-behavior:auto;transition:none!important;}}
.v121-preview-actions {display:flex;gap:9px;justify-content:space-between;margin-bottom:13px;}
.v121-preview-actions button {min-height:44px;padding:10px 14px;border-radius:12px;border:1px solid var(--n121-border);background:var(--n121-surface);color:var(--n121-ink);font:650 13px 'Bai Jamjuree',sans-serif;display:flex;align-items:center;gap:7px;cursor:pointer;}
.v121-preview-actions button:last-child {background:var(--n121-primary);color:var(--n121-bg);}
body.v121-dashboard-ready.v121-no-upcoming .mt-smart {display:none;}

body.v121-account-ready #signed [data-v121-settings="legacy"][hidden] {display:none!important;}

/* Finder compare list lives behind an explicit, discoverable disclosure. */
.v121-shortlist {border:1px solid var(--n121-border);border-radius:16px;background:var(--n121-surface);box-shadow:var(--n121-shadow);overflow:hidden;}
.v121-shortlist>summary {cursor:pointer;list-style:none;display:flex;align-items:center;justify-content:space-between;min-height:58px;padding:15px 17px;font-size:14px;font-weight:700;color:var(--n121-ink);}
.v121-shortlist>summary::-webkit-details-marker {display:none;}
.v121-shortlist>summary span {font-size:23px;color:var(--n121-muted);transform:rotate(90deg);transition:transform .15s;}
.v121-shortlist[open]>summary span {transform:rotate(-90deg);}
.v121-shortlist .finder-shortlist {margin:0!important;border:0!important;box-shadow:none!important;border-radius:0!important;}
.finder-hero .finder-feature-tags {margin-top:10px;gap:6px;}
.finder-hero p {font-size:13px;line-height:1.65;}
/* Native-sized daily hero and a compact day card. */
.mt-hero {grid-template-columns:minmax(0,1fr)!important;gap:12px!important;padding:clamp(15px,3vw,22px)!important;min-height:0!important;}
.mt-hero h1 {font-family:'Bai Jamjuree',system-ui,sans-serif;font-size:clamp(26px,5.5vw,35px)!important;line-height:1.14!important;letter-spacing:-.03em!important;margin:4px 0!important;}
.mt-hero h1 br {display:none;}
.mt-hero h1 em {font-family:'Bai Jamjuree',system-ui,sans-serif;font-style:normal;}
.mt-hero-copy>p:not(.mt-kicker) {font-size:13px!important;line-height:1.55;max-width:460px;margin:5px 0 9px;}
.mt-hero .mt-kicker {font-size:10px;}
.mt-hero .mt-date-label {font-size:12px;}
.mt-daycard {display:grid!important;grid-template-columns:90px minmax(0,1fr)!important;gap:4px 12px!important;align-items:center!important;padding:14px!important;min-height:0!important;}
.mt-daycard strong {grid-column:1;grid-row:1/4;font-size:44px!important;line-height:1!important;}
.mt-daycard small:first-child {grid-column:2;grid-row:1;}
.mt-daycard>span {grid-column:2;grid-row:2;}
.mt-daycard hr,
.mt-daycard small:not(:first-child),.mt-daycard b,.mt-daycard a {grid-column:1/-1;grid-row:auto;}
.mt-actions {grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;}
.mt-actions a {display:flex;align-items:center;justify-content:center;gap:7px;min-height:46px;}
.mt-actions a svg {flex:none;}
@media(max-width:420px) {.finder-hero .finder-feature-tags {display:none;}.mt-daycard {grid-template-columns:78px minmax(0,1fr)!important;}}

