.kfw {
    --kfw-accent: #e5dcc5;
    --kfw-on-accent: #ffffff;
    --kfw-button-background: rgba(229, 220, 197, .8);
    --kfw-ink: #435e52;
    --kfw-muted: #68766e;
    --kfw-ratio: 4 / 3;
    font-family: inherit;
    color: var(--kfw-ink);
    background: transparent;
    max-width: 920px;
    margin: 24px auto;
    line-height: 1.55;
    isolation: isolate;
}
.kfw *, .kfw *::before, .kfw *::after { box-sizing: border-box; }
.kfw [hidden] { display: none !important; }
.kfw .kfw-description { margin: 0 0 24px; text-align: center; color: var(--kfw-muted); font-size: clamp(17px, 2vw, 23px); font-weight: 400; }
.kfw-controls { border: 0; margin: 0; padding: 0; min-width: 0; }
.kfw-upload { border: 1.5px dashed #ced7ce; background: #fff; border-radius: 14px; text-align: center; padding: 32px 24px 26px; }
.kfw-stage { position: relative; }
.kfw-upload-copy { display: flex; flex-direction: column; align-items: center; gap: 15px; padding: 4px 0 0; }
.kfw-upload-copy > svg { width: 32px; height: 32px; margin-bottom: 7px; color: #b5a77e; }
.kfw-upload-copy strong { font-size: clamp(18px, 2vw, 22px); font-weight: 550; }
.kfw-upload-copy > span { color: var(--kfw-muted); font-size: 15px; max-width: 460px; }
.kfw-upload-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.kfw .kfw-file-button { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 11px 19px; border: 1px solid #dbe1d8; border-radius: 8px; background: #fff; color: var(--kfw-ink); font: inherit; font-size: 15px; line-height: 1.4; font-weight: 450; cursor: pointer; overflow: hidden; text-transform: none; letter-spacing: normal; }
.kfw-file-button svg { width: 21px; height: 21px; }
.kfw-file-button input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.kfw-file-button:focus-within, .kfw button:focus-visible, .kfw a:focus-visible { outline: 2px solid var(--kfw-ink); outline-offset: 4px; }
.kfw .kfw-file-button:hover { background: #f6f7f3; }
.kfw-file-info { display: block; font-size: 12px; color: var(--kfw-muted); margin-top: 18px; overflow-wrap: anywhere; }
.kfw.kfw-has-photo .kfw-upload { padding: 0 0 18px; border-style: solid; }
.kfw.kfw-has-photo .kfw-stage { aspect-ratio: var(--kfw-ratio); background: #f4f5f1; overflow: hidden; border-radius: 12px 12px 0 0; }
.kfw.kfw-has-photo .kfw-upload-actions { margin: 18px 12px 0; }
.kfw.kfw-has-photo .kfw-file-info { margin: 12px 12px 0; }
.kfw-preview { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
.kfw .kfw-progress { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: clamp(12px, 3vw, 32px); background: rgba(20, 33, 26, .68); color: #fff; text-align: center; backdrop-filter: blur(2px); }
.kfw-progress strong { font-weight: 550; font-size: clamp(15px, 2vw, 20px); }
.kfw .kfw-progress p { font-size: clamp(12px, 1.5vw, 15px); color: #fff; margin: 8px 0 0; max-width: 340px; }
.kfw-spinner { width: 36px; height: 36px; flex-shrink: 0; border: 2px solid rgba(255, 255, 255, .3); border-top-color: #fff; border-radius: 50%; margin-bottom: 17px; animation: kfw-spin 1s linear infinite; }
.kfw-result-actions { position: absolute; inset: auto 0 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; padding: 36px 14px 14px; background: linear-gradient(transparent, rgba(0, 0, 0, .24)); pointer-events: none; }
.kfw .kfw-icon-button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 10px; background: rgba(255, 255, 255, .95); color: #344d40; border: 1px solid rgba(255, 255, 255, .65); border-radius: 50%; cursor: pointer; text-decoration: none; pointer-events: auto; box-shadow: 0 2px 8px rgba(0, 0, 0, .1); }
.kfw .kfw-icon-button:hover { background: #fff; }
.kfw.kfw-has-result .kfw-file-info { display: none; }
.kfw .kfw-disclaimer { margin: 12px 12px 0; color: var(--kfw-muted); font-size: 12px; text-align: center; overflow-wrap: anywhere; }
.kfw-consent { display: flex; gap: 9px; align-items: flex-start; font-size: 11px; color: var(--kfw-muted); margin: 18px 0; cursor: pointer; }
.kfw-consent input { width: 16px; height: 16px; flex: 0 0 16px; margin: 2px 0 0; accent-color: var(--kfw-ink); }
.kfw-consent a { color: inherit; text-decoration: underline; }
.kfw .kfw-generate { position: absolute; z-index: 1; top: 50%; left: 50%; transform: translate(-50%, -50%); width: max-content; max-width: calc(100% - 32px); margin: 0; white-space: normal; overflow-wrap: anywhere; display: flex; align-items: center; justify-content: center; gap: 12px; border: 0; border-radius: 10px; background: var(--kfw-button-background); color: var(--kfw-on-accent); padding: 19px 20px; font-family: inherit; font-size: 18px; font-weight: 500; cursor: pointer; line-height: 1.4; transition: filter .15s; text-transform: none; letter-spacing: normal; }
.kfw .kfw-generate:hover { filter: brightness(.96); }
.kfw .kfw-generate svg { flex-shrink: 0; }
.kfw-controls:disabled .kfw-file-button, .kfw-controls:disabled .kfw-generate { cursor: wait; opacity: .55; }
.kfw-controls:disabled .kfw-consent { opacity: .55; }
.kfw .kfw-error { background: #fff3ef; color: #86372b; border: 1px solid #efd5cd; padding: 13px 16px; border-radius: 8px; font-size: 13px; margin: 16px 0; }
.kfw-check-status { margin-top: 12px; }
.kfw-lightbox { padding: 0; border: 0; border-radius: 10px; background: #111; max-width: 96vw; max-height: 95vh; margin: auto; overflow: visible; }
.kfw-lightbox::backdrop { background: rgba(12, 22, 17, .9); }
.kfw-lightbox img { display: block; max-width: 94vw; max-height: 90vh; object-fit: contain; border-radius: 10px; }
.kfw .kfw-close { position: absolute; right: 10px; top: 10px; width: 44px; height: 44px; border: 1px solid #ccc; border-radius: 50%; background: white; color: #172d21; font-size: 29px; line-height: 1; cursor: pointer; padding: 0; z-index: 1; }
.kfw-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.kfw-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@keyframes kfw-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .kfw-spinner { animation: none; border-style: dotted; } .kfw .kfw-generate { transition: none; } }
@media (max-width: 480px) {
    .kfw { margin: 18px auto; }
    .kfw .kfw-description { margin-bottom: 18px; }
    .kfw-upload { padding: 25px 15px 21px; }
    .kfw-upload-actions { gap: 8px; }
    .kfw .kfw-file-button { font-size: 13px; padding: 10px 12px; }
    .kfw-upload-copy > span { font-size: 14px; }
    .kfw .kfw-generate { font-size: 16px; padding: 17px; }
    .kfw-result-actions { padding: 25px 10px 10px; }
    .kfw .kfw-progress { padding: 10px; }
    .kfw-spinner { width: 28px; height: 28px; margin-bottom: 8px; }
}
