/*
Theme Name: Fitiful Diary 55
Theme URI: https://lovebblife2.stars.ne.jp/
Author: コラ坊
Description: 仕事、生成AI、バスケットボール、京都、日々の記録を読みやすく整理する、大人の個人誌スタイルのWordPressテーマ。
Version: 2.0.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: fitiful-diary-55
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, news, two-columns, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, wide-blocks
*/

:root {
  --fd-ink: #182333;
  --fd-ink-soft: #44505e;
  --fd-paper: #f5f1e8;
  --fd-surface: #fffdf8;
  --fd-line: #d9d2c5;
  --fd-navy: #132b46;
  --fd-navy-2: #204766;
  --fd-copper: #bd7136;
  --fd-rust: #9c4c39;
  --fd-green: #426653;
  --fd-blue: #3e6b87;
  --fd-shadow: 0 18px 55px rgba(19,43,70,.12);
  --fd-radius: 18px;
  --fd-max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--fd-ink);
  background: var(--fd-paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.85;
  text-rendering: optimizeLegibility;
}
body.is-dark {
  --fd-ink: #eef2f4;
  --fd-ink-soft: #b8c0c8;
  --fd-paper: #101820;
  --fd-surface: #17222d;
  --fd-line: #33414d;
  --fd-shadow: 0 18px 55px rgba(0,0,0,.24);
}
a { color: inherit; text-decoration-thickness: .08em; text-underline-offset: .2em; }
a:hover { color: var(--fd-copper); }
img { max-width: 100%; height: auto; display: block; }
button, input, textarea, select { font: inherit; }
button, .button, .fd-button { cursor: pointer; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link:focus { top: 8px; left: 8px; width: auto; height: auto; padding: .75rem 1rem; clip: auto; z-index: 9999; background: #fff; color: #111; }
.fd-container { width: min(calc(100% - 40px), var(--fd-max)); margin-inline: auto; }
.site-main { min-height: 60vh; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 90; background: color-mix(in srgb, var(--fd-surface) 92%, transparent); border-bottom: 1px solid var(--fd-line); backdrop-filter: blur(14px); }
.admin-bar .site-header { top: 32px; }
.header-top { background: var(--fd-navy); color: #fff; font-size: .76rem; letter-spacing: .08em; }
.header-top .fd-container { display: flex; justify-content: space-between; align-items: center; min-height: 32px; }
.header-top p { margin: 0; }
.header-date { opacity: .78; }
.header-main { min-height: 84px; display: grid; grid-template-columns: auto 1fr auto; gap: 26px; align-items: center; }
.site-branding { min-width: 230px; }
.site-title { margin: 0; font-family: Georgia, "Yu Mincho", serif; font-size: clamp(1.65rem, 3vw, 2.25rem); line-height: 1; letter-spacing: -.025em; }
.site-title a { text-decoration: none; }
.site-description { margin: .45rem 0 0; color: var(--fd-ink-soft); font-size: .76rem; letter-spacing: .06em; }
.custom-logo { max-height: 58px; width: auto; }
.primary-navigation { justify-self: end; }
.primary-navigation ul { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 22px; list-style: none; margin: 0; padding: 0; }
.primary-navigation a { position: relative; display: block; padding: .75rem 0; text-decoration: none; font-size: .91rem; font-weight: 700; }
.primary-navigation a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: .45rem; height: 2px; background: var(--fd-copper); transition: right .2s ease; }
.primary-navigation a:hover::after, .primary-navigation .current-menu-item a::after { right: 0; }
.header-tools { display: flex; align-items: center; gap: 8px; }
.icon-button { width: 42px; height: 42px; display: inline-grid; place-items: center; border: 1px solid var(--fd-line); border-radius: 999px; color: var(--fd-ink); background: var(--fd-surface); }
.icon-button:hover { border-color: var(--fd-copper); color: var(--fd-copper); }
.menu-toggle { display: none; }

/* Hero */
.home-hero { overflow: hidden; padding: 56px 0 34px; background: radial-gradient(circle at 78% 15%, rgba(189,113,54,.18), transparent 28%), linear-gradient(180deg, var(--fd-surface), var(--fd-paper)); }
.hero-grid { display: grid; grid-template-columns: minmax(0, .92fr) minmax(440px, 1.08fr); align-items: center; gap: clamp(34px, 5vw, 72px); }
.hero-copy { padding-block: 26px; }
.hero-kicker { display: inline-flex; align-items: center; gap: .65rem; margin: 0 0 1rem; color: var(--fd-copper); font-weight: 800; font-size: .78rem; letter-spacing: .16em; }
.hero-kicker::before { content: ""; width: 38px; height: 2px; background: currentColor; }
.hero-title { max-width: 640px; margin: 0; font-family: Georgia, "Yu Mincho", serif; font-size: clamp(2.7rem, 6vw, 5.5rem); line-height: 1.08; letter-spacing: -.045em; }
.hero-title .accent { color: var(--fd-copper); }
.hero-text { max-width: 620px; margin: 1.45rem 0 0; color: var(--fd-ink-soft); font-size: clamp(1rem, 1.5vw, 1.1rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.8rem; }
.fd-button { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-height: 48px; padding: .8rem 1.2rem; border: 1px solid var(--fd-navy); border-radius: 999px; background: var(--fd-navy); color: #fff; text-decoration: none; font-weight: 800; font-size: .9rem; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.fd-button:hover { color: #fff; background: var(--fd-navy-2); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(19,43,70,.2); }
.fd-button.is-ghost { color: var(--fd-ink); background: transparent; border-color: var(--fd-line); }
.fd-button.is-ghost:hover { color: var(--fd-copper); border-color: var(--fd-copper); box-shadow: none; }
.hero-art { position: relative; min-height: 500px; }
.hero-art::before { content: ""; position: absolute; inset: 6% -10% -10% 10%; border-radius: 42% 58% 43% 57% / 56% 43% 57% 44%; background: rgba(32,71,102,.1); transform: rotate(-4deg); }
.hero-art img { position: relative; width: 100%; height: 500px; object-fit: cover; border-radius: 36px 90px 36px 36px; box-shadow: var(--fd-shadow); }
.hero-note { position: absolute; z-index: 2; left: -34px; bottom: 26px; width: min(320px, 75%); padding: 18px 20px; border-left: 4px solid var(--fd-copper); border-radius: 6px 14px 14px 6px; background: rgba(255,253,248,.94); color: #182333; box-shadow: 0 14px 34px rgba(19,43,70,.18); }
.hero-note-label { display: block; margin-bottom: .3rem; color: var(--fd-copper); font-size: .68rem; font-weight: 900; letter-spacing: .16em; }
.hero-note a { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-decoration: none; font-family: Georgia, "Yu Mincho", serif; font-size: 1rem; font-weight: 700; line-height: 1.55; }

/* Sections */
.home-section, .archive-section { padding: 72px 0; }
.home-section.is-surface { background: var(--fd-surface); border-block: 1px solid var(--fd-line); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 28px; }
.section-kicker { margin: 0 0 .25rem; color: var(--fd-copper); font-size: .72rem; font-weight: 900; letter-spacing: .17em; text-transform: uppercase; }
.section-title { margin: 0; font-family: Georgia, "Yu Mincho", serif; font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1.3; }
.section-link { font-size: .86rem; font-weight: 800; text-decoration: none; }

/* Topics */
.topic-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.topic-card { position: relative; overflow: hidden; min-height: 245px; border-radius: var(--fd-radius); background: var(--fd-navy); color: #fff; text-decoration: none; box-shadow: 0 8px 26px rgba(19,43,70,.1); transition: transform .2s ease, box-shadow .2s ease; }
.topic-card:hover { color: #fff; transform: translateY(-5px); box-shadow: var(--fd-shadow); }
.topic-card img { width: 100%; height: 100%; object-fit: cover; opacity: .62; transition: transform .35s ease, opacity .35s ease; }
.topic-card:hover img { transform: scale(1.04); opacity: .48; }
.topic-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: end; padding: 20px; background: linear-gradient(180deg, transparent 20%, rgba(10,20,31,.9)); }
.topic-icon { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: auto; border: 1px solid rgba(255,255,255,.45); border-radius: 50%; background: rgba(255,255,255,.12); font-size: 1.15rem; backdrop-filter: blur(6px); }
.topic-name { font-family: Georgia, "Yu Mincho", serif; font-size: 1.25rem; font-weight: 700; }
.topic-count { margin-top: .2rem; opacity: .72; font-size: .76rem; letter-spacing: .08em; }

/* Posts */
.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 44px; align-items: start; }
.post-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.post-card { overflow: hidden; border: 1px solid var(--fd-line); border-radius: var(--fd-radius); background: var(--fd-surface); box-shadow: 0 7px 25px rgba(19,43,70,.06); transition: transform .2s ease, box-shadow .2s ease; }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--fd-shadow); }
.post-card.is-featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1.2fr 1fr; }
.card-media { position: relative; overflow: hidden; min-height: 240px; background: var(--fd-navy); }
.post-card.is-featured .card-media { min-height: 390px; }
.card-media > a { display: block; height: 100%; }
.card-media img, .fd-fallback-thumb { width: 100%; height: 100%; min-height: inherit; object-fit: cover; transition: transform .35s ease; }
.post-card:hover .card-media img { transform: scale(1.035); }
.card-badge { position: absolute; left: 16px; top: 16px; z-index: 2; display: inline-flex; align-items: center; gap: .35rem; padding: .36rem .65rem; border-radius: 999px; background: rgba(19,43,70,.92); color: #fff; font-size: .7rem; font-weight: 900; text-decoration: none; letter-spacing: .04em; }
.card-body { padding: 22px; }
.post-card.is-featured .card-body { display: flex; flex-direction: column; justify-content: center; padding: clamp(26px, 4vw, 48px); }
.card-meta { display: flex; flex-wrap: wrap; gap: .5rem 1rem; color: var(--fd-ink-soft); font-size: .72rem; }
.card-title { margin: .75rem 0 .7rem; font-family: Georgia, "Yu Mincho", serif; font-size: clamp(1.15rem, 2vw, 1.5rem); line-height: 1.55; }
.post-card.is-featured .card-title { font-size: clamp(1.65rem, 3vw, 2.45rem); line-height: 1.45; }
.card-title a { text-decoration: none; }
.card-excerpt { margin: 0; color: var(--fd-ink-soft); font-size: .9rem; line-height: 1.8; }
.card-more { display: inline-flex; align-items: center; gap: .5rem; margin-top: 1rem; color: var(--fd-copper); font-size: .78rem; font-weight: 900; text-decoration: none; }
.fj-fallback-thumb { display: grid; place-items: center; background-size: cover; background-position: center; }
.fj-fallback-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Sidebar */
.sidebar { position: sticky; top: 145px; display: grid; gap: 24px; }
.widget { padding: 22px; border: 1px solid var(--fd-line); border-radius: var(--fd-radius); background: var(--fd-surface); }
.widget-title { margin: 0 0 1rem; padding-bottom: .65rem; border-bottom: 1px solid var(--fd-line); font-family: Georgia, "Yu Mincho", serif; font-size: 1.15rem; }
.widget ul { margin: 0; padding: 0; list-style: none; }
.widget li + li { margin-top: .55rem; }
.widget a { text-decoration: none; font-size: .88rem; }
.profile-widget { background: var(--fd-navy); color: #fff; border-color: var(--fd-navy); }
.profile-mark { width: 62px; height: 62px; display: grid; place-items: center; margin-bottom: 1rem; border: 1px solid rgba(255,255,255,.3); border-radius: 50%; font-family: Georgia, serif; font-size: 1.4rem; color: #fff; }
.profile-widget h2 { margin: 0 0 .7rem; font-family: Georgia, "Yu Mincho", serif; font-size: 1.25rem; }
.profile-widget p { margin: 0; color: rgba(255,255,255,.75); font-size: .84rem; }
.profile-widget .profile-link { display: inline-block; margin-top: 1rem; color: #fff; font-size: .78rem; font-weight: 800; }

/* Archive / search */
.archive-hero { padding: 58px 0 34px; border-bottom: 1px solid var(--fd-line); background: var(--fd-surface); }
.archive-title { margin: 0; font-family: Georgia, "Yu Mincho", serif; font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1.2; }
.archive-description { max-width: 720px; margin-top: 1rem; color: var(--fd-ink-soft); }
.navigation.pagination { margin-top: 34px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.page-numbers { min-width: 42px; height: 42px; display: grid; place-items: center; padding: 0 .75rem; border: 1px solid var(--fd-line); border-radius: 999px; background: var(--fd-surface); text-decoration: none; }
.page-numbers.current { color: #fff; background: var(--fd-navy); border-color: var(--fd-navy); }

/* Single */
.reading-progress { position: fixed; z-index: 120; left: 0; top: 0; width: 0; height: 3px; background: var(--fd-copper); }
.admin-bar .reading-progress { top: 32px; }
.single-wrap { width: min(calc(100% - 40px), 930px); margin-inline: auto; padding: 54px 0 78px; }
.breadcrumbs { margin-bottom: 1.4rem; color: var(--fd-ink-soft); font-size: .75rem; }
.breadcrumbs a { text-decoration: none; }
.entry-header { text-align: center; }
.entry-category { display: inline-flex; margin-bottom: 1rem; color: var(--fd-copper); font-size: .76rem; font-weight: 900; letter-spacing: .08em; text-decoration: none; }
.entry-title { margin: 0; font-family: Georgia, "Yu Mincho", serif; font-size: clamp(2rem, 5vw, 4.3rem); line-height: 1.28; letter-spacing: -.03em; }
.entry-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: .7rem 1.2rem; margin-top: 1.2rem; color: var(--fd-ink-soft); font-size: .78rem; }
.entry-thumbnail { margin: 34px 0; overflow: hidden; border-radius: 24px; box-shadow: var(--fd-shadow); }
.entry-thumbnail img { width: 100%; max-height: 620px; object-fit: cover; }
.entry-content { font-size: 1.02rem; line-height: 2; }
.entry-content > * { max-width: 760px; margin-left: auto; margin-right: auto; }
.entry-content > .alignwide { max-width: 1060px; }
.entry-content > .alignfull { max-width: none; width: 100vw; margin-left: calc(50% - 50vw); }
.entry-content h2 { margin-top: 3.1rem; padding-bottom: .55rem; border-bottom: 2px solid var(--fd-line); font-family: Georgia, "Yu Mincho", serif; font-size: clamp(1.55rem, 3vw, 2.15rem); line-height: 1.5; }
.entry-content h2::first-letter { color: var(--fd-copper); }
.entry-content h3 { margin-top: 2.3rem; font-size: 1.35rem; }
.entry-content blockquote { padding: 1.2rem 1.4rem; border-left: 4px solid var(--fd-copper); background: var(--fd-surface); color: var(--fd-ink-soft); }
.entry-content a { color: var(--fd-blue); }
.entry-content table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.entry-content th, .entry-content td { padding: .75rem; border: 1px solid var(--fd-line); }
.entry-content th { background: var(--fd-navy); color: #fff; }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; max-width: 760px; margin: 36px auto 0; }
.post-tags a { padding: .35rem .7rem; border: 1px solid var(--fd-line); border-radius: 999px; font-size: .74rem; text-decoration: none; }
.author-box { display: grid; grid-template-columns: 72px 1fr; gap: 18px; max-width: 760px; margin: 42px auto 0; padding: 24px; border-radius: var(--fd-radius); background: var(--fd-navy); color: #fff; }
.author-avatar img { border-radius: 50%; }
.author-box h2 { margin: 0; font-size: 1rem; }
.author-box p { margin: .45rem 0 0; color: rgba(255,255,255,.74); font-size: .82rem; }
.related-posts { max-width: 1040px; margin: 70px auto 0; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.related-card { overflow: hidden; border: 1px solid var(--fd-line); border-radius: 14px; background: var(--fd-surface); }
.related-card img, .related-card .fj-fallback-thumb { width: 100%; height: 150px; object-fit: cover; }
.related-card div { padding: 14px; }
.related-card h3 { margin: 0; font-family: Georgia, "Yu Mincho", serif; font-size: .95rem; line-height: 1.55; }
.related-card a { text-decoration: none; }

/* Forms & comments */
.search-form { display: flex; gap: 8px; }
.search-field, input[type="text"], input[type="email"], input[type="url"], textarea { width: 100%; padding: .75rem .85rem; border: 1px solid var(--fd-line); border-radius: 10px; color: var(--fd-ink); background: var(--fd-surface); }
.search-submit, input[type="submit"] { padding: .72rem 1rem; border: 0; border-radius: 10px; background: var(--fd-navy); color: #fff; font-weight: 800; }
.comments-area { max-width: 760px; margin: 55px auto 0; }
.comment-list { padding: 0; list-style: none; }
.comment-body { padding: 20px; border: 1px solid var(--fd-line); border-radius: 14px; background: var(--fd-surface); }
.comment-list .children { margin-top: 16px; }

/* Footer */
.site-footer { padding: 52px 0 28px; background: #101d2b; color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.3fr .7fr .7fr; gap: 50px; }
.footer-brand { font-family: Georgia, "Yu Mincho", serif; font-size: 1.8rem; }
.footer-copy { max-width: 460px; color: rgba(255,255,255,.65); font-size: .84rem; }
.footer-title { margin: 0 0 .8rem; color: rgba(255,255,255,.5); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; }
.footer-menu, .footer-categories { margin: 0; padding: 0; list-style: none; }
.footer-menu li + li, .footer-categories li + li { margin-top: .45rem; }
.footer-menu a, .footer-categories a { color: #fff; text-decoration: none; font-size: .84rem; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.14); color: rgba(255,255,255,.5); font-size: .74rem; }

/* 404 */
.error-404 { min-height: 62vh; display: grid; place-items: center; text-align: center; padding: 70px 20px; }
.error-code { margin: 0; color: var(--fd-copper); font-family: Georgia, serif; font-size: clamp(5rem, 18vw, 12rem); line-height: .85; }

@media (max-width: 980px) {
  .admin-bar .site-header { top: 46px; }
  .header-main { grid-template-columns: 1fr auto; min-height: 72px; }
  .primary-navigation { position: absolute; left: 0; right: 0; top: 100%; display: none; padding: 18px 20px 24px; border-bottom: 1px solid var(--fd-line); background: var(--fd-surface); }
  .primary-navigation.is-open { display: block; }
  .primary-navigation ul { display: grid; justify-content: stretch; gap: 0; }
  .primary-navigation a { padding: .65rem 0; }
  .menu-toggle { display: inline-grid; }
  .header-tools .theme-toggle { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { text-align: left; }
  .hero-art { min-height: 420px; }
  .hero-art img { height: 420px; }
  .hero-note { left: 18px; }
  .topic-grid { grid-template-columns: repeat(2, 1fr); }
  .content-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .fd-container, .single-wrap { width: min(calc(100% - 28px), var(--fd-max)); }
  .header-top { display: none; }
  .site-description { display: none; }
  .site-branding { min-width: 0; }
  .header-main { gap: 12px; }
  .header-tools { gap: 5px; }
  .icon-button { width: 39px; height: 39px; }
  .home-hero { padding-top: 24px; }
  .hero-title { font-size: clamp(2.4rem, 13vw, 3.8rem); }
  .hero-art { min-height: 320px; }
  .hero-art img { height: 320px; border-radius: 22px 54px 22px 22px; }
  .hero-note { left: 10px; right: 10px; bottom: 12px; width: auto; }
  .home-section, .archive-section { padding: 52px 0; }
  .topic-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .topic-card { min-height: 190px; }
  .topic-overlay { padding: 14px; }
  .topic-name { font-size: 1rem; }
  .post-grid { grid-template-columns: 1fr; }
  .post-card.is-featured { display: block; }
  .post-card.is-featured .card-media { min-height: 270px; }
  .sidebar { grid-template-columns: 1fr; }
  .single-wrap { padding-top: 34px; }
  .entry-title { font-size: clamp(1.9rem, 10vw, 3rem); }
  .related-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-about { grid-column: auto; }
  .footer-bottom { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
