/*
Theme Name: KhmerForJesus Adventure
Description: Forest-and-sunset "adventure" theme for the KhmerForJesus Songs plugin: sticky forest header, mountain banner with a cross on the highest peak, day trail (light) and night camp (dark) modes, Khmer-first typography with Kantumruy Pro, mobile menu and a footer with mountains. Works on its own as a simple blog theme too.
Author: KhmerForJesus
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kfj-adventure
Tags: one-column, custom-menu, custom-logo, featured-images, translation-ready, block-styles, wide-blocks
*/

/* ---------- Colours (same as the plugin, so the theme also works alone) ---------- */
:root {
  --font: "Kantumruy Pro", "Noto Sans Khmer", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bg: #F4ECDC; --bg-2: #EADFC8; --surface: #FFFBF3; --surface-2: #F7EFE0; --surface-3: #EFE3CC;
  --ink: #2A2017; --ink-2: #5C4C3C; --ink-3: #8A7963; --line: #E0D2B8; --line-2: #CDBB9B;
  --forest: #1F4D3B; --forest-2: #2D6A4F; --forest-ink: #F3EAD3; --moss: #6B8F4E;
  --sunset: #D9602A; --sunset-2: #EE8A3A; --sunset-ink: #FFFFFF; --gold: #E3A535; --gold-ink: #3A2A0A;
  --river: #1F7586; --berry: #B5473A;
  --header-bg: #163A2D; --header-ink: #F1E7CF; --header-ink-2: #BFD1BF;
  --radius: 14px; --shadow: 0 1px 2px rgba(42,32,23,.06), 0 6px 18px rgba(42,32,23,.07); --shadow-lg: 0 10px 40px rgba(42,32,23,.18);
  --topo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240'%3E%3Cg fill='none' stroke='%237a6545' stroke-opacity='.10' stroke-width='1.2'%3E%3Cpath d='M-20 60c40-30 80 20 120-5s70-40 110-10 60 25 60 25'/%3E%3Cpath d='M-20 80c40-30 80 20 120-5s70-40 110-10 60 25 60 25'/%3E%3Cpath d='M-20 140c50-20 70 30 120 10s60-50 110-20 50 20 50 20'/%3E%3Cpath d='M-20 160c50-20 70 30 120 10s60-50 110-20 50 20 50 20'/%3E%3Cellipse cx='170' cy='205' rx='38' ry='18'/%3E%3Cellipse cx='170' cy='205' rx='22' ry='9'/%3E%3Cellipse cx='60' cy='25' rx='30' ry='12'/%3E%3C/g%3E%3C/svg%3E");
  --kfj-sticky-top: 74px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0D1915; --bg-2: #11211B; --surface: #15261F; --surface-2: #1A2F26; --surface-3: #21392E;
  --ink: #EEE6D4; --ink-2: #BDB29C; --ink-3: #8D8471; --line: #24392F; --line-2: #33503F;
  --forest: #7CC39A; --forest-2: #5FAE82; --forest-ink: #0D1915; --moss: #9CC27A;
  --sunset: #FF8A3D; --sunset-2: #FFA35F; --sunset-ink: #1A0E05; --gold: #F2C14E; --river: #62BCCB; --berry: #F07A6A;
  --header-bg: #08130F; --header-ink: #EEE6D4; --header-ink-2: #9FB8A8;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 18px rgba(0,0,0,.25); --shadow-lg: 0 10px 40px rgba(0,0,0,.5);
  --topo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240'%3E%3Cg fill='none' stroke='%239fd1b5' stroke-opacity='.06' stroke-width='1.2'%3E%3Cpath d='M-20 60c40-30 80 20 120-5s70-40 110-10 60 25 60 25'/%3E%3Cpath d='M-20 80c40-30 80 20 120-5s70-40 110-10 60 25 60 25'/%3E%3Cpath d='M-20 140c50-20 70 30 120 10s60-50 110-20 50 20 50 20'/%3E%3Cpath d='M-20 160c50-20 70 30 120 10s60-50 110-20 50 20 50 20'/%3E%3Cellipse cx='170' cy='205' rx='38' ry='18'/%3E%3Cellipse cx='170' cy='205' rx='22' ry='9'/%3E%3Cellipse cx='60' cy='25' rx='30' ry='12'/%3E%3C/g%3E%3C/svg%3E");
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--ink);
  background: var(--bg) var(--topo); background-attachment: fixed; min-height: 100vh; display: flex; flex-direction: column;
}
.kfja-main { flex: 1; }
a { color: var(--river); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img, video, iframe { max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4, h5, h6 { line-height: 1.3; margin: 0 0 .5em; font-weight: 700; color: var(--ink); }
h1 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px dashed var(--line-2); margin: 1.5rem 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--sunset-2); outline-offset: 2px; border-radius: 6px; }
.screen-reader-text, .kfja-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.kfja-skip:focus { position: fixed !important; top: 8px; left: 8px; width: auto; height: auto; clip: auto; z-index: 999; background: var(--surface); padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); }
.kfj-ic { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; vertical-align: -0.18em; }
.kfj-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.kfja-container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.kfja-narrow { max-width: 820px; }
.kfja-page { padding: 28px 16px 56px; }
.kfja-muted { color: var(--ink-3); }
.kfja-small { font-size: .875rem; }

