
.kf-body {
    margin: 0;
    height: 100dvh;
    overflow: hidden;
    background: #fff;
    color: var(--color-text);
    font-family: var(--font-family);
}
.kf-app {
    display: grid;
    grid-template-rows: auto auto 1fr;
    height: 100dvh;
}
.kf-bar {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 0.6rem 1.5rem;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
}
.kf-logo img {
    height: 38px;
    width: auto;
    display: block;
}
.kf-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-gray-light);
    margin: 0;
    padding-left: 1.25rem;
    border-left: 1px solid var(--color-border);
}
.kf-bar-right {
    margin-left: auto;
    display: flex;
    gap: 1.25rem;
}
.kf-bar-link {
    color: var(--color-gray);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
}
.kf-bar-link:hover { color: #000; text-decoration: underline; }
.kf-steps {
    display: flex;
    margin-left: 0;
    justify-content: flex-start;
    background: var(--color-gray);
    overflow-x: auto;
    scrollbar-width: none;
}
.kf-steps::-webkit-scrollbar { display: none; }
.kf-step {
    flex: 0 0 auto;
    background: none;
    border: 0;
    color: rgba(255, 255, 255, 0.65);
    font: 500 0.92rem var(--font-family);
    padding: 0.85rem 1.1rem;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}
.kf-step:hover { color: #fff; }
.kf-step.is-active {
    color: #fff;
    border-bottom-color: var(--color-yellow);
    font-weight: 700;
}
.kf-step.is-done::after {
    content: '✓';
    color: var(--color-yellow);
    margin-left: 0.4rem;
    font-size: 0.8rem;
}
.kf-main {
    display: grid;
    grid-template-columns: 1fr 400px;
    min-height: 0;
}
.kf-viewer {
    position: relative;
    min-height: 0;
    overflow: hidden;
    background: #dfe8f0 center / cover no-repeat;
}
.kf-canvas {
    position: absolute;
    inset: 0;
    touch-action: none;
}
.kf-labels {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.kf-dim {
    position: absolute;
    left: 0;
    top: 0;
    background: rgba(255, 255, 255, 0.92);
    color: var(--color-gray);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}
.kf-tools {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.kf-tool {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 0;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: var(--transition);
}
.kf-tool svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: var(--color-gray);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.kf-tool:hover { transform: scale(1.06); }
.kf-tool.is-on { background: var(--color-yellow); }
.kf-hint, .kf-note {
    position: absolute;
    left: 1rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 6px;
    font-size: 0.78rem;
    color: var(--color-gray-light);
    padding: 0.35rem 0.6rem;
    pointer-events: none;
}
.kf-hint { top: 1rem; transition: opacity 0.6s; }
.kf-note { bottom: 1rem; max-width: 60%; }
.kf-fallback {
    position: absolute;
    inset: 30% 10% auto;
    background: #fff;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}
.kf-movebar[hidden] { display: none !important; }
.kf-movebar {
    position: absolute;
    left: 50%;
    top: 1rem;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.4rem 0.6rem;
    border-radius: 50px;
    box-shadow: var(--shadow-md);
    font-size: 0.8rem;
    color: var(--color-gray-light);
    z-index: 2;
}
@media (max-width: 900px) {
    .kf-movebar { top: auto; bottom: 2.6rem; font-size: 0.72rem; }
    .kf-movebar span { display: none; }
}
.kf-panel {
    display: grid;
    grid-template-rows: 1fr auto;
    min-height: 0;
    border-left: 1px solid var(--color-border);
    background: #fff;
}
.kf-panel-body {
    overflow-y: auto;
    padding: 1.5rem 1.4rem 2rem;
}
.kf-panel-body h2 {
    font-size: 1.35rem;
    margin: 0 0 0.3rem;
    color: var(--color-gray);
}
.kf-sub {
    color: var(--color-gray-light);
    font-size: 0.9rem;
    margin: 0 0 1.25rem;
    line-height: 1.5;
}
.kf-group { margin-bottom: 1.6rem; }
.kf-group-title {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #888;
    margin: 0 0 0.6rem;
}
.kf-cards { display: grid; gap: 0.6rem; }
.kf-cards.cols-2 { grid-template-columns: 1fr 1fr; }
.kf-card {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    width: 100%;
    text-align: left;
    background: #fff;
    border: 2px solid var(--color-border);
    border-radius: 10px;
    padding: 0.7rem 0.8rem;
    cursor: pointer;
    font: inherit;
    color: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.kf-card:hover { border-color: #c9ced6; }
.kf-card.is-selected {
    border-color: var(--color-yellow);
    box-shadow: 0 0 0 3px rgba(255, 192, 0, 0.18);
}
.kf-card:disabled { opacity: 0.45; cursor: not-allowed; }
.kf-card img {
    width: 76px;
    height: 56px;
    object-fit: cover;
    border-radius: 6px;
    flex: 0 0 auto;
    max-width: none;
    background: #eef0f2;
}
.kf-card-title { display: block; font-weight: 700; font-size: 0.95rem; color: var(--color-gray); }
.kf-card-desc { display: block; font-size: 0.8rem; color: #777; margin-top: 0.15rem; line-height: 1.35; }
.kf-swatch {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex: 0 0 auto;
    border: 1px solid rgba(0, 0, 0, 0.15);
}
.kf-swatch.is-ral {
    background: conic-gradient(#c1121f, #ffc000, #2d6a4f, #1d4e89, #6c3483, #c1121f);
}
.kf-num { margin-bottom: 1.3rem; }
.kf-num-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.45rem;
}
.kf-num-head label { font-weight: 700; color: var(--color-gray); }
.kf-num-head span { font-size: 0.8rem; color: #888; }
.kf-num-row {
    display: grid;
    grid-template-columns: 40px 1fr 40px;
    gap: 0.5rem;
    align-items: center;
}
.kf-num-row button {
    height: 40px;
    border: 1px solid var(--color-border);
    background: #f4f5f7;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--color-gray);
}
.kf-num-field { position: relative; }
.kf-num-field input {
    width: 100%;
    height: 40px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    text-align: center;
    font: 700 1rem var(--font-family);
    color: var(--color-gray);
    padding-right: 2rem;
}
.kf-num-field em {
    position: absolute;
    right: 0.7rem;
    top: 50%;
    transform: translateY(-50%);
    font-style: normal;
    font-size: 0.8rem;
    color: #888;
}
.kf-num input[type=range] {
    width: 100%;
    margin-top: 0.6rem;
    accent-color: var(--color-yellow);
}
.kf-info {
    background: var(--color-bg);
    border-left: 3px solid var(--color-yellow);
    border-radius: 6px;
    padding: 0.75rem 0.9rem;
    font-size: 0.85rem;
    color: var(--color-gray-light);
    line-height: 1.5;
    margin-bottom: 1.2rem;
}
.kf-info strong { color: var(--color-gray); }
.kf-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.kf-chip {
    border: 2px solid var(--color-border);
    background: #fff;
    border-radius: 999px;
    padding: 0.4rem 0.8rem;
    font: 600 0.85rem var(--font-family);
    color: var(--color-gray);
    cursor: pointer;
}
.kf-chip.is-selected { border-color: var(--color-yellow); background: #fff8e0; }
.kf-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--color-border);
}
.kf-toggle input { width: 20px; height: 20px; accent-color: var(--color-yellow); }
.kf-input, .kf-select, .kf-textarea {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 0.7rem 0.8rem;
    font: 0.95rem var(--font-family);
    color: var(--color-text);
    background: #fff;
}
.kf-textarea { min-height: 90px; resize: vertical; }
.kf-form { display: grid; gap: 0.7rem; }
.kf-form .row-2 { display: grid; grid-template-columns: 1fr 2fr; gap: 0.7rem; }
.kf-form label.kf-lbl { font-size: 0.82rem; font-weight: 600; color: var(--color-gray); display: block; margin-bottom: 0.25rem; }
.kf-consent {
    display: flex;
    gap: 0.6rem;
    font-size: 0.8rem;
    color: var(--color-gray-light);
    line-height: 1.45;
}
.kf-consent input { margin-top: 0.15rem; accent-color: var(--color-yellow); }
.kf-consent a { color: var(--color-gray); }
.kf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.kf-summary {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    margin-bottom: 1.2rem;
}
.kf-summary td {
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--color-border);
    vertical-align: top;
}
.kf-summary td:first-child { color: #888; width: 42%; padding-right: 0.6rem; }
.kf-summary td:last-child { font-weight: 600; color: var(--color-gray); }
.kf-links { display: flex; gap: 0.5rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.kf-nav {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 0.6rem;
    padding: 0.9rem 1.4rem calc(0.9rem + env(safe-area-inset-bottom));
    border-top: 1px solid var(--color-border);
    background: #fff;
}
.kf-btn {
    border: 0;
    border-radius: 50px;
    padding: 0.85rem 1.2rem;
    font: 700 0.95rem var(--font-family);
    cursor: pointer;
    transition: var(--transition);
}
.kf-btn:disabled { opacity: 0.4; cursor: default; }
.kf-btn-ghost { background: #fff; border: 2px solid var(--color-border); color: var(--color-gray); }
.kf-btn-dark { background: var(--color-gray); color: #fff; }
.kf-btn-dark:hover { background: #000; }
.kf-btn-yellow { background: var(--color-yellow); color: var(--color-gray); }
.kf-btn-yellow:hover { filter: brightness(0.95); }
.kf-btn-small { padding: 0.5rem 0.9rem; font-size: 0.82rem; }
.kf-btn-block { width: 100%; }
.kf-success { text-align: center; padding: 2rem 0.5rem; }
.kf-success .icon { font-size: 2.6rem; margin-bottom: 0.8rem; }
.kf-success h3 { color: var(--color-gray); margin-bottom: 0.5rem; }
.kf-success p { color: #666; line-height: 1.5; }
.kf-toast {
    position: fixed;
    left: 50%;
    bottom: 1.5rem;
    transform: translateX(-50%);
    background: var(--color-gray);
    color: #fff;
    padding: 0.7rem 1.1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    z-index: 50;
    box-shadow: var(--shadow-lg);
}
@media (max-width: 900px) {
    .kf-main {
        grid-template-columns: 1fr;
        grid-template-rows: 42dvh 1fr;
    }
    .kf-panel { border-left: 0; border-top: 1px solid var(--color-border); }
    .kf-panel-body { padding: 1.1rem 1rem 1.5rem; }
    .kf-nav { padding-left: 1rem; padding-right: 1rem; }
    .kf-bar { padding: 0.5rem 1rem; gap: 0.75rem; }
    .kf-logo img { height: 30px; }
    .kf-title { font-size: 0.9rem; padding-left: 0.75rem; }
    .kf-hide-sm { display: none; }
    .kf-tools { top: 0.6rem; right: 0.6rem; gap: 0.45rem; }
    .kf-tool { width: 38px; height: 38px; }
    .kf-hint { display: none; }
    .kf-note { left: 0.6rem; bottom: 0.6rem; max-width: 70%; font-size: 0.7rem; }
    .kf-step { padding: 0.7rem 0.85rem; font-size: 0.85rem; }
}
@media (max-width: 420px) {
    .kf-title { display: none; }
    .kf-cards.cols-2 { grid-template-columns: 1fr; }
}
.kf-projbar {
    position: absolute; left: 0.75rem; bottom: 2.6rem; z-index: 3; max-width: calc(100% - 5rem);
    display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem;
    padding: 0.4rem 0.5rem; border-radius: 10px; background: rgba(255, 255, 255, 0.92); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}
.kf-projbar .kf-chip { padding: 0.3rem 0.6rem; font-size: 0.78rem; }
.kf-proj-title { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #3c3c3c; margin-right: 0.2rem; }
@media (max-width: 900px) { .kf-projbar { bottom: 4.6rem; } }
.kf-nav[hidden] { display: none !important; }
.kf-projbar .kf-chip-reset { border-color: #c0392b; color: #c0392b; }
.kf-start[hidden] { display: none !important; }
.kf-start { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; padding: 16px; background: rgba(30, 32, 34, 0.45); backdrop-filter: blur(3px); }
.kf-start-box { width: min(720px, 100%); background: #fff; border-radius: 16px; padding: 1.6rem; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25); }
.kf-start-box h2 { margin: 0 0 1rem; font-size: 1.35rem; color: #3c3c3c; }
.kf-start-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.kf-start-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 0.4rem; text-align: left; padding: 1.1rem; border: 2px solid #e4e4e4; border-radius: 12px; background: #fff; cursor: pointer; font: inherit; }
.kf-start-opt:hover { border-color: var(--color-yellow, #ffc000); background: #fffaf0; }
.kf-start-ico { font-size: 1.8rem; line-height: 1; }
@media (max-width: 640px) { .kf-start-opts { grid-template-columns: 1fr; } }
.kf-busy[hidden] { display: none !important; }
.kf-busy { position: absolute; top: 3.2rem; left: 50%; transform: translateX(-50%); z-index: 5; display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 1rem; border-radius: 999px; background: #3c3c3c; color: #fff; font-size: 0.85rem; box-shadow: 0 6px 20px rgba(0,0,0,0.2); }
.kf-spin { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.35); border-top-color: #ffc000; border-radius: 50%; animation: kf-spin 0.8s linear infinite; }
@keyframes kf-spin { to { transform: rotate(360deg); } }
.kf-house-colors { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
.kf-house-colors label { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.4rem 0.6rem; border: 1px solid #e4e4e4; border-radius: 8px; font-size: 0.85rem; }
.kf-house-colors input[type=color] { width: 36px; height: 26px; border: 0; padding: 0; background: none; cursor: pointer; }
.kf-walkbar[hidden] { display: none !important; }
.kf-walkbar { flex-wrap: wrap; max-width: calc(100% - 6rem); }
.kf-tool svg circle { fill: none; }
.kf-loading[hidden] { display: none !important; }
.kf-loading { position: absolute; inset: 0; z-index: 7; display: grid; place-items: center; padding: 16px; background: rgba(243, 244, 246, 0.82); backdrop-filter: blur(4px); }
.kf-loading-box { width: min(420px, 100%); background: #fff; border-radius: 16px; padding: 1.8rem 1.6rem 1.4rem; text-align: center; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18); }
.kf-loading-logo { width: min(260px, 80%); height: auto; display: block; margin: 0 auto 1.1rem; }
.kf-loading-title { margin: 0 0 0.9rem; font-size: 1.2rem; font-weight: 700; color: #3c3c3c; }
.kf-progress { height: 10px; border-radius: 999px; background: #eceae4; overflow: hidden; }
.kf-progress span { display: block; height: 100%; width: 0; border-radius: inherit; background: #ffc000; transition: width 0.25s ease; }
.kf-loading-sub { margin: 0.7rem 0 0; font-size: 0.8rem; color: #6b6e70; }
