:root {
    --kigo-orange: #F58220;
    --kigo-green: #4CAF50;
    --kigo-grey: #9E9E9E;
    --kigo-red: #F44336;
    --ink: #1f2937;
    --bg: #ffffff;
    --muted: #f7fafc;
}

/* ── booking-style help sections ── */
.bh-section { margin-bottom: 28px }
.bh-section h4 { font-weight: 700; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid #f0eeea }
.bh-section h5 { font-weight: 700; margin: 14px 0 6px; color: #333 }
.bh-section p,
.bh-section li { font-size: 13px; line-height: 1.7; color: #555 }
.bh-section ul { padding-left: 18px; margin-bottom: 10px }
.bh-section li { margin-bottom: 4px }

/* flow badges */
.badge-flow { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 700; margin: 2px }
.bf-p { background: #fff8e1; color: #b58a00 }
.bf-c { background: #e8f8ef; color: #0d7a47 }
.bf-x { background: #fef0ef; color: #eb3d2f }
.bf-arr { color: #ccc; margin: 0 4px }

/* tip / note callouts */
.bh-tip { background: #f0f7ff; border-left: 3px solid #3498db; padding: 10px 14px; border-radius: 0 8px 8px 0; margin: 12px 0; font-size: 12px; color: #2c3e50 }
.bh-tip.bh-warn { border-left-color: #e74c3c; background: #fef0ef }
.bh-tip.bh-ok { border-left-color: #27ae60; background: #e8f8ef }

/* tables inside bh-section */
.bh-section table { font-size: 12px }

/* dark mode */
body.dark_mode .bh-section h4 { border-bottom-color: #1e293b }
body.dark_mode .bh-section h5 { color: #d1d5db }
body.dark_mode .bh-section p,
body.dark_mode .bh-section li { color: #9ca3af }
body.dark_mode .bh-tip { background: #0f1a2b; color: #d1d5db; border-left-color: #2563eb }
body.dark_mode .bh-tip.bh-warn { background: #1a0b0b; border-left-color: #dc2626 }
body.dark_mode .bh-tip.bh-ok { background: #0b1a0f; border-left-color: #16a34a }

/* ── image wrappers (kept for screenshot-based help) ── */
.image-wrapper { margin: 20px 0 }
.image-wrapper.flex { display: flex; gap: 20px }
.image-wrapper img {
    max-width: 100%;
    height: auto;
    max-height: 500px;
    display: block;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
    margin-bottom: 12px;
}

.img-wrap { margin: 12px 0; border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; background: #fff }
.img-wrap img { display: block; max-width: 40%; max-height: 60vh; height: auto }

body.dark_mode .img-wrap { border-color: #0f1a2b; background: #0b1220 }

/* kbd */
kbd {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-bottom-width: 2px;
    padding: 2px 6px;
    border-radius: 6px;
}

.caption {
    font-size: 13px;
    color: #6b7280;
    padding: 8px 10px;
    font-style: italic;
}

body.dark_mode .caption { background: #0b1220; border-top-color: #0f1a2b; color: #9ca3af }

@media (max-width: 1200px) {
    .img-wrap img { max-width: 70% }
}

@media (max-width: 976px) {
    .img-wrap img { width: 100% }
}

/* === KB Index Page === */
.kb-search-wrap { max-width: 600px; margin: 0 auto 25px; position: relative; }
.kb-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
}
.kb-search-result-item {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    display: block;
    text-decoration: none;
    color: inherit;
}
.kb-search-result-item:hover { background: #f5f5f5; text-decoration: none; color: inherit; }
.kb-search-result-item .kb-sr-title { font-weight: 600; color: #333; }
.kb-search-result-item .kb-sr-desc { font-size: 13px; color: #777; margin-top: 2px; }
.kb-search-result-item .kb-sr-keywords { font-size: 12px; color: #999; margin-top: 3px; font-style: italic; }
.kb-search-result-item .kb-sr-keywords:before { content: "\f002"; font-family: "Font Awesome 5 Free"; font-weight: 900; font-style: normal; margin-right: 5px; font-size: 10px; }
.kb-search-result-item mark { background: #fff3cd; color: #333; padding: 0 2px; border-radius: 2px; }
.kb-search-result-item .kb-sr-category { float: right; font-size: 11px; background: #eee; padding: 2px 8px; border-radius: 3px; color: #666; }

.kb-category { margin-bottom: 35px; }
.kb-category h3 { font-size: 20px; font-weight: 600; margin-bottom: 15px; padding-bottom: 8px; border-bottom: 2px solid #eee; }
.kb-category h3 i { margin-right: 8px; }

.kb-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.2s;
    cursor: pointer;
    display: block;
    text-decoration: none;
    color: inherit;
    min-height: 100px;
}
.kb-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #ccc;
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}
.kb-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-block;
    text-align: center;
    line-height: 40px;
    font-size: 18px;
    color: #fff;
    margin-bottom: 10px;
}
.kb-card-title { font-size: 15px; font-weight: 600; color: #333; margin-bottom: 5px; }
.kb-card-desc { font-size: 13px; color: #888; line-height: 1.4; }

.kb-no-results { text-align: center; padding: 40px; color: #999; font-size: 16px; }

/* === KB Article Page === */
.kb-breadcrumb { margin-bottom: 20px; font-size: 13px; color: #888; }
.kb-breadcrumb a { color: #3498db; text-decoration: none; }
.kb-breadcrumb a:hover { text-decoration: underline; }
.kb-breadcrumb .kb-sep { margin: 0 8px; color: #ccc; }
.kb-article-title { font-size: 26px; font-weight: 700; margin-bottom: 25px; }
.kb-article-title i { margin-right: 10px; }
.kb-sidebar { background: #f8f9fa; border-radius: 8px; padding: 20px; }
.kb-sidebar h4 { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.kb-sidebar ul { list-style: none; padding: 0; margin: 0; }
.kb-sidebar ul li { margin-bottom: 8px; }
.kb-sidebar ul li a { color: #555; font-size: 13px; display: block; padding: 5px 0; border-bottom: 1px solid #eee; text-decoration: none; }
.kb-sidebar ul li a:hover { color: #3498db; }
.kb-sidebar ul li.active a { color: #3498db; font-weight: 600; }

/* === KB Dark Mode === */
body.dark_mode .kb-search-input { background: #2d2d2d; border-color: #444; color: #e0e0e0; }
body.dark_mode .kb-search-results { background: #2d2d2d; border-color: #444; }
body.dark_mode .kb-search-result-item:hover { background: #363636; }
body.dark_mode .kb-search-result-item .kb-sr-title { color: #e0e0e0; }
body.dark_mode .kb-search-result-item .kb-sr-category { background: #444; color: #ccc; }
body.dark_mode .kb-search-result-item .kb-sr-keywords { color: #888; }
body.dark_mode .kb-search-result-item mark { background: #5a4a00; color: #f0e0a0; }
body.dark_mode .kb-category h3 { border-bottom-color: #444; color: #e0e0e0; }
body.dark_mode .kb-card { background: #2d2d2d; border-color: #444; }
body.dark_mode .kb-card:hover { border-color: #555; box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
body.dark_mode .kb-card-title { color: #e0e0e0; }
body.dark_mode .kb-card-desc { color: #999; }
body.dark_mode .kb-sidebar { background: #2d2d2d; }
body.dark_mode .kb-sidebar ul li a { color: #ccc; border-bottom-color: #444; }
body.dark_mode .kb-breadcrumb { color: #888; }
body.dark_mode .kb-no-results { color: #777; }
