/*
Theme Name: Civic Association
Theme URI: https://wordpress.org/
Author: Civic Association Project
Description: 社会团体信息展示主题：首页横幅、新闻动态、通知公告、机构介绍、友情链接与备案信息，支持原生媒体附件。
Version: 2.1.2
Requires at least: 6.4
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: civic-association
*/

:root {
  --red: #d2261b;
  --red-dark: #ae1c13;
  --navy: #0b2a4a;
  --navy-deep: #071f37;
  --ink: #222222;
  --text: #333333;
  --body: #555555;
  --muted: #8c8c8c;
  --line: #e6e6e6;
  --gray: #f5f5f5;
  --white: #ffffff;
  --content-width: 1200px;
  --header-height: 84px;
  --font: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
  --font-latin: Arial, "Helvetica Neue", Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; color: var(--text); background: var(--white); font: 15px/1.7 var(--font); -webkit-font-smoothing: antialiased; }
main { flex: 1 0 auto; }
button, input, textarea, select { font: inherit; color: inherit; }
img { max-width: 100%; height: auto; vertical-align: middle; }
a { color: inherit; text-decoration: none; transition: color .2s ease, background-color .2s ease, border-color .2s ease; }
a:hover { color: var(--red); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; text-wrap: pretty; }
h1, h2, h3 { color: var(--ink); font-weight: 600; }
ul { margin: 0; padding: 0; }
.icon { flex: 0 0 auto; }
.container { width: min(var(--content-width), calc(100% - 48px)); margin-inline: auto; }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 200; padding: 10px 16px; background: var(--red); color: var(--white); }
.skip-link:focus { top: 12px; color: var(--white); }
.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important; }
.screen-reader-text:focus { clip: auto !important; clip-path: none; height: auto; width: auto; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--white); box-shadow: 0 1px 0 var(--line); transition: box-shadow .2s ease; }
.site-header.is-scrolled { box-shadow: 0 4px 16px rgba(0, 0, 0, .08); }
.admin-bar .site-header { top: 32px; }
.header-inner { display: flex; align-items: center; gap: 32px; min-height: var(--header-height); }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-logo { width: auto; max-height: 54px; max-width: 120px; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { margin: 0; color: var(--ink); font-size: 24px; font-weight: 700; line-height: 1.25; letter-spacing: .04em; }
.brand-en { margin-top: 3px; color: var(--muted); font: 600 12px/1.2 var(--font-latin); letter-spacing: .04em; }
.header-panel { display: flex; align-items: center; gap: 28px; margin-left: auto; }
.nav-list { display: flex; list-style: none; align-items: stretch; }
.nav-list > li { position: relative; }
.nav-list > li > a { position: relative; display: flex; align-items: center; height: var(--header-height); padding: 0 18px; color: var(--text); font-size: 16px; white-space: nowrap; }
.nav-list > li > a::after { position: absolute; left: 18px; right: 18px; bottom: 0; height: 3px; content: ""; background: var(--red); transform: scaleX(0); transition: transform .2s ease; }
.nav-list > li > a:hover, .nav-list .current-menu-item > a, .nav-list .current_page_item > a, .nav-list .current-menu-ancestor > a, .nav-list .is-current > a { color: var(--red); }
.nav-list .current-menu-item > a::after, .nav-list .current_page_item > a::after, .nav-list .current-menu-ancestor > a::after, .nav-list .is-current > a::after, .nav-list > li > a:hover::after { transform: scaleX(1); }
.nav-list .sub-menu { list-style: none; position: absolute; top: 100%; left: 0; min-width: 100%; padding: 6px 0; background: var(--white); box-shadow: 0 8px 20px rgba(0, 0, 0, .1); display: none; z-index: 10; }
.nav-list .sub-menu a { display: block; padding: 9px 20px; font-size: 14px; white-space: nowrap; }
.nav-list .sub-menu a:hover { background: var(--gray); }
.nav-list li:hover > .sub-menu, .nav-list li:focus-within > .sub-menu { display: block; }
.menu-toggle { display: none; align-items: center; margin-left: auto; padding: 8px 12px; min-height: 40px; border: 1px solid var(--line); background: var(--white); color: var(--text); }
.menu-toggle-bars { display: inline-flex; flex-direction: column; gap: 4px; margin-right: 8px; }
.menu-toggle-bars i { display: block; width: 16px; height: 2px; background: currentColor; }

.search-form { display: flex; align-items: center; height: 38px; border-radius: 19px; background: #f2f2f2; border: 1px solid transparent; }
.search-form:focus-within { border-color: var(--red); background: var(--white); }
.search-field { width: 100%; min-width: 0; height: 100%; border: 0; background: none; padding: 0 0 0 16px; font-size: 14px; outline: none; }
.search-field::placeholder { color: #a6a6a6; }
.search-submit { display: grid; place-items: center; flex: 0 0 auto; width: 42px; height: 100%; border: 0; background: none; color: var(--muted); }
.search-submit:hover { color: var(--red); }
.search-submit .icon { width: 18px; height: 18px; }
.header-search .search-form { width: 200px; }

/* Shared pieces */
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 0 22px; border-radius: 19px; font-size: 14px; line-height: 1; white-space: nowrap; }
.pill .icon { width: 14px; height: 14px; }
.pill-red { background: var(--red); color: var(--white); }
.pill-red:hover { background: var(--red-dark); color: var(--white); }
.pill-outline { border: 1px solid rgba(255, 255, 255, .85); color: var(--white); }
.pill-outline:hover { background: var(--red); border-color: var(--red); color: var(--white); }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 36px; }
.sec-title, .column-title { position: relative; isolation: isolate; padding-left: 16px; color: var(--red); font-size: 28px; font-weight: 700; line-height: 1.25; letter-spacing: .04em; }
.sec-title::before, .column-title::before { position: absolute; left: 0; top: 50%; width: 4px; height: 26px; content: ""; background: var(--red); transform: translateY(-50%); }
.sec-en { position: absolute; left: 2.4em; top: 38%; z-index: -1; color: rgba(0, 0, 0, .07); font: 700 34px/1 var(--font-latin); letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; pointer-events: none; }
.sec-more { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; white-space: nowrap; }
.sec-more .icon { width: 14px; height: 14px; }
.column-title { margin-bottom: 32px; font-size: 26px; }
.column-title::before { height: 24px; }
.date-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 0 0 auto; width: 72px; padding-right: 18px; border-right: 1px solid var(--line); font-family: var(--font-latin); }
.date-day { color: var(--red); font-size: 32px; font-weight: 700; line-height: 1; }
.date-ym { margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1; }
.empty-state { padding: 48px 0; color: var(--muted); text-align: center; }
.empty-title { margin-bottom: 6px; color: var(--body); font-size: 16px; }
.empty-state p { font-size: 14px; }

