/* ===============================
   キングラムリカー風モダン上書きCSS
   =============================== */

body {
  background: #f8fafc;
  font-family: 'Inter', 'Noto Sans JP', 'Roboto', 'system-ui', Arial, sans-serif;
  color: #23272f;
  line-height: 1.7;
}

main, .container, .content, .entry-content, .post, .page {
  background: #fff;
  /* 不要なレイヤーを削除してテーマの元のレイアウトを活かす */
}

/* 見出し */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', 'Noto Sans JP', 'Roboto', 'system-ui', sans-serif;
  font-weight: 700;
  margin-top: 2.5em;
  margin-bottom: 1.5em;
  line-height: 1.2;
  letter-spacing: 0.01em;
  background: none;
  border-radius: 0;
  box-shadow: none;
}
h1 {
  font-size: 2.5em;
  border-bottom: 4px solid #2563eb;
  padding-bottom: 0.25em;
  color: #1e293b;
}
h2 {
  font-size: 1.7em;
  border-left: 7px solid #2563eb;
  padding-left: 0.9em;
  color: #2563eb;
  background: none;
}
h3 {
  font-size: 1.25em;
  border-left: 4px solid #ffe066;
  padding-left: 0.8em;
  color: #334155;
  background: none;
}

/* 段落 */
p {
  margin: 1.5em 0;
  font-size: 1.12em;
}

/* リスト */
ul, ol {
  margin: 1.5em 0 1.5em 2.2em;
  padding-left: 1.3em;
}
li {
  margin-bottom: 0.7em;
  line-height: 1.9;
  padding-left: 0;
}
ul li::before, ol li::before {
  content: none !important;
  display: none !important;
}

/* 強調 */
strong {
  color: #2563eb;
  font-weight: 700;
  background: #e0e7ef;
  border-radius: 0.3em;
  padding: 0.08em 0.3em;
}
em {
  color: #2563eb;
  font-style: italic;
  background: #e0e7ef;
  border-radius: 0.3em;
  padding: 0.08em 0.3em;
}

/* リンク */
a {
  color: #2563eb;
  text-decoration: none;
  border-bottom: 2px solid #ffe066;
  transition: color 0.2s, border-bottom 0.2s;
  font-weight: 600;
}
a:hover {
  color: #1e293b;
  border-bottom: 2px solid #2563eb;
  background: #e0e7ef;
  border-radius: 0.2em;
}

/* ボタン（.btn, button, input[type=submit]） */
.btn, button, input[type=submit] {
  background: linear-gradient(90deg, #2563eb 0%, #1e40af 100%);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 14px 38px;
  font-size: 1.13em;
  font-weight: 700;
  box-shadow: 0 3px 12px 0 rgba(30, 41, 59, 0.10);
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
  letter-spacing: 0.02em;
}
.btn:hover, button:hover, input[type=submit]:hover {
  background: linear-gradient(90deg, #ffe066 0%, #2563eb 100%);
  color: #23272f;
  box-shadow: 0 6px 24px 0 rgba(30, 41, 59, 0.13);
  transform: translateY(-2px) scale(1.03);
}

/* テーブル */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  margin: 2.5em 0;
  box-shadow: 0 2px 16px 0 rgba(30, 41, 59, 0.07);
}
th, td {
  border: 1.5px solid #e0e7ef;
  padding: 1.2em 1.5em;
  text-align: left;
}
th {
  background: #e0e7ef;
  color: #2563eb;
  font-weight: 700;
}

/* 引用 */
blockquote {
  border-left: 6px solid #2563eb;
  background: #f1f5f9;
  color: #334155;
  margin: 2em 0;
  padding: 1.3em 2em;
  font-style: italic;
  border-radius: 14px;
  box-shadow: 0 2px 12px 0 rgba(30, 41, 59, 0.07);
  position: relative;
}
blockquote p {
  margin-top: 0;
}
blockquote::before {
  content: '💡';
  position: absolute;
  left: -2.2em;
  top: 0.5em;
  font-size: 1.3em;
  color: #ffe066;
}

/* コード・pre */
pre, code {
  background: #f1f5f9;
  border-radius: 10px;
  font-family: 'Fira Mono', 'Consolas', 'Menlo', 'Monaco', 'monospace';
  font-size: 1.13em;
  white-space: pre-wrap;
  word-break: break-all;
}

/* コードブロック */
pre {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5em;
  padding: 1.2em;
  margin: 1.5em 0;
  overflow-x: auto;
  font-size: 0.95em;
  line-height: 1.6;
}

pre code {
  font-family: 'JetBrains Mono', 'Fira Code', 'Source Code Pro', Menlo, Monaco, Consolas, 'Courier New', monospace;
  background: none;
  padding: 0;
  border: none;
  color: #334155;
  font-size: 1em;
  line-height: inherit;
  tab-size: 4;
}

code {
  font-family: 'JetBrains Mono', 'Fira Code', 'Source Code Pro', Menlo, Monaco, Consolas, 'Courier New', monospace;
  background: #f1f5f9;
  color: #334155;
  padding: 0.2em 0.4em;
  border-radius: 0.3em;
  font-size: 0.9em;
  word-break: break-word;
}

/* レスポンシブ調整 */
@media screen and (max-width: 768px) {
  /* 不要なレイヤーを削除してテーマの元のレイアウトを活かす */
  /* main, .container, .content, .entry-content, .post, .page {
    padding: 1.5em 1em;
    border-radius: 15px;
    margin: 1em;
  } */
  
  h1, h2, h3, h4, h5, h6 {
    margin-top: 1.5em;
    margin-bottom: 1em;
    font-size: 1.1em;
  }
  
  h1 {
    font-size: 2em;
  }
  
  h2 {
    font-size: 1.5em;
  }
  
  table, th, td {
    font-size: 0.95em;
    padding: 1em;
  }
  
  .btn, button, input[type=submit] {
    width: 100%;
    margin: 0.5em 0;
    padding: 14px 28px;
  }
}

/* ダークモード対応 */
@media (prefers-color-scheme: dark) {
  body {
    background: #181e25;
    color: #e0e7ef;
  }
  main, .container, .content, .entry-content, .post, .page {
    background: #23282d;
    color: #e0e7ef;
  }
  h1, h2, h3, h4, h5, h6 {
    color: #e0e7ef;
    background: #23282d;
    border-left-color: #2563eb;
    border-bottom-color: #2563eb;
  }
  strong, em { color: #ffe066; background: #23282d; }
  a { color: #ffe066; border-bottom-color: #ffe066; }
  a:hover { color: #2563eb; border-bottom-color: #2563eb; background: #23282d; }
  table { background: #23282d; }
  th { background: #334155; color: #ffe066; }
  td, th { border-color: #444; color: #e0e7ef; }
  blockquote {
    background: #23282d;
    color: #ffe066;
    border-left-color: #2563eb;
  }
  pre, code {
    background: #23282d;
    border-color: #2563eb;
    color: #e0e7ef;
  }
}

/* ナビゲーション下線自体を非表示に */
.skin-grayish .navi-in > ul li > a > .caption-wrap::before,
.skin-grayish .navi-footer-in a::before {
  display: none !important;
  content: none !important;
}

.entry-content > blockquote:first-child,
.entry-content > p:first-child,
.articleBody > blockquote:first-child,
.articleBody > p:first-child,
.post-content > blockquote:first-child,
.post-content > p:first-child,
.content > blockquote:first-child,
.content > p:first-child,
.article > blockquote:first-child,
.article > p:first-child {
  margin-top: 0 !important;
}