/*
Theme Name: Ka-Chan Tarkov Blog
Theme URI: https://ka-chanblog.com
Description: タルコフ攻略特化ブログテーマ。ダーク軍事系デザイン・SEO最適化・高速表示。
Version: 3.1.2
Author: Ka-Chan
Text Domain: kachan-seo-theme
*/

/* =============================================================================
   1. CSS Custom Properties
   ============================================================================= */

:root {
    --kc-bg:            #0d0f14;
    --kc-surface:       #151820;
    --kc-surface-alt:   #1a1f2e;
    --kc-surface-hover: #1e2433;
    --kc-border:        #252b3a;
    --kc-accent:        #e63946;
    --kc-accent-hover:  #c41e2a;
    --kc-gold:          #f0b429;
    --kc-text:          #c8ccd4;
    --kc-text-muted:    #6b7280;
    --kc-heading:       #f0f2f5;
    --kc-link:          #60a5fa;
    --kc-link-hover:    #93c5fd;
    --kc-code-bg:       #1e2433;
    --kc-max-width:     1140px;
    --kc-sidebar-width: 300px;
    --kc-gap:           32px;
    --kc-radius:        6px;
    --kc-radius-sm:     4px;
    --kc-shadow:        0 2px 12px rgba(0, 0, 0, 0.45);
    --kc-transition:    0.18s ease;
    --kc-header-h:      60px;
}

/* =============================================================================
   2. Reset & Base
   ============================================================================= */

*,
*::before,
*::after { box-sizing: border-box; }

html, body, h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd {
    margin: 0;
    padding: 0;
}

ul, ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--kc-bg);
    color: var(--kc-text);
    font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, video {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: var(--kc-link);
    text-decoration: underline;
    transition: color var(--kc-transition);
}

a:hover {
    color: var(--kc-link-hover);
    text-decoration: none;
}

input, button, textarea, select { font: inherit; }

/* =============================================================================
   3. Typography
   ============================================================================= */

h1, h2, h3, h4, h5, h6 {
    color: var(--kc-heading);
    font-weight: 700;
    line-height: 1.3;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.9rem; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

blockquote {
    border-left: 4px solid var(--kc-accent);
    background: var(--kc-surface);
    padding: 16px 20px;
    margin: 24px 0;
    border-radius: 0 var(--kc-radius) var(--kc-radius) 0;
    color: var(--kc-text-muted);
    font-style: italic;
}

blockquote p:last-child { margin-bottom: 0; }

code {
    background: var(--kc-code-bg);
    color: #a8d8a8;
    font-family: 'Fira Code', 'Courier New', Courier, monospace;
    font-size: 0.875em;
    padding: 2px 6px;
    border-radius: var(--kc-radius-sm);
}

pre {
    background: var(--kc-code-bg);
    color: #a8d8a8;
    font-family: 'Fira Code', 'Courier New', Courier, monospace;
    font-size: 0.875rem;
    padding: 20px 24px;
    border-radius: var(--kc-radius);
    overflow-x: auto;
    margin: 24px 0;
    border: 1px solid var(--kc-border);
}

pre code {
    background: none;
    padding: 0;
    font-size: inherit;
    color: inherit;
    border-radius: 0;
}

strong, b { font-weight: 700; color: var(--kc-heading); }
em, i     { font-style: italic; }

hr {
    border: none;
    border-top: 1px solid var(--kc-border);
    margin: 32px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 0.9rem;
}

thead th {
    background: var(--kc-surface-alt);
    color: var(--kc-heading);
    font-weight: 700;
    padding: 10px 14px;
    text-align: left;
    border: 1px solid var(--kc-border);
}

tbody td {
    padding: 9px 14px;
    border: 1px solid var(--kc-border);
    vertical-align: top;
}

tbody tr:nth-child(even) { background: var(--kc-surface); }
tbody tr:hover           { background: var(--kc-surface-hover); }

/* =============================================================================
   4. Layout Utilities
   ============================================================================= */

.kc-container {
    max-width: var(--kc-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* 2-column layout: content + sidebar */
.kc-layout {
    display: grid;
    grid-template-columns: 1fr var(--kc-sidebar-width);
    gap: var(--kc-gap);
    align-items: start;
}

/* Single post — same 2-column but can be extended */
.kc-layout--single {
    display: grid;
    grid-template-columns: 1fr var(--kc-sidebar-width);
    gap: var(--kc-gap);
    align-items: start;
}

/* Front-page: no sidebar, 1 column */
.kc-front-page {
    display: block;
}

/* =============================================================================
   5. Skip Link
   ============================================================================= */

.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    z-index: 9999;
    background: var(--kc-accent);
    color: #fff;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 0 0 var(--kc-radius) 0;
    transition: top var(--kc-transition);
}

.skip-link:focus {
    top: 0;
    color: #fff;
}

/* =============================================================================
   6. Header
   ============================================================================= */

.kc-site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(26, 31, 46, 0.97);
    border-bottom: 1px solid var(--kc-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.kc-header-inner {
    display: flex;
    align-items: center;
    height: var(--kc-header-h);
    gap: 16px;
}

/* Brand */
.kc-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--kc-heading);
    flex-shrink: 0;
}

.kc-brand:hover {
    color: var(--kc-heading);
    text-decoration: none;
}

.kc-brand-mark {
    width: 36px;
    height: 36px;
    background: var(--kc-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 20px;
    border-radius: var(--kc-radius-sm);
    flex-shrink: 0;
    line-height: 1;
    letter-spacing: -0.02em;
}

.kc-brand-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.kc-brand-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--kc-heading);
    line-height: 1.2;
}

/* supports both .kc-brand-desc and .kc-brand-tagline */
.kc-brand-desc,
.kc-brand-tagline {
    font-size: 0.68rem;
    color: var(--kc-text-muted);
    display: block;
    line-height: 1.2;
    letter-spacing: 0.02em;
}

