/* HouseChat shared styles: used by the web host now and the MAUI shell later. */

:root {
    --hc-bg: #f6f6f7;
    --hc-surface: #ffffff;
    --hc-fg: #18181b;
    --hc-muted: #6b6b74;
    --hc-tint: #f0f0f2;
    --hc-border: #e3e3e7;
    --hc-accent: #00a37a;
    --hc-accent-ink: #006b50;
    --hc-accent-soft: #e3f7f0;
    --hc-on-accent: #ffffff;
    --hc-star: #f59e0b;
    --hc-ok-bg: #dcf5e3;
    --hc-ok-fg: #15603a;
    --hc-ok-solid: #16a34a;
    --hc-ok-border: #9fd4b2;
    --hc-note-bg: #fff6dd;
    --hc-note-fg: #6b4a00;
    --hc-chat-bg: #ffffff;
    --hc-mix-base: #ffffff;
    --hc-ink-base: #000000;
    --hc-soft-pct: 16%;
    --hc-ink-pct: 62%;
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --hc-bg: #0d0d0f;
        --hc-surface: #17171a;
        --hc-fg: #ececef;
        --hc-muted: #a0a0aa;
        --hc-tint: #222226;
        --hc-border: #2c2c31;
        --hc-accent: #2fd3a6;
        --hc-accent-ink: #7fe8c9;
        --hc-accent-soft: #10322a;
        --hc-on-accent: #04241b;
        --hc-star: #fbbf24;
        --hc-ok-bg: #12291b;
        --hc-ok-fg: #8fdcab;
        --hc-ok-solid: #22a957;
        --hc-ok-border: #2e5a3e;
        --hc-note-bg: #2d2511;
        --hc-note-fg: #f1d88f;
        --hc-chat-bg: #17171a;
        --hc-mix-base: #17171a;
        --hc-ink-base: #ffffff;
        --hc-soft-pct: 26%;
        --hc-ink-pct: 50%;
    }
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    background: var(--hc-bg);
    color: var(--hc-fg);
    font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    -webkit-text-size-adjust: 100%;
}

a { color: inherit; }
h1:focus { outline: none; }

.hc-wrap { width: 100%; max-width: 38rem; margin: 0 auto; padding: 0 16px; }
.hc-wrap-wide { max-width: 72rem; }
.hc-main { padding-top: 12px; padding-bottom: 32px; min-height: 60vh; }
.hc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hc-muted { color: var(--hc-muted); }
.hc-small { font-size: 13px; }
.hc-pad { padding: 12px 14px; }

/* ---------- App frame ---------- */
.hc-frame { min-height: 100dvh; display: flex; flex-direction: column; }
/* Place pages are an app screen: the frame is exactly the viewport and columns scroll inside it. */
.hc-frame:has(.hc-shell) { height: 100dvh; }
.hc-sample { flex: none; background: var(--hc-note-bg); color: var(--hc-note-fg); font-size: 12px; padding: 4px 16px; text-align: center; }
.hc-foot { color: var(--hc-muted); font-size: 12px; padding-bottom: 32px; }

/* Feed top bar */
.hc-bar { background: var(--hc-surface); border-bottom: 1px solid var(--hc-border); position: sticky; top: 0; z-index: 10; }
.hc-bar-in { display: flex; align-items: center; justify-content: space-between; height: 52px; }
.hc-brand { font-weight: 650; font-size: 18px; text-decoration: none; letter-spacing: -.01em; }
.hc-bar-note { font-size: 12px; color: var(--hc-muted); }

/* Search and chips */
.hc-search { display: flex; gap: 8px; margin: 4px 0 10px; max-width: 38rem; }
.hc-search input {
    flex: 1; min-width: 0; font: inherit; padding: 9px 12px; border-radius: 10px;
    border: 1px solid var(--hc-border); background: var(--hc-surface); color: var(--hc-fg);
}
.hc-search button {
    font: inherit; padding: 9px 14px; border-radius: 10px; border: 0; cursor: pointer;
    background: var(--hc-accent); color: var(--hc-on-accent); font-weight: 550;
}
.hc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.hc-chips-scroll { flex-wrap: nowrap; overflow-x: auto; margin: 0; scrollbar-width: none; }
.hc-chips-quiet .hc-chip { font-size: 12px; padding: 3px 10px; }
.hc-chip {
    display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
    padding: 5px 12px; border-radius: 999px; font-size: 13px; text-decoration: none;
    background: var(--hc-accent-soft); color: var(--hc-accent-ink);
}
.hc-chip.on { background: var(--hc-accent); color: var(--hc-on-accent); }
.hc-n { opacity: .7; font-variant-numeric: tabular-nums; }

