/* ==========================================================================
   Public site framework  —  PC responsive web  +  mobile PWA app shell
   - Light / dark themes (follows system, user toggle via [data-theme])
   - >= 900px : desktop header nav, 2-column profile layout
   - <  900px : app top bar + fixed bottom tab bar (PWA style)
   ========================================================================== */

:root {
    color-scheme: light;
    --bg: #f3f6f6;
    --surface: #ffffff;
    --card: #ffffff;
    --surface-2: #eef3f2;
    --text: #14201f;
    --muted: #5a6b69;
    --line: #dde6e5;
    --brand: #0f766e;
    --brand-strong: #0b5c56;
    --brand-soft: #e1f3f1;
    --on-brand: #ffffff;
    --ok-bg: #e6f4ea; --ok-fg: #1e6b34;
    --err-bg: #fdecea; --err-fg: #8a1c14;
    --star: #f5a623;
    --shadow: 0 1px 2px rgba(16,32,30,.05), 0 6px 20px rgba(16,32,30,.06);
    --radius: 16px;
    --header-h: 64px;
    --tabbar-h: 62px;
    --safe-t: env(safe-area-inset-top, 0px);
    --safe-b: env(safe-area-inset-bottom, 0px);
    --maxw: 1160px;
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0c1211;
    --surface: #131b1a;
    --card: #162120;
    --surface-2: #1b2928;
    --text: #e8f0ef;
    --muted: #9db2af;
    --line: #263634;
    --brand: #2dd4bf;
    --brand-strong: #5eead4;
    --brand-soft: #123532;
    --on-brand: #04201d;
    --ok-bg: #12301c; --ok-fg: #8fdca4;
    --err-bg: #3a1714; --err-fg: #f4a59d;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --bg: #0c1211; --surface: #131b1a; --card: #162120; --surface-2: #1b2928;
        --text: #e8f0ef; --muted: #9db2af; --line: #263634;
        --brand: #2dd4bf; --brand-strong: #5eead4; --brand-soft: #123532; --on-brand: #04201d;
        --ok-bg: #12301c; --ok-fg: #8fdca4; --err-bg: #3a1714; --err-fg: #f4a59d;
        --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
    }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
    margin: 0; background: var(--bg); color: var(--text);
    font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
    transition: background-color .2s, color .2s;
    min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-strong); }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
h1 { margin: 0 0 4px; font-size: clamp(1.45rem, 1.1rem + 1.4vw, 2rem); line-height: 1.25; letter-spacing: -.01em; }
h2 { margin: 0 0 10px; font-size: 1.05rem; color: var(--brand); letter-spacing: .01em; }
.muted { color: var(--muted); }
.pre { white-space: pre-line; margin: 0; }
dt { font-weight: 600; margin-top: 12px; }
dd { margin: 2px 0 0; white-space: pre-line; }
ul { padding-left: 20px; margin: 0; }
li + li { margin-top: 3px; }
.card li, .card dd, .card p { overflow-wrap: anywhere; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--brand); color: var(--on-brand); padding: 10px 16px; border-radius: 10px; text-decoration: none; font-weight: 700; }
.skip-link:focus { top: calc(var(--safe-t) + 10px); }
.ico { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- content shell ---------- */
main, .wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 24px 16px 40px; flex: 1 0 auto; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.hero { display: flex; gap: 16px; align-items: center; }
.hero img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 2px solid var(--line); background: var(--surface-2); }

/* ---------- breadcrumb ---------- */
.crumbs { font-size: .86rem; color: var(--muted); margin: 0 0 14px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 8px; padding: 0; margin: 0; }
.crumbs li + li { margin: 0; }
.crumbs li + li::before { content: "›"; margin-right: 8px; opacity: .6; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand); text-decoration: underline; }

