/* ==========================================================================
   DIGONTO HORIZON — MIDNIGHT INDUSTRIAL THEME
   Mobile (<768px): True 100dvh Native Android ViewPager2 App Shell
   Desktop (>=768px): Flagship Book Launch + Ecosystem Bento Showcase
   ========================================================================== */
:root {
  color-scheme: dark;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Hind Siliguri", "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;

  --horizon-rgb: 236, 72, 153;
  --horizon-hex: #ec4899;

  --bg-sky: #040711;
  --bg-ground: #060a16;
  --surface-glass: rgba(11, 17, 32, 0.64);
  --surface-glass-hover: rgba(16, 24, 44, 0.86);
  --surface-pill: rgba(255, 255, 255, 0.05);
  --surface-modal: rgba(9, 14, 28, 0.97);

  --border-subtle: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --shadow-card: 0 22px 54px -16px rgba(0, 0, 0, 0.72);
  --shadow-horizon: 0 10px 30px -8px rgba(var(--horizon-rgb), 0.38);

  --radius-xl: 24px;
  --radius-pill: 999px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
}

html, body {
  min-height: 100%;
  font-family: var(--font-sans);
  background-color: var(--bg-sky);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

#horizonCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
}

.horizon-stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   MOBILE NATIVE ANDROID SHELL (< 768px)
   ========================================================================== */
@media (max-width: 767px) {
  html, body {
    height: 100dvh;
    overflow: hidden;
  }

  .horizon-stage {
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }

  .mobile-pager {
    flex: 1;
    min-height: 0;
    width: 100%;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-pager::-webkit-scrollbar {
    display: none;
  }

  .app-view {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    padding: calc(28px + env(safe-area-inset-top, 0px)) 18px 14px;
    scrollbar-width: none;
  }

  .app-view::-webkit-scrollbar {
    display: none;
  }

  .desktop-only {
    display: none !important;
  }

  .hz-topbar {
    display: none !important;
  }
}

@media (min-width: 768px) {
  .mobile-pager {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 28px;
    flex: 1;
  }

  .mobile-only {
    display: none !important;
  }
}

/* ==========================================================================
   FLOATING HORIZON TOPBAR
   ========================================================================== */
.hz-topbar {
  flex-shrink: 0;
  z-index: 50;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 18px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(4, 7, 17, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

@media (min-width: 768px) {
  .hz-topbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    padding: 20px 28px 10px;
    border-bottom: none;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .hz-topbar .hz-brand { justify-self: start; }
  .hz-topbar .hz-nav-strip { justify-self: center; }
  .hz-topbar .hz-topbar-right { justify-self: end; }
}

.hz-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 0.96rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-decoration: none;
  white-space: nowrap;
}

.hz-brand-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.35));
}

.squircle-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.hz-brand-orb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 28% 36%, rgba(148, 163, 184, 0.35) 0%, transparent 16%),
    radial-gradient(circle at 62% 58%, rgba(100, 116, 139, 0.28) 0%, transparent 20%),
    radial-gradient(circle at 34% 32%, #ffffff 0%, #f1f5f9 45%, #cbd5e1 78%, #64748b 100%);
  box-shadow:
    0 0 16px rgba(248, 250, 252, 0.4),
    0 0 32px rgba(var(--horizon-rgb), 0.35),
    inset -5px -4px 8px rgba(15, 23, 42, 0.55);
}

.hz-nav-strip {
  display: none;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: var(--surface-pill);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
}

@media (min-width: 768px) {
  .hz-nav-strip { display: inline-flex; }
}

.hz-nav-pill {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 6px 15px;
  border-radius: var(--radius-pill);
  transition: all 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
}

.hz-nav-pill:hover { color: var(--text-primary); }

.hz-nav-pill.is-active {
  background: rgba(var(--horizon-rgb), 0.16);
  color: var(--horizon-hex);
  box-shadow: inset 0 0 0 1px rgba(var(--horizon-rgb), 0.38);
}

.hz-topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hz-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  background: var(--surface-pill);
  border: 1px solid var(--border-subtle);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hz-pill:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

/* ==========================================================================
   MOBILE BOTTOM NAVIGATION (MATERIAL 3)
   ========================================================================== */
