.kfm-panel, #kfm-settings-open, #kfm-debug { box-sizing:border-box; font:15px/1.5 system-ui,sans-serif; color:#182d28; background:#fff; }
.kfm-panel { width:min(560px,calc(100% - 24px)); padding:18px; border:1px solid #73867f; border-radius:12px; box-shadow:0 8px 35px #0003; }
.kfm-panel[hidden] { display:none!important; }
.kfm-panel h2 { margin:0 0 10px; font-size:20px; line-height:1.3; color:inherit; }
.kfm-panel p { margin:0 0 12px; color:inherit; }
.kfm-panel .kfm-details { font-size:14px; margin-bottom:14px; }
.kfm-panel a { color:#164c3b; text-decoration:underline; }
#kfm-banner { position:fixed; left:12px; bottom:66px; z-index:100000; max-height:calc(100dvh - 90px); overflow:auto; }
#kfm-settings { max-height:calc(100dvh - 32px); overflow:auto; }
#kfm-settings::backdrop { background:#0008; }
.kfm-actions { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.kfm-actions button, .kfm-close, #kfm-settings-open { min-height:44px; padding:10px 14px; border:2px solid #164c3b; border-radius:7px; font:600 15px/1.35 system-ui,sans-serif; color:#164c3b; background:#fff; cursor:pointer; text-align:center; }
.kfm-actions button:hover, .kfm-close:hover, #kfm-settings-open:hover { background:#eef5f1; }
.kfm-panel button:focus-visible, .kfm-panel a:focus-visible, #kfm-settings-open:focus-visible { outline:3px solid #b45d00; outline-offset:3px; }
.kfm-close { margin-top:12px; font-weight:400; }
#kfm-settings-open { position:fixed; left:12px; bottom:12px; z-index:99999; box-shadow:0 2px 12px #0002; }
#kfm-debug { position:fixed; right:12px; top:44px; z-index:100001; max-width:min(370px,calc(100% - 24px)); max-height:40dvh; overflow:auto; padding:12px; border:2px solid #614d00; border-radius:8px; font-size:12px; }
#kfm-debug summary { cursor:pointer; font-weight:700; }
#kfm-debug dl { display:grid; grid-template-columns:1fr 1fr; gap:4px 12px; margin:8px 0; }
#kfm-debug dd { margin:0; overflow-wrap:anywhere; }
#kfm-debug p { margin:8px 0 0; }
@media (max-width:420px) { .kfm-panel { padding:16px; } .kfm-actions { grid-template-columns:1fr; } #kfm-debug { top:12px; } }
@media (prefers-reduced-motion:reduce) { .kfm-panel, #kfm-settings-open { scroll-behavior:auto; } }