/* Nav pushes to the right */
.kc-primary-nav {
    margin-left: auto;
}

.kc-primary-nav .kc-menu {
    display: flex;
    list-style: none;
    gap: 4px;
    margin: 0;
    padding: 0;
}

.kc-primary-nav .kc-menu a {
    color: var(--kc-text);
    text-decoration: none;
    padding: 7px 11px;
    border-radius: var(--kc-radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    display: block;
    transition: background var(--kc-transition), color var(--kc-transition);
}

.kc-primary-nav .kc-menu a:hover {
    background: var(--kc-surface-hover);
    color: var(--kc-heading);
    text-decoration: none;
}

.kc-primary-nav .kc-menu .current-menu-item > a,
.kc-primary-nav .kc-menu .current_page_item > a {
    color: var(--kc-accent);
}

/* Hamburger button — hidden on desktop */
.kc-nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: 1px solid var(--kc-border);
    border-radius: var(--kc-radius-sm);
    cursor: pointer;
    padding: 0;
    color: var(--kc-text);
    margin-left: auto;
    flex-shrink: 0;
}

.kc-nav-toggle span,
.kc-hamburger-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform var(--kc-transition), opacity var(--kc-transition);
}

/* Animate via aria-expanded — JS sets this attribute on the button */
.kc-nav-toggle[aria-expanded="true"] .kc-hamburger-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.kc-nav-toggle[aria-expanded="true"] .kc-hamburger-bar:nth-child(2) {
    opacity: 0;
}
.kc-nav-toggle[aria-expanded="true"] .kc-hamburger-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* =============================================================================
   7. Main
   ============================================================================= */

.kc-main {
    min-height: 60vh;
    padding-bottom: 64px;
}

/* Layout containers inside main get top padding */
.kc-main > .kc-container {
    padding-top: 32px;
}

/* =============================================================================
   8. Hero Section — Tactical Design
   ============================================================================= */

.kc-hero {
    background: #0d0f14;
    border-bottom: 2px solid var(--kc-accent);
    position: relative;
    overflow: hidden;
}

/* Tactical grid overlay */
.kc-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(37, 43, 58, 0.6) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37, 43, 58, 0.6) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

/* Red glow */
.kc-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 240px;
    background: radial-gradient(ellipse at center bottom, rgba(230, 57, 70, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

/* Scanning line animation */
@keyframes kc-scan {
    0%   { top: 0%;   opacity: 0.8; }
    80%  { opacity: 0.4; }
    100% { top: 100%; opacity: 0; }
}

.kc-hero-scan {
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(230, 57, 70, 0.7) 50%, transparent 100%);
    animation: kc-scan 5s linear infinite;
    z-index: 1;
    pointer-events: none;
}

.kc-hero-inner {
    position: relative;
    z-index: 2;
    padding-top: 72px;
    padding-bottom: 56px;
    text-align: center;
}

/* Eyebrow badge */
.kc-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--kc-accent);
    text-transform: uppercase;
    margin-bottom: 20px;
    padding: 5px 14px;
    border: 1px solid rgba(230, 57, 70, 0.35);
    border-radius: 2px;
    background: rgba(230, 57, 70, 0.07);
}

.kc-hero-badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--kc-accent);
    animation: kc-blink 1.4s ease infinite;
}

@keyframes kc-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.2; }
}

.kc-hero-title {
    font-size: clamp(2rem, 6vw, 3.6rem);
    color: var(--kc-heading);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin: 0 0 20px;
}

.kc-hero-em {
    font-style: normal;
    color: var(--kc-accent);
    position: relative;
    display: inline-block;
}

/* supports both .kc-hero-tagline and .kc-hero-desc */
.kc-hero-tagline,
.kc-hero-desc {
    color: var(--kc-text-muted);
    font-size: 1rem;
    max-width: 500px;
    margin: 0 auto 0;
    line-height: 1.8;
}

.kc-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 32px;
}

/* Hero stats */
.kc-hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-top: 40px;
    padding: 16px 0 0;
    border-top: 1px solid var(--kc-border);
}

.kc-hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 28px;
}

.kc-hero-stat-div {
    width: 1px;
    height: 36px;
    background: var(--kc-border);
}

.kc-hero-stat-num {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--kc-heading);
    line-height: 1;
    letter-spacing: -0.02em;
}

.kc-hero-stat-label {
    font-size: 0.7rem;
    color: var(--kc-text-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Hero category quick-nav strip */
.kc-hero-nav {
    position: relative;
    z-index: 2;
    background: rgba(21, 24, 32, 0.9);
    border-top: 1px solid var(--kc-border);
}

.kc-hero-nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.kc-hero-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    text-decoration: none;
    color: var(--kc-text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    border-right: 1px solid var(--kc-border);
    flex: 1;
    justify-content: center;
    transition: background var(--kc-transition), color var(--kc-transition);
}

.kc-hero-nav-item:hover {
    background: var(--kc-surface-hover);
    color: var(--kc-heading);
    text-decoration: none;
}

.kc-hero-nav-list li:last-child .kc-hero-nav-item {
    border-right: none;
}

.kc-hero-nav-num {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--kc-accent);
    letter-spacing: 0.05em;
    font-variant-numeric: tabular-nums;
}

/* Buttons */
.kc-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--kc-accent);
    color: #fff;
    padding: 12px 28px;
    border-radius: var(--kc-radius);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 1;
    transition: background var(--kc-transition), transform var(--kc-transition), box-shadow var(--kc-transition);
    border: 2px solid var(--kc-accent);
}

.kc-btn:hover {
    background: var(--kc-accent-hover);
    border-color: var(--kc-accent-hover);
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 57, 70, 0.35);
}

.kc-btn--ghost {
    background: transparent;
    color: var(--kc-heading);
    border: 2px solid rgba(240, 242, 245, 0.2);
}

