:root{color-scheme:light;--ink:#1d2e2b;--muted:#71817d;--line:#e7ecea;--green:#087f69;--green-dark:#006b58;--soft:#eff7f4;font-family:Inter,"Segoe UI","Microsoft YaHei",system-ui,sans-serif;font-size:14px;font-synthesis:none}*{box-sizing:border-box}body{margin:0;background:#f4f6f5;color:var(--ink)}button,input,select,textarea{font:inherit}button,a,input,textarea,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:default;opacity:.35}a{color:inherit;text-decoration:none}svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.symbols{position:absolute;width:0;height:0;overflow:hidden}[hidden]{display:none!important}.header{height:82px;padding:0 32px;display:flex;align-items:center;justify-content:space-between;background:white;border-bottom:1px solid var(--line);gap:20px}.brand{display:flex;align-items:center;gap:12px;white-space:nowrap}.brand-mark{display:grid;place-items:center;width:39px;height:39px;background:var(--green);border-radius:11px;color:white}.brand-mark svg{width:22px;height:22px}.brand strong{font-size:23px;letter-spacing:2px}.brand-separator{height:21px;width:1px;background:#d9e1de;margin:0 3px 0 8px}.brand-description{font-size:15px;color:#60706b}.header-actions{display:flex;align-items:center;gap:25px}.privacy{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:13px}.privacy svg{width:16px}.button{border:1px solid #dce4e0;border-radius:8px;background:#fff;color:var(--ink);padding:10px 16px;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;font-weight:550;transition:background .15s,border-color .15s}.button:hover{background:#f0f6f3;border-color:#b5cbc1}.button.primary{color:#fff;background:var(--green);border-color:var(--green)}.button.primary:hover{background:var(--green-dark)}.primary svg{width:17px}.workspace{display:grid;grid-template-columns:minmax(0,1fr) 344px;min-height:calc(100dvh - 82px)}.studio{min-width:0;padding:26px 28px 0;display:flex;flex-direction:column}.studio-toolbar{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:19px}.file-title{display:flex;align-items:center;gap:9px;min-width:0;color:#52615c}.file-title>svg{color:#80908a;width:18px}.file-title>span:first-of-type{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:35vw}.badge{font-size:12px;color:#637970;background:#e4ece7;padding:3px 8px;border-radius:4px}.upload-button{font-size:14px;padding:9px 13px;min-height:38px;white-space:nowrap}.upload-button svg{width:16px}.canvas-area{position:relative;min-height:470px;flex:1;display:flex;flex-direction:column;border-radius:12px;background:#182322;overflow:hidden;color:#acbab5;border:1px solid #1c302b;box-shadow:0 5px 18px #1231260a;background-image:radial-gradient(#ffffff08 1px,transparent 1px);background-size:16px 16px}.canvas-heading{display:flex;justify-content:space-between;align-items:center;padding:20px 22px;font-size:12px;letter-spacing:.5px}.canvas-heading>span:first-child{color:#d1dcd7}.canvas-fit{min-height:0;flex:1;display:flex;align-items:center;justify-content:center;padding:12px 34px}.canvas-wrap{max-width:100%;position:relative;box-shadow:0 12px 45px #0004;line-height:0}canvas{display:block;width:100%;height:auto;touch-action:none;outline:none;cursor:move}canvas:focus-visible{outline:2px solid #55d8b7;outline-offset:4px}.drag-hint{display:flex;align-items:center;justify-content:center;gap:8px;min-height:68px;color:#9fafa9;font-size:13px}.drag-hint svg{width:15px;height:15px}.bottom-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:16px 0}.history-buttons{display:flex;align-items:center;gap:10px}.icon-button{display:grid;place-items:center;width:34px;height:34px;border:1px solid #dfe6e2;border-radius:6px;background:white;color:#566b60}.icon-button svg{width:17px;height:17px}.flipped{transform:scaleX(-1)}.divider{height:18px;width:1px;background:#d9e1dd;margin:0 5px}.text-button{background:none;border:0;padding:7px 4px;color:#537167;font-size:13px;border-radius:4px;min-height:32px}.text-button:hover{color:var(--green);background:#e6efea}.text-button[aria-pressed=true]{color:var(--green);background:#d9ebe3}.export-format{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:13px}.export-format select{width:122px;height:34px;padding:4px 6px;background:transparent;font-size:13px}.studio-footer{font-size:12px;color:#8a9891;border-top:1px solid #e2e8e4;padding:17px 0 20px;display:flex;justify-content:space-between;gap:12px}.studio-footer span:first-child{display:flex;gap:6px;align-items:center}.studio-footer svg{width:14px;height:14px}.inspector{background:#fff;border-left:1px solid var(--line);min-width:0}.inspector-heading{padding:28px 25px 20px}.inspector-heading h1{font-size:19px;line-height:1.5;letter-spacing:.3px;margin:0 0 7px;font-weight:650}.inspector-heading p{color:var(--muted);font-size:13px;margin:0}.tabs{display:flex;padding:0 25px;border-bottom:1px solid var(--line);gap:27px}.tabs button{flex:1;background:none;border:0;color:#85938d;font-weight:550;padding:12px 0;border-bottom:2px solid transparent}.tabs .active{color:var(--green);border-bottom-color:var(--green)}.inspector-content{padding:0 25px 22px}.form-section{padding:23px 0 20px;border-bottom:1px solid var(--line)}h2{font-size:14px;font-weight:650;margin:0 0 17px;display:flex;align-items:center;gap:8px}h2 svg{width:17px;height:17px;color:#7d9589}label{display:block;font-size:13px;color:#63766c}input:not([type=checkbox]):not([type=color]):not([type=range]),textarea,select{display:block;width:100%;border:1px solid #e0e7e3;border-radius:6px;outline:none;background:#fafcfb;color:#2c4035;min-width:0;padding:10px 11px;font-size:14px;transition:border-color .15s,box-shadow .15s}label>input:not([type=checkbox]):not([type=color]):not([type=range]),label>textarea{margin-top:8px}input:focus,textarea:focus,select:focus{border-color:#54a18a!important;box-shadow:0 0 0 3px #087f6910}input::placeholder,textarea::placeholder{color:#a3b0a9}input[aria-invalid=true]{border-color:#c65750!important}textarea{resize:vertical;line-height:1.65}.field-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.form-section>label:not(:first-child){margin-top:15px}.error:empty{display:none}.error{color:#b7463d;font-size:12px;display:block;margin-top:5px}.current-time{display:block;margin:5px 0 -7px auto;color:var(--green)}.style-section{padding:20px 0 0}.style-section summary{display:flex;justify-content:space-between;align-items:center;cursor:pointer;font-size:14px;font-weight:600;list-style:none}.style-section summary:after{content:'−';color:#92a29a;margin-left:8px}.style-section:not([open]) summary:after{content:'+'}.style-section summary span{font-size:12px;color:#8b9b93;font-weight:400;margin-left:auto}.range-label{display:flex;justify-content:space-between;margin-top:20px!important}.range-label span{color:#84978c;font-variant-numeric:tabular-nums}input[type=range]{display:block;width:100%;height:5px;accent-color:var(--green);margin:17px 0 23px;cursor:pointer}.style-row{display:flex;align-items:center;justify-content:space-between;gap:6px}.color-label{display:flex;align-items:center;gap:10px}input[type=color]{padding:3px;width:30px;height:28px;border:1px solid #d7e2da;background:white;border-radius:5px;cursor:pointer}.switch-label{display:flex;align-items:center;gap:7px;cursor:pointer;font-size:13px}.switch-label input{position:absolute;opacity:0;width:1px;height:1px}.switch{display:block;width:29px;height:17px;border-radius:20px;background:#c2cdc6;position:relative;flex-shrink:0}.switch:before{content:'';position:absolute;width:13px;height:13px;border-radius:50%;background:white;top:2px;left:2px;transition:transform .15s}.switch-label input:checked+.switch{background:var(--green)}.switch-label input:checked+.switch:before{transform:translateX(12px)}.switch-label input:focus-visible+.switch{outline:2px solid var(--green);outline-offset:3px}.inspector-note{display:flex;gap:9px;margin-top:25px;background:#f4f8f5;padding:12px;border-radius:7px;color:#83968b;font-size:12px;line-height:1.7}.inspector-note svg{width:15px;height:15px;margin-top:3px}.inspector-note p{margin:0}.selection-panel{padding:12px;margin-top:20px;background:#f0f8f3;border-radius:6px}.selection-panel p{margin:0 0 10px;font-size:13px}.selection-panel .field-grid label{font-size:12px}.note{margin-top:20px;padding:13px;background:#f3f7f4;border-radius:7px;font-size:13px;line-height:1.75}.note strong{font-size:13px}.note p{margin:5px 0 0;color:#74877b}.helper{font-size:13px;color:#839488;line-height:1.8}.cover-switch{line-height:1.7}.cover-color{margin-top:10px}.full-width{width:100%}.toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);background:#1a332b;color:#fff;padding:13px 22px;border:1px solid #365549;border-radius:9px;z-index:10;box-shadow:0 10px 25px #0002;font-size:14px;max-width:90vw;text-align:center}.empty-state{margin:auto;padding:40px 15px;text-align:center;color:#a1b3a9}.empty-state>svg{width:44px;height:44px;margin-bottom:20px}.empty-state h2{font-size:20px;justify-content:center;color:#e4efe8}.empty-state p{font-size:13px}.empty-state .button{margin-top:16px}#drop-overlay{position:absolute;inset:10px;background:#153e30f2;color:white;display:grid;place-items:center;border:2px dashed #5ba991;border-radius:9px;z-index:3;font-size:20px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}dialog{border:1px solid #dbe7df;border-radius:16px;padding:32px;max-width:430px;width:calc(100% - 40px);box-shadow:0 20px 80px #0003;color:var(--ink)}dialog::backdrop{background:#0c1b1966;backdrop-filter:blur(4px)}dialog h2{font-size:21px;margin-top:20px}dialog p{font-size:14px;line-height:1.8;color:var(--muted);margin-bottom:24px}dialog .button{margin-bottom:12px}dialog .text-button{display:block;margin:auto}.dialog-icon{width:44px;height:44px;display:grid;place-items:center;background:#e8f5ed;border-radius:11px;color:var(--green)}button:focus-visible,a:focus-visible,summary:focus-visible{outline:2px solid #289b78;outline-offset:3px}
@media(min-width:1450px){.workspace{grid-template-columns:minmax(0,1fr) 370px}.studio{padding:30px 40px 0}.inspector-content{padding-left:30px;padding-right:30px}.canvas-fit{padding-left:50px;padding-right:50px}}@media(min-width:901px){.workspace{height:calc(100dvh - 82px);min-height:710px}.inspector{overflow-y:auto;scrollbar-width:thin;scrollbar-color:#d6e4db transparent}.canvas-area{min-height:380px}.studio{height:100%;overflow:hidden}}@media(max-width:1100px){.workspace{grid-template-columns:minmax(0,1fr) 310px}.studio{padding:22px 20px 0}.inspector-content,.inspector-heading{padding-left:20px;padding-right:20px}.tabs{padding-left:20px;padding-right:20px}.canvas-fit{padding:12px 20px}.privacy{display:none}.bottom-toolbar{flex-wrap:wrap}.studio-footer{font-size:12px}}@media(max-width:900px){.workspace{grid-template-columns:1fr}.header{height:70px;padding:0 20px}.studio{padding:20px 20px 0}.canvas-area{min-height:320px}.canvas-fit{padding:15px 25px}.canvas-wrap{width:100%}.canvas-heading{padding:15px 18px}.drag-hint{min-height:52px}.inspector{border-left:0;border-top:1px solid var(--line)}.inspector-heading{padding:22px 22px 13px}.inspector-content{padding:0 22px 25px}.tabs{padding:0 22px;gap:20px;max-width:380px}.form-section{padding-top:20px}.inspector-note{max-width:550px}.style-row{justify-content:flex-start;gap:35px}.brand-description{font-size:14px}}@media(max-width:520px){.header{padding:0 15px;gap:8px}.brand{gap:8px}.brand strong{font-size:21px}.brand-mark{width:34px;height:34px}.brand-description,.brand-separator{display:none}.header .button{padding:9px 12px;font-size:13px;min-height:38px}.studio{padding:17px 12px 0}.studio-toolbar{margin-bottom:13px}.file-title{gap:6px;font-size:13px}.file-title>span:first-of-type{max-width:40vw}.canvas-fit{padding:10px 10px}.canvas-area{min-height:240px}.canvas-heading{font-size:12px;padding:13px}.drag-hint{font-size:12px;min-height:46px}.bottom-toolbar{gap:9px;padding:12px 0}.history-buttons{gap:7px}.text-button{font-size:12px}.export-format{width:100%;justify-content:space-between}.studio-footer{font-size:12px;padding-top:13px;line-height:1.7}.studio-footer span:last-child{max-width:170px;text-align:right}.inspector-heading h1{font-size:18px}.inspector-heading p{font-size:13px}input,textarea{font-size:16px!important}.range-label{font-size:14px}.canvas-heading #dimensions{letter-spacing:0}}
/* Batch queue and independent logo layer */
.header-actions{gap:12px}.gallery{margin-bottom:16px;flex-shrink:0}.gallery-heading{display:flex;justify-content:space-between;gap:12px;font-size:12px;color:#819187;margin-bottom:8px}.gallery-heading span:first-child{font-weight:600;color:#466154}.gallery-list{display:flex;gap:9px;overflow-x:auto;padding:3px 2px 9px;scrollbar-width:thin;scrollbar-color:#c3d7cb transparent}.photo-card{position:relative;flex:0 0 112px}.photo-select{display:block;background:#fff;border:2px solid transparent;border-radius:8px;padding:5px;width:100%;text-align:left;color:#577065}.photo-select[aria-pressed=true]{border-color:var(--green);background:#edf7f1}.photo-select img{display:block;width:98px;height:64px;object-fit:cover;border-radius:4px;background:#dfe7e2}.photo-select span{display:block;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:6px}.photo-remove{position:absolute;right:8px;top:8px;background:#18392adc;color:white;border:0;border-radius:50%;width:22px;height:22px;line-height:18px;padding:0;font-size:17px}.batch-controls{padding:17px 0 0}.batch-controls .button{background:#edf7f1;color:#087657;border-color:#cde5d8;font-size:14px}.batch-controls p{font-size:12px;color:#83978b;line-height:1.7;margin:8px 0 0}.logo-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:15px}.logo-heading h2{margin:0}.logo-heading img{object-fit:contain;max-width:100px;max-height:48px}.logo-section .helper{font-size:12px;margin-bottom:0}.logo-section input[type=range]{margin-bottom:14px}.logo-section .range-label{margin-top:15px!important}.import-issues{font-size:13px;color:#935e32;line-height:1.7;padding:0 0 14px;max-height:150px;overflow:auto}.import-issues summary{cursor:pointer}.import-issues ul{padding-left:20px}.job-status{position:fixed;z-index:20;left:50%;bottom:24px;transform:translateX(-50%);width:min(470px,calc(100vw - 28px));background:#fff;border:1px solid #c7dfd2;border-radius:12px;padding:17px 20px;box-shadow:0 8px 55px #17352433}.job-status>div{display:flex;justify-content:space-between;align-items:center;gap:12px}.job-status strong{font-size:14px;overflow-wrap:anywhere}.job-status progress{width:100%;height:8px;margin:12px 0 5px;accent-color:var(--green)}.job-status p{margin:0;font-size:12px;color:#83968b}.studio{overflow:auto}.canvas-area{flex-shrink:0}.canvas-fit{flex:1}.privacy{font-size:12px}@media(min-width:901px){.workspace{min-height:900px}.canvas-area{min-height:360px}.studio-footer{flex-shrink:0}}@media(max-width:900px){.gallery-list{max-width:100%}.header .privacy{display:none}}@media(max-width:520px){.header-actions{gap:7px}.header .button{padding:8px;font-size:12px}.header .button svg{display:none}.brand-mark{width:30px;height:30px}.brand strong{font-size:18px}.brand{gap:6px}.photo-card{flex-basis:95px}.photo-select img{width:81px;height:53px}.gallery{margin-bottom:10px}.studio-footer span:last-child{max-width:205px}.logo-heading img{width:85px}.batch-controls .button{font-size:14px}}
.logo-heading canvas{width:92px;height:auto;cursor:default;touch-action:auto}

/* Existing watermarks: preserve all fields except the chosen time/address. */
.smart-active .smart-protected{display:none!important}.smart-panel{margin-top:18px;padding:16px;border:1px solid #cce4d8;border-radius:10px;background:#f1f8f4}.smart-heading{display:flex;gap:9px;align-items:center;flex-wrap:wrap;color:#176b51;font-size:14px}.smart-heading span{font-size:11px;background:#e0f0e7;border-radius:20px;padding:4px 7px}.smart-panel p{font-size:12px;line-height:1.8;color:#6a8174;margin:10px 0}.smart-choice{display:flex;align-items:center;gap:7px;margin:12px 0;color:#355e48}.smart-choice input{accent-color:#0b806c;width:16px;height:16px}.smart-choice span{margin-left:auto;font-size:11px;color:#7b8e82}.smart-region-actions{display:flex;gap:8px;margin-top:15px}.smart-region-actions .button{flex:1;font-size:12px;padding:8px 5px;min-height:34px}.smart-panel .text-button{font-size:12px}.smart-panel .smart-note{border-top:1px solid #d9e8df;margin-bottom:0;padding-top:10px;color:#89948e}.smart-panel #smart-selection-help{color:#0c7759;background:#e0f0e7;padding:8px;border-radius:5px}.smart-active input:disabled,.smart-active textarea:disabled{color:#9aa59f;background:#f4f6f5}.smart-active #tab-cover{display:none}.smart-active .tabs{gap:0}.smart-active #reset-layout{display:none}
.smart-panel .error{color:#b7463d;background:#fff0ed;border-radius:5px;padding:8px;overflow-wrap:anywhere}
.smart-mode-switch{display:flex;gap:7px;margin-top:14px}.smart-mode-switch .button{flex:1;font-size:12px;padding:9px 6px;min-height:36px}.smart-mode-switch .button[aria-pressed=true]{background:#087f69;color:#fff;border-color:#087f69}

.smart-time-sizing{margin-top:16px;padding-top:12px;border-top:1px solid #d9e8df}.smart-time-sizing .range-label{margin:0 0 8px}.smart-time-sizing input[type=range]{width:100%;accent-color:#087f69}.smart-time-sizing output{font-variant-numeric:tabular-nums;color:#176b51}.smart-size-footer{display:flex;align-items:center;gap:8px;margin-top:4px}.smart-size-footer span{flex:1;font-size:11px;line-height:1.6;color:#6a8174}.smart-size-footer .text-button{flex-shrink:0;white-space:nowrap}

.gallery-review{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:4px 12px;font-size:12px;color:#63766c;margin-bottom:6px}
.gallery-review #review-missing-time{color:#b42318;background:#fff0ee;padding:6px 10px;font-weight:600}
.gallery-review #review-missing-time:hover{background:#fee2e2}
.photo-select .photo-status{font-size:11px;color:#087f69;margin-top:5px}
.photo-needs-time .photo-select{border-color:#dc5959;background:#fff1f1;color:#9c2f2f}
.photo-needs-time .photo-select[aria-pressed=true]{border-color:#b42318;background:#fee2e2;box-shadow:0 0 0 2px #b4231824}
.photo-needs-time .photo-status{color:#b42318;font-weight:600}
.gallery-heading{align-items:center;flex-wrap:wrap}
.gallery-tools{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin-left:auto}
.gallery-tools #gallery-order-status{font-size:12px;font-weight:400;color:#71817d}
.gallery-tools #gallery-reverse{min-height:32px;padding:5px 10px;font-size:12px;white-space:nowrap}
.gallery-tools #gallery-reverse[aria-pressed=true]{background:#e0f0e7;border-color:#75ad97;color:#087657}

.time-sequence{margin-top:16px;border:1px solid #cde5d8;border-radius:10px;padding:12px;background:#f6faf8}
.time-sequence summary{display:flex;align-items:center;justify-content:space-between;gap:8px;cursor:pointer;color:#176b51;font-weight:650;font-size:14px}
.time-sequence summary span{font-size:11px;font-weight:400;color:#71817d}
.time-sequence>.helper{font-size:12px;line-height:1.7;color:#6a8174;margin:10px 0}
.time-sequence label+input{margin-top:7px}
.time-sequence #seq-end{margin-bottom:14px}
.sequence-random{display:flex;align-items:center;gap:7px;margin:12px 0}
.sequence-random input{accent-color:#087f69;width:16px;height:16px}
.sequence-actions{display:grid;gap:8px;margin-top:12px}
.sequence-actions .button{font-size:13px}
.time-sequence .error{color:#b42318;background:#fff0ee;line-height:1.7;padding:8px;border-radius:6px;margin:10px 0 0}
.sequence-summary{font-size:12px;line-height:1.8;color:#176b51;white-space:pre-line;margin:12px 0 8px}
.sequence-list{max-height:240px;overflow:auto;margin:0;padding:0 0 0 24px;font-size:12px;scrollbar-width:thin}
.sequence-list li{padding:7px 0;border-bottom:1px solid #e1ebe5;color:#63766c}
.sequence-list .sequence-name{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sequence-list time{display:block;margin-top:3px;color:#274e3d;font-variant-numeric:tabular-nums}

/* Keep desktop settings scrollable within the visible window. */
@media(min-width:901px){
  body{height:100dvh;overflow:hidden}
  .workspace{height:calc(100dvh - 82px);min-height:0;grid-template-rows:minmax(0,1fr);overflow:hidden}
  .studio,.inspector{height:100%;min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior-y:contain}
  .inspector{overflow-y:scroll;scrollbar-gutter:stable;scrollbar-width:auto;scrollbar-color:#8aab9d #edf3ef}
  .inspector:focus-visible{outline:2px solid #087f69;outline-offset:-2px}
  .inspector::-webkit-scrollbar{width:14px}
  .inspector::-webkit-scrollbar-track{background:#edf3ef}
  .inspector::-webkit-scrollbar-thumb{background:#8aab9d;border:3px solid #edf3ef;border-radius:8px}
  .inspector::-webkit-scrollbar-thumb:hover{background:#5d8875}
}

/* Preview size is independent of the photo queue and export resolution. */
.canvas-area{height:clamp(520px,72dvh,1000px);min-height:0;flex:0 0 auto}
.canvas-heading{flex-shrink:0;gap:12px;flex-wrap:wrap;padding:16px 20px}
.preview-info{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.preview-info>span:first-child{color:#d1dcd7}
.preview-zoom{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:6px;margin-left:auto;letter-spacing:0}
.preview-zoom button{min-width:32px;min-height:32px;padding:5px 9px;border:1px solid #536861;border-radius:6px;background:#253a33;color:#e0eee8;font-size:12px;white-space:nowrap}
.preview-zoom button:not(:disabled):hover{background:#35564a;border-color:#81ab9b}
.preview-zoom output{min-width:72px;text-align:center;color:#d1dcd7;font-variant-numeric:tabular-nums}
.canvas-fit{display:block;flex:1 1 0;min-height:0;padding:16px;overflow:auto;overscroll-behavior:auto;scrollbar-gutter:stable;scrollbar-color:#759788 #22342e}
.canvas-fit.preview-overflow{overscroll-behavior:contain}
.canvas-fit:focus-visible{outline:2px solid #55d8b7;outline-offset:-2px}
.canvas-wrap{max-width:none;margin-left:auto;margin-right:auto}
.canvas-wrap canvas{width:100%;height:100%;max-width:none}
.drag-hint{flex-shrink:0;padding:12px 16px;min-height:54px;text-align:center}
@media(max-width:900px){.canvas-area{height:clamp(380px,70dvh,720px)}}
@media(max-width:520px){
  .canvas-area{height:clamp(340px,70dvh,640px)}
  .canvas-heading{padding:12px;gap:10px}
  .preview-info,.preview-zoom{width:100%;justify-content:space-between}
  .preview-zoom{gap:4px}
  .preview-zoom button{min-height:34px;padding:5px 8px}
  .preview-zoom output{min-width:64px}
  .drag-hint{font-size:12px;min-height:46px}
}

.coordinate-format-label select{margin-top:8px}#coordinate-help{font-size:12px;margin:8px 0 14px;overflow-wrap:anywhere}#coordinate-fields.dms{grid-template-columns:1fr}

#coordinate-section{margin-top:12px;padding:18px 14px;border:1px solid #cce4d8;border-radius:9px;background:#f5faf8}#coordinate-section .helper{font-size:12px}#coordinate-section .coordinate-format-label{margin-top:14px}#coordinate-section .note{margin:0 0 16px;padding:10px}#repair-watermark{font-size:12px;margin-top:10px;padding:8px}#smart-coordinate-apply-all{width:100%;font-size:12px;margin-top:7px}

/* Independent random ranges for newly added watermarks. */
.random-panel{margin-top:16px;padding:14px;border:1px solid #cde5d8;border-radius:10px;background:#f1f8f4}
.random-panel h2{margin:0 0 9px;color:#176b51;font-size:14px}
.random-panel .random-summary{margin:0 0 12px;color:#355e48;font-size:12px;line-height:1.8;white-space:pre-line;overflow-wrap:anywhere}
.random-panel-actions{display:grid;gap:8px}
.random-panel-actions .button{min-width:0;min-height:38px;padding:8px 9px;font-size:13px}
.random-panel .random-panel-help{margin:10px 0 0;font-size:12px;line-height:1.75;color:#6a8174}
#random-dialog{width:min(560px,calc(100vw - 32px));max-width:560px;max-height:calc(100dvh - 48px);padding:28px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
#random-dialog h2{margin:0 0 10px;font-size:21px}
#random-description{margin:0 0 22px;font-size:13px;line-height:1.8}
#random-dialog .random-toggle{display:flex;align-items:center;gap:9px;margin:18px 0 12px;color:#274e3d;font-size:14px;font-weight:600;cursor:pointer}
#random-dialog .random-toggle input[type=checkbox]{display:block;position:static;flex:0 0 17px;width:17px;height:17px;min-width:17px;margin:0;padding:0;opacity:1;accent-color:var(--green);cursor:pointer;box-shadow:none}
#random-dialog .random-toggle input[type=checkbox]:focus-visible{outline:2px solid var(--green);outline-offset:3px}
#random-dialog .random-range-fields{min-width:0;margin:0;padding:14px;border:1px solid #dce8e1;border-radius:9px;background:#f7fbf9}
#random-dialog .random-range-fields legend{padding:0 6px;color:#355e48;font-size:13px;font-weight:600}
#random-dialog .random-field-help{margin:0 0 13px;font-size:12px;line-height:1.75;color:#71817d}
#random-dialog .random-field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 12px}
#random-dialog .random-field-grid label{min-width:0;font-size:13px;line-height:1.6;color:#536e5f}
#random-dialog .random-field-grid input{width:100%;min-width:0;margin-top:7px;padding:9px 10px;font-variant-numeric:tabular-nums}
#random-dialog #random-time-fields .random-field-grid{grid-template-columns:minmax(0,1fr)}
#random-dialog .random-range-fields:disabled{opacity:.6}
#random-dialog .random-range-fields:disabled input{background:#eff3f0;color:#7d8d84;cursor:default}
#random-dialog .error{margin:5px 0 0;color:#b7463d;font-size:12px;line-height:1.6;overflow-wrap:anywhere}
#random-dialog #random-error{margin:16px 0 0;padding:10px 12px;border-radius:7px;background:#fff0ed;color:#b42318}
#random-storage-notice{margin:14px 0 0;padding:10px 12px;border-radius:7px;background:#fff8e9;font-size:12px;line-height:1.7;color:#876527}
#random-dialog .random-dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px;padding-top:18px;border-top:1px solid var(--line)}
#random-dialog .random-dialog-actions .button{min-width:96px;margin:0}
@media(max-width:520px){
  #random-dialog{padding:22px 18px}
  #random-dialog h2{font-size:19px}
  #random-dialog .random-field-grid{grid-template-columns:minmax(0,1fr)}
  #random-dialog .random-range-fields{padding:12px}
  #random-dialog .random-dialog-actions{gap:8px}
  #random-dialog .random-dialog-actions .button{flex:1;min-width:0;padding:10px 8px}
}
