/* City hub (2026-11 redesign): one page per city with Overview, People, Shops & Dining, Lore, Boons
   and Estate tabs. Pilot: Cities/Haven/Goodberry.html. Behavior lives in js/city-hub.js.
   People come live from the city's NPC directory, shops from data/shops.json. */

body { background: #0c0f0a !important; }
#content.hub { padding: 0 !important; background: #0c0f0a !important; }
.hub {
    --ink: #0c0f0a; --surface: #151a11; --raised: #1c2217;
    --line: rgba(217, 176, 74, 0.18); --line2: rgba(217, 176, 74, 0.4);
    --text: #e8e1cb; --muted: #b9af92; --faint: #9a9174;
    --gold: #d9b04a; --gold-hi: #f0c75e;
    color: var(--text); font-family: 'EB Garamond', Georgia, serif; font-size: 18px; line-height: 1.6;
}
.hub *, .hub *::before, .hub *::after { box-sizing: border-box; }
.hub a { color: var(--gold-hi); text-decoration: none; }
.hub a:hover { color: #ffe08a; text-decoration: none; }
.hub-wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.hub-label { font: 600 11.5px/1.3 Inter, system-ui, sans-serif; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin: 0; }

/* Breadcrumb */
.hub-crumbs { font: 400 13px/1.4 Inter, system-ui, sans-serif; color: var(--muted); padding: 14px 0; display: flex; gap: 8px; flex-wrap: wrap; }
.hub-crumbs a { color: var(--muted); }
.hub-crumbs a:hover { color: var(--gold-hi); }

/* Hero */
.hub-hero { position: relative; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); min-height: 380px; display: flex; align-items: flex-end; background: var(--raised); }
.hub-hero-media, .hub-hero-media video, .hub-hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 60%; }
.hub-hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12, 15, 10, 0) 30%, rgba(12, 15, 10, 0.92) 100%); }
.hub-hero-body { position: relative; width: 100%; padding: 28px 32px; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 24px; }
.hub-eyebrow { font: 600 12px/1.3 Inter, system-ui, sans-serif; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-hi); margin: 0 0 6px; }
.hub-title { font-family: Cinzel, Georgia, serif; font-weight: 600; font-size: 60px; line-height: 1; margin: 0 0 8px; color: #fbf5e2; border: 0; padding: 0; letter-spacing: 0.02em; }
.hub-tagline { margin: 0; font-size: 20px; font-style: italic; color: #efe7cf; }
.hub-crown { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.hub-crown .hub-label { color: #d9d0b2; }
.hub-stack { display: flex; padding-left: 10px; }
.hub-stack a { display: block; margin-left: -10px; }
.hub-stack img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; object-position: top; border: 2px solid var(--ink); display: block; }
.hub-media-btn { position: absolute; top: 14px; right: 14px; z-index: 2; font: 500 12px/1 Inter, system-ui, sans-serif; color: var(--text); background: rgba(12, 15, 10, 0.7); border: 1px solid var(--line2); border-radius: 999px; padding: 8px 12px; cursor: pointer; }
.hub-media-btn:hover { color: var(--gold-hi); }

/* Facts strip */
.hub-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 18px 0 0; padding: 0; list-style: none; }
.hub-facts li { background: var(--surface); padding: 14px 18px; margin: 0; }
.hub-facts b { display: block; font: 500 15px/1.4 Inter, system-ui, sans-serif; color: var(--text); margin-top: 4px; }

/* Tabs */
.hub-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 28px 0 24px; overflow-x: auto; scrollbar-width: none; }
.hub-tab { font: 500 15px/1 Inter, system-ui, sans-serif; color: var(--muted); background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 0 14px; height: 48px; display: flex; align-items: center; gap: 8px; cursor: pointer; white-space: nowrap; }
.hub-tab:hover { color: var(--text); }
.hub-tab[aria-selected="true"] { color: var(--gold-hi); border-bottom-color: var(--gold); }
.hub-tab .n { font-size: 12px; color: var(--faint); background: var(--raised); border-radius: 999px; padding: 2px 8px; }
.hub-tab[aria-selected="true"] .n { color: var(--ink); background: var(--gold); }
.hub-panel[hidden] { display: none; }
.hub-panel:focus { outline: none; }

/* Toolbar: search + chips */
.hub-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 0 0 8px; }
.hub-field { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); flex: 1 1 260px; max-width: 380px; color: var(--muted); }
.hub-field input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--text); font: 400 14px/1 Inter, system-ui, sans-serif; }
.hub-field input::placeholder { color: var(--faint); }
.hub-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hub-chip { font: 500 13.5px/1 Inter, system-ui, sans-serif; color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 0 14px; height: 40px; background: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.hub-chip:hover { border-color: var(--line2); }
.hub-chip[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: #14110a; }
.hub-chip .c { font-size: 12px; opacity: 0.75; }
.hub-count { font: 400 13px/1.4 Inter, system-ui, sans-serif; color: var(--faint); margin: 6px 0 0; }

/* People */
.hub-group-head { display: flex; align-items: baseline; gap: 12px; margin: 30px 0 4px; }
.hub-group-head h2 { font-family: Cinzel, Georgia, serif; font-weight: 600; font-size: 24px; margin: 0; color: #f6efd9; }
.hub-group-head span { font: 400 13px/1 Inter, system-ui, sans-serif; color: var(--faint); }
.hub-sub { font: 600 11.5px/1.3 Inter, system-ui, sans-serif; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin: 16px 0 10px; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.hub-person { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; color: var(--text) !important; transition: transform 0.15s, border-color 0.15s; }
.hub-person:hover { border-color: var(--line2); transform: translateY(-2px); }
.hub-person:hover .hub-pname { color: var(--gold-hi); }
.hub-ph { position: relative; aspect-ratio: 3 / 4; background: var(--raised); }
.hub-ph img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.hub-badge { position: absolute; bottom: 10px; right: 10px; width: fit-content; text-align: right; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45); max-width: calc(100% - 20px); font: 600 10.5px/1.3 Inter, system-ui, sans-serif; letter-spacing: 0.08em; text-transform: uppercase; color: #14110a; background: var(--gold); border-radius: 4px; padding: 3px 7px; }
.hub-pbody { padding: 10px 12px 12px; }
.hub-pname { font-family: Cinzel, Georgia, serif; font-weight: 600; font-size: 16.5px; line-height: 1.25; margin: 0 0 3px; color: #f6efd9; }
.hub-pmeta { font: 400 12.5px/1.4 Inter, system-ui, sans-serif; color: var(--muted); margin: 0; }
.hub-pwork { font: 500 12px/1.4 Inter, system-ui, sans-serif; color: var(--gold-hi); margin: 6px 0 0; }
/* People without a page: alphabetical, in three equal columns that read top to bottom */
.hub-minor { columns: 3; column-gap: 12px; }
.hub-minor > span, .hub-minor > a { display: block; break-inside: avoid; margin: 0 0 10px; font: 400 13px/1.3 Inter, system-ui, sans-serif; color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; background: var(--surface); }
.hub-minor > a, .hub-minor > a:hover { text-decoration: none !important; color: var(--text) !important; }
.hub-minor > span b, .hub-minor > a b { display: block; font-weight: 600; font-size: 14px; color: #f6efd9; }
.hub-minor > span small, .hub-minor > a small { display: block; color: var(--faint); font-size: 12px; margin-top: 2px; }
.hub-empty { font: 400 14px/1.5 Inter, system-ui, sans-serif; color: var(--muted); padding: 30px 0; }

/* Shops */
.hub-shops { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-top: 16px; }
.hub-shop { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 8px; color: var(--text) !important; }
a.hub-shop:hover { border-color: var(--line2); }
a.hub-shop:hover .hub-sname { color: var(--gold-hi); }
.hub-shop-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hub-kind { font: 600 11.5px/1.3 Inter, system-ui, sans-serif; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-hi); }
.hub-where { font: 400 12px/1.3 Inter, system-ui, sans-serif; color: var(--faint); }
.hub-new { font: 600 11px/1.3 Inter, system-ui, sans-serif; color: #0c0f0a; background: #9fd0b4; border-radius: 4px; padding: 2px 7px; margin-left: auto; }
.hub-sname { font-family: Cinzel, Georgia, serif; font-weight: 600; font-size: 21px; margin: 0; color: #f6efd9; line-height: 1.2; }
.hub-sdesc { margin: 0; font-size: 17px; color: #d8d0b8; line-height: 1.45; }
.hub-owner { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.hub-owner img, .hub-owner .hub-dot { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; object-position: top; flex: none; }
.hub-dot { background: var(--raised); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--faint); }
.hub-owner p { margin: 0; font: 400 13px/1.35 Inter, system-ui, sans-serif; color: var(--text); }
.hub-owner p span { display: block; color: var(--faint); font-size: 12px; }

/* Overview */
.hub-two { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.hub-main { flex: 999 1 560px; min-width: 0; }
.hub-side { flex: 1 1 300px; display: flex; flex-direction: column; gap: 16px; }
.hub-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.hub-ruler { display: flex; align-items: center; gap: 12px; padding: 7px 0; color: var(--text) !important; }
.hub-ruler img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: top; }
.hub-ruler b { display: block; font: 600 14px/1.3 Inter, system-ui, sans-serif; }
.hub-ruler span { font: 400 12.5px/1.3 Inter, system-ui, sans-serif; color: var(--faint); }
.hub-ruler:hover b { color: var(--gold-hi); }
.hub-links a { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font: 500 14px/1.3 Inter, system-ui, sans-serif; color: var(--text); }
.hub-links a:last-child { border-bottom: 0; }
.hub-links a:hover { color: var(--gold-hi); }

/* Long-form reading (Overview text, Lore, Boons) */
.hub-prose h1, .hub-prose h2.lore-h { font-family: Cinzel, Georgia, serif; font-weight: 600; font-size: 26px; color: #f6efd9; margin: 0 0 14px; padding: 0; border: 0; letter-spacing: 0.02em; }
.hub-prose h2 { font-family: Cinzel, Georgia, serif; font-size: 21px; color: #f6efd9; margin: 24px 0 10px; }
.hub-prose h3 { font: 600 12.5px/1.3 Inter, system-ui, sans-serif; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); margin: 24px 0 8px; }
.hub-prose p { font-size: 19px; line-height: 1.7; color: #ddd5bd; margin: 0 0 14px; }
.hub-prose ul, .hub-prose ol { padding-left: 22px; margin: 0 0 16px; }
.hub-prose li { font-size: 18px; line-height: 1.65; color: #ddd5bd; margin-bottom: 6px; }
.hub-prose b, .hub-prose strong { color: #f3ead0; font-weight: 600; }
.hub-prose a { border-bottom: 1px dotted rgba(240, 199, 94, 0.6); }
.hub-prose hr { border: 0; height: 1px; background: var(--line); margin: 26px 0; }
.hub-prose img { max-width: 100%; height: auto; border-radius: 10px; }
.hub-prose table { width: 100%; border-collapse: collapse; margin: 16px 0 24px; font-size: 16px; }
.hub-prose th { font: 600 12px/1.3 Inter, system-ui, sans-serif; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line2); }
.hub-prose td { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }

.hub-lore { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.hub-toc { flex: 1 1 220px; max-width: 260px; position: sticky; top: 84px; }
.hub-toc a { display: block; font: 400 14px/1.3 Inter, system-ui, sans-serif; color: var(--muted); padding: 7px 0 7px 12px; border-left: 2px solid var(--line); }
.hub-toc a:hover, .hub-toc a.on { color: var(--gold-hi); border-left-color: var(--gold); }
.hub-lore-body { flex: 999 1 560px; min-width: 0; }
.lore-part { padding: 0 0 26px; margin: 0 0 30px; border-bottom: 1px solid var(--line); }
.lore-part:last-child { border-bottom: 0; }

.hub-boons ul { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.hub-boons li { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin: 0; font-size: 16.5px; line-height: 1.5; }
.hub-boons li b a { font-family: Cinzel, Georgia, serif; border: 0; display: block; margin-bottom: 4px; font-size: 16px; }

.hub-estate { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.hub-estate a { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; color: var(--text) !important; }
.hub-estate a:hover { border-color: var(--line2); }
.hub-estate .big { font-family: Cinzel, Georgia, serif; font-size: 30px; color: var(--gold-hi); margin: 6px 0 4px; }
.hub-estate p { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.45; }

.hub-foot { margin-top: 64px; border-top: 1px solid var(--line); padding: 24px; text-align: center; font: 400 12.5px/1.4 Inter, system-ui, sans-serif; color: var(--faint); }

/* Image modal (kept from the old city page) */
.hub .modal { display: none; position: fixed; inset: 0; background: rgba(6, 8, 5, 0.92); z-index: 2000; align-items: center; justify-content: center; }
.hub .modal.open { display: flex; }
.hub .modal-content { max-width: 88vw; max-height: 85vh; object-fit: contain; border: 1px solid var(--line2); border-radius: 8px; }

@media (max-width: 980px) {
    .hub-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hub-title { font-size: 44px; }
    .hub-crown { margin-left: 0; align-items: flex-start; }
    .hub-toc { position: static; max-width: none; display: flex; flex-wrap: wrap; gap: 6px; }
    .hub-toc a { border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; }
}
@media (max-width: 560px) {
    .hub-wrap { padding: 0 16px; }
    .hub-hero { min-height: 300px; }
    .hub-hero-body { padding: 20px; }
    .hub-title { font-size: 38px; }
    .hub-facts { grid-template-columns: minmax(0, 1fr); }
    .hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .hub-minor { columns: 2; column-gap: 10px; }
    .hub-shops { grid-template-columns: minmax(0, 1fr); }
    .hub-prose p { font-size: 18px; }
}

/* Cities with fewer facts (the smaller settlements) */
.hub-facts-1 { grid-template-columns: minmax(0, 1fr); max-width: 360px; }
.hub-facts-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 720px; }
.hub-facts-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Coming Soon card (shops.json placeholder) */
.hub-soon { border-style: dashed; border-color: rgba(217, 176, 74, 0.3); background: transparent; }
.hub-soon .hub-kind { color: #9a9174; }
