:root {
  --blue-black: #0D1529;
  --orange: #E16C35;
  --teal: #5BB6BC;
  --cream: #F4F1E0;
  --ink: #0D1529;
  --muted: #5b6172;
  --line: #e4e2d6;
  --white: #fff;
}
* { box-sizing: border-box; }
/* buyer/admin split: elements tagged .admin-only are hidden (via [hidden]) unless ?admin=1 */
[hidden] { display: none !important; }
body {
  margin: 0; font-family: Inter, "GT America", system-ui, sans-serif;
  color: var(--ink); background: var(--cream); height: 100vh; display: flex; flex-direction: column;
}

/* top bar */
.topbar {
  display: flex; align-items: center; gap: 24px; padding: 12px 20px;
  background: var(--blue-black); color: var(--cream); flex: none;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  font-weight: 700; font-size: 18px; letter-spacing: 1px; color: var(--blue-black);
  background: var(--orange); padding: 6px 9px; border-radius: 6px;
}
.brand-name { font-weight: 600; font-size: 15px; }
.brand-sub { font-size: 12px; color: #b9bdc9; }
.geo-status {
  font-size: 12px; padding: 4px 10px;
  background: var(--white); color: var(--muted); border-radius: 6px; box-shadow: 0 3px 10px rgba(0,0,0,.2);
}
/* the address-lookup status now lives inline under the hero search */
.hero .geo-status { display: inline-block; margin: 12px auto 0; }
.geo-status.err { color: #b4501f; }
.home-pin { font-size: 24px; line-height: 1; filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)); }
.proto-tag { font-size: 11px; color: var(--blue-black); background: var(--teal); padding: 4px 9px; border-radius: 20px; font-weight: 600; }
.proto-tag.admin { background: var(--orange); color: #fff; }
.leaflet-marker-draggable { cursor: grab; }
.leaflet-marker-draggable:active { cursor: grabbing; }

main { flex: 1; display: flex; min-height: 0; position: relative; }

/* filters */
.filters { width: 250px; flex: none; background: var(--white); border-right: 1px solid var(--line); padding: 18px; overflow-y: auto; }
.filter-group { margin-bottom: 22px; }
.filter-group h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin: 0 0 10px; }
.check, .radio { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 4px 0; cursor: pointer; }
.check input, .radio input { accent-color: var(--orange); }
#f-categories .check span.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
#f-neighborhood { width: 100%; padding: 8px; border-radius: 7px; border: 1px solid var(--line); font-family: inherit; font-size: 13px; background: var(--white); }
#f-radius { width: 100%; accent-color: var(--orange); cursor: pointer; }
.radius-val { font-size: 13px; font-weight: 600; margin-top: 4px; }
.radius-hint { font-size: 11px; color: var(--muted); margin-top: 4px; font-style: italic; }
.filter-group.disabled { opacity: 0.55; }
.filter-group.disabled #f-radius { cursor: not-allowed; }
.reset { width: 100%; padding: 8px; border: 1px solid var(--line); background: var(--cream); border-radius: 7px; cursor: pointer; font-family: inherit; font-size: 13px; }
.reset:hover { border-color: var(--orange); }
.count { margin-top: 14px; font-size: 12px; color: var(--muted); }

