/* --brand is set per brokerage from Settings (inline on <html>). */
:root {
  --brand: #0f766e;
  --brand-ink: #ffffff;
  --brand-soft: color-mix(in srgb, var(--brand) 10%, white);
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --surface: #ffffff;
  --border: #e4e7ec;
  --text: #15181e;
  --muted: #5f6672;
  --success: #15803d; --success-soft: #e8f6ed;
  --warn: #b45309;    --warn-soft: #fdf3e2;
  --danger: #b91c1c;  --danger-soft: #fdecec;
  --info: #1d4ed8;    --info-soft: #eaf0ff;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 6px 20px rgba(16,24,40,.06);
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand-soft: color-mix(in srgb, var(--brand) 22%, #12151b);
    --bg: #0e1015; --bg-soft: #14171e; --surface: #181b23; --border: #272b35;
    --text: #eceef2; --muted: #9aa1ad;
    --success: #4ade80; --success-soft: #10291a;
    --warn: #fbbf24;    --warn-soft: #2c230f;
    --danger: #f87171;  --danger-soft: #2e1416;
    --info: #93b4ff;    --info-soft: #142042;
    --shadow: 0 1px 2px rgba(0,0,0,.35), 0 6px 20px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
@media (prefers-color-scheme: dark) { a { color: color-mix(in srgb, var(--brand) 60%, white); } }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.xs { font-size: .78rem; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.nowrap { white-space: nowrap; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 10px; border: 1px solid transparent;
  font: 600 .95rem/1.2 inherit; cursor: pointer; white-space: nowrap; background: var(--brand); color: var(--brand-ink); }
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg-soft); filter: none; }
.btn-danger { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.btn-danger:hover { background: var(--danger-soft); filter: none; }
.btn-lg { padding: 14px 24px; font-size: 1.05rem; border-radius: 12px; }
.btn-sm { padding: 6px 12px; font-size: .85rem; border-radius: 8px; }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); cursor: pointer; }
.link-btn:hover { color: var(--text); text-decoration: underline; }

/* ---------- Forms ---------- */
label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; }
.field { margin-bottom: 16px; }
.fields { display: grid; gap: 0 16px; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); }
@media (max-width: 640px) { .fields { grid-template-columns: 1fr; } }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=datetime-local], input[type=search], select, textarea {
  width: 100%; padding: 10px 13px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 1px; border-color: var(--brand); }
input[type=color] { width: 56px; height: 40px; padding: 2px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); }
input[type=checkbox] { accent-color: var(--brand); width: 16px; height: 16px; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--danger); }
.error-text { color: var(--danger); font-size: .84rem; margin-top: 5px; }
.hint { color: var(--muted); font-size: .84rem; margin-top: 5px; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 3px; background: var(--bg-soft); }
.seg label { margin: 0; padding: 6px 14px; border-radius: 7px; cursor: pointer; font-weight: 500; }
.seg input { display: none; }
.seg label:has(input:checked) { background: var(--surface); box-shadow: var(--shadow); }

/* ---------- Cards / badges / alerts ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.card.pad-0 { padding: 0; overflow: hidden; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.card-head h3 { margin: 0; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--bg-soft); color: var(--muted); border: 1px solid var(--border); white-space: nowrap; }
.b-active, .b-confirmed, .b-accepted, .b-won, .b-qualified { background: var(--success-soft); color: var(--success); border-color: transparent; }
.b-pending, .b-requested, .b-countered, .b-showing, .b-offer { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.b-new, .b-submitted, .b-contacted { background: var(--info-soft); color: var(--info); border-color: transparent; }
.b-sold, .b-closed { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.b-lost, .b-rejected, .b-cancelled { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; font-size: .94rem; }
.alert-success { background: var(--success-soft); color: var(--success); }
.alert-error { background: var(--danger-soft); color: var(--danger); }
.alert-info { background: var(--info-soft); color: var(--info); }
.alert-warn { background: var(--warn-soft); color: var(--warn); }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); }

/* ======================= PUBLIC SITE ======================= */
.site-header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.nav { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--text); letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { color: var(--muted); font-weight: 500; padding: 8px 12px; border-radius: 8px; }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--bg-soft); text-decoration: none; }
.nav-cta { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 6px 12px; font: inherit; cursor: pointer; }
@media (max-width: 820px) {
  .menu-btn { display: block; }
  .nav { flex-wrap: wrap; height: auto; min-height: 64px; gap: 0; }
  .nav-links, .nav-cta { display: none; width: 100%; flex-direction: column; margin: 0; padding: 6px 0; }
  .nav-cta { flex-direction: row; padding-bottom: 14px; }
  .nav.open .nav-links, .nav.open .nav-cta { display: flex; }
}

