/* 修改這裡的顏色即可調整整體風格。 */
:root{--pink:#ed438a;--page:#fff6fa;--ink:#35212c}
*{box-sizing:border-box}body{margin:0;background:var(--page);color:var(--ink);font-family:Arial,"Microsoft JhengHei",sans-serif;font-size:14px}button,input{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible{outline:3px solid #a77bff;outline-offset:2px}
.window{width:392px;max-width:100%;height:calc(100dvh - 76px);min-height:400px;margin:38px auto;border:1px solid #d6d6d8;background:#f7f7f9;box-shadow:0 12px 55px #2222220c;overflow:auto;scrollbar-width:none}.window::-webkit-scrollbar{display:none}header{height:46px;background:white;display:flex;align-items:center;justify-content:center;position:sticky;top:0;z-index:2}h1{font-size:17px;font-weight:500;margin:0}header button{position:absolute;left:13px;top:5px;border:0;background:none;color:var(--pink);font-size:29px;width:28px;height:36px;line-height:1}.content{padding:10px 12px}.banner{display:flex;align-items:center;gap:8px;width:100%;height:44px;padding:0 14px;border:1px solid #ffb9d7;border-radius:12px;background:#f6e4ed;color:var(--pink);margin-bottom:10px;white-space:nowrap}.banner strong{font-size:13px}.grid-icon{font-size:18px}.hint{color:#91949f;font-size:12px}.arrow{margin-left:auto;color:#9298a3;font-size:25px}
.card{background:white;border-radius:13px;overflow:hidden;margin-bottom:10px;box-shadow:0 5px 12px #18233b06}.labels,.media{display:grid;grid-template-columns:1fr 1fr}.labels span{text-align:center;height:29px;display:grid;place-items:center;font-size:12px}.labels span+span{color:var(--pink);font-weight:600;background:linear-gradient(110deg,#fff3e4,#e9e3ff)}.media{position:relative}.picture{aspect-ratio:2/3;overflow:hidden;position:relative;background:#eee}.picture img{width:100%;height:100%;object-fit:cover;display:block}.picture+.picture{border-left:1px solid #ffffff77}.pause{position:absolute;right:8px;bottom:8px;color:white;background:#302b2b99;border:0;width:32px;height:32px;border-radius:50%;font-size:14px}.footer{height:46px;display:flex;align-items:center;padding:0 12px;gap:10px}.title{margin-right:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}.heart{border:0;background:none;color:#939caa;font-size:23px;padding:3px;line-height:1}.heart[aria-pressed=true]{color:var(--pink)}.gradient{border:0;color:white;font-weight:bold;background:linear-gradient(105deg,#ffbf58,#ff58a7 48%,#7040ff);border-radius:20px;padding:5px 14px;font-size:12px;box-shadow:0 2px 9px #ff7a9c55;white-space:nowrap}.end{text-align:center;font-size:12px;color:#a0a0ac;padding:14px}.picture img{transition:filter .3s}.card.is-paused img{filter:saturate(.5)}
dialog{border:0;border-radius:18px;width:min(360px,calc(100% - 32px));padding:24px;box-shadow:0 24px 80px #2223}dialog::backdrop{background:#21202b66}h2{font-size:18px;margin-top:0}.note{font-size:12px;color:#888;line-height:1.7}label{display:block;margin-top:16px;font-size:13px}input{display:block;width:100%;margin-top:7px;border:1px solid #ddd;border-radius:8px;padding:9px;font-size:12px}.actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}.actions button{border:0;border-radius:20px;padding:9px 18px}#toast{position:fixed;left:50%;bottom:26px;transform:translateX(-50%);background:#252332e8;color:white;padding:10px 20px;border-radius:30px;font-size:13px;opacity:0;pointer-events:none;transition:opacity .2s;white-space:nowrap}#toast.show{opacity:1}
.brand{display:flex;align-items:center;gap:7px;color:#dc367d;font-weight:700;letter-spacing:2px}.brand img{width:28px;height:28px}.window{border-color:#f0dce5;background:#fff7fa}.banner{background:#ffedf5;border-color:#ffc4dd}.gradient{background:linear-gradient(105deg,#ff9ac2,#f457a1 52%,#da54a3)}.labels span+span{background:linear-gradient(110deg,#fff1f5,#fbe3f0)}
@media(max-width:440px){.window{margin:0 auto;width:100%;height:100dvh;border:0;min-height:0;box-shadow:none}}
.footer{height:66px;gap:8px}.title{min-width:0;white-space:normal}.en-title,.zh-title{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.en-title{font-size:12px;font-weight:600}.zh-title{font-size:11px;color:#9b7b8b;margin-top:4px}.edit span{display:block;font-size:10px;margin-top:3px;font-weight:400}.hint{font-size:10px;white-space:normal;text-align:left}.brand{letter-spacing:.3px}#editor{padding:30px 24px;background:linear-gradient(160deg,#fff,#fff0f7);max-height:90dvh;overflow:auto}.close{position:absolute;right:12px;top:9px;background:none;border:0;color:#a97d92;font-size:25px;width:32px;height:32px}.download-page{text-align:center}.app-icon{width:72px;height:72px;display:block;margin:8px auto 20px;border-radius:24px}.eyebrow{font-size:10px;letter-spacing:2px;color:#dc558e;font-weight:700}.download-page h2{font-size:29px;line-height:1.2;margin:17px 0}.download-page p{line-height:1.6}#chosen-template{font-size:12px;color:#a5798e}#download-description{font-size:17px;color:#654453;margin:22px 0 5px}.chinese{font-size:12px;color:#a2748b;margin-top:0}.free-badge{display:inline-block;background:#ffe3f0;border-radius:20px;padding:7px 14px;font-size:11px;color:#ce4380;margin:16px 0 22px}.download-button{display:block;width:100%;padding:13px;font-size:16px}.download-button span{display:block;font-size:11px;font-weight:400;margin-top:5px}.demo-note{font-size:10px;color:#aa92a0;margin-top:17px}#toast{max-width:calc(100vw - 24px);white-space:normal;text-align:center}
.manage{display:flex;justify-content:space-between;gap:6px;margin:0 0 10px}.manage button{border:1px solid #f5c3d9;background:white;color:#bc477e;border-radius:7px;font-size:10px;padding:8px}.video-frame{position:relative;width:100%;aspect-ratio:1/1;background:transparent}.video-frame video{display:block;width:100%;height:100%;object-fit:cover;background:transparent}.empty-video{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:20px;color:white;pointer-events:none}.video-error{position:absolute;top:14px;left:10px;right:10px;font-size:11px;padding:9px;background:#fff0f5ed;color:#9e3665;border-radius:7px}#importer{max-height:90dvh;overflow:auto;width:min(460px,calc(100% - 24px));padding:26px}textarea,select{font:inherit;width:100%;border:1px solid #efccdc;border-radius:8px;padding:10px;margin-top:8px}textarea{resize:vertical;font-size:12px;line-height:1.7}#line-count{font-size:12px;color:#b75785}#import-error{color:#b32557;font-size:12px}.import-submit{width:100%;padding:12px}#importer code{font-size:10px;overflow-wrap:anywhere}#importer label{font-size:12px}
header #language{position:absolute;right:10px;top:10px;width:76px;margin:0;padding:5px 3px;font-size:11px;color:#b73e76;background:#fff6fa;border:1px solid #f3ccdd}.en-title{font-size:13px}.download-page h2{font-size:27px}.download-page .chinese[hidden]{display:none}
#title-editor{width:min(480px,calc(100% - 24px));max-height:90dvh;overflow:auto;padding:26px}#titles-total{font-size:12px;color:#ac517d}#titles-error{font-size:12px;color:#b32557}.manage{flex-wrap:wrap}#title-editor .actions{flex-wrap:wrap}
.brand img{object-fit:contain;border-radius:7px}.app-icon{object-fit:contain;background:#ff4c9c}
#download-language{display:block;width:142px;margin:0 auto 18px;padding:7px 9px;font-size:12px;background:#fff8fb;color:#ad4275;border-color:#f2cede}.download-page h2,.download-button{overflow-wrap:anywhere}.download-page h2{font-size:25px}.download-button{white-space:normal;line-height:1.4}
.video-frame{overflow:hidden}.video-frame video{background:#f4d5e4}.frame-loading-cover{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;pointer-events:none}.video-frame .empty-video{z-index:1}.video-frame .video-error{z-index:2}


/* More visible primary action on each template card. */
.footer .edit{min-width:108px;min-height:44px;padding:9px 16px;border-radius:24px;font-size:14px;font-weight:700;letter-spacing:.1px;box-shadow:0 5px 15px #dc438a66;transition:transform .16s ease,box-shadow .16s ease,filter .16s ease}
.footer .edit:hover{transform:translateY(-1px);filter:saturate(1.12);box-shadow:0 7px 19px #dc438a88}
.footer .edit:active{transform:translateY(0)}
@media(max-width:360px){.footer .edit{min-width:96px;padding:8px 12px;font-size:13px}}
@media(prefers-reduced-motion:reduce){.footer .edit{transition:none}}

/* The management tools remain available in the editor but stay hidden on the public page. */
.manage[hidden]{display:none!important}

/* Paired bottom actions styled to match the site's rose and lilac palette. */
.bottom-dock{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:10px 12px calc(10px + env(safe-area-inset-bottom));background:#fffafd;border-top:1px solid #f4dbe6}
.bottom-dock .dock-action{display:flex;align-items:center;justify-content:center;gap:9px;min-width:0;min-height:62px;padding:8px 9px;border:1px solid #ffffffa6;border-radius:15px;color:#642e49;text-align:left;box-shadow:0 4px 12px #7c38541a;transition:transform .16s ease,box-shadow .16s ease}
.bottom-dock .dock-download{background:linear-gradient(125deg,#ffc5dc,#f28ab4)}
.bottom-dock .dock-share{background:linear-gradient(125deg,#e4d8ff,#c0aaf4);color:#47346d}
.bottom-dock .dock-action:active{transform:scale(.98);box-shadow:0 2px 7px #7c385422}
.bottom-dock .dock-icon{flex:0 0 25px;width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.bottom-dock .dock-copy{min-width:0;flex:0 1 auto;display:flex;flex-direction:column;gap:3px;white-space:nowrap}
.bottom-dock .dock-copy span{overflow:hidden;text-overflow:ellipsis;color:inherit;font-size:10px;opacity:.8}
.bottom-dock .dock-copy strong{overflow:hidden;text-overflow:ellipsis;color:inherit;font-size:13px;line-height:1.2}
@media(max-width:360px){.bottom-dock{gap:7px;padding-left:8px;padding-right:8px}.bottom-dock .dock-action{gap:6px;padding:7px 6px}.bottom-dock .dock-icon{flex-basis:22px;width:22px;height:22px}.bottom-dock .dock-copy strong{font-size:12px}}

/* Compact dock that uses the full row evenly. */
.bottom-dock{display:flex;align-items:stretch;gap:9px;padding:8px 12px calc(8px + env(safe-area-inset-bottom))}
.bottom-dock .dock-action{flex:1 1 0;width:0;height:54px;min-height:54px;padding:6px 10px}
@media(max-width:360px){.bottom-dock{gap:7px;padding-left:8px;padding-right:8px}.bottom-dock .dock-action{height:50px;min-height:50px;padding:6px 7px}}

*{-webkit-tap-highlight-color:transparent}
button{touch-action:manipulation}
@media(max-width:440px){
  .window>header{height:calc(46px + env(safe-area-inset-top));flex-basis:calc(46px + env(safe-area-inset-top));padding-top:env(safe-area-inset-top)}
  header button#back{top:calc(5px + env(safe-area-inset-top))}
  header #language{top:calc(10px + env(safe-area-inset-top))}
}

/* Labels for the two halves already shown inside each split preview video. */
.compare-labels{display:grid;grid-template-columns:1fr 1fr;height:28px;background:#fff;text-align:center}
.compare-labels span{display:grid;place-items:center;font-size:12px;font-weight:600;color:#795267}
.compare-labels span+span{color:#d94c8a;background:linear-gradient(110deg,#fff2f5,#eee7ff)}

/* Refreshed creation and sharing controls. */
.window{display:flex;flex-direction:column;overflow:hidden}
.window>header{flex:0 0 46px}
.window>.content{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding-bottom:14px}
.window>.content{-webkit-overflow-scrolling:touch}
.window>.content::-webkit-scrollbar{display:none}
.top-actions{display:flex;align-items:stretch;gap:9px;margin-bottom:12px}
.top-actions .banner{flex:1;height:56px;margin:0;padding:0 14px;border:0;border-radius:14px;background:linear-gradient(105deg,#fb65a4,#d94391);color:#fff;box-shadow:0 6px 16px #dc438a44}
.top-actions .banner strong{font-size:15px}
.top-actions .banner .hint{color:#fff;font-size:11px;font-weight:500}
.top-actions .banner .arrow{color:#fff}
.top-actions .share-button{min-width:74px;border:1px solid #f1c8da;border-radius:14px;background:#fff;color:#b83d75;font-weight:700}
.top-actions .share-button:active,.top-actions .banner:active{transform:scale(.98)}
.bottom-dock{flex:0 0 auto;display:flex;align-items:center;gap:12px;padding:10px 14px calc(10px + env(safe-area-inset-bottom));border-top:1px solid #f4dbe6;background:#fffdfd;box-shadow:0 -5px 18px #7c38540c;z-index:3;backdrop-filter:saturate(1.2) blur(12px);-webkit-backdrop-filter:saturate(1.2) blur(12px)}
.dock-copy{min-width:0;flex:1;display:flex;flex-direction:column;gap:3px}
.dock-copy strong{font-size:13px;color:#8e315e}
.dock-copy span{font-size:11px;color:#967d89}
.bottom-dock .gradient{min-height:42px;min-width:100px;padding:10px 16px;font-size:14px;border-radius:22px}
#toast{bottom:calc(78px + env(safe-area-inset-bottom));z-index:5}
@media(max-width:360px){.top-actions .banner{gap:5px;padding:0 10px}.top-actions .banner .hint{font-size:10px}.top-actions .share-button{min-width:62px}.bottom-dock{gap:8px;padding-left:10px;padding-right:10px}.bottom-dock .gradient{min-width:88px;padding-left:11px;padding-right:11px}}