/* content */
.content { flex: 1; display: flex; flex-direction: column; min-width: 0; position: relative; }
.map-toast { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 500; background: var(--blue-black); color: var(--cream); font-size: 12px; font-weight: 500; padding: 7px 14px; border-radius: 20px; box-shadow: 0 3px 12px rgba(0,0,0,.3); pointer-events: none; }
#map { height: 42%; flex: none; z-index: 1; }
.v-drag { height: 9px; flex: none; background: var(--line); cursor: row-resize; position: relative; z-index: 2; }
.v-drag::before { content: ''; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 46px; height: 3px; border-radius: 2px; background: #b9bdc9; }
.v-drag:hover { background: var(--teal); }
.v-drag.dragging { background: var(--teal); }
.results { flex: 1; overflow-y: auto; padding: 16px 18px 30px; }
.results-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.results-head span { font-weight: 600; font-size: 14px; }
#clear-loc { border: none; background: var(--teal); color: var(--blue-black); border-radius: 16px; padding: 3px 10px; font-size: 12px; cursor: pointer; font-weight: 600; }

.hint { font-size: 13px; color: var(--muted); background: #fff; border: 1px dashed var(--line); border-radius: 8px; padding: 9px 12px; margin-bottom: 12px; }
.cta-shoot { margin-top: 24px; padding: 18px; background: var(--blue-black); color: var(--cream); border-radius: 12px; display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; text-align: center; }
.cta-shoot span { font-size: 15px; font-weight: 500; }
.cta-btn { background: var(--orange); color: #fff; border: none; border-radius: 8px; padding: 10px 18px; font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit; }
.cta-btn:hover { background: #cf5d28; }
.shoot-note { margin-top: 12px; background: #e7f3f4; color: #2c7a80; padding: 12px 14px; border-radius: 8px; font-size: 13px; line-height: 1.5; }
.lib-footer { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.footer-logo .brand-mark { font-size: 14px; padding: 4px 7px; }
.footer-logo .brand-word { font-size: 14px; }
.footer-txt { font-size: 12px; color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; cursor: pointer; transition: transform .08s, box-shadow .08s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(13,21,41,.12); }
.card-imgwrap { position: relative; }
.card img { width: 100%; height: 130px; object-fit: cover; display: block; background: #ddd; }
.badge-pop { position: absolute; top: 6px; left: 6px; background: rgba(225,108,53,.96); color: #fff; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.badge-dist { position: absolute; top: 6px; right: 6px; background: rgba(13,21,41,.82); color: #fff; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 12px; }
.tag.aerial { background: #e7eefc; color: #3a63b0; }
.card-body { padding: 8px 10px 10px; }
.card-poi { font-weight: 600; font-size: 13px; line-height: 1.25; }
.card-cat { font-size: 11px; color: var(--muted); margin-top: 2px; }
.card-tags { display: flex; gap: 5px; margin-top: 7px; flex-wrap: wrap; }
.tag { font-size: 10px; padding: 2px 7px; border-radius: 12px; background: var(--cream); color: var(--muted); }
.tag.gated { background: #fde7da; color: #b4501f; }
.tag.reshoot { background: #e7f3f4; color: #2c7a80; }

/* leaflet marker pin */
.pin { background: var(--orange); width: 16px; height: 16px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); border: 2px solid var(--white); box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.pin.gated { background: var(--teal); }
.leaflet-popup-content { font-family: Inter, sans-serif; }
.popup-poi { font-weight: 600; font-size: 13px; }
.popup-sub { font-size: 11px; color: var(--muted); }

/* click-to-request-a-shoot popup */
.req-pop { font-family: Inter, sans-serif; }
.req-name { font-weight: 700; font-size: 14px; line-height: 1.25; }
.req-addr { font-size: 11px; color: var(--muted); margin: 2px 0 8px; line-height: 1.35; }
.req-notes { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; font-family: inherit; font-size: 12px; resize: vertical; box-sizing: border-box; }
.req-go { width: 100%; margin-top: 8px; background: var(--orange); color: #fff; border: none; border-radius: 7px; padding: 8px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.req-go:hover { background: #cf5d28; }
.req-go:disabled { background: #bbb; cursor: default; }
.req-done { margin-top: 8px; background: #e7f3f4; color: #2c7a80; padding: 8px 10px; border-radius: 6px; font-size: 12px; line-height: 1.45; }

/* modal */
.modal { position: fixed; inset: 0; background: rgba(13,21,41,.6); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
.modal[hidden] { display: none; }
.modal-card { background: var(--white); border-radius: 14px; max-width: 880px; width: 100%; max-height: 90vh; display: flex; overflow: hidden; position: relative; }
.modal-close { position: absolute; top: 10px; right: 12px; border: none; background: rgba(0,0,0,.45); color: #fff; width: 30px; height: 30px; border-radius: 50%; font-size: 18px; cursor: pointer; z-index: 2; }
.modal-img { flex: 1.3; background: #111; display: flex; align-items: center; }
.modal-img img { width: 100%; max-height: 90vh; object-fit: contain; }
.modal-body { flex: 1; padding: 22px; overflow-y: auto; }
.m-poi-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.m-poi { font-size: 20px; font-weight: 700; }
.badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 14px; background: var(--orange); color: #fff; margin: 0 6px 6px 0; }
.badge.ghost { background: var(--cream); color: var(--muted); }
.m-amenity { font-size: 13px; line-height: 1.5; color: #36405a; margin: 12px 0; }
.m-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin: 16px 0; }
.m-meta dt { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.m-meta dd { margin: 2px 0 0; font-size: 13px; }
.m-flags { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.flag { font-size: 12px; padding: 7px 10px; border-radius: 7px; }
.flag.warn { background: #fde7da; color: #b4501f; }
.flag.season { background: #e7f3f4; color: #2c7a80; }
.license { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 16px; }
.price { font-size: 15px; } .price strong { color: var(--orange); font-size: 18px; }
.license-note { font-size: 11px; color: var(--muted); margin: 4px 0 12px; }
.buy { width: 100%; padding: 11px; background: var(--orange); color: #fff; border: none; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit; }
.buy:hover { background: #cf5d28; }
.buy.in { background: var(--teal); color: var(--blue-black); }
.bought { margin-top: 12px; background: #e7f3f4; color: #2c7a80; padding: 10px; border-radius: 8px; font-size: 13px; }
.link-btn { border: none; background: none; color: var(--orange); font-weight: 600; text-decoration: underline; cursor: pointer; font-family: inherit; font-size: inherit; padding: 0; }
.report { margin-top: 14px; }
.report-toggle { background: none; border: none; color: var(--muted); font-size: 12px; cursor: pointer; padding: 0; font-family: inherit; text-decoration: underline; }
.report-toggle:hover { color: var(--orange); }
.report-form { margin-top: 10px; background: var(--cream); border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.report-lead { font-size: 12px; font-weight: 600; margin: 0 0 8px; }
.rchk { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; padding: 3px 0; cursor: pointer; line-height: 1.3; }
.rchk input { accent-color: var(--orange); margin-top: 1px; }
.report-comments { width: 100%; margin-top: 8px; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; font-family: inherit; font-size: 12px; resize: vertical; box-sizing: border-box; }
.report-send { margin-top: 8px; background: var(--blue-black); color: var(--cream); border: none; border-radius: 7px; padding: 8px 14px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.report-send:disabled { background: #bbb; cursor: default; }
.report-done { margin-top: 10px; font-size: 12px; padding: 8px 10px; border-radius: 6px; background: #e7f3f4; color: #2c7a80; }
.report-done.warn { background: #fde7da; color: #b4501f; }

/* brand: "NDP" mark + "Stock" wordmark */
.brand-logo { display: flex; align-items: center; gap: 8px; }
.brand-word { font-weight: 700; font-size: 18px; letter-spacing: .3px; color: #fff; }

/* header nav: view tabs + account button */
.topnav { display: flex; gap: 4px; background: rgba(255,255,255,.08); padding: 3px; border-radius: 9px; flex: none; }
.topnav-tab { border: none; background: none; color: #b9bdc9; font-family: inherit; font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 7px; cursor: pointer; }
.topnav-tab:hover { color: var(--cream); }
.topnav-tab.active { background: var(--cream); color: var(--blue-black); }
.account-btn { border: 1px solid rgba(255,255,255,.35); background: none; color: var(--cream); font-family: inherit; font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: 8px; cursor: pointer; flex: none; }
.account-btn:hover { border-color: var(--orange); }
.account-btn.signed-in { border-color: var(--teal); }

/* pin-edit link in the modal meta */
.pin-edit-link { font-size: 11px; color: var(--orange); text-decoration: none; font-weight: 600; white-space: nowrap; }
.pin-edit-link:hover { text-decoration: underline; }

/* ---- Admin panel ---- */
.admin-panel { flex: 1; overflow-y: auto; padding: 22px 26px 40px; min-height: 0; }
.admin-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.admin-title { font-size: 18px; margin: 0; }
.admin-sub { font-size: 12px; color: var(--muted); margin: 4px 0 0; max-width: 460px; }
.admin-subtabs { display: flex; gap: 6px; }
.asub { border: 1px solid var(--line); background: var(--white); color: var(--muted); font-family: inherit; font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: 8px; cursor: pointer; }
.asub.active { background: var(--blue-black); color: var(--cream); border-color: var(--blue-black); }
.admin-count { font-size: 12px; color: var(--muted); margin-bottom: 10px; }

.atable { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.atable th, .atable td { text-align: left; padding: 10px 12px; font-size: 13px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.atable th { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); background: var(--cream); position: sticky; top: 0; }
.atable tr:last-child td { border-bottom: none; }
.atable tbody tr:hover { background: #fafaf5; }
.atable .thumb { width: 54px; height: 40px; object-fit: cover; border-radius: 5px; display: block; background: #ddd; }
.atable .poi-cell { font-weight: 600; }
.atable .sub { color: var(--muted); font-size: 11px; font-weight: 400; }
.a-pri { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 12px; }
.a-pri.high { background: #fde7da; color: #b4501f; }
.a-pri.medium { background: #fdf1d6; color: #9a6b1f; }
.a-pri.low { background: #eef0f2; color: #5b6172; }
.a-redact { font-size: 11px; color: #b4501f; }
.a-pinbtn { border: 1px solid var(--line); background: var(--cream); font-family: inherit; font-size: 12px; padding: 5px 10px; border-radius: 7px; cursor: pointer; white-space: nowrap; }
.a-pinbtn:hover { border-color: var(--orange); color: var(--orange); }
.a-coords { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.a-empty { color: var(--muted); font-size: 13px; padding: 24px; text-align: center; }

/* ---- Account panel ---- */
.account-card { max-width: 560px; width: 100%; flex-direction: column; padding: 26px; max-height: 86vh; }
.account-card h2 { margin: 0 0 4px; font-size: 20px; }
.account-lead { font-size: 13px; color: var(--muted); margin: 0 0 18px; }
.acct-field { margin-bottom: 12px; }
.acct-field label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin-bottom: 4px; }
.acct-field input { width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; font-family: inherit; font-size: 14px; }
.acct-primary { width: 100%; margin-top: 6px; padding: 11px; background: var(--orange); color: #fff; border: none; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit; }
.acct-primary:hover { background: #cf5d28; }
.acct-who { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: var(--cream); border-radius: 10px; margin-bottom: 16px; }
.acct-who .name { font-weight: 600; font-size: 14px; }
.acct-who .email { font-size: 12px; color: var(--muted); }
.acct-signout { border: none; background: none; color: var(--muted); font-size: 12px; text-decoration: underline; cursor: pointer; font-family: inherit; }
.acct-h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin: 0 0 10px; }
.acct-listing { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; }
.acct-listing-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.acct-listing-head .mls { font-weight: 700; font-size: 14px; }
.acct-listing-head .exp { font-size: 11px; color: var(--muted); }
.acct-photos { display: flex; gap: 8px; flex-wrap: wrap; }
.acct-photo { width: 76px; }
.acct-photo img { width: 76px; height: 54px; object-fit: cover; border-radius: 6px; display: block; }
.acct-dl { display: block; text-align: center; font-size: 11px; color: var(--orange); text-decoration: none; margin-top: 3px; font-weight: 600; cursor: pointer; }
.acct-dl:hover { text-decoration: underline; }
.acct-empty { color: var(--muted); font-size: 13px; padding: 18px; text-align: center; background: var(--cream); border-radius: 10px; }
/* credits */
.acct-credits { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; background: linear-gradient(120deg, #143a3d, #1c5a5f); color: #fff; border-radius: 10px; margin-bottom: 16px; }
.acct-credits .cr-label { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; opacity: .8; }
.acct-credits .cr-amt { font-size: 24px; font-weight: 700; }
.acct-credits .cr-note { font-size: 11px; opacity: .85; max-width: 150px; text-align: right; }
.promo-row { display: flex; gap: 8px; margin-bottom: 16px; }
.promo-row input { flex: 1; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; font-family: inherit; font-size: 13px; text-transform: uppercase; }
.promo-row button { border: 1px solid var(--line); background: var(--cream); border-radius: 8px; padding: 0 14px; font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.promo-row button:hover { border-color: var(--orange); color: var(--orange); }
.promo-msg { font-size: 12px; margin: -8px 0 14px; }
.promo-msg.ok { color: #2c7a80; } .promo-msg.err { color: #b4501f; }
.acct-demo { width: 100%; margin-top: 10px; padding: 11px; background: var(--teal); color: var(--blue-black); border: none; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit; }
.acct-demo:hover { filter: brightness(.95); }
.acct-or { text-align: center; font-size: 12px; color: var(--muted); margin: 12px 0 4px; }
/* checkout credit line */
.cart-credit { font-size: 13px; color: #2c7a80; margin: 4px 0 0; text-align: right; }
.cart-testnote { font-size: 12px; color: #6b6b6b; background: #f4f1e0; border-radius: 8px; padding: 8px 10px; margin: 8px 0 0; line-height: 1.4; }
.cart-testnote strong { color: #0D1529; letter-spacing: 0.3px; }
/* admin credits tab */
.admin-credits-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.acred-card { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 18px; }
.acred-card h3 { font-size: 13px; margin: 0 0 12px; }
.acred-balance { font-size: 28px; font-weight: 700; margin-bottom: 4px; }
.acred-who { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.acred-grant { display: flex; gap: 8px; }
.acred-grant input { width: 90px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; font-family: inherit; font-size: 14px; }
.acred-grant button { background: var(--orange); color: #fff; border: none; border-radius: 8px; padding: 0 16px; font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.acred-quick { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.acred-quick button { border: 1px solid var(--line); background: var(--cream); border-radius: 16px; padding: 5px 12px; font-family: inherit; font-size: 12px; cursor: pointer; }
.acred-quick button:hover { border-color: var(--orange); }
.acred-msg { font-size: 12px; color: #2c7a80; margin-top: 10px; }
.acred-note { font-size: 11px; color: var(--muted); margin-top: 12px; line-height: 1.5; }
.promo-table { width: 100%; border-collapse: collapse; }
.promo-table td { padding: 7px 0; font-size: 13px; border-bottom: 1px solid var(--line); }
.promo-table td.code { font-weight: 700; font-family: ui-monospace, monospace; }
.promo-table td.val { text-align: right; color: #2c7a80; font-weight: 600; }
.promo-table tr:last-child td { border-bottom: none; }

/* ---- Pin editor modal ---- */
.pin-card { max-width: 640px; width: 100%; flex-direction: column; padding: 20px; }
.pin-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.pin-head strong { font-size: 16px; }
.pin-coords { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pin-map { height: 360px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.pin-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.pin-hint { font-size: 12px; color: var(--muted); }
.pin-save { background: var(--orange); color: #fff; border: none; border-radius: 8px; padding: 9px 18px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.pin-save:hover { background: #cf5d28; }
.pin-saved { margin-top: 10px; background: #e7f3f4; color: #2c7a80; padding: 9px 12px; border-radius: 8px; font-size: 12px; }

/* ---- First-run hero (empty state) ---- */
/* Anchor the content toward the top (not dead-center) so the headline sits higher and
   fills the space under the header; the enlarged subtitle margin adds breathing room
   before the search bar. */
.hero { position: absolute; inset: 0; z-index: 30; background: linear-gradient(160deg, #0D1529 0%, #16233f 60%, #1c2c4c 100%); display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 34px; padding: 72px 28px 28px; }
.hero-card { max-width: 560px; text-align: center; color: var(--cream); }
.hero-card h1 { font-size: 30px; line-height: 1.15; margin: 0 0 12px; }
.hero-card p { font-size: 15px; line-height: 1.5; color: #c3c8d4; margin: 0 0 44px; }
.hero-search { display: flex; gap: 8px; background: #fff; padding: 7px; border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,.35); }
.hero-search input { flex: 1; border: none; padding: 12px 14px; font-size: 15px; font-family: inherit; border-radius: 8px; }
.hero-search input:focus { outline: none; }
.hero-search button { background: var(--orange); color: #fff; border: none; border-radius: 8px; padding: 0 18px; font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit; white-space: nowrap; }
.hero-search button:hover { background: #cf5d28; }
.hero-meta { margin-top: 16px; font-size: 13px; color: #aeb4c2; display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; }
.linklike { background: none; border: none; color: var(--teal); font-family: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; padding: 0; }

/* ---- Hero photo marquee: an auto-scrolling teaser of the library ---- */
.hero-marquee {
  width: 100%; max-width: 940px; overflow: hidden;
  /* fade the edges into the hero gradient */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.marquee-track { display: flex; width: max-content; will-change: transform; animation: hero-marquee var(--mq-duration, 65s) linear infinite; }
.hero-marquee:hover .marquee-track { animation-play-state: paused; }
.mq-item { flex: none; width: 208px; margin: 0 16px 0 0; text-align: left; text-decoration: none; color: inherit; cursor: pointer; }
.mq-item img {
  width: 208px; height: 132px; object-fit: cover; border-radius: 10px; display: block;
  background: #1c2c4c; box-shadow: 0 8px 22px rgba(0,0,0,.35); transition: box-shadow .15s, transform .15s;
}
.mq-item:hover img, .mq-item:focus-visible img { box-shadow: 0 12px 28px rgba(0,0,0,.5); transform: translateY(-2px); }
.mq-item:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 12px; }
.mq-item figcaption {
  margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--cream);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mq-item:hover figcaption { text-decoration: underline; }
/* Track holds two identical copies; app.js sets --mq-shift to one copy's pixel width so
   translateX(-shift) lands exactly on the second copy for a seamless loop. The px default
   (14 cards × 224px) keeps it correct even before app.js refines it — never a %-of-empty-box. */
@keyframes hero-marquee { from { transform: translateX(0); } to { transform: translateX(calc(-1 * var(--mq-shift, 3136px))); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ---- Listing bundle: CTA, cart bar, cart modal ---- */
.bundle-cta { display: block; width: 100%; margin-bottom: 12px; background: var(--orange); color: #fff; border: none; border-radius: 10px; padding: 12px 16px; font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit; text-align: center; }
.bundle-cta:hover { background: #cf5d28; }
.price-bundle { color: var(--muted); font-size: 12px; font-weight: 400; }
.card-add { position: absolute; bottom: 6px; right: 6px; background: rgba(255,255,255,.94); color: var(--blue-black); border: none; border-radius: 8px; width: 30px; height: 30px; font-size: 18px; font-weight: 700; cursor: pointer; line-height: 1; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.card-add:hover { background: var(--orange); color: #fff; }
.card-add.in { background: var(--teal); color: #fff; }
.cart-bar { position: fixed; bottom: 20px; right: 20px; z-index: 900; background: var(--blue-black); color: var(--cream); border-radius: 12px; padding: 12px 16px; display: flex; align-items: center; gap: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.cart-info { display: flex; flex-direction: column; line-height: 1.25; }
.cart-info strong { font-size: 14px; }
.cart-info span { font-size: 12px; color: #b9bdc9; }
.cart-open { background: var(--orange); color: #fff; border: none; border-radius: 8px; padding: 9px 16px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.cart-open:hover { background: #cf5d28; }
.cart-card { max-width: 520px; width: 100%; flex-direction: column; padding: 24px; max-height: 86vh; }
.cart-card h2 { margin: 0 0 4px; font-size: 20px; }
/* Let the cart/account contents scroll inside the fixed-height card so the checkout button is
   always reachable, even with a full 10-photo bundle. */
#cart-body, #account-body { flex: 1; min-height: 0; overflow-y: auto; }
.cart-lead { font-size: 13px; color: var(--muted); margin: 0 0 16px; }
.cart-item { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.cart-item img { width: 64px; height: 46px; object-fit: cover; border-radius: 6px; }
.cart-item .ci-name { flex: 1; font-size: 13px; font-weight: 600; }
.cart-item .ci-sub { font-size: 11px; color: var(--muted); font-weight: 400; }
.cart-item .ci-remove { border: none; background: none; color: var(--muted); cursor: pointer; font-size: 18px; }
.cart-item .ci-remove:hover { color: #b4501f; }
.cart-summary { display: flex; align-items: baseline; justify-content: space-between; margin: 16px 0 4px; }
.cart-summary .cs-total { font-size: 20px; font-weight: 700; }
.cart-summary .cs-total .cs-save { font-size: 12px; color: #2c7a80; font-weight: 600; margin-left: 8px; }
.cart-checkout { width: 100%; margin-top: 12px; padding: 12px; background: var(--orange); color: #fff; border: none; border-radius: 9px; font-size: 15px; font-weight: 600; cursor: pointer; font-family: inherit; }
.cart-checkout:hover { background: #cf5d28; }
.cart-empty { color: var(--muted); font-size: 13px; text-align: center; padding: 24px; }
.cart-done { margin-top: 12px; background: #e7f3f4; color: #2c7a80; padding: 12px; border-radius: 8px; font-size: 13px; line-height: 1.5; }

/* ---- Admin login gate ---- */
.admin-login { position: fixed; inset: 0; z-index: 2000; background: var(--blue-black); display: flex; align-items: center; justify-content: center; padding: 20px; }
.admin-login-card { background: var(--white); border-radius: 16px; padding: 34px 30px; width: 100%; max-width: 380px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.admin-login-brand { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 18px; }
.brand-word.dark { color: var(--blue-black); }
.admin-login-card h2 { margin: 0 0 6px; font-size: 20px; }
.admin-login-card p { margin: 0 0 20px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.admin-login-card input { width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px; font-family: inherit; font-size: 14px; margin-bottom: 10px; }
.admin-login-card input:focus { outline: none; border-color: var(--orange); }
#admin-login-go { width: 100%; padding: 11px; background: var(--orange); color: #fff; border: none; border-radius: 9px; font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit; }
#admin-login-go:hover { background: #cf5d28; }
.admin-login-err { margin-top: 10px; background: #fde7da; color: #b4501f; padding: 8px 10px; border-radius: 7px; font-size: 12px; }
.admin-login-back { display: inline-block; margin-top: 16px; font-size: 12px; color: var(--muted); text-decoration: none; }
.admin-login-back:hover { color: var(--orange); }

@media (max-width: 720px) {
  .filters { display: none; } #map { height: 38%; }
  .modal-card { flex-direction: column; } .modal-img { flex: none; max-height: 40vh; }
}
@media (max-width: 480px) { .brand-sub { display: none; } } /* only drop the tagline on real phones */

/* ---- Mobile phones: stop the header + hero from overflowing the viewport ---- */
@media (max-width: 640px) {
  /* Header: let items wrap instead of pushing off-screen. */
  .topbar { flex-wrap: wrap; gap: 10px 12px; padding: 10px 14px; }
  .brand { flex: 1 1 auto; min-width: 0; }

  /* Hero: keep the card inside the viewport and pull content toward the top so the
     gradient doesn't read as a huge empty band. */
  .hero { align-items: flex-start; padding: 28px 16px; }
  .hero-card { width: 100%; max-width: 100%; margin-top: 6vh; }
  .hero-card h1 { font-size: 24px; }
  .hero-card p { font-size: 14px; }

  /* Stack the address input and CTA button vertically so neither is cut off. */
  .hero-search { flex-direction: column; }
  .hero-search button { padding: 12px 18px; }
}

/* ══ Review queue ═════════════════════════════════════════════════════════════════════════ */
/* Grouped by shoot, because that is the unit anyone actually judges. */
.rv-badge { display:inline-block; min-width:18px; padding:0 5px; margin-left:6px; border-radius:9px;
  background:#E16C35; color:#fff; font-size:11px; line-height:18px; text-align:center; font-weight:600; }
.rv-warn { display:inline-block; margin-left:10px; color:#9a4a12; font-weight:600; }
.rv-shoot { border:1px solid #e4e0cf; border-radius:10px; margin:12px 0; background:#fff; overflow:hidden; }
.rv-head { display:flex; gap:12px; justify-content:space-between; align-items:flex-start;
  padding:12px 14px; border-bottom:1px solid #efece0; flex-wrap:wrap; }
.rv-meta { display:block; color:#6b6b6b; font-size:12px; margin-top:2px; }
.rv-flag { display:inline-block; margin-left:8px; padding:1px 7px; border-radius:9px;
  background:#fdf0e6; color:#9a4a12; font-size:11px; font-weight:600; }
.rv-actions { display:flex; gap:8px; flex-shrink:0; }
/* Horizontal strip, not a grid: a shoot is 5–10 frames and they are scanned, not studied. */
.rv-strip { display:flex; gap:8px; overflow-x:auto; padding:10px 14px 12px; }
.rv-thumb { flex:0 0 132px; margin:0; }
.rv-thumb img { width:132px; height:92px; object-fit:cover; border-radius:6px; display:block; background:#eee; }
.rv-thumb figcaption { font-size:11px; color:#6b6b6b; margin-top:4px; line-height:1.25;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
/* A redaction flag has to be visible on the THUMBNAIL — that is where the decision is made. */
.rv-thumb.redact img { outline:2px solid #E16C35; outline-offset:-2px; }
@media (max-width: 640px) { .rv-head { flex-direction:column; } .rv-actions { width:100%; } }

/* ── Buttons ────────────────────────────────────────────────────────────────────────────── */
/* ⚠ `.btn` had NO rule at all: the review queue's Publish/Hide have been rendering as raw
   browser buttons with a default outset border. Defining it here fixes those in place too. */
.btn { border:1px solid var(--line); background:var(--white); color:var(--ink); font-family:inherit;
  font-size:13px; font-weight:600; padding:7px 13px; border-radius:8px; cursor:pointer;
  box-sizing:border-box; white-space:nowrap; }
.btn:hover { border-color:var(--orange); color:var(--orange); }
.btn.sm { font-size:12px; padding:5px 11px; }
.btn.primary { background:var(--orange); border-color:var(--orange); color:#fff; }
.btn.primary:hover { background:#cf5d28; border-color:#cf5d28; color:#fff; }
.btn.ghost { background:var(--cream); color:var(--muted); }
.btn.warn { border-color:#e0a479; color:#9a4a12; background:#fdf3ec; }
.btn:disabled { opacity:.45; cursor:default; }
.btn:disabled:hover { border-color:var(--line); color:var(--ink); }

/* ── Review inbox (left pane) ───────────────────────────────────────────────────────────── */
.inbox-group { border-bottom:1px solid var(--line); padding-bottom:14px; }
.inbox-count { display:inline-block; min-width:18px; padding:0 5px; border-radius:9px;
  background:var(--orange); color:#fff; font-size:11px; line-height:18px; text-align:center; font-weight:700; }
.inbox-list { max-height:230px; overflow-y:auto; margin:0 -4px; }
.inbox-empty { font-size:12px; color:var(--muted); font-style:italic; padding:2px 4px; }
.inbox-row { display:flex; align-items:flex-start; gap:6px; padding:7px 8px; border-radius:8px;
  cursor:pointer; border:1px solid transparent; }
.inbox-row:hover { background:var(--cream); border-color:var(--line); }
.inbox-row.on { background:#fdf0e6; border-color:#e8c3a6; }
.inbox-main { min-width:0; flex:1; }
.inbox-title { font-size:13px; font-weight:600; line-height:1.25;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.inbox-sub { font-size:11px; color:var(--muted); margin-top:1px; }
.inbox-flags { display:flex; gap:4px; flex-wrap:wrap; margin-top:3px; }
.ib-flag { font-size:10px; font-weight:700; padding:1px 6px; border-radius:9px;
  background:#fdf0e6; color:#9a4a12; }
.ib-flag.nopin { background:#eef1f6; color:#53607a; }
/* The locate button is a separate target inside a clickable row — see its stopPropagation. */
.inbox-locate { flex:none; border:1px solid var(--line); background:var(--white); color:var(--muted);
  font-family:inherit; font-size:13px; line-height:1; width:24px; height:24px; border-radius:6px;
  cursor:pointer; padding:0; }
.inbox-locate:hover { border-color:var(--orange); color:var(--orange); }

/* ── Pending photos on the map and in the grid ──────────────────────────────────────────── */
/* Amber, and a ring: a pending shoot is on the map for review, not for sale. */
.pin.pending { background:#f0b429; box-shadow:0 0 0 3px rgba(240,180,41,.35), 0 1px 4px rgba(0,0,0,.4); }
.popup-review { margin-top:6px; padding-top:6px; border-top:1px solid var(--line);
  font-size:11px; color:#9a4a12; font-weight:600; }
.popup-btn { display:block; margin-top:5px; width:100%; border:none; background:var(--orange); color:#fff;
  font-family:inherit; font-size:11px; font-weight:700; padding:5px 9px; border-radius:6px; cursor:pointer; }
.popup-btn:hover { background:#cf5d28; }
.card.pending { border-color:#e8c3a6; }
.badge-pending { position:absolute; top:6px; left:6px; background:rgba(240,180,41,.97); color:#4a3708;
  font-size:10px; font-weight:700; padding:3px 8px; border-radius:12px; box-shadow:0 1px 4px rgba(0,0,0,.25); }
/* The popular badge shares that corner — move it aside rather than stacking the two. */
.card.pending .badge-pop { left:auto; right:6px; }
.card.pending .badge-dist { top:auto; bottom:6px; right:6px; }
.flag.pending { background:#fdf6e3; color:#7a5c12; display:flex; align-items:center;
  justify-content:space-between; gap:10px; flex-wrap:wrap; }
.flag.ok { background:#e8f4ec; color:#2c6b45; }
.flag-btn { border:1px solid #d9be7a; background:#fff; color:#7a5c12; font-family:inherit;
  font-size:11px; font-weight:700; padding:4px 9px; border-radius:6px; cursor:pointer; }
.flag-btn:hover { border-color:var(--orange); color:var(--orange); }

/* ── Per-photo review controls ──────────────────────────────────────────────────────────── */
/* Sticky, because a selection made at the top of a long queue is acted on from wherever you
   have scrolled to — a bar that scrolls away means scrolling back to use it. */
.rv-selbar { position:sticky; top:0; z-index:5; display:flex; align-items:center; gap:10px;
  flex-wrap:wrap; background:var(--blue-black); color:var(--cream); padding:9px 14px;
  border-radius:10px; margin:10px 0; box-shadow:0 2px 10px rgba(0,0,0,.18); }
.rv-selbar .rv-selspace { flex:1; }
.rv-selbar .btn { background:rgba(255,255,255,.1); border-color:rgba(255,255,255,.3); color:var(--cream); }
.rv-selbar .btn:hover { border-color:var(--teal); color:var(--teal); }
.rv-selbar .btn.primary { background:var(--orange); border-color:var(--orange); color:#fff; }
.rv-selbar .btn.primary:hover { background:#cf5d28; color:#fff; }
.rv-thumb { position:relative; }
.rv-thumb img { cursor:zoom-in; }
.rv-thumb.picked img { outline:3px solid var(--teal); outline-offset:-3px; }
.rv-pick { position:absolute; top:4px; left:4px; z-index:2; background:rgba(255,255,255,.92);
  border-radius:5px; padding:2px; line-height:0; cursor:pointer; box-shadow:0 1px 3px rgba(0,0,0,.25); }
.rv-pick input { margin:0; cursor:pointer; width:15px; height:15px; }
.rv-thumb-flag { position:absolute; top:4px; right:4px; z-index:2; background:var(--orange); color:#fff;
  font-size:11px; line-height:1; padding:3px 5px; border-radius:5px; }
.rv-thumb-ok { position:absolute; top:4px; right:4px; z-index:2; background:#2c6b45; color:#fff;
  font-size:9px; font-weight:700; line-height:1; padding:3px 5px; border-radius:5px; }
/* Revealed on hover so the strip stays scannable, but always reachable on a touch screen,
   where there is no hover and a hidden control is simply an absent one. */
.rv-thumb-acts { position:absolute; left:0; right:0; top:60px; display:flex; gap:4px;
  justify-content:center; opacity:0; transition:opacity .1s; }
.rv-thumb:hover .rv-thumb-acts, .rv-thumb.picked .rv-thumb-acts { opacity:1; }
@media (hover: none) { .rv-thumb-acts { opacity:1; } }
.rv-tact { border:none; width:26px; height:26px; border-radius:6px; cursor:pointer; font-size:13px;
  line-height:1; padding:0; color:#fff; box-shadow:0 1px 4px rgba(0,0,0,.35); font-family:inherit; }
.rv-tact.pub { background:rgba(44,107,69,.95); }
.rv-tact.pub:hover { background:#2c6b45; }
.rv-tact.hide { background:rgba(13,21,41,.85); }
.rv-tact.hide:hover { background:var(--blue-black); }
.rv-tact.flag { background:rgba(225,108,53,.95); }
.rv-tact.flag:hover { background:#cf5d28; }

/* ── Review lightbox ────────────────────────────────────────────────────────────────────── */
.rv-card { max-width:1200px; max-height:92vh; }
.rv-stage { position:relative; flex:1 1 auto; min-width:0; background:var(--blue-black);
  display:flex; align-items:center; justify-content:center; }
.rv-stage img { max-width:100%; max-height:92vh; object-fit:contain; display:block; }
.rv-nav { position:absolute; top:50%; transform:translateY(-50%); border:none; cursor:pointer;
  background:rgba(13,21,41,.55); color:#fff; font-size:30px; line-height:1; width:40px; height:64px;
  font-family:inherit; padding:0; }
.rv-nav:hover { background:rgba(13,21,41,.85); }
.rv-nav:disabled { opacity:.2; cursor:default; }
.rv-nav.prev { left:0; border-radius:0 8px 8px 0; }
.rv-nav.next { right:0; border-radius:8px 0 0 8px; }
.rv-counter { position:absolute; bottom:12px; left:50%; transform:translateX(-50%);
  background:rgba(13,21,41,.75); color:var(--cream); font-size:12px; font-weight:600;
  padding:4px 12px; border-radius:20px; }
.rv-side { flex:0 0 300px; padding:20px 22px; overflow-y:auto; display:flex; flex-direction:column; gap:12px; }
.rv-side-head strong { font-size:16px; line-height:1.3; display:block; }
.rv-badges { display:flex; gap:6px; flex-wrap:wrap; }
.rv-badge-st { font-size:11px; font-weight:700; padding:3px 9px; border-radius:12px; }
.rv-badge-st.pending { background:#fdf6e3; color:#7a5c12; }
.rv-badge-st.live { background:#e8f4ec; color:#2c6b45; text-transform:capitalize; }
.rv-badge-st.flag { background:#fde7da; color:#b4501f; }
.rv-badge-st.ok { background:#e8f4ec; color:#2c6b45; }
.rv-badge-st.warn { background:#eef1f6; color:#53607a; }
.rv-dl { margin:0; }
/* Actions pinned to the bottom of the panel, so they sit in one place however long the meta is. */
.rv-side-actions { margin-top:auto; padding-top:12px; border-top:1px solid var(--line);
  display:flex; gap:8px; flex-wrap:wrap; }
.rv-side-actions .btn { flex:1 1 auto; text-align:center; }
.rv-hint { font-size:11px; color:var(--muted); }

@media (max-width: 900px) {
  /* Stack, and cap the image: a side panel at 300px leaves nothing for the photo on a phone. */
  .rv-card { flex-direction:column; }
  .rv-stage { flex:none; max-height:46vh; }
  .rv-stage img { max-height:46vh; }
  .rv-side { flex:none; }
  .rv-side-actions { margin-top:12px; }
}

/* ⚠ Touch targets, keyed on (hover: none) and NEVER on width — a tablet in landscape is wide
   and still has no pointer, a narrow desktop window has a mouse. 44px is the floor every
   platform's guidance agrees on, and these buttons publish to a public site or remove a
   redaction flag, so a mis-tap here is not merely annoying. */
@media (hover: none) {
  /* ⚠ The thumb has to GROW with them. Three 44px buttons plus gaps need 144px and the thumb
     is 132px, so flexbox quietly shrank each one to 40px — under the floor, and invisibly so:
     the rule said 44 and the rendered box was not. Measure the box, not the declaration. */
  .rv-thumb { flex:0 0 152px; }
  .rv-thumb img { width:152px; height:106px; }
  .rv-tact { width:44px; height:44px; font-size:17px; }
  /* ⚠ BELOW the image on touch, not over it. On a mouse the overlay is fine because it only
     appears while you hover; permanently on, three 44px buttons cover the lower half of the
     very frame you are being asked to judge — hiding the evidence behind the verdict. */
  .rv-thumb-acts { position:static; opacity:1; gap:6px; margin-top:5px; }
  /* The LABEL is the tap target, not the input inside it — padding is what makes it one. */
  .rv-pick { padding:11px; }
  .rv-pick input { width:22px; height:22px; }
  .rv-actions .btn, .rv-selbar .btn, .rv-side-actions .btn { min-height:44px; font-size:13px; }
  .inbox-locate { width:44px; height:44px; font-size:16px; }
  .rv-nav { width:52px; height:76px; }
  /* ⚠ Scoped to THIS modal. `.modal-close` is shared with the buyer's photo detail and cart,
     and resizing their chrome is not what was asked for — the review lightbox is a new surface
     whose actions are destructive, so it takes the floor and the others are left alone. */
  .rv-modal .modal-close { width:44px; height:44px; font-size:24px; }
}

/* ── Danger + the app-wide toast ────────────────────────────────────────────────────────── */
/* Delete is the one irreversible control here, so it is the one that gets a colour of its own. */
.btn.danger { border-color:#c0496c; color:#a33456; background:#fdf2f5; }
.btn.danger:hover { background:#c0496c; border-color:#c0496c; color:#fff; }
/* ⚠ Fixed and body-level, NOT inside #map: the map is hidden on the Admin panel, so a refusal
   reported through the map toast while reviewing would land on an invisible element. */
.app-toast { position:fixed; left:50%; bottom:22px; transform:translateX(-50%); z-index:2000;
  max-width:min(560px, calc(100vw - 32px)); background:var(--blue-black); color:var(--cream);
  font-size:13px; line-height:1.4; padding:11px 16px; border-radius:10px;
  box-shadow:0 6px 20px rgba(0,0,0,.35); }

/* ── The "why?" dialog ──────────────────────────────────────────────────────────────────── */
.why-card { max-width:520px; flex-direction:column; padding:22px 24px; gap:10px; }
.why-card h3 { margin:0; font-size:17px; }
.why-lead { margin:0; font-size:13px; color:var(--muted); line-height:1.45; }
/* What the AI claimed, quoted back — the reviewer is confirming something specific rather
   than filling in a form about a photo. */
.why-ai { background:var(--cream); border:1px solid var(--line); border-radius:8px;
  padding:9px 11px; font-size:12px; line-height:1.45; }
.why-reasons { display:flex; flex-direction:column; gap:2px; max-height:44vh; overflow-y:auto;
  margin:2px 0; }
.why-chk { display:flex; gap:9px; align-items:flex-start; padding:7px 8px; border-radius:7px;
  cursor:pointer; font-size:13px; line-height:1.35; }
.why-chk:hover { background:var(--cream); }
.why-chk input { margin:2px 0 0; flex:none; width:16px; height:16px; cursor:pointer; }
/* The distinction the single redaction boolean could not carry — worth marking in the list,
   since "no edit saves this" is a different decision from "edit this out". */
.why-fatal { font-style:normal; font-size:10px; font-weight:700; text-transform:uppercase;
  letter-spacing:.4px; color:#a33456; background:#fdf2f5; padding:1px 6px; border-radius:9px;
  margin-left:5px; white-space:nowrap; }
.why-empty { font-size:12px; color:var(--muted); font-style:italic; margin:0; }
.why-note { width:100%; border:1px solid var(--line); border-radius:8px; padding:8px 10px;
  font-family:inherit; font-size:13px; resize:vertical; box-sizing:border-box; }
.why-foot { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.why-space { flex:1; }
.why-hint { font-size:11px; color:var(--muted); }
.why-hint.on { color:#2c6b45; font-weight:600; }

/* ── AI learning panel ──────────────────────────────────────────────────────────────────── */
.ai-note { background:#fff; border:1px solid var(--line); border-left:3px solid var(--teal);
  border-radius:8px; padding:12px 14px; margin:12px 0; font-size:13px; line-height:1.5; }
.ai-cards { display:grid; grid-template-columns:repeat(auto-fit, minmax(190px, 1fr)); gap:10px;
  margin:14px 0; }
.ai-card { background:#fff; border:1px solid var(--line); border-radius:10px; padding:14px; }
.ai-card.bad { border-color:#e0a479; background:#fdf6f1; }
.ai-val { font-size:26px; font-weight:700; line-height:1.1; }
.ai-lbl { font-size:12px; font-weight:600; text-transform:uppercase; letter-spacing:.5px;
  color:var(--muted); margin-top:2px; }
.ai-help { font-size:11px; color:var(--muted); line-height:1.4; margin-top:6px; }
.ai-h { font-size:13px; text-transform:uppercase; letter-spacing:.6px; color:var(--muted);
  margin:22px 0 8px; }
.ai-empty { font-size:13px; color:var(--muted); background:#fff; border:1px dashed var(--line);
  border-radius:8px; padding:11px 13px; line-height:1.5; }
.ai-rules { list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:8px; }
.ai-rules li { background:#fff; border:1px solid var(--line); border-radius:8px; padding:11px 13px; }
.ai-rule { font-size:13px; line-height:1.45; }
.ai-because { font-size:11px; color:var(--muted); margin-top:4px; }
.ai-raw { margin-top:10px; font-size:12px; color:var(--muted); }
.ai-raw pre { white-space:pre-wrap; background:#fff; border:1px solid var(--line);
  border-radius:8px; padding:11px 13px; font-size:12px; line-height:1.5; margin-top:6px; }
.ai-reasons { list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:4px; }
.ai-reasons li { font-size:13px; }
.ai-count { display:inline-block; min-width:34px; font-weight:700; color:var(--orange); }
.ai-assist { display:flex; gap:16px; align-items:flex-start; background:#fff;
  border:1px solid var(--line); border-radius:10px; padding:14px; }
.ai-assist p { margin:6px 0 0; font-size:13px; color:var(--muted); line-height:1.5; }
.ai-assist .ai-gate { font-size:12px; }
.ai-planned { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.5px;
  background:var(--cream); color:var(--muted); padding:2px 8px; border-radius:10px; margin-left:6px; }
.ai-switch { flex:none; display:flex; align-items:center; gap:6px; font-size:12px;
  color:var(--muted); cursor:not-allowed; }

/* ── Review extras: the unpublishable verdict + the AI's claim ──────────────────────────── */
/* Rust rather than the redaction orange: a different verdict deserves a different colour, or
   the two read as severities of one thing. */
.rv-thumb.nope img { outline:2px solid #a33456; outline-offset:-2px; }
.rv-thumb-nope { position:absolute; top:4px; right:4px; z-index:2; background:#a33456; color:#fff;
  font-size:9px; font-weight:700; line-height:1; padding:3px 5px; border-radius:5px; }
.rv-badge-st.nope { background:#fdf2f5; color:#a33456; }
.rv-claim { background:var(--cream); border:1px solid var(--line); border-radius:8px;
  padding:9px 11px; font-size:12px; line-height:1.45; }
.rv-side-actions.secondary { border-top:0; padding-top:0; margin-top:0; }

@media (hover: none) {
  .why-chk { padding:11px 8px; }
  .why-chk input { width:20px; height:20px; }
  .why-foot .btn { min-height:44px; }
}
.why-batch { background:#fdf6e3; color:#7a5c12; border-radius:8px; padding:8px 11px;
  font-size:12px; line-height:1.45; }
.flag.live { background:#e8f4ec; color:#2c6b45; display:flex; align-items:center;
  justify-content:space-between; gap:10px; flex-wrap:wrap; }
.flag.live .flag-btn { border-color:#9ac4ad; color:#2c6b45; }

/* ── Archived state + Undo ──────────────────────────────────────────────────────────────── */
/* Grey, not a warning colour: archiving is an ordinary, reversible filing decision. */
.rv-badge-st.archived { background:#eceae2; color:#5b6172; }
.btn.undo { border-color:#9ac4ad; color:#2c6b45; background:#f2f8f4; flex-basis:100%; }
.btn.undo:hover { background:#2c6b45; border-color:#2c6b45; color:#fff; }
.app-toast { display:flex; align-items:center; gap:12px; }
.toast-act { flex:none; border:1px solid rgba(255,255,255,.45); background:transparent;
  color:var(--cream); font-family:inherit; font-size:12px; font-weight:700; padding:5px 12px;
  border-radius:7px; cursor:pointer; }
.toast-act:hover { background:var(--cream); color:var(--blue-black); border-color:var(--cream); }
@media (hover: none) { .toast-act { min-height:44px; padding:0 16px; } }

/* ── Admin arrival: never flash the buyer landing page ──────────────────────────────────── */
/* Stamped on <html> before first paint by adminBoot() in app.js — see the note there. The
   hero is buyer marketing and has no business appearing to someone opening the admin view. */
html.admin-boot #hero { display: none !important; }

/* ── Search bar ─────────────────────────────────────────────────────────────────────────── */
.searchbar { position: relative; display: flex; align-items: center; margin-bottom: 12px; }
.search-ico { position: absolute; left: 12px; font-size: 17px; color: var(--muted); pointer-events: none; line-height: 1; }
#f-search { width: 100%; padding: 11px 38px 11px 34px; border: 1px solid var(--line); border-radius: 9px;
  font-family: inherit; font-size: 14px; background: var(--white); }
#f-search:focus { outline: none; border-color: var(--orange); }
#f-search::-webkit-search-cancel-button { display: none; } /* our own × below, so there aren't two */
.search-clear { position: absolute; right: 6px; border: none; background: none; color: var(--muted);
  font-size: 21px; line-height: 1; cursor: pointer; padding: 6px 9px; border-radius: 7px; }
.search-clear:hover { color: var(--orange); }

/* ── Pull to refresh ────────────────────────────────────────────────────────────────────── */
/* The in-app browser this opens in has no reload button and no native pull-to-refresh. */
.ptr-chip { display: flex; align-items: center; justify-content: center; overflow: hidden;
  font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .3px; }
.ptr-chip.ready { color: var(--orange); }
@media (hover: none) { .search-clear { padding: 11px 13px; } }

/* ── Recent actions ─────────────────────────────────────────────────────────────────────── */
.act-list { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 8px; }
.act-row { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line);
  border-radius: 9px; padding: 11px 13px; }
.act-row.undone { opacity: .6; }
.act-main { flex: 1; min-width: 0; }
.act-what { font-size: 13px; font-weight: 600; }
.act-target { font-weight: 400; color: var(--muted); margin-left: 6px; }
.act-detail { font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.45; word-break: break-word; }
.act-detail code { background: var(--cream); padding: 1px 5px; border-radius: 4px; font-size: 11px; }
.act-when { font-size: 11px; color: var(--muted); margin-top: 3px; }
.act-done { flex: none; font-size: 11px; font-weight: 700; color: #2c6b45; background: #e8f4ec;
  padding: 4px 10px; border-radius: 11px; }
.act-noundo { flex: none; font-size: 11px; color: var(--muted); }
@media (max-width: 640px) { .act-row { flex-direction: column; align-items: stretch; } }
@media (hover: none) { .act-row .btn { min-height: 44px; } }

/* A quieter second action in a map popup — "Move this pin" sits under the primary one. */
.popup-btn.ghost { background: var(--cream); color: var(--muted); border: 1px solid var(--line); }
.popup-btn.ghost:hover { background: var(--white); border-color: var(--orange); color: var(--orange); }
