/*
Theme Name: Tap Auto Lab
Theme URI: https://tapautolab.com/
Author: Tap Auto Lab
Author URI: https://tapautolab.com/
Description: Tap Auto Lab のための軽量テーマ。カード型の記事一覧とサイドバー、自動目次、人気記事、パンくず、シェアボタン、OGP・構造化データ、ショートカット配布カードなどを備えています。
Version: 2.3.0
Requires at least: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tapautolab
*/

/* =========================================================
   配色(ライト / ダーク)
   ========================================================= */
:root {
  --page: #f3f4f6;
  --bg: #ffffff;
  --band: #f6f7f9;
  --panel: #eef0f3;
  --ink: #23262b;
  --sub: #6b717c;
  --faint: #a9aeb7;
  --line: #e2e5ea;
  --link: #1f63d1;
  --accent: #2563eb;
  --accent-ink: #ffffff;
  --err: #b4322a;
  --err-bg: #fcefee;
  --point-bg: #fbf5e3;
  --point-line: #c09530;
  --term: #111318;
  --term-ink: #e7e9ee;
  --term-sub: #8b93a3;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Zen Kaku Gothic New", monospace;
  --radius: 10px;
  --wrap: 1280px;
  --header-h: 72px;
  --shadow: 0 1px 2px rgba(20, 24, 32, 0.04);
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #121316;
    --bg: #1b1d21;
    --band: #22252a;
    --panel: #2a2d33;
    --ink: #e8e9ec;
    --sub: #a1a6b0;
    --faint: #626873;
    --line: #2f3238;
    --link: #7fb0ff;
    --accent: #5b93ff;
    --accent-ink: #0d1424;
    --err: #f0928a;
    --err-bg: #2c1f1e;
    --point-bg: #2a2619;
    --point-line: #d2b161;
    --term: #0b0c0f;
    --shadow: none;
  }
}

/* =========================================================
   基本
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: "Zen Kaku Gothic New", "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-size: 16px;
  line-height: 1.85;
  letter-spacing: 0.02em;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.tal-skip:focus {
  clip: auto; width: auto; height: auto; margin: 0; z-index: 1000;
  top: 8px; left: 8px; padding: 8px 16px; background: var(--ink); color: var(--bg);
}

/* アイコン(Google Fonts の Material Symbols) */
.tal-i {
  font-family: "Material Symbols Outlined";
  font-weight: 300;
  font-style: normal;
  font-size: 1.15em;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  direction: ltr;
  display: inline-block;
  width: 1em;
  overflow: hidden;
  vertical-align: -0.18em;
  font-feature-settings: "liga";
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 24;
  -webkit-font-smoothing: antialiased;
}

.tal-wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.tal-main { display: block; min-height: 50vh; padding-bottom: 64px; }

/* ピル型のボタン・バッジ */
.tal-pill-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 22px; border-radius: 999px; border: 2px solid var(--accent);
  font-size: 0.88rem; font-weight: 700; text-decoration: none; white-space: nowrap;
  color: var(--accent); background: transparent; transition: background-color 0.15s, color 0.15s;
}
.tal-pill-btn:hover { background: var(--accent); color: var(--accent-ink); }
.tal-pill-btn.is-fill { background: var(--accent); color: var(--accent-ink); }
.tal-pill-btn.is-fill:hover { opacity: 0.85; }
.tal-pill {
  display: inline-block; padding: 1px 14px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 700; line-height: 1.8; white-space: nowrap;
  background: var(--c, var(--accent)); color: var(--t, #fff);
}

/* =========================================================
   ヘッダー
   ========================================================= */
.tal-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg);
  box-shadow: 0 1px 0 var(--line);
}
.admin-bar .tal-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .tal-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .tal-header { top: 0; } }
.tal-header-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 0 24px;
  height: var(--header-h);
  display: flex; align-items: center; gap: 20px;
}
.tal-logo { margin-right: auto; line-height: 1; }
.tal-logo a {
  text-decoration: none; font-weight: 700; font-size: 1.3rem; letter-spacing: 0.02em; color: var(--accent);
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap;
}
.tal-logo img { max-height: 36px; width: auto; display: block; }
.tal-logo-mark {
  width: 32px; height: 32px; border-radius: 9px; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font-weight: 700; font-size: 1.05rem; letter-spacing: 0;
}
.tal-gnav { display: flex; align-items: center; gap: 28px; }
.tal-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 28px; }
.tal-gnav .tal-menu { flex-wrap: nowrap; gap: 24px; }
.tal-gnav .tal-menu a { white-space: nowrap; }
.tal-gnav .tal-menu a { text-decoration: none; font-size: 0.9rem; font-weight: 500; }
.tal-gnav .tal-menu a:hover { color: var(--accent); }
.tal-gnav-buttons { display: flex; gap: 10px; }
.tal-header-actions { display: flex; gap: 4px; }
.tal-icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center;
  background: none; border: 0; color: inherit; cursor: pointer; border-radius: 50%;
}
.tal-icon-btn:hover { background: var(--panel); }
.tal-icon-btn .tal-i { font-size: 24px; }
.tal-menu-btn { display: none; background: var(--accent); color: var(--accent-ink); }
.tal-menu-btn:hover { background: var(--accent); opacity: 0.85; }

