:root {
  --bg: #F2F2F7;
  --card: #FFFFFF;
  --card-2: #F2F2F7;
  --fill: rgba(118, 118, 128, 0.12);
  --fill-2: rgba(118, 118, 128, 0.2);
  --text: #000000;
  --text-2: rgba(60, 60, 67, 0.6);
  --text-3: rgba(60, 60, 67, 0.3);
  --sep: rgba(60, 60, 67, 0.18);
  --tint: #007AFF;
  --green: #248A3D;
  --red: #D70015;
  --glass: rgba(249, 249, 249, 0.72);
  --glass-border: rgba(255, 255, 255, 0.6);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.08);
  --seg-on: #FFFFFF;
  --menu: rgba(255, 255, 255, 0.92);
  --r: 14px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro", "Helvetica Neue", "Segoe UI", Roboto, system-ui, sans-serif;
  --font-d: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro", "Helvetica Neue", "Segoe UI", Roboto, system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --card: #1C1C1E; --card-2: #2C2C2E;
    --fill: rgba(118, 118, 128, 0.24); --fill-2: rgba(118, 118, 128, 0.36);
    --text: #FFFFFF; --text-2: rgba(235, 235, 245, 0.6); --text-3: rgba(235, 235, 245, 0.3);
    --sep: rgba(84, 84, 88, 0.6); --tint: #0A84FF; --green: #30D158; --red: #FF453A;
    --glass: rgba(30, 30, 30, 0.68); --glass-border: rgba(255, 255, 255, 0.08);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.5); --seg-on: #636366; --menu: rgba(44, 44, 46, 0.94);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --card: #1C1C1E; --card-2: #2C2C2E;
  --fill: rgba(118, 118, 128, 0.24); --fill-2: rgba(118, 118, 128, 0.36);
  --text: #FFFFFF; --text-2: rgba(235, 235, 245, 0.6); --text-3: rgba(235, 235, 245, 0.3);
  --sep: rgba(84, 84, 88, 0.6); --tint: #0A84FF; --green: #30D158; --red: #FF453A;
  --glass: rgba(30, 30, 30, 0.68); --glass-border: rgba(255, 255, 255, 0.08);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.5); --seg-on: #636366; --menu: rgba(44, 44, 46, 0.94);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.3 var(--font); letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased; min-height: 100dvh;
}
button, input, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: var(--tint); text-decoration: none; }
svg { stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* layout */
.app { max-width: 720px; margin: 0 auto; }
.pane { min-height: 100dvh; padding: 0 16px calc(110px + env(safe-area-inset-bottom)); }
body[data-route="cari"] .pane-main, body:not([data-route="cari"]) .pane-search { display: none; }
.desk-empty { display: none; }

@media (min-width: 960px) {
  .app { max-width: 1240px; display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 0; }
  .pane { min-height: 100dvh; padding-bottom: 120px; }
  .pane-search { display: block !important; position: sticky; top: 0; height: 100dvh; overflow-y: auto; border-right: 0.5px solid var(--sep); padding: 0 24px 120px; }
  .pane-main { display: block !important; padding: 0 32px 120px; }
  body[data-route="cari"] .desk-empty { display: flex; }
  .tabbar a[data-tab="cari"] { display: none; }
}

/* glass navigation bar */
.nav {
  position: sticky; top: 0; z-index: 20; margin: 0 -16px; padding: calc(env(safe-area-inset-top) + 8px) 16px 8px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 44px;
  background: transparent; transition: background .2s, border-color .2s; border-bottom: 0.5px solid transparent;
}
.nav.scrolled { background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom-color: var(--sep); }
.nav .small-title { font-weight: 600; font-size: 17px; opacity: 0; transition: opacity .2s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 56vw; }
.nav.scrolled .small-title { opacity: 1; }
.nav .left { justify-self: start; } .nav .right { justify-self: end; display: flex; gap: 18px; }
.nav-btn { color: var(--tint); display: inline-flex; align-items: center; gap: 2px; font-size: 17px; min-height: 44px; }
.nav-btn svg { width: 24px; height: 24px; stroke-width: 2.2; }
.nav-btn.icon svg { width: 24px; height: 24px; stroke-width: 1.9; }
.nav-btn.on svg { fill: currentColor; }
@media (min-width: 960px) { .nav { margin: 0 -32px; padding-left: 32px; padding-right: 32px; } .pane-search .nav { margin: 0 -24px; padding-left: 24px; padding-right: 24px; } }

.large-title { font: 700 34px/1.15 var(--font-d); letter-spacing: 0.01em; margin: 4px 4px 4px; }
.subtitle { color: var(--text-2); font-size: 15px; margin: 2px 4px 16px; }
.section-label { color: var(--text-2); font-size: 13px; text-transform: uppercase; letter-spacing: 0.02em; margin: 22px 16px 7px; }
.section-foot { color: var(--text-2); font-size: 13px; margin: 7px 16px 0; line-height: 1.35; }

/* grouped inset list */
.group { background: var(--card); border-radius: var(--r); overflow: hidden; }
.row {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 10px 16px;
  width: 100%; text-align: left; color: var(--text);
}
.row + .row::before, .row + .row-wrap::before, .row-wrap + .row::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: 0.5px solid var(--sep); }
.row .grow { flex: 1; min-width: 0; }
.row .t1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .t2 { color: var(--text-2); font-size: 14px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .end { text-align: right; flex: none; }
.row .end .t2 { margin-top: 2px; }
.row .chev { width: 8px; height: 14px; color: var(--text-3); flex: none; stroke-width: 2.4; }
.row.tap { cursor: pointer; transition: background .15s; }
.row.tap:active { background: var(--fill); }
@media (hover: hover) { .row.tap:hover { background: var(--fill); } }
.row .val { color: var(--text-2); display: inline-flex; align-items: center; gap: 4px; max-width: 60%; }
.row .val span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .val svg { width: 14px; height: 14px; flex: none; stroke-width: 2.2; }

/* native select row (iOS pop-up button) */
.row.select .val { color: var(--tint); }
.row.select select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; appearance: none; -webkit-appearance: none; font-size: 16px; }
.row.select:active { background: var(--fill); }