.kc-btn--ghost:hover {
    background: var(--kc-surface-hover);
    border-color: var(--kc-accent);
    color: var(--kc-accent);
    box-shadow: none;
}

/* =============================================================================
   8b. Category Hub
   ============================================================================= */

.kc-hub {
    padding-top: 48px;
    margin-bottom: 56px;
}

.kc-hub-header {
    margin-bottom: 20px;
}

.kc-hub-heading {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--kc-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin: 0;
    position: relative;
    padding-left: 14px;
}

.kc-hub-heading::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 100%;
    background: var(--kc-accent);
    border-radius: 2px;
}

.kc-hub-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.kc-hub-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--kc-surface);
    border: 1px solid var(--kc-border);
    border-radius: var(--kc-radius);
    padding: 22px 18px 18px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.kc-hub-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--hub-color, var(--kc-accent));
    opacity: 0;
    transition: opacity 0.2s ease;
}

.kc-hub-card:hover {
    transform: translateY(-4px);
    border-color: var(--hub-color, var(--kc-accent));
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
    background: var(--kc-surface-alt);
    text-decoration: none;
}

.kc-hub-card:hover::before {
    opacity: 1;
}

/* Per-category accent colors */
.kc-hub-card--quests  { --hub-color: #e63946; }
.kc-hub-card--maps    { --hub-color: #2a9d8f; }
.kc-hub-card--weapons { --hub-color: #e9c46a; }
.kc-hub-card--items   { --hub-color: #4361ee; }
.kc-hub-card--hideout { --hub-color: #9b5de5; }

.kc-hub-card-num {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--hub-color, var(--kc-accent));
    letter-spacing: 0.12em;
    font-variant-numeric: tabular-nums;
}

.kc-hub-card-icon {
    width: 40px;
    height: 40px;
    color: var(--hub-color, var(--kc-accent));
    opacity: 0.8;
    margin-bottom: 4px;
}

.kc-hub-card-icon svg {
    width: 100%;
    height: 100%;
}

.kc-hub-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--kc-heading);
    margin: 0;
    line-height: 1.3;
}

.kc-hub-card-desc {
    font-size: 0.78rem;
    color: var(--kc-text-muted);
    line-height: 1.55;
    margin: 0;
    flex: 1;
}

.kc-hub-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--kc-border);
}

.kc-hub-card-count {
    font-size: 0.75rem;
    color: var(--kc-text-muted);
    font-weight: 600;
}

.kc-hub-card-arrow {
    font-size: 0.9rem;
    color: var(--hub-color, var(--kc-accent));
    transition: transform 0.18s ease;
}

.kc-hub-card:hover .kc-hub-card-arrow {
    transform: translateX(4px);
}

