/*
Theme Name: Kadegaje
Theme URI: https://example.com/
Author: ハラダ
Description: 家電量販店の販売員 × メイカーのガジェットブログ「カデガジェ」専用テーマ。「売り場の説得力を、静かなページで。」— 白・余白・1px罫線・値札カードを軸にしたミニマルデザイン。ライト標準/ダークトグル対応。
Version: 1.0.0
Requires at least: 6.2
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kadegaje
*/

/* ==========================================================
   Design tokens — handoff: Gadget Blog.dc.html
   ========================================================== */
:root {
  --bg: #FAFAF8;
  --surface: #FFFFFF;
  --text: #1A1A1A;
  --text-sub: #6B6B6B;
  --line: #E5E5E1;
  --accent: #5B83C0;
  --note-bg: #F3F3F0;
  --accent-ink: #FFFFFF;
  --font-heading: 'Zen Kaku Gothic New', sans-serif;
  --font-body: 'Noto Sans JP', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}
[data-theme="dark"] {
  --bg: #141414;
  --surface: #1E1E1E;
  --text: #EDEDEA;
  --text-sub: #9A9A97;
  --line: #2C2C2C;
  --accent: #A6C4EC;
  --note-bg: #1B1B1B;
  --accent-ink: #101826;
}

/* ==========================================================
   Base
   ========================================================== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: 0.03em;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: var(--accent-ink); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@keyframes kg-page-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes kg-search-in {
  from { opacity: 0; transform: translateX(10px); }
  to   { opacity: 1; transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  background: var(--surface);
  color: var(--text);
}
.skip-link:focus { left: 8px; top: 8px; }
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  word-wrap: normal !important;
}

/* ==========================================================
   Layout containers
   ========================================================== */
.kg-container { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.kg-narrow    { max-width: 680px;  margin: 0 auto; padding: 0 24px; }
body { padding-top: 60px; } /* fixed header */
.kg-page { animation: kg-page-in .42s cubic-bezier(.2,.7,.2,1) both; }

/* ==========================================================
   Header
   ========================================================== */
.kg-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  transform: translateY(0);
  transition: transform .28s ease;
}
.kg-header.is-hidden { transform: translateY(-100%); }
/* WP管理バー(ログイン時)と重ならないように */
.admin-bar .kg-header { top: 32px; }
@media screen and (max-width: 782px) {
  .admin-bar .kg-header { top: 46px; }
}
.kg-header__inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.kg-brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
  min-width: 0;
}
.kg-brand:hover { text-decoration: none; }
.kg-brand__name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.kg-brand__sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-sub);
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kg-header__actions { display: flex; align-items: center; gap: 6px; }
.kg-search { display: flex; align-items: center; gap: 6px; }
.kg-search__input {
  display: none;
  border: 0;
  border-bottom: 1px solid var(--accent);
  outline: 0;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  width: 150px;
  padding: 5px 2px;
  border-radius: 0;
}
.kg-search.is-open .kg-search__input {
  display: block;
  animation: kg-search-in .28s ease both;
}
.kg-icon-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
}
.kg-theme-toggle .kg-icon-sun { display: none; }
[data-theme="dark"] .kg-theme-toggle .kg-icon-moon { display: none; }
[data-theme="dark"] .kg-theme-toggle .kg-icon-sun { display: block; }

/* ==========================================================
   Shared meta row (category / dot / date)
   ========================================================== */
.kg-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.kg-meta__cat {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
a.kg-meta__cat:hover { text-decoration: underline; }
.kg-meta__dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--text-sub);
  flex: none;
}
.kg-meta__date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-sub);
  letter-spacing: 0;
}
.kg-meta--lg .kg-meta__cat, .kg-meta--lg .kg-meta__date { font-size: 12px; }

/* Section heading with accent bar */
.kg-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
}
.kg-section-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.02em;
  margin: 0;
  padding-left: 10px;
  border-left: 2px solid var(--accent);
}
.kg-section-link {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-sub);
}

/* ==========================================================
   Top page — hero
   ========================================================== */
.kg-hero { padding: 56px 0 72px; }
.kg-hero__link { display: block; color: var(--text); text-decoration: none; }
.kg-hero__link:hover { text-decoration: none; }
.kg-hero__media {
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 24px;
}
.kg-hero__media img,
.kg-hero__media .kg-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  transition: transform .2s ease;
}
.kg-hero__link:hover .kg-hero__media img,
.kg-hero__link:hover .kg-hero__media .kg-placeholder { transform: scale(1.02); }
.kg-hero .kg-meta { margin-bottom: 12px; }
.kg-hero__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 34px;
  line-height: 1.35;
  letter-spacing: 0.02em;
  margin: 0 0 14px;
  max-width: 820px;
}
.kg-hero__excerpt {
  margin: 0;
  color: var(--text-sub);
  font-size: 15px;
  line-height: 1.9;
  max-width: 680px;
}