/* ---------- profile layout (PC two-column) ---------- */
.profile { display: block; }
.profile-side, .profile-main { min-width: 0; }
.chip-ok { display: inline-block; background: var(--ok-bg); color: var(--ok-fg); border-radius: 999px; padding: 2px 10px; font-size: .82rem; font-weight: 600; }
.leadbar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.leadbar a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 9px 18px; border-radius: 999px; background: var(--brand); color: var(--on-brand); text-decoration: none; font-weight: 700; font-size: .95rem; }
.leadbar a:hover { background: var(--brand-strong); color: var(--on-brand); }
.leadbar a.alt { background: transparent; color: var(--brand); border: 1.5px solid var(--brand); }
.leadbar a.alt:hover { background: var(--brand-soft); }

.enq label { display: block; font-weight: 600; margin: 12px 0 4px; }
.enq input[type=text], .enq textarea, input[type=text], input[type=search], input[type=email], textarea, select {
    width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit;
}
.enq button, button.btn, .btn { margin-top: 14px; min-height: 44px; padding: 11px 24px; border: 0; border-radius: 999px; background: var(--brand); color: var(--on-brand); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-block; }
.enq button:hover, .btn:hover { background: var(--brand-strong); color: var(--on-brand); }
.enq .ok { background: var(--ok-bg); color: var(--ok-fg); border-radius: 10px; padding: 10px 12px; }
.enq .err { background: var(--err-bg); color: var(--err-fg); border-radius: 10px; padding: 10px 12px; }
.hp { position: absolute; left: -9999px; }

/* ---------- site header (desktop) ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: color-mix(in srgb, var(--surface) 88%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); padding-top: var(--safe-t); }
.site-header .bar { max-width: var(--maxw); margin: 0 auto; height: var(--header-h); padding: 0 16px; display: flex; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.12rem; letter-spacing: -.01em; }
.brand:hover { color: var(--text); }
.brand img { width: 34px; height: 34px; border-radius: 9px; display: block; }
.nav-main { display: none; align-items: center; gap: 4px; margin-left: 8px; }
.nav-main a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav-main a:hover { background: var(--surface-2); color: var(--text); }
.nav-main a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }
.bar-end { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--text); cursor: pointer; padding: 0; margin: 0; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn .i-sun { display: none; }
:root[data-theme="dark"] .icon-btn .i-sun { display: block; }
:root[data-theme="dark"] .icon-btn .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .icon-btn .i-sun { display: block; }
    :root:not([data-theme="light"]) .icon-btn .i-moon { display: none; }
}
.btn-cta { display: none; align-items: center; min-height: 44px; padding: 0 20px; border-radius: 999px; background: var(--brand); color: var(--on-brand); text-decoration: none; font-weight: 700; font-size: .95rem; }
.btn-cta:hover { background: var(--brand-strong); color: var(--on-brand); }

/* ---------- site footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 24px; }
.site-footer .inner { max-width: var(--maxw); margin: 0 auto; padding: 28px 16px; display: grid; gap: 24px; font-size: .92rem; color: var(--muted); }
.site-footer .foot-title { margin: 0 0 8px; font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text); }
.site-footer .cols { display: contents; }
.site-footer ul { list-style: none; padding: 0; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--brand); text-decoration: underline; }
.site-footer .legal { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 16px; font-size: .84rem; }
main footer { font-size: .85rem; color: var(--muted); text-align: center; margin-top: 24px; }
main footer a { color: var(--muted); }

/* ---------- bottom tab bar (mobile PWA) ---------- */
.tabbar { display: none; }
.install-bar { display: none; }

/* ==========================================================================
   Mobile  (< 900px)  — app shell
   ========================================================================== */
