/* =========================================================================
   LINTAN — sistem desain
   Hijau daun + krem tanah, huruf besar, target sentuh ≥ 48px.
   ========================================================================= */

:root {
  --hijau-900: #0F3D1E;
  --hijau-800: #1B5E20;
  --hijau-700: #2E7D32;
  --hijau-600: #388E3C;
  --hijau-500: #43A047;
  --hijau-300: #81C784;
  --hijau-100: #DDF0DA;
  --hijau-50: #EFF8EC;
  --krem: #FBF7EE;
  --krem-2: #F3ECDC;
  --tanah: #8D6E63;
  --tanah-700: #5D4037;
  --kuning: #F5B700;
  --kuning-100: #FFF3C4;
  --oranye: #EF6C00;
  --merah: #D32F2F;
  --merah-100: #FDE3E1;
  --biru: #1E88E5;
  --biru-100: #E3F0FD;
  --abu-900: #1D2621;
  --abu-700: #46524B;
  --abu-500: #78857D;
  --abu-300: #C9D1CC;
  --abu-100: #ECEFEA;
  --putih: #FFFFFF;

  --bg: var(--krem);
  --surface: var(--putih);
  --text: var(--abu-900);
  --text-2: var(--abu-700);
  --muted: var(--abu-500);
  --line: #E4E0D4;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(29, 38, 33, .06), 0 6px 20px rgba(29, 38, 33, .07);
  --shadow-lg: 0 10px 40px rgba(15, 61, 30, .18);
  --nav-h: 72px;
  --top-h: 60px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
img { max-width: 100%; display: block; }
a { color: var(--hijau-700); }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 26px; font-weight: 800; }
h2 { font-size: 21px; font-weight: 800; }
h3 { font-size: 18px; font-weight: 700; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; }
.bold { font-weight: 700; }
.center { text-align: center; }
.mono { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.stack > * + * { margin-top: 12px; }
.stack-lg > * + * { margin-top: 20px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.wrap { flex-wrap: wrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

[data-lucide], svg.lucide { width: 22px; height: 22px; stroke-width: 2.2; flex-shrink: 0; }

/* ----------------------------------------------------------------- Shell */
#app { min-height: 100%; display: flex; flex-direction: column; max-width: 640px; margin: 0 auto; position: relative; background: var(--bg); }
.topbar {
  position: sticky; top: 0; z-index: 900;
  height: var(--top-h); padding: 0 8px 0 4px;
  display: flex; align-items: center; gap: 4px;
  background: rgba(251, 247, 238, .92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar h1 { font-size: 19px; font-weight: 800; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left: 8px; }
.topbar.no-back h1 { padding-left: 12px; }
.icon-btn {
  width: 48px; height: 48px; border: 0; background: transparent; border-radius: 14px;
  display: inline-grid; place-items: center; color: var(--text); cursor: pointer;
}
.icon-btn:active { background: var(--abu-100); }
#view { flex: 1; padding: 16px 16px calc(var(--nav-h) + var(--safe-b) + 24px); }
#view.full { padding: 0; }
body.no-nav #view { padding-bottom: calc(24px + var(--safe-b)); }
body.no-nav .bottomnav { display: none; }

.bottomnav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 640px; z-index: 950;
  height: calc(var(--nav-h) + var(--safe-b)); padding: 8px 10px calc(8px + var(--safe-b));
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
  background: var(--surface); border-top: 1px solid var(--line);
  box-shadow: 0 -6px 24px rgba(29, 38, 33, .06);
}
.bottomnav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  text-decoration: none; color: var(--muted); font-size: 12.5px; font-weight: 700; border-radius: 16px;
  transition: background .2s, color .2s;
}
.bottomnav a .pill { width: 56px; height: 30px; border-radius: 99px; display: grid; place-items: center; transition: background .2s; }
.bottomnav a.active { color: var(--hijau-800); }
.bottomnav a.active .pill { background: var(--hijau-100); }

.sync-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px;
  border-radius: 99px; font-size: 13px; font-weight: 700; border: 0; cursor: pointer;
  background: var(--hijau-100); color: var(--hijau-800);
}
.sync-pill.pending { background: var(--kuning-100); color: #7A5A00; }
.sync-pill.offline { background: var(--abu-100); color: var(--abu-700); }
.sync-pill svg { width: 16px; height: 16px; }

.demo-banner {
  background: repeating-linear-gradient(-45deg, #FFF3C4, #FFF3C4 10px, #FFEFB0 10px, #FFEFB0 20px);
  color: #6B4E00; font-size: 13px; font-weight: 700; text-align: center; padding: 6px 12px;
}

/* ----------------------------------------------------------------- Cards */
.card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; border: 1px solid rgba(0, 0, 0, .02);
}
.card.flat { box-shadow: none; border: 1px solid var(--line); }
.card.tap { cursor: pointer; transition: transform .15s; }
.card.tap:active { transform: scale(.985); }
.card-title { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-title h3 { flex: 1; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 26px 2px 12px; }
.section-title h2 { font-size: 19px; }
.section-title a, .link-btn { font-size: 15px; font-weight: 700; color: var(--hijau-700); text-decoration: none; background: none; border: 0; cursor: pointer; padding: 6px 0; font-family: inherit; }

/* --------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 22px; border-radius: 16px; border: 0; cursor: pointer;
  font: 700 17px/1 var(--font); text-decoration: none; white-space: nowrap;
  background: var(--hijau-700); color: #fff; transition: transform .1s, background .2s, opacity .2s;
  box-shadow: 0 6px 16px rgba(46, 125, 50, .28);
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; pointer-events: none; box-shadow: none; }
.btn.block { width: 100%; }
.btn.secondary { background: var(--hijau-100); color: var(--hijau-800); box-shadow: none; }
.btn.outline { background: var(--surface); color: var(--hijau-800); border: 2px solid var(--hijau-300); box-shadow: none; }
.btn.ghost { background: transparent; color: var(--hijau-800); box-shadow: none; }
.btn.danger { background: var(--merah); box-shadow: 0 6px 16px rgba(211, 47, 47, .25); }
.btn.danger-soft { background: var(--merah-100); color: var(--merah); box-shadow: none; }
.btn.warn { background: var(--oranye); box-shadow: 0 6px 16px rgba(239, 108, 0, .25); }
.btn.sm { min-height: 42px; padding: 0 16px; font-size: 15px; border-radius: 12px; }
.btn.xs { min-height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 10px; gap: 6px; }
.btn.xs svg, .btn.sm svg { width: 18px; height: 18px; }
.btn-row { display: flex; gap: 10px; }
.btn-row > .btn { flex: 1; }

.fab {
  position: fixed; z-index: 960; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--nav-h) + var(--safe-b) + 18px);
  min-height: 64px; padding: 0 28px; border-radius: 99px; font-size: 18px;
  box-shadow: var(--shadow-lg), 0 0 0 6px rgba(255, 255, 255, .7);
}
.fab svg { width: 26px; height: 26px; }
.fab:active { transform: translateX(-50%) scale(.97); }

/* ----------------------------------------------------------------- Forms */
.field { display: block; margin-bottom: 16px; }
.field > span, .label { display: block; font-size: 15px; font-weight: 700; margin-bottom: 6px; color: var(--text-2); }
.field > span em { color: var(--merah); font-style: normal; }
.input, select.input, textarea.input {
  width: 100%; min-height: 54px; padding: 12px 16px; border-radius: 14px;
  border: 2px solid var(--line); background: var(--surface); color: var(--text);
  font: 500 17px/1.3 var(--font); outline: none; transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
select.input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2346524B' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 44px;
}
textarea.input { min-height: 96px; resize: vertical; }
.input:focus { border-color: var(--hijau-500); box-shadow: 0 0 0 4px rgba(67, 160, 71, .15); }
.input:disabled { background: var(--abu-100); color: var(--muted); }
.input.pin { letter-spacing: .5em; font-size: 24px; text-align: center; font-weight: 800; }
.hint { font-size: 13.5px; color: var(--muted); margin-top: 6px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-error { background: var(--merah-100); color: var(--merah); padding: 12px 14px; border-radius: 12px; font-weight: 600; font-size: 15px; }

.segmented {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 5px;
  background: var(--krem-2); border-radius: 16px;
}
.segmented button {
  min-height: 46px; border: 0; border-radius: 12px; background: transparent; cursor: pointer;
  font: 700 15.5px var(--font); color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.segmented button.active { background: var(--surface); color: var(--hijau-800); box-shadow: var(--shadow); }
.segmented button svg { width: 19px; height: 19px; }

/* ----------------------------------------------------------------- Chips */
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 99px;
  font-size: 13px; font-weight: 700; background: var(--abu-100); color: var(--abu-700); white-space: nowrap;
}
.chip svg { width: 15px; height: 15px; }
.chip.hijau { background: var(--hijau-100); color: var(--hijau-800); }
.chip.kuning { background: var(--kuning-100); color: #7A5A00; }
.chip.merah { background: var(--merah-100); color: var(--merah); }
.chip.biru { background: var(--biru-100); color: #145EA8; }
.chip.tanah { background: #EFE6DF; color: var(--tanah-700); }
.level { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 99px; font-weight: 800; font-size: 14px; }
.level.Rendah { background: var(--hijau-100); color: var(--hijau-800); }
.level.Sedang { background: var(--kuning-100); color: #7A5A00; }
.level.Tinggi { background: var(--merah-100); color: var(--merah); }
.level.na { background: var(--abu-100); color: var(--abu-700); }

/* ------------------------------------------------------------------ Hero */
.hero {
  margin: -16px -16px 0; padding: 22px 20px 72px;
  background: radial-gradient(120% 140% at 100% 0%, #4CAF50 0%, var(--hijau-700) 45%, var(--hijau-900) 100%);
  color: #fff; position: relative; overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; right: -40px; bottom: -60px; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .14), transparent 70%);
}
.hero .greet { font-size: 15px; opacity: .85; font-weight: 600; }
.hero h1 { color: #fff; font-size: 25px; margin-top: 2px; }
.hero .avatar {
  width: 48px; height: 48px; border-radius: 16px; background: rgba(255, 255, 255, .18);
  display: grid; place-items: center; color: #fff; border: 0; cursor: pointer; font-weight: 800; font-size: 18px;
}
.hero-overlap { margin-top: -54px; position: relative; z-index: 2; }

/* --------------------------------------------------------------- Weather */
.weather-now { display: flex; align-items: center; gap: 14px; }
.weather-now .temp { font-size: 54px; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.weather-now .temp sup { font-size: 22px; font-weight: 700; vertical-align: top; position: relative; top: 6px; }
.weather-now img { width: 72px; height: 72px; }
.weather-desc { font-size: 18px; font-weight: 700; }
.weather-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.weather-meta div { background: var(--hijau-50); border-radius: 14px; padding: 10px; text-align: center; }
.weather-meta b { display: block; font-size: 17px; }
.weather-meta span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.weather-meta svg { width: 18px; height: 18px; color: var(--hijau-700); margin: 0 auto 2px; display: block; }
.hourly { display: flex; gap: 8px; overflow-x: auto; margin: 14px -18px 0; padding: 0 18px 4px; scrollbar-width: none; }
.hourly::-webkit-scrollbar { display: none; }
.hourly .h { flex: 0 0 72px; text-align: center; background: var(--krem); border-radius: 14px; padding: 8px 4px; }
.hourly .h.now { background: var(--hijau-700); color: #fff; }
.hourly .h img { width: 36px; height: 36px; margin: 2px auto; }
.hourly .h b { font-size: 16px; }
.hourly .h small { display: block; font-size: 12px; font-weight: 700; opacity: .8; }
.days { display: grid; gap: 6px; margin-top: 14px; }
.days .d { display: grid; grid-template-columns: 80px 36px 1fr auto; align-items: center; gap: 8px; font-size: 15px; padding: 6px 4px; border-top: 1px dashed var(--line); }
.days .d img { width: 32px; height: 32px; }
.loc-line { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); font-weight: 600; }
.loc-line svg { width: 16px; height: 16px; }

.risk-item { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; }
.risk-item:first-of-type { border-top: 0; }
.bar { height: 8px; border-radius: 99px; background: var(--abu-100); overflow: hidden; grid-column: 1 / -1; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: var(--hijau-500); }
.bar.Sedang > i { background: var(--kuning); }
.bar.Tinggi > i { background: var(--merah); }

/* ---------------------------------------------------------- Quick tiles */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile {
  background: var(--surface); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--text); min-height: 118px;
  border: 0; text-align: left; font-family: inherit; cursor: pointer;
}
.tile:active { transform: scale(.98); }
.tile .ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; }
.tile .ic svg { width: 26px; height: 26px; }
.tile b { font-size: 16.5px; line-height: 1.25; }
.tile small { font-size: 13px; color: var(--muted); font-weight: 600; margin-top: -6px; }
.ic.hijau { background: var(--hijau-100); color: var(--hijau-800); }
.ic.biru { background: var(--biru-100); color: #145EA8; }
.ic.kuning { background: var(--kuning-100); color: #7A5A00; }
.ic.merah { background: var(--merah-100); color: var(--merah); }
.ic.tanah { background: #EFE6DF; color: var(--tanah-700); }

/* ----------------------------------------------------------------- Lists */
.list { display: flex; flex-direction: column; gap: 10px; }
.list-item {
  display: flex; align-items: center; gap: 14px; padding: 14px; background: var(--surface);
  border-radius: 16px; box-shadow: var(--shadow); cursor: pointer; text-decoration: none; color: inherit;
}
.list-item:active { transform: scale(.99); }
.list-item .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; }
.list-item .meta { font-size: 14px; color: var(--muted); font-weight: 600; }
.kv { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 10px 14px; font-size: 15.5px; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; font-weight: 700; word-break: break-word; }

.lahan-card { display: grid; grid-template-columns: 84px 1fr; gap: 14px; align-items: center; }
.lahan-shape { width: 84px; height: 84px; border-radius: 16px; background: linear-gradient(160deg, #2F4F2A, #1E3A1C); display: grid; place-items: center; overflow: hidden; }
.lahan-shape svg { width: 70px; height: 70px; }

.empty { text-align: center; padding: 34px 18px; }
.empty .ill { width: 96px; height: 96px; margin: 0 auto 14px; border-radius: 30px; background: var(--hijau-100); display: grid; place-items: center; color: var(--hijau-700); }
.empty .ill svg { width: 46px; height: 46px; }
.empty h3 { margin-bottom: 6px; }
.empty p { color: var(--muted); margin-bottom: 18px; }

/* ------------------------------------------------------------------- Map */
.map { height: 320px; border-radius: var(--radius); overflow: hidden; background: #2b3a2b; box-shadow: var(--shadow); position: relative; z-index: 1; }
.map.tall { height: 56vh; min-height: 360px; }
.map-full { position: fixed; inset: var(--top-h) 0 0 0; max-width: 640px; margin: 0 auto; z-index: 1; }
.map-overlay { position: absolute; z-index: 500; }
.map-tools { position: absolute; right: 12px; top: 12px; z-index: 600; display: flex; flex-direction: column; gap: 8px; }
.map-tools button {
  width: 48px; height: 48px; border-radius: 14px; border: 0; background: var(--surface); box-shadow: var(--shadow);
  display: grid; place-items: center; cursor: pointer; color: var(--text);
}
.map-badge {
  position: absolute; left: 12px; top: 12px; z-index: 600; background: rgba(15, 61, 30, .88); color: #fff;
  padding: 8px 14px; border-radius: 14px; font-weight: 800; font-size: 15px; backdrop-filter: blur(6px);
}
.map-badge small { display: block; font-size: 12px; opacity: .8; font-weight: 600; }
.leaflet-container { font-family: var(--font); }
.leaflet-control-attribution { font-size: 10px; }

.pin-red { position: relative; }
.pin-red i {
  position: absolute; inset: 0; border-radius: 50%; background: var(--merah); border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
}
.pin-red.pulse::before {
  content: ''; position: absolute; inset: -10px; border-radius: 50%; background: rgba(211, 47, 47, .45);
  animation: pulse 1.8s ease-out infinite;
}
.pin-red.done i { background: #7B1F1F; }
.pin-red.done i::after { content: '✓'; color: #fff; font-size: 10px; font-weight: 900; font-style: normal; position: absolute; inset: 0; display: grid; place-items: center; }
.pin-red.sel i { background: var(--kuning); }
.pin-red.sel::before { background: rgba(245, 183, 0, .5); }
.pin-label { position: absolute; left: 50%; top: -20px; transform: translateX(-50%); background: #fff; color: var(--merah); font: 800 11px var(--font); padding: 1px 6px; border-radius: 6px; white-space: nowrap; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.me-dot { width: 20px; height: 20px; border-radius: 50%; background: var(--biru); border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(30, 136, 229, .25); }
@keyframes pulse { 0% { transform: scale(.4); opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }

/* -------------------------------------------------------------- Stepper */
.stepper { display: flex; gap: 6px; margin-bottom: 16px; }
.stepper div { flex: 1; height: 6px; border-radius: 99px; background: var(--abu-300); }
.stepper div.on { background: var(--hijau-600); }
.step-label { font-size: 13px; font-weight: 800; color: var(--hijau-700); text-transform: uppercase; letter-spacing: .06em; }

.option-card {
  display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: var(--radius); background: var(--surface);
  border: 2px solid transparent; box-shadow: var(--shadow); cursor: pointer; width: 100%; text-align: left; font-family: inherit; color: inherit;
}
.option-card.active { border-color: var(--hijau-500); background: var(--hijau-50); }
.option-card .ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; flex-shrink: 0; }
.option-card b { display: block; font-size: 17px; }
.option-card small { color: var(--muted); font-size: 14px; font-weight: 600; }

.area-box { display: flex; align-items: baseline; gap: 8px; }
.area-box b { font-size: 28px; font-weight: 800; color: var(--hijau-800); }

/* ---------------------------------------------------------- Kuesioner */
.gejala-group h4 { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--tanah-700); margin: 20px 4px 10px; display: flex; align-items: center; gap: 8px; }
.check-card {
  display: flex; gap: 14px; align-items: flex-start; padding: 14px; border-radius: 16px; background: var(--surface);
  border: 2px solid var(--line); cursor: pointer; margin-bottom: 10px; transition: border-color .15s, background .15s;
}
.check-card input { display: none; }
.check-card .box {
  width: 30px; height: 30px; border-radius: 9px; border: 2.5px solid var(--abu-300); flex-shrink: 0; display: grid; place-items: center; color: transparent; margin-top: 1px;
}
.check-card .box svg { width: 20px; height: 20px; stroke-width: 3.2; }
.check-card.on { border-color: var(--hijau-500); background: var(--hijau-50); }
.check-card.on .box { background: var(--hijau-600); border-color: var(--hijau-600); color: #fff; }
.check-card .txt { flex: 1; font-weight: 600; font-size: 16px; }
.check-card .txt small { display: block; color: var(--muted); font-weight: 500; font-size: 13.5px; margin-top: 4px; }
.check-card .thumb { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.sticky-bottom {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 640px; z-index: 960;
  padding: 12px 16px calc(12px + var(--safe-b)); background: linear-gradient(to top, var(--bg) 70%, rgba(251, 247, 238, 0));
}

/* ------------------------------------------------------------- Hasil */
.result-hero { background: linear-gradient(150deg, var(--hijau-800), var(--hijau-900)); color: #fff; border-radius: 22px; padding: 22px; position: relative; overflow: hidden; }
.result-hero.hama { background: linear-gradient(150deg, #6D4C41, #3E2723); }
.result-hero.none { background: linear-gradient(150deg, #546E7A, #37474F); }
.result-hero h2 { font-size: 25px; color: #fff; margin: 6px 0 2px; }
.result-hero i.latin { opacity: .8; font-size: 15px; }
.ring { --p: 0; width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: conic-gradient(var(--kuning) calc(var(--p) * 1%), rgba(255, 255, 255, .18) 0); }
.ring > div { width: 74px; height: 74px; border-radius: 50%; background: rgba(0, 0, 0, .25); display: grid; place-items: center; text-align: center; }
.ring b { font-size: 22px; line-height: 1; }
.ring small { font-size: 10.5px; font-weight: 700; opacity: .85; display: block; }
.reko { white-space: pre-line; font-size: 16px; line-height: 1.65; }
.notice {
  display: flex; gap: 14px; padding: 16px; border-radius: var(--radius); background: var(--biru-100); color: #0D3C6E; font-weight: 600; font-size: 15.5px;
}
.notice svg { width: 28px; height: 28px; flex-shrink: 0; color: var(--biru); }
.notice.warn { background: var(--kuning-100); color: #5F4500; }
.notice.warn svg { color: #B58500; }
.notice.danger { background: var(--merah-100); color: #7A1515; }
.notice.danger svg { color: var(--merah); }

/* ---------------------------------------------------------- Navigasi */
.nav-panel {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 640px; z-index: 970;
  background: var(--surface); border-radius: 26px 26px 0 0; box-shadow: var(--shadow-lg); padding: 18px 18px calc(18px + var(--safe-b));
}
.compass { width: 92px; height: 92px; border-radius: 50%; background: var(--hijau-50); display: grid; place-items: center; flex-shrink: 0; border: 3px solid var(--hijau-100); }
.compass svg { width: 54px; height: 54px; color: var(--hijau-700); transition: transform .3s ease-out; stroke-width: 2.4; }
.dist { font-size: 40px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }

/* ------------------------------------------------------- Bottom sheet */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(15, 30, 20, .45); z-index: 2000; opacity: 0; transition: opacity .2s; }
.sheet-backdrop.show { opacity: 1; }
.sheet {
  position: fixed; left: 50%; bottom: 0; transform: translate(-50%, 100%); width: 100%; max-width: 640px; z-index: 2001;
  background: var(--surface); border-radius: 26px 26px 0 0; max-height: 90vh; overflow: auto;
  padding: 10px 18px calc(22px + var(--safe-b)); transition: transform .25s cubic-bezier(.2, .8, .2, 1);
}
.sheet.show { transform: translate(-50%, 0); }
.sheet .grab { width: 44px; height: 5px; border-radius: 99px; background: var(--abu-300); margin: 4px auto 14px; }
.sheet h2 { margin-bottom: 8px; }

.toast-wrap { position: fixed; left: 0; right: 0; top: 14px; z-index: 3000; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast {
  background: var(--abu-900); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 600; font-size: 15px;
  box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: center; max-width: 520px; animation: toastIn .25s ease-out;
}
.toast.ok { background: var(--hijau-800); }
.toast.err { background: var(--merah); }
.toast svg { width: 20px; height: 20px; }
@keyframes toastIn { from { transform: translateY(-12px); opacity: 0; } }

.loading-screen { position: fixed; inset: 0; z-index: 2500; background: rgba(251, 247, 238, .75); display: grid; place-items: center; backdrop-filter: blur(2px); }
.loading-box { background: var(--surface); padding: 22px 26px; border-radius: 20px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; align-items: center; gap: 12px; font-weight: 700; min-width: 200px; text-align: center; }
.spinner { width: 40px; height: 40px; border-radius: 50%; border: 4px solid var(--hijau-100); border-top-color: var(--hijau-600); animation: spin .8s linear infinite; }
.spinner.sm { width: 22px; height: 22px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--abu-100), #f6f7f4, var(--abu-100)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 12px; }
@keyframes sk { to { background-position: -200% 0; } }

/* --------------------------------------------------------------- Login */
.auth-wrap { min-height: 100vh; display: flex; flex-direction: column; }
.auth-hero {
  padding: 48px 24px 90px; color: #fff; text-align: center; position: relative; overflow: hidden;
  background: radial-gradient(130% 120% at 50% 0%, #66BB6A 0%, var(--hijau-700) 50%, var(--hijau-900) 100%);
}
.auth-hero .logo { width: 88px; height: 88px; margin: 0 auto 14px; border-radius: 28px; background: rgba(255, 255, 255, .16); display: grid; place-items: center; }
.auth-hero .logo img { width: 64px; height: 64px; }
.auth-hero h1 { color: #fff; font-size: 34px; letter-spacing: .04em; }
.auth-hero p { opacity: .9; font-weight: 600; }
.auth-card { margin: -60px 16px 24px; position: relative; z-index: 2; }

/* --------------------------------------------------------------- Table */
.table-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
table.t { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.t th, table.t td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t th { background: var(--krem-2); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); white-space: nowrap; }
table.t tr:last-child td { border-bottom: 0; }

.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--surface); border-radius: 16px; padding: 14px 10px; text-align: center; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 24px; font-weight: 800; color: var(--hijau-800); }
.stat span { font-size: 12.5px; font-weight: 700; color: var(--muted); }

.photo { width: 100%; max-height: 260px; object-fit: cover; border-radius: 16px; }

@media (min-width: 641px) {
  body { background: #E9E4D6; }
  #app { box-shadow: 0 0 60px rgba(0, 0, 0, .08); min-height: 100vh; }
}
@media (max-width: 360px) {
  body { font-size: 16px; }
  .tiles { gap: 10px; }
  .weather-now .temp { font-size: 46px; }
}
