/* App3C — Clean, fast, responsive design system (pure external CSS, zero bloat) */
:root {
  --primary: #0F4C81;
  --primary-dark: #0A3459;
  --accent: #0D9488;
  --accent-soft: #CCFBF1;
  --sky: #38BDF8;
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --border: #E2E8F0;
  --text: #0F172A;
  --text-sub: #475569;
  --text-muted: #64748B;
  --footer-bg: #0F172A;
  --footer-text: #F8FAFC;
  --footer-muted: #94A3B8;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 4px 10px -2px rgba(15, 23, 42, 0.04);
  --container: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; cursor: pointer; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}
.brand-logo img { height: 34px; width: auto; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-sub);
}
.nav-links a:hover { color: var(--primary); }

.header-search {
  position: relative;
  flex: 1;
  max-width: 340px;
}
.header-search input {
  width: 100%;
  height: 38px;
  padding: 0 14px 0 36px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.header-search input:focus {
  border-color: var(--accent);
  background: var(--surface);
}
.header-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}
.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  max-height: 360px;
  overflow-y: auto;
  z-index: 100;
  display: none;
}
.search-results.open { display: block; }
.search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.search-item:last-child { border-bottom: 0; }
.search-item:hover { background: var(--bg); }
.search-item img { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.search-item-name { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.25; }
.search-item-meta { font-size: 12px; color: var(--text-muted); }
.search-empty { padding: 14px; font-size: 13px; color: var(--text-muted); text-align: center; }

.menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  color: var(--text);
}
.mobile-nav {
  display: none;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.mobile-nav.open { display: flex; flex-direction: column; gap: 10px; }
.mobile-nav a { font-weight: 600; color: var(--text-sub); padding: 6px 0; }

/* Hero */
.hero {
  background: linear-gradient(135deg, #0F4C81 0%, #0D6E8A 55%, #0D9488 100%);
  color: #FFFFFF;
  padding: 44px 0 40px;
  margin-bottom: 28px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 28px;
  align-items: center;
}
.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.hero-sub {
  margin: 0 0 20px;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
  max-width: 520px;
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
}
.hero-badge {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  padding: 6px 12px;
  border-radius: 999px;
}
.hero-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.hero-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  padding: 12px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  transition: transform 0.15s;
}
.hero-card:hover { transform: translateY(-2px); }
.hero-card img { width: 52px; height: 52px; border-radius: 12px; flex-shrink: 0; }
.hero-card-title { font-weight: 700; font-size: 14px; line-height: 1.25; margin-bottom: 3px; }
.hero-card-meta { font-size: 12px; color: var(--text-muted); }

/* Sections & Grids */
.section { margin-bottom: 36px; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.section-head h2 {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.section-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
}
.section-link:hover { text-decoration: underline; }

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}
.app-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.app-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.app-card img {
  width: 56px;
  height: 56px;
  border-radius: 13px;
  flex-shrink: 0;
  background: var(--bg);
}
.app-card-body { min-width: 0; flex: 1; }
.app-card-name {
  margin: 0 0 3px;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-card-cat {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-card-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
}
.rating-pill { color: #0F766E; }
.get-pill {
  flex-shrink: 0;
  background: var(--bg);
  color: var(--primary);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
}
.app-card:hover .get-pill {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
}

/* Category Chips */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 10px;
}
.cat-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: border-color 0.15s, color 0.15s;
}
.cat-chip:hover { border-color: var(--primary); color: var(--primary); }
.cat-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: 999px;
}

/* Guides */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.guide-card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.guide-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.guide-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--primary);
  background: #E0F2FE;
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.guide-card h3 { margin: 0 0 8px; font-size: 17px; line-height: 1.35; }
.guide-card p { margin: 0 0 12px; font-size: 14px; color: var(--text-sub); flex: 1; }
.guide-meta { font-size: 12px; color: var(--text-muted); font-weight: 600; }

/* Breadcrumb */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  margin: 18px 0 14px;
}
.breadcrumb a:hover { color: var(--primary); text-decoration: underline; }

/* Detail & Version Two-Column Layout */
.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 24px;
  align-items: start;
  margin-bottom: 40px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

