:root {
  --ink: #142026;
  --muted: #5e6b73;
  --line: #e4eaed;
  --bg: #f3f6f7;
  --card: #ffffff;
  --teal: #0e7c77;
  --teal-dark: #0a5c58;
  --teal-soft: #e6f4f3;
  --coral: #e45a3b;
  --gold: #c9a227;
  --shadow: 0 12px 40px rgba(20, 32, 38, 0.08);
  --radius: 22px;
  --radius-sm: 14px;
  --font: "Outfit", system-ui, sans-serif;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; }
.container { width: min(var(--max), calc(100% - 32px)); margin-inline: auto; }

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(243, 246, 247, 0.86);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner {
  display: flex; align-items: center; gap: 18px;
  padding: 14px 0;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; letter-spacing: -0.03em; }
.brand img { width: 34px; height: 34px; }
.search-wrap { flex: 1; position: relative; }
.search-wrap input {
  width: 100%; border: 0; background: #fff; border-radius: 999px;
  padding: 12px 18px 12px 44px; box-shadow: 0 1px 0 rgba(20,32,38,.04);
  outline: none; font-size: 0.95rem;
}
.search-wrap svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); opacity: .45; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 10px 18px; cursor: pointer;
  font-weight: 600; font-size: .92rem; transition: transform .15s ease, background .2s ease, box-shadow .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); }
.btn-coral { background: var(--coral); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-outline { background: #fff; border: 1px solid var(--line); }
.btn-lg { padding: 14px 26px; font-size: 1rem; }
.btn-block { width: 100%; }
.link-muted { color: var(--muted); font-size: .92rem; }

.suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px);
  background: #fff; border-radius: 18px; box-shadow: var(--shadow);
  display: none; overflow: hidden; z-index: 20;
}
.suggest.open { display: block; }
.suggest a { display: flex; gap: 12px; align-items: center; padding: 10px 14px; }
.suggest a:hover { background: var(--teal-soft); }
.suggest img { width: 36px; height: 36px; border-radius: 10px; }
.suggest small { color: var(--muted); display: block; }