/* ---------- Header ---------- */
.kfja-header {
  position: sticky; top: 0; z-index: 50; background: var(--header-bg); color: var(--header-ink);
  box-shadow: 0 2px 0 rgba(0,0,0,.08), 0 6px 20px rgba(0,0,0,.12);
}
.admin-bar .kfja-header { top: var(--kfj-admin-bar, 32px); }
.kfja-header::after {
  content: ""; position: absolute; left: 0; right: 0; height: 3px; bottom: -3px; opacity: .9; pointer-events: none;
  background: repeating-linear-gradient(90deg, var(--sunset) 0 22px, transparent 22px 30px);
}
.kfja-header-inner { display: flex; align-items: center; gap: 10px; height: 64px; }
.kfja-brand { display: flex; align-items: center; gap: 10px; color: var(--header-ink); text-decoration: none !important; flex-shrink: 0; min-width: 0; }
.kfja-brand-mark { width: 40px; height: 40px; flex-shrink: 0; }
.kfja-brand .custom-logo { max-height: 44px; width: auto; display: block; }
.kfja-brand-name { font-weight: 700; font-size: 1.15rem; letter-spacing: .01em; line-height: 1; white-space: nowrap; }
.kfja-brand-name b { color: var(--sunset-2); font-weight: 700; }
.kfja-brand-name small { display: block; font-size: .64rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--header-ink-2); margin-top: 4px; }

.kfja-header-inner > nav { min-width: 0; flex: 0 1 auto; overflow: hidden; }
.kfja-nav { display: flex; gap: 2px; margin: 0 0 0 18px; padding: 0; list-style: none; flex-wrap: nowrap; overflow: hidden; }
.kfja-nav li { margin: 0; position: relative; }
.kfja-nav a {
  color: var(--header-ink-2); padding: 8px 12px; border-radius: 999px; font-weight: 500; font-size: .95rem;
  display: inline-flex; align-items: center; gap: 7px; text-decoration: none !important; white-space: nowrap;
}
.kfja-nav a:hover { color: var(--header-ink); background: rgba(255,255,255,.07); }
.kfja-nav .is-active > a, .kfja-nav .current-menu-item > a, .kfja-nav .current_page_item > a { color: var(--header-ink); background: rgba(255,255,255,.11); }
.kfja-nav .sub-menu { display: none; }
.kfja-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.kfja-hbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 40px; height: 40px; padding: 0 10px; border-radius: 999px;
  color: var(--header-ink); background: transparent; border: 0; cursor: pointer; text-decoration: none !important; font-weight: 600; font-size: .85rem;
}
.kfja-hbtn:hover { background: rgba(255,255,255,.1); }
.kfja-hbtn .kfj-ic { width: 20px; height: 20px; }
.kfja-hbtn-publish { background: var(--sunset); color: #fff; padding: 0 14px; }
.kfja-hbtn-publish:hover { background: var(--sunset-2); }
:root[data-theme="dark"] .kfja-hbtn-publish { color: #1a0e05; }
.kfja-lang { border: 1px solid rgba(255,255,255,.22); font-size: .8rem; padding: 0 12px; }
.kfja-menu-btn { display: none; }
.kfja-avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-weight: 700; font-size: .9rem; }
.kfja-avatar.is-pro { box-shadow: 0 0 0 2px var(--gold); }
.kfja-avatar-btn { padding: 0; }

/* Header dropdowns */
.kfja-dd { position: relative; }
.kfja-dd-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; z-index: 60; display: none;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px;
}
.kfja-dd.is-open .kfja-dd-menu { display: block; animation: kfjapop .14s ease-out; }
.kfja-dd-menu a, .kfja-dd-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 9px; color: var(--ink);
  background: none; border: 0; text-align: left; cursor: pointer; font-size: .95rem; text-decoration: none !important; font-weight: 500;
}
.kfja-dd-menu a:hover, .kfja-dd-menu button:hover { background: var(--surface-2); }
.kfja-dd-menu .kfj-ic { color: var(--sunset); }
.kfja-dd-head { padding: 8px 12px 10px; border-bottom: 1px dashed var(--line); margin-bottom: 4px; }
.kfja-dd-head strong { display: block; }
.kfja-dd-head span { font-size: .82rem; color: var(--ink-3); word-break: break-all; }
.kfja-dd-sep { height: 1px; background: var(--line); margin: 6px 4px; }
.kfja-pro-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; background: var(--gold); color: var(--gold-ink); font-size: .7rem; font-weight: 800; letter-spacing: .06em; transform: rotate(-2deg); margin-top: 6px; }
@keyframes kfjapop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }

