/* serverlog.jp / tabilife.jp 共通。サイトごとの違いは body の theme-tech / theme-travel で色だけ切り替える。
   ⚠ Web フォントは使わない(表示速度を優先して端末のフォントで描く)。 */

:root {
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f8fafc;
  --card: #ffffff;
  --accent: #0f766e;
  --accent-soft: #ccfbf1;
  --accent-ink: #115e59;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 16px rgba(15, 23, 42, .06);
}
.theme-travel {
  --bg: #fffaf5;
  --accent: #ea580c;
  --accent-soft: #ffedd5;
  --accent-ink: #9a3412;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 16px; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "BIZ UDPGothic", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.85;
  letter-spacing: .02em;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent-ink); }
a:hover { color: var(--accent); }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.wrap-narrow { width: min(760px, 100% - 32px); margin-inline: auto; }

/* ---------- ヘッダー ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; min-height: 60px; }
.logo { font-weight: 800; font-size: 1.25rem; color: var(--text); text-decoration: none; letter-spacing: .04em; }
.logo::before {
  content: ""; display: inline-block; width: .7em; height: .7em; margin-right: .45em;
  border-radius: 4px; background: var(--accent); vertical-align: .02em;
}
.gnav { border-top: 1px solid var(--line); }
.gnav ul {
  display: flex; gap: 4px; margin: 0 auto; padding: 0; list-style: none;
  overflow-x: auto; scrollbar-width: none; white-space: nowrap;
}
.gnav ul::-webkit-scrollbar { display: none; }
.gnav a {
  display: block; padding: 10px 12px; font-size: .9rem; font-weight: 600;
  color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent;
}
.gnav a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- トップ ---------- */
.home-hero { padding: 48px 0 32px; }
.home-hero h1 { margin: 0; font-size: clamp(1.6rem, 4vw, 2.4rem); line-height: 1.3; }
.home-hero p { margin: 10px 0 0; color: var(--muted); max-width: 46em; }
.theme-travel .home-hero {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 60%, #fed7aa 100%);
  border-bottom: 1px solid #fde4cc;
  margin-bottom: 24px;
}
.theme-tech .home-hero {
  background: linear-gradient(135deg, #f0fdfa 0%, #e0f2fe 100%);
  border-bottom: 1px solid #d5ece9;
  margin-bottom: 24px;
}

.section-h { font-size: 1.2rem; margin: 32px 0 16px; display: flex; align-items: center; gap: 10px; }
.section-h::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- カード ---------- */
.cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.card {
  display: flex; flex-direction: column; overflow: hidden; background: var(--card);
  border-radius: var(--radius); box-shadow: var(--shadow); color: var(--text); text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(15,23,42,.08), 0 10px 28px rgba(15,23,42,.10); color: var(--text); }
.card-img { aspect-ratio: 1200 / 630; background: var(--accent-soft); overflow: hidden; }
.theme-travel .card-img { aspect-ratio: 16 / 9; }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-noimg { display: grid; place-items: center; height: 100%; color: var(--accent-ink); font-weight: 700; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-cat { align-self: flex-start; font-size: .72rem; font-weight: 700; color: var(--accent-ink); background: var(--accent-soft); padding: 1px 8px; border-radius: 999px; }
.card-title { margin: 0; font-weight: 700; line-height: 1.55; font-size: .98rem; }
.card-date { margin-top: auto; font-size: .78rem; color: var(--muted); }

.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 36px 0 8px; }
.pager a, .pager span {
  min-width: 40px; padding: 6px 12px; text-align: center; border-radius: 8px;
  background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--text);
}
.pager span[aria-current] { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }

/* ---------- 一覧の見出し・パンくず ---------- */
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px; margin: 16px 0 0; padding: 0; list-style: none; font-size: .8rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 4px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs span { display: inline-block; max-width: 30em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.list-h1 { font-size: 1.7rem; margin: 20px 0 4px; }
.list-h1 small { font-size: .9rem; color: var(--muted); margin-left: 10px; font-weight: 400; }
.list-lead { color: var(--muted); margin: 0 0 8px; }

/* ---------- 記事 ---------- */
.article { margin-top: 8px; }
.article-head { padding: 20px 0 8px; }
.chip { display: inline-block; font-size: .78rem; font-weight: 700; color: var(--accent-ink); background: var(--accent-soft); padding: 2px 10px; border-radius: 999px; text-decoration: none; }
.article-head h1 { font-size: clamp(1.45rem, 3.4vw, 2rem); line-height: 1.45; margin: 12px 0 8px; letter-spacing: .01em; }
.dates { display: flex; gap: 14px; margin: 0; font-size: .82rem; color: var(--muted); }
.hero { margin: 16px auto 8px; width: min(960px, 100%); }
.hero img { display: block; width: 100%; border-radius: var(--radius); }
.theme-travel .hero { width: min(1120px, 100%); }
@media (max-width: 760px) { .hero img { border-radius: 0; } }

.ad { margin: 24px 0; min-height: 100px; text-align: center; }

.toc { margin: 24px 0; padding: 16px 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.toc summary { cursor: pointer; font-weight: 800; }
.toc ol { margin: 10px 0 0; padding-left: 1.4em; font-size: .92rem; line-height: 1.7; }
.toc li { margin: 3px 0; }
.toc .toc-l3 { list-style: none; margin-left: 1em; font-size: .88rem; }
.toc .toc-l3::before { content: "- "; color: var(--muted); }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--accent); text-decoration: underline; }