/* address field + suggestions */
.field { display: flex; align-items: center; gap: 8px; padding: 0 12px; min-height: 48px; background: var(--card); border-radius: var(--r); }
.field svg { width: 20px; height: 20px; color: var(--tint); flex: none; }
.field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 17px; padding: 12px 0; }
input[type=search]::-webkit-search-cancel-button, input[type=search]::-webkit-search-decoration { -webkit-appearance: none; display: none; }
.field input::placeholder { color: var(--text-3); }
.field .clear { width: 22px; height: 22px; border-radius: 50%; background: var(--text-3); color: var(--card); display: none; align-items: center; justify-content: center; flex: none; }
.field .clear svg { width: 12px; height: 12px; color: var(--card); stroke-width: 3; }
.field.has .clear { display: inline-flex; }
.field.open { border-radius: var(--r) var(--r) 0 0; }
.sugg { background: var(--card); border-radius: 0 0 var(--r) var(--r); overflow: hidden; border-top: 0.5px solid var(--sep); }
.sugg:empty { display: none; }
.sugg .row { min-height: 44px; padding: 8px 16px; }
.sugg .kind { font-size: 12px; color: var(--text-2); background: var(--fill); border-radius: 6px; padding: 2px 6px; flex: none; }
.sugg mark { background: none; color: var(--text); font-weight: 600; }
.sugg .row.active { background: var(--fill); }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 50px; border-radius: var(--r);
  background: var(--tint); color: #fff; font-weight: 600; font-size: 17px; margin-top: 18px; transition: transform .12s, opacity .12s;
}
.btn:active { transform: scale(0.98); opacity: 0.85; }
.btn.plain { background: var(--card); color: var(--tint); font-weight: 400; }
.btn.danger { background: var(--card); color: var(--red); font-weight: 400; }

/* segmented control */
.seg { display: flex; background: var(--fill); border-radius: 9px; padding: 2px; gap: 2px; }
.seg button { flex: 1; border-radius: 7px; padding: 6px 8px; font-size: 14px; font-weight: 500; transition: background .2s; }
.seg button.on { background: var(--seg-on); box-shadow: 0 3px 8px rgba(0,0,0,.12), 0 3px 1px rgba(0,0,0,.04); }
.seg-wrap { background: var(--card); border-radius: var(--r); padding: 12px 16px; }