@media (max-width: 899.98px) {
    :root { --header-h: 54px; }
    body { padding-bottom: calc(var(--tabbar-h) + var(--safe-b)); background: var(--bg); }
    main, .wrap { padding: 14px 14px 24px; }
    .site-header .bar { height: var(--header-h); gap: 10px; }
    .brand { font-size: 1.05rem; }
    .brand img { width: 30px; height: 30px; }
    .icon-btn { width: 40px; height: 40px; }
    .card { border-radius: 18px; padding: 16px; box-shadow: none; }
    .hero { flex-direction: column; text-align: center; }
    .hero img, .avatar { width: 104px; height: 104px; }
    .profile-side .card:first-child { text-align: center; }
    .leadbar { justify-content: center; }
    .leadbar a { flex: 1 1 40%; }
    .crumbs { display: none; }
    .site-footer { margin-top: 8px; border-top: 0; background: transparent; }
    .site-footer .inner { padding: 8px 16px 24px; text-align: center; }
    .site-footer .cols { display: none; }

    .tabbar {
        display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 120;
        height: calc(var(--tabbar-h) + var(--safe-b)); padding: 0 6px var(--safe-b);
        background: color-mix(in srgb, var(--surface) 92%, transparent);
        -webkit-backdrop-filter: saturate(1.5) blur(16px); backdrop-filter: saturate(1.5) blur(16px);
        border-top: 1px solid var(--line);
    }
    .tabbar a {
        flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
        color: var(--muted); text-decoration: none; font-size: .68rem; font-weight: 600; letter-spacing: .01em;
        -webkit-tap-highlight-color: transparent; border-radius: 12px; min-width: 0;
    }
    .tabbar a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .tabbar a .ico { width: 24px; height: 24px; transition: transform .15s; }
    .tabbar a:active .ico { transform: scale(.88); }
    .tabbar a[aria-current="page"] { color: var(--brand); }
    .tabbar a[aria-current="page"] .ico { stroke-width: 2.3; }
    .tabbar a.tab-action { color: var(--on-brand); }
    .tabbar a.tab-action .pill { display: grid; place-items: center; width: 50px; height: 50px; margin-top: -22px; border-radius: 50%; background: var(--brand); color: var(--on-brand); box-shadow: 0 6px 16px rgba(15,118,110,.45); border: 4px solid var(--bg); }
    .tabbar a.tab-action > span:last-child { color: var(--muted); margin-top: -1px; }

    .install-bar {
        display: none; position: fixed; left: 12px; right: 12px; z-index: 119;
        bottom: calc(var(--tabbar-h) + var(--safe-b) + 10px);
        align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px;
        background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: .9rem;
    }
    .install-bar.show { display: flex; }
    .install-bar img { width: 38px; height: 38px; border-radius: 10px; }
    .install-bar p { margin: 0; flex: 1; line-height: 1.35; }
    .install-bar button { margin: 0; min-height: 38px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--brand); color: var(--on-brand); font: inherit; font-weight: 700; cursor: pointer; }
    .install-bar button.x { background: transparent; color: var(--muted); padding: 0 6px; font-size: 1.3rem; }
}

/* standalone (installed PWA): app feel */
@media (display-mode: standalone) {
    body { -webkit-user-select: none; user-select: none; overscroll-behavior-y: contain; }
    a, button { -webkit-touch-callout: none; }
    .card, .card *, input, textarea { -webkit-user-select: text; user-select: text; }
}

/* ==========================================================================
   Desktop  (>= 900px)
   ========================================================================== */