.bottom-nav {
  flex-shrink: 0;
  z-index: 60;
  width: calc(100% - 32px);
  max-width: 380px;
  margin: 0 auto calc(12px + env(safe-area-inset-bottom, 0px));
  padding: 5px;
  border-radius: var(--radius-pill);
  background: rgba(11, 17, 32, 0.86);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 14px 36px -8px rgba(0, 0, 0, 0.75);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
}

@media (min-width: 768px) {
  .bottom-nav { display: none; }
}

.bottom-nav-item {
  flex: 1;
  background: none;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.bottom-nav-item.is-active {
  background: rgba(var(--horizon-rgb), 0.16);
  color: var(--horizon-hex);
  box-shadow: inset 0 0 0 1px rgba(var(--horizon-rgb), 0.38);
}

.bottom-nav-item:active { transform: scale(0.95); }

/* ==========================================================================
   BOOK LAUNCH EVENT HERO (FLOATING 3D BOOK CENTERPIECE)
   ========================================================================== */
.book-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: center;
  padding: 4px 0 8px;
}

@media (min-width: 768px) {
  .book-hero {
    grid-template-columns: 0.92fr 1.08fr;
    gap: 56px;
    padding: 52px 0 64px;
  }
}

.book-hero-copy {
  text-align: center;
  order: 2;
}

@media (min-width: 768px) {
  .book-hero-copy {
    text-align: left;
    order: 2;
  }
}

.event-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: rgba(var(--horizon-rgb), 0.12);
  border: 1px solid rgba(var(--horizon-rgb), 0.34);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--horizon-hex);
  margin-bottom: 12px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--horizon-hex);
  box-shadow: 0 0 10px var(--horizon-hex);
}

.book-hero-title {
  font-size: clamp(1.75rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}

.horizon-accent { color: var(--horizon-hex); }

.book-hero-sub {
  font-size: clamp(0.94rem, 1.8vw, 1.14rem);
  color: var(--text-secondary);
  max-width: 470px;
  margin: 0 auto 10px;
}

@media (min-width: 768px) {
  .book-hero-sub { margin: 0 0 14px; }
}

.book-hero-author {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.hero-cta {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 8px;
}

@media (min-width: 768px) {
  .hero-cta {
    justify-content: flex-start;
    gap: 12px;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.15s ease, filter 0.2s ease, border-color 0.2s ease;
}

@media (min-width: 768px) {
  .btn {
    min-height: 46px;
    padding: 0 22px;
    font-size: 0.9rem;
  }
}

.btn:active { transform: scale(0.96); }

.btn-primary {
  background-color: var(--horizon-hex);
  color: #ffffff;
  box-shadow: var(--shadow-horizon);
}

.btn-primary:hover { filter: brightness(1.08); }

.btn-secondary {
  background: var(--surface-glass);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(14px);
}

.btn-secondary:hover {
  border-color: var(--border-strong);
  background: var(--surface-glass-hover);
}

/* 3D Floating Book Stage */
.floating-book-stage {
  order: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
  padding: 6px 0 0;
}

@media (min-width: 768px) {
  .floating-book-stage { order: 1; padding: 12px 0; }
}

.book-aura {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.36) 0%, rgba(251, 191, 36, 0.18) 45%, transparent 72%);
  filter: blur(36px);
  pointer-events: none;
  animation: auraPulse 5.5s ease-in-out infinite;
}

.floating-book {
  position: relative;
  width: auto;
  max-width: min(190px, 48vw);
  border-radius: 14px;
  transform-style: preserve-3d;
  transform: rotateY(-12deg) rotateX(4deg);
  animation: floatBook 5.5s ease-in-out infinite;
  transition: transform 0.25s ease-out;
  cursor: pointer;
}

@media (min-width: 768px) {
  .floating-book { max-width: 310px; width: 310px; }
}

.floating-book::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: -11px;
  width: 13px;
  border-radius: 4px 0 0 4px;
  background: linear-gradient(90deg, #1f0a36, #4c1d95 70%, #a855f7);
  transform: rotateY(-78deg);
  transform-origin: right center;
}

.floating-book img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    -14px 24px 46px rgba(0, 0, 0, 0.85),
    0 0 32px rgba(236, 72, 153, 0.28);
}

