:root {
  --bg: #eceef2;
  --surface: #f7f7f9;
  --card: #ffffff;
  --text: #1f2228;
  --muted: #5a616d;
  --line: #d8dce4;
  --accent: #23262c;
  --accent-2: #1e6fd9;
  --ok: #2d8a47;
  --radius-lg: 18px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #dde1e8 0%, var(--bg) 46%, #d7dbe3 100%);
}

body {
  display: block;
  overflow-x: hidden;
}

a {
  color: inherit;
}

.app-shell {
  width: 100%;
  min-height: 100vh;
  max-width: 460px;
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.08) 100%);
  position: relative;
  padding-bottom: 96px;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(245, 247, 252, 0.72);
  border-bottom: 1px solid rgba(214, 220, 231, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.app-header-inner {
  padding: 12px 14px 12px;
}

.brand-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.brand-subtitle {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.top-menu {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.menu-link {
  display: inline-block;
  text-decoration: none;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 600;
  background: #e8ebf1;
  border: 1px solid #d4d9e2;
  border-radius: 999px;
  padding: 7px 10px;
  white-space: nowrap;
}

.menu-link.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.app-main {
  width: 100%;
  padding: 14px 12px 10px;
  display: grid;
  gap: 12px;
}

.card {
  background: rgba(255, 255, 255, 0.82);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: 0 10px 24px rgba(18, 22, 32, 0.08);
  border: 1px solid rgba(230, 232, 238, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: hidden;
}

.hero-card {
  padding-bottom: 12px;
}

.hero-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.hero-photo {
  width: 92px;
  height: 92px;
  border-radius: 12px;
  object-fit: cover;
  flex: 0 0 92px;
}

.hero-title {
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.hero-cta-row {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.lead {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.45;
  color: var(--muted);
}

.facts {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
}

.facts li {
  background: #f2f4f8;
  border: 1px solid #dde2ea;
  border-radius: 10px;
  padding: 8px 9px;
  font-size: 14px;
  line-height: 1.35;
}

.stats {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  background: #e9f5ed;
  border: 1px solid #cde7d6;
  color: var(--ok);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 700;
}

.actions {
  display: grid;
  gap: 8px;
}

.cta {
  display: block;
  text-decoration: none;
  text-align: center;
  border-radius: var(--radius-md);
  padding: 13px 14px;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(180deg, #2b2f37 0%, #1f2228 100%);
  box-shadow: 0 8px 20px rgba(31, 34, 40, 0.3);
  white-space: normal;
  word-break: break-word;
}

.cta.secondary {
  background: linear-gradient(180deg, #2b84f2 0%, #1c67cc 100%);
  box-shadow: 0 8px 20px rgba(30, 111, 217, 0.32);
}

.cta-large {
  min-width: 0;
  width: 100%;
  padding: 12px 10px;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  line-height: 1.2;
  border-radius: 12px;
}

.section-title {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.2;
}

.author-grid {
  display: grid;
  gap: 8px;
}

.author-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 15px;
}

.list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.list a {
  text-decoration: none;
  display: block;
  border: 1px solid #d8dde7;
  background: #f4f6fa;
  border-radius: 10px;
  padding: 10px;
  font-size: 14px;
  line-height: 1.35;
}

.review-item {
  border: 1px solid #e0e4ec;
  border-radius: 12px;
  padding: 10px;
  background: #f9fafc;
}

.reviews-slider {
  display: flex;
  width: 100%;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 0;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.reviews-slider::-webkit-scrollbar {
  display: none;
}

.review-slide {
  flex: 0 0 100%;
  min-width: 100%;
  max-width: 100%;
  scroll-snap-align: start;
  border: 1px solid #e0e4ec;
  border-radius: 12px;
  padding: 10px;
  background: #f9fafc;
  overflow: hidden;
}

.review-head {
  margin: 0 0 6px;
  font-size: 14px;
  line-height: 1.3;
  color: #3d4450;
  overflow-wrap: anywhere;
}

.review-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--muted);
  white-space: pre-line;
}

.slider-hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: #6c7380;
  text-align: center;
}

.article-title {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.2;
}

.article-text {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

.article-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.article-nav a {
  text-decoration: none;
  border: 1px solid #d7dce5;
  border-radius: 10px;
  background: #f3f5f9;
  padding: 8px 10px;
  font-size: 14px;
}

.app-footer {
  margin: 0 12px 92px;
}

.footer-card {
  background: rgba(247, 247, 249, 0.78);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  padding: 12px;
  font-size: 13px;
  text-align: center;
  color: var(--muted);
  line-height: 1.4;
}

.footer-card p {
  margin: 0 0 5px;
}

.footer-card p:last-child {
  margin-bottom: 0;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background: rgba(247, 247, 249, 0.82);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.bottom-nav-inner {
  max-width: 520px;
  margin: 0 auto;
  padding: 9px 10px calc(9px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.bottom-link {
  text-decoration: none;
  text-align: center;
  font-size: 12px;
  line-height: 1.1;
  color: #4f5561;
  padding: 7px 5px;
  border-radius: 11px;
  display: grid;
  gap: 3px;
  justify-items: center;
}

.bottom-link.active {
  background: #e6ebf5;
  color: var(--text);
  font-weight: 700;
}

.bottom-icon {
  font-size: 14px;
}

.consent-popup {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 76px;
  max-width: 520px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid #d7d7db;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
  padding: 14px;
  z-index: 1000;
}

.consent-popup p {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}

.consent-popup a {
  text-decoration: none;
  font-weight: 700;
}

.consent-btn {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
}

@media (max-width: 360px) {
  .hero-photo {
    width: 90px;
    height: 90px;
    flex-basis: 90px;
  }

  .hero-title {
    font-size: 17px;
  }

  .hero-cta-row .cta-large {
    font-size: 13px;
    padding: 12px 10px;
    min-height: 52px;
  }

  .section-title {
    font-size: 18px;
  }

  .reviews-slider {
    grid-auto-columns: minmax(90%, 1fr);
  }

  .bottom-link {
    font-size: 11px;
  }
}