/* Section title color variants */
.kc-section-title--quests::after  { background: #e63946; }
.kc-section-title--maps::after    { background: #2a9d8f; }
.kc-section-title--weapons::after { background: #e9c46a; }
.kc-section-title--items::after   { background: #4361ee; }
.kc-section-title--hideout::after { background: #9b5de5; }

/* =============================================================================
   9. Front-page Content Area
   ============================================================================= */

.kc-front-page {
    padding: 48px 0 64px;
}

.kc-section {
    margin-bottom: 56px;
}

.kc-section:last-child {
    margin-bottom: 0;
}

.kc-section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
    gap: 12px;
}

.kc-section-title {
    font-size: 1.2rem;
    color: var(--kc-heading);
    margin: 0 0 4px;
    font-weight: 700;
}

.kc-section-title::after {
    content: '';
    display: block;
    width: 28px;
    height: 3px;
    background: var(--kc-accent);
    margin-top: 6px;
    border-radius: 2px;
}

.kc-section-desc {
    font-size: 0.85rem;
    color: var(--kc-text-muted);
    margin: 2px 0 0;
    line-height: 1.5;
}

/* supports both .kc-more-link and .kc-section-more */
.kc-more-link,
.kc-section-more {
    font-size: 0.82rem;
    color: var(--kc-link);
    text-decoration: none;
    white-space: nowrap;
    padding: 4px 0;
    transition: color var(--kc-transition);
    align-self: flex-start;
    margin-top: 4px;
}

.kc-more-link:hover,
.kc-section-more:hover {
    color: var(--kc-link-hover);
    text-decoration: underline;
}

/* =============================================================================
   10. Breadcrumbs
   ============================================================================= */

.kc-breadcrumbs {
    font-size: 0.8rem;
    color: var(--kc-text-muted);
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.kc-breadcrumbs a {
    color: var(--kc-text-muted);
    text-decoration: none;
    transition: color var(--kc-transition);
}

.kc-breadcrumbs a:hover {
    color: var(--kc-link);
    text-decoration: none;
}

.kc-breadcrumbs span[aria-hidden="true"] {
    color: var(--kc-border);
    user-select: none;
}

/* =============================================================================
   11. Archive / Category Page
   ============================================================================= */

.kc-archive-header {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--kc-border);
}

.kc-eyebrow {
    font-size: 0.72rem;
    color: var(--kc-accent);
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 6px;
}

.kc-archive-title {
    font-size: clamp(1.3rem, 4vw, 1.8rem);
    color: var(--kc-heading);
    font-weight: 700;
    margin: 6px 0 10px;
    line-height: 1.3;
}

.kc-archive-description {
    color: var(--kc-text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
    margin: 0;
}

/* =============================================================================
   12. Article Page
   ============================================================================= */

.kc-article-header {
    margin-bottom: 24px;
}

.kc-entry-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    font-size: 0.78rem;
    color: var(--kc-text-muted);
    margin-bottom: 12px;
}

.kc-entry-meta time {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.kc-reading-time {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.kc-article-title {
    font-size: clamp(1.4rem, 4vw, 2.1rem);
    color: var(--kc-heading);
    font-weight: 700;
    line-height: 1.3;
    margin: 12px 0 0;
}

.kc-article-lead {
    color: var(--kc-text-muted);
    font-size: 1rem;
    line-height: 1.75;
    margin-top: 12px;
}

.kc-article-thumb {
    margin: 24px 0;
    border-radius: var(--kc-radius);
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--kc-surface-alt);
}

.kc-article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.kc-article-body {
    margin-top: 8px;
}

/* =============================================================================
   13. Category Badge
   ============================================================================= */

.kc-category-badge {
    display: inline-block;
    background: var(--kc-accent);
    color: #fff;
    padding: 2px 9px;
    border-radius: var(--kc-radius-sm);
    font-size: 0.72rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.03em;
    transition: background var(--kc-transition);
}

.kc-category-badge:hover {
    background: var(--kc-accent-hover);
    color: #fff;
    text-decoration: none;
}

/* =============================================================================
   14. Entry Content
   ============================================================================= */

.kc-entry-content {
    font-size: 1rem;
    line-height: 1.85;
    color: var(--kc-text);
}

.kc-entry-content h2 {
    border-left: 3px solid var(--kc-accent);
    padding-left: 12px;
    margin-top: 2.5em;
    margin-bottom: 0.75em;
    font-size: 1.35rem;
    color: var(--kc-heading);
}

.kc-entry-content h3 {
    color: var(--kc-gold);
    font-size: 1.1rem;
    margin-top: 2em;
    margin-bottom: 0.6em;
}

.kc-entry-content h4 {
    font-size: 1rem;
    color: var(--kc-heading);
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.kc-entry-content p {
    margin: 0 0 1.2em;
}

.kc-entry-content a {
    color: var(--kc-link);
    text-decoration: underline;
}

.kc-entry-content a:hover {
    color: var(--kc-link-hover);
    text-decoration: none;
}

.kc-entry-content ul,
.kc-entry-content ol {
    list-style: revert;
    margin: 0 0 1.2em;
    padding-left: 1.8em;
}

.kc-entry-content li {
    margin: 5px 0;
}

.kc-entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--kc-radius);
    margin: 16px auto;
}

.kc-entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 0.9rem;
    overflow-x: auto;
    display: block;
}

.kc-entry-content table th {
    background: var(--kc-surface-alt);
    color: var(--kc-heading);
    font-weight: 700;
    padding: 10px 14px;
    border: 1px solid var(--kc-border);
    text-align: left;
    white-space: nowrap;
}

.kc-entry-content table td {
    padding: 9px 14px;
    border: 1px solid var(--kc-border);
    vertical-align: top;
}

.kc-entry-content table tr:nth-child(even) td {
    background: var(--kc-surface);
}

.kc-entry-content blockquote {
    border-left: 4px solid var(--kc-accent);
    background: var(--kc-surface);
    padding: 16px 20px;
    margin: 24px 0;
    border-radius: 0 var(--kc-radius) var(--kc-radius) 0;
    color: var(--kc-text-muted);
    font-style: italic;
}

.kc-entry-content blockquote p:last-child {
    margin-bottom: 0;
}

.kc-entry-content pre {
    margin: 24px 0;
}

.kc-entry-content .wp-block-image {
    margin: 24px auto;
    text-align: center;
}

.kc-entry-content .wp-block-image img {
    border-radius: var(--kc-radius);
}

.kc-entry-content .wp-block-image figcaption {
    font-size: 0.8rem;
    color: var(--kc-text-muted);
    margin-top: 8px;
    text-align: center;
}

.kc-entry-content .wp-block-quote {
    border-left: 4px solid var(--kc-accent);
    background: var(--kc-surface);
    padding: 16px 20px;
    margin: 24px 0;
    border-radius: 0 var(--kc-radius) var(--kc-radius) 0;
}

.kc-entry-content .wp-block-separator {
    border: none;
    border-top: 1px solid var(--kc-border);
    margin: 32px 0;
}

/* =============================================================================
   15. Table of Contents
   ============================================================================= */

.kc-toc {
    background: var(--kc-surface);
    border: 1px solid var(--kc-border);
    border-radius: var(--kc-radius);
    padding: 20px 24px;
    margin: 28px 0;
}

.kc-toc-title {
    font-weight: 700;
    color: var(--kc-heading);
    margin: 0 0 12px;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}

.kc-toc ol {
    margin: 0;
    padding-left: 20px;
    list-style: decimal;
}

.kc-toc ol ol {
    list-style: lower-alpha;
    margin-top: 4px;
}

.kc-toc li {
    margin: 5px 0;
}

.kc-toc a {
    color: var(--kc-text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color var(--kc-transition);
}

.kc-toc a:hover,
.kc-toc a.is-active {
    color: var(--kc-link);
    text-decoration: none;
}

.kc-toc a.is-active {
    font-weight: 600;
}

/* h3 child items — indent */
.kc-toc .kc-toc-child {
    padding-left: 18px;
}

.kc-toc .kc-toc-child a {
    font-size: 0.82rem;
    color: var(--kc-text-muted);
}

/* ---- Easy Table of Contents plugin overrides ---- */
#ez-toc-container {
    background: var(--kc-surface) !important;
    border: 1px solid var(--kc-border) !important;
    border-radius: var(--kc-radius) !important;
    padding: 20px 24px !important;
    margin: 28px 0 !important;
    box-shadow: none !important;
}

#ez-toc-container p.ez-toc-title {
    font-weight: 700;
    color: var(--kc-heading) !important;
    font-size: 0.9rem !important;
    margin: 0 0 12px !important;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--kc-border);
    letter-spacing: 0.02em;
}

#ez-toc-container nav ul {
    list-style: decimal;
    padding-left: 20px;
    margin: 0 !important;
}

#ez-toc-container nav ul li {
    margin: 5px 0 !important;
}

#ez-toc-container nav ul li a {
    color: var(--kc-text-muted) !important;
    text-decoration: none !important;
    font-size: 0.875rem !important;
    transition: color var(--kc-transition) !important;
}