.book-floor-shadow {
  width: 150px;
  height: 16px;
  margin-top: 16px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.78) 0%, transparent 72%);
  filter: blur(6px);
  animation: shadowPulse 5.5s ease-in-out infinite;
}

@media (min-width: 768px) {
  .book-floor-shadow { width: 190px; margin-top: 22px; }
}

@keyframes floatBook {
  0%, 100% { transform: translateY(0px) rotateY(-12deg) rotateX(4deg); }
  50% { transform: translateY(-14px) rotateY(-6deg) rotateX(2deg); }
}

@keyframes shadowPulse {
  0%, 100% { transform: scale(1); opacity: 0.75; }
  50% { transform: scale(0.84); opacity: 0.45; }
}

@keyframes auraPulse {
  0%, 100% { transform: scale(1); opacity: 0.75; }
  50% { transform: scale(1.12); opacity: 1; }
}

/* Compact FAQ Accordion */
.faq-list {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.faq-item {
  background: var(--surface-glass);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 0.84rem;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text-primary);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-item summary::after {
  content: "+";
  color: var(--horizon-hex);
  font-size: 1rem;
  font-weight: 700;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  margin-top: 6px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  line-height: 1.5;
}

/* Rich App Cards (Benefits + Direct APK Install) */
.app-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.58;
  margin: 12px 0;
}

.app-features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.app-feat-pill {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-primary);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(var(--item-rgb, 236, 72, 153), 0.12);
  border: 1px solid rgba(var(--item-rgb, 236, 72, 153), 0.28);
}

.app-install-btn {
  width: 100%;
  min-height: 42px;
  font-size: 0.85rem;
  margin-top: auto;
}

@media (max-width: 767px) {
  .apps-carousel {
    display: flex !important;
    flex-direction: row !important;
    gap: 14px !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
    margin: auto 0;
  }
  .apps-carousel::-webkit-scrollbar {
    display: none;
  }
  .apps-carousel .app-showcase-card {
    flex: 0 0 88%;
    scroll-snap-align: center;
    display: flex;
    flex-direction: column;
  }
}

/* Swipe / Next Page Button on Mobile Book Screen */
.swipe-cue {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 6px 8px 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--surface-pill);
  border: 1px solid var(--border-subtle);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s ease;
}

.swipe-cue:active {
  transform: scale(0.95);
}

.swipe-cue-arrow {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(var(--horizon-rgb), 0.18);
  color: var(--horizon-hex);
  font-size: 0.82rem;
}

.pager-arrows {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
}

.pager-arrows .swipe-cue {
  margin-top: 0;
}

/* ==========================================================================
   FLOATING PERSISTENT BOOK DOCK (DESKTOP SCROLL COMPANION)
   ========================================================================== */
.floating-dock {
  display: none;
}

@media (min-width: 768px) {
  .floating-dock {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 55;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px 10px 10px;
    border-radius: 18px;
    background: rgba(11, 17, 32, 0.88);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(var(--horizon-rgb), 0.35);
    box-shadow: 0 18px 42px -10px rgba(0, 0, 0, 0.85);
    text-decoration: none;
    opacity: 0;
    transform: translateY(18px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  .floating-dock.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
}

.floating-dock img {
  width: 40px;
  height: 52px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.floating-dock-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-primary);
}

.floating-dock-sub {
  font-size: 0.72rem;
  color: var(--horizon-hex);
}

/* ==========================================================================
   SECTIONS: SUBDOMAINS & APPS
   ========================================================================== */
@media (min-width: 768px) {
  .section-band { padding: 36px 0 52px; }
}

.band-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.band-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--horizon-hex);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
  }
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 768px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
}

.squircle {
  width: 44px;
  height: 44px;
  border-radius: 28%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: rgba(var(--item-rgb, var(--horizon-rgb)), 0.14);
  border: 1px solid rgba(var(--item-rgb, var(--horizon-rgb)), 0.34);
  color: rgb(var(--item-rgb, var(--horizon-rgb)));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.portal-card {
  background: var(--surface-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.portal-card:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--item-rgb, var(--horizon-rgb)), 0.45);
  background: var(--surface-glass-hover);
}

