/* KNITFORM / My Studio. All styles scoped to account page. */
.kf-dashboard-shell{width:min(100%,1060px);transition:width .2s ease}
.kf-dashboard-shell:has(#kfMember[hidden]){width:min(100%,530px)}
.kf-dashboard-shell .account-heading{max-width:680px;margin-left:auto;margin-right:auto}
.kf-dashboard-shell .account-card{padding:clamp(20px,3.5vw,38px)}
.kf-dashboard-shell .account-notice{margin-bottom:23px}
.kf-dashboard-lead{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:24px}
.kf-dashboard-kicker{display:block;color:#8b6fb1;font-weight:800;font-size:10px;letter-spacing:.15em;margin-bottom:8px}
.kf-dashboard-lead h2{font-size:clamp(25px,3vw,32px);margin:0 0 6px}
.kf-dashboard-lead p{margin:0;max-width:560px}
.kf-dashboard-new{display:inline-flex;align-items:center;justify-content:center;min-height:45px;box-sizing:border-box;white-space:nowrap;text-decoration:none;font-size:13px;font-weight:800;color:#fff;background:#7353a0;border:1px solid #7353a0;border-radius:12px;padding:12px 18px;transition:background .15s ease,transform .15s ease}
.kf-dashboard-new:hover{color:#fff;background:#5b3b8a;transform:translateY(-1px)}
.kf-dashboard-overview{display:grid;grid-template-columns:minmax(0,1.8fr) minmax(190px,1fr);gap:14px;margin:0 0 32px}
.kf-dashboard-profile{margin:0;background:#f5f1fa;border:1px solid #eee6f5;padding:22px}
.kf-profile-label{font-size:11px!important;color:#876faa!important;font-weight:750}
.kf-dashboard-stat{display:flex;flex-direction:column;justify-content:center;gap:6px;background:#f2ebfa;border:1px solid #e4d6f2;border-radius:14px;padding:20px 22px}
.kf-dashboard-stat>span:first-child{font-size:12px;color:#6e5c81;font-weight:750}
.kf-dashboard-stat strong{color:#4e346f;font-size:31px;line-height:1.2;letter-spacing:-.04em;font-variant-numeric:tabular-nums}
.kf-dashboard-stat strong small{font-size:12px;font-weight:650;color:#9282a3;letter-spacing:0}
.kf-dashboard-stat .kf-stat-hint{font-size:11px;color:#837493}
.kf-mcp-connect{display:flex;align-items:center;justify-content:space-between;gap:24px;margin:0 0 30px;padding:22px;border:1px solid #d9c7ec;border-radius:16px;background:#f8f3fd}
.kf-mcp-connect h3{margin:0 0 7px;color:#3f3057;font-size:21px;letter-spacing:-.035em}
.kf-mcp-connect p{margin:0!important}
.kf-mcp-connect ol{margin:12px 0 8px;padding-left:20px;color:#58476c;font-size:13px;line-height:1.8}
.kf-mcp-connect .kf-mcp-connect-fallback{font-size:11px;color:#82728f}
.kf-mcp-connect-action{flex:0 0 215px}
.kf-mcp-connect-action .kf-dashboard-new{width:100%;font-family:inherit;cursor:pointer}
.kf-mcp-connect-action p{min-height:18px;margin:8px 0 0!important;color:#705d84;font-size:11px;line-height:1.5}
.kf-pattern-library{border-top:1px solid #eee6f4;padding-top:28px}
.kf-patterns-heading{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:17px}
.kf-patterns-heading h3{font-size:22px;color:#362a4c;margin:0 0 5px;letter-spacing:-.04em}
.kf-patterns-heading p{margin:0!important}
.kf-pattern-refresh{white-space:nowrap}
.kf-patterns-controls{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:9px;margin-bottom:12px}
.kf-pattern-search input,.kf-pattern-filter select{box-sizing:border-box;height:43px;max-width:100%;width:100%;padding:10px 13px;border:1px solid #dfd4e8;border-radius:10px;background:#fff;font:inherit;color:#4b3d5c;font-size:13px}
.kf-pattern-search input:focus-visible,.kf-pattern-filter select:focus-visible,.kf-pattern-open:focus-visible,.kf-pattern-delete:focus-visible,.kf-dashboard-new:focus-visible{outline:3px solid #d5c1ed;outline-offset:2px}
.kf-patterns-message{min-height:18px;font-size:12px!important;color:#7a698a!important;margin:0 0 14px!important}
.kf-patterns-message[data-error="true"]{color:#ab3f58!important}
.kf-pattern-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));list-style:none;padding:0;margin:0;gap:13px}
.kf-pattern-card{display:flex;flex-direction:column;min-width:0;border-radius:16px;background:#fff;border:1px solid #e7def1;padding:20px;box-shadow:0 5px 16px rgba(64,39,85,.045)}
.kf-pattern-card-top{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px}
.kf-pattern-mark{display:flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:12px;background:#eee4f8;color:#7654a5;font-size:23px}
.kf-pattern-badge{background:#f5f0fa;color:#73558f;border-radius:30px;padding:6px 10px;font-size:10px;font-weight:750;white-space:nowrap}
.kf-pattern-name{color:#352a46;font-size:17px;line-height:1.5;letter-spacing:-.025em;margin:0 0 5px;overflow-wrap:anywhere}
.kf-pattern-meta,.kf-pattern-date{font-size:12px!important;color:#81738e!important;margin:0 0 4px!important}
.kf-pattern-date{margin-bottom:17px!important}
.kf-pattern-actions{display:flex;align-items:center;gap:8px;margin-top:auto;padding-top:14px;border-top:1px solid #f0eaf5}
.kf-pattern-open,.kf-pattern-delete{font:inherit;font-size:12px;font-weight:750;padding:10px 13px;border-radius:9px;text-decoration:none;text-align:center;cursor:pointer}
.kf-pattern-open{flex:1;background:#7353a0;color:#fff;border:1px solid #7353a0}
.kf-pattern-open:hover{background:#5b3b8a;color:#fff}
.kf-pattern-delete{background:#fff;color:#a04f61;border:1px solid #ead3db}
.kf-pattern-delete:hover{background:#fff6f8}
.kf-pattern-delete:disabled{opacity:.55;cursor:wait}
.kf-patterns-empty{padding:35px 20px;text-align:center;border:1px dashed #ddccea;border-radius:16px;background:#fcfaff}
.kf-empty-symbol{color:#9372bf;font-size:35px;margin-bottom:8px}
.kf-patterns-empty strong{color:#443550;font-size:16px}
.kf-patterns-empty p{max-width:390px;margin:9px auto 15px!important}
.kf-patterns-empty .account-action{display:inline-block;text-decoration:none}
.kf-patterns-footnote{margin:17px 0 0!important;color:#898095!important;font-size:12px!important}
.kf-dashboard-utility{display:flex;justify-content:space-between;align-items:center;margin:30px 0 0;padding-top:18px;border-top:1px solid #eee7f3;color:#655773;font-size:13px;font-weight:750}
.kf-account-advanced{border:1px solid #e5dced;border-radius:14px;margin-top:20px;background:#faf8fd}
.kf-account-advanced>summary{cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:15px;padding:18px 20px;list-style:none;font-size:14px;font-weight:800;color:#4d3b62}
.kf-account-advanced>summary::-webkit-details-marker{display:none}
.kf-account-advanced>summary:after{content:'⌄';font-size:20px;color:#8b71a8}
.kf-account-advanced[open]>summary:after{transform:rotate(180deg)}
.kf-account-advanced>summary small{font-size:11px;font-weight:500;color:#847492}
.kf-account-advanced .kf-keys-panel{margin:0 15px 15px;background:#fff}
.kf-account-danger-zone{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:24px 0 0;margin-top:27px;border-top:1px solid #eee7f3}
.kf-account-danger-zone strong{font-size:13px;color:#6a4355}
.kf-account-danger-zone p{margin:5px 0 0!important;max-width:600px;font-size:12px!important}
@media(max-width:720px){
 .kf-dashboard-lead,.kf-patterns-heading,.kf-account-danger-zone{align-items:stretch;flex-direction:column}
 .kf-dashboard-new{align-self:stretch}
 .kf-dashboard-overview{grid-template-columns:1fr}
 .kf-mcp-connect{align-items:stretch;flex-direction:column;gap:16px}
 .kf-mcp-connect-action{flex-basis:auto}
 .kf-patterns-controls{grid-template-columns:1fr 1fr}
 .kf-pattern-search{grid-column:1/-1}
 .kf-pattern-grid{grid-template-columns:1fr}
 .kf-account-advanced>summary{align-items:flex-start;flex-direction:column;gap:2px}
 .kf-pattern-refresh{align-self:flex-start}
}
@media(max-width:420px){.kf-dashboard-utility{gap:12px;flex-wrap:wrap}.kf-account-danger-zone .danger{align-self:flex-start}}
/* Screen-reader labels remain accessible without adding visual clutter. */
.kf-dashboard-shell .sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}

.kf-antigravity-guide-link{display:block;text-align:center;margin-top:11px;padding:10px 6px;font-size:12px;font-weight:800;color:#6c4b95;text-decoration:underline;text-underline-offset:3px}
.kf-antigravity-guide-link:hover{color:#432e65}

/* Explicit opt-in read-only sharing. Controls remain visible on small screens. */
.kf-pattern-actions{flex-wrap:wrap}
.kf-pattern-share,.kf-pattern-revoke,.kf-pattern-copy{font:inherit;font-size:12px;font-weight:750;padding:10px 12px;border-radius:9px;text-align:center;cursor:pointer}
.kf-pattern-share{background:#f1eaf9;color:#68458f;border:1px solid #dfcfef}
.kf-pattern-copy{background:#edf8f2;color:#286d4d;border:1px solid #bee5cf}
.kf-pattern-revoke{background:#fff7f7;color:#a04f61;border:1px solid #ead3db}
.kf-pattern-share:disabled,.kf-pattern-copy:disabled,.kf-pattern-revoke:disabled{opacity:.55;cursor:wait}
.kf-patterns-share-help{font-size:12px!important;color:#795f95!important;line-height:1.7;margin:18px 0 7px!important}