#ez-toc-container nav ul li a:hover {
    color: var(--kc-link) !important;
}

#ez-toc-container nav ul ul {
    list-style: none;
    padding-left: 18px !important;
}

#ez-toc-container nav ul ul li a {
    font-size: 0.82rem !important;
}

/* =============================================================================
   16. Post Footer (author box, tags)
   ============================================================================= */

.kc-post-footer {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--kc-border);
}

.kc-tags {
    margin-bottom: 24px;
    line-height: 2;
}

.kc-tags a {
    display: inline-block;
    background: var(--kc-surface);
    border: 1px solid var(--kc-border);
    color: var(--kc-text-muted);
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin: 3px 3px 0 0;
    text-decoration: none;
    transition: border-color var(--kc-transition), color var(--kc-transition);
}

.kc-tags a:hover {
    border-color: var(--kc-accent);
    color: var(--kc-accent);
    text-decoration: none;
}

.kc-author-box {
    display: flex;
    gap: 16px;
    background: var(--kc-surface);
    padding: 20px;
    border-radius: var(--kc-radius);
    margin-top: 24px;
    border: 1px solid var(--kc-border);
}

.kc-author-avatar {
    flex-shrink: 0;
}

.kc-author-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.kc-author-info {
    flex: 1;
    min-width: 0;
}

.kc-author-name {
    font-weight: 700;
    color: var(--kc-heading);
    margin: 0 0 6px;
    font-size: 0.9rem;
}

/* supports both .kc-author-bio and .kc-author-desc */
.kc-author-bio,
.kc-author-desc {
    font-size: 0.85rem;
    color: var(--kc-text-muted);
    margin: 0;
    line-height: 1.6;
}

/* =============================================================================
   17. Related Articles
   ============================================================================= */

.kc-related {
    margin-top: 48px;
    padding-top: 28px;
    border-top: 1px solid var(--kc-border);
}

.kc-related .kc-section-title {
    margin-bottom: 20px;
}

/* =============================================================================
   18. Cards
   ============================================================================= */

.kc-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.kc-card {
    background: var(--kc-surface);
    border-radius: var(--kc-radius);
    overflow: hidden;
    border: 1px solid var(--kc-border);
    transition: transform var(--kc-transition), border-color var(--kc-transition), box-shadow var(--kc-transition);
    display: flex;
    flex-direction: column;
}

.kc-card:hover {
    transform: translateY(-3px);
    border-color: rgba(230, 57, 70, 0.5);
    box-shadow: var(--kc-shadow);
}

.kc-card-thumb {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--kc-surface-alt);
    text-decoration: none;
}

.kc-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.kc-card:hover .kc-card-thumb img {
    transform: scale(1.05);
}

.kc-card-body {
    padding: 14px 16px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.kc-card-title {
    font-size: 0.9rem;
    font-weight: 700;
    margin: 8px 0 4px;
    line-height: 1.45;
    flex: 1;
}

.kc-card-title a {
    color: var(--kc-heading);
    text-decoration: none;
    transition: color var(--kc-transition);
}

.kc-card-title a:hover {
    color: var(--kc-accent);
    text-decoration: none;
}

.kc-card-excerpt {
    font-size: 0.8rem;
    color: var(--kc-text-muted);
    margin: 4px 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.55;
}

.kc-card-meta {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.75rem;
    color: var(--kc-text-muted);
    margin-top: auto;
    padding-top: 8px;
}

/* =============================================================================
   19. List Items (archive)
   ============================================================================= */

.kc-post-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.kc-list-item {
    display: flex;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid var(--kc-border);
    transition: background var(--kc-transition), padding var(--kc-transition), margin var(--kc-transition);
    border-radius: var(--kc-radius-sm);
}

.kc-list-item:hover {
    background: var(--kc-surface-hover);
    padding-left: 10px;
    padding-right: 10px;
    margin-left: -10px;
    margin-right: -10px;
}

.kc-list-item:last-child {
    border-bottom: none;
}

.kc-list-thumb {
    width: 110px;
    min-width: 110px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--kc-radius-sm);
    background: var(--kc-surface-alt);
    flex-shrink: 0;
    display: block;
    text-decoration: none;
}

.kc-list-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.kc-list-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.kc-list-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 4px 0;
    line-height: 1.45;
}

.kc-list-title a {
    color: var(--kc-heading);
    text-decoration: none;
    transition: color var(--kc-transition);
}

.kc-list-title a:hover {
    color: var(--kc-accent);
    text-decoration: none;
}

.kc-list-excerpt {
    font-size: 0.8rem;
    color: var(--kc-text-muted);
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.55;
}

.kc-list-meta {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.75rem;
    color: var(--kc-text-muted);
    margin-top: 6px;
}

/* =============================================================================
   20. Sidebar
   ============================================================================= */

.kc-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: calc(var(--kc-header-h) + 20px);
    max-height: calc(100vh - var(--kc-header-h) - 40px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--kc-border) transparent;
}

.kc-sidebar::-webkit-scrollbar {
    width: 4px;
}
.kc-sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.kc-sidebar::-webkit-scrollbar-thumb {
    background: var(--kc-border);
    border-radius: 4px;
}

.kc-widget {
    background: var(--kc-surface);
    border: 1px solid var(--kc-border);
    border-radius: var(--kc-radius);
    padding: 18px 20px;
}

.kc-widget-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--kc-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--kc-border);
}

/* Widget recent posts */
.kc-widget-posts {
    list-style: none;
    margin: 0;
    padding: 0;
}

.kc-widget-post-item {
    padding: 8px 0;
    border-bottom: 1px solid var(--kc-border);
}

.kc-widget-post-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.kc-widget-post-link {
    color: var(--kc-text);
    text-decoration: none;
    font-size: 0.85rem;
    line-height: 1.45;
    transition: color var(--kc-transition);
    display: block;
}

