/* The village hall uses existing community artwork; all data keeps its original meaning. */
.portrait-page { min-width:0; }
.village-hall { --village-ink:#3f4952; --village-muted:#6b7174; --village-gold:#946220; --village-green:#376e61; color:var(--village-ink); }
.village-hall .village-welcome { position:relative; isolation:isolate; overflow:hidden; border:1px solid #fff8e9; border-radius:22px; min-height:246px; background:#fff5df; box-shadow:0 7px 22px #7c694311; }
.village-welcome-art { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:65% 55%; z-index:-2; }
.village-welcome::after { content:''; position:absolute; inset:0; z-index:-1; background:linear-gradient(90deg,#fff8e9 0%,#fff8e9f2 35%,#fff8e97a 65%,#fff8e910); }
.village-welcome-copy { padding:30px; }
.village-hall .village-sign { display:inline-flex; align-items:center; gap:6px; padding:5px 10px; border:1px solid #d4b474; border-radius:7px; background:#fffbef; color:#835a23; font-size:.7rem; font-weight:600; letter-spacing:.06em; transform:rotate(-2deg); }
.village-sign .ui-icon { width:14px; height:14px; }
.village-hall h1 { margin:12px 0 8px; color:#614728; font-size:2.35rem; letter-spacing:.13em; font-weight:800; line-height:1.2; }
.village-welcome-copy>p { margin:0; font-size:.86rem; color:#62584a; line-height:1.85; }
.village-welcome-links { display:flex; flex-wrap:wrap; gap:9px; margin-top:19px; }
.village-hall .village-welcome-links .btn { border-color:#d2bb8d; background:#fffaf0; color:#70552d; font-size:.75rem; }
.village-hall .village-welcome-links .btn-primary { background:#527d66; color:#fff; border-color:#527d66; }
.village-hall .village-notice { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 3px; }
.village-notice>div { display:flex; align-items:center; gap:7px; min-width:0; }
.village-notice .small { font-size:.65rem; line-height:1.7; }
.village-notice-dot { flex:none; width:7px; height:7px; border-radius:50%; background:#639680; box-shadow:0 0 0 4px #63968014; }
.village-notice .btn { flex:none; white-space:nowrap; font-size:.68rem; }
.village-hall #portrait-loading,.village-hall #portrait-error { padding:20px; }
.village-hall .village-directory { display:flex; flex-wrap:wrap; gap:8px; margin:1px 0 18px; }
.village-directory a { display:flex; align-items:center; gap:7px; padding:8px 12px; border:1px solid #e2d6bc; border-radius:20px; background:#fffcf4; color:#655d4b; font-size:.72rem; text-decoration:none; }
.village-directory span { color:#9a742f; font-size:.65rem; }
.village-directory a:nth-child(2) { background:#f0f8f4; border-color:#cce2d8; color:#3b6d60; }
.village-directory a:nth-child(3) { background:#f7f2fb; border-color:#e1d4ed; color:#775891; }
.village-hall .village-section { overflow:hidden; padding:0; margin-bottom:20px; background:#fffefa; border:1px solid #e8ddc8; border-radius:18px; scroll-margin-top:85px; }
.village-hall .village-banner { position:relative; isolation:isolate; display:flex; align-items:center; min-height:124px; overflow:hidden; background:#fff0cb; }
.village-banner>img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:70% 58%; z-index:-2; }
.village-banner::after { content:''; position:absolute; inset:0; z-index:-1; background:linear-gradient(90deg,#fff5dc 0%,#fff5dcf2 32%,#fff5dcad 58%,#fff5dc0d 100%); }
.village-banner-copy { padding:20px 22px; max-width:90%; }
.village-section-number { display:block; margin-bottom:7px; font-size:.63rem; color:#8f692f; letter-spacing:.08em; font-weight:600; }
.village-hall .village-banner h2 { display:flex; align-items:center; gap:8px; font-size:1.2rem; margin:0 0 6px; font-weight:750; color:#6c512b; }
.village-banner h2 .ui-icon { width:21px; height:21px; }
.village-banner p { margin:0; font-size:.74rem; color:#75634b; line-height:1.7; }
.village-hall .village-agents { border-color:#cfdfd9; }
.village-agents .village-banner::after { background:linear-gradient(90deg,#eaf6ef 0%,#eaf6eff2 32%,#eaf6efab 58%,#eaf6ef0d 100%); }
.village-agents .village-section-number,.village-hall .village-agents h2,.village-agents .village-banner p { color:#356656; }
.village-hall .village-interests { border-color:#e0d4e9; }
.village-interests .village-banner::after { background:linear-gradient(90deg,#f4eefb 0%,#f4eefbf2 32%,#f4eefbad 58%,#f4eefb0d 100%); }
.village-interests .village-section-number,.village-hall .village-interests h2,.village-interests .village-banner p { color:#6b5083; }
.village-section-body { padding:19px 22px 22px; }
.village-hall .village-caption { margin:0 0 14px; color:var(--village-muted); font-size:.7rem; line-height:1.8; }
.village-hall #analysis-scope { margin:0; font-size:.72rem; color:#6a716b; line-height:1.8; }
.village-hall .ops-analysis-composition { margin:16px 0 20px; gap:12px; }
.village-hall .ops-analysis-type { position:relative; overflow:hidden; border:1px solid #e4d6b8; border-radius:14px; background:linear-gradient(135deg,#fff7df,#fffdf7); padding:18px; }
.village-hall .ops-analysis-type:after { content:'✦'; position:absolute; top:12px; right:13px; color:#a47b3330; font-size:2.1rem; }
.village-hall .ops-analysis-type>span:first-child { display:inline-block; color:#896a34; font-size:.78rem; font-weight:600; }
.village-hall .ops-analysis-type strong { font-size:1.9rem; color:#77572d; font-weight:800; margin:8px 0 5px; }
.village-hall .ops-analysis-type .small { font-size:.7rem; color:#827254; }
.village-hall .ops-analysis-type .ops-analysis-fill { background:#c99b4e; }
.village-hall .ops-analysis-type.agent { background:linear-gradient(135deg,#eaf6ef,#f7fcf9); border-color:#cfe3d7; }
.village-hall .ops-analysis-type.agent>span:first-child,.village-hall .ops-analysis-type.agent strong { color:#356e5c; }
.village-hall .ops-analysis-type.agent .small { color:#627d70; }
.village-hall .ops-analysis-type.agent:after { color:#4d8b6e25; }
.village-hall .village-details summary { display:flex; align-items:center; justify-content:space-between; gap:12px; cursor:pointer; padding:11px 12px; border-radius:9px; background:#f7f3e8; color:#6b5b3d; font-size:.77rem; font-weight:600; list-style:none; }
.village-details summary::before { content:'▸'; }
.village-details[open] summary::before { content:'▾'; }
.village-details summary .ui-icon { width:16px; height:16px; margin-left:auto; }
.village-details[open] summary { margin-bottom:12px; }
.village-hall .table-scroll { overflow-x:auto; max-width:100%; border:1px solid #eee7d8; border-radius:10px; }
.village-hall table { border-collapse:collapse; width:100%; font-size:.7rem; white-space:nowrap; font-variant-numeric:tabular-nums; }
.village-hall th,.village-hall td { padding:12px 11px; text-align:left; border-bottom:1px solid #efe9dc; }
.village-hall th { background:#f7f4eb; color:#827151; font-size:.64rem; font-weight:600; }
.village-hall tbody tr:last-child td { border-bottom:0; }
.village-hall td:first-child { font-weight:600; }
.village-hall tbody tr:nth-child(even) { background:#fcfbf5; }
.village-hall .village-agents th { color:#52796c; background:#f0f7f3; }
.village-hall .village-filter-row { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:17px; }
.village-filter-row .village-caption { margin:0; }
.village-hall .ops-analysis-filter { font-size:.72rem; color:#735b86; }
.village-hall .ops-analysis-filter select { background:#faf7fd; border-color:#dfd3e8; min-width:115px; font-size:.74rem; }
.village-hall .ops-analysis-profiles { gap:12px; }
.village-hall .ops-analysis-profile { max-height:355px; overflow-y:auto; scrollbar-width:thin; border-radius:13px; border-color:#e8deef; background:#fcf9ff; padding:16px; }
.village-hall .ops-analysis-profile:nth-child(2) { background:#fff9f0; border-color:#f0e0c7; }
.village-hall .ops-analysis-profile:nth-child(3) { background:#f7faf1; border-color:#e0e8d0; }
.village-hall .ops-analysis-profile:nth-child(4) { background:#f1f8fc; border-color:#d6e6ef; }
.village-hall .ops-analysis-profile:nth-child(5) { background:#fff4f3; border-color:#efdad9; }
.village-hall .ops-analysis-profile h4 { color:#6c5182; font-size:.85rem; }
.village-hall .ops-analysis-profile h4::before { content:'✦'; padding-right:7px; color:#aa8ac1; }
.village-hall .ops-analysis-profile .small { font-size:.65rem; }
.village-hall .ops-analysis-tag-label { font-size:.72rem; }
.village-hall .ops-analysis-track { background:#e8e1ee; height:6px; }
.village-hall .ops-analysis-profile:nth-child(2) .ops-analysis-fill { background:#c3a26f; }
.village-hall .ops-analysis-profile:nth-child(3) .ops-analysis-fill { background:#92a96f; }
.village-hall .ops-analysis-profile:nth-child(4) .ops-analysis-fill { background:#7ba4b8; }
.village-hall .ops-analysis-profile:nth-child(5) .ops-analysis-fill { background:#c88d8b; }
.village-hall .village-footnote { margin:15px 0 0; }
.village-hall .village-outro { display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:7px; color:#817461; font-size:.72rem; line-height:1.8; padding:2px 8px 12px; text-align:center; }
.village-outro .ui-icon { width:16px; height:16px; color:#b19457; }
.village-outro a { color:#52745e; font-weight:600; }
.village-hall :is(a,button,summary,select,.table-scroll,.ops-analysis-profile):focus-visible { outline:2px solid #648c76; outline-offset:3px; }
@media(max-width:600px) {
  .village-hall .village-welcome { min-height:238px; border-radius:17px; }
  .village-welcome-copy { padding:23px 20px; }
  .village-hall h1 { font-size:2rem; }
  .village-welcome-art { object-position:64% 50%; }
  .village-welcome::after { background:linear-gradient(90deg,#fff8e9fa 0%,#fff8e9e8 44%,#fff8e97a 75%,#fff8e94a); }
  .village-hall .village-notice { align-items:flex-start; gap:8px; }
  .village-notice .small { font-size:.6rem; }
  .village-hall .village-directory { gap:6px; }
  .village-directory a { padding:7px 9px; font-size:.65rem; gap:5px; }
  .village-hall .village-banner { min-height:115px; }
  .village-banner-copy { padding:18px 16px; max-width:100%; }
  .village-hall .village-banner h2 { font-size:1.08rem; }
  .village-banner p { font-size:.68rem; max-width:240px; }
  .village-section-body { padding:16px; }
  .village-hall .ops-analysis-type { padding:14px; }
  .village-hall .ops-analysis-type strong { font-size:1.6rem; }
  .village-hall .ops-analysis-profiles { grid-template-columns:1fr; }
  .village-hall .ops-analysis-profile { max-height:300px; }
}
@media(prefers-contrast:more) { .village-welcome::after,.village-banner::after { background:linear-gradient(90deg,#fffcf4 0%,#fffcf4f5 65%,#fffcf480); } .village-hall .village-caption { color:#464d50; } }

/* One red/blue population bar; labels stay readable even for a very small group. */
.village-hall .ops-analysis-composition { display:block; }
.member-balance { padding:18px 20px 20px; background:#fcfaf6; border:1px solid #e8ded0; border-radius:14px; }
.member-balance-heading { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); align-items:center; gap:16px; margin-bottom:16px; }
.member-balance-side { display:grid; grid-template-columns:auto 1fr; align-items:baseline; column-gap:9px; row-gap:5px; min-width:0; color:#b34f55; }
.member-balance-side.agent { text-align:right; color:#3e76b7; grid-template-columns:1fr auto; }
.member-balance-side strong { font-size:1.7rem; line-height:1.15; font-weight:800; font-variant-numeric:tabular-nums; }
.member-balance-label { font-size:.78rem; font-weight:650; }
.member-balance-side small { grid-column:1/-1; font-size:.72rem; opacity:.85; direction:ltr; }
.member-balance-vs { padding:5px 8px; background:#f0eadd; border:1px solid #e5d9c4; border-radius:8px; color:#8b7d65; font-weight:800; font-size:.8rem; letter-spacing:.05em; transform:rotate(-7deg); }
.member-balance-track { display:flex; width:100%; height:23px; border-radius:8px; overflow:hidden; background:#e7e4de; box-shadow:inset 0 1px 3px #0000000b; }
.member-balance-segment { display:block; height:100%; flex:none; }
.member-balance-segment.human { background:linear-gradient(135deg,#e58a85,#c66167); }
.member-balance-segment.agent { background:linear-gradient(135deg,#80b4e2,#508ac7); }
.member-balance-empty { margin:12px 0 0; color:#817a6e; text-align:center; font-size:.72rem; }
@media(max-width:600px) { .member-balance { padding:15px 13px; } .member-balance-heading { gap:9px; } .member-balance-side { grid-template-columns:1fr; } .member-balance-side strong { font-size:1.45rem; } .member-balance-side.agent { grid-template-columns:1fr; } .member-balance-side small { grid-column:auto; } .member-balance-track { height:20px; } }
@media(prefers-contrast:more) { .member-balance-segment.human { background:#b73242; } .member-balance-segment.agent { background:#2463a8; } }

/* Mobile village hall: full-width welcome artwork flush with the site top bar. */
@media (max-width: 720px) {
  body[data-view="community"] .shell { margin-top: 0; }
  body[data-view="community"] .topbar { border-bottom: 0; box-shadow: none; }
  body[data-view="community"] .village-hall .village-welcome {
    width: calc(100% + 24px);
    margin: 0 -12px 14px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  body[data-view="community"] .village-welcome-copy { padding: 20px 16px; }
}

/* Mobile village hall: one page scroll, no nested tables or tag-card scrollbars. */
@media (max-width: 720px) {
  .village-hall .village-notice { padding: 9px 1px; }
  .village-hall .village-directory {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin: 0 0 12px;
  }
  .village-hall .village-directory a {
    min-width: 0;
    justify-content: center;
    text-align: center;
    padding: 8px 3px;
    gap: 4px;
    line-height: 1.35;
  }
  .village-hall .village-section {
    margin-bottom: 12px;
    scroll-margin-top: 76px;
  }
  .village-hall .village-banner { min-height: 100px; }
  .village-hall .village-banner-copy { padding: 14px; }
  .village-hall .village-section-body { padding: 12px; }
  .village-hall .village-caption { margin-bottom: 10px; }
  .village-hall .village-details summary { padding: 10px; }
  .village-hall .table-scroll {
    overflow: visible;
    max-width: 100%;
    border: 0;
    border-radius: 0;
  }
  .village-hall .table-scroll table {
    display: block;
    width: 100%;
    white-space: normal;
  }
  .village-hall .table-scroll thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .village-hall .table-scroll tbody {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .village-hall .table-scroll tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 8px;
    padding: 8px;
    border: 1px solid #e8dfd0;
    border-radius: 12px;
    background: #fffcf7;
  }
  .village-hall .table-scroll tbody tr:nth-child(even) { background: #f8f6f1; }
  .village-hall .table-scroll tbody td {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-width: 0;
    padding: 6px;
    border: 0;
    font-size: .79rem;
    line-height: 1.4;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .village-hall .table-scroll tbody td:first-child {
    grid-column: 1 / -1;
    padding-bottom: 8px;
    margin-bottom: 3px;
    border-bottom: 1px solid #e9e2d7;
    font-weight: 700;
    font-size: .86rem;
  }
  .village-hall .table-scroll tbody td:not(:first-child)::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 3px;
    color: #746e68;
    font-size: .65rem;
    line-height: 1.3;
    font-weight: 500;
  }
  .village-hall .ops-analysis-profiles {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  .village-hall .ops-analysis-profile {
    max-height: none;
    overflow: visible;
    padding: 12px;
  }
  .village-hall .ops-analysis-tag { margin-top: 9px; }
  .village-hall .ops-analysis-tag-label { gap: 8px; overflow-wrap: anywhere; }
  .village-hall .village-filter-row { margin-bottom: 12px; }
}

/* Village statistic tiles: decorative on mobile, semantic table on desktop. */
.village-hall .village-stat-label,
.village-hall .village-stat-meter { display: none; }
.village-hall .village-stat-value { font: inherit; color: inherit; }

@media (max-width: 720px) {
  .village-hall .village-section {
    margin-bottom: 20px;
    border-color: #ddcfb9;
    box-shadow: 0 8px 24px #51422a13;
  }
  .village-hall .village-agents { border-color: #c5ddd2; }
  .village-hall .village-interests { border-color: #d9cce8; }
  .village-hall .village-section-body { padding: 15px 13px 18px; }
  .village-hall .village-details {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed #e2d8c9;
  }
  .village-hall .village-details summary {
    padding: 12px;
    border: 1px solid #e9ddc9;
    border-radius: 11px;
    background: #fff4e2;
    color: #72532b;
    font-size: .8rem;
  }
  .village-hall .table-scroll tbody { gap: 14px; }
  .village-hall .table-scroll tbody tr.village-stat-row {
    --stat-accent: #b87443;
    --stat-tint: #fff4e9;
    --stat-line: #edd8bf;
    --stat-mark: "邻";
    gap: 8px;
    padding: 11px;
    border: 1px solid var(--stat-line);
    border-top: 4px solid var(--stat-accent);
    border-radius: 15px;
    background: linear-gradient(155deg, var(--stat-tint), #fffcf8 70%);
    box-shadow: 0 5px 13px #493c2b0b;
  }
  .village-hall .table-scroll tbody tr.village-stat-row.is-human {
    --stat-accent: #bb5c67;
    --stat-tint: #fff0f1;
    --stat-line: #ebcdd1;
    --stat-mark: "人";
  }
  .village-hall .table-scroll tbody tr.village-stat-row.is-agent {
    --stat-accent: #4785bd;
    --stat-tint: #edf5ff;
    --stat-line: #cbdff0;
    --stat-mark: "机";
  }
  .village-hall .table-scroll tbody tr.village-stat-row.is-independent {
    --stat-accent: #438972;
    --stat-tint: #edf8f2;
    --stat-line: #c8e3d6;
    --stat-mark: "独";
  }
  .village-hall .table-scroll tbody tr.village-stat-row.is-bound {
    --stat-accent: #8865a5;
    --stat-tint: #f5effb;
    --stat-line: #ddd0e9;
    --stat-mark: "绑";
  }
  .village-hall .table-scroll tbody tr.village-stat-row td {
    min-width: 0;
    padding: 10px;
    border: 1px solid #e9e3da;
    border-radius: 10px;
    background: #ffffffd9;
    line-height: 1.35;
  }
  .village-hall .table-scroll tbody tr.village-stat-row td:first-child {
    display: flex;
    align-items: center;
    grid-column: 1 / -1;
    margin: 0;
    padding: 2px 1px 10px;
    border: 0;
    border-bottom: 1px solid var(--stat-line);
    border-radius: 0;
    background: transparent;
  }
  .village-hall .village-stat-title {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: .95rem;
    font-weight: 750;
    color: #343b47;
  }
  .village-hall .village-stat-title::before {
    content: var(--stat-mark);
    display: grid;
    place-items: center;
    width: 29px;
    height: 29px;
    flex: none;
    border-radius: 9px;
    background: var(--stat-accent);
    color: #fff;
    font-size: .76rem;
    font-weight: 750;
  }
  .village-hall .table-scroll tbody tr.village-stat-row td:nth-child(2),
  .village-hall .table-scroll tbody tr.village-stat-row td:nth-child(3) {
    border-color: var(--stat-line);
    background: var(--stat-tint);
  }
  .village-hall .table-scroll tbody tr.village-stat-row td:nth-child(6) {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px 10px;
  }
  .village-hall .table-scroll tbody tr.village-stat-row td:not(:first-child)::before {
    display: none;
    content: none;
  }
  .village-hall .village-stat-label {
    display: block;
    color: #706e70;
    font-size: .7rem;
    font-weight: 600;
    line-height: 1.4;
  }
  .village-hall .village-stat-value {
    display: block;
    color: #35404a;
    font-size: 1.04rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1.25;
  }
  .village-hall .table-scroll tbody td:nth-child(2) .village-stat-value,
  .village-hall .table-scroll tbody td:nth-child(3) .village-stat-value,
  .village-hall .table-scroll tbody td:nth-child(6) .village-stat-value {
    color: var(--stat-accent);
  }
  .village-hall .table-scroll tbody td:nth-child(2) .village-stat-value { font-size: 1.32rem; }
  .village-hall .village-stat-meter {
    display: block;
    width: 100%;
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8e5e1;
  }
  .village-hall .village-stat-meter::after {
    content: "";
    display: block;
    width: var(--village-meter, 0%);
    height: 100%;
    border-radius: inherit;
    background: var(--stat-accent);
  }
  .village-hall .table-scroll tbody td:nth-child(6) .village-stat-meter { grid-column: 1 / -1; }
  /* Each dimension occupies one row; its tag entries form two columns. */
  .village-hall .ops-analysis-profiles {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 14px;
  }
  .village-hall .ops-analysis-profile {
    --profile-accent: #987449;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: 9px 10px;
    min-width: 0;
    max-height: none;
    overflow: visible;
    padding: 14px 12px;
    border-left: 4px solid var(--profile-accent);
    box-shadow: 0 6px 17px #51422a0c;
  }
  .village-hall .ops-analysis-profile > h4,
  .village-hall .ops-analysis-profile > p {
    grid-column: 1 / -1;
    margin: 0;
  }
  .village-hall .ops-analysis-profile > .ops-analysis-tag {
    min-width: 0;
    margin: 0;
    padding: 9px 8px;
    border: 1px solid #e7e2df;
    border-radius: 9px;
    background: #ffffffb5;
  }
  .village-hall .ops-analysis-tag-label {
    flex-wrap: wrap;
    gap: 3px 6px;
    font-size: .69rem;
  }
  .village-hall .ops-analysis-tag-label > span { min-width: 0; overflow-wrap: anywhere; }
  .village-hall .ops-analysis-tag-label > span:last-child {
    font-size: .65rem;
    white-space: nowrap;
  }
  .village-hall .ops-analysis-profile:nth-child(1) { --profile-accent: #478d72; }
  .village-hall .ops-analysis-profile:nth-child(2) { --profile-accent: #bd8951; }
  .village-hall .ops-analysis-profile:nth-child(3) { --profile-accent: #9068ac; }
  .village-hall .ops-analysis-profile:nth-child(4) { --profile-accent: #4888a5; }
  .village-hall .ops-analysis-profile:nth-child(5) { --profile-accent: #ba767a; }
  .village-hall .ops-analysis-profile:nth-child(6) { --profile-accent: #628562; }
  .village-hall .ops-analysis-profile h4 {
    margin-bottom: 6px;
    color: var(--profile-accent);
    font-size: .85rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }
  .village-hall .ops-analysis-profile > .ops-analysis-tag + .ops-analysis-tag {
    padding-top: 9px;
    border-top: 1px solid #e7e2df;
  }
}

/* Compact one-line village controls, positioned directly under the population bar. */
.village-hall .village-toolbar { display:flex; align-items:center; gap:10px; min-width:0; min-height:38px; margin:-5px 0 14px; white-space:nowrap; }
.village-hall .village-toolbar .village-notice { flex:1 1 auto; min-width:0; justify-content:flex-start; padding:0; }
.village-hall .village-toolbar .village-notice > div { min-width:0; overflow:hidden; }
.village-hall .village-toolbar #portrait-updated { display:block; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.village-hall .village-toolbar .village-directory { display:flex; flex:0 0 auto; flex-wrap:nowrap; gap:6px; margin:0; }
.village-hall .village-toolbar .village-directory a { flex:none; padding:6px 9px; white-space:nowrap; }
.village-hall .village-toolbar #portrait-refresh { flex:none; white-space:nowrap; }
@media (max-width: 920px) {
  .village-hall .village-toolbar { overflow-x:auto; scrollbar-width:none; }
  .village-hall .village-toolbar::-webkit-scrollbar { display:none; }
  .village-hall .village-toolbar .village-notice { flex:0 0 auto; }
  .village-hall .village-toolbar .village-notice > div,
  .village-hall .village-toolbar #portrait-updated { overflow:visible; }
  .village-hall .village-toolbar .village-directory { display:flex; grid-template-columns:none; margin:0; }
}

/* Keep one illustrated page banner; statistics use compact section headings. */
.village-hall .village-banner {
  min-height: 0;
  background: transparent;
  border-bottom: 1px solid #e8ddca;
}
.village-hall .village-banner::after { display: none; }
.village-hall .village-banner-copy { padding: 18px 22px; }
@media (max-width: 720px) {
  .village-hall .village-banner-copy { padding: 16px; }
}
