/*
Theme Name: techou
Theme URI: https://techou.jp/
Description: techou.jp（みんなの手帳）専用テーマ。紙の手帳 × 現代的Webサービス。余白が多く読みやすい、コンテンツ中心のデザイン。データと機能は techou-core プラグインが提供します。
Version: 1.0.2
Requires at least: 6.5
Requires PHP: 8.0
Author: techou.jp
License: GPL-2.0-or-later
Text Domain: techou
*/

:root {
	--accent: #1b7f5f;
	--accent-dark: #146a4f;
	--accent-soft: #e9f4ef;
	--text: #1f2328;
	--sub: #6b6f76;
	--line: #e8e6e1;
	--paper: #faf9f6;
	--header-h: 64px;
	--font: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
	margin: 0; background: #fff; color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.8;
	letter-spacing: .02em; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
	font-feature-settings: "palt" 0;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent-dark); }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { line-height: 1.45; font-weight: 700; }
button, input, select, textarea { font-family: inherit; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 1000; padding: 8px 14px; background: var(--text); color: #fff; border-radius: 8px; }
.skip-link:focus { top: 8px; }
.sp-only { display: none; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: 760px; }
.container .container--narrow { padding: 0; margin: 0; }
.page-pad { padding-top: 40px; padding-bottom: 64px; }
.site-main { min-height: 60vh; }

/* ---------- ヘッダー ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.94); backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--line); }
.admin-bar .site-header { top: 32px; }
.site-header__inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.site-logo { display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; flex-shrink: 0; }
.site-logo:hover { color: var(--text); }
.site-logo__text { font-size: 1.3rem; font-weight: 800; letter-spacing: -.01em; line-height: 1; }
.site-logo__dot { color: var(--accent); }
.site-nav { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; }
.site-nav > a { padding: 8px 12px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: .92rem; font-weight: 600; white-space: nowrap; }
.site-nav > a:hover { background: var(--paper); color: var(--text); }
.site-nav__mobile-only { display: none; }
.site-search { margin-left: auto; }
.site-search input { width: 220px; height: 38px; padding: 0 14px 0 36px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236b6f76' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='M11 11l3.5 3.5'/%3E%3C/svg%3E") no-repeat 12px center; font-size: 14px; color: var(--text); transition: width .2s, border-color .2s; }
.site-search input:focus { outline: none; border-color: var(--accent); background-color: #fff; width: 260px; }
.site-header__actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.header-login { color: var(--text); text-decoration: none; font-size: .9rem; font-weight: 600; padding: 8px 6px; }
.header-avatar { display: inline-flex; border-radius: 50%; }
.header-avatar img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; display: block; }
.nav-toggle { display: none; width: 40px; height: 40px; padding: 10px 9px; border: 0; background: transparent; cursor: pointer; flex-direction: column; justify-content: space-between; }
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- ヒーロー ---------- */
.hero { background: linear-gradient(180deg, var(--paper), #fff); border-bottom: 1px solid var(--line); overflow: hidden; }
.hero__inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 80px; }
.hero__brand { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 20px; font-size: .85rem; font-weight: 700; color: var(--accent-dark); letter-spacing: .12em; }
.hero__title { font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.35; margin: 0 0 20px; letter-spacing: .02em; }
.hero__lead { font-size: clamp(1rem, 2.2vw, 1.2rem); color: #474c52; line-height: 1.9; margin: 0 0 32px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.mock-notebook { position: relative; padding: 28px 28px 24px 52px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 20px 50px -24px rgba(31,35,40,.25); background-image: repeating-linear-gradient(transparent 0 35px, #f1efea 35px 36px); background-position: 0 70px; transform: rotate(1.2deg); }
.mock-notebook::before { content: ""; position: absolute; left: 22px; top: 0; bottom: 0; width: 2px; background: #f3c6be; }
.mock-notebook__title { margin: 0 0 14px; font-weight: 800; font-size: 1.05rem; }
.mock-notebook__list { list-style: none; margin: 0; padding: 0; }
.mock-notebook__list li { position: relative; display: flex; flex-direction: column; padding: 0 0 12px 18px; line-height: 1.6; }
.mock-notebook__list li::before { content: ""; position: absolute; left: 0; top: 7px; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--accent); background: #fff; }
.mock-notebook__list li::after { content: ""; position: absolute; left: 4px; top: 18px; bottom: -2px; width: 1px; background: #d6e9e1; }
.mock-notebook__list li:last-child::after { display: none; }
.mock-notebook__list time { font-size: .76rem; font-weight: 700; color: var(--accent-dark); }
.mock-notebook__list span { font-size: .95rem; }

/* ---------- トップのセクション ---------- */
.home-section { padding: 56px 0 8px; }
.home-section--paper { position: relative; }
.home-section--paper::before { content: ""; position: absolute; z-index: -1; inset: 24px -24px -24px; background: var(--paper); border-radius: 24px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 0 0 24px; }
.section-head__title { font-size: 1.35rem; margin: 0; }
.section-head__lead { margin: 4px 0 0; color: var(--sub); font-size: .9rem; }
.section-head__more { flex-shrink: 0; font-size: .88rem; font-weight: 600; text-decoration: none; }
.home-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; }
.home-columns .tc-grid { grid-template-columns: 1fr; }
.home-columns .tc-card { display: grid; grid-template-columns: 140px 1fr; grid-template-rows: auto 1fr; column-gap: 16px; }
.home-columns .tc-card__link { display: contents; }
.home-columns .tc-card__cover { grid-row: 1 / span 2; align-self: start; }
.home-columns .tc-card__body { padding-top: 0; }
.home-columns .tc-card__meta { grid-column: 2; margin-top: 4px; }
.home-columns .tc-cover--gen { padding: 8px 10px 8px 22px; }
.home-columns .tc-cover--gen .tc-cover__band { left: 8px; width: 4px; }
.home-columns .tc-cover--gen .tc-cover__label { display: none; }
.home-columns .tc-cover--gen .tc-cover__title { font-size: .7rem; }

.how { text-align: center; }
.how__title { font-size: 1.35rem; margin: 0 0 32px; }
.how__steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 0; padding: 0; text-align: left; }
.how__steps li { padding: 28px 24px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.how__num { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark); font-weight: 800; }
.how__steps h3 { margin: 12px 0 6px; font-size: 1.08rem; }
.how__steps p { margin: 0; color: var(--sub); font-size: .92rem; line-height: 1.8; }

.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-chips--scroll { margin: 0 0 32px; }
.cat-chip { padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; color: var(--text); text-decoration: none; font-size: .9rem; font-weight: 600; background: #fff; }
.cat-chip:hover { border-color: var(--accent); color: var(--accent-dark); }

.cta { margin-top: 72px; background: var(--text); color: #fff; }
.cta__inner { padding-top: 72px; padding-bottom: 72px; text-align: center; }
.cta__quote { font-size: clamp(1.4rem, 3.6vw, 2rem); font-weight: 800; line-height: 1.6; margin: 0 0 12px; letter-spacing: .04em; }
.cta__lead { color: #c9cdd2; margin: 0 0 28px; }
.cta__btn { background: #fff; color: var(--text); border-color: #fff; }
.cta__btn:hover { background: var(--accent-soft); color: var(--text); }

/* ---------- 一覧・ページ ---------- */
.archive-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin: 0 0 28px; }
.archive-head--stack { display: block; }
.archive-head--stack .tc-searchform { max-width: 640px; margin-top: 16px; }
.archive-head__title { font-size: clamp(1.5rem, 3.6vw, 2rem); margin: 0; }
.archive-head__lead { margin: 6px 0 0; color: var(--sub); }
.archive-head .tc-section-title { margin: 0; }
.record-results { margin-top: 48px; }
.page-title { font-size: clamp(1.5rem, 3.6vw, 2rem); margin: 0 0 28px; }
.page-content { line-height: 1.95; }
.page-content > h2 { font-size: 1.2rem; margin: 2.2em 0 .8em; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.page-content ul { padding-left: 1.4em; }
.page-content li { margin-bottom: .3em; }
.post-item { padding: 20px 0; border-bottom: 1px solid var(--line); }
.post-item h2 { font-size: 1.1rem; margin: 0 0 4px; }
.post-item h2 a { color: var(--text); text-decoration: none; }
.post-date { margin: 0; color: var(--sub); font-size: .85rem; }
.post-thumb { margin: 0 0 24px; }
.post-thumb img { border-radius: 12px; }
.related { padding-bottom: 64px; }
.related .home-section:first-child { padding-top: 16px; border-top: 1px solid var(--line); }
.profile-wrap { margin-bottom: 8px; }
.note-muted { color: var(--sub); font-size: .88rem; margin-top: 24px; }
.user-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.user-chips .tc-author { padding: 6px 14px 6px 6px; border: 1px solid var(--line); border-radius: 999px; font-weight: 600; font-size: .9rem; }
.notfound { text-align: center; }
.notfound__code { font-size: 4rem; font-weight: 800; color: var(--line); margin: 0; line-height: 1; }
.notfound .tc-searchform { margin: 28px auto; max-width: 520px; }
.notfound__actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }

/* ---------- フッター ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--paper); font-size: .9rem; }
.cta + .site-footer, .site-main:has(.cta) + .site-footer { border-top: 0; }
.site-footer__inner { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; padding-top: 48px; padding-bottom: 32px; }
.site-footer__tagline { margin: 10px 0 0; color: var(--sub); font-size: .85rem; }
.site-footer__nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.site-footer__nav a { display: block; color: var(--text); text-decoration: none; padding: 3px 0; }
.site-footer__nav a:hover { color: var(--accent-dark); text-decoration: underline; }
.site-footer__heading { margin: 0 0 8px; font-weight: 700; font-size: .8rem; color: var(--sub); letter-spacing: .08em; }
.site-footer__bottom { padding-top: 16px; padding-bottom: 32px; border-top: 1px solid var(--line); color: var(--sub); font-size: .8rem; }
.site-footer__bottom p { margin: 0; }

.fab-write { display: none; }

/* ---------- タブレット ---------- */
@media (max-width: 960px) {
	.site-search input { width: 160px; }
	.site-search input:focus { width: 180px; }
	.hero__inner { grid-template-columns: 1fr; gap: 40px; padding-top: 48px; padding-bottom: 56px; }
	.hero__visual { max-width: 460px; }
	.home-columns { grid-template-columns: 1fr; }
}

/* ---------- スマートフォン ---------- */
@media (max-width: 780px) {
	:root { --header-h: 56px; }
	.container { padding: 0 16px; }
	.page-pad { padding-top: 24px; padding-bottom: 48px; }
	.site-header__inner { gap: 12px; }
	.nav-toggle { display: flex; }
	.site-nav { position: fixed; left: 0; right: 0; top: var(--header-h); display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 20px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 16px 32px -16px rgba(0,0,0,.2); }
	.admin-bar .site-nav { top: calc(var(--header-h) + 46px); }
	.nav-open .site-nav { display: flex; }
	.site-nav > a { padding: 14px 4px; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 1rem; }
	.site-nav__mobile-only { display: block; }
	.site-search { order: -1; margin: 8px 0; }
	.site-search input, .site-search input:focus { width: 100%; height: 44px; font-size: 16px; }
	.site-header__actions { margin-left: auto; gap: 6px; }
	.header-login { display: none; }
	.header-write { display: none; }
	.hero__title { font-size: 2rem; }
	.hero__actions .tc-btn { flex: 1; }
	.how__steps { grid-template-columns: 1fr; }
	.home-section { padding-top: 44px; }
	.home-section--paper::before { inset: 20px -16px -16px; border-radius: 0; }
	.section-head__title { font-size: 1.2rem; }
	.home-columns .tc-card { grid-template-columns: 112px 1fr; }
	.site-footer__inner { grid-template-columns: 1fr; gap: 28px; }
	.site-footer__nav { grid-template-columns: 1fr 1fr; }
	.sp-only { display: inline; }
	.fab-write { position: fixed; right: 16px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 40; display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 1.8rem; text-decoration: none; box-shadow: 0 8px 20px -6px rgba(27,127,95,.6); }
	.fab-write:hover { color: #fff; background: var(--accent-dark); }
}
@media (max-width: 600px) {
	.admin-bar .site-header { top: 0; }
}