.kc-widget-post-link:hover {
    color: var(--kc-link);
    text-decoration: none;
}

.kc-widget-post-date {
    font-size: 0.72rem;
    color: var(--kc-text-muted);
    display: block;
    margin-top: 3px;
}

/* Widget categories */
.kc-widget-cats {
    list-style: none;
    margin: 0;
    padding: 0;
}

.kc-widget-cat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    border-bottom: 1px solid var(--kc-border);
}

.kc-widget-cat-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.kc-widget-cat-item a {
    color: var(--kc-text);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color var(--kc-transition);
}

.kc-widget-cat-item a:hover {
    color: var(--kc-link);
    text-decoration: none;
}

.kc-widget-cat-count {
    font-size: 0.72rem;
    color: var(--kc-text-muted);
    background: var(--kc-surface-alt);
    padding: 1px 7px;
    border-radius: 20px;
    flex-shrink: 0;
}

/* =============================================================================
   21. Pagination
   ============================================================================= */

.kc-pagination {
    margin-top: 36px;
    display: flex;
    justify-content: center;
}

.kc-pagination .nav-links {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
}

.kc-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    background: var(--kc-surface);
    border: 1px solid var(--kc-border);
    border-radius: var(--kc-radius-sm);
    color: var(--kc-text);
    text-decoration: none;
    font-size: 0.875rem;
    transition: background var(--kc-transition), border-color var(--kc-transition), color var(--kc-transition);
}

.kc-pagination .page-numbers:hover {
    background: var(--kc-surface-hover);
    border-color: var(--kc-accent);
    color: var(--kc-accent);
    text-decoration: none;
}

.kc-pagination .page-numbers.current {
    background: var(--kc-accent);
    border-color: var(--kc-accent);
    color: #fff;
    font-weight: 700;
}

.kc-pagination .page-numbers.dots {
    border: none;
    background: none;
    color: var(--kc-text-muted);
    min-width: auto;
    padding: 0 4px;
}

/* =============================================================================
   22. Search Form
   ============================================================================= */

.search-form,
.kc-search-form {
    display: flex;
    gap: 8px;
}

.search-form label { flex: 1; }

/* searchform.php uses .kc-search-inner wrapper — must be flex */
.kc-search-inner {
    display: flex;
    gap: 8px;
    width: 100%;
}

.kc-search-inner .kc-search-input {
    flex: 1;
    min-width: 0;
}

.search-field,
.search-form input[type="search"],
.kc-search-form input[type="search"],
.kc-search-form input[type="text"],
.kc-search-inner input[type="search"],
.kc-search-inner input[type="text"] {
    flex: 1;
    width: 100%;
    background: var(--kc-surface-alt);
    border: 1px solid var(--kc-border);
    color: var(--kc-text);
    padding: 9px 12px;
    border-radius: var(--kc-radius);
    outline: none;
    transition: border-color var(--kc-transition);
    min-width: 0;
}

.search-field:focus,
.search-form input:focus,
.kc-search-form input:focus {
    border-color: var(--kc-accent);
}

.search-form input::placeholder,
.kc-search-form input::placeholder {
    color: var(--kc-text-muted);
}

.search-submit,
.search-form button,
.kc-search-form button {
    background: var(--kc-accent);
    color: #fff;
    padding: 9px 14px;
    border: none;
    border-radius: var(--kc-radius);
    cursor: pointer;
    font-weight: 700;
    font-size: 0.875rem;
    transition: background var(--kc-transition);
    white-space: nowrap;
}

.search-submit:hover,
.search-form button:hover,
.kc-search-form button:hover {
    background: var(--kc-accent-hover);
}

/* =============================================================================
   23. Footer
   ============================================================================= */

.kc-site-footer {
    background: var(--kc-surface-alt);
    border-top: 2px solid var(--kc-accent);
    padding: 48px 0 0;
    margin-top: auto;
}

.kc-footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

/* supports both .kc-footer-title and .kc-footer-heading and .kc-footer-site-name */
.kc-footer-heading,
.kc-footer-title,
.kc-footer-site-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--kc-heading);
    margin: 0 0 12px;
    letter-spacing: 0.02em;
}

/* supports both .kc-footer-desc and .kc-footer-description */
.kc-footer-desc,
.kc-footer-description {
    font-size: 0.82rem;
    color: var(--kc-text-muted);
    line-height: 1.7;
    margin: 0;
}

.kc-footer-update-notice {
    font-size: 0.82rem;
    color: var(--kc-text-muted);
    margin: 0;
}

.kc-footer-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.kc-footer-menu-list li a {
    color: var(--kc-text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color var(--kc-transition);
}

.kc-footer-menu-list li a:hover {
    color: var(--kc-link);
    text-decoration: none;
}

.kc-footer-bottom {
    border-top: 1px solid var(--kc-border);
    padding: 16px 0;
    text-align: center;
}

.kc-copyright {
    color: var(--kc-text-muted);
    font-size: 0.78rem;
    margin: 0;
}

/* =============================================================================
   24. Back to Top
   ============================================================================= */

.kc-back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 200;
    width: 44px;
    height: 44px;
    background: var(--kc-surface-alt);
    border: 1px solid var(--kc-border);
    border-radius: var(--kc-radius);
    color: var(--kc-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.1rem;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity var(--kc-transition), transform var(--kc-transition), background var(--kc-transition), color var(--kc-transition);
}

.kc-back-to-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.kc-back-to-top:hover {
    background: var(--kc-surface-hover);
    color: var(--kc-heading);
    text-decoration: none;
}

/* =============================================================================
   25. Ad Slots
   ============================================================================= */

.kc-ad-slot {
    margin: 24px 0;
    text-align: center;
}

/* =============================================================================
   26. Empty / 404
   ============================================================================= */

.kc-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--kc-text-muted);
}

.kc-empty h2 {
    color: var(--kc-heading);
    margin-bottom: 12px;
}