.hero { position: relative; padding: 96px 0 88px; color: #fff; overflow: hidden;
  background: linear-gradient(120deg, color-mix(in srgb, var(--brand) 85%, black), color-mix(in srgb, var(--brand) 55%, #0b1324)); }
.hero::after { content: ""; position: absolute; inset: 0; opacity: .12; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='80' viewBox='0 0 120 80'%3E%3Cpath d='M10 70V40l20-16 20 16v30M60 70V30l25-20 25 20v40' fill='none' stroke='white' stroke-width='2'/%3E%3C/svg%3E"); }
.hero .container { position: relative; z-index: 1; }
.hero h1 { max-width: 720px; }
.hero p { font-size: 1.15rem; opacity: .9; max-width: 600px; }
.search-bar { margin-top: 28px; background: var(--surface); border-radius: 16px; padding: 10px; display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 8px; max-width: 880px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.search-bar input, .search-bar select { border: 0; background: var(--bg-soft); }
@media (max-width: 720px) { .search-bar { grid-template-columns: 1fr 1fr; } .search-bar input { grid-column: 1 / -1; } .search-bar .btn { grid-column: 1 / -1; } }
.hero-stats { display: flex; gap: 28px; margin-top: 28px; flex-wrap: wrap; font-size: .95rem; opacity: .92; }
.hero-stats strong { font-size: 1.4rem; display: block; }

.section { padding: 64px 0; }
.section-soft { background: var(--bg-soft); border-block: 1px solid var(--border); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.grid { display: grid; gap: 22px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 980px) { .g-3, .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .g-2, .g-3, .g-4 { grid-template-columns: 1fr; } }

/* Listing card */
.lcard { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; color: inherit; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.lcard:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow); }
.lcard .photo { aspect-ratio: 4 / 3; }
.lcard .body { padding: 16px 18px 18px; }
.lcard .lprice { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; }
.lcard .addr { color: var(--muted); font-size: .92rem; margin-top: 2px; }
.specs { display: flex; gap: 14px; flex-wrap: wrap; font-size: .88rem; color: var(--muted); margin-top: 10px; }
.specs b { color: var(--text); }
.photo { position: relative; background: var(--bg-soft); overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo .tag { position: absolute; top: 12px; left: 12px; background: rgba(0,0,0,.6); color: #fff; font-size: .75rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.photo .tag.pending { background: #b45309; }
.photo .tag.sold { background: #b91c1c; }
.ph { width: 100%; height: 100%; display: grid; place-items: center; color: color-mix(in srgb, var(--brand) 55%, transparent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 14%, var(--bg-soft)), color-mix(in srgb, var(--brand) 4%, var(--bg-soft))); }

/* Listing detail */
.gallery { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 8px; height: 460px; border-radius: 18px; overflow: hidden; margin: 24px 0; }
.gallery .photo:first-child { grid-row: 1 / 3; }
.gallery.one { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.gallery.one .photo:first-child { grid-row: auto; }
@media (max-width: 760px) { .gallery { grid-template-columns: 1fr; grid-template-rows: none; height: auto; } .gallery .photo { aspect-ratio: 4 / 3; } .gallery .photo:not(:first-child) { display: none; } .gallery .photo:first-child { grid-row: auto; } }
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 24px; }
.thumbs a { flex: none; width: 120px; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 40px; align-items: start; }
@media (max-width: 960px) { .detail { grid-template-columns: 1fr; } }
.detail .sticky { position: sticky; top: 92px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; margin: 20px 0 28px; }
.kpis div { padding: 14px 16px; border-right: 1px solid var(--border); }
.kpis div:last-child { border-right: 0; }
.kpis strong { display: block; font-size: 1.25rem; }
.kpis span { color: var(--muted); font-size: .85rem; }
@media (max-width: 560px) { .kpis { grid-template-columns: repeat(2, 1fr); } .kpis div:nth-child(2) { border-right: 0; } .kpis div:nth-child(-n+2) { border-bottom: 1px solid var(--border); } }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 32px; margin: 0; }
.facts div { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: .95rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; } }
.feature-list { columns: 2; padding-left: 20px; }
.feature-list li { margin: 4px 0; }
@media (max-width: 560px) { .feature-list { columns: 1; } }
.agent { display: flex; gap: 14px; align-items: center; }
.avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 700; flex: none; }
.avatar.lg { width: 88px; height: 88px; font-size: 1.8rem; }

/* Filters */
.filters { display: grid; grid-template-columns: 2fr repeat(5, 1fr) auto; gap: 10px; align-items: end; }
.filters label { font-size: .78rem; color: var(--muted); }
@media (max-width: 1000px) { .filters { grid-template-columns: repeat(3, 1fr); } .filters .q { grid-column: 1 / -1; } }
@media (max-width: 560px) { .filters { grid-template-columns: 1fr 1fr; } }
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 36px; }
.pager a, .pager span { padding: 8px 14px; border: 1px solid var(--border); border-radius: 8px; color: var(--text); }
.pager .current { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }

.cta-band { border-radius: 20px; padding: 44px; color: #fff; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
  background: linear-gradient(120deg, color-mix(in srgb, var(--brand) 85%, black), color-mix(in srgb, var(--brand) 60%, #0b1324)); }
.cta-band h2 { margin: 0 0 6px; }
.cta-band p { margin: 0; opacity: .9; }
.cta-band .btn { background: #fff; color: #111; }
.site-footer { border-top: 1px solid var(--border); padding: 40px 0; margin-top: 48px; color: var(--muted); font-size: .9rem; }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px; }
.site-footer a { color: var(--muted); display: block; margin: 4px 0; }
.site-footer h4 { color: var(--text); font-size: .9rem; }
@media (max-width: 700px) { .site-footer .cols { grid-template-columns: 1fr; } }
.powered { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: .82rem; }
.preview-bar { background: var(--warn-soft); color: var(--warn); text-align: center; padding: 8px 16px; font-size: .88rem; font-weight: 500; }

/* ======================= ADMIN (CRM) ======================= */
.admin { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--bg-soft); border-right: 1px solid var(--border); padding: 18px 12px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; overflow-y: auto; }
.side .brand { padding: 4px 10px 18px; font-size: 1.02rem; }
.side .brand-mark { width: 30px; height: 30px; border-radius: 8px; }
.side nav a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 9px; color: var(--muted); font-weight: 500; font-size: .94rem; }
.side nav a:hover { background: var(--surface); color: var(--text); text-decoration: none; }
.side nav a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.side nav a .count { margin-left: auto; font-size: .72rem; background: var(--brand); color: var(--brand-ink); padding: 1px 7px; border-radius: 999px; font-weight: 700; }
.side .group { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 16px 12px 6px; font-weight: 600; }
.side .me { margin-top: auto; border-top: 1px solid var(--border); padding: 14px 10px 0; font-size: .85rem; }
.side .me strong { display: block; }
.license-pill { display: flex; align-items: center; gap: 8px; margin: 10px 2px 0; padding: 8px 10px; border-radius: 9px; font-size: .8rem; background: var(--surface); border: 1px solid var(--border); color: var(--muted); }
.license-pill:hover { text-decoration: none; color: var(--text); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); flex: none; }
.dot.warn { background: var(--warn); } .dot.bad { background: var(--danger); }
.main { padding: 28px 36px 64px; }
.topbar { display: none; }
@media (max-width: 900px) {
  .admin { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; position: static; height: auto; }
  .admin.open .side { display: flex; }
  .topbar { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); }
  .main { padding: 20px 16px 48px; }
}
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: 1.6rem; margin: 0; }
.page-head p { margin: 4px 0 0; }
.crumb { font-size: .88rem; margin-bottom: 8px; display: inline-block; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
@media (max-width: 1000px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat { padding: 18px 20px; }
.stat .k { color: var(--muted); font-size: .84rem; font-weight: 500; }
.stat .v { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; margin-top: 4px; }
.stat .s { font-size: .8rem; color: var(--muted); }

.pipeline { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--bg-soft); margin: 6px 0 14px; }
.pipeline span { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .84rem; }
.legend a { color: var(--text); display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.list { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.item { display: flex; align-items: center; gap: 14px; padding: 13px 18px; border-top: 1px solid var(--border); color: inherit; }
.item:first-child { border-top: 0; }
a.item:hover { background: var(--bg-soft); text-decoration: none; }
.item strong { display: block; font-weight: 600; }
.item .meta { font-size: .84rem; color: var(--muted); }
.thumb { width: 64px; height: 48px; border-radius: 8px; overflow: hidden; flex: none; }
.thumb .ph svg { width: 20px; height: 20px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; background: var(--bg-soft); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: color-mix(in srgb, var(--bg-soft) 60%, transparent); }
td a.rowlink { color: var(--text); font-weight: 600; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 9px 14px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-size: .93rem; }
.tabs a.active { color: var(--text); border-color: var(--brand); }
.tabs a:hover { text-decoration: none; color: var(--text); }
.tabs .n { font-size: .74rem; color: var(--muted); margin-left: 4px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar input[type=search] { max-width: 300px; }

.cols { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.cols.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1100px) { .cols, .cols.even { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 620px) { .stats[style] { grid-template-columns: minmax(0, 1fr) !important; } }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 18px 28px; }
.timeline li::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: -4px; width: 2px; background: var(--border); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ""; position: absolute; left: 0; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--brand); }
.timeline li.k-status::after, .timeline li.k-showing::after, .timeline li.k-offer::after { background: var(--brand); }
.timeline li.k-inquiry::after { border-color: var(--info); background: var(--info); }
.timeline .when { font-size: .78rem; color: var(--muted); }
.timeline .body { white-space: pre-wrap; font-size: .94rem; }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.photo-grid .tile { position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 3; border: 1px solid var(--border); }
.photo-grid .tile img { width: 100%; height: 100%; object-fit: cover; }
.photo-grid .tile .acts { position: absolute; inset: auto 0 0 0; display: flex; gap: 4px; padding: 6px; background: linear-gradient(transparent, rgba(0,0,0,.6)); }
.photo-grid .tile .acts button { font-size: .72rem; padding: 3px 8px; border-radius: 6px; border: 0; cursor: pointer; background: rgba(255,255,255,.92); color: #111; }
.photo-grid .tile .cover { position: absolute; top: 6px; left: 6px; background: var(--brand); color: var(--brand-ink); font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.drop { border: 2px dashed var(--border); border-radius: 12px; padding: 18px; text-align: center; color: var(--muted); }
dl.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 14px; margin: 0; font-size: .93rem; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; word-break: break-word; }
.keybox { font-family: ui-monospace, Consolas, monospace; font-size: .86rem; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; word-break: break-all; }
details > summary { cursor: pointer; font-weight: 600; }
details[open] > summary { margin-bottom: 12px; }
.inline { display: inline; }
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--bg-soft); }
.auth-card { width: 100%; max-width: 440px; }
.locked-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; text-align: center; }
