/*
Theme Name: torisetsu
Theme URI: https://torisetsu.jp/
Description: torisetsu.jp（みんなの取説）用の軽量テーマ。「説明書 × 親しみやすさ」。モバイル最優先。取説データと機能は torisetsu-core プラグインが保持するため、テーマを変更してもデータは失われません。
Version: 1.0.2
Author: torisetsu.jp
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: torisetsu
*/

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: #fff;
	color: #1f2933;
	font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Meiryo", sans-serif;
	font-size: 16px;
	line-height: 1.8;
	-webkit-font-smoothing: antialiased;
	padding-bottom: 68px; /* bottom-nav */
	overflow-wrap: anywhere;
}
@media (min-width: 900px) { body { padding-bottom: 0; } }
img { max-width: 100%; height: auto; }
a { color: #c94a28; }
a:hover { color: #1f2933; }
h1, h2, h3, h4 { line-height: 1.4; }
table { border-collapse: collapse; width: 100%; margin: 1em 0; }
th, td { border: 1px solid #e7e5e4; padding: 10px 12px; text-align: left; vertical-align: top; }
th { background: #faf8f6; white-space: nowrap; width: 30%; }
:focus-visible { outline: 3px solid rgba(232, 97, 60, .5); outline-offset: 2px; }

.skip-link { position: absolute; left: -9999px; top: 0; background: #1f2933; color: #fff; padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }

.ts-container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.ts-main { padding-top: 20px; padding-bottom: 48px; min-height: 60vh; }
.page-title { font-size: clamp(1.5rem, 4.5vw, 2rem); font-weight: 900; margin: .2em 0 .8em; letter-spacing: -.01em; }
.page-desc { color: #6b7280; margin-top: -.4em; }
.entry-content { max-width: 760px; }
.is-front .entry-content, .entry-content:has(.ts-grid), .entry-content:has(.ts-form) { max-width: none; }
.entry-content > h2 { font-size: 1.3rem; margin: 2em 0 .6em; padding-bottom: .3em; border-bottom: 2px solid #1f2933; }
.entry-content > ul, .entry-content > ol { padding-left: 1.4em; }
.entry { padding: 16px 0; border-bottom: 1px solid #e7e5e4; }
.entry__title { font-size: 1.2rem; margin: 0 0 .3em; }
.entry__title a { color: inherit; text-decoration: none; }
.tst-404-home { margin-top: 2em; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .96); backdrop-filter: saturate(180%) blur(8px); -webkit-backdrop-filter: saturate(180%) blur(8px); border-bottom: 1px solid #efedeb; }
.admin-bar .site-header { top: 46px; }
@media (min-width: 783px) { .admin-bar .site-header { top: 32px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }
.site-header__inner { max-width: 1080px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 16px; }
.site-logo { display: inline-flex; align-items: center; flex-shrink: 0; line-height: 0; }
.site-logo img { display: block; height: 36px; width: auto; }
@media (min-width: 600px) { .site-logo img { height: 42px; } }
.site-nav { display: none; gap: 4px; margin-left: 12px; }
.site-nav a { text-decoration: none; color: #1f2933; font-weight: 700; font-size: .92rem; padding: 6px 10px; border-radius: 8px; }
.site-nav a:hover { background: #faf8f6; }
@media (min-width: 900px) { .site-nav { display: flex; } }
.site-header__actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.site-header__login { font-size: .9rem; font-weight: 700; color: #1f2933; text-decoration: none; }
.site-header__me img { display: block; border-radius: 50%; width: 32px; height: 32px; }
.site-header__create { display: none; }
@media (min-width: 600px) { .site-header__create { display: inline-flex; } }

/* Footer */
.site-footer { background: #faf8f6; border-top: 1px solid #efedeb; margin-top: 40px; }
.site-footer__inner { max-width: 1080px; margin: 0 auto; padding: 32px 16px; text-align: center; }
.site-footer__logo { margin: 0; line-height: 0; }
.site-footer__logo img { display: inline-block; height: 40px; width: auto; }
.site-footer__tag { color: #6b7280; font-size: .85rem; margin: .2em 0 1.2em; }
.site-footer__nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; font-size: .85rem; }
.site-footer__nav a { color: #1f2933; text-decoration: none; }
.site-footer__nav a:hover { text-decoration: underline; }
.site-footer__sister { margin: 28px auto 0; max-width: 900px; padding-top: 20px; border-top: 1px solid #ebe7e3; }
.site-footer__sister-title { font-size: .8rem; font-weight: 700; color: #6b7280; margin: 0 0 10px; }
.site-footer__sister ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; text-align: left; }
@media (min-width: 600px) { .site-footer__sister ul { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .site-footer__sister ul { grid-template-columns: repeat(4, 1fr); } }
.site-footer__sister a { display: flex; flex-direction: column; padding: 8px 10px; background: #fff; border: 1px solid #ebe7e3; border-radius: 8px; text-decoration: none; color: #1f2933; line-height: 1.35; height: 100%; }
.site-footer__sister a:hover { border-color: #e8613c; }
.site-footer__sister-name { font-size: .78rem; font-weight: 700; }
.site-footer__sister-domain { font-size: .7rem; color: #6b7280; }
.site-footer__copy { font-size: .75rem; color: #9ca3af; margin: 1.5em 0 0; }

/* Bottom navigation (mobile) */
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border-top: 1px solid #e7e5e4; padding-bottom: env(safe-area-inset-bottom); }
@media (min-width: 900px) { .bottom-nav { display: none; } }
.bottom-nav__item { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 0 6px; font-size: .68rem; font-weight: 700; color: #6b7280; text-decoration: none; }
.bottom-nav__item span { font-size: 1.25rem; line-height: 1.2; }
.bottom-nav__item.is-active { color: #e8613c; }
.bottom-nav__item--create span { background: #e8613c; border-radius: 50%; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; font-size: 1rem; margin-top: -2px; }

/* フォームのボタン列は bottom-nav の上に */
@media (max-width: 899px) {
	.ts-form__actions, .ts-preview-actions { bottom: calc(60px + env(safe-area-inset-bottom)); }
}
.ts-related { margin-top: 3em; }

@media print {
	.site-header, .site-footer, .bottom-nav, .ts-actions, .ts-share, .ts-report, .ts-owner, .ts-related { display: none !important; }
	body { padding: 0; }
}
