
.tfdwe-modal{position:fixed;inset:0;z-index:2147482000;background:rgba(15,35,48,.63);display:grid;place-items:center;padding:15px;backdrop-filter:blur(4px)}
.tfdwe-modal[hidden]{display:none!important}.tfdwe-shell{width:min(1240px,100%);height:min(92dvh,940px);background:#f8fbfd;color:#1a3143;border-radius:19px;overflow:hidden;display:flex;flex-direction:column;border:1px solid #d0e4ee;box-shadow:0 28px 70px #0004;font:14px/1.45 system-ui,-apple-system,'Segoe UI',sans-serif}
.tfdwe-head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:13px 17px;border-bottom:1px solid #dae8ef;background:white}
.tfdwe-head h2{font-size:18px;line-height:1.2;margin:2px 0}.tfdwe-head small{color:#7690a1;letter-spacing:.07em;font-weight:700}.tfdwe-head button{border:1px solid #d7e5ec;background:white;padding:8px 10px;border-radius:9px}
.tfdwe-tabs{display:flex;gap:4px;overflow-x:auto;padding:9px 15px;background:white;border-bottom:1px solid #dbe9f0}
.tfdwe-tabs button{border:1px solid transparent;background:transparent;border-radius:9px;padding:9px 11px;color:#5a788b;white-space:nowrap;font-weight:700;font-size:12px}
.tfdwe-tabs button[aria-selected=true]{background:#eaf6fc;border-color:#bddde9;color:#1a3143}
.tfdwe-main{display:grid;grid-template-columns:minmax(310px,450px) minmax(0,1fr);gap:0;flex:1;min-height:0}
.tfdwe-controls{overflow:auto;padding:16px 18px 28px;background:#fff;border-right:1px solid #dbe7ec}
.tfdwe-workspace{padding:15px;background:linear-gradient(150deg,#eef7fc,#f9fafb);min-height:0;display:flex;flex-direction:column;gap:9px}
.tfdwe-frame-bar{display:flex;align-items:center;justify-content:space-between;gap:7px;flex-wrap:wrap;font-size:12px;color:#607d8d}
.tfdwe-frame-bar button{border:1px solid #c8dfe9;background:white;color:#1a3143;border-radius:8px;padding:6px 10px;cursor:pointer}
.tfdwe-preview-wrap{flex:1;min-height:200px;overflow:auto;display:flex;justify-content:center;align-items:flex-start;border:1px solid #c6dce8;border-radius:12px;background:#e2eaf0}
#tfdweFrame{display:block;height:100%;min-height:550px;width:100%;border:0;background:white;box-shadow:0 8px 22px #1a314319;transition:width .25s ease}
.tfdwe-field{display:grid;gap:6px;margin:0 0 13px}.tfdwe-field label{font-weight:720;color:#29465a;font-size:12px}
.tfdwe-field :is(input,textarea,select){width:100%;padding:10px;border:1px solid #c9dbe6;border-radius:9px;background:white;color:#1a3143;font:inherit;outline-color:#82bfe1}
.tfdwe-field textarea{min-height:72px;resize:vertical}.tfdwe-help{color:#688397;font-size:12px;line-height:1.5;margin:4px 0 14px}
.tfdwe-group{background:#f7fafc;border:1px solid #e1eaf0;border-radius:12px;padding:12px;margin:12px 0}.tfdwe-group h3{font-size:14px;margin:0 0 11px}.tfdwe-two{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.tfdwe-row{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin:8px 0}
.tfdwe-btn{border:1px solid #c0d9e7;background:white;color:#1a3143;padding:10px 12px;border-radius:9px;font-weight:730;font-size:12px;cursor:pointer}
.tfdwe-btn.primary{background:#1a3143;color:white;border-color:#1a3143}.tfdwe-btn:disabled{opacity:.47;cursor:not-allowed}
.tfdwe-photo-stage{position:relative;overflow:hidden;aspect-ratio:1.65;background:#edf4f8;border-radius:12px;border:1px dashed #a7c5d6;cursor:grab;touch-action:none;user-select:none}
.tfdwe-photo-stage:active{cursor:grabbing}.tfdwe-photo-stage img{height:100%;width:100%;object-fit:cover;pointer-events:none;user-select:none}
.tfdwe-photo-stage[data-device="mobile"]{aspect-ratio:.9}
.tfdwe-photo-stage .tfdwe-stage-hint{pointer-events:none;position:absolute;bottom:9px;left:9px;padding:5px 8px;background:#f7fafce9;border-radius:7px;color:#25485d;font-size:11px}
.tfdwe-slider{display:grid;grid-template-columns:72px minmax(0,1fr) 42px;align-items:center;gap:8px;margin:11px 0;font-size:11px;color:#48697c}
.tfdwe-slider input{accent-color:#478bac;min-width:0;width:100%}
.tfdwe-divider{height:1px;background:#e1eaf0;margin:14px 0}
.tfdwe-status{padding:8px 17px;background:#edf8fc;border-top:1px solid #d8eaf0;color:#406980;font-size:12px;min-height:37px}
.tfdwe-chk{display:flex;gap:8px;align-items:flex-start;margin:11px 0;font-size:13px;color:#25475c}.tfdwe-chk input{margin-top:3px;accent-color:#407caa}
.tfdwe-history-item{border:1px solid #d8e5eb;border-radius:10px;padding:9px 10px;display:flex;justify-content:space-between;align-items:center;gap:9px;margin:7px 0}
.tfdwe-toast{position:absolute;z-index:3;top:80px;right:24px;max-width:min(420px,calc(100vw - 30px));padding:12px 16px;border:1px solid #bcded0;border-radius:12px;background:#f0fbf7;color:#185b42;box-shadow:0 9px 28px #1a314329;font-size:13px;font-weight:700;pointer-events:none}
.tfdwe-toast.error{background:#fff2ef;border-color:#edc5c0;color:#9f312e}
.tfdwe-toast[hidden],.tfdwe-key-entry[hidden]{display:none!important}
.tfdwe-key-error{min-height:0;font-size:12px;color:#a83431;margin:6px 0}

@media(max-width:800px){.tfdwe-modal{padding:0}.tfdwe-shell{height:100dvh;width:100%;border-radius:0}.tfdwe-main{grid-template-columns:1fr;overflow:auto}.tfdwe-controls{min-height:270px;overflow:visible;border-right:0;border-bottom:1px solid #dbe7ec}.tfdwe-workspace{min-height:480px}.tfdwe-frame-bar{justify-content:flex-start}.tfdwe-photo-stage{aspect-ratio:1.4}}

body{margin:0;background:#f4f8fa;font-family:system-ui;color:#1a3143} #siteEditorHome{padding:24px} .tfdwe-modal{padding:4px}.tfdwe-shell{height:96dvh} @media(max-width:600px){.tfdwe-head{flex-wrap:wrap}.tfdwe-head h2{font-size:16px}}