.kg-divider { height: 1px; background: var(--line); }

/* ==========================================================
   Top page — card grid
   ========================================================== */
.kg-cards { padding: 56px 0 72px; }
.kg-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 44px 40px;
}
.kg-card { display: block; color: var(--text); text-decoration: none; }
.kg-card:hover { text-decoration: none; }
.kg-card__media {
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 16px;
}
.kg-card__media img,
.kg-card__media .kg-placeholder {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  transition: transform .2s ease;
}
.kg-card:hover .kg-card__media img,
.kg-card:hover .kg-card__media .kg-placeholder { transform: scale(1.02); }
.kg-card .kg-meta { margin-bottom: 8px; }
.kg-card__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 19px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  margin: 0;
}

/* image placeholder (no featured image) */
.kg-placeholder {
  background: var(--note-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-sub);
  font-family: var(--font-mono);
  font-size: 11px;
}

/* Archive header */
.kg-archive-head { padding: 56px 0 0; }
.kg-archive-head + .kg-cards { padding-top: 32px; }
.kg-archive-head__label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-sub);
  letter-spacing: 0.06em;
  margin: 0 0 8px;
}
.kg-archive-head__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: 0.02em;
  margin: 0;
}
.kg-archive-head__desc { margin: 10px 0 0; color: var(--text-sub); font-size: 14px; }

/* Pagination */
.kg-pagination {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 0 0 72px;
  font-family: var(--font-mono);
  font-size: 12px;
}
.kg-pagination a { color: var(--text-sub); }
.kg-pagination a:hover { color: var(--accent); }

/* ==========================================================
   Article page
   ========================================================== */
.kg-article { padding: 56px 0 0; }
.kg-breadcrumb { margin-bottom: 20px; }
.kg-breadcrumb a {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-sub);
}
.kg-article .kg-meta { margin-bottom: 16px; }
.kg-article__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 30px;
  line-height: 1.4;
  letter-spacing: 0.02em;
  margin: 0 0 20px;
}

/* Reliability badge */
.kg-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 14px;
}
.kg-badge__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}
.kg-badge__text { font-size: 12.5px; color: var(--text-sub); line-height: 1.4; }

/* PR notice (above TOC — ステマ規制対応) */
.kg-pr-note {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-sub);
  margin: 0 0 28px;
  letter-spacing: 0.02em;
}

/* Eyecatch */
.kg-eyecatch { margin: 0 0 40px; }
.kg-eyecatch__media { overflow: hidden; border-radius: 8px; }
.kg-eyecatch__media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}
.kg-eyecatch figcaption {
  font-size: 13px;
  color: var(--text-sub);
  margin: 12px 0 0;
  line-height: 1.7;
}

/* ==========================================================
   TOC (collapsible, h2 only)
   ========================================================== */
.kg-toc {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0 0 48px;
  overflow: hidden;
}
.kg-toc summary {
  list-style: none;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.kg-toc summary::-webkit-details-marker { display: none; }
.kg-toc__label {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
}
.kg-toc__chevron {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--text-sub);
  width: 16px;
  text-align: center;
}
.kg-toc__chevron::before { content: "+"; }
.kg-toc[open] .kg-toc__chevron::before { content: "\2212"; }
.kg-toc__body {
  padding: 4px 18px 16px;
  border-top: 1px solid var(--line);
}
.kg-toc__list { margin: 8px 0 0; padding: 0; list-style: none; }
.kg-toc__list li {
  margin: 0 0 10px;
  display: flex;
  gap: 12px;
  align-items: baseline;
}
.kg-toc__list li:last-child { margin-bottom: 0; }
.kg-toc__num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-sub);
}
.kg-toc__list a { color: var(--text); }

/* ==========================================================
   Article content (.kg-content = the_content)
   ========================================================== */
.kg-content { overflow-wrap: break-word; }
.kg-content > * { margin-top: 0; margin-bottom: 1.5em; }

.kg-content h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 23px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  margin: 3em 0 0.8em;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
}
.kg-content h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.6;
  letter-spacing: 0.02em;
  margin: 2em 0 0.6em;
}
.kg-content h4, .kg-content h5, .kg-content h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 16px;
  margin: 2em 0 0.6em;
}