/* App Header Card */
.app-hero {
  display: flex;
  align-items: center;
  gap: 18px;
}
.app-hero-icon {
  width: 84px;
  height: 84px;
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
  background: var(--bg);
}
.app-hero h1 {
  margin: 0 0 6px;
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.2;
}
.app-hero-dev {
  font-size: 14px;
  color: var(--text-sub);
  margin-bottom: 10px;
}
.app-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-sub);
}
.badge-safe { background: #ECFDF5; border-color: #A7F3D0; color: #065F46; }
.badge-rating { background: #F0FDFA; border-color: #99F6E4; color: #0F766E; }

/* Specs Grid */
.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.spec-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
}
.spec-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); font-weight: 700; }
.spec-value { font-size: 14px; font-weight: 700; color: var(--text); margin-top: 3px; word-break: break-word; }

/* Editorial Content */
.article-section { margin-bottom: 22px; }
.article-section:last-child { margin-bottom: 0; }
.article-section h2 {
  margin: 0 0 10px;
  font-size: 19px;
  font-weight: 800;
  color: var(--text);
}
.article-section p { margin: 0 0 12px; color: var(--text-sub); }
.article-section ul {
  margin: 0 0 12px;
  padding-left: 20px;
  color: var(--text-sub);
}
.article-section li { margin-bottom: 6px; }
.safety-box {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-left: 4px solid #10B981;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: #14532D;
  font-size: 14px;
}
.faq-list details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 10px;
  background: var(--bg);
}
.faq-list summary {
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  color: var(--text);
}
.faq-list p { margin: 8px 0 0; font-size: 14px; color: var(--text-sub); }

/* GAM Ad Container — clear Advertisement label + safe spacing + anti-CLS */
.ads {
  margin: 24px 0;
  padding: 10px 12px 14px;
  background: #F8FAFC;
  border: 1px dashed #CBD5E1;
  border-radius: var(--radius-sm);
  text-align: center;
  transition: opacity 0.2s;
}
.ads.is-empty {
  display: none;
}
.ads-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.ads-slot {
  width: 100%;
  min-height: 270px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.ad-preview-box {
  width: 100%;
  max-width: 728px;
  min-height: 250px;
  border-radius: 10px;
  background: linear-gradient(135deg, #EFF6FF, #F0FDFA);
  border: 1px solid #BFDBFE;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 18px;
  color: var(--primary-dark);
  font-size: 13px;
}

/* Download Options — >=36px separation from ad slots to prevent accidental clicks */
.download-panel {
  margin-top: 32px;
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
  border: 2px solid #DBEAFE;
  border-radius: var(--radius);
  padding: 22px;
}
.download-panel h2 { margin: 0 0 6px; font-size: 20px; }
.download-hint { margin: 0 0 18px; font-size: 14px; color: var(--text-sub); }
.download-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}
.dl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.dl-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.dl-btn--primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #FFFFFF;
}
.dl-btn--play {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.dl-btn--play:hover { border-color: #10B981; }
.dl-btn--store {
  background: #0F172A;
  color: #FFFFFF;
}
.dl-btn-icon { width: 20px; height: 20px; flex-shrink: 0; }
.store-entry-unavailable { display: none !important; }
.store-entry-notice {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

/* Sidebar */
.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
}
.sidebar-card h3 {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 800;
}
.side-list { display: flex; flex-direction: column; gap: 10px; }
.side-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 10px;
  transition: background 0.15s;
}
.side-item:hover { background: var(--bg); }
.side-item img { width: 42px; height: 42px; border-radius: 10px; flex-shrink: 0; }
.side-item-info { min-width: 0; }
.side-item-name {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.side-item-meta { font-size: 12px; color: var(--text-muted); }

/* Static / Legal pages */
.prose { max-width: 820px; margin: 24px auto 48px; }
.prose h1 { margin: 0 0 12px; font-size: 30px; }
.prose h2 { margin: 24px 0 8px; font-size: 20px; }
.prose p, .prose li { color: var(--text-sub); }
.prose-meta { font-size: 13px; color: var(--text-muted); margin-bottom: 18px; }

/* Footer */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 40px 0 28px;
  margin-top: 48px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.12);
}
.footer-desc {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--footer-muted);
  max-width: 400px;
}
.footer-col h4 { margin: 0 0 12px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.05em; color: #E2E8F0; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-col a { font-size: 14px; color: var(--footer-muted); }
.footer-col a:hover { color: #FFFFFF; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 20px;
  font-size: 13px;
  color: var(--footer-muted);
}

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .page-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .menu-btn { display: inline-flex; align-items: center; }
  .header-search { max-width: none; }
  .hero-cards { grid-template-columns: 1fr; }
  .app-hero { align-items: flex-start; }
  .app-hero-icon { width: 68px; height: 68px; border-radius: 16px; }
}