.tal-search-panel { border-top: 1px solid var(--line); background: var(--bg); padding: 20px 24px; }
.tal-search-panel .tal-searchform { max-width: 560px; margin: 0 auto; }

@media (max-width: 1179px) {
  .tal-menu-btn { display: grid; }
  .tal-gnav {
    position: fixed; inset: var(--header-h) 0 0 0; z-index: 99;
    background: var(--bg);
    flex-direction: column; align-items: stretch; gap: 24px;
    padding: 16px 24px 40px; overflow-y: auto;
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  }
  .is-menu-open .tal-gnav { visibility: visible; opacity: 1; transform: none; }
  .is-menu-open { overflow: hidden; }
  .tal-gnav .tal-menu { flex-direction: column; flex-wrap: wrap; gap: 0; }
  .tal-gnav .tal-menu a { display: block; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .tal-gnav-buttons { flex-direction: column; }
  .tal-gnav-buttons .tal-pill-btn { min-height: 52px; font-size: 1rem; }
}

/* 検索フォーム */
.tal-searchform { display: flex; border: 1px solid var(--line); background: var(--bg); border-radius: 8px; overflow: hidden; }
.tal-searchform input {
  flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink);
  font: inherit; font-size: 16px; padding: 11px 14px;
}
.tal-searchform input:focus { outline: none; }
.tal-searchform:focus-within { border-color: var(--accent); }
.tal-searchform button { border: 0; background: transparent; color: var(--accent); width: 48px; cursor: pointer; }
.tal-searchform button .tal-i { font-size: 24px; font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24; }

/* =========================================================
   トップの見出し
   ========================================================= */
.tal-masthead { background: var(--bg); text-align: center; padding: 56px 24px 52px; margin-bottom: 24px; box-shadow: 0 1px 0 var(--line); }
.tal-masthead-name {
  margin: 0; font-size: clamp(2.2rem, 6vw, 3.6rem); font-weight: 700; line-height: 1.2; letter-spacing: 0.01em; color: var(--accent);
}
.tal-masthead-catch { margin: 14px auto 0; font-size: clamp(1rem, 2.2vw, 1.2rem); font-weight: 500; max-width: 32em; }
.tal-masthead-text { margin: 8px auto 0; color: var(--sub); font-size: 0.92rem; max-width: 40em; }
.tal-masthead-cats { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.tal-masthead-cats a { text-decoration: none; }
.tal-catsec { scroll-margin-top: calc(var(--header-h) + 16px); }
.tal-masthead-cats .tal-pill { font-size: 0.82rem; padding: 3px 16px; }
.tal-masthead-cats a:hover .tal-pill { opacity: 0.85; }

/* =========================================================
   レイアウト(本文 + サイドバー)
   ========================================================= */
.tal-layout {
  max-width: var(--wrap); margin: 0 auto; padding: 24px 24px 0;
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start;
}
.tal-masthead + .tal-layout { padding-top: 0; }
.tal-primary { min-width: 0; }
@media (max-width: 999px) { .tal-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 559px) { .tal-layout { padding: 16px 16px 0; gap: 16px; } }

/* =========================================================
   記事カード
   ========================================================= */
.tal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 24px; }
@media (max-width: 559px) { .tal-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; } }
.tal-card {
  background: var(--bg); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.tal-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(20, 24, 32, 0.08); }
