/* Kastro Frame Studio / namespaced styles only. No theme-wide selectors. */
.kfs-root, .kfs-panel { --kfs-black:#151515; --kfs-ink:#222; --kfs-muted:#747474; --kfs-red:#d92c2b; --kfs-line:#e4e4e4; box-sizing:border-box; font-family:inherit; }
.kfs-root *, .kfs-panel * { box-sizing:border-box; }
.kfs-root .kfs-launch { display:inline-flex; align-items:center; justify-content:center; gap:12px; min-height:52px; border:1px solid #171717; background:#161616; color:#fff; letter-spacing:.095em; font-size:12px; font-weight:800; padding:13px 24px; border-radius:2px; cursor:pointer; font-family:inherit; max-width:100%; white-space:normal; text-align:center; transition:background .2s ease; }
.kfs-root .kfs-launch:hover { background:#b52222; border-color:#b52222; }
.kfs-root .kfs-launch span { font-size:21px; font-weight:400; }
.kfs-root .kfs-setup-note { background:#fff3d2; padding:12px 15px; font-size:13px; }
.kfs-panel[hidden], .kfs-loading[hidden] { display:none !important; }
.kfs-dialog-open { overflow:hidden; }
.kfs-panel.kfs-modal { position:fixed; inset:0; background:rgba(0,0,0,.86); z-index:2147483000; overflow:auto; padding:clamp(10px,3vw,40px); -webkit-overflow-scrolling:touch; }
.kfs-panel .kfs-dialog { margin:0 auto; background:#fff; color:#171717; border-radius:3px; width:min(1050px,100%); box-shadow:0 8px 48px rgba(0,0,0,.15); }
.kfs-panel.kfs-inline { width:100%; max-width:1060px; }
.kfs-panel.kfs-inline .kfs-dialog { border:1px solid #dedede; }
.kfs-panel .kfs-topbar { display:flex; justify-content:space-between; gap:12px; align-items:center; padding:19px clamp(16px,3vw,31px); border-bottom:1px solid #e4e4e4; }
.kfs-panel .kfs-eyebrow { color:#b02424; font-size:10px; letter-spacing:.22em; font-weight:900; }
.kfs-panel .kfs-title { font-size:clamp(18px,2.5vw,25px); font-weight:800; line-height:1.2; margin-top:4px; }
.kfs-panel .kfs-size { color:#777; font-size:12px; margin-top:4px; }
.kfs-panel .kfs-close { flex:none; background:#151515; color:#fff; width:39px; height:39px; font-size:27px; font-weight:400; cursor:pointer; border:0; border-radius:0; display:flex; justify-content:center; align-items:center; padding:0; }
.kfs-panel .kfs-close:hover { background:#b52222; }
.kfs-panel .kfs-stage { background:#f5f4f0; padding:12px; width:100%; min-height:230px; display:flex; position:relative; align-items:center; justify-content:center; overflow:hidden; transition:background .2s; }
.kfs-panel .kfs-stage.is-dark { background:#252525; }
.kfs-panel .kfs-stage canvas { display:block; max-width:100%; height:auto; filter:drop-shadow(0px 5px 6px rgba(0,0,0,.22)); }
.kfs-panel .kfs-loading { position:absolute; bottom:18px; left:50%; transform:translateX(-50%); border:1px solid #ddd; background:#fff; padding:9px 14px; font-size:12px; color:#333; z-index:2; white-space:nowrap; max-width:95%; }
.kfs-panel .kfs-controls { padding:17px clamp(15px,3vw,30px) 23px; }
.kfs-panel .kfs-control-heading { font-size:12px; letter-spacing:.1em; color:#2c2c2c; font-weight:800; margin-bottom:13px; }
.kfs-panel .kfs-control-heading span { font-size:11px; color:#858585; font-weight:400; letter-spacing:0; margin-left:6px; }
.kfs-panel .kfs-frames { display:grid; grid-template-columns:repeat(auto-fill,minmax(142px,1fr)); gap:8px; }
.kfs-panel .kfs-frame-item { border:1px solid #e3e3e3; border-radius:2px; background:#fff; text-align:left; min-width:0; min-height:75px; padding:8px; display:flex; align-items:center; gap:9px; cursor:pointer; color:#2d2d2d; font-size:11px; line-height:1.3; font-weight:600; font-family:inherit; }
.kfs-panel .kfs-frame-item:hover { border-color:#666; }
.kfs-panel .kfs-frame-item.is-active { border:2px solid #bb2525; padding:7px; background:#fff7f7; }
.kfs-panel .kfs-frame-swatch { display:flex; background-color:#eee; background-size:cover; background-position:center; justify-content:center; align-items:center; font-size:20px; width:46px; height:45px; flex:none; border:1px solid #eee; }
.kfs-panel .kfs-frame-name { display:block; overflow-wrap:anywhere; }
.kfs-panel .kfs-actions { margin-top:16px; padding-top:15px; border-top:1px solid #eee; display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; }
.kfs-panel .kfs-current { font-size:12px; font-weight:700; max-width:480px; }
.kfs-panel .kfs-buttons { display:flex; flex-wrap:wrap; gap:7px; }
.kfs-panel .kfs-action { background:#f6f6f6; color:#191919; border:1px solid #ddd; padding:10px 13px; min-height:42px; font-size:12px; font-weight:700; font-family:inherit; cursor:pointer; }
.kfs-panel .kfs-action:hover { background:#e8e8e8; }
.kfs-panel .kfs-action-primary { background:#171717; color:#fff; border-color:#171717; }
.kfs-panel .kfs-action-primary:hover { background:#a91c1c; color:#fff; border-color:#a91c1c; }
.kfs-panel .kfs-action:disabled { opacity:.55; cursor:wait; }
.kfs-panel .kfs-disclaimer { font-size:11px; color:#797979; margin-top:12px; line-height:1.6; }
.kfs-panel .kfs-error { color:#aa1e1e; font-size:12px; line-height:1.4; margin-top:6px; }
.kfs-panel :is(button):focus-visible, .kfs-root button:focus-visible { outline:3px solid #d92c2b; outline-offset:2px; }
@media (max-width:560px) { .kfs-panel.kfs-modal { padding:0; } .kfs-panel .kfs-dialog { border-radius:0; } .kfs-panel .kfs-topbar { padding:15px; } .kfs-panel .kfs-stage { min-height:185px; padding:10px; } .kfs-panel .kfs-frames { grid-template-columns:repeat(2,minmax(0,1fr)); } .kfs-panel .kfs-current { width:100%; } .kfs-panel .kfs-buttons { width:100%; } .kfs-panel .kfs-action { flex:1; } }