.kg-content a { text-decoration: none; }
.kg-content a:hover { text-decoration: underline; }

/* inline code */
.kg-content code {
  font-family: var(--font-mono);
  font-size: 13.5px;
  background: var(--note-bg);
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0;
}

/* code block (JS wraps .wp-block-code into .kg-code) */
.kg-code {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  margin: 0 0 1.5em;
  background: var(--surface);
}
.kg-code__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
}
.kg-code__label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-sub);
  letter-spacing: 0.04em;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kg-code__copy {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--text-sub);
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: pointer;
  flex: none;
}
.kg-code pre,
.kg-content .wp-block-code {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.85;
  letter-spacing: 0;
  color: var(--text);
  background: transparent;
  border: 0;
  border-radius: 0;
}
.kg-code pre code,
.kg-content .wp-block-code code {
  background: transparent;
  padding: 0;
  border-radius: 0;
  font-size: 13px;
}
/* not-yet-wrapped fallback (no JS) */
.kg-content > .wp-block-code {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  margin-bottom: 1.5em;
}

/* tables — spec style: horizontal 1px lines only, mono values right-aligned */
.kg-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}
.kg-content .wp-block-table { overflow: hidden; }
.kg-content table th,
.kg-content table td {
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 12px 8px 12px 0;
  text-align: left;
  vertical-align: top;
}
.kg-content table th { font-weight: 500; color: var(--text-sub); }
.kg-content table td:first-child { color: var(--text-sub); }
.kg-content table td:last-child {
  padding: 12px 0;
  text-align: right;
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text);
}

/* blockquote */
.kg-content blockquote {
  margin: 2em 0;
  padding: 2px 0 2px 18px;
  border-left: 2px solid var(--line);
  color: var(--text-sub);
  font-size: 15px;
  line-height: 1.85;
}
.kg-content blockquote p { margin: 0; }
.kg-content blockquote cite { font-size: 13px; font-style: normal; }

/* images */
.kg-content img { border-radius: 8px; display: block; }
.kg-content figure { margin-left: 0; margin-right: 0; }
.kg-content figcaption {
  font-size: 13px;
  color: var(--text-sub);
  margin-top: 10px;
  line-height: 1.7;
  text-align: left;
}

/* note (免責・自己責任) */
.kg-note {
  background: var(--note-bg);
  border-left: 3px solid var(--line);
  border-radius: 0 6px 6px 0;
  padding: 16px 18px;
  margin: 0 0 1.5em;
}
.kg-note__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
  margin: 0 0 6px;
}
.kg-note p {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-sub);
}

/* ==========================================================
   値札カード (price card) — signature component
   ========================================================== */
.kg-price-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: 6px;
  padding: 22px 22px 20px;
  margin: 8px 0 40px;
}
.kg-price-card__kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-sub);
  letter-spacing: 0.06em;
  margin: 0 0 10px;
}
.kg-price-card__name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.02em;
  margin: 0 0 6px;
}
.kg-price-card__desc {
  margin: 0 0 16px;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--text-sub);
}
.kg-price-card__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}
.kg-price-card__price {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 22px;
  color: var(--text);
}
.kg-btn,
.kg-content .kg-btn {
  height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 20px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.kg-btn:hover { text-decoration: none; opacity: .92; }

/* affiliate variant (with product thumb) */
.kg-price-card--product { padding: 22px; margin: 8px 0 48px; }
.kg-price-card__media-row { display: flex; gap: 18px; align-items: center; }
.kg-price-card__thumb {
  flex: none;
  width: 88px; height: 88px;
  overflow: hidden;
  border-radius: 6px;
}
.kg-price-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 0; }
.kg-price-card__body { flex: 1; min-width: 0; }
.kg-price-card--product .kg-price-card__name { font-size: 16px; margin-bottom: 4px; }
.kg-price-card--product .kg-price-card__desc { font-size: 13px; line-height: 1.7; margin-bottom: 12px; }
.kg-price-card--product .kg-price-card__row { gap: 12px; }
.kg-price-card--product .kg-price-card__price { font-size: 18px; }
.kg-price-card--product .kg-btn { padding: 0 18px; font-size: 13.5px; }