/* Drawer (mobile menu) */
.kfja-backdrop { position: fixed; inset: 0; background: rgba(8,15,12,.55); z-index: 90; opacity: 0; pointer-events: none; transition: opacity .2s; }
.kfja-drawer {
  position: fixed; top: 0; bottom: 0; left: 0; width: min(310px, 86vw); z-index: 91; background: var(--header-bg); color: var(--header-ink);
  transform: translateX(-102%); transition: transform .24s ease; display: flex; flex-direction: column; overflow-y: auto; visibility: hidden;
}
.kfja-drawer-open .kfja-drawer { transform: none; visibility: visible; }
.kfja-drawer-open .kfja-backdrop { opacity: 1; pointer-events: auto; }
.kfja-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.kfja-drawer nav { padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.kfja-drawer nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.kfja-drawer nav a { color: var(--header-ink); padding: 11px 14px; border-radius: 10px; display: flex; align-items: center; gap: 12px; font-weight: 500; text-decoration: none !important; }
.kfja-drawer nav a:hover, .kfja-drawer nav .is-active > a, .kfja-drawer nav a.is-active { background: rgba(255,255,255,.09); }
.kfja-drawer nav .kfj-ic { color: var(--sunset-2); }
.kfja-drawer-sep { height: 1px; background: rgba(255,255,255,.08); margin: 6px 8px; }
.kfja-drawer-pro { margin: 10px 16px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 999px; background: var(--gold); color: var(--gold-ink) !important; font-weight: 700; text-decoration: none !important; }
.kfja-drawer-foot { margin-top: auto; padding: 16px; font-size: .8rem; color: var(--header-ink-2); }

/* ---------- Footer ---------- */
.kfja-footer { margin-top: 60px; background: var(--header-bg); color: var(--header-ink-2); position: relative; padding-top: 30px; }
.kfja-footer-mtn { position: absolute; left: 0; right: 0; top: -59px; height: 60px; width: 100%; color: var(--header-bg); display: block; }
.kfja-footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: 28px; padding: 26px 0 30px; }
.kfja-footer h4 { color: var(--header-ink); font-size: .95rem; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.kfja-footer h4 .kfj-ic { color: var(--sunset-2); }
.kfja-footer a { color: var(--header-ink-2); }
.kfja-footer a:hover { color: var(--header-ink); }
.kfja-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: .92rem; }
.kfja-footer p { font-size: .9rem; }
.kfja-footer-alpha { display: flex; flex-wrap: wrap; gap: 3px; font-size: .82rem; }
.kfja-footer-alpha a { padding: 2px 6px; border-radius: 5px; background: rgba(255,255,255,.05); }
.kfja-footer-alpha a:hover { background: rgba(255,255,255,.14); text-decoration: none; }
.kfja-social { display: flex; gap: 8px; margin-top: 12px; }
.kfja-social a { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); }
.kfja-social a:hover { background: var(--sunset); color: #fff; }
.kfja-footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 16px 0 22px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .85rem; }
.kfja-footer-bottom nav, .kfja-footer-bottom ul { display: flex; gap: 16px; flex-wrap: wrap; }
.kfja-footer .kfj-subscribe-form { display: flex; gap: 8px; flex-wrap: wrap; }
.kfja-footer .kfj-subscribe-form .kfj-input { flex: 1; min-width: 180px; border-radius: 999px; background: rgba(255,255,255,.07); border: 1.5px solid rgba(255,255,255,.14); color: var(--header-ink); padding: 10px 14px; }
.kfja-footer .kfj-subscribe-form .kfj-input::placeholder { color: var(--header-ink-2); }
.kfja-footer .kfj-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; border: 0; background: var(--sunset); color: #fff; font-weight: 600; cursor: pointer; }
:root[data-theme="dark"] .kfja-footer .kfj-btn { color: #1a0e05; }

/* ---------- Pages, posts, blog ---------- */
.kfja-title { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.kfja-marker {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0;
  background: var(--forest); color: var(--forest-ink); transform: rotate(-4deg); box-shadow: 0 3px 0 rgba(0,0,0,.12);
}
.kfja-marker .kfj-ic { width: 20px; height: 20px; transform: rotate(4deg); }
.kfja-marker.is-sunset { background: var(--sunset); color: #fff; }
.kfja-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.kfja-entry { padding: 30px clamp(18px, 4vw, 44px); }
.kfja-prose { font-size: 1.04rem; line-height: 1.75; overflow-wrap: break-word; }
.kfja-prose > *:first-child { margin-top: 0; }
.kfja-prose h2, .kfja-prose h3 { margin-top: 1.5em; }
.kfja-prose ul, .kfja-prose ol { padding-left: 1.4em; }
.kfja-prose li { margin-bottom: .3em; }
.kfja-prose blockquote, .kfja-prose .wp-block-quote { margin: 1.2em 0; padding: 12px 18px; border-left: 4px solid var(--sunset); background: var(--surface-2); border-radius: 0 12px 12px 0; }
.kfja-prose code { background: var(--surface-2); padding: 1px 6px; border-radius: 5px; font-size: .9em; }
.kfja-prose pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; overflow-x: auto; }
.kfja-prose img { border-radius: 12px; }
.kfja-prose table { border-collapse: collapse; width: 100%; }
.kfja-prose th, .kfja-prose td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.kfja-prose .wp-block-button__link, .kfja-prose .wp-element-button { background: var(--sunset); color: #fff; border-radius: 999px; padding: 10px 20px; font-weight: 600; text-decoration: none; }
.kfja-prose .alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); }
.kfja-prose .aligncenter { margin-left: auto; margin-right: auto; }
.kfja-prose .alignleft { float: left; margin: 0 1.2em 1em 0; }
.kfja-prose .alignright { float: right; margin: 0 0 1em 1.2em; }
.kfja-prose .wp-caption-text, .kfja-prose figcaption { font-size: .85rem; color: var(--ink-3); text-align: center; }
.kfja-meta { font-size: .88rem; color: var(--ink-3); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.kfja-thumb { border-radius: var(--radius); overflow: hidden; margin-bottom: 20px; }
.kfja-thumb img { display: block; width: 100%; }
.kfja-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.kfja-post-card { overflow: hidden; display: flex; flex-direction: column; color: var(--ink); text-decoration: none !important; }
.kfja-post-card:hover { border-color: var(--sunset); }
.kfja-post-card .kfja-card-img { aspect-ratio: 16/9; background: var(--surface-3); overflow: hidden; }
.kfja-post-card .kfja-card-img img { width: 100%; height: 100%; object-fit: cover; }
.kfja-post-card .kfja-card-body { padding: 16px 18px 18px; }
.kfja-post-card h2 { font-size: 1.15rem; margin-bottom: 6px; }
.kfja-post-card p { color: var(--ink-2); font-size: .95rem; margin: 0; }
.kfja-pagination { display: flex; justify-content: center; gap: 6px; margin-top: 26px; flex-wrap: wrap; }
.kfja-pagination .page-numbers { min-width: 40px; height: 40px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-weight: 600; text-decoration: none; }
.kfja-pagination .page-numbers.current { background: var(--forest); color: var(--forest-ink); border-color: var(--forest); }
.kfja-postnav { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.kfja-tags a { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: .82rem; margin: 0 4px 4px 0; color: var(--ink-2); }
.kfja-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 999px; border: 1.5px solid transparent; cursor: pointer; font-weight: 600; font-size: .95rem; text-decoration: none !important; background: var(--sunset); color: var(--sunset-ink); }
.kfja-btn:hover { background: var(--sunset-2); }
.kfja-btn.is-outline { background: transparent; border-color: var(--line-2); color: var(--ink); }
.kfja-search-form { display: flex; gap: 8px; max-width: 560px; }
.kfja-search-form input[type=search] { flex: 1; min-width: 0; padding: 10px 14px; border-radius: 999px; border: 1.5px solid var(--line-2); background: var(--surface); color: var(--ink); }

/* ---------- Comments ---------- */
.kfja-comments { margin-top: 26px; padding: 22px clamp(16px, 3vw, 28px); }
.kfja-comments h2 { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; }
.kfja-comment-list, .kfja-comment-list .children { list-style: none; margin: 0; padding: 0; }
.kfja-comment-list .children { padding-left: 28px; }
.kfja-comment { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.kfja-comment .avatar { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; }
.kfja-comment-body { flex: 1; min-width: 0; }
.kfja-comment-who { font-weight: 700; font-size: .92rem; }
.kfja-comment-who small { font-weight: 400; color: var(--ink-3); margin-left: 6px; }
.kfja-comment-text p { margin: .3em 0; }
.kfja-comment-actions { font-size: .82rem; display: flex; gap: 12px; }
.kfja-comments .comment-respond { margin-top: 18px; }
.kfja-comments .comment-reply-title { font-size: 1.05rem; }
.kfja-comments label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 5px; }
.kfja-comments textarea, .kfja-comments input[type=text], .kfja-comments input[type=email], .kfja-comments input[type=url] {
  width: 100%; font-size: 1rem; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line-2); border-radius: 10px; padding: 10px 13px;
}
.kfja-comments textarea { min-height: 110px; }
.kfja-comments .comment-form-cookies-consent { display: flex; gap: 8px; align-items: flex-start; font-size: .88rem; }
.kfja-comments .comment-form-cookies-consent label { font-weight: 400; }
.kfja-comments .form-submit input[type=submit] { background: var(--sunset); color: var(--sunset-ink); border: 0; border-radius: 999px; padding: 10px 20px; font-weight: 600; cursor: pointer; }
.kfja-comments .comment-notes, .kfja-comments .logged-in-as { font-size: .85rem; color: var(--ink-3); }
.kfja-comments .bypostauthor > .kfja-comment .kfja-comment-who::after { content: "★"; color: var(--gold); margin-left: 6px; }

.kfja-song-comments { max-width: 820px; }
@media (min-width: 960px) { .kfja-song-comments { max-width: calc(100% - 364px); } }

/* ---------- 404 ---------- */
.kfja-404 { text-align: center; padding: 50px 16px 30px; }
.kfja-404 svg.kfja-404-art { width: min(420px, 90%); height: auto; margin: 0 auto 10px; display: block; }
.kfja-404 .kfja-search-form { margin: 18px auto; }

/* ---------- Plugin pages inside the theme ---------- */
.kfja-main > .kfj-hero { margin-bottom: 0; }
.kfja-main > .kfj-hero .kfj-hero-content { padding-left: 16px; padding-right: 16px; }
.kfja-plugin-page .kfj-page-head h1 { font-size: clamp(1.5rem, 3vw, 2rem); }
.kfja-plugin-page > .kfj:first-child, .kfja-plugin-page .kfja-content > .kfj:first-child { margin-top: 0; }
.kfja-content > *:first-child { margin-top: 0; }
.kfja-content > p:empty { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .kfja-nav { display: none; }
  .kfja-menu-btn { display: inline-flex; }
  .kfja-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  :root { --kfj-sticky-top: 66px; }
  .kfja-header-inner { height: 58px; gap: 4px; }
  .kfja-brand-name small { display: none; }
  .kfja-brand-name { font-size: 1rem; }
  .kfja-brand-mark { width: 34px; height: 34px; }
  .kfja-hbtn-publish span, .kfja-lang-text { display: none; }
  .kfja-hide-sm { display: none !important; }
  .kfja-actions { gap: 2px; }
  .kfja-hbtn-publish { padding: 0; width: 40px; }
  .kfja-hbtn { min-width: 36px; padding: 0 6px; }
  .kfja-footer-grid { grid-template-columns: 1fr; }
  .kfja-page { padding-top: 20px; }
  .kfja-entry { padding: 22px 18px; }
}
@media (max-width: 380px) {
  .kfja-brand-name { font-size: .92rem; }
  .kfja-hbtn { min-width: 34px; }
}
@media print {
  .kfja-header, .kfja-footer, .kfja-drawer, .kfja-backdrop, .kfja-comments { display: none !important; }
  body { background: #fff !important; }
}