/* ---------- 本文 ---------- */
.content { font-size: 1.02rem; overflow-wrap: anywhere; }
.content > :first-child { margin-top: 0; }
.content p { margin: 0 0 1.4em; }
.content h2 {
  font-size: 1.45rem; line-height: 1.45; margin: 2.6em 0 1em; padding: 12px 16px;
  background: #fff; border-left: 5px solid var(--accent); border-radius: 6px; box-shadow: var(--shadow);
}
.content h3 { font-size: 1.22rem; line-height: 1.5; margin: 2.2em 0 .8em; padding-bottom: 6px; border-bottom: 2px solid var(--accent-soft); }
.content h4 { font-size: 1.06rem; margin: 1.8em 0 .6em; }
.content h4::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: .15em; }
.content ul, .content ol { padding-left: 1.5em; margin: 0 0 1.4em; }
.content li { margin: .25em 0; }
.content img { border-radius: 8px; }
.content figure { margin: 1.6em 0; }
.content figcaption, .content .wp-caption-text { font-size: .85rem; color: var(--muted); text-align: center; margin-top: 4px; }
.content .wp-caption { max-width: 100%; }
.content .aligncenter { display: block; margin-inline: auto; }
.content .alignright { float: right; margin: 0 0 1em 1em; }
.content .alignleft { float: left; margin: 0 1em 1em 0; }
.content blockquote {
  margin: 1.6em 0; padding: 14px 18px; background: #fff; border-left: 4px solid var(--line);
  color: #374151; border-radius: 6px;
}
.content blockquote p:last-child { margin-bottom: 0; }
.content hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.content iframe { max-width: 100%; border-radius: 8px; }
.content iframe[src*="google.com/maps"] { width: 100%; aspect-ratio: 4 / 3; height: auto; }
.content iframe[src*="youtube"] { width: 100%; aspect-ratio: 16 / 9; height: auto; }