/* summary */
.hero { background: var(--card); border-radius: var(--r); padding: 16px; }
.hero .cap { color: var(--text-2); font-size: 14px; }
.hero .big { font: 700 34px/1.15 var(--font-d); letter-spacing: 0.01em; margin: 4px 0 2px; }
.hero .range { color: var(--text-2); font-size: 15px; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.tile { background: var(--fill); border-radius: 11px; padding: 9px 10px; min-width: 0; }
.tile .k { color: var(--text-2); font-size: 12px; }
.tile .v { font-weight: 600; font-size: 17px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 4px 14px; }
.pill { font-size: 13px; color: var(--text-2); background: var(--fill); border-radius: 999px; padding: 4px 10px; }

/* chart */
.chart { background: var(--card); border-radius: var(--r); padding: 14px 12px 10px; }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 150px; padding-top: 20px; }
.bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; min-width: 0; }
.bar .lab { font-size: 11px; color: var(--text-2); margin-bottom: 4px; white-space: nowrap; }
.bar .col { width: 100%; max-width: 44px; border-radius: 6px 6px 3px 3px; background: var(--tint); opacity: 0.45; transition: height .4s cubic-bezier(.2,.8,.2,1); }
.bar.hi .col { opacity: 1; }
.bar.hi .lab { color: var(--text); font-weight: 600; }
.yrs { display: flex; gap: 8px; margin-top: 6px; }
.yrs div { flex: 1; text-align: center; font-size: 12px; color: var(--text-2); }
.yrs small { display: block; font-size: 11px; color: var(--text-3); }

/* estimator */
.est { background: var(--card); border-radius: var(--r); padding: 4px 16px 14px; }
.est .row { padding-left: 0; padding-right: 0; }
.est input { width: 110px; text-align: right; border: 0; outline: 0; background: var(--fill); border-radius: 8px; padding: 6px 10px; font-size: 17px; }
.est .out { font: 700 28px/1.2 var(--font-d); color: var(--green); margin-top: 6px; }
.est .note { color: var(--text-2); font-size: 13px; margin-top: 2px; }

/* misc */
.empty { text-align: center; color: var(--text-2); padding: 48px 24px; }
.empty svg { width: 44px; height: 44px; color: var(--text-3); margin-bottom: 10px; }
.empty .h { color: var(--text); font-weight: 600; font-size: 20px; margin-bottom: 6px; }
.desk-empty { min-height: 70vh; flex-direction: column; align-items: center; justify-content: center; }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--text-2); padding: 40px 0; }
.spin { width: 20px; height: 20px; border: 2.5px solid var(--fill-2); border-top-color: var(--text-2); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.more { color: var(--tint); justify-content: center; }
.price { font-variant-numeric: tabular-nums; font-weight: 600; }
.tx .t2 { white-space: normal; }
.tx .t2 b { font-weight: 500; color: var(--text); }
.sortbar { margin: 0 0 10px; }
.disclaimer { color: var(--text-3); font-size: 12px; text-align: center; margin: 24px 16px 0; line-height: 1.4; }
.swipe-in { animation: swipe .28s cubic-bezier(.2,.8,.2,1); }
@keyframes swipe { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .swipe-in { animation: none; } .bar .col { transition: none; } }

/* floating liquid-glass tab bar */
.tabbar {
  position: fixed; z-index: 30; left: 50%; transform: translateX(-50%);
  bottom: calc(10px + env(safe-area-inset-bottom)); display: flex; gap: 4px; padding: 5px;
  background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  border: 0.5px solid var(--glass-border); border-radius: 999px; box-shadow: var(--shadow);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 84px; padding: 6px 14px 5px; border-radius: 999px; color: var(--text); font-size: 11px; font-weight: 500; transition: background .2s, color .2s; }
.tabbar a svg { width: 24px; height: 24px; }
.tabbar a.on { color: var(--tint); background: var(--fill); }
.tabbar a.on[data-tab="simpan"] svg { fill: currentColor; }
