/* The Contact corner (2026-10-19). One button in a corner of every page; it
   opens a panel of fixed height: a list (three kinds of message, plus the
   one-tap "Result not quite right?" chips on the generator), a form for the
   kind picked, and a thank-you. Switching between them never changes the
   panel's size (her rule: a panel does not grow and shrink as you click).
   Ordinary pages: bottom-right of the screen. Generator and editor: the
   bottom-right of the work area, placed by contact.js, because the screen's
   corner there is the PNG.zip button.
   Every selector starts with .kp-contact, so page rules for button, input
   and label do not reach in (see FRONTEND.md, "rules for components"). */

.kp-contact *{box-sizing:border-box}
.kp-contact [hidden]{display:none!important}
.kp-contact input,.kp-contact button,.kp-contact textarea,.kp-contact select{font-family:inherit;margin:0}
.kp-contact h1,.kp-contact h2,.kp-contact h3,.kp-contact p,.kp-contact label,.kp-contact ul,.kp-contact li{margin:0;padding:0}
.kp-contact button{padding:0;border:0;background:none}

.kp-contact{position:fixed;right:20px;bottom:20px;z-index:900;display:flex;flex-direction:column;align-items:flex-end;
  font-family:"Archivo",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:13px;line-height:1.45;color:#1B2A21;
  transition:transform .2s ease}

/* the corner button */
.kp-contact .kc-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:34px;padding:0 14px;border-radius:999px;
  border:1px solid #AEBBAF;background:rgba(244,243,235,.94);color:#2E4A38;font-size:13px;font-weight:650;cursor:pointer;
  box-shadow:0 4px 14px rgba(18,31,22,.12)}
