:root {
  --bg: #0f1115;
  --panel: #171a21;
  --panel-2: #1e222b;
  --line: #2a2f3a;
  --text: #e7ebf0;
  --muted: #9aa4b2;
  --accent: #1B7F3B;
  --accent-2: #2faa55;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: radial-gradient(1200px 600px at 50% -200px, #16331f 0%, var(--bg) 55%) no-repeat, var(--bg);
  color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
}
.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 18px; }

.topbar { border-bottom: 1px solid var(--line); background: rgba(15,17,21,.7); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 5; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 58px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.brand .logo { color: var(--accent-2); font-size: 20px; }
.brand strong { color: #fff; }
.topbar-link { color: var(--muted); text-decoration: none; font-size: 13px; border: 1px solid var(--line); padding: 5px 10px; border-radius: 8px; }
.topbar-link:hover { color: var(--text); border-color: var(--accent); }

main { padding: 26px 18px 10px; }
.loading { color: var(--muted); text-align: center; padding: 40px 0; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  margin-bottom: 26px;
  box-shadow: 0 18px 40px -24px rgba(0,0,0,.8);
}
.card-head { display: flex; gap: 16px; align-items: center; }
.icon { width: 84px; height: 84px; border-radius: 20px; box-shadow: 0 6px 16px -6px rgba(0,0,0,.7); }
.name { margin: 0; font-size: 24px; }
.tagline { margin: 4px 0 6px; color: var(--muted); }
.meta { font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.meta .dot { opacity: .6; }

.phone-preview { display: flex; justify-content: center; margin: 22px 0 6px; }
.phone { width: 190px; height: 360px; border-radius: 28px; background: #0a0c10; border: 3px solid #2a2f3a; padding: 10px; box-shadow: 0 20px 40px -20px rgba(0,0,0,.9); }
.phone-screen { position: relative; width: 100%; height: 100%; border-radius: 18px; overflow: hidden; background: #cfe0c8; }
.map-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(120,140,110,.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120,140,110,.35) 1px, transparent 1px),
    linear-gradient(120deg, #d8e6cf 0%, #c2d6e0 60%, #d6e0c0 100%);
  background-size: 26px 26px, 26px 26px, 100% 100%;
}
.map-grid::after {
  content: ""; position: absolute; left: -10%; top: 40%; width: 130%; height: 26px;
  background: #9cc0e8; transform: rotate(-12deg); opacity: .8;
}
.map-pin { position: absolute; top: 44%; left: 50%; transform: translate(-50%,-50%); font-size: 30px; filter: drop-shadow(0 3px 2px rgba(0,0,0,.4)); }
.gps-btn { position: absolute; right: 12px; bottom: 12px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; padding: 7px 12px; border-radius: 16px; box-shadow: 0 4px 10px -3px rgba(0,0,0,.6); }

.description { color: #cdd5df; margin: 18px 2px; }

.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 18px 0; }
.facts > div { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.facts .k { display: block; font-size: 12px; color: var(--muted); }
.facts .v { font-size: 15px; }
.facts .pkg { font-size: 12px; word-break: break-all; color: #bcd; }

.section { margin: 18px 0; }
.section h2 { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 10px; }
.perms { margin: 0; padding-left: 18px; color: #cdd5df; }
.perms li { margin: 4px 0; }

.downloads { display: flex; flex-direction: column; gap: 10px; }
.dl {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  text-decoration: none; color: #fff;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  border: 1px solid #2c8f47; border-radius: 14px; padding: 14px 16px;
  font-weight: 600; transition: transform .08s ease, filter .15s ease;
}
.dl:hover { filter: brightness(1.07); }
.dl:active { transform: translateY(1px); }
.dl.secondary { background: var(--panel-2); border-color: var(--line); color: var(--text); font-weight: 500; }
.dl .dl-label { display: flex; flex-direction: column; }
.dl .dl-sub { font-size: 12px; font-weight: 400; opacity: .85; }
.dl .dl-go { font-size: 13px; opacity: .9; white-space: nowrap; }
.dl .sha { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 10px; opacity: .7; }

.install { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; }
.install summary { cursor: pointer; color: var(--accent-2); font-weight: 600; }
.install ol { color: #cdd5df; margin: 12px 0 0; padding-left: 20px; }
.install li { margin: 6px 0; }
.install code { background: var(--panel-2); padding: 1px 6px; border-radius: 6px; }

.footer { color: var(--muted); font-size: 13px; padding: 20px 18px 50px; text-align: center; }

@media (max-width: 480px) {
  .facts { grid-template-columns: 1fr; }
  .icon { width: 68px; height: 68px; }
  .name { font-size: 21px; }
}
