/* Member pages built with the page kit (pagekit.js). Colors and fonts come from CSS variables
   set per page: --pg-top (hero), --pg-ink (text on hero), --pg-accent, --pg-bg, --pg-head, --pg-body. */
.pg-body { margin: 0; background: #F4F6F5; }
.pg { --pg-top: #14284B; --pg-ink: #fff; --pg-accent: #2F8F4E; --pg-bg: #EEF3EF; --pg-head: "Newsreader", Georgia, serif; --pg-body: "Public Sans", system-ui, sans-serif;
  background: var(--pg-bg); color: #1B2433; font-family: var(--pg-body); min-height: 100vh; }
.pg-loading { padding: 40px; text-align: center; color: #64748B; }
.pg a { color: inherit; }
.pg h1, .pg h2, .pg h3 { font-family: var(--pg-head); }

/* Hero */
.pg-hero { background: var(--pg-top); color: var(--pg-ink); padding: 0 0 44px; background-size: cover; background-position: center; }
.pg-hero.has-cover { --pg-ink: #fff; color: #fff; }
.pg-bar { max-width: 1040px; margin: 0 auto; padding: 14px 20px; }
.pg-brand { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; font-weight: 700; font-size: 14px; opacity: .85; }
.pg-brand img { border-radius: 8px; }
.pg-brand:hover { opacity: 1; }
.pg-hero-in { max-width: 1040px; margin: 0 auto; padding: 18px 20px 0; display: flex; align-items: center; gap: 28px; }
.pg-headshot { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; border: 4px solid color-mix(in srgb, var(--pg-ink) 85%, transparent); flex: none; background: #fff; }
.pg-hero-text { min-width: 0; }
.pg-addr { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: .02em; opacity: .75; }
.pg-title { margin: 0; font-size: clamp(32px, 5vw, 52px); line-height: 1.08; font-weight: 700; }
.pg-tagline { margin: 10px 0 0; font-size: 19px; line-height: 1.45; opacity: .92; max-width: 640px; }
.pg-license { margin: 8px 0 0; font-size: 14px; font-weight: 600; opacity: .85; }
.pg-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.pg-layout-centered .pg-hero-in { flex-direction: column; text-align: center; }
.pg-layout-centered .pg-tagline { margin-left: auto; margin-right: auto; }
.pg-layout-centered .pg-cta { justify-content: center; }
.pg-layout-cover .pg-hero { min-height: 420px; display: flex; flex-direction: column; }
.pg-layout-cover .pg-hero-in { flex: 1; align-items: flex-end; padding-top: 80px; }
.pg-layout-cover .pg-hero:not(.has-cover) .pg-hero-in { padding-top: 60px; }

/* Buttons */
.pg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 20px; border: 2px solid var(--pg-accent); border-radius: 999px;
  background: var(--pg-accent); color: #fff !important; font: inherit; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; transition: filter .15s, transform .15s; }
.pg-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.pg-btn:focus-visible { outline: 3px solid #F2B33D; outline-offset: 2px; }
.pg-btn-ghost { background: transparent; color: inherit !important; border-color: currentColor; }
.pg-hero .pg-btn-ghost { color: var(--pg-ink) !important; }
.pg-main .pg-btn-ghost { color: var(--pg-accent) !important; border-color: var(--pg-accent); }

/* Sections */
.pg-main { max-width: 1040px; margin: -24px auto 0; padding: 0 20px 40px; display: grid; gap: 18px; position: relative; }
.pg-sec { background: #fff; border-radius: 18px; padding: 24px 26px; box-shadow: 0 1px 3px rgba(15,23,42,.08), 0 8px 24px rgba(15,23,42,.05); border-top: 4px solid var(--pg-accent); scroll-margin-top: 16px; }
.pg-h2 { margin: 0 0 14px; font-size: 26px; line-height: 1.2; color: #14213D; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pg-count { font-family: var(--pg-body); font-size: 14px; font-weight: 600; color: #64748B; }
.pg-text p { margin: 0 0 12px; font-size: 16.5px; line-height: 1.65; color: #334155; white-space: pre-line; }
.pg-text p:last-child { margin-bottom: 0; }
.pg-note { margin: 0 0 14px; color: #475569; font-size: 15.5px; }
.pg-muted { margin: 2px 0; color: #64748B; font-size: 14px; }
.pg-placeholder { margin: 0; padding: 14px 16px; border: 2px dashed #CBD5E1; border-radius: 12px; color: #64748B; font-style: italic; font-size: 14.5px; }
.pg-emptynote { text-align: center; color: #64748B; }

.pg-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.pg-card { padding: 16px 18px; border-radius: 14px; background: color-mix(in srgb, var(--pg-accent) 7%, #fff); border: 1px solid color-mix(in srgb, var(--pg-accent) 20%, #fff); }
.pg-card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.pg-card h3 { margin: 0; font-size: 19px; color: #14213D; }
.pg-card p { margin: 6px 0 0; color: #475569; font-size: 15px; line-height: 1.5; white-space: pre-line; }
.pg-price { font-weight: 800; color: var(--pg-accent); white-space: nowrap; font-size: 15px; }

.pg-hours { border-collapse: collapse; width: 100%; max-width: 420px; font-size: 16px; }
.pg-hours th, .pg-hours td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #E2E8F0; }
.pg-hours th { font-weight: 600; color: #334155; width: 45%; }
.pg-hours tr.is-today { background: color-mix(in srgb, var(--pg-accent) 10%, #fff); }
.pg-hours tr.is-today th::after { content: " · today"; font-weight: 700; color: var(--pg-accent); font-size: 13px; }
.pg-address { margin: 0 0 10px; font-size: 18px; font-weight: 600; }
.pg-sec-location .pg-btn { margin-top: 8px; }

.pg-chips, .pg-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pg-chips li { padding: 7px 14px; border-radius: 999px; background: color-mix(in srgb, var(--pg-accent) 12%, #fff); color: #14213D; font-weight: 600; font-size: 15px; }

.pg-photos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(180px, 42%), 1fr)); gap: 10px; }
.pg-photo { display: block; width: 100%; padding: 0; border: 0; border-radius: 12px; overflow: hidden; cursor: zoom-in; aspect-ratio: 4 / 3; background: #E2E8F0; }
.pg-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.pg-photo:hover img { transform: scale(1.04); }

.pg-reviews { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.pg-review { padding: 18px 20px; border-radius: 14px; background: #F8FAFC; border-left: 4px solid var(--pg-accent); }
.pg-review blockquote { margin: 0; font-family: var(--pg-head); font-size: 18px; line-height: 1.5; color: #1E293B; }
.pg-review-by { margin: 10px 0 0; font-weight: 700; color: #475569; font-size: 14px; }

.pg-faq { border-bottom: 1px solid #E2E8F0; padding: 4px 0; }
.pg-faq summary { cursor: pointer; padding: 10px 0; font-weight: 700; font-size: 16.5px; color: #14213D; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.pg-faq summary::-webkit-details-marker { display: none; }
.pg-faq summary::after { content: "+"; color: var(--pg-accent); font-size: 22px; line-height: 1; }
.pg-faq[open] summary::after { content: "–"; }
.pg-faq .pg-text { padding: 0 0 12px; }

.pg-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; max-width: 760px; }
.pg-form label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: 14px; color: #334155; }
.pg-form input, .pg-form textarea { font: inherit; font-weight: 400; font-size: 16px; padding: 10px 12px; border: 1px solid #CBD5E1; border-radius: 10px; background: #fff; color: #0F172A; }
.pg-form input:focus, .pg-form textarea:focus { outline: 3px solid color-mix(in srgb, var(--pg-accent) 35%, transparent); border-color: var(--pg-accent); }
.pg-wide { grid-column: 1 / -1; }
.pg-form-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pg-hint { font-size: 14px; }
.pg-hint.bad { color: #B91C1C; } .pg-hint.ok { color: #15803D; }
.pg .hp { position: absolute; left: -9999px; }

.pg-homes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.pg-home { border-radius: 14px; overflow: hidden; background: #F8FAFC; border: 1px solid #E2E8F0; }
.pg-home-pic { position: relative; aspect-ratio: 16 / 10; background: #E2E8F0; }
.pg-home-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pg-sold-tag { position: absolute; top: 10px; left: 10px; padding: 3px 10px; border-radius: 999px; background: #B91C1C; color: #fff; font-weight: 800; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.pg-home-body { padding: 12px 14px; }
.pg-home-body h3 { margin: 0 0 4px; font-size: 17px; }
.pg-home .pg-price { font-size: 17px; }
.pg-wx { margin: 0; font-size: 20px; font-weight: 700; }
.pg-live .mk-ask { margin-top: 14px; }

.pg-foot { max-width: 1040px; margin: 0 auto; padding: 10px 20px 40px; color: #64748B; font-size: 13.5px; text-align: center; }
.pg-foot p { margin: 4px 0; }

@media (max-width: 700px) {
  .pg-hero-in { flex-direction: column; align-items: flex-start; gap: 16px; }
  .pg-layout-centered .pg-hero-in { align-items: center; }
  .pg-headshot { width: 108px; height: 108px; }
  .pg-sec { padding: 20px 18px; border-radius: 14px; }
  .pg-h2 { font-size: 22px; }
  .pg-form { grid-template-columns: minmax(0, 1fr); }
  .pg-layout-cover .pg-hero { min-height: 340px; }
}
.pg .mk-tab.is-on { background: var(--pg-top); border-color: var(--pg-top); color: var(--pg-ink); }
.pg .mk-line { stroke: var(--pg-accent); } .pg .mk-dot { fill: var(--pg-accent); } .pg .mk-area { fill: color-mix(in srgb, var(--pg-accent) 12%, transparent); }

/* ---------- Corner chat with the page owner ---------- */
.lc-chat { position: fixed; right: 20px; bottom: 20px; z-index: 50; font-family: var(--pg-body, system-ui, sans-serif); }
.lc-chat-fab { display: flex; align-items: center; gap: 8px; height: 56px; padding: 0 20px 0 16px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--pg-accent, #1E6B47); color: #fff; font: inherit; font-weight: 700; font-size: 16px; position: relative;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .28); transition: transform .15s ease; }
.lc-chat-fab:hover { transform: translateY(-2px); }
.lc-chat-fab:focus-visible { outline: 3px solid #F2B33D; outline-offset: 3px; }
.lc-chat-ico { font-size: 22px; line-height: 1; }
.lc-chat-dot { position: absolute; top: 4px; right: 6px; width: 14px; height: 14px; border-radius: 50%; background: #E2557A; border: 2px solid #fff; }
.lc-chat.is-open .lc-chat-lbl { display: none; }
.lc-chat.is-open .lc-chat-fab { padding: 0 18px; }
.lc-chat-panel { position: absolute; right: 0; bottom: 70px; width: min(370px, calc(100vw - 32px)); max-height: min(560px, calc(100vh - 110px));
  display: flex; flex-direction: column; background: #fff; border-radius: 20px; overflow: hidden; box-shadow: 0 18px 48px rgba(15, 23, 42, .3); color: #0F172A; }
.lc-chat-panel[hidden] { display: none; }
.lc-chat-top { display: flex; align-items: center; gap: 10px; padding: 14px 14px 14px 16px; background: var(--pg-accent, #1E6B47); color: #fff; }
.lc-chat-av { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.25); display: grid; place-items: center; font-weight: 800; overflow: hidden; flex: none; }
.lc-chat-av img { width: 100%; height: 100%; object-fit: cover; }
.lc-chat-who { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; flex: 1; }
.lc-chat-who b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-chat-who small { font-size: 12px; opacity: .85; }
.lc-chat-x { width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255,255,255,.18); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
.lc-chat-start { display: grid; gap: 10px; padding: 16px; overflow-y: auto; }
.lc-chat-start[hidden], .lc-chat-thread[hidden] { display: none; }
.lc-chat-hi { margin: 0; font-size: 15px; color: #334155; }
.lc-chat-start label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; color: #334155; }
.lc-chat-start label span { font-weight: 400; color: #64748B; }
.lc-chat-start input, .lc-chat-start textarea { font: inherit; font-size: 16px; font-weight: 400; padding: 9px 11px; border: 1px solid #CBD5E1; border-radius: 10px; }
.lc-chat-go { height: 44px; border: 0; border-radius: 999px; background: var(--pg-accent, #1E6B47); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.lc-chat-go:disabled { opacity: .6; }
.lc-chat-note { margin: 0; font-size: 13px; color: #B91C1C; }
.lc-chat-thread { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.lc-chat-log { list-style: none; margin: 0; padding: 14px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; background: #F8FAFC; flex: 1; min-height: 220px; }
.lc-msg { max-width: 82%; display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border-radius: 16px; font-size: 15px; line-height: 1.45; }
.lc-msg.from-me { align-self: flex-end; background: var(--pg-accent, #1E6B47); color: #fff; border-bottom-right-radius: 4px; }
.lc-msg.from-owner { align-self: flex-start; background: #fff; border: 1px solid #E2E8F0; border-bottom-left-radius: 4px; }
.lc-msg-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.lc-msg-at { font-size: 11px; opacity: .7; align-self: flex-end; }
.lc-msg-wait { align-self: center; font-size: 13px; color: #64748B; font-style: italic; text-align: center; }
.lc-chat-send { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid #E2E8F0; }
.lc-chat-send textarea { flex: 1; font: inherit; font-size: 16px; padding: 9px 12px; border: 1px solid #CBD5E1; border-radius: 20px; resize: none; max-height: 120px; }
.lc-chat-send button { width: 42px; height: 42px; flex: none; border: 0; border-radius: 50%; background: var(--pg-accent, #1E6B47); color: #fff; font-size: 18px; cursor: pointer; }
.lc-chat-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 0; padding: 0 12px 10px; }
.lc-chat-foot .lc-chat-note { color: #15803D; }
.lc-chat-new { border: 0; background: none; color: #64748B; font: inherit; font-size: 12px; text-decoration: underline; cursor: pointer; margin-left: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 520px) {
  .lc-chat { right: 12px; bottom: 12px; }
  .lc-chat-fab { height: 52px; }
  .lc-chat-panel { position: fixed; inset: auto 8px 74px 8px; width: auto; max-height: calc(100vh - 90px); }
}
@media print { .lc-chat { display: none; } }
.lc-chat .hp { position: absolute; left: -9999px; }
.lc-chat-send textarea { width: auto; min-width: 0; }
.lc-chat .lc-chat-send { flex-direction: row; margin: 0; }
.lc-chat .lc-chat-start { margin: 0; }
/* Around my town */
.pg-town-h { margin: 14px 0 6px; font-size: 15px; text-transform: uppercase; letter-spacing: .04em; color: var(--pg-accent); }
.pg-town-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.pg-town-list li { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: #F8FAFC; border: 1px solid #E2E8F0; }
.pg-town-list a { font-weight: 600; color: inherit; text-decoration: none; }
.pg-town-list a:hover { text-decoration: underline; }
.pg-town-list small { font-size: 12.5px; color: #64748B; }

/* ---------- Member page, refreshed look ---------- */
.pg-hero { position: relative; padding-bottom: 72px; }
.pg-hero.has-town { background-size: cover; background-position: center 40%; --pg-ink: #fff; color: #fff; }
.pg-hero.has-town .pg-hero-in { padding-top: 46px; }
.pg-photo-credit { position: absolute; right: 14px; bottom: 34px; font-size: 11px; color: rgba(255,255,255,.75) !important; text-decoration: none; }
.pg-photo-credit:hover { color: #fff !important; text-decoration: underline; }
.pg-initials { display: grid; place-items: center; font-family: var(--pg-head); font-size: 52px; font-weight: 700; color: var(--pg-top);
  background: linear-gradient(135deg, #fff, color-mix(in srgb, var(--pg-accent) 25%, #fff)); }
.pg-headshot { box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.pg-facts { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pg-facts li { padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.28); font-size: 14px; font-weight: 600; backdrop-filter: blur(4px); }
.pg-layout-centered .pg-facts { justify-content: center; }
.pg-hero .pg-btn:not(.pg-btn-ghost) { background: #fff; border-color: #fff; color: var(--pg-top) !important; }

.pg-main { max-width: 1120px; margin-top: -48px; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; gap: 22px; }
.pg-main.pg-one { grid-template-columns: minmax(0, 1fr); max-width: 860px; }
.pg-col { display: grid; gap: 22px; min-width: 0; }
.pg-col-side { position: sticky; top: 16px; }
.pg-sec { border-top: 0; border-radius: 20px; box-shadow: 0 1px 2px rgba(15,23,42,.06), 0 12px 32px rgba(15,23,42,.08); }
.pg-h2 { font-size: 24px; }
.pg-h2::before { content: ""; width: 6px; height: 22px; border-radius: 3px; background: var(--pg-accent); align-self: center; }
.pg-col-side .pg-sec { padding: 20px 22px; }
.pg-col-side .pg-h2 { font-size: 19px; }
.pg-col-side .pg-h2::before { height: 18px; }
.pg-sec-about .pg-text p { font-size: 18px; line-height: 1.7; }

/* weather card */
.pg-wx2 { display: flex; align-items: center; gap: 12px; }
.pg-wx-ico { font-size: 44px; line-height: 1; }
.pg-wx-temp { font-family: var(--pg-head); font-size: 44px; font-weight: 700; color: #14213D; }
.pg-wx-info { display: flex; flex-direction: column; gap: 2px; font-size: 14.5px; color: #475569; }
.pg-wx-info b { color: #14213D; font-size: 15.5px; }

/* contact card */
.pg-contact .pg-chat-btn { width: 100%; min-height: 50px; font-size: 16px; }
.pg-formwrap { margin-top: 12px; }
.pg-formwrap summary { cursor: pointer; font-size: 14px; font-weight: 600; color: #64748B; list-style: none; text-align: center; }
.pg-formwrap summary::-webkit-details-marker { display: none; }
.pg-formwrap summary:hover { color: var(--pg-accent); text-decoration: underline; }
.pg-formwrap[open] summary { margin-bottom: 12px; }
.pg-col-side .pg-form { grid-template-columns: minmax(0, 1fr); }

/* links as buttons in the sidebar */
.pg-col-side .pg-links { flex-direction: column; }
.pg-col-side .pg-links .pg-btn { width: 100%; justify-content: flex-start; }

.pg-foot-cta { display: inline-block; margin: 8px 0 12px; padding: 10px 18px; border-radius: 999px; background: #fff; color: var(--pg-accent) !important;
  font-weight: 700; text-decoration: none; box-shadow: 0 2px 8px rgba(15,23,42,.08); }
.pg-foot-cta:hover { box-shadow: 0 4px 14px rgba(15,23,42,.14); }

@media (max-width: 900px) {
  .pg-main { grid-template-columns: minmax(0, 1fr); max-width: 860px; }
  .pg-col-side { position: static; }
}
@media (max-width: 700px) {
  .pg-hero { padding-bottom: 60px; }
  .pg-initials { font-size: 40px; }
  .pg-photo-credit { bottom: 26px; }
}
.pg-chat-tip { margin: 12px 0 0; font-size: 13.5px; color: #64748B; text-align: center; }
/* Owner's Edit button on their own page */
.lc-owner { position: fixed; top: 12px; right: 12px; z-index: 60; display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border-radius: 999px;
  background: rgba(15, 23, 42, .82); color: #fff; font: 600 13px var(--pg-body, system-ui, sans-serif); box-shadow: 0 6px 18px rgba(0,0,0,.25); backdrop-filter: blur(6px); }
.lc-owner-edit { padding: 8px 14px; border-radius: 999px; background: linear-gradient(100deg, #6D28D9, #DB2777); color: #fff !important; text-decoration: none; font-weight: 800; font-size: 14px; }
.lc-owner-edit:hover { filter: brightness(1.08); }
@media print { .lc-owner { display: none; } }

/* ---------- Markets, events & sales ---------- */
.pg-hap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pg-hap-btn { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 0; border-radius: 14px; cursor: pointer; text-align: left; color: #fff;
  font: inherit; background: var(--hap); box-shadow: 0 4px 12px var(--hap-sh); transition: transform .15s, box-shadow .15s; }
.pg-hap-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 18px var(--hap-sh); }
.pg-hap-btn:focus-visible { outline: 3px solid #F2B33D; outline-offset: 2px; }
.pg-hap-ico { font-size: 30px; line-height: 1; flex: none; }
.pg-hap-txt { display: flex; flex-direction: column; min-width: 0; }
.pg-hap-txt b { font-size: 17px; }
.pg-hap-txt small { font-size: 13px; opacity: .9; font-weight: 600; }
.pg-hap-mk, .pg-pop.pg-hap-mk { --hap: linear-gradient(100deg, #166534, #65A30D); --hap-sh: rgba(22,101,52,.28); }
.pg-hap-ev, .pg-pop.pg-hap-ev { --hap: linear-gradient(100deg, #6D28D9, #2563EB); --hap-sh: rgba(109,40,217,.28); }
.pg-hap-gs, .pg-pop.pg-hap-gs { --hap: linear-gradient(100deg, #C2410C, #D97706); --hap-sh: rgba(194,65,12,.28); }
.pg-hap-es, .pg-pop.pg-hap-es { --hap: linear-gradient(100deg, #9D174D, #7C3AED); --hap-sh: rgba(157,23,77,.28); }
.pg-pop { width: min(640px, calc(100vw - 24px)); max-height: min(80vh, 760px); padding: 0; border: 0; border-radius: 20px; overflow: hidden; font-family: var(--pg-body, system-ui, sans-serif); }
.pg-pop[open] { display: flex; flex-direction: column; }
.pg-pop::backdrop { background: rgba(15,23,42,.55); }
.pg-pop-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px; background: var(--hap); color: #fff; }
.pg-pop-head h2 { margin: 0; font-size: 20px; color: #fff; }
.pg-pop-x { width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.2); color: #fff; font-size: 22px; cursor: pointer; }
.pg-pop-body { padding: 14px 18px 18px; overflow-y: auto; }
.pg-pop-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pg-pop-list li { display: flex; flex-direction: column; gap: 2px; padding: 11px 14px; border-radius: 12px; background: #F8FAFC; border: 1px solid #E2E8F0; }
.pg-pop-list a, .pg-pop-list b { font-weight: 700; color: #14213D; text-decoration: none; }
.pg-pop-list a:hover { text-decoration: underline; }
.pg-pop-list small { color: #64748B; font-size: 13px; }
.pg-pop-empty { margin: 6px 0 10px; color: #64748B; }
.pg-pop-foot { margin: 14px 0 0; font-size: 13.5px; color: #64748B; }
.pg-pop-foot a { color: var(--pg-accent, #1E6B47); font-weight: 700; }
@media (max-width: 520px) { .pg-hap { grid-template-columns: minmax(0, 1fr); } }
/* My Page: pencil on each section */
.pg-sec { position: relative; }
.pg-edit-tools { position: absolute; top: 12px; right: 12px; z-index: 2; display: flex; gap: 6px; }
.pg-move-sec { padding: 6px 10px; border: 0; border-radius: 999px; cursor: grab; touch-action: none; background: #fff; color: #4C1D95;
  font: 700 13px var(--pg-body, system-ui, sans-serif); box-shadow: 0 2px 8px rgba(15,23,42,.18); }
.pg-move-sec:active { cursor: grabbing; }
.pg-edit-sec { position: static; padding: 6px 12px; border: 0; border-radius: 999px; cursor: pointer;
  background: linear-gradient(100deg, #6D28D9, #DB2777); color: #fff; font: 700 13px var(--pg-body, system-ui, sans-serif); box-shadow: 0 3px 10px rgba(109,40,217,.3);
  opacity: .85; transition: opacity .15s, transform .15s; }
.pg-edit-sec:hover, .pg-edit-sec:focus-visible { opacity: 1; transform: translateY(-1px); }
@media (hover: hover) { .pg-sec .pg-edit-tools { opacity: 0; transition: opacity .15s; } .pg-sec:hover .pg-edit-tools, .pg-edit-tools:focus-within { opacity: 1; } }
.pg-bio { margin: 12px 0 0; font-family: var(--pg-head); font-size: 19px; font-style: italic; line-height: 1.45; opacity: .95; max-width: 640px; }
.pg-layout-centered .pg-bio { margin-left: auto; margin-right: auto; }

.pg-dragging { opacity: .45; outline: 2px dashed #7C3AED; outline-offset: 4px; }
.pg-drag-ghost { position: fixed; z-index: 100; pointer-events: none; padding: 8px 14px; border-radius: 12px; background: #4C1D95; color: #fff;
  font: 700 14px var(--pg-body, system-ui, sans-serif); box-shadow: 0 10px 24px rgba(0,0,0,.3); }
.pg-drop-line { position: absolute; z-index: 99; height: 4px; border-radius: 4px; background: #7C3AED; pointer-events: none; box-shadow: 0 0 0 3px rgba(124,58,237,.25); }
body.pg-file-over::after { content: "Drop photos to add them to your page"; position: fixed; inset: 10px; z-index: 120; display: grid; place-items: center;
  border: 4px dashed #7C3AED; border-radius: 20px; background: rgba(124,58,237,.12); color: #4C1D95; font: 800 22px var(--pg-body, system-ui, sans-serif); pointer-events: none; }
.pg-move-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 5; min-width: 200px; display: grid; padding: 6px; border-radius: 14px; background: #fff;
  box-shadow: 0 12px 30px rgba(15,23,42,.25); border: 1px solid #E2E8F0; font-family: var(--pg-body, system-ui, sans-serif); }
.pg-move-menu button { border: 0; background: none; text-align: left; padding: 9px 12px; border-radius: 10px; font: 600 14px inherit; font-family: inherit; color: #14213D; cursor: pointer; }
.pg-move-menu button:hover, .pg-move-menu button:focus-visible { background: #F5F3FF; color: #4C1D95; outline: none; }
.pg-move-menu p { margin: 4px 8px 4px; font-size: 12px; color: #64748B; }
.pg-sec:has(.pg-move-menu) .pg-edit-tools { opacity: 1; }
/* Hobby avatar */
.pg-avatar { display: grid; place-items: center; font-size: 68px; line-height: 1; }
@media (max-width: 700px) { .pg-avatar { font-size: 52px; } }
/* My Page: the picture spot */
.pg-pic-wrap { position: relative; display: inline-flex; flex-direction: column; align-items: center; gap: 8px; border-radius: 24px; padding: 6px; transition: background .15s; }
.pg-pic-wrap.is-over { background: rgba(124,58,237,.35); outline: 3px dashed #fff; }
.pg-pic-btn { padding: 6px 14px; border: 0; border-radius: 999px; cursor: pointer; background: linear-gradient(100deg, #6D28D9, #DB2777); color: #fff;
  font: 700 13px var(--pg-body, system-ui, sans-serif); box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.pg-pic-btn:hover { filter: brightness(1.08); }

/* Header: picture on the left, name and details beside it, less height (more room for the page) */
.pg-layout-centered .pg-hero-in { flex-direction: row; text-align: left; align-items: center; gap: 28px; }
.pg-layout-centered .pg-tagline, .pg-layout-centered .pg-bio { margin-left: 0; margin-right: 0; }
.pg-layout-centered .pg-cta, .pg-layout-centered .pg-facts { justify-content: flex-start; }
.pg-hero.has-town .pg-hero-in, .pg-hero .pg-hero-in { padding-top: 14px; }
.pg-hero { padding-bottom: 64px; }
.pg-hero .pg-headshot { width: 132px; height: 132px; flex: none; }
.pg-hero .pg-facts { margin-top: 10px; }
.pg-hero .pg-cta { margin-top: 14px; }
@media (max-width: 700px) {
  .pg-layout-centered .pg-hero-in, .pg-hero-in { flex-direction: row; align-items: center; gap: 16px; }
  .pg-hero .pg-headshot { width: 84px; height: 84px; }
  .pg-hero .pg-avatar { font-size: 42px; }
  .pg-hero .pg-initials { font-size: 30px; }
  .pg-hero { padding-bottom: 52px; }
}
@media (max-width: 420px) {
  .pg-layout-centered .pg-hero-in, .pg-hero-in { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* Wide screens: header lines up with the columns below, and the right-hand column rises to the top beside the name */
@media (min-width: 901px) {
  .pg-bar, .pg-hero-in { max-width: 1120px; }
  .pg-has-side .pg-hero-in { padding-right: calc(340px + 22px + 20px); }
  .pg-col-side { z-index: 3; }
  .pg-hero .pg-photo-credit { right: auto; left: 14px; }
}
.pg-private { border: 2px dashed #C9B6E8 !important; }
.pg-private-note { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: #6D28D9; }
/* My Page: About me edited right on the page */
.pg-bio-ed { display: grid; gap: 8px; margin-top: 6px; }
.pg-bio-warn { margin: 0; padding: 8px 12px; border-radius: 10px; background: #FFF6E0; border: 1px solid #F2C46B; color: #7A4B00; font-size: 13.5px; font-weight: 600; }
.pg-bio-ed textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; line-height: 1.5; padding: 10px 12px; border: 2px solid #D5DEE7; border-radius: 12px; resize: vertical; }
.pg-bio-ed textarea:focus { outline: none; border-color: var(--pg-top, #14284B); }
.pg-bio-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pg-bio-row .vt-btn { margin-top: 0; }
.pg-bio-save { padding: 7px 18px; border-radius: 999px; border: 0; background: var(--pg-top, #14284B); color: #fff; font: 600 14px/1.2 inherit; font-family: inherit; cursor: pointer; }
.pg-bio-save:disabled { opacity: .45; cursor: default; }
.pg-bio-msg { font-size: 13px; color: #2F6B3F; }
/* My Page: "Show public" switch beside the Call button */
.pg .pg-cta .pg-phone-pub { flex-direction: row; white-space: nowrap; margin: 0; width: auto; } .pg-phone-pub { display: inline-flex !important; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.35); color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; user-select: none; }
.pg-phone-pub input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pg-phone-pub-knob { position: relative; width: 34px; height: 20px; border-radius: 999px; background: rgba(255,255,255,.35); transition: background .15s; flex: none; }
.pg-phone-pub-knob::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.pg-phone-pub.is-on .pg-phone-pub-knob { background: #2F8F4E; }
.pg-phone-pub.is-on .pg-phone-pub-knob::after { transform: translateX(14px); }
.pg-phone-pub input:focus-visible + .pg-phone-pub-knob { outline: 3px solid #8FD16F; outline-offset: 2px; }
.pg-btn-off { opacity: .55; text-decoration: line-through; }
.pg-cta { align-items: center; }
/* Template backdrop: a light pattern of the template's mark behind the page */
.pg.pg-marked { background-image: var(--pg-mark); background-repeat: repeat; background-size: 120px 120px; }
/* Articles section */
.pg-articles { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; }
.pg-articles li { display: grid; gap: 2px; padding-bottom: 10px; border-bottom: 1px solid rgba(0,0,0,.07); }
.pg-articles li:last-child { border-bottom: 0; padding-bottom: 0; }
.pg-articles a { font-weight: 600; color: inherit; text-decoration: none; line-height: 1.35; }
.pg-articles a:hover { text-decoration: underline; color: var(--pg-accent); }
.pg-articles small { color: #6B7280; font-size: 12.5px; }
/* Videos & pictures */
.pg-media { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.pg-media li { border-radius: 12px; overflow: hidden; background: #111; aspect-ratio: 4 / 3; }
.pg-media img, .pg-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pg-media video { object-fit: contain; }
.pg-media-add { margin-top: 10px; padding: 8px 16px; border-radius: 999px; border: 2px dashed var(--pg-accent); background: #fff; color: var(--pg-top); font: 600 14px/1.2 inherit; font-family: inherit; cursor: pointer; }
.pg-media-add:hover { background: #F8FAFC; }
/* Articles: a smaller panel */
.pg-sec[data-sec="articles"], .pg-sec.pg-sec-articles { padding-top: 16px; padding-bottom: 16px; }
.pg-articles { gap: 6px; }
.pg-articles li { padding-bottom: 6px; }
.pg-articles a { font-size: 14.5px; }
/* Trade pictures behind the header: four pictures side by side, darkened so the name stays readable */
.pg-hero.has-pics { overflow: hidden; }
.pg-hero-pics { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(4, 1fr); z-index: 0; }
.pg-hero-pics > div { background-size: cover; background-position: center; }
.pg-hero-pics::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,20,30,.45), rgba(10,20,30,.8)); }
.pg-hero.has-pics > *:not(.pg-hero-pics) { position: relative; z-index: 1; }
.pg-hero.has-pics .pg-photo-credit { position: absolute; z-index: 2; }
@media (max-width: 700px) { .pg-hero-pics { grid-template-columns: repeat(2, 1fr); } .pg-hero-pics > div:nth-child(n+3) { display: none; } }
/* Page background: a bright collage of pictures that suit the template */
.pg-collage { position: fixed; inset: -40px; z-index: 0; display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: calc((100vh + 80px) / 3); gap: 14px; padding: 14px; pointer-events: none; background: var(--pg-collage-bg, #FFF8EC); }
.pg-collage-tile { background-size: cover; background-position: center; border-radius: 14px; border: 6px solid #fff; box-shadow: 0 6px 18px rgba(0,0,0,.18); filter: saturate(1.25) brightness(1.08); }
.pg-collage::after { content: ""; position: fixed; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.42)); }
.pg.has-collage { position: relative; z-index: 1; background: transparent !important; }
.pg.has-collage .pg-foot, .pg.has-collage .pg-made { text-shadow: 0 1px 2px #fff; }
@media (max-width: 700px) { .pg-collage { grid-template-columns: repeat(2, 1fr); grid-auto-rows: calc((100vh + 80px) / 4); gap: 10px; } .pg-collage-tile:nth-child(n+9) { display: none; } }
.pg.has-collage .pg-foot { background: rgba(255,255,255,.88); border-radius: 18px; max-width: 760px; margin: 24px auto 30px; padding: 14px 18px; }
/* Where I work: round map */
.pg-area-map { width: 100%; max-width: 280px; aspect-ratio: 1; margin: 4px auto 14px; border-radius: 50%; overflow: hidden; border: 5px solid #fff; box-shadow: 0 0 0 2px var(--pg-accent), 0 8px 20px rgba(0,0,0,.15); background: #E8EEF2; position: relative; z-index: 0; }
.pg-area-map .leaflet-control-attribution { font-size: 9px; background: rgba(255,255,255,.75); border-radius: 6px; margin: 0 auto 10px !important; position: relative; left: 50%; transform: translateX(-50%); white-space: nowrap; }
.pg-area-map .leaflet-bottom.leaflet-right { right: 50%; transform: translateX(50%); }
.pg-map-label { background: rgba(255,255,255,.92); border: 0; border-radius: 6px; box-shadow: 0 1px 4px rgba(0,0,0,.2); font: 600 11px/1.2 var(--pg-body); padding: 2px 6px; color: #1F2937; }
.pg-map-label::before { display: none; }
/* My Page: activity panel at the bottom (owner only) */
.pg-stats { max-width: 1120px; margin: 26px auto 0; padding: 22px 24px; background: #fff; border-radius: 20px; box-shadow: 0 6px 24px rgba(15,23,42,.10); position: relative; z-index: 1; }
.pg-stats-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pg-stats-head .pg-h2 { margin: 0; }
.pg-stats-days { display: flex; gap: 6px; }
.pg-stats-day { padding: 6px 12px; border-radius: 999px; border: 1px solid #CBD5E1; background: #fff; font: 600 13px/1.2 var(--pg-body); cursor: pointer; color: #1F2937; }
.pg-stats-day.is-on { background: var(--pg-top); border-color: var(--pg-top); color: #fff; }
.pg-stats-note { margin: 6px 0 14px; font-size: 13px; color: #64748B; }
.pg-stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pg-stat { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid #E2E8F0; border-radius: 14px; background: #FAFBFC; }
.pg-stat b { font: 700 28px/1.1 var(--pg-head); color: var(--pg-top); }
.pg-stat span { font-size: 14px; color: #334155; }
.pg-stat small { font-size: 12px; color: #64748B; }
.pg-stats-h { margin: 18px 0 8px; font-size: 14px; color: #334155; }
.pg-stats-bars { display: flex; align-items: flex-end; gap: 3px; height: 70px; padding: 6px; background: #F8FAFC; border-radius: 12px; }
.pg-stats-bars i { flex: 1; background: var(--pg-accent); border-radius: 3px 3px 0 0; min-width: 3px; }
.pg-stats-two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.pg-stats-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pg-stats-list li { display: flex; justify-content: space-between; font-size: 14px; border-bottom: 1px dashed #E2E8F0; padding: 3px 0; }
@media (max-width: 800px) { .pg-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pg-stats-two { grid-template-columns: 1fr; } .pg-stats { margin: 20px 12px 0; padding: 18px; } }
button.pg-btn { cursor: pointer; font-family: inherit; }
.pg-btn.pg-share { background: transparent; }
.lc-owner-share { border: 0; cursor: pointer; font-family: inherit; background: #fff !important; color: #6D28D9 !important; box-shadow: inset 0 0 0 2px #C4B5FD; }
/* My Page: Email your customers card (in the Articles spot) */
.pg-cust-card { background: #fff; border-radius: var(--pg-radius, 18px); padding: 22px 24px; box-shadow: 0 6px 22px rgba(15,23,42,.10); }
.pg-cust-card .pb-panehead h3 { font-family: var(--pg-head); font-size: 22px; }

/* ==========================================================================
   Trustworthy Local Business Polish (My Page & Member Cards)
   ========================================================================== */

/* 1. Soften the photo collage into a warm, subtle backdrop texture */
.pg-body { background: #F7F5F0; }
body:has(.pg.has-collage) { background: #F7F5F0; } /* the page itself is transparent over the collage */
.pg-collage {
  background: #F4F1EA;
  gap: 18px;
  opacity: 0.22;
  filter: saturate(0.65) blur(1.5px);
}
.pg-collage-tile {
  border: 4px solid #FFFDF9;
  box-shadow: 0 4px 12px rgba(20, 40, 75, .08);
  filter: none;
}
.pg-collage::after {
  background: linear-gradient(180deg, rgba(247, 245, 240, .55), rgba(247, 245, 240, .82));
}

/* 2. Replace purple/pink editor controls with LocalConnect Navy & Forest Green */
.lc-owner {
  background: #14284B;
  border: 1px solid rgba(255, 255, 255, .15);
}
.lc-owner-edit,
.pg-edit-sec,
.pg-pic-btn {
  background: #1E6B47 !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(20, 40, 75, .22);
}
.lc-owner-edit:hover,
.pg-edit-sec:hover,
.pg-pic-btn:hover {
  background: #18593B !important;
  filter: none;
}
.lc-owner-share {
  background: #fff !important;
  color: #14284B !important;
  box-shadow: none;
}
.pg-move-sec {
  color: #14284B;
  border: 1px solid #D5E0D8;
}
.pg-dragging { outline-color: #1E6B47; }
.pg-drag-ghost { background: #14284B; }
.pg-drop-line { background: #1E6B47; box-shadow: 0 0 0 3px rgba(30, 107, 71, .2); }
.pg-private { border: 2px dashed #CBD5E1 !important; }
.pg-private-note { color: #1E6B47; }

/* 3. Make the public "Request a quote" form button full-width & cohesive */
.pg-col-side .pg-form .pg-form-row {
  flex-direction: column;
  align-items: stretch;
}
.pg-col-side .pg-form .pg-btn[type="submit"] {
  width: 100%;
  border-radius: 12px;
}

/* 4. Polish the "Page activity" stats panel at the bottom */
.pg-stats {
  border: 1px solid #E2E6E1;
  box-shadow: 0 2px 6px rgba(20, 40, 75, .05), 0 12px 28px rgba(20, 40, 75, .07);
}
.pg-stats-day {
  border-color: #CBD5E1;
  color: #334155;
  transition: background .15s, border-color .15s;
}
.pg-stats-day:hover { background: #F1F5F2; }
.pg-stats-day.is-on {
  background: #14284B;
  border-color: #14284B;
  color: #fff;
}
.pg-stat {
  background: #FAF9F6;
  border: 1px solid #E6E8E3;
  padding: 16px 18px;
}
.pg-stat b {
  color: #14284B;
  font-variant-numeric: tabular-nums;
}
.pg-stat span {
  font-weight: 600;
  color: #1E293B;
}

/* Activity panel: dark, aligned numbers; green only when visits went up */
.pg-stat b { color: #0F172A; font-variant-numeric: tabular-nums; }
.pg-stat small { color: #64748B; }
.pg-stat small.pg-stat-up { color: #1E6B47; font-weight: 600; }
.pg-stats-title { display: inline-flex; align-items: center; gap: 8px; }
.pg-ico { flex: none; vertical-align: -2px; }

/* Request a quote / Say hello form: one cohesive unit (same 8px corners, full-width button) */
.pg-form input, .pg-form textarea { border-radius: 8px; }
.pg-col-side .pg-form .pg-btn[type="submit"], .pg-form .pg-btn[type="submit"] { width: 100%; border-radius: 8px; }
.pg-form .pg-form-row { flex-direction: column; align-items: stretch; }

/* Owner bar: Public View · Edit Page · Activity & Leads (only the page's owner sees it) */
.lc-owner { display: none; }
body.has-owner-bar { padding-top: 56px; }
.owner-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 60; background: #14284B; color: #fff; box-shadow: 0 2px 10px rgba(20, 40, 75, .25); }
.owner-bar__inner { max-width: 1100px; margin: 0 auto; height: 56px; padding: 0 16px; display: flex; align-items: center; gap: 16px; }
.owner-bar__status { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; white-space: nowrap; }
.owner-dot { width: 9px; height: 9px; border-radius: 50%; background: #34D399; box-shadow: 0 0 0 3px rgba(52, 211, 153, .25); }
.owner-tabs { display: flex; gap: 4px; margin: 0 auto; background: rgba(255, 255, 255, .08); padding: 4px; border-radius: 10px; }
.owner-tab { padding: 7px 14px; border-radius: 8px; color: rgba(255, 255, 255, .82) !important; text-decoration: none; font-weight: 600; font-size: 14px; white-space: nowrap; }
.owner-tab:hover { background: rgba(255, 255, 255, .1); color: #fff !important; }
.owner-tab.is-active { background: #fff; color: #14284B !important; }
.owner-share { border: 1px solid rgba(255, 255, 255, .35); background: transparent; color: #fff; padding: 7px 14px; border-radius: 8px; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }
.owner-share:hover { background: rgba(255, 255, 255, .1); }
.owner-tab__short { display: none; }
@media (max-width: 640px) {
  .owner-bar__status span:last-child { display: none; }
  .owner-tab__long { display: none; }
  .owner-tab__short { display: inline; }
  .owner-bar__inner { gap: 8px; padding: 0 8px; }
  .owner-tab { padding: 7px 9px; font-size: 13px; }
  .owner-share { padding: 7px 10px; font-size: 13px; }
}
@media print { .owner-bar { display: none; } body.has-owner-bar { padding-top: 0; } }

/* Photo viewer: pictures in "Videos & pictures" open it; captions show under the picture */
.pg-media img { cursor: zoom-in; }
.lb-caption { margin: 10px auto 0; max-width: 80vw; text-align: center; color: #fff; font-size: 15px; line-height: 1.4; }
.lb-caption[hidden] { display: none; }

/* ---- Owner bar, picture grid and photo viewer: slate style (Dec 3) ---- */
body.has-owner-bar { padding-top: 0; }
.owner-bar { position: sticky; top: 0; z-index: 100; background: #0f172a; color: #f8fafc; border-bottom: 1px solid #1e293b; box-shadow: none; padding: 10px 16px; }
.owner-bar__inner { max-width: 1080px; height: auto; padding: 0; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.owner-bar__status { font-size: 13px; font-weight: 600; color: #cbd5e1; }
.owner-dot { width: 8px; height: 8px; background: #22c55e; box-shadow: none; }
.owner-tabs { margin: 0; background: #1e293b; padding: 3px; border-radius: 8px; gap: 4px; }
.owner-tab { color: #cbd5e1 !important; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 6px; transition: background .15s, color .15s; }
.owner-tab:hover { background: transparent; color: #fff !important; }
.owner-tab.is-active { background: #fff; color: #0f172a !important; }
.owner-share { font-size: 13px; padding: 6px 12px; border-radius: 6px; border-color: #334155; color: #f8fafc; }
.owner-share:hover { background: #fff; color: #0f172a; }
@media (max-width: 640px) { .owner-bar { padding: 8px 10px; } .owner-bar__inner { flex-wrap: nowrap; gap: 8px; } .owner-tab { padding: 6px 9px; } }

/* Videos & pictures: thumbnails */
.pg-media { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.pg-media li { border: 1px solid #e2e8f0; border-radius: 8px; background: #f1f5f9; }
.pg-media img { transition: transform .2s ease; }
.pg-media li:hover img { transform: scale(1.03); }

/* Photo viewer */
.lightbox { max-width: 92vw; max-height: 92vh; }
.lightbox[open] { display: flex; flex-direction: column; align-items: center; }
.lightbox::backdrop { background: rgba(15, 23, 42, .88); backdrop-filter: blur(4px); }
.lightbox img { max-width: 88vw; max-height: 78vh; object-fit: contain; border-radius: 10px; box-shadow: 0 20px 40px rgba(0, 0, 0, .5); }
.lb-caption { color: #f1f5f9; font-size: 14px; margin-top: 12px; }
.lb-btn { width: 40px; height: 40px; display: grid; place-items: center; font-size: 22px; background: rgba(15, 23, 42, .7); color: #fff; border: 1px solid rgba(255, 255, 255, .2); }
.lb-btn:hover { background: #fff; color: #0f172a; }
.lb-prev { left: 20px; } .lb-next { right: 20px; }
.lb-close { top: 20px; right: 20px; }
.lb-btn[hidden] { display: none; }

/* Videos & pictures: caption under each item; in My Page, a caption box and Remove */
.pg-media li.pg-media-item { aspect-ratio: auto; background: transparent; border: 0; border-radius: 0; overflow: visible; display: flex; flex-direction: column; gap: 6px; margin: 0; }
.pg-media-frame { aspect-ratio: 4 / 3; border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; background: #f1f5f9; }
.pg-media-frame:has(video) { background: #0f172a; }
.pg-media-frame img, .pg-media-frame video { width: 100%; height: 100%; display: block; object-fit: cover; }
.pg-media-frame video { object-fit: contain; }
.pg-media li:hover img { transform: none; }
.pg-media-frame:hover img { transform: scale(1.03); }
.pg-media-cap { margin: 0; font-size: 13px; line-height: 1.35; color: #475569; }
.pg-media-ed { display: flex; flex-direction: column; gap: 4px; }
.pg-media-cap-in { width: 100%; box-sizing: border-box; padding: 7px 9px; border: 1px solid #cbd5e1; border-radius: 6px; font: inherit; font-size: 13px; color: #0f172a; background: #fff; }
.pg-media-cap-in:focus { outline: 2px solid #1E6B47; outline-offset: 0; border-color: #1E6B47; }
.pg-media-ed-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 22px; }
.pg-media-st { font-size: 12px; color: #1E6B47; }
.pg-media-st.bad { color: #b91c1c; }
.pg-media-rm { border: 0; background: none; padding: 2px 0; font: inherit; font-size: 12px; font-weight: 600; color: #b91c1c; cursor: pointer; }
.pg-media-rm:hover { text-decoration: underline; }
.pg-media-rm.is-armed { background: #b91c1c; color: #fff; padding: 2px 8px; border-radius: 6px; text-decoration: none; }

/* Caption styles from the design notes (Dec 3) */
.pg-media li.pg-media-item { gap: 8px; }
.pg-media-cap { line-height: 1.4; }
.pg-media-cap:empty { display: none; }
.pg-media-ed { gap: 6px; }
.pg-media-cap-in { padding: 6px 8px; transition: border-color .15s, box-shadow .15s; }
.pg-media-cap-in:focus { outline: none; border-color: #e86c3a; box-shadow: 0 0 0 3px rgba(232, 108, 58, .15); }
.pg-media-ed-row { min-height: 20px; }
.pg-media-st { font-size: 11px; font-weight: 600; color: #16a34a; }
.pg-media-st.bad { color: #dc2626; }
.pg-media-rm { color: #dc2626; padding: 2px 4px; }
.pg-media-rm.is-armed { background: #dc2626; }
