@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@400;500;600;700&display=swap');
:root{font-family:'Prompt','Segoe UI',Tahoma,sans-serif;color:#243252;background:#f6f7fd;font-synthesis:none;--purple:#7157e9;--pink:#ed70a9;--ink:#243252;--muted:#75819a;--line:#e5e9f6;--shadow:0 18px 55px rgba(66,73,129,.09)}
*{box-sizing:border-box}body{margin:0;min-height:100vh}button,input,select{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed}button:focus-visible,input:focus-visible,select:focus-visible,.drop-zone:focus-visible{outline:3px solid #a897fd;outline-offset:3px}button:active:not(:disabled){transform:translateY(1px)}.hidden{display:none!important}.ambient{position:fixed;pointer-events:none;border-radius:50%;filter:blur(50px);z-index:-1}.ambient-a{width:380px;height:380px;top:-120px;left:-150px;background:#dcd6ff78}.ambient-b{width:400px;height:400px;right:-190px;bottom:30px;background:#fcd5e67a}.shell{max-width:1440px;margin:auto;padding:20px 23px 30px}.hero{min-height:107px;display:flex;justify-content:space-between;align-items:center;gap:24px;border-radius:22px;background:linear-gradient(103deg,#7157e9 1%,#9569ec 55%,#ed70a9);box-shadow:0 13px 36px rgba(116,78,214,.20);padding:20px 28px;color:#fff}.brand{display:flex;align-items:center;gap:14px}.brand-icon{width:58px;height:58px;border-radius:17px;background:#ffffff2b;border:1px solid #ffffff65;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:31px;position:relative}.brand-icon span{position:absolute;font-size:15px;right:8px;top:3px}.brand-name{font-size:25px;letter-spacing:-.4px;line-height:1.2;font-weight:500}.brand-name strong{font-weight:700}.brand-sub{opacity:.91;font-size:12px;margin-top:3px}.hero-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.free-pill{background:#ffffff2b;border:1px solid #ffffff42;color:white;padding:9px 13px;border-radius:100px;white-space:nowrap;font-size:12px}.free-dot{display:inline-block;width:7px;height:7px;background:#a6ffd2;border-radius:50%;margin-right:6px;box-shadow:0 0 9px #a6ffd2}.hero-link,.hero-donate{padding:10px 15px;border-radius:11px;border:1px solid #ffffff68;background:transparent;color:white;font-size:12px}.hero-donate{background:#fff;color:#6a46c7;font-weight:700;border:none;box-shadow:0 4px 13px #5325a43c}.hero-link:hover{background:#ffffff23}.hero-donate:hover{background:#faf5ff}.privacy{display:flex;align-items:center;gap:10px;background:#ecfbf6;border:1px solid #ccefe3;border-radius:12px;padding:10px 18px;margin:14px 0;color:#237d68;font-size:11px}.privacy-icon{font-size:19px}.workspace{display:grid;grid-template-columns:416px minmax(0,1fr);gap:15px;align-items:stretch}.settings-panel,.preview-panel{border:1px solid #e1e6f4;background:#fff;box-shadow:var(--shadow);border-radius:22px}.settings-panel{padding:18px 15px 14px;min-width:0}.panel-heading{display:flex;align-items:flex-start;justify-content:space-between;padding:0 5px 7px}.panel-heading h1{font-size:18px;margin:0;font-weight:700}.panel-heading p{font-size:11px;color:var(--muted);margin:5px 0 0}.small-text-button{background:none;border:none;color:#7057db;font-size:11px;padding:6px}.small-text-button:hover,.text-link:hover{text-decoration:underline}.setting-section{padding:17px 16px;margin-top:12px;border:1px solid #e8e9f5;border-radius:17px;background:#faf9ff}.section-blue{background:#f6faff;border-color:#e3ebfc}.section-pink{background:#fff8fc;border-color:#f9e6f2}.section-label{display:flex;align-items:center;gap:10px;margin-bottom:15px}.section-icon{display:grid;place-items:center;border-radius:11px;background:#e7efff;color:#4f82d9;font-size:12px;font-weight:700;min-width:37px;height:37px}.section-purple .section-icon{background:#eae6ff;color:#7157e9}.section-pink .section-icon{background:#ffe4f1;color:#e15d9a}.section-label h2{font-size:13px;font-weight:700;margin:0 0 3px}.section-label p{font-size:10px;color:var(--muted);margin:0}.toggle{display:inline-flex;margin-left:auto;flex-shrink:0;cursor:pointer}.toggle input,.before-toggle input{position:absolute;opacity:0;width:0;height:0}.track{width:48px;height:27px;background:#d7dce9;border-radius:50px;position:relative;display:block;transition:background .25s;box-shadow:inset 0 1px 3px #0000000d}.track:after{content:'';width:19px;height:19px;position:absolute;left:4px;top:4px;background:#fff;border-radius:50%;box-shadow:0 2px 4px #0002;transition:transform .25s}.toggle input:checked+.track,.before-toggle input:checked+.track{background:linear-gradient(100deg,#7157e9,#ed70a9)}.toggle input:checked+.track:after,.before-toggle input:checked+.track:after{transform:translateX(21px)}.source-action{position:relative}.select-main{width:100%;display:flex;justify-content:space-between;align-items:center;border:0;background:linear-gradient(100deg,#5d89e9,#7582e7);color:#fff;padding:12px 14px;border-radius:12px;font-size:12px;font-weight:700;box-shadow:0 6px 14px #568ce927}.select-main:hover{filter:brightness(1.04)}.menu{position:absolute;z-index:12;left:0;right:0;top:calc(100% + 6px);border:1px solid #e2e0f5;background:#fff;border-radius:14px;padding:6px;box-shadow:0 18px 35px #4b4d8a33}.menu button{display:block;width:100%;text-align:left;padding:10px 12px;border-radius:9px;border:0;background:white;color:var(--ink);font-size:12px}.menu button:hover{background:#f2efff;color:#7051d4}.menu small{display:block;color:var(--muted);font-size:10px;margin-top:2px}.drop-zone{border:1.5px dashed #afc4eb;border-radius:13px;text-align:center;color:#6081b8;padding:14px 12px;margin-top:11px;background:#ffffffb8;font-size:12px;cursor:pointer;transition:background .2s,border-color .2s}.drop-zone small{font-size:10px;color:#8c9cb2}.drop-symbol{width:28px;height:28px;margin:auto auto 5px;border-radius:8px;background:#e7f0ff;font-size:23px;line-height:26px}.drop-zone.dragging,.drop-zone:hover{background:#e7f1ff;border-color:#719ce7}.file-info{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:10px;color:#60728f;margin-top:10px}.file-info strong{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-link{background:none;border:none;color:#7160cf;padding:2px;font-size:10px}.file-list{max-height:111px;overflow-y:auto;margin-top:7px;display:flex;flex-direction:column;gap:4px}.file-list:empty{display:none}.file-item{display:flex;align-items:center;gap:8px;text-align:left;background:#fff;border:1px solid #e9eef8;border-radius:8px;padding:6px 8px;color:#60728f;cursor:pointer;width:100%;font-size:10px}.file-item.active{background:#eeebff;border-color:#c7baf9;color:#6c55ce}.file-item span:nth-child(2){overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.file-item em{font-style:normal;color:#8994a8}.control-body{display:flex;flex-direction:column}.disabled-block{opacity:.43;pointer-events:none;filter:grayscale(.1)}.field-label{font-size:11px;font-weight:600;display:block;margin:7px 0 6px}.text-input{width:100%;height:41px;border:1px solid #d9deef;background:#fff;border-radius:11px;padding:0 11px;color:var(--ink);min-width:0;font-size:12px}.text-input:focus{outline:2px solid #8b7bf4;outline-offset:0}.font-row{display:flex;gap:7px}.font-row select{flex:1}.soft-button,.file-button{border:1px solid #e4def8;background:#f0edff;border-radius:10px;color:#6650c8;font-size:11px;font-weight:600;padding:9px 11px;white-space:nowrap}.soft-button:hover,.file-button:hover{background:#e6dfff}.file-button{text-align:left;background:#fff;border-color:#f0dce9;overflow:hidden;text-overflow:ellipsis;width:100%}.file-button span{margin-left:5px}.setting-row,.slider-line{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:15px;font-size:11px}.slider-line output{color:#7558db;font-weight:700}.counter{display:flex;align-items:center;gap:4px;flex-shrink:0}.counter button{width:30px;height:35px;border:0;background:#edeaff;border-radius:9px;color:#654bce;font-weight:700;font-size:17px}.counter button:hover{background:#ded6fa}.counter input{width:54px;height:35px;text-align:center;background:#fff;border:1px solid #d9d8f2;border-radius:9px;color:var(--ink);font-weight:700;appearance:textfield;-moz-appearance:textfield}.counter input::-webkit-inner-spin-button,.counter input::-webkit-outer-spin-button{appearance:none;margin:0}.range{width:100%;height:22px;margin:6px 0 3px;accent-color:#8665e7;cursor:pointer}.color-button{display:flex;align-items:center;gap:8px;background:white;border:1px solid #dedff1;border-radius:10px;padding:6px 8px;color:#6650bf;font-size:10px}.color-button span:first-child{width:22px;height:22px;border-radius:7px;border:1px solid #d1d7e5}.color-button span:last-child{color:#8a8ea9}.preview-panel{padding:21px 21px 17px;min-width:0;display:flex;flex-direction:column}.preview-top{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:14px}.preview-top h2{font-size:18px;font-weight:700;margin:0}.preview-top p{color:var(--muted);font-size:11px;margin:4px 0 0}.pager{display:flex;align-items:center;gap:8px}.pager span{color:#6f7c97;font-size:11px;margin-right:2px}.pager button{width:35px;height:34px;border:0;border-radius:9px;color:#7558d5;background:#eeebff}.pager button:hover:not(:disabled){background:#e0d9fb}.pager button:disabled{opacity:.4}.preview-stage{min-height:360px;flex:1;border-radius:18px;background:radial-gradient(circle at center,#f7faff 3%,#edf3fc 100%);border:1px solid #dce5f5;position:relative;overflow:hidden;display:flex;justify-content:center;align-items:center;padding:17px}.preview-stage:before{content:'';position:absolute;inset:0;background-image:linear-gradient(#a4b7d50b 1px,transparent 1px),linear-gradient(90deg,#a4b7d50b 1px,transparent 1px);background-size:25px 25px;pointer-events:none}.preview-empty{text-align:center;position:relative;color:#72809d}.preview-empty-icon{width:91px;height:91px;margin:0 auto 16px;border:2px dashed #c5caf1;border-radius:25px;display:grid;place-items:center;background:linear-gradient(125deg,#f0eaff,#ffeafa);transform:rotate(-7deg)}.preview-empty-icon span{font-size:41px;transform:rotate(7deg);color:#9b75e7}.preview-empty h3{font-size:17px;margin:5px 0;font-weight:700;color:#536482}.preview-empty p{font-size:11px;line-height:1.9}.preview-canvas{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;box-shadow:0 14px 40px #3647732a;position:relative;background:transparent;border-radius:3px}.loading-overlay{position:absolute;inset:0;background:#ffffffbd;z-index:3;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:15px;font-size:12px;color:#735bd1}.spinner{width:35px;height:35px;border-radius:50%;border:4px solid #e5e0fe;border-top-color:#825eed;animation:spin .75s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.preview-bottom{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:13px 0}.current-file{display:flex;gap:10px;align-items:center;min-width:0}.current-file>div{min-width:0}.file-glyph{width:37px;height:37px;flex-shrink:0;background:#eff2fd;border-radius:10px;display:grid;place-items:center;color:#7b7cd4;font-size:19px}.current-file strong{font-size:11px;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:350px}.current-file small{color:var(--muted);display:block;font-size:10px}.before-toggle{display:flex;align-items:center;gap:8px;white-space:nowrap;font-size:10px;cursor:pointer}.track.mini{width:38px;height:23px}.track.mini:after{width:15px;height:15px}.before-toggle input:checked+.track:after{transform:translateX(15px)}.processing{margin-top:auto}.status-row{display:flex;justify-content:space-between;font-size:11px;color:#77819a;margin:7px 0 6px;gap:15px}.status-row #statusText{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.progress-track{height:8px;background:#ecedf5;border-radius:10px;overflow:hidden}.progress-track>div{width:0%;height:100%;background:linear-gradient(90deg,#7157e9,#ed70a9);border-radius:10px;transition:width .17s}.action-row{display:flex;gap:8px;margin-top:14px}.export-button{flex:1;min-height:57px;color:white;background:linear-gradient(100deg,#7055e8,#a269eb 55%,#e476b4);border:0;border-radius:13px;box-shadow:0 10px 22px #8c63dd2b;font-weight:700;font-size:13px}.export-button:hover:not(:disabled){filter:brightness(1.05)}.export-button:disabled{background:#b8bed2;box-shadow:none;opacity:.72}.cancel-button{border:none;background:#fff0f4;color:#c34b78;font-size:11px;border-radius:11px;padding:10px 18px}.bottom-note{display:flex;flex-wrap:wrap;gap:8px 20px;margin-top:13px;font-size:10px;color:#72819c}.footer{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:20px 6px 5px;font-size:11px;color:#7e8aa2}.footer strong{display:inline-block;color:#6f58d5;margin-right:12px}.footer-right{display:flex;align-items:center;gap:18px}.footer button{color:#855bdd;border:none;background:transparent;font-weight:700;font-size:11px}.modal-backdrop{position:fixed;inset:0;z-index:200;background:#2421408a;display:grid;place-items:center;padding:18px;backdrop-filter:blur(5px)}.modal{width:min(100%,480px);max-height:min(90vh,780px);background:#fff;border-radius:22px;box-shadow:0 25px 70px #1d15445a;overflow:hidden;display:flex;flex-direction:column;animation:pop .2s ease-out}@keyframes pop{from{transform:translateY(12px) scale(.98);opacity:.6}to{transform:translateY(0) scale(1);opacity:1}}.modal-banner{background:linear-gradient(103deg,#7157e9,#ec74b3);color:#fff;padding:22px 26px 20px;position:relative}.modal-mark{width:38px;height:38px;border:1px solid #ffffff80;border-radius:11px;display:grid;place-items:center;margin-bottom:9px;background:#ffffff28}.modal-banner h2{font-size:18px;margin:0 0 6px}.modal-banner p{font-size:11px;opacity:.93;margin:0;line-height:1.7}.modal-close{position:absolute;right:13px;top:11px;border:0;background:#ffffff21;color:white;border-radius:9px;width:31px;height:31px;font-size:22px}.modal-body{overflow:auto;padding:21px 25px;color:#5a6680;font-size:12px;line-height:1.85}.modal-body p{margin:0 0 9px}.modal-body strong{color:#384669}.modal-actions{display:flex;gap:9px;justify-content:flex-end;padding:0 25px 23px}.modal-button{min-height:38px;padding:9px 18px;border-radius:11px;border:none;background:linear-gradient(90deg,#7556e7,#df72b1);font-weight:700;color:white;font-size:12px}.modal-button.secondary{background:#efecff;color:#6d53d3}.donate-note{background:#f5f2ff;border-radius:12px;padding:13px;margin:10px 0}.donate-qr{max-width:220px;max-height:220px;display:block;margin:12px auto;border:1px solid #e5e6f1;padding:10px;border-radius:12px;background:white}.donate-link{display:inline-block;background:#7759e8;color:white!important;text-decoration:none;border-radius:10px;padding:8px 15px;margin:8px 0}.modal-list{margin:0;padding-left:19px}.modal-list li{margin-bottom:7px}.color-swatches{display:grid;grid-template-columns:repeat(8,1fr);gap:8px;margin:13px 0}.color-choice{height:32px;width:100%;border-radius:9px;border:2px solid #ffffff;box-shadow:0 0 0 1px #dfe3f0}.color-choice.active{outline:2px solid #8067e9}.color-field{width:100%;border:1px solid #d8daec;border-radius:9px;padding:10px;font:inherit}.toast-wrap{position:fixed;right:22px;bottom:20px;z-index:250;display:flex;flex-direction:column;gap:9px;pointer-events:none}.toast{color:#fff;padding:12px 16px;max-width:390px;box-shadow:0 14px 30px #38355a35;border-radius:12px;font-size:12px;background:#5e52b9;animation:pop .22s}.toast.error{background:#c34271}.toast.success{background:#15957f}
@media(min-width:900px){.settings-panel{max-height:calc(100vh - 200px);min-height:590px;overflow:auto;scrollbar-color:#c7bbed transparent;scrollbar-width:thin}.preview-panel{min-height:590px}.preview-stage{min-height:350px}}
@media(max-width:1050px){.workspace{grid-template-columns:360px minmax(0,1fr)}.hero{padding:18px}.brand-name{font-size:22px}.settings-panel{padding:13px 11px}.setting-section{padding:13px 12px}.free-pill{display:none}}
@media(max-width:800px){.shell{padding:11px 10px 20px}.hero{border-radius:17px;gap:12px;flex-wrap:wrap}.hero-actions{width:100%;justify-content:flex-end}.brand-name{font-size:21px}.hero-link,.hero-donate{padding:8px 11px}.privacy{font-size:10px}.workspace{grid-template-columns:1fr}.settings-panel{max-height:none}.preview-panel{min-height:540px;order:-1}.preview-stage{min-height:310px;height:310px;flex:none}.setting-section{padding:15px}.preview-bottom{flex-wrap:wrap}.footer{flex-wrap:wrap}}
@media(max-width:420px){.hero{padding:14px}.brand-icon{width:45px;height:45px;font-size:25px}.brand-sub{font-size:10px}.hero-actions{justify-content:space-between}.free-pill{display:none}.hero-link,.hero-donate{font-size:10px}.preview-panel{padding:14px 12px}.preview-stage{height:280px;min-height:280px;padding:10px}.preview-top h2{font-size:15px}.current-file strong{max-width:180px}.footer-right{flex-wrap:wrap;gap:7px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;transition-duration:.01ms!important}}

/* ทางลัดเลือกไฟล์ในพื้นที่ตัวอย่าง ใช้สะดวกทั้งมือถือและคอมพิวเตอร์ */
.quick-pick { margin:10px auto 2px; border:0; background:linear-gradient(96deg,#7157e9,#d771bb); color:white; border-radius:11px; padding:10px 23px; font-size:12px; font-weight:700; box-shadow:0 8px 18px #7459d833; }
.quick-pick:hover { filter:brightness(1.06); }

/* ========================================
   WATERMARK PRO • AURORA DIALOGS
   เฉพาะ Popup, Toast และ Dropdown
   ======================================== */

body.modal-open { overflow: hidden; }
.modal-backdrop {
  background: rgba(22, 22, 52, .56);
  backdrop-filter: blur(9px) saturate(1.12);
  -webkit-backdrop-filter: blur(9px) saturate(1.12);
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  animation: backdrop-in .22s ease-out both;
}
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }
.modal {
  --dialog-a: #7054de;
  --dialog-b: #ec77b5;
  position: relative;
  isolation: isolate;
  width: min(100%, 525px);
  max-height: min(90vh, 820px);
  max-height: min(90dvh, 820px);
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 25px;
  background: #fff;
  box-shadow: 0 32px 100px rgba(22, 17, 69, .28), 0 2px 6px rgba(32,22,99,.06);
  animation: aurora-dialog-in .38s cubic-bezier(.22,1,.36,1) both;
  overflow: hidden;
}
@keyframes aurora-dialog-in {
  from { opacity: 0; transform: translateY(22px) scale(.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal--donate { --dialog-a: #a75bd8; --dialog-b: #ec76a9; }
.modal--color  { --dialog-a: #6d5fe8; --dialog-b: #bb6adc; }
.modal--error  { --dialog-a: #d55382; --dialog-b: #eb829c; }
.modal--help   { --dialog-a: #6156e0; --dialog-b: #dc79c8; }
.modal-banner {
  position: relative;
  overflow: hidden;
  padding: 19px 24px 26px;
  background: linear-gradient(116deg, var(--dialog-a) 0%, #9865e9 52%, var(--dialog-b) 100%);
  color: #fff;
}
.modal--error .modal-banner { background: linear-gradient(115deg,#b84378 0%,#dc638a 53%,#ee8baa 100%); }
.modal--donate .modal-banner { background: linear-gradient(115deg,#8657d8 0%,#bc69c8 53%,#f18bb8 100%); }
.modal-shimmer,
.modal-banner::after {
  content: '';
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
}
.modal-shimmer {
  width: 250px;
  height: 250px;
  right: -64px;
  top: -175px;
  background: radial-gradient(circle,rgba(255,255,255,.23),rgba(255,255,255,0) 72%);
}
.modal-banner::after {
  width: 170px;
  height: 170px;
  right: -46px;
  bottom: -102px;
  border: 26px solid rgba(255,255,255,.075);
}
.modal-topline,.modal-heading { position: relative; z-index: 1; }
.modal-topline { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 19px; }
.modal-brand { display: inline-flex; align-items: center; gap: 8px; font-size: 10px; letter-spacing: .16em; font-weight: 700; color: rgba(255,255,255,.89); }
.modal-brand-dot { width: 7px; height: 7px; background: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.15); border-radius: 50%; }
.modal-close {
  position: static;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 35px;
  height: 35px;
  background: rgba(255,255,255,.17);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 11px;
  color: #fff;
  transition: background .2s ease, transform .2s ease;
}
.modal-close:hover { background: rgba(255,255,255,.3); transform: rotate(90deg); }
.modal-close:focus-visible { outline: 3px solid white; outline-offset: 3px; }
.modal-heading { display: flex; align-items: center; gap: 16px; }
.modal-mark {
  display: grid;
  place-items: center;
  flex: 0 0 60px;
  width: 60px;
  height: 60px;
  margin: 0;
  border: 1px solid rgba(255,255,255,.43);
  border-radius: 19px;
  background: rgba(255,255,255,.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 9px 22px rgba(55,25,110,.12);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 29px;
  font-weight: 600;
}
.modal-headcopy { min-width: 0; }
.modal-banner h2 { font-size: clamp(17px, 3.7vw, 21px); line-height: 1.45; font-weight: 700; letter-spacing: -.02em; margin: 0 0 3px; }
.modal-banner p { margin: 0; opacity: .95; font-size: 11px; line-height: 1.7; }
.modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 25px 27px 22px;
  font-size: 12px;
  line-height: 1.85;
  color: #64718c;
  scrollbar-color: #cfc4f2 transparent;
  scrollbar-width: thin;
}
.modal-body > p:first-child { color: #52617f; }
.modal-body strong { color: #324163; }
.modal-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  padding: 17px 26px 20px;
  border-top: 1px solid #eef0f8;
  background: linear-gradient(180deg,#fff,#faf9ff);
}
.modal-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 116px;
  min-height: 42px;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  border: 0;
  color: #fff;
  background: linear-gradient(98deg,var(--dialog-a),var(--dialog-b));
  box-shadow: 0 7px 18px rgba(115,83,222,.18);
  transition: box-shadow .2s, filter .2s, transform .2s;
}
.modal-button:hover { filter: brightness(1.07); box-shadow: 0 9px 24px rgba(115,83,222,.27); transform: translateY(-1px); }
.modal-button.secondary {
  color: #6452bf;
  background: #f0edfc;
  border: 1px solid #e4ddf9;
  box-shadow: none;
}
.modal-button.secondary:hover { background: #e6e0fa; }
.modal-list { padding: 0; margin: 0 0 18px; list-style: none; counter-reset: wmstep; }
.modal-list li {
  position: relative;
  min-height: 50px;
  padding: 8px 8px 14px 51px;
  margin: 0;
  color: #6b7894;
  border-bottom: 1px solid #f0edf9;
  line-height: 1.8;
  counter-increment: wmstep;
}
.modal-list li:last-child { border-bottom: none; }
.modal-list li::before {
  content: counter(wmstep, decimal-leading-zero);
  position: absolute;
  top: 7px;
  left: 0;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #6e57d8;
  background: #f0edff;
  border-radius: 11px;
  font-size: 11px;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px #e9e3fd;
}
.modal-list strong { display: block; font-size: 12px; color: #344469; }
.donate-note {
  padding: 14px 16px;
  border: 1px solid #e9e2fc;
  border-radius: 14px;
  background: linear-gradient(110deg,#f8f5ff,#fff7fc);
  color: #665788;
  line-height: 1.85;
}
.donate-qr {
  display: block;
  width: min(100%,220px);
  height: auto;
  max-height: 230px;
  object-fit: contain;
  margin: 17px auto;
  padding: 12px;
  background: #fff;
  border: 1px solid #eee5f8;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(107,76,160,.08);
}
.donate-link {
  display: block;
  width: fit-content;
  margin: 15px auto;
  padding: 11px 20px;
  border-radius: 12px;
  color: #fff !important;
  background: linear-gradient(100deg,#8b5bdc,#e476ba);
  box-shadow: 0 9px 22px rgba(135,87,203,.19);
  font-weight: 700;
  text-decoration: none;
  transition: transform .2s, filter .2s;
}
.donate-link:hover { transform: translateY(-2px); filter: brightness(1.06); }
.color-hint { font-size: 12px; margin-bottom: 12px !important; }
.color-preview {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 14px;
  border: 1px solid #e7e7f7;
  border-radius: 15px;
  background: linear-gradient(112deg,#f5f4ff,#fff8fc);
  margin-bottom: 18px;
}
.color-preview-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  flex: 0 0 56px;
  background: #3e3b61;
  border: 4px solid white;
  border-radius: 15px;
  font-size: 21px;
  font-weight: 800;
  box-shadow: 0 5px 16px rgba(38,30,88,.12);
  -webkit-text-stroke: .2px rgba(0,0,0,.15);
}
.color-preview-text strong { display: block; font-size: 12px; margin-bottom: 2px; }
.color-preview-text span { font-family: Consolas,monospace; color: #796cb5; font-size: 12px; }
.color-swatches { grid-template-columns: repeat(8,minmax(0,1fr)); gap: 10px; margin: 10px 0 22px; }
.color-choice {
  position: relative;
  width: 100%;
  height: 34px;
  border: 3px solid #fff;
  border-radius: 11px;
  box-shadow: 0 0 0 1px #dce1ef,0 3px 8px #4d3b7a13;
  transition: transform .18s,box-shadow .18s;
}
.color-choice:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 0 0 2px #b8a5f1, 0 6px 12px #4d3b7a26; }
.color-choice.active { outline: none; box-shadow: 0 0 0 2px #8067e9,0 5px 12px #4d3b7a29; }
.color-choice.active::after {
  content: '✓';
  position: absolute;
  right: -5px;
  bottom: -6px;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #7157e9;
  border: 2px solid white;
  border-radius: 50%;
  font-size: 9px;
}
.color-input-label { display: block; color: #485873; font-weight: 700; font-size: 11px; margin-bottom: 7px; }
.color-field {
  width: 100%;
  height: 44px;
  padding: 10px 14px;
  color: #273559;
  background: #fff;
  border: 1px solid #d9daec;
  border-radius: 12px;
  letter-spacing: .04em;
  font-family: Consolas,monospace;
  font-weight: 600;
  transition: border-color .2s,box-shadow .2s;
}
.color-field:focus { outline: none; border-color: #8871e9; box-shadow: 0 0 0 4px #8871e921; }
.color-field.invalid { border-color: #dc7c9d; background: #fffafd; }
/* Toast: ข้อความสั้น แยกสถานะ พร้อมปุ่มปิด */
.toast-wrap { right: clamp(12px,2vw,28px); bottom: clamp(12px,2vw,28px); gap: 11px; width: min(calc(100vw - 24px),385px); pointer-events: none; }
.toast {
  --toast-tone: #7560d4;
  --toast-tint: #f1edff;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  max-width: unset;
  padding: 15px 39px 18px 15px;
  color: #384765;
  background: rgba(255,255,255,.98);
  border: 1px solid #e8e8f4;
  border-left: 4px solid var(--toast-tone);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(27,22,73,.18),0 2px 9px rgba(27,22,73,.05);
  animation: aurora-toast-in .35s cubic-bezier(.22,1,.36,1) both;
  overflow: hidden;
  pointer-events: auto;
}
.toast--error { --toast-tone: #d7507b; --toast-tint: #fff0f5; }
.toast--success { --toast-tone: #1a9f85; --toast-tint: #eafaf4; }
.toast--info { --toast-tone: #7560d4; --toast-tint: #f1edff; }
.toast-icon {
  display: grid;
  place-items: center;
  flex: 0 0 33px;
  width: 33px;
  height: 33px;
  border-radius: 10px;
  color: var(--toast-tone);
  background: var(--toast-tint);
  font-weight: 800;
  font-size: 17px;
}
.toast-content { flex: 1; min-width: 0; }
.toast-content strong { display: block; color: #32415f; margin: 0 0 3px; font-size: 12px; font-weight: 700; }
.toast-content p { margin: 0; color: #64728e; font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
.toast-close {
  position: absolute;
  right: 11px;
  top: 11px;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #8e98ad;
  font-size: 19px;
  line-height: 1;
}
.toast-close:hover { background: #f2f0fa; color: #6556a4; }
.toast-timer { position:absolute;inset:auto 0 0 0;height:3px;background:var(--toast-tone);opacity:.5;transform-origin:left;animation:toast-countdown 4.7s linear forwards; }
.toast--error .toast-timer { animation-duration:6.5s; }
.toast--paused .toast-timer { animation-play-state:paused; }
.toast--leaving { animation:aurora-toast-out .2s ease-in forwards; pointer-events:none; }
@keyframes aurora-toast-in { from { opacity:0;transform:translateX(24px) scale(.97); } to {opacity:1;transform:translateX(0) scale(1);} }
@keyframes aurora-toast-out { to {opacity:0;transform:translateX(25px) scale(.96);} }
@keyframes toast-countdown { to { transform:scaleX(0); } }
/* เมนูเลือกไฟล์/โฟลเดอร์ที่ใช้ร่วมธีมป็อบอัป */
.menu {
  z-index: 30;
  border-radius: 15px;
  border: 1px solid #e3def8;
  padding: 7px;
  background: rgba(255,255,255,.99);
  box-shadow: 0 18px 46px rgba(55,39,118,.21),0 3px 8px rgba(55,39,118,.06);
  animation: aurora-menu-in .2s cubic-bezier(.22,1,.36,1) both;
  transform-origin: top center;
}
.menu button { padding: 12px 14px; border-radius: 10px; font-size: 12px; font-weight: 600; transition: background .18s,color .18s; }
.menu button + button { border-top: 1px solid #f3f0fc; }
.menu button:hover,.menu button:focus-visible { background: linear-gradient(100deg,#f0edff,#fff0f8); color: #6850cc; }
.menu small { color: #8893aa; font-size: 10px; font-weight: 400; }
@keyframes aurora-menu-in { from { opacity:0;transform:translateY(-7px) scale(.98); } to { opacity:1;transform:translateY(0) scale(1); } }
@media(max-width:540px) {
  .modal { border-radius: 20px; width: 100%; }
  .modal-banner { padding: 17px 18px 20px; }
  .modal-mark { width: 49px; height: 49px; flex-basis:49px; border-radius: 15px; font-size: 23px; }
  .modal-heading { gap: 12px; }
  .modal-topline { margin-bottom: 14px; }
  .modal-body { padding: 20px 18px 17px; }
  .modal-actions { padding: 14px 18px 18px; }
  .modal-button { flex: 1; }
  .color-swatches { gap: 7px; }
  .color-choice { height: 31px; border-radius: 9px; }
  .toast-wrap { left: 12px; right:12px; bottom: max(12px,env(safe-area-inset-bottom)); width:auto; }
}
@media(prefers-reduced-motion:reduce) {
  .modal-backdrop,.modal,.toast,.toast--leaving,.menu,.toast-timer { animation-duration:.01ms!important; }
  .modal-close:hover,.modal-button:hover,.color-choice:hover { transform:none; }
}

/* === Preview image size only: keep the image inside a bounded frame. ===
   All other layout, watermark rendering and export behavior is unchanged. */
@media (min-width: 801px) {
  .preview-stage {
    height: clamp(320px, 48vh, 520px);
    min-height: 0;
    flex: 0 0 auto;
  }
}

/* ===== คำชวนสนับสนุนหลังดาวน์โหลด (เฉพาะส่วนเพิ่มใหม่) ===== */
.modal--thanks { --dialog-a: #8957e8; --dialog-b: #ea6aa9; }
.modal--thanks .modal-banner {
  background: linear-gradient(113deg, #7b53df 0%, #b563dc 48%, #f07aaa 100%);
}
.modal--thanks .modal-shimmer { opacity: .9; }
.support-thanks { text-align: center; padding: 4px 0 0; }
.support-thanks-art {
  width: 104px; height: 91px; margin: 0 auto 13px;
  position: relative; display: grid; place-items: center;
  border-radius: 30px;
  background: radial-gradient(circle at 26% 22%, #ffedf8 0%, #f2eaff 65%, #ece9ff 100%);
  box-shadow: inset 0 0 0 1px rgba(175,119,219,.12), 0 10px 30px rgba(166,96,218,.12);
}
.support-bigheart {
  display: block; line-height: 1; font-size: 55px;
  background: linear-gradient(130deg,#a45fe4 20%,#f07da8 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: wm-heart-beat 2.2s ease-in-out infinite;
}
.support-spark { position: absolute; color: #d17dcf; font-size: 18px; animation: wm-sparkle 2.5s ease-in-out infinite; }
.support-spark-one { top: 6px; left: 10px; }
.support-spark-two { top: 10px; right: 9px; color: #a578eb; animation-delay: .6s; }
.support-spark-three { bottom: 8px; right: 12px; font-size: 12px; animation-delay: 1.2s; }
.support-thanks-title { display: block; font-size: 16px; color: #463565 !important; letter-spacing: -.02em; margin: 0 0 8px; }
.support-thanks p { max-width: 395px; margin: 0 auto 14px; color: #646b83; font-size: 12px; line-height: 1.85; }
.support-thanks-free { font-size: 11px; border-radius: 12px; padding: 10px 12px; color: #775da5; background: linear-gradient(95deg, #f5f0ff, #fff1f8); }
.modal--thanks .modal-actions { justify-content: center; }
.modal--thanks .modal-button:not(.secondary) {
  min-width: 174px;
  background: linear-gradient(100deg,#8155df,#bd65d9 51%,#eb73a7);
  box-shadow: 0 8px 28px rgba(183,96,208,.27);
  animation: wm-cta-glow 2.6s ease-in-out infinite;
}
.modal--thanks .modal-button.secondary { min-width: 125px; }
@keyframes wm-heart-beat { 0%,100% { transform: scale(1); } 45% { transform: scale(1.12); } 60% { transform: scale(1.04); } }
@keyframes wm-sparkle { 0%,100% { opacity: .4; transform: translateY(0) scale(.9) rotate(-12deg); } 50% { opacity: 1; transform: translateY(-5px) scale(1.15) rotate(13deg); } }
@keyframes wm-cta-glow { 0%,100% { box-shadow: 0 8px 25px rgba(183,96,208,.23); } 50% { box-shadow: 0 8px 31px rgba(183,96,208,.49); } }
@media (max-width: 420px) { .support-thanks-art { width: 90px; height: 80px; } .support-thanks-title { font-size: 14px; } .modal--thanks .modal-actions { flex-direction: column; } .modal--thanks .modal-button { width:100%; } }
@media (prefers-reduced-motion: reduce) { .support-bigheart, .support-spark, .modal--thanks .modal-button:not(.secondary) { animation: none !important; } }


/* ===== ปุ่มสนับสนุนผู้พัฒนา มุมขวาบน (Aurora Shine) ===== */
.hero-actions .hero-donate {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 11px 19px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .88);
  border-radius: 999px;
  background: linear-gradient(115deg, #ffffff 4%, #fff3fb 52%, #ffe7f4 100%);
  color: #6931a4;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .1px;
  white-space: nowrap;
  box-shadow: 0 7px 23px rgba(60, 28, 112, .27), inset 0 1px 0 #fff;
  transition: transform .22s ease, background .22s ease, box-shadow .22s ease;
  animation: wm-donate-breathe 3.8s ease-in-out infinite;
}
.hero-actions .hero-donate::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 15%, rgba(255,255,255,.78) 48%, transparent 78%);
  transform: translateX(-140%);
  animation: wm-donate-shine 5s ease-in-out infinite;
}
.hero-actions .hero-donate::after {
  content: "✦";
  display: inline-block;
  margin-left: 2px;
  color: #dd4f9b;
  font-size: 14px;
  animation: wm-donate-sparkle 2.5s ease-in-out infinite;
}
.hero-actions .hero-donate:hover {
  background: linear-gradient(115deg, #ffffff, #fff0fc, #ffe1f2);
  color: #59278f;
  transform: translateY(-3px) scale(1.035);
  box-shadow: 0 12px 30px rgba(68, 24, 128, .35), 0 0 0 3px rgba(255,255,255,.16);
}
.hero-actions .hero-donate:active:not(:disabled) {
  transform: translateY(0) scale(.98);
}
.hero-actions .hero-donate:focus-visible {
  outline: 3px solid #ffe88d;
  outline-offset: 4px;
}
@keyframes wm-donate-breathe {
  0%, 100% { box-shadow: 0 7px 23px rgba(60,28,112,.25), inset 0 1px 0 #fff; }
  50%      { box-shadow: 0 9px 28px rgba(102,36,156,.42), 0 0 0 3px rgba(255,255,255,.13), inset 0 1px 0 #fff; }
}
@keyframes wm-donate-shine {
  0%, 43%  { transform: translateX(-140%); }
  64%, 100% { transform: translateX(140%); }
}
@keyframes wm-donate-sparkle {
  0%, 100% { opacity: .65; transform: rotate(-10deg) scale(.9); }
  50%      { opacity: 1; transform: rotate(18deg) scale(1.18); }
}
@media (max-width: 480px) {
  .hero-actions .hero-donate {
    min-height: 40px;
    padding: 9px 13px;
    font-size: 11px;
    white-space: normal;
    text-align: center;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero-actions .hero-donate,
  .hero-actions .hero-donate::before,
  .hero-actions .hero-donate::after {
    animation: none !important;
    transition: none !important;
  }
}