/* Home banner */
.banner { position: relative; height: clamp(300px, 34vw, 620px); overflow: hidden; background: var(--navy); }
.banner-track { position: absolute; inset: 0; }
.banner-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .8s ease, visibility .8s; }
.banner-slide.is-active { z-index: 1; opacity: 1; visibility: visible; }
.banner-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banner-slide:has(.banner-caption)::after { position: absolute; inset: 0; content: ""; background: linear-gradient(90deg, rgba(4, 16, 34, .62) 0%, rgba(4, 16, 34, .28) 50%, rgba(4, 16, 34, 0) 80%); }
.banner-caption { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; height: 100%; color: var(--white); }
.banner-title { max-width: 760px; color: var(--white); font-size: clamp(26px, 2.8vw, 44px); font-weight: 500; line-height: 1.4; letter-spacing: .06em; text-shadow: 0 2px 12px rgba(0, 0, 0, .25); }
.banner-date { margin-top: 10px; font: 14px/1 var(--font-latin); opacity: .85; }
.banner-caption .pill { margin-top: 32px; }
.banner-link { position: absolute; inset: 0; z-index: 2; }
.banner-arrow { position: absolute; top: 50%; z-index: 3; display: grid; place-items: center; width: 44px; height: 64px; border: 0; background: rgba(0, 0, 0, .28); color: var(--white); transform: translateY(-50%); }
.banner-arrow:hover { background: var(--red); }
.banner-arrow .icon { width: 22px; height: 22px; }
.banner-prev { left: 0; }
.banner-next { right: 0; }
.banner-dots { position: absolute; left: 0; right: 0; bottom: 22px; z-index: 3; display: flex; justify-content: center; gap: 8px; }
.banner-dot { width: 36px; height: 20px; padding: 0; border: 0; background: none; }
.banner-dot::before { display: block; height: 3px; content: ""; background: rgba(255, 255, 255, .55); }
.banner-dot.is-active::before { background: var(--red); }

