/* Darna mobile prototype — app shell. Full screen on phones, phone frame on desktop. */
:root {
  --green: #125d49;
  --green-deep: #0e4b3b;
  --green-soft: #e9f2ec;
  --ink: #20352d;
  --muted: #7a857d;
  --line: #e7ebe3;
  --canvas: #f6f7f3;
  --gold: #c9a45c;
  --rent: #a17e47;
  --danger: #a23735;
  --tab-h: 66px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 500 14px/1.7 Cairo, Tahoma, Arial, sans-serif; color: var(--ink); background: var(--canvas); -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.icon { display: inline-block; vertical-align: middle; width: 20px; height: 20px; flex: 0 0 auto; }
[data-icon] { display: inline-flex; flex: 0 0 auto; width: 20px; height: 20px; }
[data-icon] svg { width: 100%; height: 100%; }

/* ── Shell ─────────────────────────────────────────────────── */
.device-intro { display: none; }
.device { position: fixed; inset: 0; }
.device-status { display: none; }
.app { position: absolute; inset: 0; overflow: hidden; background: var(--canvas); isolation: isolate; }

@media (min-width: 760px) {
  body { display: flex; align-items: center; justify-content: center; gap: 72px; min-height: 100vh; padding: 24px; background: radial-gradient(circle at 80% 10%, #dfeadf 0, transparent 45%), radial-gradient(circle at 10% 90%, #efe6d2 0, transparent 40%), #eef2ea; }
  .device-intro { display: block; max-width: 390px; }
  .device { position: relative; inset: auto; flex: 0 0 auto; width: 390px; height: min(844px, calc(100vh - 48px)); min-height: 640px; border-radius: 56px; background: #0f1c17; padding: 12px; box-shadow: 0 40px 90px rgba(16, 40, 30, .28), inset 0 0 0 2px #31443b; }
  .device:after { content: ''; position: absolute; z-index: 101; bottom: 19px; left: 50%; width: 124px; height: 5px; border-radius: 3px; background: #1d2b25; transform: translateX(-50%); pointer-events: none; }
  .device-status { display: flex; position: absolute; z-index: 100; top: 12px; right: 12px; left: 12px; height: 46px; padding: 0 30px; align-items: center; justify-content: space-between; color: var(--ink); font-size: 13px; font-weight: 800; pointer-events: none; transition: color .25s; }
  .status-light .device-status { color: #fff; }
  .island { position: absolute; left: 50%; top: 10px; width: 112px; height: 31px; border-radius: 20px; background: #0f1c17; transform: translateX(-50%); }
  .status-icons { display: flex; gap: 4px; direction: ltr; }
  .status-icons [data-icon] { width: 16px; height: 16px; }
  .app { inset: 12px; border-radius: 44px; --safe-t: 44px; --safe-b: 14px; }
}
@media (min-width: 760px) and (max-width: 980px) { .device-intro { display: none; } }

/* Desktop intro panel */
.intro-brand { display: inline-flex; align-items: center; gap: 11px; }
.intro-brand strong { display: block; font-size: 24px; line-height: 1.2; font-weight: 800; }
.intro-brand strong span { color: var(--gold); }
.intro-brand small { color: var(--muted); font-size: 11px; }
.brand-mark { width: 48px; height: 48px; padding: 12px; border-radius: 15px; background: var(--green); color: #fff; }
.device-intro h1 { margin: 28px 0 10px; font-size: 34px; line-height: 1.45; font-weight: 800; letter-spacing: -.5px; }
.device-intro h1 em { font-style: normal; color: var(--green); font-size: 26px; }
.device-intro > p { color: #5c6c61; font-size: 14px; line-height: 2; margin: 0; }
.intro-list { list-style: none; padding: 0; margin: 22px 0; display: grid; gap: 9px; }
.intro-list li { display: flex; align-items: center; gap: 11px; background: rgba(255, 255, 255, .8); border: 1px solid var(--line); border-radius: 14px; padding: 10px 13px; font-size: 13px; font-weight: 700; }
.intro-list [data-icon] { width: 32px; height: 32px; padding: 7px; border-radius: 10px; background: var(--green-soft); color: var(--green); }
.intro-links { display: flex; gap: 10px; flex-wrap: wrap; }
.intro-links [data-icon] { width: 18px; height: 18px; }
.intro-tip { margin-top: 18px !important; color: #8a9585 !important; font-size: 11.5px !important; }

/* ── Screens ───────────────────────────────────────────────── */
.screen { position: absolute; z-index: 0; inset: 0; overflow-x: hidden; overflow-y: auto; padding: calc(var(--safe-t) + 14px) 0 calc(var(--tab-h) + var(--safe-b) + 26px); opacity: 0; visibility: hidden; transition: opacity .18s, visibility .18s; scrollbar-width: none; overscroll-behavior: contain; }
.screen::-webkit-scrollbar { display: none; }
.screen.active { opacity: 1; visibility: visible; }
.map-screen { padding: 0; overflow: hidden; }

/* Home */
.home-header { padding: 0 20px; }
.home-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hello small { display: block; color: var(--muted); font-size: 11px; line-height: 1.3; }
.m-brand { font-size: 23px; line-height: 1.3; font-weight: 800; }
.m-brand span { color: var(--gold); }
.loc-chip { display: inline-flex; align-items: center; gap: 5px; max-width: 200px; padding: 6px 12px 6px 10px; border: 1px solid var(--line); border-radius: 30px; background: #fff; color: var(--green); font-size: 11.5px; font-weight: 700; }
.loc-chip [data-icon] { width: 15px; height: 15px; }
.loc-chip #loc-label { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.home-header h1 { margin: 16px 0 14px; font-size: 25px; line-height: 1.45; font-weight: 800; letter-spacing: -.4px; }
.home-header h1 em { font-style: normal; color: var(--green); }
.m-search { display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border: 1px solid var(--line); border-radius: 17px; background: #fff; box-shadow: 0 8px 22px rgba(32, 53, 45, .06); }
.m-search > [data-icon] { width: 19px; height: 19px; color: var(--muted); }
.m-search input { flex: 1; min-width: 0; height: 42px; border: 0; background: none; outline: none; font-size: 16px; }
.m-search input::placeholder { color: #a5ad9f; font-size: 13px; }
.m-search input::-webkit-search-cancel-button { filter: grayscale(1); }
.filter-btn { position: relative; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 44px; height: 44px; padding: 12px; border: 0; border-radius: 13px; background: var(--green); color: #fff; }
.filter-btn i { position: absolute; top: 8px; left: 8px; width: 9px; height: 9px; border: 2px solid var(--green); border-radius: 50%; background: var(--gold); }
.segmented { display: flex; gap: 4px; margin: 16px 20px 0; padding: 4px; border-radius: 13px; background: #ebefe7; }
.segmented button { flex: 1; height: 36px; border: 0; border-radius: 10px; background: none; color: #6f7b72; font-size: 12.5px; font-weight: 700; transition: background .2s, color .2s; }
.segmented button.active { background: #fff; color: var(--green); box-shadow: 0 2px 7px rgba(32, 53, 45, .09); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 14px 20px 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; padding: 7px 14px; border: 1px solid var(--line); border-radius: 30px; background: #fff; color: #55645a; font-size: 12px; font-weight: 700; white-space: nowrap; transition: background .2s, color .2s, border-color .2s; }
.chip [data-icon] { width: 16px; height: 16px; }
.chip.active { background: var(--green); border-color: var(--green); color: #fff; }
.block { margin-top: 22px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; padding: 0 20px; }
.block-head h2 { margin: 0; font-size: 17px; font-weight: 800; }
.link { padding: 4px 0; border: 0; background: none; color: var(--green); font-size: 12px; font-weight: 700; }
.count { color: var(--muted); font-size: 12px; }
.carousel { display: flex; gap: 14px; overflow-x: auto; padding: 0 20px 12px; scroll-snap-type: x mandatory; scroll-padding: 0 20px; scrollbar-width: none; }
.carousel::-webkit-scrollbar { display: none; }

/* Cards */
.f-card, .r-card { cursor: pointer; transition: transform .15s; -webkit-tap-highlight-color: transparent; }
.f-card:active, .r-card:active { transform: scale(.985); }
.f-card { position: relative; flex: 0 0 78%; max-width: 290px; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: 0 8px 22px rgba(32, 53, 45, .06); scroll-snap-align: start; }
.ph { position: relative; overflow: hidden; background: #e4e9dd; }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.f-card .ph { height: 168px; }
.badges { position: absolute; top: 12px; right: 12px; display: flex; gap: 5px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 7px; background: #fff; color: var(--ink); font-size: 10px; font-weight: 800; line-height: 1.8; white-space: nowrap; }
.badge.sale { color: var(--green); }
.badge.rent { color: var(--rent); }
.badge.gold { background: #d7b975; color: #443a20; }
.badge.soft { background: #f1eee4; color: #797258; }
.fav { position: absolute; z-index: 2; top: 10px; left: 10px; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 8px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .95); color: #5f6d5d; }
.fav.saved, .round.saved { color: #c0604a; }
.fav.saved svg, .round.saved svg { fill: currentColor; }
.pop { animation: pop .35s var(--ease); }
@keyframes pop { 45% { transform: scale(1.28); } }
.info { min-width: 0; }
.f-card .info { padding: 11px 14px 13px; }
.price { color: var(--green); font-size: 18px; font-weight: 800; line-height: 1.4; }
.price small { margin-right: 3px; color: #718367; font-size: 10px; font-weight: 600; }
.title { margin: 2px 0 0; overflow: hidden; font-size: 13px; font-weight: 700; line-height: 1.6; white-space: nowrap; text-overflow: ellipsis; }
.loc { display: flex; align-items: center; gap: 4px; margin: 1px 0 0; overflow: hidden; color: var(--muted); font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }
.loc .icon { width: 14px; height: 14px; }
.facts { display: flex; gap: 12px; margin-top: 8px; padding-top: 8px; border-top: 1px solid #f0f2ec; color: #5f6d63; font-size: 11px; }
.facts span { display: inline-flex; align-items: center; gap: 4px; }
.facts .icon { width: 15px; height: 15px; color: #8aa08f; }
.m-list { display: flex; flex-direction: column; gap: 12px; padding: 0 20px; }
.r-card { position: relative; display: flex; align-items: stretch; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.r-card .ph { flex: 0 0 auto; width: 104px; min-height: 104px; border-radius: 13px; }
.r-card .ph .badge { position: absolute; top: 6px; right: 6px; font-size: 9px; }
.r-card .info { flex: 1; display: flex; flex-direction: column; padding: 2px 0 0 34px; }
.r-card .facts { margin-top: auto; padding-top: 6px; border: 0; }
.r-card .fav { top: 8px; left: 8px; width: 32px; height: 32px; padding: 7px; background: #f3f6f1; }
.own-tag { position: absolute; bottom: 10px; left: 10px; padding: 0 8px; border-radius: 6px; background: var(--green-soft); color: var(--green); font-size: 9.5px; font-weight: 800; line-height: 1.9; }
.empty { margin: 8px 0; padding: 28px 20px; border: 1px dashed #d6dfd2; border-radius: 20px; background: #fff; text-align: center; }
.e-ic { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; margin: 0 auto 10px; padding: 15px; border-radius: 50%; background: var(--green-soft); color: var(--green); }
.e-ic .icon { width: 100%; height: 100%; }
.empty h3 { margin: 0; font-size: 15px; }
.empty p { margin: 4px 0 14px; color: var(--muted); font-size: 12px; }

/* Buttons & notes */
.m-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 20px; border: 1px solid transparent; border-radius: 14px; font-size: 13px; font-weight: 800; white-space: nowrap; transition: background .2s, transform .15s; }
.m-btn:active { transform: scale(.98); }
.m-btn .icon { width: 18px; height: 18px; }
.m-btn.primary { background: var(--green); color: #fff; box-shadow: 0 6px 16px rgba(18, 93, 73, .18); }
.m-btn.primary:active { background: var(--green-deep); }
.m-btn.outline { border-color: #dbe3d7; background: #fff; color: var(--ink); }
.m-btn.wa { background: #1f8f5a; color: #fff; }
.m-btn.danger { border-color: #efd3cd; background: #fff6f4; color: var(--danger); }
.m-btn.block { width: 100%; }
.m-btn:disabled { opacity: .55; }
.round { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 42px; height: 42px; padding: 10px; border: 0; border-radius: 50%; background: #fff; color: var(--ink); box-shadow: 0 4px 14px rgba(20, 40, 30, .15); }
.round.ghost { background: #edf0ea; box-shadow: none; }
.proto-note { display: flex; gap: 8px; margin: 22px 20px 0; padding: 10px 12px; border-radius: 13px; background: #eff2e8; color: #7b856c; font-size: 10.5px; line-height: 1.85; }
.proto-note [data-icon], .proto-note .icon { width: 15px; height: 15px; margin-top: 3px; }
.hint { margin: -6px 0 0; color: #8d9881; font-size: 11px; line-height: 1.8; }
.hint.ok { color: var(--green); font-weight: 700; }

/* Saved / mine */
.screen-head { padding: 4px 20px 16px; }
.screen-head h1 { margin: 0; font-size: 25px; font-weight: 800; }
.screen-head p { margin: 0; color: var(--muted); font-size: 12px; }
.add-cta { display: flex; align-items: center; gap: 12px; width: calc(100% - 40px); margin: 0 20px 16px; padding: 14px; border: 0; border-radius: 18px; background: linear-gradient(135deg, var(--green), #1c7a60); color: #fff; text-align: right; box-shadow: 0 10px 24px rgba(18, 93, 73, .22); }
.add-cta-icon { width: 42px; height: 42px; padding: 10px; border-radius: 13px; background: rgba(255, 255, 255, .16); }
.add-cta strong { display: block; font-size: 14px; }
.add-cta small { display: block; opacity: .85; font-size: 11px; }
.add-cta > span:nth-child(2) { flex: 1; }
.menu-list { margin: 22px 20px 0; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.menu-list a { display: flex; align-items: center; gap: 11px; padding: 14px; border-bottom: 1px solid #f0f2ec; font-size: 13px; font-weight: 700; }
.menu-list a:last-child { border: 0; }
.menu-list a > [data-icon]:first-child { width: 34px; height: 34px; padding: 8px; border-radius: 10px; background: var(--green-soft); color: var(--green); }
.menu-list a > [data-icon]:last-child { width: 16px; height: 16px; margin-right: auto; color: #a3ad9d; }

/* ── Tab bar ───────────────────────────────────────────────── */
.tabbar { position: absolute; z-index: 30; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; height: calc(var(--tab-h) + var(--safe-b)); padding: 0 6px var(--safe-b); border-top: 1px solid #e9ece5; background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.tabbar button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 0; border: 0; background: none; color: #8b958d; font-size: 10px; font-weight: 700; }
.tabbar button [data-icon] { width: 23px; height: 23px; }
.tabbar button b { font-weight: 700; }
.tabbar button.active { color: var(--green); }
.tabbar button.active svg { stroke-width: 2.2; }
.tabbar .tab-add { justify-content: center; width: 54px; height: 54px; margin: -24px auto 0; padding: 0; border-radius: 18px; background: var(--green); color: #fff; box-shadow: 0 10px 22px rgba(18, 93, 73, .35); }
.tabbar .tab-add [data-icon] { width: 26px; height: 26px; }
.tab-badge { position: absolute; top: 2px; left: calc(50% - 22px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #c0604a; color: #fff; font-size: 9.5px; font-style: normal; line-height: 17px; text-align: center; }

/* ── Map screen ────────────────────────────────────────────── */
.m-map { position: absolute; z-index: 0; inset: 0 0 calc(var(--tab-h) + var(--safe-b)); background: #e8ece4; }
.leaflet-container { font-family: Cairo, Tahoma, sans-serif; }
.map-top { position: absolute; z-index: 500; top: calc(var(--safe-t) + 10px); right: 14px; left: 14px; display: flex; align-items: center; gap: 8px; }
.map-pill { display: flex; flex: 1; align-items: center; gap: 8px; min-width: 0; height: 44px; padding: 0 14px; border: 0; border-radius: 22px; background: #fff; box-shadow: 0 4px 14px rgba(20, 40, 30, .15); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.map-pill [data-icon] { width: 17px; height: 17px; color: var(--green); }
.map-pill #map-summary { flex: 1; overflow: hidden; text-align: right; text-overflow: ellipsis; }
.map-cards { position: absolute; z-index: 500; right: 0; bottom: calc(var(--tab-h) + var(--safe-b) + 26px); left: 0; display: flex; gap: 10px; overflow-x: auto; padding: 4px 20px; scroll-snap-type: x mandatory; scroll-padding: 0 20px; scrollbar-width: none; }
.map-cards::-webkit-scrollbar { display: none; }
.map-cards .r-card { flex: 0 0 86%; scroll-snap-align: center; box-shadow: 0 10px 26px rgba(20, 40, 30, .16); }
.map-cards .r-card .ph { width: 88px; min-height: 88px; }
.map-cards .r-card .info { padding-left: 0; }
.map-cards .empty { flex: 1; margin: 0; box-shadow: 0 10px 26px rgba(20, 40, 30, .16); }
.m-pin-wrap { background: none; border: 0; }
.pin { position: relative; display: block; width: max-content; min-width: 58px; margin: auto; padding: 4px 10px; border: 2px solid #fff; border-radius: 9px; background: var(--green); color: #fff; font: 800 11px/1.5 Cairo, Tahoma, sans-serif; text-align: center; direction: rtl; box-shadow: 0 3px 9px rgba(20, 40, 30, .25); transition: transform .15s, background .15s; }
.pin:after { content: ''; position: absolute; left: 50%; bottom: -6px; width: 8px; height: 8px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; background: inherit; transform: translateX(-50%) rotate(45deg); }
.pin.rent { background: var(--rent); }
.pin.on { background: #1f2f27; transform: scale(1.16); }
.dot-pin { width: 34px; height: 40px; color: var(--green); filter: drop-shadow(0 3px 3px rgba(13, 51, 44, .3)); }
.dot-pin .icon { width: 34px; height: 40px; fill: #fff; stroke-width: 2; }

/* ── Pages (detail / add) ──────────────────────────────────── */
.page { position: absolute; z-index: 40; inset: 0; display: flex; flex-direction: column; background: var(--canvas); transform: translateX(-100%); transition: transform .3s var(--ease); }
.page.open { transform: none; }
.page-scroll { flex: 1; min-height: 0; overflow-x: hidden; overflow-y: auto; scrollbar-width: none; overscroll-behavior: contain; }
.page-scroll::-webkit-scrollbar { display: none; }

/* Detail */
.d-gallery { position: relative; height: 330px; background: #dfe5da; }
.d-track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.d-track::-webkit-scrollbar { display: none; }
.d-track img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: center; }
.d-gallery:after { content: ''; position: absolute; inset: 0 0 auto; height: 120px; background: linear-gradient(rgba(10, 20, 15, .4), transparent); pointer-events: none; }
.d-dots { position: absolute; right: 0; bottom: 36px; left: 0; display: flex; justify-content: center; gap: 5px; pointer-events: none; }
.d-dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .6); transition: width .2s; }
.d-dots i.on { width: 18px; background: #fff; }
.d-count { position: absolute; bottom: 32px; left: 16px; padding: 1px 8px; border-radius: 7px; background: rgba(15, 28, 23, .5); color: #fff; font-size: 10.5px; }
.d-top { position: absolute; z-index: 5; top: calc(var(--safe-t) + 8px); right: 14px; left: 14px; display: flex; gap: 8px; }
.d-top .spacer { flex: 1; }
.d-body { position: relative; margin-top: -22px; padding: 20px 20px calc(100px + var(--safe-b)); border-radius: 24px 24px 0 0; background: var(--canvas); }
.d-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.d-badges .badge { border: 1px solid var(--line); }
.d-price { margin-top: 8px; color: var(--green); font-size: 27px; font-weight: 800; line-height: 1.3; }
.d-price small { color: #718367; font-size: 12px; }
.d-meter { display: inline-block; margin-top: 4px; padding: 1px 9px; border-radius: 7px; background: #eaf0e6; color: #637559; font-size: 11px; font-weight: 700; }
.d-body h1 { margin: 8px 0 2px; font-size: 19px; line-height: 1.55; }
.d-body .loc { white-space: normal; }
.d-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; margin: 16px 0 4px; }
.d-facts div { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 10px 4px; border: 1px solid var(--line); border-radius: 14px; background: #fff; text-align: center; }
.d-facts .icon { width: 20px; height: 20px; color: var(--green); }
.d-facts strong { font-size: 13px; }
.d-facts span { color: var(--muted); font-size: 10px; }
.d-body h2 { margin: 22px 0 8px; font-size: 15px; }
.d-desc { margin: 0; color: #4d5f53; font-size: 13px; line-height: 2; }
.d-table { margin: 12px 0 0; padding: 4px 14px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.d-table div { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid #f0f2ec; font-size: 12px; }
.d-table div:last-child { border: 0; }
.d-table dt { color: var(--muted); }
.d-table dd { margin: 0; font-weight: 700; }
.d-amen { display: flex; flex-wrap: wrap; gap: 8px; }
.d-amen span { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border: 1px solid var(--line); border-radius: 30px; background: #fff; font-size: 11.5px; }
.d-amen .icon { width: 14px; height: 14px; color: var(--green); }
.d-map { position: relative; z-index: 0; height: 170px; margin-bottom: 10px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #e8ece4; }
.d-adv { display: flex; align-items: center; gap: 12px; margin-top: 22px; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.avatar { display: flex; flex: 0 0 auto; width: 46px; height: 46px; padding: 11px; border-radius: 50%; background: var(--green-soft); color: var(--green); }
.avatar .icon { width: 100%; height: 100%; }
.d-adv small { display: block; color: var(--muted); font-size: 10.5px; }
.d-adv strong { display: block; font-size: 14px; }
.owner { margin-top: 18px; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.owner h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 14px; }
.owner h3 .icon { width: 17px; height: 17px; color: var(--green); }
.owner .hint { margin: 0; }
.owner .row { display: flex; gap: 8px; margin-top: 12px; }
.owner .row .m-btn { flex: 1; height: 44px; }
.d-body .proto-note { margin: 18px 0 0; }
.d-cta { position: absolute; z-index: 5; right: 0; bottom: 0; left: 0; display: flex; gap: 10px; padding: 12px 16px calc(12px + var(--safe-b)); border-top: 1px solid var(--line); background: rgba(255, 255, 255, .96); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.d-cta .m-btn { flex: 1; }
.cta-empty { display: flex; flex: 1; align-items: center; justify-content: center; gap: 6px; padding: 12px; border-radius: 14px; background: #f1f4ed; color: var(--muted); font-size: 12px; text-align: center; }
.cta-empty .icon { width: 16px; height: 16px; }

/* Add / edit */
.add-head { display: flex; align-items: center; gap: 12px; padding: calc(var(--safe-t) + 10px) 16px 10px; }
.add-head small { display: block; color: var(--muted); font-size: 11px; line-height: 1.4; }
.add-head h2 { margin: 0; font-size: 18px; line-height: 1.4; }
.progress { height: 4px; margin: 0 16px; overflow: hidden; border-radius: 2px; background: #e3e8df; }
.progress i { display: block; width: 33.3%; height: 100%; border-radius: 2px; background: var(--green); transition: width .3s var(--ease); }
#m-form { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.add-scroll { padding: 16px 16px 24px; }
.m-step { display: flex; flex-direction: column; gap: 14px; }
.step-title { display: flex; align-items: baseline; justify-content: space-between; margin: 6px 0 -4px; font-size: 15px; font-weight: 800; }
.step-title small { color: var(--muted); font-size: 11px; font-weight: 600; }
.mini-title { display: block; margin-bottom: 8px; color: #5c6f60; font-size: 11.5px; }
.type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.type-grid label, .seg label, .radio-chips label { position: relative; }
.type-grid input, .seg input, .radio-chips input { position: absolute; opacity: 0; pointer-events: none; }
.t { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 4px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; color: #5d6c61; font-size: 12px; font-weight: 700; transition: border-color .2s, background .2s, color .2s; }
.t [data-icon] { width: 25px; height: 25px; }
.type-grid input:checked + .t { border-color: var(--green); background: var(--green-soft); color: var(--green); }
.type-grid input:focus-visible + .t, .seg input:focus-visible + span, .radio-chips input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: #ebefe7; }
.seg label { flex: 1; }
.seg span { display: block; padding: 8px 0; border-radius: 9px; color: #6f7b72; font-size: 12.5px; font-weight: 700; text-align: center; transition: background .2s, color .2s; }
.seg.small span { padding: 5px 0; }
.seg input:checked + span { background: #fff; color: var(--green); box-shadow: 0 2px 6px rgba(32, 53, 45, .09); }
.radio-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-chips span { display: inline-block; padding: 6px 14px; border: 1px solid var(--line); border-radius: 30px; background: #fff; color: #55645a; font-size: 12px; font-weight: 700; transition: background .2s, border-color .2s; }
.radio-chips input:checked + span { border-color: #a9c9b6; background: var(--green-soft); color: var(--green); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.m-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; color: #5c6f60; font-size: 11.5px; font-weight: 700; }
.m-field input, .m-field select, .m-field textarea { width: 100%; height: 46px; padding: 0 12px; border: 1px solid #dde4d8; border-radius: 12px; outline: none; background: #fbfcfa; font-size: 16px; font-weight: 500; transition: border-color .2s, box-shadow .2s; }
.m-field textarea { height: auto; padding: 10px 12px; line-height: 1.8; resize: none; }
.m-field input::placeholder, .m-field textarea::placeholder { color: #a6ae9f; font-size: 13px; }
.m-field input:focus, .m-field select:focus, .m-field textarea:focus { border-color: #7f9d70; background: #fff; box-shadow: 0 0 0 3px rgba(127, 157, 112, .14); }
.m-field .seg { margin-top: 0; }
.steppers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.stepper > span { color: #5c6f60; font-size: 11px; font-weight: 700; white-space: nowrap; }
.stepper > div { display: flex; align-items: center; gap: 4px; }
.stepper button { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border: 1px solid #dbe3d7; border-radius: 50%; background: #f7f9f5; font-size: 17px; font-weight: 800; line-height: 1; }
.stepper output { min-width: 18px; font-weight: 800; text-align: center; }
.pick { position: relative; height: 230px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #e8ece4; }
#pick-map { position: absolute; z-index: 0; inset: 0; }
.center-pin { position: absolute; z-index: 450; top: 50%; left: 50%; width: 36px; height: 42px; color: var(--green); transform: translate(-50%, -100%); filter: drop-shadow(0 4px 4px rgba(13, 51, 44, .3)); pointer-events: none; }
.center-pin .icon { width: 36px; height: 42px; fill: #fff; stroke-width: 2; }
.locate-btn { position: absolute; z-index: 450; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 0; border-radius: 22px; background: #fff; color: var(--green); font-size: 11.5px; font-weight: 700; box-shadow: 0 3px 10px rgba(20, 40, 30, .18); }
.locate-btn [data-icon] { width: 16px; height: 16px; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photo-previews { display: contents; }
.photo-add { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; aspect-ratio: 1; border: 1.5px dashed #b6c9b2; border-radius: 14px; background: #f5f8f3; color: var(--green); font-size: 11.5px; text-align: center; cursor: pointer; }
.photo-add input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.photo-add [data-icon] { width: 24px; height: 24px; }
.photo-add small { color: #8d9881; font-size: 9.5px; font-weight: 500; }
.photo { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 14px; background: #e4e9dd; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo button { position: absolute; top: 5px; left: 5px; display: flex; width: 26px; height: 26px; padding: 6px; border: 0; border-radius: 50%; background: rgba(15, 28, 23, .62); color: #fff; }
.photo em { position: absolute; right: 0; bottom: 0; left: 0; background: rgba(18, 62, 47, .8); color: #fff; font-size: 9.5px; font-style: normal; line-height: 1.9; text-align: center; }
.check { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: #55645a; font-size: 12px; line-height: 1.8; }
.check input { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 2px; accent-color: var(--green); }
.m-error { margin: 0 16px 10px; padding: 9px 12px; border: 1px solid #f0d2ca; border-radius: 12px; background: #fff4f1; color: #9b3b2e; font-size: 12px; }
.add-foot { display: flex; gap: 10px; padding: 12px 16px calc(12px + var(--safe-b)); border-top: 1px solid var(--line); background: #fff; }
.add-foot .primary { flex: 1; }

/* ── Bottom sheet ──────────────────────────────────────────── */
.backdrop { position: absolute; z-index: 60; inset: 0; background: rgba(15, 28, 23, .42); opacity: 0; transition: opacity .25s; }
.backdrop.open { opacity: 1; }
.sheet { position: absolute; z-index: 61; right: 0; bottom: 0; left: 0; display: flex; flex-direction: column; max-height: 88%; padding-bottom: var(--safe-b); border-radius: 26px 26px 0 0; background: #fff; transform: translateY(102%); transition: transform .3s var(--ease); }
.sheet.open { transform: none; }
.sheet-grip { width: 42px; height: 5px; margin: 9px auto 0; border-radius: 3px; background: #dfe4dc; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 20px 4px; }
.sheet-head h2 { margin: 0; font-size: 17px; }
.sheet-head .round { width: 36px; height: 36px; padding: 9px; }
.sheet-body { overflow-y: auto; padding: 0 20px 14px; }
.f-group { margin-top: 16px; }
.f-group > b { display: block; margin-bottom: 8px; color: #4f6156; font-size: 12px; }
.f-group .hint { margin-top: 4px; }
.sheet-foot { display: flex; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--line); }
.sheet-foot .primary { flex: 1; }

/* ── Toast ─────────────────────────────────────────────────── */
.m-toast { position: absolute; z-index: 90; left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + 16px); width: max-content; max-width: calc(100% - 40px); padding: 10px 16px; border-radius: 12px; background: #183e2f; color: #fff; font-size: 12px; text-align: center; box-shadow: 0 10px 30px rgba(15, 40, 30, .3); opacity: 0; pointer-events: none; transform: translate(-50%, 20px); transition: opacity .25s, transform .25s; }
.m-toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Sync status of the advertiser's own listing */
.own-tag.sent, .own-tag.new { background: #e6f1ea; }
.own-tag.approved { background: var(--green); color: #fff; }
.own-tag.rejected, .own-tag.failed { background: #fff1ed; color: var(--danger); }
.own-tag.sending { background: #f5efe2; color: #8a6d35; }
.sync-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.sync-pill { display: inline-block; padding: 1px 10px; border-radius: 20px; background: #eef2ea; color: #64735c; font-size: 11px; font-weight: 800; }
.sync-pill.sent, .sync-pill.new { background: #e6f1ea; color: var(--green); }
.sync-pill.approved { background: var(--green); color: #fff; }
.sync-pill.rejected, .sync-pill.failed { background: #fff1ed; color: var(--danger); }
.sync-pill.sending { background: #f5efe2; color: #8a6d35; }
