:root {
  --kk-green: #38857e;
  --kk-green-dark: #246b64;
  --kk-green-ink: #193f3a;
  --kk-bg: #faf8f3;
  --kk-soft: #edf6f4;
  --kk-peach: #f3cfa6;
  --kk-peach-soft: #fff4e7;
  --kk-orange: #c97b3c;
  --kk-red: #c94f4f;
  --kk-text: #263a37;
  --kk-muted: #687a76;
  --kk-border: #d9e6e2;
  --kk-white: #ffffff;
  --kk-shadow: 0 14px 36px rgba(31, 74, 67, .08);
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--kk-text); font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "YuGothic", "Noto Sans JP", sans-serif; line-height: 1.8; background: #fff; }
::selection { background: var(--kk-peach); color: var(--kk-green-ink); }
a { color: var(--kk-green-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
.kk-container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.kk-narrow { width: min(840px, calc(100% - 32px)); }
.kk-skip-link { position: absolute; left: -9999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 100; }
.kk-skip-link:focus { left: 8px; }
.kk-site-header { background: rgba(255,255,255,.98); border-bottom: 1px solid var(--kk-border); box-shadow: 0 4px 18px rgba(31, 74, 67, .04); position: sticky; top: 0; z-index: 20; overflow: visible; }
.kk-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 94px; padding: 11px 0; }
.kk-brand { flex: 0 0 280px; min-width: 0; }
.kk-default-logo, .custom-logo-link { display: block; width: fit-content; max-width: 100%; line-height: 0; padding: 2px 0; }
.kk-brand-logo, .custom-logo { display: block; width: clamp(240px, 24vw, 280px); max-width: 100%; max-height: 82px; object-fit: contain; object-position: left center; }
.kk-site-title { display: block; color: var(--kk-text); font-weight: 800; font-size: 1.25rem; }
.kk-site-tagline { margin: 2px 0 0; font-size: .82rem; color: var(--kk-muted); line-height: 1.5; }
.kk-main-nav { margin-left: auto; }
.kk-main-nav ul, .kk-site-footer ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; align-items: center; }
.kk-main-nav li { margin: 0; }
.kk-main-nav a { display: block; color: var(--kk-text); font-weight: 700; font-size: .9rem; line-height: 1.5; padding: 9px 11px; border-radius: 10px; transition: background-color .18s ease, color .18s ease; }
.kk-main-nav a:hover, .kk-main-nav a:focus-visible, .kk-main-nav .current-menu-item > a, .kk-main-nav .current-menu-ancestor > a { color: var(--kk-green-dark); background: var(--kk-soft); text-decoration: none; }
@media screen and (min-width: 783px) { body.admin-bar .kk-site-header { top: 32px; } }
@media screen and (min-width: 601px) and (max-width: 782px) { body.admin-bar .kk-site-header { top: 46px; } }
@media screen and (max-width: 600px) { body.admin-bar .kk-site-header { top: 0; } }
.kk-hero { position: relative; overflow: hidden; background: radial-gradient(circle at 88% 8%, rgba(243, 207, 166, .34) 0, rgba(243, 207, 166, 0) 30%), linear-gradient(135deg, #f2f9f7 0%, #fffaf2 100%); padding: 68px 0 64px; }
.kk-hero::after { content: ""; position: absolute; right: -150px; bottom: -230px; width: 430px; height: 430px; border: 1px solid rgba(56, 133, 126, .12); border-radius: 50%; pointer-events: none; }
.kk-hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(340px, .92fr); gap: 56px; align-items: center; }
.kk-hero-copy { max-width: 650px; }
.kk-label { display: inline-flex; align-items: center; color: var(--kk-green-dark); background: rgba(56, 133, 126, .08); border-radius: 999px; padding: 5px 11px; font-weight: 800; letter-spacing: .04em; font-size: .82rem; margin: 0 0 14px; }
h1, h2, h3 { line-height: 1.35; }
h1 { max-width: 13em; font-size: clamp(2rem, 4vw, 3.15rem); letter-spacing: .015em; text-wrap: balance; margin: 0 0 20px; }
.kk-lead { max-width: 44em; font-size: 1.06rem; line-height: 2; color: #3f504b; margin: 0 0 28px; }
.kk-hero-actions, .kk-emergency-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.kk-button { display: inline-flex; justify-content: center; align-items: center; min-height: 48px; padding: 11px 20px; border-radius: 12px; font-weight: 800; border: 1px solid transparent; text-decoration: none; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease; }
.kk-button:hover { text-decoration: none; filter: brightness(.99); transform: translateY(-1px); }
.kk-button:focus-visible { outline: 3px solid rgba(56, 133, 126, .22); outline-offset: 2px; }
.kk-button-primary { background: var(--kk-green); color: #fff; box-shadow: 0 8px 18px rgba(56, 133, 126, .18); }
.kk-button-outline { background: rgba(255,255,255,.88); color: var(--kk-green-dark); border-color: var(--kk-border); }
.kk-button-danger { background: var(--kk-red); color: #fff; }
.kk-hero-card, .kk-side-card, .kk-post-card, .kk-office-card, .kk-alert { background: #fff; border: 1px solid var(--kk-border); border-radius: 18px; box-shadow: var(--kk-shadow); }
.kk-hero-card { position: relative; padding: 28px; border-radius: 20px; border-top: 4px solid var(--kk-peach); box-shadow: 0 18px 44px rgba(31, 74, 67, .10); }
.kk-hero-card h2 { font-size: 1.25rem; margin: 0 0 18px; }
.kk-section { padding: 60px 0; }
.kk-section-soft { background: var(--kk-bg); }
.kk-section-heading { margin-bottom: 24px; }
.kk-heading-row { display: flex; justify-content: space-between; gap: 24px; align-items: end; }
.kk-issue-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kk-issue-card { background: #fff; border: 1px solid var(--kk-border); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 6px; min-height: 96px; box-shadow: 0 8px 24px rgba(31, 74, 67, .05); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.kk-issue-card:hover { transform: translateY(-2px); border-color: #bfd8d2; box-shadow: 0 12px 28px rgba(31, 74, 67, .08); text-decoration: none; }
.kk-issue-card span { font-weight: 800; color: var(--kk-text); }
.kk-issue-card small { color: var(--kk-muted); }
.kk-emergency-box { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; background: #fff7f7; border: 1px solid #f4c5c5; border-radius: 20px; padding: 24px; }
.kk-office-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.kk-office-card { display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 10px 28px rgba(36, 48, 44, .06); }
.kk-card-body { padding: 18px; flex: 1; }
.kk-card-body h2 { font-size: 1.1rem; margin: 10px 0 8px; }
.kk-card-body p { color: #4d5a55; margin: 0 0 12px; }
.kk-card-footer { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--kk-border); padding: 12px 18px; font-weight: 800; }
.kk-chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.kk-chip { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; background: var(--kk-soft); color: var(--kk-green-dark); font-size: .78rem; font-weight: 800; }
.kk-card-meta { display: grid; grid-template-columns: 58px 1fr; gap: 2px 8px; margin: 0; font-size: .88rem; }
.kk-card-meta dt { color: var(--kk-muted); }
.kk-card-meta dd { margin: 0; }
.kk-search-panel { background: #fff; border: 1px solid var(--kk-border); border-radius: 16px; padding: 16px; }
.kk-search-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 10px; align-items: end; }
.kk-search-field label { display: block; font-size: .78rem; font-weight: 800; color: var(--kk-muted); margin-bottom: 4px; }
.kk-search-field input, .kk-search-field select { width: 100%; min-height: 42px; border: 1px solid var(--kk-border); border-radius: 10px; padding: 8px 10px; background: #fff; font-size: 1rem; }
.kk-office-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.kk-office-detail, .kk-entry { background: #fff; }
.kk-detail-section { border-bottom: 1px solid var(--kk-border); padding: 0 0 24px; margin-bottom: 24px; }
.kk-detail-section h2 { margin-top: 0; }
.kk-detail-list { display: grid; grid-template-columns: 140px minmax(0,1fr); border: 1px solid var(--kk-border); border-bottom: 0; margin: 0; }
.kk-detail-list dt, .kk-detail-list dd { padding: 12px 14px; border-bottom: 1px solid var(--kk-border); }
.kk-detail-list dt { background: var(--kk-bg); font-weight: 800; }
.kk-detail-list dd { margin: 0; }
.kk-alert { padding: 16px; margin-bottom: 24px; box-shadow: none; }
.kk-alert-info { background: #f4fbff; border-color: #cfe9f8; }
.kk-side-card { padding: 18px; margin-bottom: 18px; box-shadow: 0 8px 24px rgba(36, 48, 44, .05); }
.kk-side-card h2 { font-size: 1.1rem; margin-top: 0; }
.kk-related-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.kk-related-list a { font-weight: 800; }
.kk-page-header { padding: 40px 0 20px; }
.kk-entry-content { font-size: 1.02rem; }
.kk-entry-content h2 { margin-top: 2.2em; }
.kk-post-list { display: grid; gap: 18px; }
.kk-post-card { padding: 20px; box-shadow: none; }
.kk-post-card h2 { margin-top: 0; }
.kk-footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 24px; padding: 36px 0 20px; }
.kk-site-footer { background: var(--kk-green-ink); color: #e6f0ec; }
.kk-site-footer a { color: #fff; }
.kk-footer-note { border-top: 1px solid rgba(255,255,255,.18); padding: 14px 0 28px; color: #cfdad6; font-size: .9rem; }
.kk-empty { background: var(--kk-bg); border: 1px solid var(--kk-border); border-radius: 18px; padding: 28px; }
.pagination .nav-links { display: flex; gap: 8px; justify-content: center; margin-top: 28px; }
.page-numbers { padding: 8px 12px; border: 1px solid var(--kk-border); border-radius: 10px; }
.page-numbers.current { background: var(--kk-green); color: #fff; border-color: var(--kk-green); }
@media (max-width: 900px) {
  .kk-header-inner, .kk-footer-grid { display: block; }
  .kk-header-inner { min-height: 0; padding: 12px 0 14px; }
  .kk-brand { max-width: 100%; }
  .kk-brand-logo, .custom-logo { width: min(100%, 250px); max-height: 78px; }
  .kk-main-nav { margin: 10px 0 0; }
  .kk-main-nav ul { gap: 2px 4px; }
  .kk-main-nav a { padding: 7px 9px; }
  .kk-hero-grid, .kk-office-layout, .kk-emergency-box { grid-template-columns: 1fr; }
  .kk-hero-grid { gap: 32px; }
  .kk-hero-copy { max-width: none; }
  .kk-issue-grid, .kk-office-grid { grid-template-columns: repeat(2, 1fr); }
  .kk-search-form { grid-template-columns: repeat(2, 1fr); }
  .kk-search-form .kk-search-submit { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .kk-container, .kk-narrow { width: min(100% - 24px, 1120px); }
  .kk-header-inner { padding: 10px 0 12px; }
  .kk-brand-logo, .custom-logo { width: min(100%, 220px); max-height: 70px; }
  .kk-main-nav ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kk-main-nav a { text-align: center; background: var(--kk-bg); }
  .kk-hero { padding: 46px 0 42px; }
  .kk-hero::after { width: 300px; height: 300px; right: -160px; bottom: -180px; }
  .kk-hero-card { padding: 22px 18px; }
  .kk-issue-grid, .kk-office-grid, .kk-search-form { grid-template-columns: 1fr; }
  .kk-detail-list { grid-template-columns: 1fr; }
  .kk-detail-list dt { border-bottom: 0; padding-bottom: 4px; }
  .kk-detail-list dd { padding-top: 4px; }
}
/* Enhanced support office search */
.kk-search-form-enhanced { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kk-search-form-enhanced .kk-search-field-wide { grid-column: span 2; }
.kk-search-form-enhanced .kk-search-submit { grid-column: span 1; }
.kk-search-reset { align-self: end; min-height: 42px; display: flex; align-items: center; }
.kk-current-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; font-size: .9rem; }
@media (max-width: 900px) { .kk-search-form-enhanced { grid-template-columns: repeat(2, 1fr); } .kk-search-form-enhanced .kk-search-field-wide { grid-column: 1 / -1; } }
@media (max-width: 560px) { .kk-search-form-enhanced { grid-template-columns: 1fr; } .kk-search-form-enhanced .kk-search-field-wide, .kk-search-form-enhanced .kk-search-submit { grid-column: auto; } }

/* Kurashi Support DB v0.3.0 integration */
.kk-hero-card .ksdb-search-panel {
  grid-template-columns: 1fr;
  padding: 0;
  border: 0;
  background: transparent;
}
.kk-hero-card .ksdb-search-keyword,
.kk-hero-card .ksdb-search-submit { grid-column: auto; }
.kk-hero-card .ksdb-search-submit button { width: 100%; min-height: 48px; border-radius: 12px; background: var(--kk-green); box-shadow: 0 8px 18px rgba(56, 133, 126, .16); }
.kk-hero-card .ksdb-search-panel label { color: var(--kk-text); }
.kk-hero-card .ksdb-search-panel input,
.kk-hero-card .ksdb-search-panel select { border-color: #cdded9; background: #fffdfa; }
.kk-hero-card .ksdb-search-panel input:focus,
.kk-hero-card .ksdb-search-panel select:focus { outline: 3px solid rgba(56, 133, 126, .14); border-color: var(--kk-green); }
.kk-archive-hero .ksdb-search-panel { margin-top: 22px; }
.kk-archive-hero .ksdb-search-submit button { border-radius: 12px; }
.kk-result-count { margin: 0 0 18px; font-weight: 800; }
.kk-button-block { display: flex; width: 100%; margin-top: 10px; }
.kk-alert-info p { margin: 6px 0 0; }
.kk-office-hero-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.kk-card-chips .kk-chip:nth-child(n+5) { display: none; }
.kk-card-footer a:last-child { text-align: right; }
@media (max-width: 900px) {
  .kk-office-hero-inner { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .kk-button, .kk-issue-card, .kk-main-nav a { transition: none; }
  .kk-button:hover, .kk-issue-card:hover { transform: none; }
}