.kc-404 {
    text-align: center;
    padding: 80px 20px;
}

.kc-404-code {
    font-size: 8rem;
    font-weight: 900;
    color: var(--kc-accent);
    line-height: 1;
    opacity: 0.4;
    display: block;
    margin-bottom: 16px;
}

.kc-404-title {
    font-size: 1.5rem;
    color: var(--kc-heading);
    margin: 0 0 12px;
}

.kc-404-text {
    color: var(--kc-text-muted);
    margin: 0 0 32px;
}

.kc-404-btn {
    display: inline-block;
    background: var(--kc-accent);
    color: #fff;
    padding: 12px 28px;
    border-radius: var(--kc-radius);
    text-decoration: none;
    font-weight: 700;
    transition: background var(--kc-transition);
}

.kc-404-btn:hover {
    background: var(--kc-accent-hover);
    color: #fff;
    text-decoration: none;
}

/* =============================================================================
   27. Thumbnail Placeholder
   ============================================================================= */

.kc-thumb-placeholder {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--kc-surface-alt), var(--kc-surface));
}

/* =============================================================================
   28. WordPress Default Classes
   ============================================================================= */

.alignleft  { float: left;  margin: 0 20px 20px 0; }
.alignright { float: right; margin: 0 0 20px 20px; }
.aligncenter { margin: 0 auto; display: block; }

.wp-caption { max-width: 100%; }

.wp-caption-text {
    font-size: 0.8rem;
    color: var(--kc-text-muted);
    text-align: center;
    margin-top: 6px;
}

.screen-reader-text {
    position: absolute !important;
    clip: rect(1px, 1px, 1px, 1px);
    overflow: hidden;
    height: 1px;
    width: 1px;
    white-space: nowrap;
}

.wp-block-table { overflow-x: auto; }
.wp-block-table table { width: 100%; }

/* =============================================================================
   29. Responsive — max-width: 900px
   ============================================================================= */

@media (max-width: 900px) {
    .kc-layout,
    .kc-layout--single {
        grid-template-columns: 1fr;
    }

    .kc-sidebar {
        order: 2;
        position: static;
        max-height: none;
        overflow-y: visible;
    }

    .kc-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
    }

    /* Hub: 3 + 2 layout */
    .kc-hub-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .kc-hub-grid .kc-hub-card:nth-child(4),
    .kc-hub-grid .kc-hub-card:nth-child(5) {
        grid-column: span 1;
    }

    /* Span last two to fill nicely */
    .kc-hub-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* =============================================================================
   30. Responsive — max-width: 768px (mobile nav breakpoint)
   ============================================================================= */

@media (max-width: 768px) {

    /* Show hamburger button */
    .kc-nav-toggle {
        display: flex;
    }

    /* Hide nav by default on mobile */
    .kc-primary-nav {
        display: none;
        position: absolute;
        top: var(--kc-header-h);
        left: 0;
        right: 0;
        background: var(--kc-surface-alt);
        border-bottom: 1px solid var(--kc-border);
        padding: 12px 20px 16px;
        z-index: 99;
        margin-left: 0;
        box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    }

    /* Show nav when open */
    .kc-primary-nav.is-open {
        display: block;
    }

    .kc-primary-nav .kc-menu {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    .kc-primary-nav .kc-menu li {
        width: 100%;
    }

    .kc-primary-nav .kc-menu a {
        display: block;
        padding: 11px 8px;
        border-radius: var(--kc-radius-sm);
        width: 100%;
        border-bottom: 1px solid var(--kc-border);
    }

    .kc-primary-nav .kc-menu li:last-child a {
        border-bottom: none;
    }

    /* Header inner: brand + toggle only */
    .kc-header-inner {
        position: relative;
    }

    .kc-hero-inner {
        padding-top: 48px;
        padding-bottom: 36px;
    }

    .kc-hero-stats {
        flex-wrap: wrap;
        gap: 0;
    }

    .kc-hero-stat {
        padding: 0 16px;
    }

    .kc-hero-actions {
        flex-direction: column;
        align-items: center;
    }

    /* Hero nav: scroll horizontally */
    .kc-hero-nav-list {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .kc-hero-nav-item {
        padding: 12px 16px;
        white-space: nowrap;
        flex: none;
    }

    /* Hub: 2 columns */
    .kc-hub-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .kc-card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .kc-list-thumb {
        width: 80px;
        min-width: 80px;
    }

    .kc-entry-content table {
        font-size: 0.82rem;
    }

    .kc-entry-content table th,
    .kc-entry-content table td {
        padding: 7px 10px;
    }

    .kc-section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .kc-footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .kc-back-to-top {
        bottom: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
    }
}

/* =============================================================================
   31. Responsive — max-width: 480px
   ============================================================================= */

@media (max-width: 480px) {
    .kc-card-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .kc-article-title {
        font-size: 1.35rem;
    }

    body {
        font-size: 0.95rem;
    }

    .kc-brand-text {
        display: none;
    }

    .kc-hero-title {
        font-size: 1.7rem;
    }

    .kc-hero-tagline,
    .kc-hero-desc {
        font-size: 0.9rem;
    }

    .kc-hero-badge {
        font-size: 0.65rem;
    }

    .kc-hero-stat-num {
        font-size: 1.2rem;
    }

    /* Hub: 1 column */
    .kc-hub-grid {
        grid-template-columns: 1fr;
    }

    .kc-hub-card {
        flex-direction: row;
        align-items: center;
        gap: 16px;
        padding: 14px 16px;
    }

    .kc-hub-card-icon {
        width: 32px;
        height: 32px;
        flex-shrink: 0;
        margin-bottom: 0;
    }

    .kc-hub-card-num {
        position: absolute;
        top: 14px;
        right: 16px;
    }

    .kc-hub-card-desc {
        display: none;
    }

    .kc-hub-card-meta {
        border-top: none;
        padding-top: 0;
        margin-top: 0;
    }

    .kc-author-box {
        flex-direction: column;
    }

    .kc-404-code {
        font-size: 5rem;
    }

    .kc-toc {
        padding: 14px 16px;
    }

    pre {
        padding: 14px 16px;
        font-size: 0.8rem;
    }
}


/* =============================================================================
   25. WordPress Block Widgets (sidebar blocks)
   ============================================================================= */

/* --- 検索ブロック: アイコンボタンが下に落ちないよう横並びに --- */
.wp-block-search__inside-wrapper {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.wp-block-search__input {
    flex: 1;
    min-width: 0;
    background: var(--kc-surface-alt);
    border: 1px solid var(--kc-border);
    color: var(--kc-text);
    padding: 9px 12px;
    border-radius: var(--kc-radius);
    outline: none;
    transition: border-color var(--kc-transition);
}

.wp-block-search__input:focus {
    border-color: var(--kc-accent);
}

.wp-block-search__input::placeholder {
    color: var(--kc-text-muted);
}

.wp-block-search__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--kc-accent);
    color: #fff;
    padding: 9px 14px;
    border: none;
    border-radius: var(--kc-radius);
    cursor: pointer;
    margin-left: 0;
    transition: background var(--kc-transition);
}

.wp-block-search__button:hover {
    background: var(--kc-accent-hover);
}

.wp-block-search__button svg {
    fill: currentColor;
}

.wp-block-search__label {
    display: block;
    color: var(--kc-heading);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 10px;
}

/* --- 最近の投稿ブロック: サムネイルサイズを統一 --- */
.wp-block-latest-posts {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.wp-block-latest-posts li {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--kc-border);
}

.wp-block-latest-posts li:last-child {
    border-bottom: none;
}

/* サムネイルなしの場合は1カラムに */
.wp-block-latest-posts li:not(:has(.wp-block-latest-posts__featured-image)) {
    grid-template-columns: 1fr;
}

.wp-block-latest-posts__featured-image {
    margin: 0;
    width: 80px;
    height: 56px;
    overflow: hidden;
    border-radius: var(--kc-radius-sm);
    background: var(--kc-surface-alt);
}

.wp-block-latest-posts__featured-image a,
.wp-block-latest-posts__featured-image img {
    display: block;
    width: 100%;
    height: 100%;
}

.wp-block-latest-posts__featured-image img {
    object-fit: cover;
}

.wp-block-latest-posts li > a {
    color: var(--kc-text);
    font-size: 0.875rem;
    line-height: 1.5;
    text-decoration: none;
    transition: color var(--kc-transition);
}

.wp-block-latest-posts li > a:hover {
    color: var(--kc-link);
}

.wp-block-latest-posts__post-date {
    grid-column: 2;
    color: var(--kc-text-muted);
    font-size: 0.75rem;
}

/* --- Easy Table of Contents（目次プラグイン）ダーク対応 --- */
#ez-toc-container {
    background: var(--kc-surface-alt);
    border: 1px solid var(--kc-border);
    border-radius: var(--kc-radius);
    padding: 18px 22px;
    margin-bottom: 28px;
    box-shadow: none;
    width: 100%;
}