.table-wrap { overflow-x: auto; margin: 1.6em 0; -webkit-overflow-scrolling: touch; }
.content table { width: 100%; border-collapse: collapse; font-size: .93rem; background: #fff; }
.content th, .content td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: top; }
.content th, .content thead td { background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }
.content tr:nth-child(even) td { background: #fafafa; }

.content dl { margin: 0 0 1.4em; display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; }
.content dt { font-weight: 700; }
.content dd { margin: 0; }

/* コード */
.content code { font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; font-size: .88em; }
.content :not(pre) > code { background: #f1f5f9; color: #0f172a; padding: .1em .4em; border-radius: 4px; }
.content pre {
  margin: 1.4em 0; padding: 16px 18px; overflow-x: auto; background: #0f172a; color: #e2e8f0;
  border-radius: 10px; font-size: .86rem; line-height: 1.65; letter-spacing: 0;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}
.content pre code { background: none; color: inherit; padding: 0; font-size: inherit; }

/* 旧テーマ(JIN 系)から引き継いだ本文の部品 */
.content .c_box, .content .gbox {
  position: relative; margin: 2em 0 1.6em; padding: 18px 20px; border-radius: 10px;
  background: #fff; border: 2px solid var(--line);
}
.content .c_box.intitle { padding-top: 26px; }
.content .box_title {
  position: absolute; top: -.9em; left: 14px; padding: 0 10px; background: inherit;
  font-weight: 800; font-size: .9rem; line-height: 1.8; border-radius: 6px;
}
.content .box_title span { color: inherit; }
.content .pink_box { border-color: #fbcfe8; background: #fdf2f8; }
.content .pink_box .box_title { background: #ec4899; color: #fff; }
.content .blue_box { border-color: #bfdbfe; background: #eff6ff; }
.content .blue_box .box_title { background: #3b82f6; color: #fff; }
.content .yellow_box { border-color: #fde68a; background: #fffbeb; }
.content .yellow_box .box_title { background: #f59e0b; color: #fff; }
.content .gbox { border-color: #d1d5db; background: #f9fafb; }
.content .c_box > :last-child, .content .gbox > :last-child { margin-bottom: 0; }

.content .red { color: #dc2626; }
.content .orange { color: #ea580c; }
.content .b { font-weight: 700; }
.content .ft12px { font-size: .8em; }
.content .ft14px { font-size: .9em; }
.content .ft16px { font-size: 1.04em; }
.content .ft20px { font-size: 1.25em; }
.content .bd-red { border: 2px solid #dc2626; padding: 0 .3em; border-radius: 4px; }
.content .line-orange-f, .content .mk-red { background: linear-gradient(transparent 60%, #fed7aa 60%); }

/* 関連記事([kanren]) */
.content .related_article { margin: 1.6em 0; }
.content .related_article a {
  display: flex; gap: 14px; align-items: center; padding: 12px; background: #fff;
  border: 1px solid var(--line); border-radius: 10px; color: var(--text); text-decoration: none;
}
.content .related_article a:hover { border-color: var(--accent); }
.content .related_article figure { margin: 0; flex: 0 0 120px; }
.content .related_article img { display: block; width: 120px; height: 80px; object-fit: cover; border-radius: 6px; }
.content .related_article .meta { min-width: 0; }
.content .related_article .ttl { margin: 0; font-weight: 700; line-height: 1.5; }
.content .related_article .ttl::before { content: "関連記事"; display: block; font-size: .72rem; color: var(--accent-ink); font-weight: 700; }
.content .related_article .date { font-size: .78rem; color: var(--muted); }

/* agoda のホテル枠 */
.content .agoda-widget { margin: 1.6em 0; }
.content .agoda-cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.content .agoda-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.content .agoda-single .agoda-cards { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .content .agoda-single .agoda-card { flex-direction: row; }
  .content .agoda-single .agoda-thumb { flex: 0 0 240px; }
}
.content .agoda-thumb img { display: block; width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 0; }
.content .agoda-body { padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.content .agoda-name { font-weight: 800; line-height: 1.5; }
.content .agoda-meta { display: flex; gap: 10px; align-items: center; font-size: .85rem; }
.content .agoda-star { color: #f59e0b; letter-spacing: 0; }
.content .agoda-score { color: var(--muted); }
.content .agoda-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.content .agoda-badge { font-size: .72rem; background: #f1f5f9; padding: 1px 8px; border-radius: 999px; }
.content .agoda-bottom { margin-top: auto; display: flex; justify-content: flex-end; }
.content .agoda-btn {
  display: inline-block; padding: 8px 18px; border-radius: 999px; background: var(--accent); color: #fff;
  font-weight: 700; text-decoration: none; font-size: .9rem;
}
.content .agoda-btn:hover { color: #fff; filter: brightness(1.08); }

/* かってね(物販リンク) */
.content .kattene { display: flex; gap: 14px; padding: 14px; margin: 1.6em 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.content .kattene__imgpart { flex: 0 0 120px; }
.content .kattene__title { font-weight: 700; }
.content .kattene__btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.content .kattene__btn a { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--accent); color: #fff; text-decoration: none; font-size: .85rem; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 32px 0 0; list-style: none; }
.tags a { display: inline-block; font-size: .82rem; padding: 2px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--muted); text-decoration: none; }
.tags a:hover { color: var(--accent); border-color: var(--accent); }

.related { margin-top: 24px; }

.notfound { padding: 56px 0 8px; text-align: center; }
.btn { display: inline-block; padding: 10px 24px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 700; text-decoration: none; }
.btn:hover { color: #fff; filter: brightness(1.08); }

/* ---------- フッター ---------- */
.site-footer { margin-top: 64px; background: #111827; color: #d1d5db; font-size: .9rem; }
.footer-grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); padding: 40px 0 24px; }
.footer-logo { margin: 0; font-weight: 800; font-size: 1.1rem; color: #fff; }
.footer-tagline { margin: 6px 0 0; color: #9ca3af; font-size: .85rem; }
.footer-h { margin: 0 0 8px; color: #fff; font-weight: 700; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li { margin: 4px 0; }
.site-footer a { color: #d1d5db; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer small { color: #9ca3af; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 16px 0 28px; border-top: 1px solid #374151; color: #9ca3af; font-size: .8rem; }
.footer-bottom p { margin: 0; }
.legal { display: flex; flex-wrap: wrap; gap: 16px; }