/* pattern internals (Gutenberg block markup) */
.kg-content > .kg-toc { margin: 0 0 48px; }
.kg-price-card__kicker { margin: 0 0 10px !important; }
.kg-price-card p.kg-price-card__name { margin: 0 0 6px; color: var(--text); font-size: 18px; }
.kg-price-card--product p.kg-price-card__name { font-size: 16px; margin-bottom: 4px; }
.kg-price-card p.kg-price-card__desc { margin: 0 0 16px; }
.kg-price-card--product p.kg-price-card__desc { margin-bottom: 12px; }
.kg-price-card p.kg-price-card__price { margin: 0; }
.kg-price-card .wp-block-buttons { margin: 0; }
.kg-price-card .wp-block-button { margin: 0; }
.kg-price-card .wp-block-button__link {
  height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 20px;
  background: var(--accent);
  color: var(--accent-ink);
  border: 0;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-body);
  text-decoration: none;
  line-height: 1;
}
.kg-price-card--product .wp-block-button__link { padding: 0 18px; font-size: 13.5px; }
.kg-price-card .wp-block-button__link:hover { text-decoration: none; opacity: .92; }
.wp-block-image.kg-price-card__thumb { margin: 0; }
.kg-price-card__thumb img { border-radius: 0; }
.kg-note p.kg-note__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
  margin: 0 0 6px;
  color: var(--text);
}

/* ==========================================================
   Related posts / profile (single footer area)
   ========================================================== */
.kg-article-end { margin-top: 48px; }
.kg-article-end .kg-divider { margin-bottom: 32px; }
.kg-related-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.02em;
  margin: 0 0 24px;
  padding-left: 10px;
  border-left: 2px solid var(--accent);
}
.kg-related {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 48px;
}
.kg-related__item {
  display: flex;
  gap: 16px;
  align-items: center;
  color: var(--text);
  text-decoration: none;
}
.kg-related__item:hover { text-decoration: none; }
.kg-related__item:hover .kg-related__title { text-decoration: underline; text-underline-offset: 3px; }
.kg-related__thumb {
  flex: none;
  width: 96px; height: 64px;
  overflow: hidden;
  border-radius: 6px;
}
.kg-related__thumb img,
.kg-related__thumb .kg-placeholder { width: 100%; height: 100%; object-fit: cover; display: block; }
.kg-related__body { flex: 1; min-width: 0; }
.kg-related__cat {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  margin-bottom: 4px;
  text-transform: uppercase;
}
.kg-related__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.kg-profile {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}
.kg-profile__avatar {
  flex: none;
  width: 56px; height: 56px;
  overflow: hidden;
  border-radius: 50%;
}
.kg-profile__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kg-profile__body { flex: 1; min-width: 0; }
.kg-profile__name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  margin: 0 0 4px;
}
.kg-profile__bio {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--text-sub);
}

/* ==========================================================
   Footer
   ========================================================== */
.kg-footer { border-top: 1px solid var(--line); margin-top: 80px; }
.kg-footer__inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 56px 24px 64px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}
.kg-footer__brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
  margin: 0 0 10px;
}
.kg-footer__desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.9;
  color: var(--text-sub);
  max-width: 320px;
}
.kg-footer__label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-sub);
  letter-spacing: 0.06em;
  margin: 0 0 12px;
}
.kg-footer__links { display: flex; flex-direction: column; gap: 9px; }
.kg-footer__links a { font-size: 13.5px; color: var(--text); }
.kg-footer__links ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; }
.kg-footer__bottom { border-top: 1px solid var(--line); }
.kg-footer__bottom-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 16px 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-sub);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
}

/* ==========================================================
   Search page / 404
   ========================================================== */
.kg-search-form { display: flex; gap: 10px; margin: 24px 0 0; }
.kg-search-form input[type="search"] {
  flex: 1;
  border: 0;
  border-bottom: 1px solid var(--accent);
  outline: 0;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  padding: 8px 2px;
  border-radius: 0;
}
.kg-search-form button {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
}
.kg-empty { padding: 56px 0 72px; color: var(--text-sub); }

/* ==========================================================
   Responsive — mobile first spec, 7割スマホ想定
   ========================================================== */
@media (max-width: 760px) {
  .kg-grid { grid-template-columns: 1fr; gap: 40px; }
  .kg-hero { padding: 40px 0 56px; }
  .kg-hero__title { font-size: 28px; line-height: 1.4; }
  .kg-cards { padding: 40px 0 56px; }
  .kg-article__title { font-size: 28px; }
  .kg-content h2 { font-size: 21px; }
  .kg-footer__inner {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 40px 24px 48px;
  }
  .kg-brand__sub { display: none; }
  /* スペック表: SPは折り返し(横スクロールさせない) */
  .kg-content table td { white-space: normal; }
}
@media (min-width: 761px) {
  .kg-hero__title { font-size: 34px; }
}