/* Home sections */
.home-portal { margin-top: 0; padding-block: 22px; background: rgb(0, 79, 148); }
.portal-card { display: flex; align-items: center; justify-content: flex-start; gap: 36px; min-height: 64px; }
.portal-card:hover { color: var(--white); }
.portal-title { display: inline-block; padding-bottom: 8px; border-bottom: 3px solid rgba(255, 255, 255, .9); color: var(--white); font-size: 26px; font-weight: 600; line-height: 1.4; }
.portal-go { position: relative; flex: 0 0 auto; color: var(--white); font-size: 16px; font-weight: 600; transition: color .2s ease; }
.portal-go::after { position: absolute; left: 0; right: 0; bottom: -6px; height: 3px; content: ""; background: var(--red); transform: scaleX(0); transition: transform .2s ease; }
.portal-go:hover { color: var(--red); }
.portal-go:hover::after { transform: scaleX(1); }
.home-section { padding-block: 64px; }
.home-notices { background: var(--gray); }
.home-links { border-top: 1px solid var(--line); padding-block: 56px; }
.news-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.news-feature { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--gray); color: var(--white); }
.news-feature img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.news-feature:hover { color: var(--white); }
.news-feature:hover img { transform: scale(1.04); }
.news-feature-caption { position: absolute; left: 0; right: 0; bottom: 0; display: grid; gap: 10px; padding: 18px 24px 20px; background: rgba(8, 22, 40, .74); }
.news-feature-title { overflow: hidden; font-size: 18px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.news-feature-meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; font: 13px/1 var(--font-latin); }
.news-feature-meta .pill { min-height: 32px; padding: 0 16px; font-family: var(--font); font-size: 13px; }
.news-rows { list-style: none; }
.news-rows li { border-bottom: 1px solid var(--line); }
.news-rows li, .news-rows a { min-width: 0; max-width: 100%; }
.news-rows a { display: grid; gap: 8px; padding: 20px 0; }
.news-rows li:first-child a { padding-top: 0; }
.news-row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; min-width: 0; }
.news-row-title { flex: 1; min-width: 0; overflow: hidden; color: var(--text); font-size: 16px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; transition: color .2s ease; }
.news-row-head time { flex: 0 0 auto; color: var(--muted); font: 14px/1 var(--font-latin); }
.news-row-excerpt { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 14px; line-height: 1.75; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.news-row-arrow { justify-self: end; color: #bbbbbb; transition: color .2s ease, transform .2s ease; }
.news-rows a:hover .news-row-title, .news-rows a:hover .news-row-arrow { color: var(--red); }
.news-rows a:hover .news-row-arrow { transform: translateX(4px); }
.news-split.no-feature { grid-template-columns: 1fr; }
.news-split.no-feature .news-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; }
.news-split.no-feature .news-rows li:nth-child(2) a { padding-top: 0; }
.notice-cards { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.notice-cards a { display: flex; align-items: center; gap: 20px; height: 100%; min-height: 116px; padding: 24px; background: var(--white); transition: box-shadow .25s ease, transform .25s ease; }
.notice-cards a:hover { box-shadow: 0 10px 28px rgba(0, 0, 0, .08); transform: translateY(-2px); }
.notice-card-title { display: -webkit-box; overflow: hidden; color: var(--text); font-size: 15px; line-height: 1.75; -webkit-box-orient: vertical; -webkit-line-clamp: 2; transition: color .2s ease; }
.notice-cards a:hover .notice-card-title { color: var(--red); }
.about-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 64px; align-items: center; }
.about-split.no-image { grid-template-columns: 1fr; }
.about-name { margin-bottom: 16px; font-size: 22px; }
.about-copy { color: var(--body); font-size: 15px; line-height: 2; text-align: justify; }
.about-text .pill { margin-top: 28px; }
.about-media img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.link-grid { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.link-grid a { display: flex; align-items: center; justify-content: center; height: 64px; padding: 0 12px; border: 1px solid var(--line); color: var(--body); font-size: 14px; line-height: 1.4; text-align: center; }
.link-grid a:hover { border-color: var(--red); color: var(--red); }

/* Footer */
.site-footer { padding-top: 44px; background: var(--navy); color: #9fb0c3; }
.footer-brand { padding-bottom: 24px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.footer-name { display: block; color: var(--white); font-size: 22px; font-weight: 700; letter-spacing: .04em; }
.footer-en { display: block; margin-top: 4px; color: #7f93aa; font: 600 12px/1.3 var(--font-latin); letter-spacing: .04em; }
.footer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 40px; padding-block: 32px 40px; }
.footer-heading { margin-bottom: 14px; color: var(--white); font-size: 15px; font-weight: 600; }
.footer-links { list-style: none; display: grid; gap: 10px; font-size: 14px; }
.footer-links a, .footer-contact a { color: #9fb0c3; }
.footer-links a:hover, .footer-contact a:hover { color: var(--white); }
.footer-contact p { font-size: 14px; line-height: 1.9; overflow-wrap: anywhere; }
.footer-qr { text-align: center; }
.footer-qr img { width: 108px; height: 108px; padding: 4px; background: var(--white); }
.footer-qr p { margin-top: 8px; font-size: 13px; }
.footer-bottom { padding-block: 16px; background: var(--navy-deep); color: #7f93aa; font-size: 13px; }
.footer-bottom .container { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 24px; }
.footer-bottom a { color: inherit; }
.footer-bottom a:hover { color: var(--white); }
.back-top { position: fixed; right: 24px; bottom: 32px; z-index: 90; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 56px; height: 56px; border: 0; background: var(--red); color: var(--white); font-size: 12px; opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s, background-color .2s ease; }
.back-top .icon { width: 20px; height: 20px; }
.back-top.is-visible { opacity: 1; visibility: visible; }
.back-top:hover { background: var(--red-dark); }

/* Inner pages */
.inner-banner { position: relative; display: flex; align-items: center; height: 240px; background: var(--navy) center / cover no-repeat; color: var(--white); }
.inner-banner.has-image::before { position: absolute; inset: 0; content: ""; background: rgba(6, 22, 44, .5); }
.inner-banner .container { position: relative; }
.inner-banner-title { font-size: 34px; font-weight: 600; letter-spacing: .1em; }
.inner-banner-en { margin-top: 8px; font: 14px/1 var(--font-latin); letter-spacing: .2em; text-transform: uppercase; opacity: .75; }
.subnav { background: var(--white); border-bottom: 1px solid var(--line); box-shadow: 0 2px 6px rgba(0, 0, 0, .03); }
.subnav-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 56px; }
.subnav-tabs { display: flex; align-self: stretch; }
.subnav-tabs a { display: flex; align-items: center; padding: 0 32px; color: var(--text); font-size: 16px; white-space: nowrap; }
.subnav-tabs a.is-active { background: var(--red); color: var(--white); }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-left: auto; color: var(--muted); font-size: 13px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--red); }
.breadcrumb .divider { margin-inline: 4px; }
.inner-main { padding-block: 44px 72px; }
.post-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 48px; }
.post-item { display: grid; gap: 20px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.post-item.has-media { grid-template-columns: 220px minmax(0, 1fr); }
.post-thumb { display: block; aspect-ratio: 11 / 7; overflow: hidden; background: var(--gray); }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.post-item:hover .post-thumb img { transform: scale(1.05); }
.post-body { display: flex; flex-direction: column; min-width: 0; }
.post-title { overflow: hidden; font-size: 17px; font-weight: 500; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.post-title a { color: var(--text); }
.post-title a:hover { color: var(--red); }
.post-excerpt { display: -webkit-box; overflow: hidden; margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.75; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.post-meta { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 10px; color: #a6a6a6; font: 13px/1 var(--font-latin); }
.post-more { color: #bbbbbb; }
.post-more:hover { color: var(--red); }
.notice-list { border-top: 1px solid var(--line); }
.notice-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) 24px; gap: 24px; align-items: center; padding-block: 22px; border-bottom: 1px dashed #dcdcdc; }
.notice-row-title { overflow: hidden; font-size: 16px; font-weight: 500; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.notice-row-title a { color: var(--text); }
.notice-row-title a:hover { color: var(--red); }
.notice-row-excerpt { overflow: hidden; margin-top: 6px; color: #999999; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.post-label { display: inline-block; margin-right: 10px; padding: 0 6px; border: 1px solid var(--red); color: var(--red); font-size: 12px; line-height: 18px; }
.notice-row-more { color: #c4c4c4; }
.notice-row:hover .notice-row-more { color: var(--red); }
.search-summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; margin-bottom: 24px; color: var(--body); }
.search-summary .search-form { width: 320px; }
.pagination { margin-top: 44px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 14px; border: 1px solid var(--line); color: var(--body); font-size: 14px; }
.pagination a.page-numbers:hover { border-color: var(--red); color: var(--red); }
.pagination .current { background: var(--red); border-color: var(--red); color: var(--white); }
.pagination .dots { border-color: transparent; }

/* Article */
.entry { max-width: 960px; }
.entry-header { padding-bottom: 20px; margin-bottom: 32px; border-bottom: 1px solid var(--line); text-align: center; }
.entry-title { color: var(--ink); font-size: 28px; line-height: 1.5; overflow-wrap: anywhere; }
.entry-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 28px; margin-top: 14px; color: var(--muted); font-size: 13px; }
.entry-content { color: var(--text); font-size: 16px; line-height: 2; overflow-wrap: anywhere; }
.entry-content::after { display: block; clear: both; content: ""; }
.entry-content > * + * { margin-top: 1em; }
.entry-content > p:not([class]):not(:has(img)) { text-indent: 2em; }
.entry-content h2 { font-size: 21px; line-height: 1.6; margin-block: 1.6em .6em; }
.entry-content h3 { font-size: 18px; line-height: 1.6; margin-block: 1.4em .5em; }
.entry-content ul, .entry-content ol { padding-left: 2em; }
.entry-content a { color: #1a5aa6; text-decoration: underline; text-underline-offset: 3px; }
.entry-content a:hover { color: var(--red); }
.entry-content figure { margin: 1.6em auto; text-align: center; }
.entry-content figure img, .entry-content p img { display: block; margin-inline: auto; }
.entry-content figcaption, .entry-content .wp-caption-text { margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.7; text-align: center; }
.entry-content blockquote { margin-inline: 0; padding: 14px 20px; background: var(--gray); border-left: 3px solid var(--red); }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.7; }
.entry-content td, .entry-content th { padding: 8px 12px; border: 1px solid #dddddd; text-align: left; }
.entry-content th { background: var(--gray); }
.entry-content pre { overflow: auto; padding: 16px; background: var(--gray); font-size: 14px; }
.entry-content .aligncenter { display: block; margin-inline: auto; }
.entry-content .alignleft { float: left; margin: 0 20px 12px 0; }
.entry-content .alignright { float: right; margin: 0 0 12px 20px; }
.entry-content .gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-block: 1.6em; }
.entry-content .gallery-item { width: auto !important; margin: 0 !important; text-align: center; }
.entry-content .gallery-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; padding: 8px; border: 1px solid var(--line) !important; background: var(--white); }
.entry-content .gallery-caption { margin-top: 8px; color: var(--body); font-size: 14px; line-height: 1.6; }
.entry-content .source-note { color: var(--muted); font-size: 14px; text-align: right; }
.entry-content .wp-block-file { padding: 12px 16px; background: var(--gray); }
.entry-content .wp-block-file__button, .entry-content .wp-element-button { color: var(--white); text-decoration: none; background: var(--red); }
.entry-content .post-password-form input[type="password"] { max-width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); }
.entry-content .post-password-form input[type="submit"] { min-height: 40px; padding: 8px 18px; border: 0; background: var(--red); color: var(--white); cursor: pointer; }
.attachment-section { margin-top: 32px; padding: 18px 24px; border: 1px solid var(--line); background: #fafafa; }
.attachment-section h2 { margin-bottom: 10px; font-size: 15px; }
.attachment-list { list-style: none; }
.attachment-list li + li { margin-top: 8px; padding-top: 8px; border-top: 1px dashed #dddddd; }
.attachment-list a { display: flex; align-items: center; gap: 10px; color: #1a5aa6; font-size: 14px; }
.attachment-list a:hover { color: var(--red); }
.attachment-name { min-width: 0; overflow-wrap: anywhere; }
.attachment-size { margin-left: auto; flex: 0 0 auto; color: var(--muted); font-size: 13px; }
.source-link { margin-top: 24px; font-size: 14px; }
.source-link a { color: #1a5aa6; text-decoration: underline; text-underline-offset: 3px; }
.entry-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); }
.entry-nav { min-width: 0; color: var(--muted); font-size: 14px; line-height: 2; }
.entry-nav p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry-nav a { color: var(--text); }
.entry-nav a:hover { color: var(--red); }

/* Contact & misc pages */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr); gap: 48px; align-items: start; }
.contact-heading { margin-bottom: 8px; font-size: 20px; }
.contact-details { margin: 8px 0 0; }
.contact-row { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 16px; padding-block: 16px; border-top: 1px solid var(--line); }
.contact-row:last-child { border-bottom: 1px solid var(--line); }
.contact-row dt { color: var(--muted); font-size: 14px; }
.contact-row dd { margin: 0; color: var(--text); font-size: 15px; overflow-wrap: anywhere; }
.wechat-card { padding: 28px; background: var(--gray); text-align: center; }
.wechat-card h2 { margin-bottom: 16px; font-size: 16px; }
.wechat-card img { max-width: 180px; max-height: 180px; }
.wechat-card p { margin-top: 12px; color: var(--muted); font-size: 13px; }
.qr-placeholder { display: grid; place-content: center; width: 160px; min-height: 160px; margin-inline: auto; border: 1px dashed #cccccc; background: var(--white); color: var(--muted); font-size: 13px; line-height: 1.7; }
.contact-page-content { margin-top: 40px; }
.not-found { padding-block: 80px 96px; text-align: center; }
.not-found-code { color: var(--red); font: 700 72px/1 var(--font-latin); }
.not-found h1 { margin-top: 16px; font-size: 26px; }
.not-found p { margin-top: 10px; color: var(--body); }
.not-found-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px; margin-top: 28px; }
.not-found-actions .search-form { width: 300px; }

@media (max-width: 1200px) {
  .nav-list > li > a { padding: 0 13px; }
  .nav-list > li > a::after { left: 13px; right: 13px; }
  .header-search .search-form { width: 170px; }
}

@media (max-width: 1024px) {
  :root { --header-height: 68px; }
  .header-inner { gap: 16px; }
  .brand-name { font-size: 20px; }
  .menu-toggle { display: inline-flex; }
  .header-panel { position: absolute; top: 100%; left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 24px 20px; background: var(--white); box-shadow: 0 10px 20px rgba(0, 0, 0, .08); }
  .header-panel.is-open { display: flex; }
  .nav-list { flex-direction: column; }
  .nav-list > li > a { height: auto; min-height: 48px; padding: 0; border-bottom: 1px solid var(--line); }
  .nav-list > li > a::after { display: none; }
  .nav-list .sub-menu { position: static; display: block; padding: 0 0 8px 16px; box-shadow: none; }
  .header-search { margin-top: 16px; }
  .header-search .search-form { width: 100%; }
  .no-js .menu-toggle { display: none; }
  .no-js .header-inner { flex-wrap: wrap; }
  .no-js .header-panel { position: static; display: flex; width: 100%; padding: 0 0 16px; box-shadow: none; }
  .banner { height: max(240px, 46vw); }
  .banner-arrow { display: none; }
  .news-split { grid-template-columns: 1fr; gap: 28px; }
  .news-rows li:first-child a { padding-top: 20px; }
  .news-split.no-feature .news-rows { grid-template-columns: minmax(0, 1fr); }
  .news-split.no-feature .news-rows li:first-child a { padding-top: 0; }
  .news-split.no-feature .news-rows li:nth-child(2) a { padding-top: 20px; }
  .notice-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-split { grid-template-columns: 1fr; gap: 32px; }
  .link-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
  .post-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}

@media (max-width: 640px) {
  .admin-bar .site-header { top: 0; }
  .container { width: calc(100% - 32px); }
  .brand-logo { max-height: 42px; }
  .brand-name { font-size: 17px; letter-spacing: .02em; }
  .brand-en { font-size: 10px; }
  .menu-toggle { padding: 6px 10px; font-size: 13px; }
  .header-panel { padding-inline: 16px; }
  .banner-caption .pill { margin-top: 20px; }
  .banner-dots { bottom: 12px; }
  .home-portal { margin-top: 0; padding-block: 18px; }
  .portal-card { align-items: flex-start; flex-direction: column; gap: 10px; }
  .portal-title { font-size: 20px; }
  .portal-go { align-self: flex-start; padding-bottom: 0; }
  .home-section { padding-block: 44px; }
  .sec-head { margin-bottom: 24px; }
  .sec-title { font-size: 22px; }
  .sec-title::before { height: 20px; }
  .sec-en { font-size: 26px; }
  .news-feature-caption { padding: 14px 16px; }
  .news-feature-title { font-size: 16px; }
  .notice-cards { grid-template-columns: 1fr; gap: 12px; }
  .notice-cards a { min-height: 0; padding: 18px; }
  .link-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .link-grid a { height: 56px; font-size: 13px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px 16px; }
  .footer-contact { grid-column: 1 / -1; }
  .back-top { right: 12px; bottom: 16px; width: 44px; height: 44px; }
  .back-top span { display: none; }
  .inner-banner { height: 150px; }
  .inner-banner-title { font-size: 24px; }
  .inner-banner-en { font-size: 12px; }
  .subnav-inner { flex-direction: column; align-items: stretch; gap: 0; }
  .subnav-tabs { overflow-x: auto; margin-inline: -16px; }
  .subnav-tabs a { min-height: 48px; padding: 0 20px; font-size: 15px; }
  .breadcrumb { margin-left: 0; padding-block: 10px; border-top: 1px solid var(--line); font-size: 12px; }
  .inner-main { padding-block: 28px 48px; }
  .column-title { margin-bottom: 20px; font-size: 22px; }
  .column-title::before { height: 20px; }
  .post-grid { gap: 20px; }
  .post-item { padding-bottom: 20px; }
  .post-item.has-media { grid-template-columns: 116px minmax(0, 1fr); gap: 14px; }
  .post-thumb { aspect-ratio: 4 / 3; }
  .post-title { font-size: 15px; white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .post-excerpt { -webkit-line-clamp: 2; font-size: 13px; }
  .notice-row { grid-template-columns: 58px minmax(0, 1fr); gap: 16px; padding-block: 16px; }
  .date-tile { width: 58px; padding-right: 14px; }
  .date-day { font-size: 26px; }
  .date-ym { font-size: 11px; }
  .notice-row-title { font-size: 15px; white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .notice-row-more { display: none; }
  .search-summary .search-form { width: 100%; }
  .entry-header { margin-bottom: 24px; }
  .entry-title { font-size: 22px; }
  .entry-content { font-size: 16px; }
  .entry-content .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .entry-footer { flex-direction: column; align-items: stretch; }
  .entry-footer .pill { align-self: center; }
  .contact-row { grid-template-columns: 84px minmax(0, 1fr); gap: 12px; }
  .not-found { padding-block: 56px 72px; }
}

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