.kp-contact .kc-btn svg{display:none;width:18px;height:18px}
.kp-contact .kc-btn[aria-expanded="true"]{background:#fff;border-color:#2E4A38}

/* the panel: same size whichever view is showing */
.kp-contact .kc-panel{position:absolute;right:0;bottom:calc(100% + 8px);width:290px;height:300px;padding:14px;
  background:#F4F3EB;border:1px solid rgba(27,42,33,.16);border-radius:12px;box-shadow:0 14px 40px rgba(18,31,22,.24)}
.kp-contact.kc-chips-on .kc-panel{height:344px}
.kp-contact .kc-view{height:100%;display:flex;flex-direction:column;gap:7px}
.kp-contact .kc-head{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:26px;margin-bottom:2px}
.kp-contact .kc-head h2{font-size:14px;font-weight:650;color:#1B2A21;letter-spacing:0;text-transform:none}
.kp-contact .kc-x{width:26px;height:26px;display:grid;place-items:center;flex:none;border-radius:6px;color:#5C6B60;cursor:pointer}
.kp-contact .kc-x svg{width:11px;height:11px}
.kp-contact .kc-back{display:inline-flex;align-items:center;gap:7px;min-width:0;font-size:14px;font-weight:650;color:#1B2A21;cursor:pointer}
.kp-contact .kc-back svg{width:10px;height:10px;flex:none;color:#2E4A38}

/* the three kinds: bordered rows that read as buttons */
.kp-contact .kc-opt{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:9px 12px;border-radius:8px;
  border:1px solid #AEBBAF;background:#E1E7DE;color:#2E4A38;font-size:13px;font-weight:600;text-align:left;cursor:pointer}
.kp-contact .kc-opt svg{width:10px;height:10px;flex:none}

/* the result chips (generator only) */
.kp-contact .kc-rule{height:1px;background:rgba(27,42,33,.16);margin:5px 0 2px}
.kp-contact .kc-sub{font-size:12px;font-weight:650;color:#5C6B60;letter-spacing:0;text-transform:none}
.kp-contact .kc-chips{display:flex;flex-wrap:wrap;gap:6px}
.kp-contact .kc-chip{padding:4px 10px;border-radius:999px;border:1px solid #AEBBAF;background:#E1E7DE;color:#2E4A38;font-size:12px;font-weight:600;cursor:pointer}
.kp-contact .kc-chip:disabled{opacity:.45;cursor:default}
/* the support address, at the foot of the list on pages without the chips */
.kp-contact .kc-mail{margin-top:auto;font-size:12px;color:#5C6B60}
.kp-contact .kc-mail a{color:#2E4A38;font-weight:600;text-decoration:underline;text-underline-offset:2px}
.kp-contact.kc-chips-on .kc-mail{display:none}
.kp-contact .kc-chip.kc-on{opacity:1;background:#2E4A38;border-color:#2E4A38;color:#F4F3EB}

/* the form */
.kp-contact .kc-form label{display:block;font-size:12px;font-weight:650;color:#5C6B60;letter-spacing:0;text-transform:none}
.kp-contact .kc-form textarea,.kp-contact .kc-form input{width:100%;padding:7px 9px;border:1px solid #AEBBAF;border-radius:6px;background:#fff;color:#1B2A21;font-size:13px}
.kp-contact .kc-form textarea{flex:1;min-height:0;resize:none}
.kp-contact .kc-form input.kc-bad{border-color:#C05A44}
.kp-contact .kc-note{font-size:11px;line-height:1.4;color:#5C6B60}
.kp-contact .kc-trap{position:absolute;left:-9999px;width:1px;height:1px;opacity:0}
.kp-contact .kc-foot{display:flex;align-items:center;justify-content:space-between;gap:10px}
.kp-contact .kc-status{font-size:11.5px;color:#C05A44;min-width:0}
.kp-contact .kc-send{flex:none;padding:7px 18px;border-radius:6px;background:#2E4A38;color:#F4F3EB;font-size:12.5px;font-weight:650;cursor:pointer}
.kp-contact .kc-send:disabled{opacity:.6;cursor:default}

/* thank-you */
.kp-contact .kc-done{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;text-align:center;color:#5C6B60;font-size:13px}
.kp-contact .kc-done strong{font-size:15px;color:#2E4A38}
.kp-contact .kc-done .kc-opt{width:auto;justify-content:center;padding:7px 22px;margin-top:6px}

/* hover and focus, written per element at (0,3,x) so page rules such as
   button:hover:not(:disabled) at (0,2,1) cannot win */
.kp-contact .kc-btn.kc-btn:hover{background:#fff;border-color:#2E4A38}
.kp-contact .kc-panel .kc-opt:hover{background:#fff;border-color:#2E4A38}
.kp-contact .kc-panel .kc-chip:not(:disabled):hover{background:#fff;border-color:#2E4A38}
.kp-contact .kc-panel .kc-x:hover{background:#E9EDE4;color:#1B2A21}
.kp-contact .kc-panel .kc-mail a:hover{color:#1B2A21}
.kp-contact .kc-panel .kc-back:hover span{text-decoration:underline}
.kp-contact .kc-panel .kc-send:not(:disabled):hover{background:#23372C}
.kp-contact .kc-btn.kc-btn:focus-visible,.kp-contact .kc-panel button:focus-visible,
.kp-contact .kc-panel textarea:focus-visible,.kp-contact .kc-panel input:focus-visible{outline:2px solid #2E4A38;outline-offset:2px}
.kp-contact .kc-panel.kc-panel:focus{outline:none}

/* Phones: a round icon, and the panel nearly as wide as the screen. When the
   "Download again" bar is up along the bottom, the corner moves above it. */
@media (max-width:560px){
  .kp-contact{right:12px;bottom:12px}
  .kp-contact .kc-btn{width:44px;height:44px;padding:0}
  .kp-contact .kc-btn svg{display:block}
  .kp-contact .kc-btn .kc-label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  .kp-contact .kc-panel{width:calc(100vw - 24px)}
  body:has(.kp-again:not([hidden])) .kp-contact{transform:translateY(-96px)}
}
@media (prefers-reduced-motion:reduce){.kp-contact{transition:none}}