/* City picker in the top bar */
.hc-bar-left { display: flex; align-items: center; gap: 14px; }
.hc-city { position: relative; }
.hc-city summary {
    list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 10px; border-radius: 999px; background: var(--hc-accent-soft); color: var(--hc-accent-ink);
    font-size: 14px; font-weight: 600;
}
.hc-city summary::-webkit-details-marker { display: none; }
.hc-city[open] summary svg:last-child { transform: rotate(180deg); }
.hc-city-menu {
    position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; min-width: 220px; padding: 6px;
    background: var(--hc-surface); border: 1px solid var(--hc-border); border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .14);
}
.hc-city-menu a { display: flex; justify-content: space-between; padding: 8px 10px; border-radius: 8px; text-decoration: none; font-weight: 500; }
.hc-city-menu a:hover { background: var(--hc-tint); }
.hc-city-menu a.on { color: var(--hc-accent-ink); }
.hc-city-soon { display: block; padding: 8px 10px 6px; margin-top: 4px; border-top: 1px solid var(--hc-border); color: var(--hc-muted); font-size: 13px; }

/* Featured carousel on the home page */
.hc-featured { margin: 6px 0 16px; }
.hc-featured-title { font-size: 17px; font-weight: 650; margin: 0 0 8px; }
.hc-carousel-cards { background: none; }
.hc-carousel-cards .hc-carousel-track { gap: 12px; scroll-padding: 0; padding-bottom: 2px; }
.hc-fslide {
    position: relative; flex: 0 0 86%; aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden;
    scroll-snap-align: start; text-decoration: none; color: #fff; background: var(--h);
}
@media (min-width: 768px) { .hc-fslide { flex-basis: calc(50% - 6px); } }
@media (min-width: 1100px) { .hc-fslide { flex-basis: calc(33.333% - 8px); } }
.hc-fslide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hc-fslide-blank { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 56px; font-weight: 700; opacity: .5; }
.hc-fslide-kind {
    position: absolute; top: 10px; left: 10px; padding: 2px 10px; border-radius: 999px;
    background: rgba(255, 255, 255, .92); color: #111; font-size: 12px; font-weight: 600;
}
.hc-fslide-text {
    position: absolute; left: 0; right: 0; bottom: 0; display: grid; gap: 1px; padding: 36px 14px 12px;
    background: linear-gradient(transparent, rgba(0, 0, 0, .72));
}
.hc-fslide-text strong { font-size: 17px; font-weight: 650; }
.hc-fslide-text > span { font-size: 13px; opacity: .92; }
.hc-fslide-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 3px; }
.hc-fslide:hover strong { text-decoration: underline; }
.hc-carousel-cards .hc-carousel-btn { box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }

/* Projects | Homes: the feed's top-level switch */
.hc-seg { display: inline-flex; padding: 3px; margin: 4px 0 10px; border-radius: 12px; background: var(--hc-tint); }
.hc-seg a { padding: 7px 22px; border-radius: 9px; text-decoration: none; font-weight: 600; font-size: 14px; color: var(--hc-muted); }
.hc-seg a.on { background: var(--hc-surface); color: var(--hc-accent-ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }

/* Feed cards */
.hc-feed { display: grid; gap: 12px; }
@media (min-width: 768px) {
    .hc-feed { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); align-items: start; }
}
.hc-card { background: var(--hc-surface); border: 1px solid var(--hc-border); border-radius: 16px; overflow: hidden; }
.hc-card-link { display: block; text-decoration: none; }
.hc-card-link:hover .hc-card-title { text-decoration: underline; }
.hc-card-head { display: flex; gap: 10px; align-items: center; padding: 10px 14px; }
.hc-card-title { font-size: 15px; font-weight: 600; margin: 0; }
.hc-sub { color: var(--hc-muted); font-size: 12.5px; margin: 0; }
.hc-card-body { padding: 10px 14px 12px; }
.hc-counts { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; }
.hc-latest { margin: 6px 0 2px; font-size: 14px; }
.hc-more { text-align: center; margin: 18px 0; }