.hero {
  padding: 36px 0 18px;
}
.hero-card {
  background: linear-gradient(135deg, #0e7c77 0%, #0a5c58 55%, #16343a 100%);
  color: #fff; border-radius: 32px; padding: 48px 44px;
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 24px; align-items: center;
  box-shadow: var(--shadow); overflow: hidden; position: relative;
}
.hero-card h1 { font-size: clamp(2rem, 4vw, 3.2rem); margin: 0 0 12px; letter-spacing: -.04em; line-height: 1.1; }
.hero-card p { margin: 0 0 22px; max-width: 38ch; color: rgba(255,255,255,.86); }
.hero-orb {
  width: 220px; height: 220px; margin-left: auto;
  background: radial-gradient(circle at 30% 30%, #7ee0d8, #0e7c77 55%, transparent 70%);
  border-radius: 40% 60% 50% 50%; filter: blur(2px); opacity: .9;
}

.cat-row { display: flex; gap: 10px; overflow-x: auto; padding: 8px 0 18px; scrollbar-width: none; }
.cat-row::-webkit-scrollbar { display: none; }
.chip {
  background: #fff; border-radius: 999px; padding: 8px 14px; white-space: nowrap;
  border: 1px solid var(--line); font-size: .9rem; color: var(--muted);
}
.chip:hover, .chip.active { background: var(--teal-soft); color: var(--teal-dark); border-color: transparent; }

.section { padding: 12px 0 28px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.section-head h2 { margin: 0; font-size: 1.35rem; letter-spacing: -.03em; }
.section-head a { color: var(--teal); font-weight: 600; font-size: .92rem; }

.app-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.app-card {
  background: var(--card); border-radius: var(--radius); padding: 16px;
  box-shadow: 0 8px 24px rgba(20,32,38,.05); transition: transform .18s ease, box-shadow .18s;
}
.app-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.app-card .icon { width: 72px; height: 72px; border-radius: 18px; object-fit: cover; background: var(--teal-soft); }
.app-card h3 { margin: 12px 0 4px; font-size: 1.02rem; letter-spacing: -.02em; }
.app-card .meta { color: var(--muted); font-size: .85rem; }
.app-card .stats { margin-top: 10px; display: flex; gap: 10px; color: var(--muted); font-size: .8rem; }

.featured-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 16px; }
.feature-main {
  background: #fff; border-radius: 28px; padding: 28px; min-height: 240px;
  display: flex; flex-direction: column; justify-content: flex-end;
  background-image: linear-gradient(180deg, rgba(14,124,119,.08), rgba(14,124,119,.22));
}
.feature-main h3 { font-size: 1.6rem; margin: 0 0 6px; }

.store-footer {
  margin-top: 48px; padding: 36px 0 24px; border-top: 1px solid var(--line); color: var(--muted);
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 24px; }
.store-footer h4 { color: var(--ink); margin: 0 0 10px; }
.store-footer a { display: block; margin: 6px 0; }
.copy { margin-top: 28px; font-size: .85rem; }

.page-hero { padding: 28px 0 8px; }
.page-hero h1 { margin: 0 0 8px; letter-spacing: -.04em; font-size: 2rem; }

.app-hero {
  display: grid; grid-template-columns: 120px 1fr auto; gap: 22px; align-items: center;
  background: #fff; border-radius: 28px; padding: 24px; box-shadow: var(--shadow);
}
.app-hero .big-icon { width: 120px; height: 120px; border-radius: 28px; object-fit: cover; }
.app-hero h1 { margin: 0 0 6px; font-size: 2rem; letter-spacing: -.04em; }
.badge {
  display: inline-flex; padding: 4px 10px; border-radius: 999px; background: var(--teal-soft);
  color: var(--teal-dark); font-size: .78rem; font-weight: 600;
}
.badge.danger { background: #fde8e2; color: #b33b22; }
.badge.warn { background: #fff4d6; color: #8a6a10; }
.badge.muted { background: #eef1f3; color: var(--muted); }

.shots { display: flex; gap: 12px; overflow-x: auto; padding: 8px 0; }
.shots img { height: 320px; border-radius: 18px; cursor: zoom-in; box-shadow: 0 8px 20px rgba(20,32,38,.08); }
.prose { background: #fff; border-radius: 24px; padding: 24px; }
.prose h3 { margin-top: 0; }
.info-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0; }
.info-box { background: #fff; border-radius: 16px; padding: 14px; }
.info-box span { display: block; color: var(--muted); font-size: .8rem; }
.version-list { list-style: none; padding: 0; margin: 0; }
.version-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }

.form {
  background: #fff; border-radius: 24px; padding: 28px; box-shadow: var(--shadow); max-width: 460px; margin: 40px auto;
}
.form.wide { max-width: 820px; }
label { display: block; font-weight: 600; font-size: .88rem; margin: 14px 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], input[type=search], select, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; background: #fbfcfd; outline: none;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 4px var(--teal-soft); }
.help { color: var(--muted); font-size: .82rem; margin-top: 4px; }
.alert { padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; }
.alert-error { background: #fde8e2; color: #8c2f1c; }
.alert-ok { background: var(--teal-soft); color: var(--teal-dark); }

.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background:
  radial-gradient(circle at 10% 10%, #d8efed, transparent 40%),
  radial-gradient(circle at 90% 80%, #f8e4de, transparent 40%),
  var(--bg);
}

.dash-grid { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side {
  background: #102226; color: #d7e6e4; padding: 22px 16px;
}
.side .brand { color: #fff; margin-bottom: 24px; }
.side nav a {
  display: block; padding: 10px 12px; border-radius: 12px; color: #c5d5d3; margin-bottom: 4px;
}
.side nav a:hover, .side nav a.active { background: rgba(255,255,255,.08); color: #fff; }
.dash-main { padding: 24px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat {
  background: #fff; border-radius: 18px; padding: 18px; box-shadow: 0 8px 20px rgba(20,32,38,.05);
}
.stat b { display: block; font-size: 1.6rem; letter-spacing: -.03em; }
.stat span { color: var(--muted); font-size: .85rem; }
.table-wrap { background: #fff; border-radius: 18px; overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: .92rem; }
th { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }

.empty { text-align: center; padding: 48px 20px; color: var(--muted); background: #fff; border-radius: 24px; }
.toast {
  position: fixed; right: 18px; bottom: 18px; background: var(--ink); color: #fff;
  padding: 12px 16px; border-radius: 12px; display: none; z-index: 50;
}
.toast.show { display: block; animation: up .25s ease; }
@keyframes up { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

.drop {
  border: 2px dashed var(--line); border-radius: 16px; padding: 22px; text-align: center; color: var(--muted); background: #fbfcfd;
}
.drop.drag { border-color: var(--teal); background: var(--teal-soft); color: var(--teal-dark); }
.modal {
  position: fixed; inset: 0; background: rgba(20,32,38,.55); display: none; place-items: center; z-index: 60; padding: 20px;
}
.modal.open { display: grid; }
.modal img { max-height: 86vh; border-radius: 16px; }

.pager { display: flex; gap: 8px; justify-content: center; margin: 24px 0; }
.pager a, .pager span { padding: 8px 12px; border-radius: 10px; background: #fff; }
.pager .current { background: var(--teal); color: #fff; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.sha { font-family: ui-monospace, monospace; font-size: .78rem; word-break: break-all; background: #f4f7f8; padding: 8px; border-radius: 8px; }

.skeleton { background: linear-gradient(90deg, #eef2f3, #f7f9fa, #eef2f3); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 12px; height: 14px; }
@keyframes sk { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

.install-wrap { max-width: 640px; margin: 40px auto; background: #fff; border-radius: 28px; padding: 36px; box-shadow: var(--shadow); }
.steps { display: flex; gap: 8px; margin-bottom: 24px; }
.steps span { flex: 1; height: 6px; border-radius: 99px; background: var(--line); }
.steps span.on { background: var(--teal); }

.legal { max-width: 760px; }
.legal h1 { letter-spacing: -.04em; }

@media (max-width: 980px) {
  .app-row, .featured-grid, .stat-grid, .info-grid, .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-card, .app-hero, .dash-grid { grid-template-columns: 1fr; }
  .app-hero { justify-items: start; }
  .side { position: sticky; top: 0; z-index: 10; }
  .hero-orb { display: none; }
}
@media (max-width: 640px) {
  .app-row, .featured-grid, .stat-grid, .info-grid, .footer-grid { grid-template-columns: 1fr; }
  .header-inner { flex-wrap: wrap; }
  .search-wrap { order: 3; flex: 1 1 100%; }
  .app-hero .big-icon { width: 84px; height: 84px; }
}