.tal-card-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; }
.tal-card-thumb { aspect-ratio: 16 / 9; overflow: hidden; background: var(--panel); }
.tal-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tal-card-body { flex: 1; display: flex; flex-direction: column; padding: 18px 18px 18px; }
.tal-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tal-card-meta time { font-size: 0.82rem; color: var(--sub); letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.tal-card-title {
  margin: 14px 0 0; font-size: 1.05rem; font-weight: 500; line-height: 1.75; letter-spacing: 0.03em;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.tal-card-link:hover .tal-card-title { color: var(--accent); }
.tal-card-tags { list-style: none; margin: auto 0 0; padding: 14px 0 0; display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 0.75rem; color: var(--sub); }
.tal-noimg {
  width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c, var(--accent)) 92%, #000) 0%, var(--c, var(--accent)) 100%);
  color: var(--t, #fff);
}
.tal-noimg-site { font-weight: 700; letter-spacing: 0.04em; font-size: 1.05rem; }
.tal-noimg-cat { font-size: 0.78rem; opacity: 0.85; }

/* トップ:カテゴリー別 */
.tal-catsec + .tal-catsec { margin-top: 48px; }
.tal-catsec-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-bottom: 16px; }
.tal-catsec-title { margin: 0; font-size: 1.2rem; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.tal-catsec-title:not(:has(.tal-pill))::before { content: ""; width: 5px; height: 1.1em; border-radius: 3px; background: var(--accent); }
.tal-catsec-title .tal-pill { font-size: 0.95rem; padding: 3px 18px; }
.tal-catsec-desc { margin: 0; font-size: 0.85rem; color: var(--sub); flex: 1; min-width: 12em; }
.tal-catsec-more { margin-left: auto; display: inline-flex; align-items: center; font-size: 0.85rem; font-weight: 700; text-decoration: none; color: var(--accent); white-space: nowrap; }
.tal-catsec-more:hover { text-decoration: underline; }

/* ページ送り */
.pagination { margin: 40px 0 0; }
.nav-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.page-numbers {
  min-width: 44px; height: 44px; padding: 0 10px; display: grid; place-items: center; border-radius: 999px;
  background: var(--bg); text-decoration: none; font-weight: 700; font-size: 0.9rem; box-shadow: var(--shadow);
}
.page-numbers.current { background: var(--accent); color: var(--accent-ink); }
a.page-numbers:hover { color: var(--accent); }
.page-numbers.dots { background: none; box-shadow: none; }

/* パンくず */
.tal-crumb { margin: 0 0 16px; font-size: 0.8rem; color: var(--sub); }
.tal-crumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; }
.tal-crumb li { display: inline-flex; align-items: center; min-width: 0; }
.tal-crumb a { text-decoration: none; }
.tal-crumb a:hover { color: var(--accent); }
.tal-crumb .tal-i { margin: 0 4px; color: var(--faint); }
.tal-crumb [aria-current] { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }

/* 一覧ページの見出し */
.tal-page-head { background: var(--bg); border-radius: var(--radius); padding: 28px 32px; margin-bottom: 24px; box-shadow: var(--shadow); }
.tal-page-head .tal-pill { margin-bottom: 8px; }
.tal-page-title { margin: 0; font-size: clamp(1.4rem, 3vw, 1.8rem); font-weight: 500; line-height: 1.5; }
.tal-page-desc { color: var(--sub); margin-top: 6px; font-size: 0.92rem; }
.tal-page-desc p { margin: 0; }
.tal-empty { background: var(--bg); border-radius: var(--radius); padding: 40px 24px; text-align: center; color: var(--sub); }
.tal-empty .tal-searchform { max-width: 480px; margin: 20px auto 0; }

/* =========================================================
   記事ページ
   ========================================================= */
.tal-article-card { background: var(--bg); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.tal-entry-eyecatch { margin: 0; }
.tal-entry-eyecatch img { display: block; width: 100%; }
.tal-article-body { padding: 36px 48px 48px; }
@media (max-width: 767px) { .tal-article-body { padding: 24px 20px 32px; } }
.tal-entry-head { margin-bottom: 28px; }
.tal-entry-cat { text-decoration: none; }
.tal-entry-cat:hover .tal-pill { opacity: 0.85; }
.tal-entry-title {
  margin: 16px 0 0; font-size: clamp(1.5rem, 3.4vw, 2rem); font-weight: 500; line-height: 1.6; letter-spacing: 0.03em;
  font-feature-settings: "palt"; text-wrap: pretty;
}
.is-page .tal-entry-title { margin-top: 0; }
.tal-entry-meta { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; font-size: 0.85rem; color: var(--sub); }
.tal-entry-meta .tal-i { margin-right: 4px; }
.tal-entry-meta time { font-variant-numeric: tabular-nums; }
.tal-entry-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 0.8rem; }
.tal-entry-tags a { text-decoration: none; color: var(--sub); }
.tal-entry-tags a:hover { color: var(--accent); }

/* 目次 */
.tal-toc { margin: 2.4em 0; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.tal-toc summary {
  cursor: pointer; list-style: none; padding: 16px 20px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.tal-toc summary::-webkit-details-marker { display: none; }
.tal-toc summary::after { content: "[閉じる]"; font-size: 0.8rem; font-weight: 500; color: var(--link); }
.tal-toc details:not([open]) summary::after { content: "[開く]"; }
.tal-toc ol { margin: 0; padding: 0 32px 16px; list-style: none; counter-reset: toc; }
.tal-toc ol ol { padding: 0 0 0 1.6em; counter-reset: toc2; }
.tal-toc li { counter-increment: toc; line-height: 1.7; }
.tal-toc > details > ol > li { border-top: 1px solid var(--line); }
.tal-toc a { display: block; padding: 12px 0; text-decoration: none; font-size: 0.95rem; }
.tal-toc ol ol a { padding: 0 0 10px; font-size: 0.88rem; color: var(--sub); }
.tal-toc a:hover { color: var(--accent); }
@media (max-width: 559px) { .tal-toc ol { padding: 0 16px 12px; } }

/* シェア */
.tal-share { margin: 48px 0 0; padding-top: 28px; border-top: 1px solid var(--line); text-align: center; }
.tal-share-label { margin: 0 0 12px; font-size: 0.85rem; font-weight: 700; color: var(--sub); }
.tal-share-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.tal-share-btn {
  display: inline-flex; align-items: center; gap: 6px; min-width: 104px; min-height: 44px; justify-content: center;
  padding: 0 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--ink);
  font: inherit; font-size: 0.85rem; font-weight: 700; text-decoration: none; cursor: pointer;
}
.tal-share-btn:hover { border-color: var(--accent); color: var(--accent); }

/* 記事の下に並ぶカード */
.tal-after { margin-top: 24px; display: grid; gap: 24px; }
.tal-box { background: var(--bg); border-radius: var(--radius); padding: 28px 32px; box-shadow: var(--shadow); }
@media (max-width: 559px) { .tal-box { padding: 22px 18px; } }
.tal-box-head { margin: 0 0 18px; font-size: 1.05rem; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.tal-box-head::before { content: ""; width: 5px; height: 1.1em; border-radius: 3px; background: var(--accent); }
.tal-related .tal-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.tal-related .tal-card { box-shadow: none; border: 1px solid var(--line); }

/* 著者 */
.tal-author { display: flex; gap: 20px; align-items: flex-start; }
.tal-author-avatar img { border-radius: 50%; display: block; }
.tal-author-label { margin: 0; font-size: 0.75rem; color: var(--sub); font-weight: 700; }
.tal-author-name { margin: 2px 0 0; font-weight: 700; font-size: 1.05rem; }
.tal-author-bio { margin: 8px 0 0; font-size: 0.9rem; color: var(--sub); line-height: 1.8; }
.tal-author-more { display: inline-flex; align-items: center; margin-top: 8px; font-size: 0.85rem; font-weight: 700; text-decoration: none; color: var(--accent); }
@media (max-width: 559px) { .tal-author { flex-direction: column; align-items: center; text-align: center; } }

/* 前後の記事 */
.post-navigation .nav-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.post-navigation .nav-next { grid-column: 2; text-align: right; }
.post-navigation a { display: block; height: 100%; padding: 16px 20px; background: var(--bg); border-radius: var(--radius); text-decoration: none; box-shadow: var(--shadow); }
.post-navigation a:hover .tal-nav-title { color: var(--accent); }
.tal-nav-label { display: flex; align-items: center; gap: 4px; font-size: 0.78rem; color: var(--sub); font-weight: 700; }
.nav-next .tal-nav-label { justify-content: flex-end; }
.tal-nav-title { display: block; margin-top: 4px; font-size: 0.92rem; font-weight: 500; line-height: 1.6; }
@media (max-width: 559px) { .post-navigation .nav-links { grid-template-columns: minmax(0, 1fr); } .post-navigation .nav-next { grid-column: 1; } }

/* ツールへの案内 */
.tal-tools {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px;
  padding: 20px 22px; border-radius: var(--radius); text-decoration: none;
  background: var(--accent); color: var(--accent-ink);
}
.tal-tools:hover { opacity: 0.92; }
.tal-tools-icon { width: 46px; height: 46px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.18); border-radius: 12px; }
.tal-tools-icon .tal-i { font-size: 26px; }
.tal-tools-title { display: block; font-weight: 700; }
.tal-tools-desc { display: block; font-size: 0.82rem; opacity: 0.85; line-height: 1.7; }
.tal-tools-arrow { font-size: 22px; }
.tal-sidebar .tal-tools { grid-template-columns: auto minmax(0, 1fr); }
.tal-sidebar .tal-tools-arrow { display: none; }

.tal-page-links { margin: 32px 0; }
.tal-ad { margin: 2em 0; text-align: center; }

/* =========================================================
   サイドバー
   ========================================================= */
.tal-sidebar { display: grid; gap: 24px; }
.tal-widget { background: var(--bg); border-radius: var(--radius); padding: 22px 20px; box-shadow: var(--shadow); }
.tal-widget-title { margin: 0 0 14px; font-size: 0.95rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.tal-widget-title::before { content: ""; width: 4px; height: 1em; border-radius: 2px; background: var(--accent); }
.tal-w-search { padding: 16px; }
.tal-w-profile { text-align: center; }
.tal-w-profile img { border-radius: 50%; display: block; margin: 0 auto 10px; }
.tal-w-profile-name { margin: 0; font-weight: 700; }
.tal-w-profile-bio { margin: 6px 0 0; font-size: 0.85rem; color: var(--sub); line-height: 1.8; text-align: left; }
.tal-w-profile .tal-pill-btn { margin-top: 14px; min-height: 40px; width: 100%; }
.tal-w-rank { list-style: none; margin: 0; padding: 0; counter-reset: rank; }
.tal-w-rank li { counter-increment: rank; }
.tal-w-rank li + li { border-top: 1px solid var(--line); }
.tal-w-rank a { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 0; text-decoration: none; position: relative; }
.tal-w-rank li:first-child a { padding-top: 0; }
.tal-w-rank .tal-w-thumb { aspect-ratio: 16 / 10; border-radius: 6px; overflow: hidden; background: var(--panel); position: relative; }
.tal-w-rank .tal-w-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tal-w-rank .tal-w-thumb .tal-noimg-site { font-size: 0.6rem; }
.tal-w-rank .tal-w-thumb .tal-noimg-cat { display: none; }
.tal-w-rank .tal-w-thumb::before {
  content: counter(rank); position: absolute; z-index: 1; top: 0; left: 0; width: 22px; height: 22px;
  display: grid; place-items: center; font-size: 0.72rem; font-weight: 700; background: var(--accent); color: var(--accent-ink);
  border-bottom-right-radius: 6px;
}
.tal-w-rank .tal-w-title { font-size: 0.85rem; font-weight: 500; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tal-w-rank a:hover .tal-w-title { color: var(--accent); }
.tal-w-cats { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tal-w-cats a { text-decoration: none; }
.tal-w-cats a:hover .tal-pill { opacity: 0.85; }
.tal-w-cats .tal-pill small { font-weight: 500; opacity: 0.8; margin-left: 4px; }
/* ウィジェットを自分で追加した場合の見た目 */
.tal-sidebar .widget { background: var(--bg); border-radius: var(--radius); padding: 22px 20px; box-shadow: var(--shadow); }
.tal-sidebar .widget h2, .tal-sidebar .widget .widget-title, .tal-sidebar .widget .wp-block-heading { margin: 0 0 12px; font-size: 0.95rem; }
.tal-sidebar .widget ul { margin: 0; padding-left: 1.2em; }

/* 404 */
.tal-404 { background: var(--bg); border-radius: var(--radius); padding: 56px 24px; text-align: center; max-width: 760px; margin: 24px auto 0; }
.tal-404-code { margin: 0; font-size: 4rem; font-weight: 700; letter-spacing: 0.06em; color: var(--accent); line-height: 1; }
.tal-404 .tal-entry-title { margin: 16px 0; }
.tal-404 p { color: var(--sub); }
.tal-404 .tal-searchform { max-width: 480px; margin: 24px auto; }
.tal-404-recent { max-width: var(--wrap); margin: 40px auto 0; padding: 0 24px; }

/* コメント */
.tal-comments { margin-top: 24px; }
.tal-comments-title, .comment-reply-title { font-size: 1.05rem; margin-top: 0; }
.tal-comment-list { list-style: none; padding: 0; }
.tal-comment-list .comment { padding: 16px 0; border-bottom: 1px solid var(--line); }
.tal-comment-list .children { list-style: none; padding-left: 24px; }
.comment-meta { font-size: 0.82rem; color: var(--sub); }
.comment-author .avatar { border-radius: 50%; vertical-align: middle; margin-right: 8px; }
.comment-form label { display: block; font-size: 0.85rem; font-weight: 700; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
  width: 100%; font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--band); color: var(--ink);
}
.comment-form .submit { font: inherit; font-weight: 700; padding: 10px 28px; border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink); cursor: pointer; }

/* =========================================================
   フッター
   ========================================================= */
.tal-footer { background: var(--bg); box-shadow: 0 -1px 0 var(--line); }
.tal-footer-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 48px 24px 24px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px 40px;
}
.tal-footer-name { font-weight: 700; font-size: 1.2rem; text-decoration: none; color: var(--accent); }
.tal-footer-desc { margin: 4px 0 0; font-size: 0.85rem; color: var(--sub); }
.tal-footer-nav { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.tal-footer-nav a { font-size: 0.85rem; text-decoration: none; }
.tal-footer-nav a:hover { color: var(--accent); }
.tal-footer-ext a { color: var(--sub); }
.tal-copy { max-width: var(--wrap); margin: 0 auto; padding: 16px 24px 32px; font-size: 0.78rem; color: var(--sub); }
@media (max-width: 599px) { .tal-footer-nav { align-items: flex-start; } }

.tal-totop {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  border: 0; background: var(--accent); color: var(--accent-ink); cursor: pointer; box-shadow: 0 4px 14px rgba(20, 24, 32, 0.18);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}
.tal-totop.is-show { opacity: 1; visibility: visible; transform: none; }
.tal-totop .tal-i { font-size: 22px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .tal-card:hover { transform: none; }
}

/* =========================================================
   フォーム(Contact Form 7 などのお問い合わせフォーム)
   ========================================================= */
.tal-content .wpcf7 { margin-top: 2em; }
.tal-content .wpcf7-form { max-width: 680px; padding: 28px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.tal-content .wpcf7-form > p { margin: 0 0 22px; }
.tal-content .wpcf7-form > p:last-of-type { margin-bottom: 0; }
.tal-content .wpcf7-form label { display: block; font-size: 0.9rem; font-weight: 700; line-height: 1.6; }
.tal-content .wpcf7-form label br { display: none; }
.tal-content .wpcf7-form label:has([aria-required="true"])::before {
  content: "必須"; display: inline-block; margin-right: 8px; padding: 0 6px; border-radius: 3px;
  font-size: 0.7rem; font-weight: 700; line-height: 1.7; vertical-align: 0.1em;
  background: var(--ink); color: var(--bg);
}
.tal-content .wpcf7-form-control-wrap { display: block; margin-top: 8px; }
.tal-content .wpcf7 input[type="text"], .tal-content .wpcf7 input[type="email"], .tal-content .wpcf7 input[type="tel"],
.tal-content .wpcf7 input[type="url"], .tal-content .wpcf7 input[type="number"], .tal-content .wpcf7 input[type="date"],
.tal-content .wpcf7 select, .tal-content .wpcf7 textarea {
  display: block; width: 100%; font: inherit; font-size: 16px; font-weight: 400; line-height: 1.6; letter-spacing: 0.02em;
  color: var(--ink); background: var(--band); border: 1px solid var(--line); border-radius: 6px; padding: 11px 14px;
  transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}
.tal-content .wpcf7 textarea { min-height: 200px; resize: vertical; }
.tal-content .wpcf7 input:hover, .tal-content .wpcf7 textarea:hover, .tal-content .wpcf7 select:hover { border-color: var(--faint); }
.tal-content .wpcf7 input:focus, .tal-content .wpcf7 textarea:focus, .tal-content .wpcf7 select:focus {
  outline: none; border-color: var(--accent); background: var(--bg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.tal-content .wpcf7 input[type="checkbox"], .tal-content .wpcf7 input[type="radio"] { accent-color: var(--ink); width: 18px; height: 18px; vertical-align: -3px; }
.tal-content .wpcf7-list-item { margin: 0 16px 0 0; }
.tal-content .wpcf7-list-item-label { font-weight: 400; }
.tal-content .wpcf7-submit {
  display: block; width: 100%; margin-top: 4px; padding: 14px 24px; border: 0; border-radius: 999px; cursor: pointer;
  font: inherit; font-weight: 700; font-size: 1rem; letter-spacing: 0.1em; background: var(--accent); color: var(--accent-ink);
  transition: opacity 0.15s;
}
.tal-content .wpcf7-submit:hover { opacity: 0.85; }
.tal-content .wpcf7-submit:disabled { opacity: 0.4; cursor: default; }
.tal-content .wpcf7 form:not(.submitting) .wpcf7-spinner { display: none; }
.tal-content .wpcf7 form.submitting .wpcf7-spinner { display: block; margin: 12px auto 0; }
.tal-content .wpcf7-not-valid { border-color: var(--err) !important; background: var(--err-bg) !important; }
.tal-content .wpcf7-not-valid-tip { display: block; margin-top: 6px; font-size: 0.82rem; font-weight: 500; color: var(--err); }
.tal-content .wpcf7 form .wpcf7-response-output {
  margin: 20px 0 0; padding: 12px 16px; border: 1px solid var(--line); border-left-width: 4px; border-radius: 6px; font-size: 0.9rem; line-height: 1.7;
}
.tal-content .wpcf7 form.sent .wpcf7-response-output { border-color: #2f6b45; background: color-mix(in srgb, #2f6b45 8%, var(--bg)); }
.tal-content .wpcf7 form.invalid .wpcf7-response-output,
.tal-content .wpcf7 form.unaccepted .wpcf7-response-output,
.tal-content .wpcf7 form.failed .wpcf7-response-output,
.tal-content .wpcf7 form.spam .wpcf7-response-output { border-color: var(--err); background: var(--err-bg); }
@media (max-width: 559px) { .tal-content .wpcf7-form { padding: 20px 16px; } }

/* =========================================================
   本文(エディターにも同じ見た目を反映するため、この範囲は editor.css にも複製しています)
   @content-start
   ========================================================= */
.tal-content { font-size: 1.02rem; line-height: 2; overflow-wrap: anywhere; }
.tal-content > * + * { margin-top: 1.6em; }
.tal-content p { margin: 0; }
.tal-content > p + p { margin-top: 1.4em; }
.tal-content a { color: var(--link); text-underline-offset: 3px; }
.tal-content a:hover { text-decoration: none; }
.tal-content h2 {
  margin: 3em 0 1.2em; padding: 0.15em 0 0.15em 0.9em; border-left: 6px solid var(--accent); border-radius: 0;
  font-size: 1.42rem; font-weight: 500; line-height: 1.6; letter-spacing: 0.03em; font-feature-settings: "palt";
}
.tal-content h3 {
  margin: 2.6em 0 1em; padding-bottom: 0.45em; border-bottom: 1px solid var(--line);
  font-size: 1.18rem; font-weight: 700; line-height: 1.6; font-feature-settings: "palt";
}
.tal-content h3::before { content: ""; display: inline-block; width: 0.5em; height: 0.5em; margin-right: 0.6em; border-radius: 50%; background: var(--accent); vertical-align: 0.15em; }
.tal-content h4 { margin: 2.2em 0 0.8em; font-size: 1.05rem; line-height: 1.6; }
.tal-content h2:first-child, .tal-content h3:first-child { margin-top: 0; }
.tal-content strong { font-weight: 700; background: linear-gradient(transparent 62%, var(--point-bg) 62%); }
.tal-content ul, .tal-content ol { padding-left: 1.5em; }
.tal-content li + li { margin-top: 0.4em; }
.tal-content blockquote {
  margin-left: 0; margin-right: 0; padding: 1em 1.4em; border-left: 3px solid var(--faint); color: var(--sub); background: var(--band);
}
.tal-content blockquote p + p { margin-top: 0.8em; }
.tal-content blockquote cite { display: block; margin-top: 0.6em; font-size: 0.85rem; font-style: normal; }
.tal-content code {
  font-family: var(--mono); font-size: 0.86em; background: var(--panel); padding: 0.1em 0.4em; border-radius: 4px; letter-spacing: 0;
}
.tal-content pre {
  font-family: var(--mono); font-size: 0.86rem; line-height: 1.75; background: var(--term); color: var(--term-ink);
  padding: 1.1em 1.3em; overflow-x: auto; border-radius: 6px; letter-spacing: 0;
}
.tal-content pre code { background: none; padding: 0; font-size: inherit; }
.tal-content table { width: 100%; border-collapse: collapse; font-size: 0.92rem; line-height: 1.7; }
.tal-content th, .tal-content td { border: 1px solid var(--line); padding: 0.6em 0.8em; text-align: left; vertical-align: top; }
.tal-content th, .tal-content thead td { background: var(--band); font-weight: 700; }
.tal-content .wp-block-table { overflow-x: auto; }
.tal-content figure { margin-left: 0; margin-right: 0; }
.tal-content img { border-radius: 4px; }
.tal-content figcaption, .tal-content .wp-element-caption { margin-top: 0.6em; font-size: 0.82rem; color: var(--sub); text-align: center; }
.tal-content hr { border: 0; border-top: 1px solid var(--line); margin: 3em 0; }
.tal-content .alignwide { width: auto; max-width: none; margin-left: 0; margin-right: 0; }
.tal-content .alignfull { width: auto; max-width: none; margin-left: 0; margin-right: 0; }
.tal-content .alignfull img { border-radius: 0; }
.tal-content .aligncenter { margin-left: auto; margin-right: auto; }
.tal-content .alignleft { float: left; margin: 0.4em 1.5em 1em 0; }
.tal-content .alignright { float: right; margin: 0.4em 0 1em 1.5em; }
.tal-content .wp-block-embed iframe { max-width: 100%; }

/* ボタン */
.tal-content .wp-block-button__link {
  background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 0.8em 2.2em;
  font-weight: 700; text-decoration: none; transition: opacity 0.2s;
}
.tal-content .wp-block-button__link:hover { opacity: 0.8; }
.tal-content .wp-block-button.is-style-outline .wp-block-button__link { background: transparent; color: var(--accent); border: 2px solid var(--accent); }

/* ボックス(ブロックスタイル:グループ → メモ / ポイント / 注意) */
.tal-content .is-style-tal-memo,
.tal-content .is-style-tal-point,
.tal-content .is-style-tal-alert {
  padding: 1.2em 1.4em; border-left: 4px solid var(--sub); background: var(--panel); line-height: 1.9;
}
.tal-content .is-style-tal-point { border-color: var(--point-line); background: var(--point-bg); }
.tal-content .is-style-tal-alert { border-color: var(--err); background: var(--err-bg); }
.tal-content .is-style-tal-memo > * + *,
.tal-content .is-style-tal-point > * + *,
.tal-content .is-style-tal-alert > * + * { margin-top: 0.6em; }
.tal-content .tal-box-title { font-weight: 700; display: flex; align-items: center; gap: 6px; }
.tal-content .tal-box-title::before {
  font-family: "Material Symbols Outlined"; font-weight: 400; font-size: 1.25em; line-height: 1;
  font-feature-settings: "liga"; content: "info"; color: var(--sub);
}
.tal-content .is-style-tal-point .tal-box-title::before { content: "lightbulb"; color: var(--point-line); }
.tal-content .is-style-tal-alert .tal-box-title::before { content: "warning"; color: var(--err); }

/* ショートカット配布カード */
.tal-content .is-style-tal-shortcut {
  padding: 1.4em 1.5em; border: 2px solid var(--accent); background: var(--bg); border-radius: 10px;
}
.tal-content .is-style-tal-shortcut > * + * { margin-top: 0.5em; }
.tal-content .tal-sc-name { font-weight: 700; font-size: 1.12rem; display: flex; align-items: center; gap: 10px; line-height: 1.5; }
.tal-content .tal-sc-name::before {
  font-family: "Material Symbols Outlined"; font-weight: 400; font-size: 22px; line-height: 1; font-feature-settings: "liga";
  content: "download"; flex: none; width: 38px; height: 38px; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); border-radius: 10px;
}
.tal-content .tal-sc-desc { color: var(--sub); font-size: 0.95rem; line-height: 1.8; }
.tal-content .is-style-tal-shortcut .wp-block-buttons { margin-top: 1em; }
.tal-content .is-style-tal-shortcut .wp-block-button { width: 100%; }
.tal-content .is-style-tal-shortcut .wp-block-button__link { display: block; width: 100%; text-align: center; }

/* リスト(チェックリスト / 手順) */
.tal-content .is-style-tal-check { list-style: none; padding: 1em 1.3em; border: 1px solid var(--line); }
.tal-content .is-style-tal-check li { position: relative; padding-left: 1.9em; }
.tal-content .is-style-tal-check li::before {
  font-family: "Material Symbols Outlined"; font-weight: 400; font-feature-settings: "liga"; content: "check";
  position: absolute; left: 0; top: 0.08em; font-size: 1.3em; line-height: 1.5; color: var(--ink);
}
.tal-content .is-style-tal-steps { list-style: none; padding-left: 0; counter-reset: step; }
.tal-content .is-style-tal-steps > li { position: relative; counter-increment: step; padding: 0 0 1.1em 3em; min-height: 2em; }
.tal-content .is-style-tal-steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0.15em;
  width: 1.9em; height: 1.9em; display: grid; place-items: center; border-radius: 50%;
  background: var(--ink); color: var(--bg); font-weight: 500; font-size: 0.85em; line-height: 1; font-family: var(--mono);
}
.tal-content .is-style-tal-steps > li:not(:last-child)::after {
  content: ""; position: absolute; left: calc(0.95em - 1px); top: 2.3em; bottom: 0.2em; width: 2px; background: var(--line);
}
.tal-content .is-style-tal-steps > li + li { margin-top: 0; }

/* 画像(iPhoneの画面) */
.tal-content .is-style-tal-phone { max-width: 300px; margin-left: auto; margin-right: auto; }
.tal-content .is-style-tal-phone img { border: 6px solid #151515; border-radius: 30px; display: block; }
.tal-content .wp-block-columns .is-style-tal-phone { max-width: 100%; }

/* 引用(シンプル) */
.tal-content .is-style-tal-plain { background: none; border-left-width: 2px; padding: 0.2em 0 0.2em 1.2em; }
/* @content-end */