.portal-card:active { transform: scale(0.985); }

.portal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.portal-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.portal-title {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text-primary);
}

.portal-url {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
}

.arrow-chip {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-pill);
  color: var(--text-secondary);
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.portal-card:hover .arrow-chip {
  background: rgba(var(--item-rgb, var(--horizon-rgb)), 0.18);
  color: rgb(var(--item-rgb, var(--horizon-rgb)));
  transform: translate(2px, -2px);
}

/* Mini Visual UI Previews */
.mini-ui {
  border-radius: 14px;
  background: rgba(4, 7, 17, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mini-ui-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mini-dots { display: flex; gap: 5px; }
.mini-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.mini-pill-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(var(--item-rgb), 0.15);
  color: rgb(var(--item-rgb));
}

.mini-tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mini-tool-tile {
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.mini-ws-cols {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 8px;
}

.mini-ws-panel {
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.mini-line {
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.16);
}

.mini-line.accent {
  width: 62%;
  background: rgba(var(--item-rgb), 0.65);
}

/* Visual App Showcase Cards */
.app-showcase-card {
  background: var(--surface-glass);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 18px;
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  cursor: pointer;
}

.app-showcase-card:hover {
  transform: translateY(-3px);
  border-color: rgba(var(--item-rgb, var(--horizon-rgb)), 0.42);
  background: var(--surface-glass-hover);
}

.app-showcase-card:active { transform: scale(0.985); }

.app-row-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.app-row-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.app-row-sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.app-badge {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--surface-pill);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  flex-shrink: 0;
}

/* ==========================================================================
   NATIVE ANDROID BOTTOM SHEET MODAL (INTERACTIVE CHAPTER TABS)
   ========================================================================== */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(4, 7, 17, 0.8);
  backdrop-filter: blur(8px);
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.sheet-backdrop.open { display: flex; }

@media (min-width: 768px) {
  .sheet-backdrop {
    align-items: center;
    padding: 24px;
  }
}

.sheet {
  width: 100%;
  max-width: 480px;
  background: var(--surface-modal);
  border-top-left-radius: 28px;
  border-top-right-radius: 28px;
  border: 1px solid rgba(var(--horizon-rgb), 0.35);
  padding: 14px 22px calc(26px + env(safe-area-inset-bottom, 0px));
  box-shadow: var(--shadow-card);
  animation: slideUp 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (min-width: 768px) {
  .sheet {
    border-radius: 24px;
    padding: 26px;
  }
}

@keyframes slideUp {
  from { transform: translateY(36px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 99px;
  background: var(--border-strong);
  margin: 0 auto 16px;
}

@media (min-width: 768px) {
  .sheet-handle { display: none; }
}

.sheet-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 12px;
  scrollbar-width: none;
}

.sheet-tabs::-webkit-scrollbar { display: none; }

.sheet-tab {
  flex: 0 0 auto;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: var(--surface-pill);
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
}

.sheet-tab.is-active {
  background: rgba(var(--horizon-rgb), 0.18);
  color: var(--horizon-hex);
  border-color: rgba(var(--horizon-rgb), 0.42);
}

/* In-App No-Download PDF Preview Modal */
.pdf-modal {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(4, 7, 17, 0.92);
  backdrop-filter: blur(12px);
  display: none;
  flex-direction: column;
}

.pdf-modal.open {
  display: flex;
}

.pdf-modal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(6, 10, 22, 0.95);
}

.pdf-modal-frame {
  flex: 1;
  width: 100%;
  border: none;
  background: #0b1120;
}

/* Android Toast / Snackbar */
.snackbar {
  position: fixed;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%) translateY(16px);
  z-index: 120;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(var(--horizon-rgb), 0.4);
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.snackbar.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   MINIMAL FOOTER
   ========================================================================== */
footer {
  border-top: 1px solid var(--border-subtle);
  padding: 22px 0;
  margin-top: 24px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.82rem;
}

@media (min-width: 768px) {
  .footer-inner { flex-direction: row; }
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
}

.footer-link:hover { color: var(--horizon-hex); }
