/* 全站版式收紧：保留阅读字号，用间距、细分隔和少量品牌色建立层次。 */
:root {
  --bg: #f6f7f9; --panel: #fff; --text: #303842; --muted: #697480;
  --line: #e6e9ed; --ink: #24313d; --blue: #356782;
  --brand: #bd4d0c; --brand-dark: #a4420b; --brand-soft: #fff4ec;
  --orange: #ec7b28; --paper: #f5f7f9; --radius: 8px;
}
.utility-bar { background: #fafbfc; border-bottom: 0; }
.utility-inner { min-height: 26px; }
.header-inner { padding-top: 12px; padding-bottom: 12px; gap: 22px; }
.logo img { width: 166px; height: 46px; }
.logo small { border-left: 0; padding-left: 0; font-size: 13px; }
.search { height: 38px; border-color: var(--line); border-radius: 7px; background: #f8f9fb; }
.search input { padding: 7px 10px; }
.search button { background: transparent; color: var(--brand-dark); border-left: 1px solid var(--line); padding: 0 15px; }
.nav { background: #fff; border-top: 1px solid #f0f2f4; border-bottom: 1px solid var(--line); }
.nav-inner>a, .nav-more>summary { color: #47515c; padding: 9px 8px; min-height: 43px; font-weight: 500; }
.nav-inner>a:hover, .nav-more>summary:hover { background: #fafbfc; color: var(--brand); }
.nav-inner>a.on, .nav-inner>a[aria-current=page], .nav-more>summary.on {
  background: transparent; color: var(--brand-dark); font-weight: 600; box-shadow: inset 0 -2px var(--orange);
}
.nav-menu { top: calc(100% + 1px); border-top: 1px solid var(--line); padding: 18px; border-radius: 0 0 8px 8px; }
.main { padding-top: 16px; padding-bottom: 26px; }
.crumbs { margin-bottom: 10px; font-size: 13px; }
.page-title { letter-spacing: -.3px; }
.panel, .portal-panel, .article-list, .card, .shop-list { border-color: var(--line); border-radius: 8px; }
.panel { padding: 16px; margin-bottom: 12px; }
.portal-panel, .home-services, .life-page .panel { border-top: 1px solid var(--line); }
.portal-head { padding: 10px 16px; min-height: 43px; background: transparent; }
.portal-head h2 { display: flex; align-items: center; gap: 8px; }
.portal-head h2::before { content: ''; display: inline-block; width: 3px; height: 14px; background: #6d8e9f; border-radius: 2px; }
.home-services .portal-head h2::before { background: var(--orange); }
.btn { min-height: 38px; padding: 7px 13px; border: 1px solid #dce1e6; border-radius: 6px; background: #fff; color: #46515d; }
.btn:hover { background: #f6f8fa; border-color: #b8c6d0; color: var(--ink); filter: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); filter: none; }
.chip { background: #fff; border-color: var(--line); padding: 5px 10px; }
.chip.on { color: var(--brand-dark); background: var(--brand-soft); border-color: #efd1bd; }
.actions { margin-top: 12px; gap: 8px; }
.layout { gap: 16px; }
.section-head { margin: 8px 0 10px; }
.article-row { padding: 14px 16px; gap: 14px; }
.article-row .excerpt { margin-top: 5px; }
.shop { padding: 13px 16px; }
.shop .thumb { width: 48px; height: 48px; background: #f5f7f9; border-radius: 6px; }
.shop .tel { color: var(--blue); }
.shop .thumb .ui-icon { width: 25px; height: 25px; color: #75909f; }
.card .cover-placeholder { flex-direction: column; gap: 8px; color: #8494a0; font-size: 13px; background: #f0f4f7; }
.card .cover-placeholder .ui-icon { width: 30px; height: 30px; }
.culture-head { padding: 16px 18px; border: 1px solid var(--line); }
.prose-wrap { padding: 24px; }
.culture-head h1, .article-title, .prose h2, .prose h3, .today-date, .topic span { font-family: inherit; }
.empty { padding: 24px 18px; }

/* 首页的服务和乡镇入口保持齐全，缩短纵向占用。 */
.home-welcome { margin-bottom: 12px; gap: 12px; }
.home-welcome h1 { font-size: 20px; }
.home-welcome>div { gap: 16px; }
.home-service-row, .home-content-row { gap: 14px; margin-bottom: 14px; }
.service-grid { padding: 4px 8px; }
.service-grid>a { padding: 10px 8px; gap: 9px; }
.service-grid .ui-icon { width: 22px; height: 22px; color: #567c91; }
.service-actions, .section-actions { padding: 8px 16px; background: transparent; }
.calendar-body { padding: 10px 16px; }
.today-date { font-size: 24px; }
.calendar-market { padding-top: 8px; margin-top: 8px; }
.home-town-panel { margin-bottom: 14px; }
.home-towns { padding: 8px 12px 10px; gap: 4px 10px; }
.home-towns a { background: transparent; border: 0; border-radius: 5px; min-height: 34px; padding: 5px 9px; }
.home-towns a:hover { background: #f5f7f9; }
.home-towns a>span { color: #acb6be; }
.story-feature { padding: 14px 16px; }
.story-feature.with-cover { grid-template-columns: 150px minmax(0,1fr); gap: 16px; }
.story-feature>img { width: 150px; height: 112px; border-radius: 6px; }
.story-feature p { margin-top: 6px; }
.home-story-list { padding: 0 16px 6px; }
.home-story-list>a { padding: 8px 0; border-top-style: solid; }
.home-topics { padding: 6px 16px 12px; }
.home-side-column { gap: 14px; }
.home-local-list { padding: 0 16px; }
.home-local-list a { padding: 10px 0; border-bottom-style: solid; }
.community-links { padding: 12px 16px; }
.community-links small { margin-bottom: 10px; }
.life-categories { gap: 5px 20px; padding: 12px 16px; }
.home-section-empty { padding: 14px 16px; }
.home-business, .home-extra { margin-bottom: 14px; }
.home-contribute { padding: 16px 18px; background: #fff; border-color: var(--line); }
.footer { padding: 22px 0 16px; background: #f0f2f5; }
.footer-top { gap: 24px; margin-bottom: 18px; }
.footer-towns { padding: 11px 0; }

/* 内页标题不再套一层大卡片；筛选和结果之间留出清楚但适量的间距。 */
.directory-heading { padding: 0 0 12px; margin-bottom: 12px; gap: 16px; background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.directory-heading p { margin-top: 3px; font-size: 14px; }
.directory-page .directory-filter { padding: 12px 14px; gap: 12px; margin-bottom: 12px; border-radius: 8px; }
.directory-page .directory-filter>label { gap: 5px; }
.directory-page .directory-filter input, .directory-page .directory-filter select { min-height: 38px; padding: 6px 10px; border-color: #d5dce3; border-radius: 6px; }
.filter-actions { gap: 8px; }
.filter-actions .btn { min-height: 38px; }
.directory-result { margin: 10px 0; font-size: 13px; }
.directory-section, .town-services { margin-bottom: 14px; }
.directory-body { padding: 14px 16px; }
.directory-help { padding: 12px 14px; margin-top: 14px; background: #f0f4f7; border: 1px solid #e1e8ed; border-radius: 6px; }
.directory-help>p { margin-bottom: 6px; }
.directory-help .actions { margin-top: 8px; }
.directory-empty { padding: 22px 18px; }
.directory-empty p { margin: 7px 0 12px; }
.directory-empty .actions { margin-top: 10px; }
.service-nav { margin-bottom: 12px; border-radius: 6px; }
.service-nav a { min-height: 40px; padding: 8px; }
.service-nav a.on { background: #fafbfc; color: var(--brand-dark); box-shadow: inset 0 -2px var(--orange); }
.town-directory-grid { grid-template-columns: repeat(5,minmax(0,1fr)); gap: 10px; }
.town-directory-item { padding: 14px 16px; min-height: 80px; gap: 10px; border-top: 1px solid var(--line); border-radius: 8px; }
.town-directory-item p { margin-top: 4px; font-size: 13px; }
.town-directory-item>img { width: 36px; height: 36px; }
.town-directory-item:hover, .village-directory-card:hover { background: #fafcfd; border-color: #b7cbd7; }
.town-service-grid { padding: 4px 8px; }
.town-service-grid a { padding: 10px; }
.town-life-links { padding: 10px 16px; gap: 8px 20px; }
.town-village-links { padding: 8px 14px; gap: 2px 12px; }
.town-village-links a { min-height: 36px; padding: 6px 4px; }
.directory-town-picker { padding: 8px 12px; border-radius: 6px; }
.directory-town-picker summary { min-height: 26px; }
.directory-page .village-town-section { margin: 14px 0; }
.village-results { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.directory-page .village-directory-card { display: grid; grid-template-columns: minmax(0,1fr) auto; align-content: start; align-items: center; gap: 6px 10px; padding: 14px; margin: 0; border-top: 1px solid var(--line); }
.village-directory-card h3 { min-width: 0; overflow-wrap: anywhere; }
.directory-page .village-directory-card p { grid-column: 1 / -1; margin: 0; }
.directory-card-link { grid-column: 2; grid-row: 1; padding: 0; margin: 0; font-size: 12px; white-space: nowrap; }
.directory-page .directory-detail { padding: 22px 26px; border-top: 1px solid var(--line); }
.directory-detail-heading { padding-bottom: 12px; margin-bottom: 16px; }
.directory-detail section { margin: 20px 0; }
.phone-directory-grid { gap: 14px; }
.phone-group-body { padding: 0 16px; }
.phone-entry { padding: 12px 0; gap: 12px; }
.emergency-phones { margin-bottom: 12px; gap: 10px; }
.emergency-phones a { background: white; border-color: var(--line); padding: 9px 12px; color: var(--ink); gap: 12px; }
.emergency-phones strong { color: var(--brand-dark); }
.phone-group-links { gap: 6px; }
.phone-group-links a { min-height: 36px; padding: 6px 11px; border-radius: 6px; }
.market-results .market-card, .directory-page .travel-card, .directory-page .resource-card { border-top: 1px solid var(--line); }
.directory-page .market-query-date { padding: 11px 14px; background: #f1f5f8; }
.life-category-filter { padding: 9px 12px; gap: 14px; border-radius: 8px; }
.life-category-filter>strong { padding: 6px 0; font-size: 13px; }
.life-category-filter>div { gap: 2px 4px; }
.life-category-filter a { min-height: 34px; padding: 6px 10px; }
.life-category-filter .on { box-shadow: none; }
.life-page .facts { gap: 10px 12px; margin: 14px 0; }

/* 表单保留说明和触控面积，减少段落之间重复的空隙。 */
.life-page .life-form { padding: 22px 26px; }
.life-form>.page-title { margin-bottom: 8px; }
.life-form>p { margin-top: 8px; margin-bottom: 12px; }
.life-form .form { gap: 18px; }
.life-steps { margin: 12px 0 16px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
.life-steps li { padding: 8px 4px 12px; font-size: 13px; text-align: left; }
.life-steps li+li { border-left: 0; }
.life-steps li::before { display: inline-grid; place-items: center; content: counter(life-step); width: 20px; height: 20px; margin-right: 6px; border-radius: 50%; background: #eef2f5; color: #627784; font-size: 12px; }
.life-steps li:first-child::before { background: var(--brand-soft); color: var(--brand-dark); }
.life-fields { gap: 12px; padding-top: 12px; }
.life-form .form label { gap: 5px; font-size: 14px; }
.life-field-row { gap: 12px; }
.life-form .form input, .life-form .form select, .life-form .form textarea { min-height: 40px; padding: 7px 10px; border-color: #d5dce3; border-radius: 6px; }
.life-form>.field-help { margin-bottom: 18px; }
.life-private { padding: 14px; background: #f8fafb; border-color: var(--line); }
.life-submit { padding-top: 14px; }
.life-submit>p { margin-bottom: 12px; }
.life-form .form .consent { margin-bottom: 14px; }
.life-form .form .consent input { padding: 0; min-height: 18px; }
.life-receipt { padding: 18px; margin-top: 18px; }
.life-form form[action='/join'] .life-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
.life-form form[action='/join'] .life-fields>.field-help, .life-form form[action='/join'] label:has(textarea) { grid-column: 1 / -1; }
@media(max-width:1000px) {
  .town-directory-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .village-results { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media(max-width:800px) {
  .header-inner { gap: 14px; }
  .story-feature.with-cover { display: block; }
  .story-feature>img { width: 100%; height: 150px; }
  .life-page .life-form { padding: 18px; }
}
@media(max-width:600px) {
  .wrap { padding-left: 14px; padding-right: 14px; }
  .utility-inner { min-height: 24px; }
  .header-inner { padding-top: 9px; padding-bottom: 10px; gap: 9px 12px; }
  .logo img { width: 145px; height: 40px; }
  .header-progress { font-size: 12px; }
  .search { height: 40px; }
  .nav-inner>a, .nav-more>summary { min-height: 42px; padding: 9px 4px; }
  .nav-inner>a:nth-child(-n+4) { border-bottom: 1px solid #f0f2f4; }
  .nav-menu { left: 14px; right: 14px; padding: 16px; }
  .main { padding-top: 12px; }
  .panel { padding: 14px; }
  .btn, .filter-actions .btn { min-height: 42px; padding: 8px 12px; }
  .home-welcome { margin-bottom: 10px; }
  .home-welcome h1 { font-size: 19px; }
  .home-welcome p { margin-top: 2px; font-size: 13px; }
  .home-service-row, .home-content-row { gap: 10px; margin-bottom: 10px; }
  .portal-head { padding: 9px 12px; min-height: 40px; }
  .service-grid { grid-template-columns: repeat(4,minmax(0,1fr)); padding: 5px; }
  .service-grid>a { flex-direction: column; text-align: center; min-height: 70px; padding: 10px 3px; gap: 7px; }
  .service-grid strong { font-size: 14px; font-weight: 500; }
  .service-grid small { display: none; }
  .service-grid .ui-icon { width: 20px; height: 20px; }
  .service-actions, .section-actions { padding: 8px 12px; gap: 8px 16px; }
  .service-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 12px; padding-top: 3px; padding-bottom: 3px; }
  .service-actions a { min-height: 38px; display: flex; align-items: center; }
  .calendar-body { padding: 10px 12px; }
  .today-date { font-size: 21px; }
  .calendar-market { margin: 0; padding: 8px 0; }
  .home-towns { padding: 4px 8px; gap: 0 6px; }
  .home-towns a { min-height: 42px; padding: 8px 7px; font-size: 14px; }
  .home-town-panel { margin-bottom: 10px; }
  .story-feature, .home-section-empty, .community-links { padding: 12px; }
  .home-story-list { padding: 0 12px 6px; }
  .home-story-list>a { min-height: 42px; padding: 8px 0; }
  .home-contribute { padding: 14px; }
  .directory-heading { padding: 0 0 10px; margin-bottom: 10px; gap: 10px; }
  .directory-heading p { font-size: 13px; }
  .directory-heading .page-title { font-size: 21px; }
  .directory-page .directory-filter { padding: 12px; gap: 10px; }
  .directory-page .directory-filter input, .directory-page .directory-filter select { min-height: 42px; padding: 7px 9px; }
  .directory-page .directory-filter>label:not(.filter-keyword) { flex-basis: calc(50% - 10px); }
  .directory-page .directory-filter>.filter-keyword { flex-basis: 100%; }
  .filter-actions { width: 100%; }
  .directory-page .market-filters>label:first-of-type { flex-basis: 100%; }
  .town-directory-grid, .village-results { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .town-directory-item { min-height: 78px; padding: 12px; gap: 6px; }
  .town-directory-item h2 { font-size: 17px; }
  .town-service-grid { padding: 3px; }
  .town-service-grid a { padding: 9px; }
  .town-village-links { padding: 6px 10px; }
  .town-village-links a { min-height: 42px; }
  .directory-page .village-directory-card { display: flex; padding: 12px; gap: 5px; align-items: flex-start; }
  .directory-card-link { padding-top: 0; }
  .directory-body { padding: 12px; }
  .directory-page .directory-detail { padding: 18px 16px; }
  .directory-empty { padding: 20px 14px; }
  .phone-group-body { padding: 0 12px; }
  .phone-entry { padding: 10px 0; }
  .phone-group-links a { min-height: 40px; padding: 7px 10px; }
  .emergency-phones a { padding: 8px 5px; gap: 0; }
  .service-nav a { min-height: 42px; }
  .life-category-filter { padding: 9px 10px; }
  .life-category-filter>strong { padding-bottom: 5px; }
  .life-category-filter a { min-height: 40px; padding: 8px 9px; }
  .life-page .life-form { padding: 16px; }
  .life-form .form input, .life-form .form select, .life-form .form textarea { min-height: 44px; }
  .life-form .form .consent input { min-height: 18px; }
  .life-form form[action='/join'] .life-fields { grid-template-columns: 1fr; }
  .life-steps li { font-size: 13px; text-align: center; }
  .life-steps li::before { display: grid; margin: 0 auto 4px; }
  .life-private { padding: 12px; }
  .article-row { padding: 12px; }
  .shop { padding: 12px; }
  .prose-wrap { padding: 18px; }
}
@media(max-width:359px) {
  .wrap { padding-left: 12px; padding-right: 12px; }
  .logo img { width: 135px; }
  .service-grid strong { font-size: 13px; }
  .life-page .life-form { padding: 14px; }
}

/* 小屏阅读与触控：长网址换行，操作区完整可点，展开菜单独立滚动。 */
.search-result{min-width:0;overflow-wrap:anywhere}.search-result img{max-width:100%}
@media(max-width:600px){
  .search-directory-section>.grid{grid-template-columns:minmax(0,1fr);gap:10px}
  .search-result{margin-bottom:0}.search-directory-section .section-head{flex-wrap:wrap;gap:6px 12px}
  .search-directory-section .section-head>a{min-height:42px;display:inline-flex;align-items:center}
  .nav-menu{max-height:calc(100dvh - 230px);min-height:180px;overflow-y:auto;overscroll-behavior:contain;padding:12px;gap:14px;grid-template-columns:repeat(2,minmax(0,1fr))}
  .nav-menu>div:nth-child(3){grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 12px}
  .nav-menu>div:nth-child(3)>strong{grid-column:1/-1}
  .nav-menu a{min-height:44px;display:flex;align-items:center;line-height:1.5;padding:8px 0}
  .nav-menu-bottom{gap:4px 14px}.nav-menu-bottom a{padding:8px 0}
  .filters.photo-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 8px;align-items:end}
  .photo-filters>label{min-width:0;display:flex;flex-direction:column;gap:5px}
  .photo-filters>label:last-of-type{grid-column:1/-1}
  .photo-filters select{width:100%;min-width:0;max-width:none;font-size:16px;min-height:44px}
  .photo-filters>.btn{width:100%;min-height:44px}
  .directory-page .directory-filter input,.directory-page .directory-filter select,.filter-actions .btn{min-height:44px}
  .filter-actions{display:flex;flex-wrap:wrap;gap:8px}.filter-actions .btn{flex:1 1 100px;white-space:normal;text-align:center}
  .actions,.participate-tabs{flex-wrap:wrap;gap:8px}.actions .btn,.participate-tabs .btn{min-height:44px;white-space:normal;text-align:center}
  .section-head{flex-wrap:wrap;gap:8px 12px}.section-head>.btn{min-height:44px}
  .pagination{gap:7px}.pagination li a,.pagination li span{display:flex;justify-content:center;align-items:center;min-width:42px;min-height:44px;padding:8px 10px}
  .phone-entry,.shop{min-width:0}.phone-entry a[href^="tel:"],.shop a[href^="tel:"]{display:inline-flex;align-items:center;min-height:44px;overflow-wrap:anywhere}
  .photo-viewer{width:100%;max-width:100%;max-height:100dvh;border-radius:0;overscroll-behavior:contain}
  .viewer-toolbar{position:sticky;top:0;z-index:2;background:#201d1a;padding:8px 12px;padding-top:max(8px,env(safe-area-inset-top))}
  .photo-viewer button{min-width:44px;min-height:44px}.viewer-stage{grid-template-columns:44px minmax(0,1fr) 44px;gap:4px;padding:0 4px}
  .viewer-stage img{height:48dvh}.viewer-caption{padding:10px 14px max(18px,env(safe-area-inset-bottom));overflow-wrap:anywhere}.viewer-caption .actions{gap:8px}
}
@media(max-width:359px){.filters.photo-filters{grid-template-columns:minmax(0,1fr)}}

/* 旧图形配简洁字标：文字独立排版，清晰适配不同屏幕。 */
.logo{gap:20px}
.brand-mark{display:flex;align-items:center;gap:8px;flex-shrink:0}
.logo .brand-symbol{display:block;width:48px;height:48px;max-width:none;aspect-ratio:1;object-fit:contain;filter:none;flex-shrink:0}
.brand-wordmark{display:flex;flex-direction:column;gap:4px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif}
.brand-name{display:block;font-size:26px;font-weight:700;line-height:1.12;letter-spacing:.6px;color:#303030;white-space:nowrap}
.brand-name>span{color:inherit}
.brand-domain{display:block;font-size:10px;font-weight:500;line-height:1.2;letter-spacing:1.6px;color:#808080}
.logo small{font-size:12px;color:#808080}
@media(max-width:600px){
  .logo{min-width:0}.header-inner{column-gap:9px}
  .brand-mark{gap:6px}.logo .brand-symbol{width:40px;height:40px}
  .brand-name{font-size:23px;letter-spacing:.4px}.brand-wordmark{gap:3px}
  .brand-domain{font-size:9px;letter-spacing:1.4px}
}
@media(max-width:359px){.logo .brand-symbol{width:36px;height:36px}.brand-name{font-size:21px;letter-spacing:0}}