#ez-toc-container .ez-toc-title {
    color: var(--kc-heading);
    font-weight: 700;
    font-size: 1rem;
}

#ez-toc-container nav ul {
    margin-top: 10px;
}

#ez-toc-container nav li {
    margin: 6px 0;
    line-height: 1.6;
}

#ez-toc-container nav a,
.ez-toc-link {
    color: var(--kc-link) !important;
    text-decoration: none;
    transition: color var(--kc-transition);
}

#ez-toc-container nav a:hover,
.ez-toc-link:hover {
    color: var(--kc-link-hover) !important;
    text-decoration: underline;
}

/* --- その他ブロックウィジェット共通のダーク調整 --- */
.widget_block .wp-block-heading,
.wp-block-group h2.wp-block-heading {
    color: var(--kc-heading);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.wp-block-categories,
.wp-block-archives {
    list-style: none;
    padding-left: 0;
}

.wp-block-categories li,
.wp-block-archives li {
    padding: 6px 0;
    border-bottom: 1px solid var(--kc-border);
}

.wp-block-categories a,
.wp-block-archives a {
    color: var(--kc-text);
    text-decoration: none;
}

.wp-block-categories a:hover,
.wp-block-archives a:hover {
    color: var(--kc-link);
}

/* --- Newpost Catch（新着記事ウィジェット）のサムネイル統一 ---
   実際のHTML: li > a > ( figure > img ) + ( div.detail > span.title ) */
.npcatch li {
    padding: 10px 0;
    border-bottom: 1px solid var(--kc-border);
}

.npcatch li:last-child {
    border-bottom: none;
}

.npcatch li > a {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 12px;
    align-items: center;
    color: var(--kc-text);
    text-decoration: none;
    transition: color var(--kc-transition);
}

.npcatch li > a:hover {
    color: var(--kc-link);
}

.npcatch li figure {
    margin: 0;
    width: 80px;
    height: 56px;
    overflow: hidden;
    border-radius: var(--kc-radius-sm);
    background: var(--kc-surface-alt);
}

.npcatch li figure img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
}

.npcatch li .detail {
    min-width: 0;
}

.npcatch li .detail .title {
    font-size: 0.875rem;
    line-height: 1.5;
    display: block;
}

/* --- チェックリスト（チェックボックス付きli）はビュレットを非表示に ---
   記事内の確認リストが「・」と「チェックボックス」の二重マーカーになるのを防ぐ */
li:has(> input[type="checkbox"]) {
    list-style: none;
}

ul:has(> li > input[type="checkbox"]) {
    padding-left: 0.4em;
}

li > input[type="checkbox"] {
    margin-right: 8px;
    accent-color: var(--kc-accent);
    vertical-align: middle;
}