@media (min-width: 900px) {
    main, .wrap { padding: 32px 24px 56px; }
    .site-header .bar { padding: 0 24px; }
    .nav-main { display: flex; }
    .btn-cta { display: inline-flex; }
    .profile { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 24px; align-items: start; }
    .profile-side { position: sticky; top: calc(var(--header-h) + 20px); }
    .profile-main .card:last-child, .profile-side .card:last-child { margin-bottom: 0; }
    .site-footer .inner { grid-template-columns: 1.4fr 1fr 1fr 1fr; padding: 40px 24px 28px; }
    .site-footer .legal { text-align: left; }
    /* directory & list pages get comfortable reading width when not a profile */
    main:not(.is-wide) > .card, main:not(.is-wide) > section.card { max-width: 860px; }
}
@media (min-width: 1200px) { .profile { grid-template-columns: 360px minmax(0, 1fr); gap: 28px; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .tabbar, .install-bar, .site-footer .cols, .leadbar, .enq { display: none !important; } body { background: #fff; color: #000; padding: 0; } .card { box-shadow: none; } }

/* ---------- profile hero extras ---------- */
.avatar { width: 96px; height: 96px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 2rem; font-weight: 800; letter-spacing: .02em; color: var(--on-brand); background: linear-gradient(135deg, var(--brand), var(--brand-strong)); }
.avatar.sq { border-radius: 18px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 12px 0 0; }
.chips li { margin: 0; padding: 3px 11px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: .82rem; font-weight: 600; }
.trust { font-size: .86rem; margin: 10px 0 0; }
.leadbar button.save-btn { display: inline-flex; align-items: center; gap: 8px; justify-content: center; min-height: 46px; padding: 9px 20px; border: 0; border-radius: 999px; background: var(--brand); color: var(--on-brand); font: inherit; font-weight: 800; font-size: .98rem; cursor: pointer; flex: 1 1 100%; box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 35%, transparent); }
.leadbar button.save-btn:hover { background: var(--brand-strong); }
.btn.alt { background: transparent; color: var(--brand); border: 1.5px solid var(--brand); }
.btn.alt:hover { background: var(--brand-soft); color: var(--brand); }
.qr-card { text-align: center; }
.card-title { margin: 0 0 10px; font-size: 1.05rem; font-weight: 700; color: var(--brand); text-align: left; }
.qr-box { display: inline-block; background: #fff; padding: 12px; border-radius: 14px; border: 1px solid var(--line); line-height: 0; }
.qr-box img, .qr-box canvas { max-width: 100%; height: auto; }
.qr-card .btn { margin-top: 12px; }

/* ---------- save-to-contacts sheet ---------- */
dialog.sheet { border: 0; padding: 0; background: var(--surface); color: var(--text); width: min(440px, calc(100vw - 24px)); max-height: calc(100vh - 24px); border-radius: 20px; box-shadow: 0 24px 60px rgba(0,0,0,.35); overflow: auto; }
dialog.sheet::backdrop { background: rgba(8, 16, 15, .55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.sheet-body { position: relative; padding: 26px 22px 22px; }
.sheet-body .sheet-title { color: var(--text); font-size: 1.2rem; font-weight: 700; line-height: 1.3; margin: 0 28px 6px 0; }
.sheet-x { position: absolute; right: 10px; top: 10px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--muted); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.sheet-body label { display: block; font-weight: 600; margin: 14px 0 6px; }
.sheet-body .btn { margin-top: 16px; width: 100%; text-align: center; }
.form-err { margin: 10px 0 0; padding: 9px 12px; border-radius: 10px; background: var(--err-bg); color: var(--err-fg); font-size: .9rem; }
.form-err[hidden], [data-step][hidden], [data-pwbox][hidden] { display: none; }
.done-ico { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 1.7rem; background: var(--ok-bg); color: var(--ok-fg); margin-bottom: 10px; }
.pwbox { margin-top: 14px; padding: 14px; border-radius: 14px; background: var(--brand-soft); border: 1px dashed var(--brand); text-align: center; }
.pwbox p { margin: 0; font-size: .9rem; }
.pwbox code { display: block; font-size: 1.7rem; font-weight: 800; letter-spacing: .14em; margin: 8px 0; color: var(--text); user-select: all; }
.pwbox .warn { font-weight: 700; color: var(--err-fg); }
.sheet-actions { display: grid; gap: 0; }
@media (max-width: 899.98px) {
    dialog.sheet { margin: auto 0 0; width: 100vw; max-width: 100vw; border-radius: 22px 22px 0 0; padding-bottom: var(--safe-b); }
}

/* ---------- v2 additions: share, open-now, team, owner banner ---------- */
.leadbar button.share-btn { display: inline-flex; align-items: center; gap: 8px; justify-content: center; min-height: 44px; padding: 9px 18px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer; flex: 1 1 auto; }
.leadbar button.share-btn:hover { background: var(--surface-2); }
.open-now { margin: 2px 0 6px; font-size: .88rem; font-weight: 700; }
.open-now::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; background: var(--muted); }
.open-now.is-open { color: var(--ok-fg); }
.open-now.is-open::before { background: #22a55a; box-shadow: 0 0 0 3px color-mix(in srgb, #22a55a 25%, transparent); }
.open-now.is-closed { color: var(--err-fg); }
.open-now.is-closed::before { background: #e5484d; }
.open-now[hidden] { display: none; }
.avatar.sm { width: 48px; height: 48px; font-size: 1.1rem; }
ul.team { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
ul.team li { margin: 0; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
ul.team li:hover { border-color: var(--brand); }
ul.team img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex: none; }
ul.team span { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
ul.team a { font-weight: 700; text-decoration: none; color: var(--text); }
ul.team a:hover { color: var(--brand); }
ul.team small { font-size: .82rem; }
.owner-banner { background: var(--brand-soft); border: 1px solid var(--brand); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 16px; }
.owner-banner[hidden] { display: none; }
.owner-banner p { margin: 6px 0; font-size: .9rem; color: var(--muted); }
.owner-banner ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.owner-banner li { margin: 0; }
.owner-banner a { font-weight: 700; text-decoration: none; }
.meter { height: 8px; border-radius: 99px; background: color-mix(in srgb, var(--brand) 20%, transparent); margin-top: 8px; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.ios-hint { margin: 0; flex: 1; font-size: .88rem; line-height: 1.35; }
.ios-hint[hidden], .install-bar [hidden] { display: none !important; }

/* ---------- WhatsApp verify step ---------- */
.wa-btn { display: block; background: #1fa855; color: #fff; }
.wa-btn:hover { background: #178a45; color: #fff; }
.wa-btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.wa-wait { margin: 14px 0 0; text-align: center; color: var(--muted); font-size: .9rem; }
.wa-wait::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--brand); vertical-align: -1px; animation: wa-spin 0.9s linear infinite; }
.wa-wait[hidden] { display: none; }
@keyframes wa-spin { to { transform: rotate(360deg); } }

/* ---------- directory pages ---------- */
.dir-head { margin: 4px 0 16px; }
.dir-head p { margin: 0; }
.facets { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.facets-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; margin-right: 4px; }
.chip-link { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: .9rem; font-weight: 600; min-height: 36px; }
.chip-link:hover { border-color: var(--brand); color: var(--brand); }
.chip-link small { color: var(--muted); font-weight: 700; }
.dir-grid { display: grid; gap: 14px; grid-template-columns: 1fr; margin-top: 8px; }
.dir-card { display: flex; gap: 14px; align-items: flex-start; margin: 0; transition: border-color .15s, transform .15s; }
.dir-card:hover { border-color: var(--brand); }
.dir-card h2 { margin: 0 0 2px; font-size: 1.08rem; color: var(--text); }
.dir-card h2 a { color: inherit; text-decoration: none; }
.dir-card h2 a::after { content: ""; position: absolute; inset: 0; }
.dir-card { position: relative; }
.dir-line { margin: 0 0 6px; font-size: .88rem; }
.dir-text { margin: 0; font-size: .94rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pager { display: flex; justify-content: center; gap: 12px; margin-top: 24px; }
.pager .btn { margin: 0; }
@media (min-width: 700px) { .dir-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .dir-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- shared content components (services, journal, reviews) ---------- */
.sec-title { margin: 22px 0 10px; font-size: 1.15rem; color: var(--text); }
.sec-title small { font-size: .82rem; font-weight: 400; margin-left: 6px; }
.prose { font-size: 1.02rem; line-height: 1.75; }
.lead { font-size: 1.12rem; font-weight: 600; line-height: 1.6; }
.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }
.price { font-size: 1.35rem; font-weight: 800; color: var(--brand); margin: 6px 0 10px; }
.price.sm { font-size: 1rem; margin: 2px 0 6px; }
.ph { width: 100%; aspect-ratio: 4 / 3; display: grid; place-items: center; font-size: 3.2rem; font-weight: 800; color: var(--on-brand); background: linear-gradient(135deg, var(--brand), var(--brand-strong)); }
.by { margin: 12px 0 0; font-size: .92rem; }

.detail { display: grid; gap: 16px; margin-bottom: 16px; }
.detail-media { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); align-self: start; }
.detail-media img, .detail-media picture { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.detail-info { margin: 0; }
.detail-info .chips { margin: 8px 0 0; }
table.specs { width: 100%; border-collapse: collapse; }
table.specs th, table.specs td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.specs th { width: 38%; color: var(--muted); font-weight: 600; }
table.specs tr:last-child th, table.specs tr:last-child td { border-bottom: 0; }

.svc-grid { display: grid; gap: 14px; grid-template-columns: 1fr; margin-bottom: 8px; }
.svc-card { padding: 0; overflow: hidden; margin: 0; position: relative; transition: border-color .15s; }
.svc-card:hover { border-color: var(--brand); }
.svc-card img, .svc-card picture { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.svc-body { padding: 14px 16px 16px; }
.svc-body h2, .svc-body h3 { margin: 0 0 2px; font-size: 1.05rem; color: var(--text); }
.svc-body a { color: inherit; text-decoration: none; }
.svc-body a::after { content: ""; position: absolute; inset: 0; }

.reading { max-width: 760px; margin: 0 auto; }
.article h1 { margin: 4px 0 12px; }
.article .meta { margin: 0; font-size: .9rem; }
.article .chips { margin-top: 18px; }
dl.facts { display: grid; gap: 12px; margin: 0; }
dl.facts dt { margin: 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
dl.facts dd { margin: 2px 0 0; }
.author { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.author p { margin: 0; }
.author .btn { margin: 0 0 0 auto; }
.entry-card { display: flex; gap: 16px; align-items: flex-start; margin: 0; position: relative; }
.entry-card:hover { border-color: var(--brand); }
.entry-card h2 { margin: 0 0 4px; font-size: 1.1rem; color: var(--text); }
.entry-card h2 a { color: inherit; text-decoration: none; }
.entry-card h2 a::after { content: ""; position: absolute; inset: 0; }
.date-badge { flex: none; width: 58px; text-align: center; border-radius: 12px; background: var(--brand-soft); color: var(--brand); padding: 8px 4px; line-height: 1.1; }
.date-badge b { display: block; font-size: 1.5rem; }
.date-badge span { font-size: .72rem; font-weight: 700; text-transform: uppercase; }

.rating-summary { display: grid; gap: 20px; align-items: center; }
.rating-summary .big { margin: 0; font-size: 3.4rem; font-weight: 800; line-height: 1; color: var(--text); }
.rating-summary .score p { margin: 4px 0 0; }
.star { color: var(--star); letter-spacing: 2px; margin: 4px 0; }
.dist .row { display: grid; grid-template-columns: 30px 1fr 42px; align-items: center; gap: 10px; font-size: .88rem; margin: 4px 0; }
.bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--star); }
dl.qavg { display: grid; gap: 8px; margin: 0; }
dl.qavg div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
dl.qavg div:last-child { border-bottom: 0; padding-bottom: 0; }
dl.qavg dt, dl.qavg dd { margin: 0; font-weight: 400; }
.review-list { display: grid; gap: 14px; }
.review { display: flex; gap: 14px; align-items: flex-start; margin: 0; }
.review-main { min-width: 0; flex: 1; }
.review-main p { margin: 4px 0; }
.review-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.reply { margin-top: 12px; padding: 10px 14px; border-left: 3px solid var(--brand); background: var(--brand-soft); border-radius: 0 10px 10px 0; }
.reply p { margin: 4px 0 0; }

.prose-page { max-width: 760px; margin: 0 auto; }
.prose-page h2 { margin-top: 22px; }
.prose-page p, .prose-page li { line-height: 1.75; }

@media (min-width: 700px) {
    .svc-grid { grid-template-columns: repeat(2, 1fr); }
    .rating-summary { grid-template-columns: 220px 1fr; }
}
@media (min-width: 900px) {
    .detail { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px; }
    .svc-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- admin announcement banner ---------- */
.site-banner { background: var(--brand); color: var(--on-brand); padding: 9px 16px; text-align: center; font-size: .92rem; font-weight: 600; padding-top: calc(9px + var(--safe-t)); }