/* ---------- Colour: 8 hues ----------
   Every place and person gets a hue from its slug or handle (Fmt.Hue). An element with hc-hue-N
   exposes --h (solid), --h-soft (tint for backgrounds) and --h-ink (text on the tint); dark mode
   flips the mix so tints stay dark and ink stays light. */
.hc-hue-0 { --h: #0f9d77; } .hc-hue-1 { --h: #e8613c; }
.hc-hue-2 { --h: #2f7bf0; } .hc-hue-3 { --h: #d98a00; }
.hc-hue-4 { --h: #7c5cff; } .hc-hue-5 { --h: #e0457b; }
.hc-hue-6 { --h: #16a34a; } .hc-hue-7 { --h: #4f7383; }
[class*="hc-hue-"] {
    --h-soft: color-mix(in srgb, var(--h) var(--hc-soft-pct), var(--hc-mix-base));
    --h-ink: color-mix(in srgb, var(--h) var(--hc-ink-pct), var(--hc-ink-base));
}

/* Title band: the place's colour behind its name (replaces the old cover block) */
.hc-band { background: var(--h-soft); }
.hc-band .hc-card-title, .hc-band h1, .hc-band .hc-summary-title { color: var(--h-ink); }
.hc-band .hc-sub, .hc-band p { color: var(--h-ink); opacity: .85; }
.hc-band .hc-icon-btn { color: var(--h-ink); }
.hc-band .hc-icon-btn:hover { background: color-mix(in srgb, var(--h) 18%, transparent); }

/* Status chips under a title */
.hc-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.hc-tag { font-size: 12px; padding: 2px 9px; border-radius: 999px; text-decoration: none; white-space: nowrap; }
.hc-tag-status { background: #fff0d1; color: #7a4a00; }
.hc-tag-ready { background: var(--hc-ok-bg); color: var(--hc-ok-fg); }
.hc-tag-rera { background: var(--hc-accent-soft); color: var(--hc-accent-ink); }
.hc-tag-link { background: var(--hc-tint); color: var(--hc-fg); }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .hc-tag-status { background: #3a2a07; color: #fcd58a; }
}

/* Avatars and badges */
.hc-av {
    width: 36px; height: 36px; border-radius: 50%; flex: none;
    display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600;
    background: var(--h, var(--hc-muted)); color: #fff;
}
.hc-post .hc-av, .hc-msg .hc-av { width: 30px; height: 30px; }
.hc-badge { font-size: 11px; padding: 1px 7px; border-radius: 999px; white-space: nowrap; background: var(--h-soft, var(--hc-tint)); color: var(--h-ink, var(--hc-muted)); }
.hc-badge-official { background: var(--hc-ok-solid); color: #fff; }

/* ---------- Place shell: [side list] [main] [info panel] ---------- */
.hc-shell { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); background: var(--hc-surface); }
.hc-side, .hc-info { display: none; }
.hc-col { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--hc-surface); }
.hc-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.hc-wide-only { display: none !important; }

@media (min-width: 768px) {
    .hc-shell { grid-template-columns: 320px minmax(0, 1fr); }
    .hc-side { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--hc-border); }
}
@media (min-width: 1100px) {
    .hc-shell { grid-template-columns: 340px minmax(0, 1fr) 320px; }
    .hc-info { display: block; min-height: 0; overflow-y: auto; border-left: 1px solid var(--hc-border); }
    .hc-narrow-only, .hc-info-btn { display: none !important; }
    .hc-wide-only { display: flex !important; }
}

/* Side list: the feed as a chat list */
.hc-side-head { padding: 12px 14px; border-bottom: 1px solid var(--hc-border); display: grid; gap: 10px; }
.hc-side-head input {
    width: 100%; font: inherit; font-size: 14px; padding: 7px 12px; border-radius: 10px;
    border: 1px solid var(--hc-border); background: var(--hc-tint); color: var(--hc-fg);
}
.hc-side-list { flex: 1; min-height: 0; overflow-y: auto; }
.hc-row { display: flex; gap: 10px; align-items: center; padding: 10px 14px; text-decoration: none; border-bottom: 1px solid var(--hc-border); }
.hc-row:hover { background: var(--hc-tint); }
.hc-row.on { background: var(--hc-tint); box-shadow: inset 3px 0 0 var(--hc-accent); }
.hc-row-main { min-width: 0; flex: 1; display: grid; gap: 1px; }
.hc-row-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.hc-row-title { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc-row-time { font-size: 12px; color: var(--hc-muted); flex: none; }
.hc-row-sub { font-size: 13px; color: var(--hc-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc-row-more { justify-content: center; color: var(--hc-muted); font-size: 13px; border-bottom: 0; }
.hc-count { flex: none; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--hc-tint); color: var(--hc-muted); font-size: 12px; text-align: center; }
.hc-topic-icon { width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--hc-tint); display: inline-flex; align-items: center; justify-content: center; font-size: 16px; }

/* Compact bar */
.hc-cbar { flex: none; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--hc-border); background: var(--hc-surface); }
.hc-cbar-text { min-width: 0; flex: 1; }
.hc-cbar h1 { font-size: 16px; font-weight: 650; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc-cbar p { font-size: 12.5px; color: var(--hc-muted); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc-icon-btn { flex: none; width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; color: var(--hc-fg); }
.hc-icon-btn:hover { background: var(--hc-tint); }
.hc-cbar.hc-band { border-bottom-color: transparent; }
.hc-strip { flex: none; border-bottom: 1px solid var(--hc-border); padding: 8px 12px; background: var(--hc-surface); }

/* Photo carousel */
.hc-carousel { position: relative; background: #111; }
.hc-carousel-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.hc-carousel-track::-webkit-scrollbar { display: none; }
.hc-slide { flex: 0 0 100%; margin: 0; position: relative; scroll-snap-align: start; aspect-ratio: 3 / 2; max-height: 52vh; }
.hc-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hc-slide figcaption {
    position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; gap: 8px;
    padding: 18px 12px 8px; font-size: 13px; color: #fff;
    background: linear-gradient(transparent, rgba(0, 0, 0, .55));
}
.hc-slide-n {
    position: absolute; top: 10px; right: 10px; padding: 2px 9px; border-radius: 999px;
    background: rgba(0, 0, 0, .55); color: #fff; font-size: 12px; font-variant-numeric: tabular-nums;
}
.hc-carousel-btn {
    position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; border-radius: 50%;
    background: rgba(255, 255, 255, .85); color: #111; font-size: 24px; line-height: 1; cursor: pointer; display: none;
}
.hc-carousel-btn.prev { left: 10px; }
.hc-carousel-btn.next { right: 10px; }
@media (hover: hover) { .hc-carousel:hover .hc-carousel-btn { display: block; } }
.hc-info .hc-slide { max-height: none; }
.hc-summary-media { position: relative; }
.hc-on-photo { position: absolute; top: 10px; left: 10px; background: rgba(255, 255, 255, .88); color: #111; }
.hc-on-photo:hover { background: #fff; }

/* Builders: chips on project pages, matches in search, the builder page */
.hc-builders { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; }
.hc-builders-label { font-size: 12px; color: var(--hc-muted); margin-right: 2px; }
.hc-builder-chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 999px;
    border: 1px solid var(--hc-border); text-decoration: none; font-size: 13px; font-weight: 500;
}
.hc-builder-chip:hover { background: var(--hc-tint); }
.hc-builder-chip .hc-av { width: 22px; height: 22px; font-size: 9px; }
.hc-builder-role { font-size: 11px; color: var(--hc-muted); font-weight: 400; }
.hc-bmatches { display: grid; gap: 8px; margin: 0 0 12px; }
@media (min-width: 768px) { .hc-bmatches { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); } }
.hc-bmatch {
    display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; text-decoration: none;
    background: var(--hc-surface); border: 1px solid var(--hc-border);
}
.hc-bmatch:hover { border-color: var(--hc-accent); }
.hc-bmatch > span:nth-child(2) { display: grid; flex: 1; }
.hc-bmatch-go { color: var(--hc-muted); font-size: 20px; }
.hc-builder { background: var(--hc-surface); border: 1px solid var(--hc-border); border-radius: 16px; overflow: hidden; }
.hc-pad-x { padding: 0 14px; }
.hc-bprojects { list-style: none; margin: 6px 0 0; padding: 0; }
.hc-bprojects li { border-top: 1px solid var(--hc-border); }
.hc-bprojects a { display: flex; gap: 12px; align-items: center; padding: 10px 14px; text-decoration: none; }
.hc-bprojects a:hover { background: var(--hc-tint); }
.hc-bprojects img { width: 76px; height: 56px; object-fit: cover; border-radius: 8px; flex: none; }
.hc-bproject-main { display: grid; gap: 2px; min-width: 0; }
.hc-bproject-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 12.5px; color: var(--hc-muted); }
.hc-tag-late { background: #fde4dc; color: #9a3412; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .hc-tag-late { background: #3d1a10; color: #fdba9f; }
}

/* Summary: phone landing header and desktop info panel */
.hc-summary-band { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.hc-summary-band .hc-av { width: 44px; height: 44px; font-size: 14px; }
.hc-summary-band > div { min-width: 0; flex: 1; }
.hc-summary-body { padding: 10px 14px 10px; }
.hc-summary-title { font-size: 20px; font-weight: 650; margin: 0 0 2px; letter-spacing: -.01em; }
.hc-info .hc-summary-title { font-size: 17px; }
.hc-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 4px; text-align: center; }
.hc-tiles div { background: var(--hc-tint); border-radius: 10px; padding: 8px 4px; }
.hc-tiles strong { display: block; font-size: 16px; font-weight: 650; }
.hc-tiles span { font-size: 12px; color: var(--hc-muted); }
.hc-responds { margin: 10px 0 0; padding: 7px 10px; border-radius: 10px; background: var(--hc-ok-bg); color: var(--hc-ok-fg); font-size: 13px; }
.hc-info-links { display: grid; margin: 12px -14px 0; border-top: 1px solid var(--hc-border); }
.hc-info-links a { display: flex; justify-content: space-between; padding: 10px 14px; text-decoration: none; border-bottom: 1px solid var(--hc-border); font-size: 14px; }
.hc-info-links a:hover { background: var(--hc-tint); }
.hc-info-links span { color: var(--hc-muted); }
.hc-attrib { font-size: 11.5px; color: var(--hc-muted); padding: 10px 14px; margin: 0; }
.hc-info .hc-attrib { padding: 10px 0 0; }

.hc-tabs { flex: none; display: flex; border-bottom: 1px solid var(--hc-border); padding: 0 6px; background: var(--hc-surface); }
.hc-tabs a {
    flex: 1; text-align: center; padding: 10px 0; font-size: 14px; text-decoration: none;
    color: var(--hc-muted); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.hc-tabs a.on { color: var(--hc-accent-ink); border-color: var(--hc-accent); font-weight: 600; }
.hc-blurb { margin: 10px 14px 0; font-size: 13px; color: var(--hc-muted); }
.hc-h2 { font-size: 14px; font-weight: 600; margin: 14px 0 6px; }
.hc-list { list-style: none; margin: 0; padding: 0; }
.hc-list li { padding: 7px 0; border-bottom: 1px solid var(--hc-border); display: flex; justify-content: space-between; gap: 8px; }
.hc-list li:last-child { border-bottom: 0; }

/* Collapsed detail groups */
.hc-group { border-bottom: 1px solid var(--hc-border); }
.hc-group summary { padding: 11px 14px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.hc-group summary::-webkit-details-marker { display: none; }
.hc-group summary::after { content: "⌄"; color: var(--hc-muted); }
.hc-group[open] summary::after { content: "⌃"; }
.hc-group dl { margin: 0; padding: 0 14px 10px; }
.hc-group dl div { display: grid; grid-template-columns: minmax(7rem, 40%) 1fr; gap: 8px; padding: 5px 0; font-size: 14px; }
.hc-group dt { color: var(--hc-muted); }
.hc-group dd { margin: 0; }
.hc-src { display: block; font-size: 11.5px; color: var(--hc-muted); }

/* ---------- Chat ---------- */
.hc-chat {
    flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
    display: flex; flex-direction: column-reverse; /* opens scrolled to the newest message, no script needed */
    background: var(--hc-chat-bg);
}
.hc-chat-inner { display: flex; flex-direction: column; gap: 8px; padding: 12px 12px 16px; max-width: 52rem; width: 100%; margin: 0 auto; }
.hc-chat.hc-chat-preview { flex: none; overflow: visible; }
.hc-open-chat { margin: 0; padding: 4px 14px 14px; text-align: center; font-size: 14px; }
.hc-open-chat a { color: var(--hc-accent-ink); font-weight: 600; text-decoration: none; }
.hc-chat-empty { text-align: center; color: var(--hc-muted); margin: 40px 16px; }
.hc-day { text-align: center; margin: 8px 0 2px; }
.hc-day span { font-size: 12px; color: var(--hc-muted); background: var(--hc-surface); padding: 3px 10px; border-radius: 8px; border: 1px solid var(--hc-border); }
.hc-msg { display: flex; gap: 8px; align-items: flex-start; }
.hc-msg .hc-av { margin-top: 2px; }
/* Each bubble is tinted in its author's colour; name in the darker shade, badge as a surface-coloured chip. */
.hc-bubble {
    min-width: 0; max-width: min(85%, 36rem); background: var(--h-soft, var(--hc-tint));
    border-radius: 4px 14px 14px 14px; padding: 7px 11px 6px;
}
.hc-bubble > .hc-post-head .hc-handle { color: var(--h-ink); }
.hc-bubble .hc-badge:not(.hc-badge-official) { background: var(--hc-surface); color: var(--h-ink); }
.hc-quote {
    font-size: 12.5px; color: var(--hc-muted); background: var(--hc-surface); border-left: 3px solid var(--h, var(--hc-accent));
    border-radius: 0 6px 6px 0; padding: 4px 8px; margin-bottom: 5px;
    overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.hc-quote .hc-handle { color: var(--h-ink); }
/* Photos in a message */
.hc-msg-photos { display: grid; gap: 3px; margin: 4px 0 6px; border-radius: 10px; overflow: hidden; width: min(100%, 340px); }
.hc-msg-photos.n2, .hc-msg-photos.n3, .hc-msg-photos.n4 { grid-template-columns: 1fr 1fr; }
.hc-msg-photos.n3 .hc-msg-photo:first-child { grid-column: span 2; }
.hc-msg-photo { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--hc-tint); }
.hc-msg-photos.n1 .hc-msg-photo { aspect-ratio: 3 / 2; }
.hc-msg-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hc-msg-more { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .5); color: #fff; font-size: 22px; font-weight: 600; }
.hc-post-body .hc-msg-photos { margin-top: 8px; }

.hc-bubble .hc-meta { justify-content: flex-end; color: var(--h-ink); opacity: .75; }
.hc-composer { flex: none; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--hc-border); background: var(--hc-surface); }
.hc-composer-box { max-width: 52rem; margin: 0 auto; padding: 9px 14px; border-radius: 22px; background: var(--hc-tint); color: var(--hc-muted); font-size: 14px; }

/* Review cards and threaded posts */
.hc-posts { padding: 10px 14px 14px; display: grid; gap: 14px; }
.hc-post { display: flex; gap: 10px; align-items: flex-start; }
.hc-post-body { min-width: 0; flex: 1; }
.hc-post-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 13.5px; }
.hc-handle { font-weight: 600; }
.hc-stars { color: var(--hc-star); letter-spacing: 1px; font-size: 13px; }
.hc-kind { font-size: 12px; color: var(--hc-muted); }
.hc-text { margin: 2px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.hc-meta { display: flex; gap: 10px; font-size: 12px; color: var(--hc-muted); margin-top: 3px; }
.hc-deal { color: var(--hc-accent); font-weight: 600; }
.hc-replies { margin-top: 10px; display: grid; gap: 10px; padding-left: 10px; border-left: 2px solid var(--hc-border); }
.hc-replies .hc-post.is-official { margin-left: -12px; padding-left: 10px; border-left: 2px solid var(--hc-ok-border); }

.hc-empty { text-align: center; padding: 40px 16px; }
.hc-empty h1 { font-size: 20px; }

/* Blazor error bar */
#blazor-error-ui {
    background: var(--hc-note-bg); color: var(--hc-note-fg);
    bottom: 0; left: 0; width: 100%; position: fixed; z-index: 1000;
    display: none; padding: .6rem 1.25rem .7rem; box-shadow: 0 -1px 2px rgba(0, 0, 0, .2);
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }
